Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 1/3] hwsim: remove 'optimization' sending to only known MACs
Date: Mon, 8 May 2023 14:00:01 -0500	[thread overview]
Message-ID: <b3f47044-4be0-40ae-d0d6-d868de07fdcf@gmail.com> (raw)
In-Reply-To: <7fdc5d67-e740-d593-253b-564bdf92048f@gmail.com>

Hi James,

>>
>> Suppose we have a setup with a single namespace, with 3 radios.
>>
>> Radio A with address aa
>> Radio B with address bb
>> Radio C with address cc
>>
>> When a _unicast_ frame with target 'cc' is seen by hwsim, it loops over A, B, 
>> C and compares the addresses.  If the addresses do not match, then no 
>> HWSIM_CMD_FRAME is issued for that radio.  So we'd only issue HWSIM_CMD_FRAME 
>> with Radio C's HWSIM_ATTR_ADDR_RECEIVER.
> 
> Ah ok, I see where you're coming from now. I overlooked that part. I can re-work 
> this and if the destination is a known radio then only forward to that radio. If 
> the destination is to an unknown radio I think we have to forward it regardless.
> 

Well, that's the part that is unclear to me.  See below.

>>
>> How does it help if namespace A receives a frame with target 'CC'? It doesn't 
>> know about Radio C, so how would radio C even receive the message? And if it 
>> somehow does anyway, then it would seem like the above dispatch logic is bogus 
>> in the first place?
> 
> If a client in namespace A sends a frame to target CC then the hwsim instance in 
> namespace A gets this frame. It doesn't know about target CC but the kernel 
> does. So it forwards into the kernel and target CC receives it.

So suppose client in namespace A sends something via Radio A to Radio C.  hwsim 
instance in namespace A will loop over the radios it knows about, which are A 
and B.  A is the source radio, so that should be ignored.  So with your proposed 
logic, hwsim in namespace A will send the frame to radio B with the target being 
Radio C.  But that would seem to be pointless?  If sending to radio B regardless 
of the target address is fine, why do we even bother with the dispatch logic at all?

Are you sure it isn't being sent to hwsim instances in all namespaces?

Regards,
-Denis

  reply	other threads:[~2023-05-08 19:04 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 [this message]
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
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=b3f47044-4be0-40ae-d0d6-d868de07fdcf@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.linux.dev \
    --cc=prestwoj@gmail.com \
    /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