summaryrefslogtreecommitdiffstats
path: root/src/plugins/vmxnet3/input.c
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2018-11-02 16:28:52 -0700
committerDamjan Marion <dmarion@me.com>2018-11-07 01:13:01 +0000
commit005e4d50416d15368a6687076c7c934f89470f72 (patch)
tree0bc050d6c369e6b2298dbe44003605979bfa7cf0 /src/plugins/vmxnet3/input.c
parent6ccff02def39f314765f82a39f5dea9a667e47c8 (diff)
vmxnet3: reduce calling vmxnet3_reg_write_inline
In output.c, we buffer the descriptors and call vmxnet3_reg_write_inline once outside the loop. This change improves the performance dramatically. When refilling the ring, there is no need to inform the device unless explicitly specified by the device (ctrl.update_prod == 1) Change-Id: I7031d58bff0d249e913d14236d416c91eb6ab94a Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/plugins/vmxnet3/input.c')
-rw-r--r--src/plugins/vmxnet3/input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/vmxnet3/input.c b/src/plugins/vmxnet3/input.c
index 9392d57747d..dffad6c7d47 100644
--- a/src/plugins/vmxnet3/input.c
+++ b/src/plugins/vmxnet3/input.c
@@ -100,8 +100,9 @@ vmxnet3_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
next = nexts;
rx_comp = &rxq->rx_comp[comp_ring->next];
- while (PREDICT_TRUE (n_rx_packets < VLIB_FRAME_SIZE) &&
- (comp_ring->gen == (rx_comp->flags & VMXNET3_RXCF_GEN)))
+ while (PREDICT_TRUE ((n_rx_packets < VLIB_FRAME_SIZE) &&
+ (comp_ring->gen ==
+ (rx_comp->flags & VMXNET3_RXCF_GEN))))
{
vlib_buffer_t *b0;
u32 bi0;