netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mac80211: rx: frames received out of order
@ 2016-07-13 11:57 Yaniv Machani
  2016-08-02  7:49 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Yaniv Machani @ 2016-07-13 11:57 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Meirav Kama, Yaniv Machani, Johannes Berg, David S. Miller,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA

From: Meirav Kama <meiravk-l0cyMroinI0@public.gmane.org>

Upon forwarding frames from Rx to Tx in mesh, driver clones the skb.
It zeros the tx_info and doesn't set hw_queue correctly. It then enqueues
the frame in queue 0 (VOICE) instead of the correct queue.
Upon re-queue of this frame, driver inserts it to the correct queue (e.g. BE).
After that, driver dequeue frames from 2 different queues and sends them out of order.
To fix this, driver will set the tx_info->hw_queue to the correct queue when cloning the skb.

Signed-off-by: Meirav Kama <meiravk-l0cyMroinI0@public.gmane.org>
Signed-off-by: Yaniv Machani <yanivma-l0cyMroinI0@public.gmane.org>
---
V2 - Revised comment

 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

--
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] mac80211: rx: frames received out of order
  2016-07-13 11:57 [PATCH v2] mac80211: rx: frames received out of order Yaniv Machani
@ 2016-08-02  7:49 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2016-08-02  7:49 UTC (permalink / raw)
  To: Yaniv Machani, linux-kernel
  Cc: Meirav Kama, David S. Miller, linux-wireless, netdev

On Wed, 2016-07-13 at 14:57 +0300, Yaniv Machani wrote:
> From: Meirav Kama <meiravk@ti.com>
> 
> Upon forwarding frames from Rx to Tx in mesh, driver clones the skb.
> It zeros the tx_info and doesn't set hw_queue correctly. It then
> enqueues
> the frame in queue 0 (VOICE) instead of the correct queue.
> Upon re-queue of this frame, driver inserts it to the correct queue
> (e.g. BE).
> After that, driver dequeue frames from 2 different queues and sends
> them out of order.
> To fix this, driver will set the tx_info->hw_queue to the correct
> queue when cloning the skb.
> 
Makes sense, but the subject is a bit misleading - can you come up with
a better one?

johannes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-02  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 11:57 [PATCH v2] mac80211: rx: frames received out of order Yaniv Machani
2016-08-02  7:49 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).