Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: free SKBTX_WIFI_STATUS skb tx_flags flag

Jason mentioned at netdevconf that we've run out of tx_flags in
the skb_shinfo(). Gain one bit back by removing the wifi bit.

We can do that because the only userspace application for it
(hostapd) doesn't change the setting on the socket, it just
uses different sockets, and normally doesn't even use this any
more, sending the frames over nl80211 instead.

Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://patch.msgid.link/20250313134942.52ff54a140ec.If390bbdc46904cf451256ba989d7a056c457af6e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+10 -13
+2 -1
drivers/net/wireless/ath/wil6210/txrx.h
··· 7 7 #ifndef WIL6210_TXRX_H 8 8 #define WIL6210_TXRX_H 9 9 10 + #include <net/sock.h> 10 11 #include "wil6210.h" 11 12 #include "txrx_edma.h" 12 13 ··· 618 617 const u8 *da = wil_skb_get_da(skb); 619 618 620 619 return is_unicast_ether_addr(da) && skb->sk && 621 - (skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS); 620 + sock_flag(skb->sk, SOCK_WIFI_STATUS); 622 621 } 623 622 624 623 static inline void wil_consume_skb(struct sk_buff *skb, bool acked)
+2 -1
drivers/net/wireless/marvell/mwifiex/main.c
··· 6 6 */ 7 7 8 8 #include <linux/suspend.h> 9 + #include <net/sock.h> 9 10 10 11 #include "main.h" 11 12 #include "wmm.h" ··· 940 939 multicast = is_multicast_ether_addr(skb->data); 941 940 942 941 if (unlikely(!multicast && skb->sk && 943 - skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS && 942 + sock_flag(skb->sk, SOCK_WIFI_STATUS) && 944 943 priv->adapter->fw_api_ver == MWIFIEX_FW_V15)) 945 944 skb = mwifiex_clone_skb_for_tx_status(priv, 946 945 skb,
-3
include/linux/skbuff.h
··· 481 481 /* generate software time stamp on packet tx completion */ 482 482 SKBTX_COMPLETION_TSTAMP = 1 << 3, 483 483 484 - /* generate wifi status information (where possible) */ 485 - SKBTX_WIFI_STATUS = 1 << 4, 486 - 487 484 /* determine hardware time stamp based on time or cycles */ 488 485 SKBTX_HW_TSTAMP_NETDEV = 1 << 5, 489 486
-2
include/net/sock.h
··· 2736 2736 *tskey = atomic_inc_return(&sk->sk_tskey) - 1; 2737 2737 } 2738 2738 } 2739 - if (unlikely(sock_flag(sk, SOCK_WIFI_STATUS))) 2740 - *tx_flags |= SKBTX_WIFI_STATUS; 2741 2739 } 2742 2740 2743 2741 static inline void sock_tx_timestamp(struct sock *sk,
+2 -1
net/mac80211/mesh.c
··· 8 8 9 9 #include <linux/slab.h> 10 10 #include <linux/unaligned.h> 11 + #include <net/sock.h> 11 12 #include "ieee80211_i.h" 12 13 #include "mesh.h" 13 14 #include "wme.h" ··· 777 776 if (ethertype < ETH_P_802_3_MIN) 778 777 return false; 779 778 780 - if (skb->sk && skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS) 779 + if (skb->sk && sock_flag(skb->sk, SOCK_WIFI_STATUS)) 781 780 return false; 782 781 783 782 if (skb->ip_summed == CHECKSUM_PARTIAL) {
+4 -5
net/mac80211/tx.c
··· 26 26 #include <net/codel_impl.h> 27 27 #include <linux/unaligned.h> 28 28 #include <net/fq_impl.h> 29 + #include <net/sock.h> 29 30 #include <net/gso.h> 30 31 31 32 #include "ieee80211_i.h" ··· 2877 2876 } 2878 2877 2879 2878 if (unlikely(!multicast && 2880 - ((skb->sk && 2881 - skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS) || 2879 + ((skb->sk && sock_flag(skb->sk, SOCK_WIFI_STATUS)) || 2882 2880 ctrl_flags & IEEE80211_TX_CTL_REQ_TX_STATUS))) 2883 2881 info_id = ieee80211_store_ack_skb(local, skb, &info_flags, 2884 2882 cookie); ··· 3774 3774 return false; 3775 3775 3776 3776 /* don't handle TX status request here either */ 3777 - if (skb->sk && skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS) 3777 + if (skb->sk && sock_flag(skb->sk, SOCK_WIFI_STATUS)) 3778 3778 return false; 3779 3779 3780 3780 if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { ··· 4664 4664 memcpy(IEEE80211_SKB_CB(seg), info, sizeof(*info)); 4665 4665 } 4666 4666 4667 - if (unlikely(skb->sk && 4668 - skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS)) { 4667 + if (unlikely(skb->sk && sock_flag(skb->sk, SOCK_WIFI_STATUS))) { 4669 4668 info->status_data = ieee80211_store_ack_skb(local, skb, 4670 4669 &info->flags, NULL); 4671 4670 if (info->status_data)