From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-it0-f68.google.com (mail-it0-f68.google.com [209.85.214.68]) by dpdk.org (Postfix) with ESMTP id 308331B05C for ; Wed, 1 Aug 2018 17:35:30 +0200 (CEST) Received: by mail-it0-f68.google.com with SMTP id p81-v6so9927010itp.1 for ; Wed, 01 Aug 2018 08:35:30 -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=nm7p1nlIKWE45y/B5Sixzbe3Sp3e/aUv/VV0FRnVOew=; b=IKDypCllrvrfGFtJsCS1HUBkskAd7GG+Te1uXLoVT0FsiSDJ9UzJ4lT45sQk+5KjRb U8OcxlvjneKkQ0lODjiOHUvpXrcaIokuYJb4tepE32N/9mGHo1AADt0j6iiohIFd3Y0I U3b4Jjf+vrLVZCWGyAsHpbjzpk1cQJ2n7wqN99ORkepL2aYVQzTgQkjLASQ8McbzYqqO 5RAR6CoSMfGAUwuISUzbprmBMtmysN6sz/cw3+gBCqqmYe845xHAl1UIHrEbBXnOHDD9 gxNExIJNId/mkaZK1IXM5NTKhAFV2ao75GsUB0xAE/FM0aciXstKOJV3E9BawRtF75IH Halg== 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=nm7p1nlIKWE45y/B5Sixzbe3Sp3e/aUv/VV0FRnVOew=; b=bBNTqfmWs7KPU3d4V5um+VwBVJltmkrjiPqI0DCMftb2uqWe0Q2oUsSmKKKm1sO/d7 FuBqsF26hQOaCdQJ0kFPQCJXOKmSqHFElr8NJ5mqKiFYJCdK8LkHYzyRWAmxFRLsw3ZO PC+EF3EraJwXkDlhqdVpPgF4JoesyuKWps2fDRZgivogGqz5+fwmOLEbWlF3Lu1RvL3Q E+BXVEHZNNzHfNtOwKxE6lG0x5ao8hP+yYyKQFBVLC5CVFvgsOXwUN6RSjo6DuZIiNzz QaouXcaUiVTNk7jxjCgTyi71xAPvxSovNCdOfoy1jW0dQskvWIrImnSfca0X27f0w8S0 fA7Q== X-Gm-Message-State: AOUpUlGjZfJdCcOJRjvNHSwAIZ1hTn6pCtDiD17Rb78eJhCbQiGIijnr WFGQVqL6y7Xdiw7BNpFxrz3790NIlnXTJ5WSSzU= X-Google-Smtp-Source: AAOMgpceYN5IcwInxzNbwmm2OcSTzfYXJWm5Ob6zen4jncjkTEbN3Ghr1zZNiFzpO1Od7OQv3rZ74I3Y55CDMlqvyV4= X-Received: by 2002:a02:10c6:: with SMTP id 189-v6mr25148291jay.54.1533137729649; Wed, 01 Aug 2018 08:35:29 -0700 (PDT) MIME-Version: 1.0 References: <1533128278-4685-1-git-send-email-radu.nicolau@intel.com> <2eac631f-1402-67b5-04de-1ce161cfcf92@intel.com> In-Reply-To: <2eac631f-1402-67b5-04de-1ce161cfcf92@intel.com> From: Chas Williams <3chas3@gmail.com> Date: Wed, 1 Aug 2018 11:35:18 -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 15:35:30 -0000 On Wed, Aug 1, 2018 at 9:48 AM Radu Nicolau wrote: > > > 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. > Yes, but an application doing that will break 802.3ad because promiscuous mode is used to receive the LAG PDUs which are on a multicast group. That's why this code doesn't let you disable promiscuous when you are in 802.3ad mode. If you want to do this it needs to be more complicated. In 802.3ad, you should try to add the multicast group to the slave interface. If that fails, turn on promisc mode for the slave. Make note of it. Later if bonding wants to enabled/disable promisc mode for the slaves, it needs to check if that slaves needs to remain in promisc to continue to get the LAG PDUs.