From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 162075F45 for ; Wed, 1 Aug 2018 15:48:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2018 06:48:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,432,1526367600"; d="scan'208,217";a="76407787" Received: from rnicolau-mobl.ger.corp.intel.com (HELO [10.237.221.82]) ([10.237.221.82]) by fmsmga004.fm.intel.com with ESMTP; 01 Aug 2018 06:47:58 -0700 To: Chas Williams <3chas3@gmail.com> Cc: dev@dpdk.org, Declan Doherty , Chas Williams References: <1533128278-4685-1-git-send-email-radu.nicolau@intel.com> From: Radu Nicolau Message-ID: <2eac631f-1402-67b5-04de-1ce161cfcf92@intel.com> Date: Wed, 1 Aug 2018 14:47:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/bonding: propagate promiscous mode in mode 4 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 13:48:02 -0000 On 8/1/2018 2:34 PM, Chas Williams wrote: > > > On Wed, Aug 1, 2018 at 9:04 AM Radu Nicolau > wrote: > > Update the bonding promiscuous mode enable/disable functions as to > propagate the change to all slaves instead of doing nothing; this > seems to be the correct behaviour according to the standard, > and also implemented in the linux network stack. > > Signed-off-by: Radu Nicolau > > --- >  drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++------ >  1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c > b/drivers/net/bonding/rte_eth_bond_pmd.c > index ad6e33f..16105cb 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -2617,12 +2617,10 @@ bond_ethdev_promiscuous_enable(struct > rte_eth_dev *eth_dev) >         case BONDING_MODE_ROUND_ROBIN: >         case BONDING_MODE_BALANCE: >         case BONDING_MODE_BROADCAST: > +       case BONDING_MODE_8023AD: >                 for (i = 0; i < internals->slave_count; i++) > rte_eth_promiscuous_enable(internals->slaves[i].port_id); >                 break; > -       /* In mode4 promiscus mode is managed when slave is > added/removed */ > > > This comment is true (and it appears it is always on in 802.3ad mode): > >         /* use this port as agregator */ >         port->aggregator_port_id = slave_id; >         rte_eth_promiscuous_enable(slave_id); > > If we are going to do this here, we should probably get rid of it in > the other location so that future readers aren't confused about which > is the one doing the work. > > Since some adapters don't have group multicast support, we might > already be in promiscuous anyway.  Turning off promiscuous for > the bonding master might turn it off in the slaves where an application > has already enabled it. The idea was to preserve the current behavior except for the explicit promiscuous disable/enable APIs; an application may disable the promiscuous mode on the bonding port and then enable it back, expecting it to propagate to the slaves.