From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch net-next 08/26] net: add info struct for LAG changeupper Date: Wed, 2 Dec 2015 12:11:19 +0100 Message-ID: <20151202111119.GH2355@nanopsycho.orion> References: <1448977744-17930-1-git-send-email-jiri@resnulli.us> <1448977744-17930-9-git-send-email-jiri@resnulli.us> <565ECF2F.7050500@cumulusnetworks.com> <20151202110647.GF2355@nanopsycho.orion> <565ED107.3090806@cumulusnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, davem@davemloft.net, idosch@mellanox.com, eladr@mellanox.com, yotamg@mellanox.com, ogerlitz@mellanox.com To: Nikolay Aleksandrov Return-path: Received: from mail-wm0-f45.google.com ([74.125.82.45]:34892 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755482AbbLBLLV (ORCPT ); Wed, 2 Dec 2015 06:11:21 -0500 Received: by wmuu63 with SMTP id u63so209973701wmu.0 for ; Wed, 02 Dec 2015 03:11:20 -0800 (PST) Content-Disposition: inline In-Reply-To: <565ED107.3090806@cumulusnetworks.com> Sender: netdev-owner@vger.kernel.org List-ID: Wed, Dec 02, 2015 at 12:07:51PM CET, nikolay@cumulusnetworks.com wrote: >On 12/02/2015 12:06 PM, Jiri Pirko wrote: >> Wed, Dec 02, 2015 at 11:59:59AM CET, nikolay@cumulusnetworks.com wrote: >>> On 12/01/2015 02:48 PM, Jiri Pirko wrote: >>>> From: Jiri Pirko >>>> >>>> This struct will be shared by bonding and team to pass internal >>>> information to notifier listeners. >>>> >>>> Signed-off-by: Jiri Pirko >>>> --- >>>> include/linux/netdevice.h | 13 +++++++++++++ >>>> 1 file changed, 13 insertions(+) >>>> >>>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h >>>> index a55be5b..7ea3e83 100644 >>>> --- a/include/linux/netdevice.h >>>> +++ b/include/linux/netdevice.h >>>> @@ -2108,6 +2108,19 @@ struct pcpu_sw_netstats { >>>> #define netdev_alloc_pcpu_stats(type) \ >>>> __netdev_alloc_pcpu_stats(type, GFP_KERNEL); >>>> >>>> +enum netdev_lag_tx_type { >>>> + NETDEV_LAG_TX_TYPE_UNKNOWN, >>>> + NETDEV_LAG_TX_TYPE_RANDOM, >>>> + NETDEV_LAG_TX_TYPE_BROADCAST, >>>> + NETDEV_LAG_TX_TYPE_ROUNDROBIN, >>>> + NETDEV_LAG_TX_TYPE_ACTIVEBACKUP, >>>> + NETDEV_LAG_TX_TYPE_HASH, >>>> +}; >>> >>> There're 2 more modes supported by the bonding which aren't supported by team, >>> RLB and TLB. Since you've included _RANDOM, for completeness you can add >>> these, too. >> >> For now it is "NETDEV_LAG_TX_TYPE_UNKNOWN". If needed to be identified >> by driver, it can be easily added. >> > >Out of curiosity, is _RANDOM needed to be identified by the driver ? :-) RANDOM is easy to handle as it is obvious what it is doing. That cannot be said about *LB. That is the reason I left those out for now. > >> >>> >>>> + >>>> +struct netdev_lag_upper_info { >>>> + enum netdev_lag_tx_type tx_type; >>>> +}; >>>> + >>>> #include >>>> >>>> /* netdevice notifier chain. Please remember to update the rtnetlink >>>> >>> >