]> git.karo-electronics.de Git - linux-beck.git/commit
net-timestamp: move timestamp flags out of sk_flags
authorWillem de Bruijn <willemb@google.com>
Tue, 5 Aug 2014 02:11:46 +0000 (22:11 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Aug 2014 23:35:54 +0000 (16:35 -0700)
commitb9f40e21ef4298650ab33e35740fa85bd57706d5
tree1d1904c9f89dc77eae767a8a8895698d644cff1a
parentf24b9be5957b38bb420b838115040dc2031b7d0c
net-timestamp: move timestamp flags out of sk_flags

sk_flags is reaching its limit. New timestamping options will not fit.
Move all of them into a new field sk->sk_tsflags.

Added benefit is that this removes boilerplate code to convert between
SOF_TIMESTAMPING_.. and SOCK_TIMESTAMPING_.. in getsockopt/setsockopt.

SOCK_TIMESTAMPING_RX_SOFTWARE is also used to toggle the receive
timestamp logic (netstamp_needed). That can be simplified and this
last key removed, but will leave that for a separate patch.

Signed-off-by: Willem de Bruijn <willemb@google.com>
----

The u16 in sock can be moved into a 16-bit hole below sk_gso_max_segs,
though that scatters tstamp fields throughout the struct.
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/core/sock.c
net/socket.c