From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-io0-f193.google.com (mail-io0-f193.google.com [209.85.223.193]) by dpdk.org (Postfix) with ESMTP id A1E302BE6 for ; Thu, 2 Aug 2018 23:05:32 +0200 (CEST) Received: by mail-io0-f193.google.com with SMTP id g11-v6so3246479ioq.9 for ; Thu, 02 Aug 2018 14:05:32 -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=iFvBcoMKJIGigyVExhsjJCyMNlnwPVhmse3ReQIr0zw=; b=UV0rCs6VNNfyiNAWYJtzpeiVbSPExnK0gZvYosiY24Da94cCSv0GOInxtuYPBMnuk1 5MaDJLQ6/zOO8UPVFY9VM8rXkxT6l284v+mL7e69Kshnan06RSQ6CXtkQ91Uae8gVpf+ 5OIF0QYzSJPtvuXysHHYiNOnYB5wLQnNOnELTVtfOPPeQq7LxsLdjvb8PCDNNSEra+KO rzGhpbD4B2WzWYIZ8USlmtr5NBNBLm5I8Uep1vfV7PuTWT4wlMVsNUWYIX9llVQuTPYz +GDPnuvVsTX1sVvA5hy2kQh5vbwWpS3rLeBu/cqCdkQ7EuIdnQtkszJjzBJ3C+VdL6k9 R+/A== 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=iFvBcoMKJIGigyVExhsjJCyMNlnwPVhmse3ReQIr0zw=; b=UCXJvYkdI4QS7DFNNfsLeo3OCifD0m17GaFPCjms5046ZOdpK1bqNX9vaD++0Ks1RP vz1v6WXLZ6K6T189rc3xUVbNZUQA4GjYWimUgwG/QzeF7Ma3vWpUMypHYz/5HKckaFvv ocabbIh42yK8+sR6uotvWbL96BFaNG/q+yMwB7KgBgZfL8HenlBuTmxwn84XWosdizjS C2pPh2CA+u5xFZFgQzGgsW+hmxVJ74o+QSUbwBBzqgcjXd/jYRdDezrYNYCTZwBNgN2d sQfy6OvLipVY6Fmur0xTBexsGOXJmfwaUWnOlrNbwgptDP8Eeac7SWQtJKTlYsWCrAEq T89g== X-Gm-Message-State: AOUpUlFmrjxk/0RXFHfzvB0HQtcpWA/H03vY7feBVOq9Zoan/q2Hqj2c +DxPo3PKvxaGdGj+0GBcjrxyanXVygjJFjYgdbwGDA== X-Google-Smtp-Source: AAOMgpcrkFqoYcUbHXxmP1479DJhYdZysbe9ZuJz4WVQifsO7a9PI6OEe8u9sid3P86cujQ2GjF3CGmbIIwUhmoobsI= X-Received: by 2002:a5e:da45:: with SMTP id o5-v6mr3857828iop.215.1533243932028; Thu, 02 Aug 2018 14:05:32 -0700 (PDT) MIME-Version: 1.0 References: <1533128278-4685-1-git-send-email-radu.nicolau@intel.com> <2eac631f-1402-67b5-04de-1ce161cfcf92@intel.com> <017918fc-70dc-e6d3-6e9f-35bf9bd73fc3@intel.com> In-Reply-To: From: Chas Williams <3chas3@gmail.com> Date: Thu, 2 Aug 2018 17:05:20 -0400 Message-ID: To: Matan Azrad Cc: Declan Doherty , Radu Nicolau , dev@dpdk.org, 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: Thu, 02 Aug 2018 21:05:33 -0000 On Thu, Aug 2, 2018 at 10:24 AM Matan Azrad wrote: > Hi > > From: Doherty, Declan > > On 02/08/2018 7:35 AM, Matan Azrad wrote: > > > Hi Chas, Radu > > > > > > From: Chas Williams > > >> 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. > > > > > > I agree with Chas that this commit will hurt current LACP logic, but > maybe > > this is the time to open discussion about it: > > > The current bonding implementation is greedy while it setting > > > promiscuous automatically for LACP, The user asks LACP and he gets > > promiscuous by the way. > > > > > > So if the user don't want promiscuous he must to disable it directly > via slaves > > ports and to allow LACP using rte_flow\flow > > director\set_mc_addr_list\allmulti... > > > > > > I think the best way is to let the user to enable LACP as he wants, > directly via > > slaves or by the bond promiscuous_enable API. > > > For sure, it must be documented well. > > > > > > Matan. > > > > > > > I'm thinking that default behavior should be that promiscuous mode > should be > > disabled by default, and that the bond port should fail to start if any > of the slave > > ports can't support subscription to the LACP multicast group. At this > point the > > user can decided to enable promiscuous mode on the bond port (and > therefore > > on all the slaves) and then start the bond. If we have slaves with > different > > configurations for multicast subscriptions or promiscuous mode > enablement, > > then there is potentially the opportunity for inconsistency in traffic > depending > > on which slaves are active. > > > Personally I would prefer that all configuration if possible is > propagated > > through the bond port. So if a user wants to use a port which doesn't > support > > multicast subscription then all ports in the bond need to be in > promiscuous > > mode, and the user needs to explicitly enable it through the bond port, > that way > > at least we can guarantee consist traffic irrespective of which ports in > the bond > > are active at any one time. > > That's exactly what I said :) > > I suggest to do it like next, > To add one more parameter for LACP which means how to configure the LACP > MC group - lacp_mc_grp_conf: > 1. rte_flow. > 2. flow director. > 3. add_mac. > 3. set_mc_add_list > 4. allmulti > 5. promiscuous > Maybe more... or less :) > > By this way the user decides how to do it, if it's fail for a slave, the > salve should be rejected. > Conflict with another configuration(for example calling to promiscuous > disable while running LACP lacp_mc_grp_conf=5) should raise an error. > What do you think? > Not a good idea. The slave should do what it needs to go to get subscribed to the multicast group. For the user to make this decision ahead of time, he would have to know that all the PMDs support the same method. Forcing more and more work on the caller of the API is not a solution. > > Matan. > > >