From: Ben Greear <greearb@candelatech.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Another try at getting pktgen to work with wifi.
Date: Thu, 30 May 2013 11:45:30 -0700 [thread overview]
Message-ID: <51A79E4A.7000609@candelatech.com> (raw)
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
next reply other threads:[~2013-05-30 18:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 18:45 Ben Greear [this message]
2013-05-30 20:02 ` Another try at getting pktgen to work with wifi 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:37 ` Johannes Berg
2013-05-31 18:00 ` Ben Greear
2013-05-31 18:41 ` Johannes Berg
2013-05-31 18:51 ` Ben Greear
2013-05-31 19:14 ` Johannes Berg
2013-05-31 19:09 ` Arend van Spriel
2013-05-31 20:51 ` Bob Copeland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51A79E4A.7000609@candelatech.com \
--to=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).