netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] vdpa/mlx5: Fix miss to set VIRTIO_NET_S_LINK_UP for virtio_net_config
@ 2020-10-19 14:17 wenxu
  2020-10-19 22:02 ` Jakub Kicinski
  0 siblings, 1 reply; 11+ messages in thread
From: wenxu @ 2020-10-19 14:17 UTC (permalink / raw)
  To: eli; +Cc: netdev, jasowang, parav

From: wenxu <wenxu@ucloud.cn>

Qemu get virtio_net_config from the vdpa driver. So The vdpa driver
should set the VIRTIO_NET_S_LINK_UP flag to virtio_net_config like
vdpa_sim. Or the link of virtio net NIC in the virtual machine will
never up.

Fixes:1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: wenxu <wenxu@ucloud.cn>
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 74264e59..af6c74c 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -1537,6 +1537,8 @@ static int mlx5_vdpa_set_features(struct vdpa_device *vdev, u64 features)
 	ndev->mvdev.actual_features = features & ndev->mvdev.mlx_features;
 	ndev->config.mtu = __cpu_to_virtio16(mlx5_vdpa_is_little_endian(mvdev),
 					     ndev->mtu);
+	ndev->config.status = __cpu_to_virtio16(mlx5_vdpa_is_little_endian(mvdev),
+					       VIRTIO_NET_S_LINK_UP);
 	return err;
 }
 
-- 
1.8.3.1


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

end of thread, other threads:[~2020-11-01 11:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1603098438-20200-1-git-send-email-wenxu@ucloud.cn>
2020-10-20  2:03 ` [PATCH net] vdpa/mlx5: Fix miss to set VIRTIO_NET_S_LINK_UP for virtio_net_config Jason Wang
2020-10-20  7:44   ` Eli Cohen
2020-10-20  7:50     ` Jason Wang
2020-10-22  9:59     ` wenxu
2020-10-22 10:40       ` mlx5_vdpa problem wenxu
2020-10-29 11:29         ` Eli Cohen
2020-10-29 12:45         ` Eli Cohen
2020-10-30  7:50           ` wenxu
2020-11-01 11:50             ` Eli Cohen
2020-10-19 14:17 [PATCH net] vdpa/mlx5: Fix miss to set VIRTIO_NET_S_LINK_UP for virtio_net_config wenxu
2020-10-19 22:02 ` Jakub Kicinski

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).