summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/gettingstarted/developers/vlib.md2
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed_handoff.c4
-rw-r--r--src/plugins/nat/nat44-ei/nat44_ei_ha.c5
-rw-r--r--src/plugins/nat/nat44-ei/nat44_ei_hairpinning.h4
-rw-r--r--src/plugins/nat/nat44-ei/nat44_ei_handoff.c4
-rw-r--r--src/plugins/nat/nat64/nat64_in2out.c5
-rw-r--r--src/plugins/nat/nat64/nat64_out2in.c5
-rw-r--r--src/plugins/wireguard/wireguard_handoff.c2
-rw-r--r--src/vlib/buffer_funcs.c5
-rw-r--r--src/vlib/buffer_funcs.h5
-rw-r--r--src/vlib/buffer_node.h9
-rw-r--r--src/vnet/handoff.c2
-rw-r--r--src/vnet/ip/reass/ip4_full_reass.c5
-rw-r--r--src/vnet/ip/reass/ip4_sv_reass.c5
-rw-r--r--src/vnet/ip/reass/ip6_full_reass.c5
-rw-r--r--src/vnet/ip/reass/ip6_sv_reass.c5
-rw-r--r--src/vnet/ipsec/ipsec_handoff.c2
-rw-r--r--src/vnet/policer/police_inlines.h4
18 files changed, 37 insertions, 41 deletions
diff --git a/docs/gettingstarted/developers/vlib.md b/docs/gettingstarted/developers/vlib.md
index 59206e5ed4b..3a35978136c 100644
--- a/docs/gettingstarted/developers/vlib.md
+++ b/docs/gettingstarted/developers/vlib.md
@@ -668,7 +668,7 @@ a typical graph-node dispatch function:
/* Enqueue buffers to threads */
n_enq =
- vlib_buffer_enqueue_to_thread (vm, hmp->frame_queue_index,
+ vlib_buffer_enqueue_to_thread (vm, node, hmp->frame_queue_index,
from, thread_indices, frame->n_vectors,
1 /* drop on congestion */);
/* Typical counters,
diff --git a/src/plugins/nat/nat44-ed/nat44_ed_handoff.c b/src/plugins/nat/nat44-ed/nat44_ed_handoff.c
index 597a08c77b4..52d52b4e65c 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed_handoff.c
+++ b/src/plugins/nat/nat44-ed/nat44_ed_handoff.c
@@ -270,8 +270,8 @@ nat44_worker_handoff_fn_inline (vlib_main_t * vm,
}
}
- n_enq = vlib_buffer_enqueue_to_thread (vm, fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
{
diff --git a/src/plugins/nat/nat44-ei/nat44_ei_ha.c b/src/plugins/nat/nat44-ei/nat44_ei_ha.c
index 91eea98f84d..39bce255bd6 100644
--- a/src/plugins/nat/nat44-ei/nat44_ei_ha.c
+++ b/src/plugins/nat/nat44-ei/nat44_ei_ha.c
@@ -1265,9 +1265,8 @@ nat_ha_handoff_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
b += 1;
}
- n_enq =
- vlib_buffer_enqueue_to_thread (vm, ha->fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, ha->fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
vlib_node_increment_counter (vm, node->node_index,
diff --git a/src/plugins/nat/nat44-ei/nat44_ei_hairpinning.h b/src/plugins/nat/nat44-ei/nat44_ei_hairpinning.h
index bdd2d210200..908e6b2cfc9 100644
--- a/src/plugins/nat/nat44-ei/nat44_ei_hairpinning.h
+++ b/src/plugins/nat/nat44-ei/nat44_ei_hairpinning.h
@@ -71,8 +71,8 @@ nat44_ei_hairpinning_handoff_fn_inline (vlib_main_t *vm,
ti += 1;
b += 1;
}
- n_enq = vlib_buffer_enqueue_to_thread (vm, fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
vlib_node_increment_counter (
diff --git a/src/plugins/nat/nat44-ei/nat44_ei_handoff.c b/src/plugins/nat/nat44-ei/nat44_ei_handoff.c
index 6b172dceeb3..567f53915d2 100644
--- a/src/plugins/nat/nat44-ei/nat44_ei_handoff.c
+++ b/src/plugins/nat/nat44-ei/nat44_ei_handoff.c
@@ -265,8 +265,8 @@ nat44_ei_worker_handoff_fn_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
}
}
- n_enq = vlib_buffer_enqueue_to_thread (vm, fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
{
diff --git a/src/plugins/nat/nat64/nat64_in2out.c b/src/plugins/nat/nat64/nat64_in2out.c
index 5d98277d443..52d3c7f0a3b 100644
--- a/src/plugins/nat/nat64/nat64_in2out.c
+++ b/src/plugins/nat/nat64/nat64_in2out.c
@@ -1367,9 +1367,8 @@ VLIB_NODE_FN (nat64_in2out_handoff_node) (vlib_main_t * vm,
b += 1;
}
- n_enq =
- vlib_buffer_enqueue_to_thread (vm, fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
vlib_node_increment_counter (vm, node->node_index,
diff --git a/src/plugins/nat/nat64/nat64_out2in.c b/src/plugins/nat/nat64/nat64_out2in.c
index 5c5554ba36e..7cc2d3d3b70 100644
--- a/src/plugins/nat/nat64/nat64_out2in.c
+++ b/src/plugins/nat/nat64/nat64_out2in.c
@@ -752,9 +752,8 @@ VLIB_NODE_FN (nat64_out2in_handoff_node) (vlib_main_t * vm,
b += 1;
}
- n_enq =
- vlib_buffer_enqueue_to_thread (vm, fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
vlib_node_increment_counter (vm, node->node_index,
diff --git a/src/plugins/wireguard/wireguard_handoff.c b/src/plugins/wireguard/wireguard_handoff.c
index 3957af9fe17..d3e37b30c88 100644
--- a/src/plugins/wireguard/wireguard_handoff.c
+++ b/src/plugins/wireguard/wireguard_handoff.c
@@ -118,7 +118,7 @@ wg_handoff (vlib_main_t * vm,
b += 1;
}
- n_enq = vlib_buffer_enqueue_to_thread (vm, fq_index, from,
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
diff --git a/src/vlib/buffer_funcs.c b/src/vlib/buffer_funcs.c
index 9ed1bac16be..83ff296e705 100644
--- a/src/vlib/buffer_funcs.c
+++ b/src/vlib/buffer_funcs.c
@@ -163,8 +163,9 @@ CLIB_MARCH_FN_REGISTRATION (vlib_buffer_enqueue_to_single_next_fn);
u32 __clib_section (".vlib_buffer_enqueue_to_thread_fn")
CLIB_MULTIARCH_FN (vlib_buffer_enqueue_to_thread_fn)
-(vlib_main_t *vm, u32 frame_queue_index, u32 *buffer_indices,
- u16 *thread_indices, u32 n_packets, int drop_on_congestion)
+(vlib_main_t *vm, vlib_node_runtime_t *node, u32 frame_queue_index,
+ u32 *buffer_indices, u16 *thread_indices, u32 n_packets,
+ int drop_on_congestion)
{
vlib_thread_main_t *tm = vlib_get_thread_main ();
vlib_frame_queue_main_t *fqm;
diff --git a/src/vlib/buffer_funcs.h b/src/vlib/buffer_funcs.h
index d579e1bc2e1..8b8a3911776 100644
--- a/src/vlib/buffer_funcs.h
+++ b/src/vlib/buffer_funcs.h
@@ -60,8 +60,9 @@ typedef void (vlib_buffer_enqueue_to_single_next_fn_t) (
u32 count);
typedef u32 (vlib_buffer_enqueue_to_thread_fn_t) (
- vlib_main_t *vm, u32 frame_queue_index, u32 *buffer_indices,
- u16 *thread_indices, u32 n_packets, int drop_on_congestion);
+ vlib_main_t *vm, vlib_node_runtime_t *node, u32 frame_queue_index,
+ u32 *buffer_indices, u16 *thread_indices, u32 n_packets,
+ int drop_on_congestion);
typedef u32 (vlib_frame_queue_dequeue_fn_t) (vlib_main_t *vm,
vlib_frame_queue_main_t *fqm);
diff --git a/src/vlib/buffer_node.h b/src/vlib/buffer_node.h
index d2bd32f985a..9fece67f31f 100644
--- a/src/vlib/buffer_node.h
+++ b/src/vlib/buffer_node.h
@@ -355,13 +355,14 @@ vlib_buffer_enqueue_to_single_next (vlib_main_t * vm,
}
static_always_inline u32
-vlib_buffer_enqueue_to_thread (vlib_main_t * vm, u32 frame_queue_index,
- u32 * buffer_indices, u16 * thread_indices,
- u32 n_packets, int drop_on_congestion)
+vlib_buffer_enqueue_to_thread (vlib_main_t *vm, vlib_node_runtime_t *node,
+ u32 frame_queue_index, u32 *buffer_indices,
+ u16 *thread_indices, u32 n_packets,
+ int drop_on_congestion)
{
vlib_buffer_enqueue_to_thread_fn_t *fn;
fn = vlib_buffer_func_main.buffer_enqueue_to_thread_fn;
- return (fn) (vm, frame_queue_index, buffer_indices, thread_indices,
+ return (fn) (vm, node, frame_queue_index, buffer_indices, thread_indices,
n_packets, drop_on_congestion);
}
diff --git a/src/vnet/handoff.c b/src/vnet/handoff.c
index cbdc5289243..f64d5ad3a69 100644
--- a/src/vnet/handoff.c
+++ b/src/vnet/handoff.c
@@ -149,7 +149,7 @@ VLIB_NODE_FN (worker_handoff_node) (vlib_main_t * vm,
b += 1;
}
- n_enq = vlib_buffer_enqueue_to_thread (vm, hm->frame_queue_index, from,
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, hm->frame_queue_index, from,
thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c
index 2bfbc381e1a..fda73a43a1b 100644
--- a/src/vnet/ip/reass/ip4_full_reass.c
+++ b/src/vnet/ip/reass/ip4_full_reass.c
@@ -1840,9 +1840,8 @@ ip4_full_reass_handoff_node_inline (vlib_main_t * vm,
ti += 1;
b += 1;
}
- n_enq =
- vlib_buffer_enqueue_to_thread (vm, fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
vlib_node_increment_counter (vm, node->node_index,
diff --git a/src/vnet/ip/reass/ip4_sv_reass.c b/src/vnet/ip/reass/ip4_sv_reass.c
index 28ebc4d0dc0..43390eae2ab 100644
--- a/src/vnet/ip/reass/ip4_sv_reass.c
+++ b/src/vnet/ip/reass/ip4_sv_reass.c
@@ -1440,9 +1440,8 @@ ip4_sv_reass_handoff_node_inline (vlib_main_t * vm,
ti += 1;
b += 1;
}
- n_enq =
- vlib_buffer_enqueue_to_thread (vm, fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
vlib_node_increment_counter (vm, node->node_index,
diff --git a/src/vnet/ip/reass/ip6_full_reass.c b/src/vnet/ip/reass/ip6_full_reass.c
index 8403bc5198e..67505689bca 100644
--- a/src/vnet/ip/reass/ip6_full_reass.c
+++ b/src/vnet/ip/reass/ip6_full_reass.c
@@ -1795,9 +1795,8 @@ ip6_full_reassembly_handoff_inline (vlib_main_t * vm,
ti += 1;
b += 1;
}
- n_enq =
- vlib_buffer_enqueue_to_thread (vm, fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
vlib_node_increment_counter (vm, node->node_index,
diff --git a/src/vnet/ip/reass/ip6_sv_reass.c b/src/vnet/ip/reass/ip6_sv_reass.c
index e09173df5ec..d5218a4fb1d 100644
--- a/src/vnet/ip/reass/ip6_sv_reass.c
+++ b/src/vnet/ip/reass/ip6_sv_reass.c
@@ -1265,9 +1265,8 @@ ip6_sv_reassembly_handoff_inline (vlib_main_t * vm,
ti += 1;
b += 1;
}
- n_enq =
- vlib_buffer_enqueue_to_thread (vm, fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
vlib_node_increment_counter (vm, node->node_index,
diff --git a/src/vnet/ipsec/ipsec_handoff.c b/src/vnet/ipsec/ipsec_handoff.c
index 9092f817857..e8daa1a6a23 100644
--- a/src/vnet/ipsec/ipsec_handoff.c
+++ b/src/vnet/ipsec/ipsec_handoff.c
@@ -132,7 +132,7 @@ ipsec_handoff (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame,
b += 1;
}
- n_enq = vlib_buffer_enqueue_to_thread (vm, fq_index, from,
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
diff --git a/src/vnet/policer/police_inlines.h b/src/vnet/policer/police_inlines.h
index 59afb562509..6b0c0ecf725 100644
--- a/src/vnet/policer/police_inlines.h
+++ b/src/vnet/policer/police_inlines.h
@@ -169,8 +169,8 @@ policer_handoff (vlib_main_t *vm, vlib_node_runtime_t *node,
b++;
}
- n_enq = vlib_buffer_enqueue_to_thread (vm, fq_index, from, thread_indices,
- frame->n_vectors, 1);
+ n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
+ thread_indices, frame->n_vectors, 1);
if (n_enq < frame->n_vectors)
vlib_node_increment_counter (vm, node->node_index,