diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2021-12-13 18:32:42 +0000 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2021-12-14 13:45:21 +0000 |
commit | b7e4e6d1d24685cec2b1b8c72998661ae237fe94 (patch) | |
tree | 01149cbf3e751a3215161da9b7945b09b573ac0c /src/vnet/devices/virtio/virtio_buffering.h | |
parent | 2e5921b08b167793eacf3085a98344ad00afb5ac (diff) |
virtio: integrate with new tx infra
Type: improvement
Change-Id: I337ec63d0868f665329d68eadf1744e080b73a0d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/virtio_buffering.h')
-rw-r--r-- | src/vnet/devices/virtio/virtio_buffering.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/virtio_buffering.h b/src/vnet/devices/virtio/virtio_buffering.h index ef3d9d27652..6f13a1f5c36 100644 --- a/src/vnet/devices/virtio/virtio_buffering.h +++ b/src/vnet/devices/virtio/virtio_buffering.h @@ -18,6 +18,8 @@ #ifndef _VNET_DEVICES_VIRTIO_VIRTIO_BUFFERING_H_ #define _VNET_DEVICES_VIRTIO_VIRTIO_BUFFERING_H_ +#include <vnet/interface.h> + #define VIRTIO_BUFFERING_DEFAULT_SIZE 1024 #define VIRTIO_BUFFERING_TIMEOUT 1e-5 @@ -205,15 +207,18 @@ virtio_vring_buffering_read_from_back (virtio_vring_buffering_t * buffering) } static_always_inline void -virtio_vring_buffering_schedule_node_on_dispatcher (vlib_main_t * vm, - virtio_vring_buffering_t * - buffering) +virtio_vring_buffering_schedule_node_on_dispatcher ( + vlib_main_t *vm, vnet_hw_if_tx_queue_t *txq, + virtio_vring_buffering_t *buffering) { if (buffering && virtio_vring_buffering_is_timeout (vm, buffering) && virtio_vring_n_buffers (buffering)) { vlib_frame_t *f = vlib_get_frame_to_node (vm, buffering->node_index); + vnet_hw_if_tx_frame_t *ft = vlib_frame_scalar_args (f); u32 *f_to = vlib_frame_vector_args (f); + ft->shared_queue = txq->shared_queue; + ft->queue_id = txq->queue_id; f_to[f->n_vectors] = virtio_vring_buffering_read_from_back (buffering); f->n_vectors++; vlib_put_frame_to_node (vm, buffering->node_index, f); |