diff options
author | Damjan Marion <damarion@cisco.com> | 2020-11-06 23:25:57 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-01-21 13:20:10 +0000 |
commit | 941005336ee8cec614a856089f3d873f7d98135c (patch) | |
tree | 2a9287e8a16cfbfecac80251637658a4cf93db66 /src/vnet/devices/virtio/virtio_process.c | |
parent | 1e4309538dd178827fc2a5efb3ceb80a4b1f1a8f (diff) |
interface: rx queue infra rework, part one
Type: improvement
Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/virtio_process.c')
-rw-r--r-- | src/vnet/devices/virtio/virtio_process.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/vnet/devices/virtio/virtio_process.c b/src/vnet/devices/virtio/virtio_process.c index 1689459f1cc..f347ef2ab57 100644 --- a/src/vnet/devices/virtio/virtio_process.c +++ b/src/vnet/devices/virtio/virtio_process.c @@ -18,6 +18,7 @@ #include <vlib/vlib.h> #include <vnet/devices/virtio/virtio.h> #include <vnet/gso/gro_func.h> +#include <vnet/interface/rx_queue_funcs.h> static uword virtio_send_interrupt_process (vlib_main_t * vm, @@ -45,22 +46,20 @@ virtio_send_interrupt_process (vlib_main_t * vm, break; case ~0: - /* *INDENT-OFF* */ - pool_foreach (vif, vim->interfaces) { - if (vif->packet_coalesce || vif->packet_buffering) - { - virtio_vring_t *vring; - vec_foreach (vring, vif->rxq_vrings) - { - if (vring->mode == VNET_HW_IF_RX_MODE_INTERRUPT || - vring->mode == VNET_HW_IF_RX_MODE_ADAPTIVE) - vnet_device_input_set_interrupt_pending ( - vnet_get_main (), vif->hw_if_index, - RX_QUEUE_ACCESS (vring->queue_id)); - } - } - } - /* *INDENT-ON* */ + pool_foreach (vif, vim->interfaces) + { + if (vif->packet_coalesce || vif->packet_buffering) + { + virtio_vring_t *vring; + vec_foreach (vring, vif->rxq_vrings) + { + if (vring->mode == VNET_HW_IF_RX_MODE_INTERRUPT || + vring->mode == VNET_HW_IF_RX_MODE_ADAPTIVE) + vnet_hw_if_rx_queue_set_int_pending ( + vnet_get_main (), vring->queue_index); + } + } + } break; default: |