DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Alex Kiselev <alex@therouter.net>
Cc: 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: Mon, 18 Jun 2018 12:00:19 -0700	[thread overview]
Message-ID: <20180618120019.66b3bfbb@xeon-e3> (raw)
In-Reply-To: <20180618122720.5B3F51559@dpdk.org>

On Mon, 18 Jun 2018 15:27:16 +0300
Alex Kiselev <alex@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 */
> +	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.

  parent reply	other threads:[~2018-06-18 19:00 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
2018-06-19  8:39       ` Alex Kiselev
2018-06-18 19:00 ` Stephen Hemminger [this message]
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=20180618120019.66b3bfbb@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=alex@therouter.net \
    --cc=chas3@att.com \
    --cc=dev@dpdk.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).