All of lore.kernel.org
 help / color / mirror / Atom feed
* Another try at getting pktgen to work with wifi.
@ 2013-05-30 18:45 Ben Greear
  2013-05-30 20:02 ` Felix Fietkau
  0 siblings, 1 reply; 19+ messages in thread
From: Ben Greear @ 2013-05-30 18:45 UTC (permalink / raw)
  To: linux-wireless

I'm trying to come up with a more acceptable patch to the problem discussed a few years
ago:

http://thread.gmane.org/gmane.linux.kernel.wireless.general/64582/focus=64626

The patch below appears to work as expected.  In pktgen, you just have to set
the QoS to whatever value matches the queue you need.

This seem reasonable?

Thanks,
Ben

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index d445bb1..c770f19 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1544,6 +1544,18 @@ void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
                 }
         }

+       /* This check needs to go in before the QoS header is set below. */
+       if (skb->priority > 7 ||
+           skb->queue_mapping != ieee802_1d_to_ac[skb->priority]) {
+               WARN_ONCE(1, "Invalid queue-mapping, priority: %i  queue-mapping: %i.  This is an expected warning
+                         (int)(skb->priority), (int)(skb->queue_mapping));
+               /* Adjust queue-mapping to match what the wifi stack expects.
+                * pktgen will just have to set QoS bits accordingly instead
+                * of trying to set the queue_mapping directly.
+                */
+               skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, skb));
+       }
+
         ieee80211_set_qos_hdr(sdata, skb);
         ieee80211_tx(sdata, skb, false, band);
  }


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


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

end of thread, other threads:[~2013-05-31 20:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-30 18:45 Another try at getting pktgen to work with wifi Ben Greear
2013-05-30 20:02 ` Felix Fietkau
2013-05-30 20:45   ` Ben Greear
2013-05-31  7:56     ` Felix Fietkau
2013-05-31 17:21       ` Ben Greear
2013-05-31 17:21         ` Ben Greear
2013-05-31 17:37         ` Johannes Berg
2013-05-31 18:00           ` Ben Greear
2013-05-31 18:00             ` Ben Greear
2013-05-31 18:41             ` Johannes Berg
2013-05-31 18:41               ` Johannes Berg
2013-05-31 18:51               ` Ben Greear
2013-05-31 18:51                 ` Ben Greear
2013-05-31 19:14                 ` Johannes Berg
2013-05-31 19:14                   ` Johannes Berg
2013-05-31 19:09                   ` Arend van Spriel
2013-05-31 19:09                     ` Arend van Spriel
2013-05-31 20:51                 ` Bob Copeland
2013-05-31 20:51                   ` Bob Copeland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.