summaryrefslogtreecommitdiff
path: root/net/packet/internal.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-03-16 01:10:12 +0000
committerDavid S. Miller <davem@davemloft.net>2023-03-17 08:52:05 +0000
commit50d935eafee292fc432d5ac8c8715a6492961abc (patch)
tree71ce8782d11998f025a8cdd2fa6aecce0fc406e5 /net/packet/internal.h
parent164bddace2e03f6005e650cb88f101a66ebdc05a (diff)
net/packet: convert po->has_vnet_hdr to an atomic flag
po->has_vnet_hdr can be read locklessly. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet/internal.h')
-rw-r--r--net/packet/internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/internal.h b/net/packet/internal.h
index 9d406a92ede8..2521176807f4 100644
--- a/net/packet/internal.h
+++ b/net/packet/internal.h
@@ -118,7 +118,6 @@ struct packet_sock {
struct mutex pg_vec_lock;
unsigned long flags;
unsigned int running; /* bind_lock must be held */
- unsigned int has_vnet_hdr:1; /* writer must hold sock lock */
int pressure;
int ifindex; /* bound device */
__be16 num;
@@ -146,6 +145,7 @@ enum packet_sock_flags {
PACKET_SOCK_AUXDATA,
PACKET_SOCK_TX_HAS_OFF,
PACKET_SOCK_TP_LOSS,
+ PACKET_SOCK_HAS_VNET_HDR,
};
static inline void packet_sock_flag_set(struct packet_sock *po,