Skip to contentSkip to conversation

Retry control & iwconfig

ath9k-devel Olivier Marce 4 participants 6 messages Mar 25, 2014 – Apr 19, 2014

lore
Share & tools
lore
#0 lore raw

Hi there,
I tried to use "retry" command of iwconfig to avoid any retry. I still see retries on the traces, although it is correclty set (Retry
limit: 0)

Looking at the list archive I understood that retry command of iwconfig does not work or at least it is not possible to avoid all retries (see
[https://www.mail-archive.com/ath9k-devel%40lists.ath9k.org/msg09951.html]]

Is it correct ?

If so, is there another way to suppress retransmit than by patching the firmware ?

Thx
Regards

Signature · 2 lines
Olivier Marc?
Alcatel-Lucent Bell Labs France
#1 lore raw

1. "iwconfig" is outdated, don't use it. Use "iw" instead
2. As noted in the mail you linked to, the retry is also done by software in the mac80211 layer and in the ath9k driver
3. ath9k based-cards don't have firmware

So, what you have basically do is to find out where in drivers/net/wireless/atheros and net/mac80211 or net/wireless the software-retry handling is taking place and make this switchable. LXR tells me that IEEE80211_FCTL_RETRY is used in ath9k, see
http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/xmit.c#L357
. It seems that the ath9k has a max number of retries defined:
http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/ath9k.h#L653

Hope that puts you into the right direction.

#2 lore raw

Hi,
just change value from 10 to 0 for retries to be zero!
http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/init.c#L954

mac80211 API does not update this in ath9k for some reason and the default value of retries is 7 in rate minstrel which has also to be changed.

Thanks,
Abhinav

Quoted 13 lines · Holger Schurig

1. "iwconfig" is outdated, don't use it. Use "iw" instead
2. As noted in the mail you linked to, the retry is also done by software in the mac80211 layer and in the ath9k driver
3. ath9k based-cards don't have firmware

So, what you have basically do is to find out where in drivers/net/wireless/atheros and net/mac80211 or net/wireless the software-retry handling is taking place and make this switchable. LXR tells me that IEEE80211_FCTL_RETRY is used in ath9k, see

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/xmit.c#L357
. It seems that the ath9k has a max number of retries defined:

Quoted 8 lines

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/ath9k.h#L653

Hope that puts you into the right direction.
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20140326/b7526b43/attachment.html

#3 lore raw

hi all,

I found that there is a retry value in net/wireless/core.c

348 rdev->wiphy.retry_short = 7;
349 rdev->wiphy.retry_long = 4;

If i set those values to 0. the retry will still exist. Is it correct?

Marcus

2014-03-26 21:34 GMT+08:00 abhinav narain <[email protected]>:

Quoted 37 lines

Hi,
just change value from 10 to 0 for retries to be zero!

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/init.c#L954

mac80211 API does not update this in ath9k for some reason and the default value of retries is 7 in rate minstrel which has also to be changed.

Thanks,
Abhinav

Quoted 13 lines · Holger Schurig

1. "iwconfig" is outdated, don't use it. Use "iw" instead
2. As noted in the mail you linked to, the retry is also done by software in the mac80211 layer and in the ath9k driver
3. ath9k based-cards don't have firmware

So, what you have basically do is to find out where in drivers/net/wireless/atheros and net/mac80211 or net/wireless the software-retry handling is taking place and make this switchable. LXR tells me that IEEE80211_FCTL_RETRY is used in ath9k, see

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/xmit.c#L357
. It seems that the ath9k has a max number of retries defined:

Quoted 8 lines

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/ath9k.h#L653

Hope that puts you into the right direction.
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Quoted 6 lines

_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20140417/72a1ddb6/attachment.htm

#4 lore raw

Hi Marcus,
Yes, as I suggested before, you should change it in driver code. This value in mac80211 codebase is not reflected in ath9k driver(atleast) where the default is 10 retransmits.
And if someone can explain how does minstrel work with default as 7 retransmits while driver does 10 retransmits,
that will be awesome!

-
Abhinav

Quoted 7 lines · marcus muffin

hi all,

I found that there is a retry value in net/wireless/core.c

348 rdev->wiphy.retry_short = 7;
349 rdev->wiphy.retry_long = 4;

Quoted 51 lines

If i set those values to 0. the retry will still exist. Is it correct?

Marcus

2014-03-26 21:34 GMT+08:00 abhinav narain <[email protected]>:

Hi,

Quoted 42 lines

just change value from 10 to 0 for retries to be zero!

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/init.c#L954

mac80211 API does not update this in ath9k for some reason and the default value of retries is 7 in rate minstrel which has also to be changed.

Thanks,
Abhinav

Quoted 13 lines · Holger Schurig

1. "iwconfig" is outdated, don't use it. Use "iw" instead
2. As noted in the mail you linked to, the retry is also done by software in the mac80211 layer and in the ath9k driver
3. ath9k based-cards don't have firmware

So, what you have basically do is to find out where in drivers/net/wireless/atheros and net/mac80211 or net/wireless the software-retry handling is taking place and make this switchable. LXR tells me that IEEE80211_FCTL_RETRY is used in ath9k, see

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/xmit.c#L357
. It seems that the ath9k has a max number of retries defined:

Quoted 8 lines

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/ath9k.h#L653

Hope that puts you into the right direction.
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20140416/909909bd/attachment.htm

#5 lore raw

Hi all,

I would like to investigate more on this retry issue. I did a simple experiment (single link, sender is a computer and receiver is a tp-link router. Both are with ath9k driver). I hack the code in sender side with as above mentioned, minstrel (from 7 to 0), ath9k/init.c (from 10 to 0), net/wireless/core.c (long retry from 4 to 0 and short retry from 7 to 0).

After re-compile, the iwconfig still show the value of long retry is 7. I am not so sure where the wireless utilities still be able to get this value. I think there may be some missing part to hack for retry.

With this hack of code, I perform iperf test (udp with 65 mbps for few minutes), I don't see any tx ecessive retries in iwconfig but the results of iperf doesn't change. If retry is disabled, we should expect to see more packet loss from iperf test but the value of packet loss after hacking is still 0%.

I did a control experiment by disabling ack instead of retry (this one is confirmed to be no retry), the packet loss will increase from 0% to 10% with the same setting.

I think there is still some parts going wrong to disable retry completely. Does anyone have idea?

Marcus

2014-04-17 13:40 GMT+08:00 abhinav narain <[email protected]>:

Quoted 8 lines

Hi Marcus,
Yes, as I suggested before, you should change it in driver code. This value in mac80211 codebase is not reflected in ath9k driver(atleast) where the default is 10 retransmits.
And if someone can explain how does minstrel work with default as 7 retransmits while driver does 10 retransmits,
that will be awesome!

Quoted 68 lines

-
Abhinav

Quoted 60 lines · marcus muffin

hi all,

I found that there is a retry value in net/wireless/core.c

348 rdev->wiphy.retry_short = 7;
349 rdev->wiphy.retry_long = 4;

If i set those values to 0. the retry will still exist. Is it correct?

Marcus

2014-03-26 21:34 GMT+08:00 abhinav narain <[email protected]>:

Hi,

Quoted 44 lines

just change value from 10 to 0 for retries to be zero!

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/init.c#L954

mac80211 API does not update this in ath9k for some reason and the default
value of retries is 7 in rate minstrel which has also to be changed.

Thanks,
Abhinav

On Wed, Mar 26, 2014 at 5:10 AM, Holger Schurig <[email protected]

Quoted 15 lines

wrote:

1. "iwconfig" is outdated, don't use it. Use "iw" instead
2. As noted in the mail you linked to, the retry is also done by software in the mac80211 layer and in the ath9k driver
3. ath9k based-cards don't have firmware

So, what you have basically do is to find out where in drivers/net/wireless/atheros and net/mac80211 or net/wireless the software-retry handling is taking place and make this switchable. LXR tells me that IEEE80211_FCTL_RETRY is used in ath9k, see

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/xmit.c#L357
. It seems that the ath9k has a max number of retries defined:

Quoted 8 lines

http://lxr.linux.no/linux+v3.13.5/drivers/net/wireless/ath/ath9k/ath9k.h#L653

Hope that puts you into the right direction.
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20140419/515978ad/attachment.htm