remove some KASSERT in net80211?

Adrian Chadd adrian.chadd at gmail.com
Thu Oct 25 21:11:38 UTC 2012


cc'ing -wireless, as it's a useful discussion

On 21 October 2012 23:27, Monthadar Al Jaberi <monthadar at gmail.com> wrote:
> sorry for the looong delay... :(
>
> generally all packet come trhough ath_rx_pkt() (ath(4)),

Right. And that's a taskqueue.

> then it seems that ieee80211_input_* are not locked. So different
> packets can be handled in the stack the same time? What happens if
> Path Error and Path Reply run at almost the same time? Won't it be
> undefined behavior?

Well, what other RX path is there? It should only be run from the RX
taskqueue on ath(4), and thus serialised.
There's a few corner cases where that isn't true (notably during
reset) which needs to eventually be addressed.

> There is the possibility that a timer get down to zero and invalidate,
> but that timer is 5 s and it gets updated often so I guess this case
> can be ignored.
>
> We can also invalidate route when we receive Peer Close frame.
>
> So is this a question of serializing the stack? or am I missing
> something important?

Well, the RX path is mostly serialised - except for things like
channel scanning and any kind of reset.
Reset now flushes the RX queue and handles whatever frames were there,
but I -believe- I serialised that well enough (reset can't overlap
with RX and another reset in parallel.)

So, why else is this particular assertion being hit? :)


Adrian


More information about the freebsd-wireless mailing list