diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2023-08-29 09:18:20 +0000 |
---|---|---|
committer | Mohammed HAWARI <momohawari@gmail.com> | 2023-09-06 12:13:45 +0000 |
commit | a181eaa59bb2ff2784376918e95bbf92e5340db1 (patch) | |
tree | 8b3d164ea44bf8abb787edcc5b10b93a67f621ca /src/vnet/devices/virtio/virtio_pci_modern.c | |
parent | 56b8abc07fcf9b339d54d659797715df7f0328f1 (diff) |
virtio: add support for tx-queue-size
Type: improvement
DBGvpp# set loggin class virtio level debug
DBGvpp# create int virtio 0000:00:03.0 tx-queue-size 1024
show virtio pci
```
Virtqueue (TX) 1
qsz 1024, last_used_idx 0, desc_next 0, desc_in_use 0
avail.flags 0x1 avail.idx 0 used.flags 0x0 used.idx 0
```
show logging
```
2022/07/22 23:20:22:557 debug virtio 0000:00:03.0: tx-queue: number 1, default-size 256
2022/07/22 23:20:22:557 debug virtio 0000:00:03.0: tx-queue: number 1, new size 1024
```
Change-Id: Ib1a3ebe742b3a6c9fe72bd1c5accfe07682cbdd1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/virtio_pci_modern.c')
-rw-r--r-- | src/vnet/devices/virtio/virtio_pci_modern.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/virtio_pci_modern.c b/src/vnet/devices/virtio/virtio_pci_modern.c index f7313d84bbd..50a7b392367 100644 --- a/src/vnet/devices/virtio/virtio_pci_modern.c +++ b/src/vnet/devices/virtio/virtio_pci_modern.c @@ -164,9 +164,7 @@ virtio_pci_modern_set_queue_size (vlib_main_t * vm, virtio_if_t * vif, return; } - if (virtio_pci_modern_get_queue_size (vm, vif, queue_id) > queue_size) - virtio_pci_reg_write_u16 (vif, VIRTIO_QUEUE_SIZE_OFFSET (vif), - queue_size); + virtio_pci_reg_write_u16 (vif, VIRTIO_QUEUE_SIZE_OFFSET (vif), queue_size); } static u16 |