From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-it0-f67.google.com (mail-it0-f67.google.com [209.85.214.67]) by dpdk.org (Postfix) with ESMTP id 781445F32 for ; Wed, 1 Aug 2018 15:34:51 +0200 (CEST) Received: by mail-it0-f67.google.com with SMTP id g191-v6so9644676ita.0 for ; Wed, 01 Aug 2018 06:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jslLH7A+j/tsYoRF0i7drGrJJ/bOrAB8fMP7R5/ET/g=; b=m/XdjCjtjDwNlvNdsXkOTHvj9rfhID/2dXnCyEEr30LPNBeOBOsRD5vLmlpe1L8fcS e9DnOuLQCRFP+zuHo/JAKFNqFwkVfU+MwN5ccWtll5G/BjkmL9TCLVzD9lQnUGmXHJaa ku2GcZQMYxFjayoTO/bKGgW/wSMLV3rkxGDHBgH9b/x8pr84yyc/MH3/Z24nWjQPMYEv OJ0/95OCJ27KZDV8MSsomu/mjAaK+gsU2zfsJ+m4EFQqzT085gW6L0j6wNYBmsW1M7XG zd1GG9+fGed7rJ5wnOlpx3AiEi9rDGlIRd1gxToZeJQCxWaN3LjSBIYDObkoD5kKP+yT dNrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jslLH7A+j/tsYoRF0i7drGrJJ/bOrAB8fMP7R5/ET/g=; b=md/6zyCq/2dXUAkFlI/HausguG187n21Wx80lkX8ojCCHR6RUz/6PPFWBwKXuF5z0p 2tgyHy1fsaMWEcwTkKynwe5ijVoJ2JKwpvbjhP/PujTjMP7r1D1Hf9J7HV/o8mj4O7Sk YktL/tWghj4pvcUdFPFjSBoYiFUGbanNAYMnfwyEZkJOK1tu8WhWNX6od4D1qpDCC/wE /DzTjZGBGTjoL4mhTFxtu0BQ2gbH/OU+bpfgk/8rhQzMJ0XPMzt5wQerkrgGEb2arhfi 3EUZePDhbQFqtWenu1x9njHkB8TzMFSsRnXql4bvBXiGCYTDNR7W1CRIjU/HZgYc04Mv iMjg== X-Gm-Message-State: AOUpUlHV+nOn/UUA9FCxmrYQuQirmQj7mZEPHujImRGn1SCC7LiquuC8 VhwiUVSQT/wnK7qgLsDB6RbYwLhRUabjyXDKPuw= X-Google-Smtp-Source: AAOMgpeD2VuvOvZFYM35smZtFvPDVN2JV/jhDRctrSXDeB/6niEg2RT62/6v1nz+23A3TDJZkRfriaCiVvjUC5IuQ+o= X-Received: by 2002:a02:982:: with SMTP id 2-v6mr23260299jam.79.1533130490796; Wed, 01 Aug 2018 06:34:50 -0700 (PDT) MIME-Version: 1.0 References: <1533128278-4685-1-git-send-email-radu.nicolau@intel.com> In-Reply-To: <1533128278-4685-1-git-send-email-radu.nicolau@intel.com> From: Chas Williams <3chas3@gmail.com> Date: Wed, 1 Aug 2018 09:34:39 -0400 Message-ID: To: Radu Nicolau Cc: dev@dpdk.org, Declan Doherty , Chas Williams Content-Type: text/plain; charset="UTF-8" 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:34:51 -0000 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. > - case BONDING_MODE_8023AD: > - break; > /* Promiscuous mode is propagated only to primary slave */ > case BONDING_MODE_ACTIVE_BACKUP: > case BONDING_MODE_TLB: > @@ -2645,12 +2643,10 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev > *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_disable(internals->slaves[i].port_id); > break; > - /* In mode4 promiscus mode is set managed when slave is > added/removed */ > - case BONDING_MODE_8023AD: > - break; > /* Promiscuous mode is propagated only to primary slave */ > case BONDING_MODE_ACTIVE_BACKUP: > case BONDING_MODE_TLB: > -- > 2.7.5 > >