From: "Doherty, Declan" <declan.doherty@intel.com>
To: Matan Azrad <matan@mellanox.com>,
Chas Williams <3chas3@gmail.com>,
Radu Nicolau <radu.nicolau@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Chas Williams <chas3@att.com>
Subject: Re: [dpdk-dev] [PATCH] net/bonding: propagate promiscous mode in mode 4
Date: Thu, 2 Aug 2018 16:53:52 +0100 [thread overview]
Message-ID: <e450ac38-b9f4-5989-b55e-9f5c1cedf2e9@intel.com> (raw)
In-Reply-To: <AM0PR0502MB4019A295821D30493DFC5D24D22C0@AM0PR0502MB4019.eurprd05.prod.outlook.com>
On 02/08/2018 3:24 PM, 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 <radu.nicolau@intel.com>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On 8/1/2018 2:34 PM, Chas Williams wrote:
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Aug 1, 2018 at 9:04 AM Radu Nicolau <radu.nicolau@intel.com>
>>>>> 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 <radu.nicolau@intel.com>
>>>>>> ---
>>>>>> 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 guess so, but it was the configuration directly via the slave port bit
which had me concerned, I think this needs to be managed directly from
the bond port, ideally they
> 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?
>
Supporting an LACP mc group specific configuration does make sense, but
I wonder if this could just be handled by default during slave add.
1 and 2 are essentially the same hardware filtering offload mode, and
the other modes are irrelevant if this is enabled, it should not be
possible to add the slave if the bond is configured for this mode, or
possible to change the bond into this mode if an existing slave doesn't
support it.
3 should be the default expected behavior, but rte_eth_bond_slave_add()
should fail if the slave being added doesn't support either adding the
MAC to the slave or adding the LACP MC address.
Then the user could try either rte_eth_allmulticast_enable() on the bond
port and then try to add the slave again, which should fail if existing
slave didn't support allmulticast or the add slave would fail again if
the slave didn't support allmulticast and finally just call
rte_eth_promiscuous_enable() on the bond and then try to re-add the that
slave.
but maybe having a explicit configuration parameter would be better.
> Matan.
>
>
next prev parent reply other threads:[~2018-08-02 15:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-01 12:57 Radu Nicolau
2018-08-01 13:34 ` Chas Williams
2018-08-01 13:47 ` Radu Nicolau
2018-08-01 15:35 ` Chas Williams
2018-08-02 6:35 ` Matan Azrad
2018-08-02 13:23 ` Doherty, Declan
2018-08-02 14:24 ` Matan Azrad
2018-08-02 15:53 ` Doherty, Declan [this message]
2018-08-02 17:33 ` Matan Azrad
2018-08-02 21:10 ` Chas Williams
2018-08-03 5:47 ` Matan Azrad
2018-08-06 16:00 ` Chas Williams
2018-08-06 17:46 ` Matan Azrad
2018-08-06 19:01 ` Chas Williams
2018-08-06 19:35 ` Matan Azrad
2018-09-11 3:31 ` Chas Williams
2018-09-12 5:56 ` Matan Azrad
2018-09-13 15:14 ` Chas Williams
2018-09-13 15:40 ` Matan Azrad
2018-09-16 16:14 ` Chas Williams
2018-09-17 6:29 ` Matan Azrad
2018-08-02 21:05 ` Chas Williams
2018-08-02 9:57 ` [dpdk-dev] [PATCH v2 1/2] net/bonding: in 8023ad mode enable all multicast rather than promiscuous Radu Nicolau
2018-08-02 9:57 ` [dpdk-dev] [PATCH v2 2/2] net/bonding: propagate promiscous mode in mode 4 Radu Nicolau
2018-08-02 10:21 ` [dpdk-dev] [PATCH v2 1/2] net/bonding: in 8023ad mode enable all multicast rather than promiscuous Matan Azrad
2018-08-02 21:16 ` Chas Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e450ac38-b9f4-5989-b55e-9f5c1cedf2e9@intel.com \
--to=declan.doherty@intel.com \
--cc=3chas3@gmail.com \
--cc=chas3@att.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=radu.nicolau@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).