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]
Date:   Mon, 20 Apr 2020 20:01:44 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     David Ahern <dsahern@...il.com>
Cc:     Maor Gottlieb <maorg@...lanox.com>, davem@...emloft.net,
        jgg@...lanox.com, dledford@...hat.com, j.vosburgh@...il.com,
        vfalico@...il.com, andy@...yhouse.net, kuba@...nel.org,
        leonro@...lanox.com, saeedm@...lanox.com, jiri@...lanox.com,
        linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
        alexr@...lanox.com
Subject: Re: [PATCH V2 mlx5-next 01/10] net/core: Introduce
 master_xmit_slave_get

Mon, Apr 20, 2020 at 07:56:58PM CEST, dsahern@...il.com wrote:
>On 4/20/20 11:54 AM, Jiri Pirko wrote:
>> Mon, Apr 20, 2020 at 07:29:15PM CEST, dsahern@...il.com wrote:
>>> On 4/20/20 8:01 AM, Jiri Pirko wrote:
>>>> Mon, Apr 20, 2020 at 09:54:17AM CEST, maorg@...lanox.com wrote:
>>>>> Add new ndo to get the xmit slave of master device.
>>>>> User should release the slave when it's not longer needed.
>>>>> When slave selection method is based on hash, then the user can ask to
>>>>> get the xmit slave assume all the slaves can transmit by setting the
>>>>> LAG_FLAGS_HASH_ALL_SLAVES bit in the flags argument.
>>>>>
>>>>> Signed-off-by: Maor Gottlieb <maorg@...lanox.com>
>>>>> ---
>>>>> include/linux/netdevice.h |  3 +++
>>>>> include/net/lag.h         | 32 ++++++++++++++++++++++++++++++++
>>>>> 2 files changed, 35 insertions(+)
>>>>>
>>>>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>>>>> index 130a668049ab..e8852f3ad0b6 100644
>>>>> --- a/include/linux/netdevice.h
>>>>> +++ b/include/linux/netdevice.h
>>>>> @@ -1389,6 +1389,9 @@ struct net_device_ops {
>>>>> 						 struct netlink_ext_ack *extack);
>>>>> 	int			(*ndo_del_slave)(struct net_device *dev,
>>>>> 						 struct net_device *slave_dev);
>>>>> +	struct net_device*	(*ndo_xmit_get_slave)(struct net_device *master_dev,
>>>>> +						      struct sk_buff *skb,
>>>>> +						      u16 flags);
>>>>
>>>> Please adjust the name to:
>>>> ndo_get_lag_xmit_slave
>>>
>>> I disagree. There are multiple master devices and no reason to have a
>>> LAG specific get_slave.
>> 
>> Btw, did you notice that Maor is passing "lag" named values in the flags?
>> 
>
>yes. I disagree with enum name, but having LAG in the name of a flag is
>fine. To me that is the right place for a LAG specific request of a
>generic ndo in core code.

Generic ndo with lag-specific arg? Odd. Plus, there is a small chance
this is ever going to be used for other master. And if so, could be very
easily renamed then...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ