aboutsummaryrefslogtreecommitdiff
path: root/net/packet/internal.h
diff options
context:
space:
mode:
authorGravatar Eric Dumazet <edumazet@google.com> 2023-03-16 01:10:10 +0000
committerGravatar David S. Miller <davem@davemloft.net> 2023-03-17 08:52:05 +0000
commit7438344660fa55b33b8234c1797c886eb73667a7 (patch)
tree243d10b9738752d797a3aad730dea140c21f80cb /net/packet/internal.h
parentnet/packet: annotate accesses to po->tp_tstamp (diff)
downloadlinux-7438344660fa55b33b8234c1797c886eb73667a7.tar.gz
linux-7438344660fa55b33b8234c1797c886eb73667a7.tar.bz2
linux-7438344660fa55b33b8234c1797c886eb73667a7.zip
net/packet: convert po->tp_tx_has_off to an atomic flag
This is to use existing space in po->flags, and reclaim the storage used by the non atomic bit fields. 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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/packet/internal.h b/net/packet/internal.h
index 3bae8ea7a36f..0d16a581e271 100644
--- a/net/packet/internal.h
+++ b/net/packet/internal.h
@@ -119,8 +119,7 @@ struct packet_sock {
unsigned long flags;
unsigned int running; /* bind_lock must be held */
unsigned int has_vnet_hdr:1, /* writer must hold sock lock */
- tp_loss:1,
- tp_tx_has_off:1;
+ tp_loss:1;
int pressure;
int ifindex; /* bound device */
__be16 num;
@@ -146,6 +145,7 @@ static inline struct packet_sock *pkt_sk(struct sock *sk)
enum packet_sock_flags {
PACKET_SOCK_ORIGDEV,
PACKET_SOCK_AUXDATA,
+ PACKET_SOCK_TX_HAS_OFF,
};
static inline void packet_sock_flag_set(struct packet_sock *po,