lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db1a2109-9a03-46a3-b24f-fe9fbc74b875@kernel.org>
Date: Tue, 7 Jan 2025 16:09:06 +0200
From: Roger Quadros <rogerq@...nel.org>
To: "Anwar, Md Danish" <a0501179@...com>, MD Danish Anwar
 <danishanwar@...com>, Jeongjun Park <aha310510@...il.com>,
 Alexander Lobakin <aleksander.lobakin@...el.com>,
 Lukasz Majewski <lukma@...x.de>, Meghana Malladi <m-malladi@...com>,
 Diogo Ivo <diogo.ivo@...mens.com>, Simon Horman <horms@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
 Eric Dumazet <edumazet@...gle.com>, "David S. Miller" <davem@...emloft.net>,
 Andrew Lunn <andrew+netdev@...n.ch>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, srk@...com,
 Vignesh Raghavendra <vigneshr@...com>,
 Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
 Larysa Zaremba <larysa.zaremba@...el.com>
Subject: Re: [PATCH net-next v3 3/3] net: ti: icssg-prueth: Add Support for
 Multicast filtering with VLAN in HSR mode



On 07/01/2025 16:01, Anwar, Md Danish wrote:
> 
> 
> On 1/7/2025 6:53 PM, Roger Quadros wrote:
>>
>>
>> On 03/01/2025 11:20, MD Danish Anwar wrote:
>>> Add multicast filtering support for VLAN interfaces in HSR offload mode
>>> for ICSSG driver.
>>>
>>> The driver calls vlan_for_each() API on the hsr device's ndev to get the
>>> list of available vlans for the hsr device. The driver then sync mc addr of
>>> vlan interface with a locally mainatined list emac->vlan_mcast_list[vid]
>>> using __hw_addr_sync_multiple() API.
>>>
>>> The driver then calls the sync / unsync callbacks.
>>>
>>> In the sync / unsync call back, driver checks if the vdev's real dev is
>>> hsr device or not. If the real dev is hsr device, driver gets the per
>>> port device using hsr_get_port_ndev() and then driver passes appropriate
>>> vid to FDB helper functions.
>>>
>>> This commit makes below changes in the hsr files.
>>> - Move enum hsr_port_type from net/hsr/hsr_main.h to include/linux/if_hsr.h
>>>   so that the enum can be accessed by drivers using hsr.
>>> - Create hsr_get_port_ndev() API that can be used to get the ndev
>>>   pointer to the slave port from ndev pointer to the hsr net device.
>>> - Export hsr_get_port_ndev() API so that the API can be accessed by
>>>   drivers using hsr.
>>>
>>> Signed-off-by: MD Danish Anwar <danishanwar@...com>
>>> ---
>>>  drivers/net/ethernet/ti/icssg/icssg_prueth.c | 83 +++++++++++++++-----
>>>  drivers/net/ethernet/ti/icssg/icssg_prueth.h |  2 +
>>>  include/linux/if_hsr.h                       | 18 +++++
>>>  net/hsr/hsr_device.c                         | 13 +++
>>>  net/hsr/hsr_main.h                           |  9 ---
>>
>> Should we be splitting hsr core changes into separate patch first,
>> then followed by a patch with icssg driver changes?
>>
> 
> I wanted to make sure that the changes to hsr core are done with the
> driver change so that any one looking at the commit can understand why
> these changes are done.
> 
> If we split the changes and someone looks at the commit modifying hsr
> core, they will not be able to understand why this is done. We will be
> creating and exporting API hsr_get_port_ndev() but there will be no
> caller for this.

I think you can explain in the commit log why you need the API.

> 
>>>  5 files changed, 97 insertions(+), 28 deletions(-)
>>
> 

-- 
cheers,
-roger


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ