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: <4c8b3eec-c221-4184-a6cf-492fcb664a8a@ti.com>
Date: Mon, 19 Aug 2024 16:21:21 +0530
From: "Anwar, Md Danish" <a0501179@...com>
To: Andrew Lunn <andrew@...n.ch>, MD Danish Anwar <danishanwar@...com>
CC: Dan Carpenter <dan.carpenter@...aro.org>,
        Jan Kiszka
	<jan.kiszka@...mens.com>,
        Vignesh Raghavendra <vigneshr@...com>,
        Javier
 Carrasco <javier.carrasco.cruz@...il.com>,
        Jacob Keller
	<jacob.e.keller@...el.com>,
        Diogo Ivo <diogo.ivo@...mens.com>, Simon Horman
	<horms@...nel.org>,
        Richard Cochran <richardcochran@...il.com>,
        Paolo Abeni
	<pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet
	<edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <srk@...com>,
        Roger Quadros
	<rogerq@...nel.org>
Subject: Re: [PATCH net-next v2 4/7] net: ti: icssg-prueth: Add support for
 HSR frame forward offload



On 8/14/2024 8:24 PM, Anwar, Md Danish wrote:
> 
> 
> On 8/14/2024 7:32 PM, Andrew Lunn wrote:
>>> Yes, the icssg_init_ and many other APIs are common for switch and hsr.
>>> They can be renamed to indicate that as well.
>>>
>>> How does icssg_init_switch_or_hsr_mode() sound?
>>
>> I would say it is too long. And when you add the next thing, say
>> bonding, will it become icssg_init_switch_or_hsr_or_bond_mode()?
>>
>> Maybe name the function after what it actually does, not why you call
>> it.
>>

Andrew, the functions are actually doing some configurations different
than EMAC mode which are needed for offloading the frames for switch as
well as HSR mode. icssg_init_emac_mode() doesn't do any configuration
related to offloading. Perhaps naming these APIs to
icssg_init_fw_offload_mode() will be a better fit?

Other Similar APIs can also be changed to use _fw_offload instead of
_switch. How does this sound?


> Sure Andrew, I will try to come up with a proper name for these APIs.
> 
>>>>>  static struct icssg_firmwares icssg_switch_firmwares[] = {
>>>>>  	{
>>>>>  		.pru = "ti-pruss/am65x-sr2-pru0-prusw-fw.elf",
>>>>> @@ -152,6 +168,8 @@ static int prueth_emac_start(struct prueth *prueth, struct prueth_emac *emac)
>>>>>  
>>>>>  	if (prueth->is_switch_mode)
>>>>>  		firmwares = icssg_switch_firmwares;
>>>>> +	else if (prueth->is_hsr_offload_mode)
>>>>> +		firmwares = icssg_hsr_firmwares;
>>>>
>>>> Documentation/networking/netdev-features.rst
>>>>
>>>> * hsr-fwd-offload
>>>>
>>>> This should be set for devices which forward HSR (High-availability Seamless
>>>> Redundancy) frames from one port to another in hardware.
>>>>
>>>> To me, this suggests if the flag is not set, you should keep in dual
>>>> EMACS or switchdev mode and perform HSR in software.
>>>
>>>
>>> Correct. This is the expected behavior. If the flag is not set we remain
>>> in dual EMAC firmware and do HSR in software. Please see
>>> prueth_hsr_port_link() for detail on this.
>>
>> O.K.
>>
>> 	Andrew
> 

-- 
Thanks and Regards,
Md Danish Anwar

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ