DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Olivier Matz <olivier.matz@6wind.com>, dev@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	Tomasz Duszynski <tdu@semihalf.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	Ivan Malov <Ivan.Malov@oktetlabs.ru>
Subject: Re: [dpdk-dev] [PATCH v2] ethdev: return diagnostic when setting MAC address
Date: Tue, 3 Apr 2018 17:19:06 +0100	[thread overview]
Message-ID: <1aed0285-eba5-5ca0-dcb6-486ffd98c4eb@intel.com> (raw)
In-Reply-To: <20180403124103.13124-1-olivier.matz@6wind.com>

On 4/3/2018 1:41 PM, Olivier Matz wrote:
> diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
> index 6ab515ca9..87748f789 100644
> --- a/drivers/net/mvpp2/mrvl_ethdev.c
> +++ b/drivers/net/mvpp2/mrvl_ethdev.c
> @@ -987,7 +987,7 @@ mrvl_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
>  		return;
>  
>  	if (priv->isolated)
> -		return;
> +		return -ENOTSUP;
>  
>  	ret = pp2_ppio_remove_mac_addr(priv->ppio,
>  				       dev->data->mac_addrs[index].addr_bytes);
> @@ -996,6 +996,8 @@ mrvl_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
>  				  &dev->data->mac_addrs[index]);
>  		RTE_LOG(ERR, PMD, "Failed to remove mac %s\n", buf);
>  	}
> +
> +	return ret;
>  }

I guess mrvl_mac_addr_remove() updated by mistake?

>  
>  /**
> @@ -1061,18 +1063,21 @@ mrvl_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
>   *   Pointer to Ethernet device structure.
>   * @param mac_addr
>   *   MAC address to register.
> + *
> + * @return
> + *   0 on success, negative error value otherwise.
>   */
> -static void
> +static int
>  mrvl_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>  {
>  	struct mrvl_priv *priv = dev->data->dev_private;
>  	int ret;
>  
>  	if (!priv->ppio)
> -		return;
> +		return 0;
>  
>  	if (priv->isolated)
> -		return;
> +		return -ENOTSUP;
>  
>  	ret = pp2_ppio_set_mac_addr(priv->ppio, mac_addr->addr_bytes);
>  	if (ret) {
> @@ -1080,6 +1085,8 @@ mrvl_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>  		ether_format_addr(buf, sizeof(buf), mac_addr);
>  		RTE_LOG(ERR, PMD, "Failed to set mac to %s\n", buf);
>  	}
> +
> +	return ret;
>  }
>  
>  /**

  parent reply	other threads:[~2018-04-03 16:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 15:11 [dpdk-dev] [PATCH] " Olivier Matz
2018-03-05 10:29 ` Adrien Mazarguil
2018-03-06  9:37 ` Tomasz Duszynski
2018-03-16 15:41 ` Andrew Rybchenko
2018-03-26 18:39 ` Ferruh Yigit
2018-03-28  8:24   ` Olivier Matz
2018-04-03 12:41 ` [dpdk-dev] [PATCH v2] " Olivier Matz
2018-04-03 13:02   ` Andrew Rybchenko
2018-04-03 14:57   ` Adrien Mazarguil
2018-04-03 16:26     ` Olivier Matz
2018-04-03 16:19   ` Ferruh Yigit [this message]
2018-04-03 16:25     ` Olivier Matz
2018-04-04  8:19   ` Shreyansh Jain
2018-04-06 15:21   ` [dpdk-dev] [PATCH] " Olivier Matz
2018-04-06 15:34     ` Olivier Matz
2018-04-09  8:57     ` Nélio Laranjeiro
2018-04-06 15:34   ` [dpdk-dev] [PATCH v3] " Olivier Matz
2018-04-06 16:03     ` Ferruh Yigit
2018-04-10 13:19       ` Thomas Monjalon
2018-04-11 16:32     ` [dpdk-dev] [PATCH v4] " Olivier Matz
2018-04-11 19:30       ` Ferruh Yigit

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=1aed0285-eba5-5ca0-dcb6-486ffd98c4eb@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=Ivan.Malov@oktetlabs.ru \
    --cc=adrien.mazarguil@6wind.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=tdu@semihalf.com \
    --cc=thomas@monjalon.net \
    /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).