All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] vdpa/mlx5: Use eth_zero_addr() to assign zero address
@ 2022-06-28  9:44 Xu Qiang
  2022-06-28 10:37   ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: Xu Qiang @ 2022-06-28  9:44 UTC (permalink / raw)
  To: mst, jasowang, elic, si-wei.liu, parav
  Cc: virtualization, linux-kernel, xuqiang36, rui.xiang

Using eth_zero_addr() to assign zero address insetad of
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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-28 10:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28  9:44 [PATCH -next] vdpa/mlx5: Use eth_zero_addr() to assign zero address Xu Qiang
2022-06-28 10:37 ` Michael S. Tsirkin
2022-06-28 10:37   ` Michael S. Tsirkin

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.