DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Raslan Darawsheh <rasland@mellanox.com>, dev@dpdk.org
Cc: stable@dpdk.org, Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/mlx5: fix VF MAC address set over Bluefield
Date: Thu, 23 Jul 2020 11:43:47 +0100	[thread overview]
Message-ID: <a2cbf48f-5188-691c-600b-1f72a1e18250@intel.com> (raw)
In-Reply-To: <20200722090755.26103-1-rasland@mellanox.com>

On 7/22/2020 10:07 AM, Raslan Darawsheh wrote:
> When trying to set MAC address of an ethethet device and if it was
> a representor, PMD sets the MAC over the corresponding VF instead.
> 
> For the case of HPF (Host PF representor on BluueField), PMD shouldn't
> attempt to set it, since it doesn't have any corresponding VF and fails.
> 
> This will fix the issue by setting the MAC on the dev directly.
> 
> Fixes: 0d1d73170820 ("net/mlx5: set VF MAC address from host")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_mac.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c
> index 2d808d629..c75b1a169 100644
> --- a/drivers/net/mlx5/mlx5_mac.c
> +++ b/drivers/net/mlx5/mlx5_mac.c
> @@ -157,8 +157,11 @@ mlx5_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
>  	uint16_t port_id;
>  	struct mlx5_priv *priv = dev->data->dev_private;
>  
> -	/* Configuring the VF instead of its representor. */
> -	if (priv->representor) {
> +	/*
> +	 * Configuring the VF instead of its representor,
> +	 * need to skip the special case of HPF on Bluefield.
> +	 */
> +	if (priv->representor && priv->representor >= 0) {


'priv->representor' is 1 bit size bitfield (unsigned int representor:1), what is
the point of additional ">=0" check?
Can it be "representor_id >= 0" by any chance?

  parent reply	other threads:[~2020-07-23 10:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22  9:07 [dpdk-dev] " Raslan Darawsheh
2020-07-23  8:57 ` Raslan Darawsheh
2020-07-23 10:43 ` Ferruh Yigit [this message]
2020-07-23 10:55   ` [dpdk-dev] [dpdk-stable] " Raslan Darawsheh
2020-07-23 11:06 ` [dpdk-dev] [PATCH v2] " Raslan Darawsheh
2020-07-23 11:25   ` Raslan Darawsheh

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=a2cbf48f-5188-691c-600b-1f72a1e18250@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=rasland@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@mellanox.com \
    /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).