From 29dc67b5cbc96c988d6f859728ee040ff4991cf4 Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Tue, 1 Jun 2021 14:09:28 -0700 Subject: vmxnet3: set RX interrupt pending only when needed When an RX thread handles more than one RX queue and has a mix of queues in interrupt mode and polling mode, the RX input routine is naturally in polling mode. In that case, there is no need to set RX interrupt pending when descriptor is available in the queue for interrupt mode. Type: fix Signed-off-by: Steven Luong Change-Id: Iedbe57941eca3152c0e8ab9096cc81f315e0a915 --- src/plugins/vmxnet3/vmxnet3.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/plugins/vmxnet3/vmxnet3.h') diff --git a/src/plugins/vmxnet3/vmxnet3.h b/src/plugins/vmxnet3/vmxnet3.h index 75107689443..81aeec6f5c5 100644 --- a/src/plugins/vmxnet3/vmxnet3.h +++ b/src/plugins/vmxnet3/vmxnet3.h @@ -510,13 +510,20 @@ typedef struct u16 next; } vmxnet3_rx_comp_ring; +typedef struct +{ + CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); + u32 polling_q_count; +} vmxnet3_per_thread_data_t; + typedef struct { CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); u16 size; - u8 int_mode; + u32 mode; u8 buffer_pool_index; u32 queue_index; + u32 thread_index; vmxnet3_rx_ring rx_ring[VMXNET3_RX_RING_SIZE]; vmxnet3_rx_desc *rx_desc[VMXNET3_RX_RING_SIZE]; vmxnet3_rx_comp *rx_comp; @@ -594,6 +601,7 @@ typedef struct vmxnet3_device_t *devices; u16 msg_id_base; vlib_log_class_t log_default; + vmxnet3_per_thread_data_t *per_thread_data; } vmxnet3_main_t; extern vmxnet3_main_t vmxnet3_main; -- cgit 1.2.3-korg