All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: Denis Kenzior <denkenz@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 1/3] hwsim: remove 'optimization' sending to only known MACs
Date: Tue, 27 Jun 2023 11:56:33 -0700	[thread overview]
Message-ID: <ae4b9dc2-c88f-dfe9-2146-cbc3cc63f3c8@gmail.com> (raw)
In-Reply-To: <280831cf-933a-95b0-3889-ddca6ca544cc@gmail.com>

Hi Denis,

On 6/27/23 11:00 AM, Denis Kenzior wrote:
> Hi James,
> 
>>> You can try to see whether HWSIM_CMD_ADD_MAC_ADDR works?  See commit 
>>> 5cc58a9ecfa1 ("mac80211_hwsim: notify wmediumd of used MAC addresses")
>>
>> I hadn't seen that before, but looking at it they don't expose that as 
>> an API, its only for internal use for scan address randomization and 
>> monitor interfaces (see mac80211_hwsim_config_mac_nl()).
>>
> 
> It is used as an unsolicited event / notification.  Yeah I know, 
> HWSIM_CMD_* prefix is confusing ;)
> 
> It looks like we should start using this since most of our autotests are 
> forced to include the following main.conf:
> 
> [Scan]
> DisableMacAddressRandomization=true
> 
> Having support for the above event would allow us to get rid of this hack.
IIRC Tim started adding that into tests a long time ago, and had said 
improves reliability. If I remove it (e.g. in testPSK-roam) things start 
breaking, but its very random and not repeatable, some pass and some 
fail between runs.

I would expect all hwsim tests to fail if we are dropping all frames 
with and unknown TX or RX address so something else must be going on 
here. But indeed, this *should* work if we handle these events similarly 
to wmediumd.

> 
> <snip>
> 
>>>
>>> Hmm, but radios are namespace independent.  They can only be 
>>> added/removed via HWSIM_CMD_ADD/DEL_RADIO, no?  Since phys are moved 
>>> wholesale across namespaces (you can't only move a given interface), 
>>> you could assume that once a radio is created and populated, its 
>>> interfaces do not change for the duration of the test, even if 
>>> they're moved to a different namespace.
>>
>> For testing yes this is probably fine. It may require some adaptation 
>> in hwsim to do it better from a test-runner perspective. Currently we 
>> just use ip to create/delete namespaces and move radios. It may make 
>> more sense to add this to hwsim so there is one path. Then at least 
>> when hwsim gets a DEL_WIPHY event it 
> 
> It shouldn't matter really who invokes the namespace move.  hwsim would 
> know whether it is a hot-unplug or a namespace move by virtue of being 
> the one who triggers HWSIM_CMD_DEL_RADIO.
> 
>> doesn't have to assume the radio was moved (I'm thinking if we ever 
>> added hotplug tests this could be important).
> 
> We should add these, but the above still stands.  hwsim is the only 
> thing in our tests that triggers HWSIM_CMD_ADD_RADIO.

Yeah true, I'll just flag the radio as moved but keep it around for 
processing frames.

> 
> Regards,
> -Denis

  reply	other threads:[~2023-06-27 18:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04 21:52 [PATCH 1/3] hwsim: remove 'optimization' sending to only known MACs James Prestwood
2023-05-04 21:52 ` [PATCH 2/3] test-runner: allow hwsim in namespaces James Prestwood
2023-05-04 21:52 ` [PATCH 3/3] test-runner: fix __str__ for namespace processes James Prestwood
2023-05-07 23:21 ` [PATCH 1/3] hwsim: remove 'optimization' sending to only known MACs Denis Kenzior
2023-05-08 13:43   ` James Prestwood
2023-05-08 18:05     ` Denis Kenzior
2023-05-08 18:55       ` James Prestwood
2023-05-08 19:00         ` Denis Kenzior
2023-05-08 19:03         ` James Prestwood
2023-05-08 19:01           ` Denis Kenzior
2023-06-21 21:05             ` James Prestwood
2023-06-27  2:31               ` Denis Kenzior
2023-06-27 15:15                 ` James Prestwood
2023-06-27 18:00                   ` Denis Kenzior
2023-06-27 18:56                     ` James Prestwood [this message]
2023-06-27 19:23                       ` Denis Kenzior
2023-06-27 20:09                     ` James Prestwood
2023-06-28 14:49                       ` Denis Kenzior
2023-06-28 15:33                         ` James Prestwood
2023-06-28 15:40                           ` Denis Kenzior
2023-06-28 16:14                             ` James Prestwood
2023-06-28 16:25                               ` Denis Kenzior
2023-06-28 16:47                                 ` James Prestwood
2023-06-28 16:57                                   ` Denis Kenzior
2023-06-28 17:22                                     ` James Prestwood
2023-06-28 23:19                               ` Andrew Zaborowski
2023-06-28 23:28                                 ` 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=ae4b9dc2-c88f-dfe9-2146-cbc3cc63f3c8@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.