DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matan Azrad <matan@mellanox.com>
To: Chas Williams <3chas3@gmail.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: Alex Kiselev <alex@therouter.net>, Chas Williams <chas3@att.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/bonding: add add/remove mac addrs
Date: Tue, 19 Jun 2018 07:07:36 +0000	[thread overview]
Message-ID: <VI1PR0501MB26083E1E16579EA736597369D2700@VI1PR0501MB2608.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <CAG2-GkmrKwwNSGjgUyarL4jY4E9KLbppv=CVv90Mrm115V0BOA@mail.gmail.com>

Hi

From: Chas Williams
> On Mon, Jun 18, 2018 at 2:58 PM Stephen Hemminger <
> stephen@networkplumber.org> wrote:
> 
> > On Mon, 18 Jun 2018 15:27:16 +0300
> > Alex Kiselev <alex@therouter.net> wrote:
> >
> > > +static const struct ether_addr null_mac_addr;
> > > +
> > > +/*
> > > + * Add additional MAC addresses to the slave  */ int
> > > +slave_add_mac_addresses(struct rte_eth_dev *bonded_eth_dev,
> > > +             uint16_t slave_port_id) {
> > > +     int i, ret;
> > > +     struct ether_addr *mac_addr;
> > > +
> > > +     /* add additional MACs to the slave */
> > > +     for (i = 1; i < BOND_MAX_MAC_ADDRS; i++) {
> > > +             mac_addr = &bonded_eth_dev->data->mac_addrs[i];
> > > +             if (is_same_ether_addr(mac_addr, &null_mac_addr))
> > > +                     break;
> > > +
> > > +             ret = rte_eth_dev_mac_addr_add(slave_port_id, mac_addr, 0);
> > > +             if (ret < 0)
> > > +                     return ret;
> > > +     }
> > > +
> > > +     return 0;
> > You need to unwind if adding MAC address to one of the slave devices
> > worked, and the second one did not.
> >
> 

Agree.

> Yes, probably.  But that doesn't help with the new slave problem.  If you add a
> new slave and it is unable to add all the MAC addresses, what then?  The only
> reasonable thing might be to put that interface into promiscuous mode.

I think that in this case the slave should be rejected.
The reason is that all the slaves should be able to receive\send the same traffic all the time.

>  At some point you need to draw the line, where is the PMD and where is the
> application?
> 
> Thankfully, people tend to enslave the same types of PMDs and the capabilities
> are generally similar.

So, I think we need to enforce it in the bonding PMD.


Please look at the bonding rte_flow design \ RSS conf (also in bonding documentation):

The main principle in the design is that all the time all the slaves able to get\send the same traffic:
So, a new slave which cannot apply all the current bonding flow rules will be rejected.
And a new rule which cannot be applied to all the current slaves will be rejected and deleted from all the slaves.
I think it should be the same for mac address adding and all the other configurations which affect a traffic receiving\sending.

Matan

  reply	other threads:[~2018-06-19  7:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180618122720.5B3F51559@dpdk.org>
2018-06-18 18:58 ` Stephen Hemminger
2018-06-19  0:33   ` Chas Williams
2018-06-19  7:07     ` Matan Azrad [this message]
2018-06-19  8:39       ` Alex Kiselev
2018-06-18 19:00 ` Stephen Hemminger
2018-06-19  0:35   ` Chas Williams
2018-06-19  8:41   ` Alex Kiselev
2018-06-18 12:27 Alex Kiselev

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=VI1PR0501MB26083E1E16579EA736597369D2700@VI1PR0501MB2608.eurprd05.prod.outlook.com \
    --to=matan@mellanox.com \
    --cc=3chas3@gmail.com \
    --cc=alex@therouter.net \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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).