frame status API? (was: mac80211 truesize bugs)

Johannes Berg
2008-05-04T01:55:50Z

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

> Whenever you run a monitor interface in mac80211, you can see lots of
> truesize bugs:
>
> SKB BUG: Invalid truesize (464) len=307, sizeof(sk_buff)=176
>
> It appears to be caused by mac80211's re-injection of the transmitted
> frame.

Regardless of the fact that I'm pretty sure that we have bugs with
respect to pskb_expand_head in mac80211 that for some reason never show
up unless you add monitors, this re-injection of frames is quite a hack.

For one, it means that on a monitor interface you see every outgoing
frame, even if it wasn't sent on that interface. That's actually quite
nice, especially for debugging, but I think we can already see all
transmitted packets on the master interface.

Secondly, it means that actually injected packets show up twice, first
via dev_queue_xmit_nit and then via the status reporting.

Also, if we ever want to move towards an API where the driver need not
give a TX status report for every frame (some hardware cannot do this)
then this is at best a hack since we do not know the exact status for a
frame.

On the other hand, hostapd requires knowing whether a specific frame was
acknowledged.

Does anyone have any ideas how to implement such a status query for a
frame that was sent? What hostapd does is open a raw socket and simply
send a frame, but it needs to know whether that frame was acknowledged
so currently it also listens on a monitor and checks all outgoing
frames, which is suboptimal anyway.

The only thing I could so far think of is like the socket timestamps but
that seems rather bad to do for such a special case.