From: James Prestwood <prestwoj@gmail.com>
To: Denis Kenzior <denkenz@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 0/4] Packet/beacon loss roaming improvements
Date: Thu, 2 Nov 2023 04:58:46 -0700 [thread overview]
Message-ID: <27703a4f-a071-4ff7-afbc-8dda1c5b0b27@gmail.com> (raw)
In-Reply-To: <d5be907b-5790-42da-a17d-6ded2f9562a6@gmail.com>
Hi Denis,
On 11/1/23 6:39 PM, Denis Kenzior wrote:
> Hi James,
>
>>>
>>>> If the kernel has a hard limit after which it expects the connection
>>>> to be disconnected, we can start a timer for 2-4x that limit? Looks
>>>> like kernel uses probe_wait_ms parameter for this with a default of
>>>> 500ms. Is your setup using the default values for beacon_loss_count
>>>> and probe_wait_ms?
>>>
>>> Yep, everything is default as far as nl80211/driver options.
>>
>> I found an old thread I asked on linux-wireless back when I removed
>> the beacon loss handling [1]. Johannes explained that behavior did
>> apparently change in order to support power save (your memory was
>> correct).
>>
>
> Hah, funny.
>
>> I identified the behavior change with hwsim, and apparently took his
>> word when he said:
>>
>> "I'm pretty sure real hardware will behave just like hwsim here,
>> albeit perhaps a bit slower"
>>
>> And I never added "proper" testing of beacon loss, i.e. block several
>> beacons as opposed to just tearing down the AP. And this appears
>> closer to the behavior I'm seeing in reality (AP not going down, just
>> dropping beacons).
>
> Right.
>
>>
>> So this is my bad, I didn't take into account the situation of beacons
>> being dropped but then being picked up again, or the nullfuncs/probes
>> coming back successfully.
>
> So the question is still how we handle this properly. When the kernel
> sends the nullfunc / probe request, are we going to be interfering with
> that logic by initiating a scan right away? A scan would force the
> device to go offchannel, preventing it from receiving the AP's
> response. Given that nullfunc should be extremely fast, maybe we should
> delay any roam action we take by a second or two? If the AP is truly
> lost, then we'll get disconnected soon after the LOST_BEACON event. If
> it isn't, then an extra second/two is not going to make much difference
> since the scan should be limited and quite fast most of the time.
Yes scanning likely kills all chances of recovery. And this may very
well be why I was seeing a 100% rate of disconnections. Granted, our
devices are always moving so its very likely that once beacon/packet
loss starts its only going to get worse, but that's not the case for
everyone. Scanning just makes things worse.
I'm fine adding similar handling that I added for packet loss, except
always delay rather than only on additional events. But I would like to
explore other options in the future.
I'm not sure how, but being able to detect if the AP responded to
nullfunc/probes prior to the kernel blowing away the connection would be
great. (like send our own nullfunc frames or something, not really sure...)
Its taking IWD about 4-5 seconds to reconnect, 3 seconds are the quick
scan and ~1-2 seconds for DHCP. (I need to look at why the quick scan is
taking that long, that seems like something isn't right). So if its at
all possible to roam that is best, obviously.
Thanks,
James
>
> Regards,
> -Denis
next prev parent reply other threads:[~2023-11-02 11:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 13:48 [PATCH 0/4] Packet/beacon loss roaming improvements James Prestwood
2023-10-30 13:48 ` [PATCH 1/4] station: rename ap_directed_roam to force_roam James Prestwood
2023-10-30 13:48 ` [PATCH 2/4] station: start roam on beacon loss event James Prestwood
2023-10-30 13:48 ` [PATCH 3/4] netdev: handle/send " James Prestwood
2023-10-30 13:48 ` [PATCH 4/4] station: rate limit packet loss roam scans James Prestwood
2023-10-30 14:48 ` Denis Kenzior
2023-10-30 15:00 ` [PATCH 0/4] Packet/beacon loss roaming improvements Denis Kenzior
2023-10-30 15:37 ` James Prestwood
2023-10-30 17:05 ` Denis Kenzior
2023-10-30 17:37 ` James Prestwood
2023-11-01 12:07 ` James Prestwood
2023-11-02 1:39 ` Denis Kenzior
2023-11-02 11:58 ` James Prestwood [this message]
2023-11-02 14:10 ` Denis Kenzior
2023-11-02 14:33 ` James Prestwood
2023-11-02 15:17 ` Denis Kenzior
2023-11-02 15:41 ` James Prestwood
2023-11-02 16:10 ` Denis Kenzior
2023-11-02 16:13 ` James Prestwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27703a4f-a071-4ff7-afbc-8dda1c5b0b27@gmail.com \
--to=prestwoj@gmail.com \
--cc=denkenz@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox