From: Johannes Berg <johannes@sipsolutions.net>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>,
make-wifi-fast@lists.bufferbloat.net,
linux-wireless@vger.kernel.org
Subject: Re: [Make-wifi-fast] [PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue.
Date: Wed, 31 Aug 2016 23:06:39 +0200 [thread overview]
Message-ID: <1472677599.5470.13.camel@sipsolutions.net> (raw)
In-Reply-To: <20160830131548.6014-1-toke@toke.dk> (sfid-20160830_151618_124950_CD061443)
On Tue, 2016-08-30 at 15:15 +0200, Toke Høiland-Jørgensen wrote:
> @@ -829,10 +844,16 @@ ieee80211_tx_h_sequence(struct
> ieee80211_tx_data *tx)
> */
> if (!ieee80211_is_data_qos(hdr->frame_control) ||
> is_multicast_ether_addr(hdr->addr1)) {
> - /* driver should assign sequence number */
> - info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ;
> - /* for pure STA mode without beacons, we can do it
> */
> - hdr->seq_ctrl = cpu_to_le16(tx->sdata-
> >sequence_number);
> + fragnum = 0;
> + seq = cpu_to_le16(tx->sdata->sequence_number);
> + skb_queue_walk(&tx->skbs, skb) {
> + info = IEEE80211_SKB_CB(skb);
> + hdr = (struct ieee80211_hdr *)skb->data;
> + /* driver should assign sequence number */
> + info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ;
> + /* for pure STA mode without beacons, we can
> do it */
> + hdr->seq_ctrl = seq | fragnum++;
I would very much prefer you kept fragnum assignment in the
fragmentation handler.
Also, you just broke this on big endian, please run sparse on your
patches if you don't see these things directly.
> + if (!fast_tx ||
> + !ieee80211_xmit_fast_finish(sta->sdata, sta,
> fast_tx, skb,
> + false)) {
> + /* fast xmit was started, but fails to
> finish */
> + ieee80211_free_txskb(hw, skb);
> + goto begin;
> + }
That obviously cannot happen, it can't fail to finish. See the comments
in xmit_fast() and the return values ...
> +static int invoke_tx_handlers(struct ieee80211_tx_data *tx)
> +{
> + return invoke_tx_handlers_early(tx) ||
> invoke_tx_handlers_late(tx);
> +}
Ugh, please, no, don't be tricky where it's not necessary. Now every
person reading this has to first look up the return type, and then the
return value, and make sure they understand that success is actually
the value 0 ... that's way too much to ask.
> +ieee80211_tx_result
> +ieee80211_tx_h_michael_mic_add(struct ieee80211_tx_data *tx)
> +{
> + struct sk_buff *skb;
> + ieee80211_tx_result r;
> +
> + skb_queue_walk(&tx->skbs, skb) {
> + r = ieee80211_tx_h_michael_mic_add_skb(tx, skb);
> + if (r != TX_CONTINUE)
> + return r;
> + }
> + return TX_CONTINUE;
> +}
You just broke TKIP completely again. Adding the MMIC and fragmentation
are not commutative operations.
johannes
next prev parent reply other threads:[~2016-08-31 21:06 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 12:58 [Make-wifi-fast] [PATCH] mac80211: Move crypto IV generation " Toke Høiland-Jørgensen
2016-08-17 13:08 ` Johannes Berg
2016-08-17 13:16 ` Toke Høiland-Jørgensen
2016-08-17 13:18 ` Johannes Berg
2016-08-17 13:23 ` Toke Høiland-Jørgensen
2016-08-17 14:45 ` [Make-wifi-fast] [PATCH v2] " Toke Høiland-Jørgensen
2016-08-17 15:47 ` Noah Causin
2016-08-17 22:33 ` Toke Høiland-Jørgensen
2016-08-19 3:06 ` Noah Causin
2016-08-22 14:24 ` Toke Høiland-Jørgensen
2016-08-23 17:06 ` Noah Causin
2016-08-23 17:51 ` Toke Høiland-Jørgensen
2016-08-17 19:49 ` Johannes Berg
2016-08-17 20:07 ` Dave Taht
2016-08-17 20:43 ` Johannes Berg
2016-08-22 14:47 ` Toke Høiland-Jørgensen
2016-08-26 8:38 ` Johannes Berg
2016-08-26 8:54 ` Toke Høiland-Jørgensen
2016-08-24 16:20 ` [Make-wifi-fast] [PATCH v3] mac80211: Move reorder-sensitive TX handlers " Toke Høiland-Jørgensen
2016-08-24 22:40 ` Noah Causin
2016-08-25 12:45 ` Toke Høiland-Jørgensen
2016-08-26 14:30 ` Toke Høiland-Jørgensen
2016-08-26 14:51 ` Dave Taht
2016-08-30 13:15 ` [Make-wifi-fast] [PATCH v4] " Toke Høiland-Jørgensen
2016-08-30 13:17 ` Toke Høiland-Jørgensen
2016-08-31 21:06 ` Johannes Berg [this message]
2016-09-01 8:23 ` Toke Høiland-Jørgensen
2016-09-01 8:34 ` Johannes Berg
2016-09-01 8:38 ` Toke Høiland-Jørgensen
2016-09-01 9:07 ` Johannes Berg
2016-09-01 9:20 ` Toke Høiland-Jørgensen
2016-09-01 9:27 ` Johannes Berg
2016-09-01 9:42 ` Toke Høiland-Jørgensen
2016-09-01 16:03 ` [Make-wifi-fast] [PATCH v5] " Toke Høiland-Jørgensen
2016-09-01 17:59 ` Johannes Berg
2016-09-01 18:30 ` Toke Høiland-Jørgensen
2016-09-01 18:35 ` Johannes Berg
2016-09-02 2:48 ` Jason Andryuk
2016-09-02 9:27 ` Toke Høiland-Jørgensen
2016-09-02 13:41 ` [Make-wifi-fast] [PATCH v6] " Toke Høiland-Jørgensen
2016-09-02 14:44 ` Toke Høiland-Jørgensen
2016-09-05 11:30 ` [Make-wifi-fast] [PATCH v7] " Toke Høiland-Jørgensen
2016-09-05 16:06 ` Toke Høiland-Jørgensen
2016-09-05 17:00 ` Dave Taht
2016-09-05 17:26 ` Toke Høiland-Jørgensen
2016-09-05 17:59 ` Dave Taht
2016-09-05 20:23 ` Dave Taht
2016-09-05 20:45 ` Toke Høiland-Jørgensen
2016-09-05 21:02 ` Dave Taht
2016-09-05 21:25 ` Toke Høiland-Jørgensen
2016-09-05 21:29 ` Dave Taht
2016-09-05 21:35 ` Toke Høiland-Jørgensen
2016-09-05 21:42 ` Dave Taht
2016-09-05 22:04 ` Dave Taht
2016-09-05 22:01 ` Toke Høiland-Jørgensen
2016-09-05 22:08 ` Dave Taht
2016-09-05 22:31 ` Dave Taht
2016-09-05 17:49 ` Felix Fietkau
2016-09-05 17:59 ` Toke Høiland-Jørgensen
2016-09-05 18:45 ` Felix Fietkau
2016-09-06 11:43 ` Toke Høiland-Jørgensen
2016-09-06 11:45 ` Toke Høiland-Jørgensen
2016-09-06 11:44 ` [Make-wifi-fast] [PATCH v8] " Toke Høiland-Jørgensen
2016-09-06 22:04 ` Felix Fietkau
2016-09-12 12:35 ` Johannes Berg
2016-09-12 13:08 ` Toke Høiland-Jørgensen
2016-09-12 13:19 ` Johannes Berg
2016-09-22 17:04 ` [Make-wifi-fast] [PATCH v9 0/2] mac80211: TXQ dequeue path rework Toke Høiland-Jørgensen
2016-09-22 17:04 ` [Make-wifi-fast] [PATCH v9 1/2] mac80211: Move ieee802111_tx_dequeue() to later in tx.c Toke Høiland-Jørgensen
2016-09-30 11:13 ` Johannes Berg
2016-09-22 17:04 ` [Make-wifi-fast] [PATCH v9 2/2] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue Toke Høiland-Jørgensen
2016-09-30 10:27 ` Johannes Berg
2016-09-30 12:39 ` Toke Høiland-Jørgensen
2016-09-30 12:43 ` Johannes Berg
2016-09-30 12:45 ` Toke Høiland-Jørgensen
2016-09-30 12:49 ` Johannes Berg
2016-09-30 14:01 ` Toke Høiland-Jørgensen
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
List information: https://lists.bufferbloat.net/postorius/lists/make-wifi-fast.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472677599.5470.13.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=make-wifi-fast@lists.bufferbloat.net \
--cc=toke@toke.dk \
/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