mac80211: when using iTXQ, select the queue in ieee80211_subif_start_xmit
PATCH 1/1 mac80211: when using iTXQ, select the queue in ieee80211_subif_start_xmit
When using iTXQ, the network stack does not need the real queue number, since mac80211 is using its internal queues anyway. In that case we can defer selecting the queue and remove a redundant station lookup in the tx path to save some CPU cycles.
Signed-off-by Felix Fietkau <[email protected]>
--- net/mac80211/tx.c | 11 ++++++- net/mac80211/wme.c | 82 +++++++++++++++++++++++++--------------------- net/mac80211/wme.h | 2 ++ 3 files changed, 56 insertions(+), 39 deletions(-)
net/mac80211/tx.c +10 -1
@@ -3790,6 +3790,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb, u32 info_flags) {struct ieee80211_sub_if_data *sdata =IEEE80211_DEV_TO_SUB_IF (dev); +struct ieee80211_local *local = sdata->local;struct sta_info *sta;struct sk_buff *next;
@@ -3803,7 +3804,15 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,if (ieee80211_lookup_ra_sta (sdata, skb, &sta)) goto out_free; -if (!IS_ERR_OR_NULL (sta)) { +if (IS_ERR (sta)) + sta =NULL ; + +if (local->ops->wake_tx_queue) { +u16 queue =__ieee80211_select_queue (sdata, sta, skb); +skb_set_queue_mapping (skb, queue); + } + +if (sta) {struct ieee80211_fast_tx *fast_tx;sk_pacing_shift_update (skb->sk, sdata->local->hw.tx_sk_pacing_shift);
net/mac80211/wme.c +44 -38
126 lines not on this page · raw message
net/mac80211/wme.h +2 -0
@@ -16,6 +16,8 @@u16 ieee80211_select_queue_80211 (struct ieee80211_sub_if_data *sdata,struct sk_buff *skb,struct ieee80211_hdr *hdr); +u16 __ieee80211_select_queue (struct ieee80211_sub_if_data *sdata, +struct sta_info *sta,struct sk_buff *skb);u16 ieee80211_select_queue (struct ieee80211_sub_if_data *sdata,struct sk_buff *skb); void ieee80211_set_qos_hdr(struct ieee80211_sub_if_data *sdata,
Signature · 1 line
2.17.0