Skip to contentSkip to conversation

ieee80211_tx_status: headroom too small

DISCUSSION Nikolai ZHUBR 4 participants 20 messages Oct 30, 2009 – Oct 31, 2009

lore
Share & tools
lore
#0 lore raw

Hello people,

I'm using compat-wireless-2009-09-14 with 2.6.25.20 and I have recently noticed lots of these in syslog:

ieee80211_tx_status: headroom too small
ieee80211_tx_status: headroom too small
ieee80211_tx_status: headroom too small

The wireless (access point) works fine, though maybe not very fast. However, this warning somehow bothers me. Is it important? Does it mean something critical? Maybe I should just comment it out in the code? I don't like syslog being filled up this way...

Thank you.

Nikolai ZHUBR

#1 lore raw
Quoted 9 lines · Nikolai ZHUBR

Hello people,

I'm using compat-wireless-2009-09-14 with 2.6.25.20 and I have recently noticed lots of these in syslog:

ieee80211_tx_status: headroom too small
ieee80211_tx_status: headroom too small
ieee80211_tx_status: headroom too small

Quoted 5 lines

The wireless (access point) works fine, though maybe not very fast. However, this warning somehow bothers me. Is it important? Does it mean something critical? Maybe I should just comment it out in the code? I don't like syslog being filled up this way...

You're lucky it even worked on 2.6.25.

Luis

#2 lore raw
Quoted 11 lines · Luis R. Rodriguez
Quoted 9 lines

ieee80211_tx_status: headroom too small
ieee80211_tx_status: headroom too small
ieee80211_tx_status: headroom too small

The wireless (access point) works fine, though maybe not very fast. However, this warning somehow bothers me. Is it important? Does it mean something critical? Maybe I should just comment it out in the code? I don't like syslog being filled up this way...

You're lucky it even worked on 2.6.25.

Yeah but... 2.6.25 is the kernel used in the latest official release of OpenWRT and in OpenSuse 11.0 as well (which is still their latest reasonable release, as of now, too)

Ok, I'll probably wait for some updates.

Nikolai ZHUBR

Quoted 1 line

Luis

#3 lore raw
In reply to Nikolai ZHUBR
Quoted 6 lines · Nikolai ZHUBR

Hello people,

I'm using compat-wireless-2009-09-14 with 2.6.25.20 and I have recently noticed lots of these in syslog:

ieee80211_tx_status: headroom too small

What driver are you using?

johannes

#4 lore raw
Quoted 4 lines · Johannes Berg
Quoted 2 lines

ieee80211_tx_status: headroom too small

What driver are you using?

Ah, sorry, forgot to mention. It is rt61pci (RaLink mini-PCI card)

Nikolai ZHUBR

Quoted 1 line

johannes

#5 lore raw
Quoted 7 lines · Nikolai ZHUBR
Quoted 4 lines · Johannes Berg
Quoted 2 lines

ieee80211_tx_status: headroom too small

What driver are you using?

Ah, sorry, forgot to mention. It is rt61pci (RaLink mini-PCI card)

Ok. I looked at the problem and it's a very odd problem -- mac80211 should always reserve enough headroom in buffers it passes to the driver. Does rt61pci somehow realloc frames?

johannes

#6 lore raw
Quoted 5 lines · Johannes Berg
Quoted 4 lines · Nikolai ZHUBR
Quoted 2 lines · Johannes Berg
Quoted 2 lines

ieee80211_tx_status: headroom too small

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

What driver are you using?

Ah, sorry, forgot to mention. It is rt61pci (RaLink mini-PCI card)

Ok. I looked at the problem and it's a very odd problem -- mac80211 should always reserve enough headroom in buffers it passes to the driver. Does rt61pci somehow realloc frames?

It does use skb_push. but will/should always stay within the limits of rt2x00dev->hw->extra_tx_headroom. Although I just realize there might be a situation where it needs to align the frame to a 4-byte boundary, it could exceed that amount. :(

Ivo

#7 lore raw
Quoted 8 lines · Ivo van Doorn
Quoted 3 lines

Ok. I looked at the problem and it's a very odd problem -- mac80211 should always reserve enough headroom in buffers it passes to the driver. Does rt61pci somehow realloc frames?

It does use skb_push. but will/should always stay within the limits of rt2x00dev->hw->extra_tx_headroom. Although I just realize there might be a situation where it needs to align the frame to a 4-byte boundary, it could exceed that amount. :(

extra_tx_headroom is set to max_t(driver, mac80211) so that there's always some headroom. This doesn't take into account alignment though. Should we simply add 2 to that value?

johannes

#8 lore raw
Quoted 6 lines · Johannes Berg
Quoted 4 lines · Ivo van Doorn
Quoted 3 lines

Ok. I looked at the problem and it's a very odd problem -- mac80211 should always reserve enough headroom in buffers it passes to the driver. Does rt61pci somehow realloc frames?

Quoted 8 lines
Quoted 4 lines

It does use skb_push. but will/should always stay within the limits of rt2x00dev->hw->extra_tx_headroom. Although I just realize there might be a situation where it needs to align the frame to a 4-byte boundary, it could exceed that amount. :(

extra_tx_headroom is set to max_t(driver, mac80211) so that there's always some headroom. This doesn't take into account alignment though. Should we simply add 2 to that value?

4 actually, wasn't there some cases where the header could have an odd number of bytes and would require 3 bytes for alignment?

Ivo

#9 lore raw
Quoted 12 lines · Ivo van Doorn
Quoted 11 lines · Johannes Berg
Quoted 8 lines · Ivo van Doorn
Quoted 3 lines

Ok. I looked at the problem and it's a very odd problem -- mac80211 should always reserve enough headroom in buffers it passes to the driver. Does rt61pci somehow realloc frames?

It does use skb_push. but will/should always stay within the limits of rt2x00dev->hw->extra_tx_headroom. Although I just realize there might be a situation where it needs to align the frame to a 4-byte boundary, it could exceed that amount. :(

Quoted 6 lines
Quoted 3 lines

extra_tx_headroom is set to max_t(driver, mac80211) so that there's always some headroom. This doesn't take into account alignment though. Should we simply add 2 to that value?

4 actually, wasn't there some cases where the header could have an odd number of bytes and would require 3 bytes for alignment?

Hm, is there? I thought they changed the 11s draft to no longer have that.

johannes

#10 lore raw
Quoted 17 lines · Johannes Berg
Quoted 16 lines · Ivo van Doorn
Quoted 14 lines · Johannes Berg
Quoted 8 lines · Ivo van Doorn
Quoted 3 lines

Ok. I looked at the problem and it's a very odd problem -- mac80211 should always reserve enough headroom in buffers it passes to the driver. Does rt61pci somehow realloc frames?

It does use skb_push. but will/should always stay within the limits of rt2x00dev->hw->extra_tx_headroom. Although I just realize there might be a situation where it needs to align the frame to a 4-byte boundary, it could exceed that amount. :(

extra_tx_headroom is set to max_t(driver, mac80211) so that there's always some headroom. This doesn't take into account alignment though. Should we simply add 2 to that value?

Quoted 5 lines
Quoted 2 lines

4 actually, wasn't there some cases where the header could have an odd number of bytes and would require 3 bytes for alignment?

Hm, is there? I thought they changed the 11s draft to no longer have that.

Well 2 is fine in that case, (I was basing my comment on something said on this mailinglist a long time ago). :)

Ivo

#11 lore raw
Quoted 8 lines · Ivo van Doorn
Quoted 5 lines
Quoted 2 lines

4 actually, wasn't there some cases where the header could have an odd number of bytes and would require 3 bytes for alignment?

Hm, is there? I thought they changed the 11s draft to no longer have that.

Well 2 is fine in that case, (I was basing my comment on something said on this mailinglist a long time ago). :)

However, it really all depends on the hardware too ... Maybe we should put more of the logic into drivers, and have mac80211 only export its required headroom?

Or maybe we should just not bother with having drivers do the alignment any more -- mac80211 does that now and it only does it if necessary (i.e. not on powerpc/x86)

johannes

#12 lore raw
Quoted 11 lines · Johannes Berg
Quoted 8 lines · Ivo van Doorn
Quoted 5 lines
Quoted 2 lines

4 actually, wasn't there some cases where the header could have an odd number of bytes and would require 3 bytes for alignment?

Hm, is there? I thought they changed the 11s draft to no longer have that.

Well 2 is fine in that case, (I was basing my comment on something said on this mailinglist a long time ago). :)

Quoted 7 lines

However, it really all depends on the hardware too ... Maybe we should put more of the logic into drivers, and have mac80211 only export its required headroom?

Or maybe we should just not bother with having drivers do the alignment any more -- mac80211 does that now and it only does it if necessary (i.e. not on powerpc/x86)

I think you mean the RX alignment, while I am talking about the TX alignment. Beacons and some othe frames must be 4-byte alignment because the wireleless hardware requires it.

Ivo

#13 lore raw
Quoted 7 lines · Ivo van Doorn
Quoted 3 lines

Or maybe we should just not bother with having drivers do the alignment any more -- mac80211 does that now and it only does it if necessary (i.e. not on powerpc/x86)

I think you mean the RX alignment, while I am talking about the TX alignment. Beacons and some othe frames must be 4-byte alignment because the wireleless hardware requires it.

Oh, indeed, I got confused.

Hmm. TX alignment is weird ... no driver really needs that except rt2x00 afaik. Which frames require this?

johannes

#14 lore raw
Quoted 6 lines · Johannes Berg
Quoted 4 lines · Ivo van Doorn
Quoted 3 lines

Or maybe we should just not bother with having drivers do the alignment any more -- mac80211 does that now and it only does it if necessary (i.e. not on powerpc/x86)

Quoted 8 lines
Quoted 3 lines

I think you mean the RX alignment, while I am talking about the TX alignment. Beacons and some othe frames must be 4-byte alignment because the wireleless hardware requires it.

Oh, indeed, I got confused.

Hmm. TX alignment is weird ... no driver really needs that except rt2x00 afaik. Which frames require this?

At the least the beacons, but I am not sure about if there are other frame types which also have this requirement.

Users had reported that if they align beacon frames, rt2500pci finally starts beaconing correctly in master mode.

Ivo

#15 lore raw
Quoted 2 lines · Ivo van Doorn

At the least the beacons, but I am not sure about if there are other frame types which also have this requirement.

So you align them all right now? Just wondering since beacons shouldn't be status-reported.

johannes

#16 lore raw
Quoted 7 lines · Johannes Berg
Quoted 2 lines · Ivo van Doorn

At the least the beacons, but I am not sure about if there are other frame types which also have this requirement.

So you align them all right now? Just wondering since beacons shouldn't be status-reported.

Currently I do all, but that is because I am not sure which specific frames require it. I might just fix this for beacons only and just see what happens with the other frames.

Ivo

#17 lore raw
In reply to Johannes Berg
Quoted 9 lines · Johannes Berg
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

4 actually, wasn't there some cases where the header could have an odd number of bytes and would require 3 bytes for alignment?

Hm, is there? I thought they changed the 11s draft to no longer have that.

Well 2 is fine in that case, (I was basing my comment on something said on this mailinglist a long time ago). :)

Quoted 7 lines

However, it really all depends on the hardware too ... Maybe we should put more of the logic into drivers, and have mac80211 only export its required headroom?

Or maybe we should just not bother with having drivers do the alignment any more -- mac80211 does that now and it only does it if necessary (i.e. not on powerpc/x86)

I'm having this issue on mips platform, if it matters. I cannot test it on x86 yet.

Now, searching for "extra_tx_headroom" gives me essentially the following two:

net/mac80211/main.c:

        local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
                                   sizeof(struct ieee80211_tx_status_rtap_hdr));

drivers/net/wireless/rt*pci.c:

        rt2x00dev->hw->extra_tx_headroom = 0;

So, as a quick-and-dirty fix, should I replace "max_t(..." by "4 + max_t(..." or "= 0" by "= 4" ?

Thank you!

Nikolai ZHUBR

Quoted 1 line

johannes

#18 lore raw
Quoted 25 lines · Nikolai ZHUBR
Quoted 9 lines · Johannes Berg
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

4 actually, wasn't there some cases where the header could have an odd number of bytes and would require 3 bytes for alignment?

Hm, is there? I thought they changed the 11s draft to no longer have that.

Well 2 is fine in that case, (I was basing my comment on something said on this mailinglist a long time ago). :)

Quoted 7 lines

However, it really all depends on the hardware too ... Maybe we should put more of the logic into drivers, and have mac80211 only export its required headroom?

Or maybe we should just not bother with having drivers do the alignment any more -- mac80211 does that now and it only does it if necessary (i.e. not on powerpc/x86)

I'm having this issue on mips platform, if it matters. I cannot test it on x86 yet.

Now, searching for "extra_tx_headroom" gives me essentially the following two:

net/mac80211/main.c:

Quoted 8 lines
        local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
                                   sizeof(struct ieee80211_tx_status_rtap_hdr));

drivers/net/wireless/rt*pci.c:

        rt2x00dev->hw->extra_tx_headroom = 0;

So, as a quick-and-dirty fix, should I replace "max_t(..." by "4 + max_t(..." or "= 0" by "= 4" ?

4 + max ... should work if it's what we think it is. Let us know.

johannes

#19 lore raw
Quoted 11 lines · Johannes Berg
Quoted 9 lines

net/mac80211/main.c:

        local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
                                   sizeof(struct ieee80211_tx_status_rtap_hdr));

drivers/net/wireless/rt*pci.c:

        rt2x00dev->hw->extra_tx_headroom = 0;

So, as a quick-and-dirty fix, should I replace "max_t(..." by "4 + max_t(...." or "= 0" by "= 4" ?

4 + max ... should work if it's what we think it is. Let us know.

Yes, it removed those messages.
The actual speed is still not very high (like at 10Mbit maybe, though 54Mbit is shown and the distance from the AP is very small, so signal quality should be good I suppose) but it is ok for me.

Thank you!

Nikolai ZHUBR

Quoted 1 line

johannes