Re: [PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue.

2016-09-01 Thread Toke Høiland-Jørgensen
Johannes Berg writes: >> Yeah, was going to do that anyway. But since I'm touching the code >> anyway, this might be an opportunity to avoid constructs like this: >> >> if (!invoke_tx_handlers(tx)) >>   /* continue sending the packet */ >> >> Most other succeed/fail

Re: [PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue.

2016-09-01 Thread Johannes Berg
> Yeah, was going to do that anyway. But since I'm touching the code > anyway, this might be an opportunity to avoid constructs like this: > > if (!invoke_tx_handlers(tx)) >   /* continue sending the packet */ > > Most other succeed/fail functions seem to be of type bool, so it > would help

Re: [PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue.

2016-09-01 Thread Toke Høiland-Jørgensen
Johannes Berg writes: >> > They have three possible values ... :) >> >> Ah, no, not the handlers themselves. Meant the invoke_tx_handlers() >> function (or all three of them after my patch; hence the plural). To >> avoid the "0 means true" confusion you alluded to :)

Re: [PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue.

2016-09-01 Thread Johannes Berg
> > They have three possible values ... :) > > Ah, no, not the handlers themselves. Meant the invoke_tx_handlers() > function (or all three of them after my patch; hence the plural). To > avoid the "0 means true" confusion you alluded to :) > Ah. Actually, even I got confused and thought the

Re: [PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue.

2016-09-01 Thread Toke Høiland-Jørgensen
Johannes Berg writes: >> > > +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

Re: [PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue.

2016-09-01 Thread Johannes Berg
> > > +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

Re: [PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue.

2016-09-01 Thread Toke Høiland-Jørgensen
Johannes Berg writes: >> +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

Re: [PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue.

2016-08-31 Thread Johannes Berg
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

[PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue.

2016-08-30 Thread Toke Høiland-Jørgensen
The TXQ intermediate queues can cause packet reordering when more than one flow is active to a single station. Since some of the wifi-specific packet handling (notably sequence number and encryption handling) is sensitive to re-ordering, things break if they are applied before the TXQ. This