aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/virtio_api.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-09-28 10:26:33 +0000
committerBeno�t Ganne <bganne@cisco.com>2020-09-28 16:47:30 +0000
commite347acbc31111504c015531e8ad764a86d489309 (patch)
tree3a72d961fd97b9ce7985865d89b0c45d27cab2fc /src/vnet/devices/virtio/virtio_api.c
parent7741afaf5c66a5d7ed1d2d76ae36a81ec24fdaaa (diff)
virtio: add packet buffering on tx
Type: feature This patch adds packet buffering on tx for slow backend which have some jitter/delays in freeing the vrings. There are some limitations to the current design: 1) It only works in poll mode. 2) Atleast 1 rx queue of an interface (with buffering enabled) should be placed on each worker and main thread. Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ib93c350298b228e80426e58ac77f3bbc93b8be27
Diffstat (limited to 'src/vnet/devices/virtio/virtio_api.c')
-rw-r--r--src/vnet/devices/virtio/virtio_api.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/devices/virtio/virtio_api.c b/src/vnet/devices/virtio/virtio_api.c
index 9a145d94a41..d9931046083 100644
--- a/src/vnet/devices/virtio/virtio_api.c
+++ b/src/vnet/devices/virtio/virtio_api.c
@@ -126,15 +126,18 @@ vl_api_virtio_pci_create_v2_t_handler (vl_api_virtio_pci_create_v2_t * mp)
STATIC_ASSERT (((int) VIRTIO_API_FLAG_IN_ORDER ==
(int) VIRTIO_FLAG_IN_ORDER),
"virtio in-order api flag mismatch");
+ STATIC_ASSERT (((int) VIRTIO_API_FLAG_BUFFERING ==
+ (int) VIRTIO_FLAG_BUFFERING),
+ "virtio buffering api flag mismatch");
ap->virtio_flags = clib_net_to_host_u32 (mp->virtio_flags);
ap->features = clib_net_to_host_u64 (mp->features);
- if (ap->virtio_flags & VIRTIO_FLAG_GSO)
+ if (ap->virtio_flags & VIRTIO_API_FLAG_GSO)
ap->gso_enabled = 1;
else
ap->gso_enabled = 0;
- if (ap->virtio_flags & VIRTIO_FLAG_CSUM_OFFLOAD)
+ if (ap->virtio_flags & VIRTIO_API_FLAG_CSUM_OFFLOAD)
ap->checksum_offload_enabled = 1;
else
ap->checksum_offload_enabled = 0;