All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xu Qiang <xuqiang36@huawei.com>
Cc: linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, rui.xiang@huawei.com,
	elic@nvidia.com
Subject: Re: [PATCH v2 -next] vdpa/mlx5: Use eth_zero_addr() to assign zero address
Date: Tue, 28 Jun 2022 16:39:55 -0400	[thread overview]
Message-ID: <20220628163950-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220628123457.90884-1-xuqiang36@huawei.com>

On Tue, Jun 28, 2022 at 12:34:57PM +0000, Xu Qiang wrote:
> Using eth_zero_addr() to assign zero address instead of memset().
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Xu Qiang <xuqiang36@huawei.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
> v2:
> - fix typo in commit log
>  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index e85c1d71f4ed..f738c78ef446 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -1457,8 +1457,8 @@ static int mlx5_vdpa_add_mac_vlan_rules(struct mlx5_vdpa_net *ndev, u8 *mac,
>  
>  	*ucast = rule;
>  
> -	memset(dmac_c, 0, ETH_ALEN);
> -	memset(dmac_v, 0, ETH_ALEN);
> +	eth_zero_addr(dmac_c);
> +	eth_zero_addr(dmac_v);
>  	dmac_c[0] = 1;
>  	dmac_v[0] = 1;
>  	rule = mlx5_add_flow_rules(ndev->rxft, spec, &flow_act, &dest, 1);
> -- 
> 2.17.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xu Qiang <xuqiang36@huawei.com>
Cc: jasowang@redhat.com, elic@nvidia.com, si-wei.liu@oracle.com,
	parav@nvidia.com, virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, rui.xiang@huawei.com
Subject: Re: [PATCH v2 -next] vdpa/mlx5: Use eth_zero_addr() to assign zero address
Date: Tue, 28 Jun 2022 16:39:55 -0400	[thread overview]
Message-ID: <20220628163950-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220628123457.90884-1-xuqiang36@huawei.com>

On Tue, Jun 28, 2022 at 12:34:57PM +0000, Xu Qiang wrote:
> Using eth_zero_addr() to assign zero address instead of memset().
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Xu Qiang <xuqiang36@huawei.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
> v2:
> - fix typo in commit log
>  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index e85c1d71f4ed..f738c78ef446 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -1457,8 +1457,8 @@ static int mlx5_vdpa_add_mac_vlan_rules(struct mlx5_vdpa_net *ndev, u8 *mac,
>  
>  	*ucast = rule;
>  
> -	memset(dmac_c, 0, ETH_ALEN);
> -	memset(dmac_v, 0, ETH_ALEN);
> +	eth_zero_addr(dmac_c);
> +	eth_zero_addr(dmac_v);
>  	dmac_c[0] = 1;
>  	dmac_v[0] = 1;
>  	rule = mlx5_add_flow_rules(ndev->rxft, spec, &flow_act, &dest, 1);
> -- 
> 2.17.1


  reply	other threads:[~2022-06-28 20:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 12:34 [PATCH v2 -next] vdpa/mlx5: Use eth_zero_addr() to assign zero address Xu Qiang
2022-06-28 20:39 ` Michael S. Tsirkin [this message]
2022-06-28 20:39   ` Michael S. Tsirkin

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=20220628163950-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=elic@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rui.xiang@huawei.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuqiang36@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.