[PATCH v3] mac80211: mesh: set tx_info->hw_queue to the correct queue upon packet forwarding

Subsystems: mac80211, the rest

STALE3657d

2 messages, 2 authors, 2016-08-11 · open the first message on its own page

[PATCH v3] mac80211: mesh: set tx_info->hw_queue to the correct queue upon packet forwarding

From: Yaniv Machani <hidden>
Date: 2016-08-08 07:00:06

From: Meirav Kama <redacted>

MP received data frames from another MP. Frames are forwarded
from Rx to Tx to be transmitted to a third MP.
Upon cloning the skb, the tx_info was zeroed, and the
hw_queue wasn't set correctly, causing frames to be
inserted to queue 0 (VOICE). If re-queue occurred for some
reason, frame will be inserted to correct queue 2 (BE).
In this case frames are now dequeued from 2 different queues and
sent out of order.

Signed-off-by: Meirav Kama <redacted>
Signed-off-by: Yaniv Machani <redacted>
---
v3 - update the headline

 net/mac80211/rx.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 9a1eb70..88dc744 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2392,6 +2392,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
 	info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
 	info->control.vif = &rx->sdata->vif;
 	info->control.jiffies = jiffies;
+	info->hw_queue = q;
 	if (is_multicast_ether_addr(fwd_hdr->addr1)) {
 		IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast);
 		memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
-- 
2.9.0

Re: [PATCH v3] mac80211: mesh: set tx_info->hw_queue to the correct queue upon packet forwarding

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2016-08-11 13:04:30

On Mon, 2016-08-08 at 10:06 +0300, Yaniv Machani wrote:
From: Meirav Kama <redacted>

MP received data frames from another MP. Frames are forwarded
from Rx to Tx to be transmitted to a third MP.
Upon cloning the skb, the tx_info was zeroed, and the
hw_queue wasn't set correctly, causing frames to be
inserted to queue 0 (VOICE). If re-queue occurred for some
reason, frame will be inserted to correct queue 2 (BE).
In this case frames are now dequeued from 2 different queues and
sent out of order.
Uh, sorry. I was so focused on the commit message and everything that I
neglected to look into the code change ... :(
 	info->control.jiffies = jiffies;
+	info->hw_queue = q;
This is incorrect. 'q' appears to be the AC here, so you need to set
something like vif->hw_queue[q], afaict? Check out tx.c where this is
set.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help