Skip to contentSkip to conversation

vhost: Add VIRTIO_NET_F_RSC_EXT to vhost feature bits

PATCH In review Akihiko Odaki 4 participants 4 messages Aug 2, 2024 – Aug 6, 2024 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost: Add VIRTIO_NET_F_RSC_EXT to vhost feature bits

VIRTIO_NET_F_RSC_EXT is implemented in the rx data path, which vhost implements, so vhost needs to support the feature if it is ever to be enabled with vhost. The feature must be disabled otherwise.

Fixes 2974e916df87 ("virtio-net: support RSC v4/v6 tcp traffic for Windows HCK")
---
 hw/net/vhost_net.c | 2 ++
 net/vhost-vdpa.c   | 1 +
 2 files changed, 3 insertions(+)
hw/net/vhost_net.c +2 -0
index a788e6937e03..dedf9ad7c242 100644
@@ -50,6 +50,7 @@ static const int kernel_feature_bits[] = {
     VIRTIO_F_RING_RESET,
     VIRTIO_F_IN_ORDER,
     VIRTIO_F_NOTIFICATION_DATA,
+    VIRTIO_NET_F_RSC_EXT,
     VIRTIO_NET_F_HASH_REPORT,
     VHOST_INVALID_FEATURE_BIT
 };
@@ -81,6 +82,7 @@ static const int user_feature_bits[] = {
     VIRTIO_F_RING_RESET,
     VIRTIO_F_IN_ORDER,
     VIRTIO_NET_F_RSS,
+    VIRTIO_NET_F_RSC_EXT,
     VIRTIO_NET_F_HASH_REPORT,
     VIRTIO_NET_F_GUEST_USO4,
     VIRTIO_NET_F_GUEST_USO6,
net/vhost-vdpa.c +1 -0
index 03457ead663a..46b02c50be8c 100644
@@ -88,6 +88,7 @@ const int vdpa_feature_bits[] = {
     VIRTIO_NET_F_MQ,
     VIRTIO_NET_F_MRG_RXBUF,
     VIRTIO_NET_F_MTU,
+    VIRTIO_NET_F_RSC_EXT,
     VIRTIO_NET_F_RSS,
     VIRTIO_NET_F_STATUS,
     VIRTIO_RING_F_EVENT_IDX,

---
base-commit: 31669121a01a14732f57c49400bc239cf9fd505f
change-id: 20240802-rsc-e90fb452bd7f

Best regards,

Signature · 1 line
Akihiko Odaki <[email protected]>
#1 lore raw

At the moment kernel (vhost) and vhost user backends do not support this feature (and IMO they do not need to)
In order to support it they need to implement a) coalescing of segmented TCP packets and b) population of respective fields in host-to-guest packets (number of coalesced segments and counter of duplicated acks)
Just to remind - this feature is intended to be used without vhost and without migration

Thanks
Yuri

Quoted 54 lines · Akihiko Odaki

VIRTIO_NET_F_RSC_EXT is implemented in the rx data path, which vhost implements, so vhost needs to support the feature if it is ever to be enabled with vhost. The feature must be disabled otherwise.

Fixes 2974e916df87 ("virtio-net: support RSC v4/v6 tcp traffic for Windows HCK")
---
 hw/net/vhost_net.c | 2 ++
 net/vhost-vdpa.c   | 1 +
 2 files changed, 3 insertions(+)
hw/net/vhost_net.c +2 -0
index a788e6937e03..dedf9ad7c242 100644
@@ -50,6 +50,7 @@ static const int kernel_feature_bits[] = {
     VIRTIO_F_RING_RESET,
     VIRTIO_F_IN_ORDER,
     VIRTIO_F_NOTIFICATION_DATA,
+    VIRTIO_NET_F_RSC_EXT,
     VIRTIO_NET_F_HASH_REPORT,
     VHOST_INVALID_FEATURE_BIT
 };
@@ -81,6 +82,7 @@ static const int user_feature_bits[] = {
     VIRTIO_F_RING_RESET,
     VIRTIO_F_IN_ORDER,
     VIRTIO_NET_F_RSS,
+    VIRTIO_NET_F_RSC_EXT,
     VIRTIO_NET_F_HASH_REPORT,
     VIRTIO_NET_F_GUEST_USO4,
     VIRTIO_NET_F_GUEST_USO6,
net/vhost-vdpa.c +1 -1
index 03457ead663a..46b02c50be8c 100644
@@ -88,6 +88,7 @@ const int vdpa_feature_bits[] = {
     VIRTIO_NET_F_MQ,
     VIRTIO_NET_F_MRG_RXBUF,
     VIRTIO_NET_F_MTU,
+    VIRTIO_NET_F_RSC_EXT,
     VIRTIO_NET_F_RSS,
     VIRTIO_NET_F_STATUS,
     VIRTIO_RING_F_EVENT_IDX,
 
---

base-commit: 31669121a01a14732f57c49400bc239cf9fd505f
change-id: 20240802-rsc-e90fb452bd7f

Best regards,
--
Akihiko Odaki <[email protected]>

#2 lore raw
Quoted 11 lines · Yuri Benditovich

At the moment kernel (vhost) and vhost user backends do not support this feature (and IMO they do not need to)
In order to support it they need to implement a) coalescing of segmented TCP packets and b) population of respective fields in host-to-guest packets (number of coalesced segments and counter of duplicated acks)
Just to remind - this feature is intended to be used without vhost and without migration

Thanks
Yuri

it is off ny default so no big deal ...
if it's incompatiblr with vhost/migration I guess it is a good idea to make sure users do not enable it like this.

Acked-by on v1 1/1
#3 lore raw
In reply to Akihiko Odaki
Quoted 9 lines · Akihiko Odaki

VIRTIO_NET_F_RSC_EXT is implemented in the rx data path, which vhost implements, so vhost needs to support the feature if it is ever to be enabled with vhost. The feature must be disabled otherwise.

Fixes 2974e916df87 ("virtio-net: support RSC v4/v6 tcp traffic for Windows HCK")

---

Thanks