diff options
author | Damjan Marion <damarion@cisco.com> | 2021-04-15 13:12:51 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-05-11 12:40:37 +0000 |
commit | 1bd6cbb7aeded36cca4402d0c970b593316c9d70 (patch) | |
tree | d7c9809f0a5b62b427f2f108471f64c615b32263 /src/vnet/interface.c | |
parent | 0d39cbac6d688fb98d05c32acec699b25a599ead (diff) |
interface: tx queue infra
Type: improvement
Change-Id: I415b2f980de10ca3154d2c8677c24792453eccd0
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/interface.c')
-rw-r--r-- | src/vnet/interface.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/interface.c b/src/vnet/interface.c index 1d59a96219f..5c0ccaa900b 100644 --- a/src/vnet/interface.c +++ b/src/vnet/interface.c @@ -43,6 +43,7 @@ #include <vnet/adj/adj_mcast.h> #include <vnet/ip/ip.h> #include <vnet/interface/rx_queue_funcs.h> +#include <vnet/interface/tx_queue_funcs.h> /* *INDENT-OFF* */ VLIB_REGISTER_LOG_CLASS (if_default_log, static) = { @@ -958,7 +959,7 @@ vnet_register_interface (vnet_main_t * vnm, r.type = VLIB_NODE_TYPE_INTERNAL; r.runtime_data = &rt; r.runtime_data_bytes = sizeof (rt); - r.scalar_size = 0; + r.scalar_size = sizeof (vnet_hw_if_tx_frame_t); r.vector_size = sizeof (u32); r.flags = VLIB_NODE_FLAG_IS_OUTPUT; @@ -1062,8 +1063,9 @@ vnet_delete_hw_interface (vnet_main_t * vnm, u32 hw_if_index) /* Call delete callbacks. */ call_hw_interface_add_del_callbacks (vnm, hw_if_index, /* is_create */ 0); - /* delete rx queues */ + /* delete rx & tx queues */ vnet_hw_if_unregister_all_rx_queues (vnm, hw_if_index); + vnet_hw_if_unregister_all_tx_queues (vnm, hw_if_index); vnet_hw_if_update_runtime_data (vnm, hw_if_index); /* Delete any sub-interfaces. */ @@ -1407,6 +1409,8 @@ vnet_interface_init (vlib_main_t * vm) im->rxq_index_by_hw_if_index_and_queue_id = hash_create_mem (0, sizeof (u64), sizeof (u32)); + im->txq_index_by_hw_if_index_and_queue_id = + hash_create_mem (0, sizeof (u64), sizeof (u32)); im->sw_if_index_by_sup_and_sub = hash_create_mem (0, sizeof (u64), sizeof (uword)); { |