Skip to contentSkip to conversation

vdpa_sim_net: Offer VIRTIO_NET_F_STATUS

PATCH In review Eugenio Pérez 3 participants 3 messages Nov 17, 2022 – Nov 23, 2022 virtio core

lore
Share & tools
lore

Eugenio Pérez

author maintainer
#0 lore raw

PATCH 1/1 vdpa_sim_net: Offer VIRTIO_NET_F_STATUS

VIRTIO_NET_S_LINK_UP is already returned in config reads since vdpasim creation, but the feature bit was not offered to the driver.

Tested modifying VIRTIO_NET_S_LINK_UP and different values of "status" in qemu virtio-net options, using vhost_vdpa.

Not considering as a fix, because there should be no driver trusting in this config read before the feature flag.

---
 drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 1 +
 1 file changed, 1 insertion(+)
drivers/vdpa/vdpa_sim/vdpa_sim_net.c +1 -0
index c3cb225ea469..30cfcfcf97f7 100644
@@ -27,6 +27,7 @@
 
 #define VDPASIM_NET_FEATURES	(VDPASIM_FEATURES | \
 				 (1ULL << VIRTIO_NET_F_MAC) | \
+				 (1ULL << VIRTIO_NET_F_STATUS) | \
 				 (1ULL << VIRTIO_NET_F_MTU) | \
 				 (1ULL << VIRTIO_NET_F_CTRL_VQ) | \
 				 (1ULL << VIRTIO_NET_F_CTRL_MAC_ADDR))
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Eugenio Pérez

VIRTIO_NET_S_LINK_UP is already returned in config reads since vdpasim creation, but the feature bit was not offered to the driver.

Tested modifying VIRTIO_NET_S_LINK_UP and different values of "status" in qemu virtio-net options, using vhost_vdpa.

Quoted 7 lines

Not considering as a fix, because there should be no driver trusting in this config read before the feature flag.

---
drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 1 +

1 file changed, 1 insertion(+)

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Tested-by on v1 1/1
#2 lore raw
In reply to Eugenio Pérez

QE applied this path in the test environment, and did regression testing with a vdpa simulator device; there are no new issues raised by this patch.

Quoted 31 lines · Eugenio Pérez <[email protected]> 于2022年11月23日周三 18:36写道:

VIRTIO_NET_S_LINK_UP is already returned in config reads since vdpasim creation, but the feature bit was not offered to the driver.

Tested modifying VIRTIO_NET_S_LINK_UP and different values of "status" in qemu virtio-net options, using vhost_vdpa.

Not considering as a fix, because there should be no driver trusting in this config read before the feature flag.

---
 drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 1 +
 1 file changed, 1 insertion(+)
drivers/vdpa/vdpa_sim/vdpa_sim_net.c +1 -1
index c3cb225ea469..30cfcfcf97f7 100644
@@ -27,6 +27,7 @@
 
 #define VDPASIM_NET_FEATURES   (VDPASIM_FEATURES | \
                                 (1ULL << VIRTIO_NET_F_MAC) | \
+                                (1ULL << VIRTIO_NET_F_STATUS) | \
                                 (1ULL << VIRTIO_NET_F_MTU) | \
                                 (1ULL << VIRTIO_NET_F_CTRL_VQ) | \
                                 (1ULL << VIRTIO_NET_F_CTRL_MAC_ADDR))
--

2.31.1