summaryrefslogtreecommitdiffstats
path: root/net/packet/internal.h
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2015-05-12 11:56:46 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-13 15:42:59 -0400
commit0648ab70afe6c3bf2369a6d779b44a85121c063d (patch)
treed46581955bce49448791e1849ce7283f65917d33 /net/packet/internal.h
parentad377cab4966e2f9162f05be1f7eeae466d411a8 (diff)
downloadlinux-0648ab70afe6c3bf2369a6d779b44a85121c063d.tar.bz2
packet: rollover prepare: per-socket state
Replace rollover state per fanout group with state per socket. Future patches will add fields to the new structure. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet/internal.h')
-rw-r--r--net/packet/internal.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/packet/internal.h b/net/packet/internal.h
index fe6e20caea1d..a9d33a28a019 100644
--- a/net/packet/internal.h
+++ b/net/packet/internal.h
@@ -82,12 +82,15 @@ struct packet_fanout {
atomic_t rr_cur;
struct list_head list;
struct sock *arr[PACKET_FANOUT_MAX];
- int next[PACKET_FANOUT_MAX];
spinlock_t lock;
atomic_t sk_ref;
struct packet_type prot_hook ____cacheline_aligned_in_smp;
};
+struct packet_rollover {
+ int sock;
+} ____cacheline_aligned_in_smp;
+
struct packet_sock {
/* struct sock has to be the first member of packet_sock */
struct sock sk;
@@ -104,6 +107,7 @@ struct packet_sock {
has_vnet_hdr:1;
int ifindex; /* bound device */
__be16 num;
+ struct packet_rollover *rollover;
struct packet_mclist *mclist;
atomic_t mapped;
enum tpacket_versions tp_version;