[dpdk-dev] [PATCH v2] net/bonding: add add/remove mac addrs
Chas Williams
3chas3 at gmail.com
Tue Jun 19 02:35:41 CEST 2018
On Mon, Jun 18, 2018 at 3:00 PM Stephen Hemminger <
stephen at networkplumber.org> wrote:
> On Mon, 18 Jun 2018 15:27:16 +0300
> Alex Kiselev <alex at therouter.net> wrote:
>
> > +/*
> > + * Remove additional MAC addresses from the slave
> > + */
> > +int
> > +slave_remove_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 */
>
And this should say remove as well.
> > + 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_remove(slave_port_id, mac_addr);
> > + if (ret < 0)
> > + return ret;
> > + }
>
> Not sure this is the best semantic if remove fails on one of many
> slaves. Perhaps it should always remove it from all slaves.
>
> Or maybe a first pass to see if the address exists, then
> a no-fail removal pass.
>
More information about the dev
mailing list