Message ID | 1603117027-24054-1-git-send-email-wenxu@ucloud.cn (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] vdpa/mlx5: Fix miss to set VIRTIO_NET_S_LINK_UP for virtio_net_config | expand |
On Mon, 19 Oct 2020 22:17:07 +0800 wenxu@ucloud.cn wrote: > 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") ^ missing space Please keep CCing netdev on future submissions, but the vdpa patches actually go through Michael's tree, so make sure to CC virtualization@lists.linux-foundation.org > 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; > } >
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; }