From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) by dpdk.org (Postfix) with ESMTP id B2F448D8F for ; Mon, 6 Aug 2018 18:00:15 +0200 (CEST) Received: by mail-it0-f42.google.com with SMTP id g141-v6so18831722ita.4 for ; Mon, 06 Aug 2018 09:00:15 -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=bF2u6cPMgUh2rm+6t107cady9EJfgK4vo+hZdmHeRZc=; b=atfdFlPmg9Tzm3WHmFTqhBuGQQCF+Nic4irB5/x31UF//wTm2zoGPUPM3K5AFUBGW7 nRQ/ooonElRuOrxqes11M+CR4iVBUfh+pMHcScm6EeuCEdt69goSx5LPVK2PzpzTtTUd NG6BJiCdmSUFnsHaoqSvkgTfFJ0a9Z17jl5Oz/sQboM1NFqpfRmICk9vekg9k0KjiDHX 3MIuLsfkh1HCDDyUjrADIaEHiI0y3KkpoROrM+d2o8yCwghbTZlGIerYQI/bWkfz3PJQ zB5eR+xJ6IFvmPWY4DpP22HmUdVqFVB3PcwxU710hvvtUaX+zqlq5ldDNnB7SWlUjpxP Dt2w== 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=bF2u6cPMgUh2rm+6t107cady9EJfgK4vo+hZdmHeRZc=; b=pDGHvXKYgVavJDMaAh7TrmMVAUmEMVc+pKOUFNDJ7CoJXYKJ68o3+QHuFP2bdpx2FB a+70tfoKR3SC6U1ClH1R42RMfwg1dC99ICl8k9DRlQtLbXConoYWQnUkcZj9MKAW/Ida KolYUbKWjXCNW7H1MEjuLj1w0HhKF8aU5mMnpNRxsRmi9uW2BYCxI3DHKOn5P1C7fAeR a2Y8fncy0S7CjQuPGHt5AC3yyLfiHhCzHrJc49mcBHuyNgDgq0UsqBSfvllExCIitkp7 Vx1Cv3+uo7+4/NCgmiAIYyR0aLgPLPkzMvIC4j8iFR/hzllSNIMX4bmHesab4O/QpHlB +R/A== X-Gm-Message-State: AOUpUlHI5kk75vrGMgVn24CzFPZezhZYrIMUB4f1NghlekY9OnIOkLL3 mf0bWc6OIVAyTkM8QYhnBtlLEDgpqfyrdoLuGJc= X-Google-Smtp-Source: AAOMgpe9sn6uEaXwQdomJktT/af2yS5nOJ9bw9pmGn42xVpMjgqxoS/RJXs3cteE57avT0GkziuCUZJVJ25lICG9TTM= X-Received: by 2002:a24:d358:: with SMTP id n85-v6mr16064851itg.67.1533571215041; Mon, 06 Aug 2018 09:00:15 -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: Mon, 6 Aug 2018 12:00:04 -0400 Message-ID: To: Matan Azrad Cc: Declan Doherty , Radu Nicolau , dev@dpdk.org, Chas Williams Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: Mon, 06 Aug 2018 16:00:16 -0000 On Fri, Aug 3, 2018 at 1:47 AM Matan Azrad wrote: > Hi Chas > > From: Chas Williams [mailto:3chas3@gmail.com] On Thu, Aug 2, 2018 at 1:3= 3 > > PM Matan Azrad wrote: > > > > > > > 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=3D5) should raise an erro= r. > > > > > > > > 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 ad= d. > > > > > > > > > 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 fai= l > > > 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. > > > > I don't sure you understand exactly what I=E2=80=99m suggesting here, a= gain: > > I suggest to add a new parameter to the LACP mode called > > lacp_mc_grp_conf(or something else). > > So, when the user configures LACP (mode 4) it must to configure the > > lacp_mc_grp_conf parameter to one of the options I suggested. > > This parameter is not per slave means the bond PMD will use the selecte= d > > option to configure the LACP MC group for all the slave ports. > > > > If one of the slaves doesn't support the selected option it should be > rejected. > > Conflicts should rais an error. > > > > I agree here. Yes, if a slave can't manage to subscribe to the > multicast group, > > an error should be raised. The only way for this to happen is that you > don't > > have promisc support which is the ultimate fallback. > > > The advantages are: > > The user knows which option is better to synchronize with his > application. > > The user knows better than the bond PMD what is the slaves capabilities= . > > All the slaves are configured by the same way - consistent traffic. > > > > > > It would be ideal if all the slaves would have the same features and > > capabilities. There wasn't enforced before, so this would be a new > restriction > > that would be less flexible than what we currently have. That doesn't > seem like > > an improvement. > > > The bonding user probably doesn't care which mode is used. > > The bonding user just wants bonding to work. He doesn't care about the > details. If I am writing > > an application with this proposed API, I need to make a list of adapter= s > and > > what they support (and keep this up to date as DPDK evolves). Ugh. > > The applications commonly know what are the nics capabilities they work > with. > > I know at least an one big application which really suffering because the > bond > configures promiscuous in mode 4 without the application asking (it's > considered there as a bug in dpdk). > I think that providing another option will be better. > I think providing another option will be better as well. However we disagree on the option. If the PMD has no other way to subscribe the multicast group, it has to use promiscuous mode. Providing a list of options only makes life complicated for the developer and doesn't really make any difference in the end results. For instance, if the least common denominator between the two PMDs is promiscuous mode, you are going to be forced to run both in promiscuous mode instead of selecting the best mode for each PMD. DPDK already has a promiscuous flag for the PMDs: RTE_FUNC_PTR_OR_RET(*dev->dev_ops->promiscuous_enable); (*dev->dev_ops->promiscuous_enable)(dev); dev->data->promiscuous =3D 1; So the bonding PMD already should be able to tell if it can safely propagate the enable/disable for promiscuous mode. However, for 802.3ad, that is always going to be a no until we add some other way to subscribe to the multicast group. > > So, providing to applications a list of options will ease the application > life and may be big improvement > while not hurting the current behavior. > > Matan > >