netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Maor Gottlieb <maorg@mellanox.com>,
	davem@davemloft.net, jgg@mellanox.com, dledford@redhat.com,
	j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net,
	kuba@kernel.org, leonro@mellanox.com, saeedm@mellanox.com,
	jiri@mellanox.com, linux-rdma@vger.kernel.org,
	netdev@vger.kernel.org, alexr@mellanox.com
Subject: Re: [PATCH V2 mlx5-next 01/10] net/core: Introduce master_xmit_slave_get
Date: Mon, 20 Apr 2020 11:56:58 -0600	[thread overview]
Message-ID: <916ab047-3b50-7104-311a-6dcf604bcf6d@gmail.com> (raw)
In-Reply-To: <20200420175421.GU6581@nanopsycho.orion>

On 4/20/20 11:54 AM, Jiri Pirko wrote:
> Mon, Apr 20, 2020 at 07:29:15PM CEST, dsahern@gmail.com wrote:
>> On 4/20/20 8:01 AM, Jiri Pirko wrote:
>>> Mon, Apr 20, 2020 at 09:54:17AM CEST, maorg@mellanox.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@mellanox.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.

  reply	other threads:[~2020-04-20 17:57 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20  7:54 [PATCH V2 mlx5-next 00/10] Add support to get xmit slave Maor Gottlieb
2020-04-20  7:54 ` [PATCH V2 mlx5-next 01/10] net/core: Introduce master_xmit_slave_get Maor Gottlieb
2020-04-20 14:01   ` Jiri Pirko
2020-04-20 17:29     ` David Ahern
2020-04-20 17:41       ` Jiri Pirko
2020-04-20 17:43         ` David Ahern
2020-04-20 17:53           ` Jiri Pirko
2020-04-20 17:54       ` Jiri Pirko
2020-04-20 17:56         ` David Ahern [this message]
2020-04-20 18:01           ` Jiri Pirko
2020-04-20 18:04             ` David Ahern
2020-04-20 18:48               ` Jiri Pirko
2020-04-20 18:56                 ` Maor Gottlieb
2020-04-20 19:02                   ` David Ahern
2020-04-21  5:37                     ` Jiri Pirko
2020-04-21  5:43                       ` Maor Gottlieb
2020-04-20  7:54 ` [PATCH V2 mlx5-next 02/10] bonding: Rename slave_arr to usable_slaves Maor Gottlieb
2020-04-20 14:17   ` Jiri Pirko
2020-04-20  7:54 ` [PATCH V2 mlx5-next 03/10] bonding: Add helpers to get xmit slave Maor Gottlieb
2020-04-20 14:27   ` Jiri Pirko
2020-04-20 18:46     ` Jay Vosburgh
2020-04-20 18:59       ` Maor Gottlieb
2020-04-20  7:54 ` [PATCH V2 mlx5-next 04/10] bonding: Implement ndo_xmit_slave_get Maor Gottlieb
2020-04-20 15:04   ` Jiri Pirko
2020-04-20 15:36   ` David Ahern
2020-04-20  7:54 ` [PATCH V2 mlx5-next 05/10] RDMA/core: Add LAG functionality Maor Gottlieb
2020-04-20  7:54 ` [PATCH V2 mlx5-next 06/10] RDMA/core: Get xmit slave for LAG Maor Gottlieb
2020-04-20  7:54 ` [PATCH V2 mlx5-next 07/10] net/mlx5: Change lag mutex lock to spin lock Maor Gottlieb
2020-04-20  7:54 ` [PATCH V2 mlx5-next 08/10] net/mlx5: Add support to get lag physical port Maor Gottlieb
2020-04-20  7:54 ` [PATCH V2 mlx5-next 09/10] RDMA/mlx5: Refactor affinity related code Maor Gottlieb
2020-04-20  7:54 ` [PATCH V2 mlx5-next 10/10] RDMA/mlx5: Set lag tx affinity according to slave Maor Gottlieb

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=916ab047-3b50-7104-311a-6dcf604bcf6d@gmail.com \
    --to=dsahern@gmail.com \
    --cc=alexr@mellanox.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=dledford@redhat.com \
    --cc=j.vosburgh@gmail.com \
    --cc=jgg@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=vfalico@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;
as well as URLs for NNTP newsgroup(s).