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 -next] vdpa/mlx5: Use eth_zero_addr() to assign zero address
Date: Tue, 28 Jun 2022 06:37:20 -0400 [thread overview]
Message-ID: <20220628063703-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220628094418.27973-1-xuqiang36@huawei.com>
On Tue, Jun 28, 2022 at 09:44:18AM +0000, Xu Qiang wrote:
> Using eth_zero_addr() to assign zero address insetad of
typo
> memset().
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Xu Qiang <xuqiang36@huawei.com>
> ---
> 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
parent reply other threads:[~2022-06-28 10:37 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20220628094418.27973-1-xuqiang36@huawei.com>]
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=20220628063703-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 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).