aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorarikachen <eaglesora@gmail.com>2021-11-09 13:49:04 +0800
committerBeno�t Ganne <bganne@cisco.com>2021-11-10 07:40:48 +0000
commit603231f447f197e7bc45bdb75bf5d77420e682b9 (patch)
tree3d11aeec40f966d41e9b45cbe6eb7535bed60bc9 /src
parentf9e3cd4e5a6b7c7455f67ab0fc5bc4522436f354 (diff)
af_xdp: fix thread 0 and 1 using one txq slot
Type: fix Signed-off-by: arikachen <eaglesora@gmail.com> Change-Id: Id0e98e0a1b04f2c1aba2c261b4e51fd53a4ee824
Diffstat (limited to 'src')
-rw-r--r--src/plugins/af_xdp/output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/af_xdp/output.c b/src/plugins/af_xdp/output.c
index aac5df0325b..c5b73f98894 100644
--- a/src/plugins/af_xdp/output.c
+++ b/src/plugins/af_xdp/output.c
@@ -216,8 +216,8 @@ VNET_DEVICE_CLASS_TX_FN (af_xdp_device_class) (vlib_main_t * vm,
vnet_interface_output_runtime_t *ord = (void *) node->runtime_data;
af_xdp_device_t *ad = pool_elt_at_index (rm->devices, ord->dev_instance);
u32 thread_index = vm->thread_index;
- af_xdp_txq_t *txq =
- vec_elt_at_index (ad->txqs, (thread_index - 1) % ad->txq_num);
+ af_xdp_txq_t *txq = vec_elt_at_index (
+ ad->txqs, (thread_index - 1 + ad->txq_num) % ad->txq_num);
u32 *from;
u32 n, n_tx;
int i;