aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/odp/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/odp/node.c')
-rwxr-xr-xsrc/plugins/odp/node.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/plugins/odp/node.c b/src/plugins/odp/node.c
index 8eb1b0c..fea8bf6 100755
--- a/src/plugins/odp/node.c
+++ b/src/plugins/odp/node.c
@@ -75,6 +75,8 @@ odp_packet_queue_mode (odp_packet_if_t * oif, odp_packet_t pkt_tbl[],
odp_event_t evt_tbl[req_pkts];
u64 sched_wait;
odp_queue_t rxq = ODP_QUEUE_INVALID;
+ odp_thrmask_t mask;
+
if (pktio == ODP_PKTIO_INVALID)
{
@@ -90,6 +92,12 @@ odp_packet_queue_mode (odp_packet_if_t * oif, odp_packet_t pkt_tbl[],
return 0;
}
}
+ else
+ {
+ odp_thrmask_zero (&mask);
+ odp_thrmask_set (&mask, odp_thread_id ());
+ odp_schedule_group_join (oif->sched_group, &mask);
+ }
while (req_pkts)
{
@@ -110,6 +118,11 @@ odp_packet_queue_mode (odp_packet_if_t * oif, odp_packet_t pkt_tbl[],
req_pkts -= i;
}
+ if (oif->m.rx_mode != APPL_MODE_PKT_QUEUE)
+ {
+ odp_schedule_group_leave (oif->sched_group, &mask);
+ }
+
/* convert events to packets, discarding any non-packet events */
for (i = 0; i < num_evts; i++)
{
@@ -215,8 +228,7 @@ odp_packet_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
do
{
- if ((oif->m.rx_mode == (APPL_MODE_PKT_QUEUE)) ||
- (oif->m.rx_mode == (APPL_MODE_PKT_SCHED)))
+ if (oif->m.rx_mode != APPL_MODE_PKT_BURST)
{
n_left =
odp_packet_queue_mode (oif, pkt_tbl, queue_id, n_left_to_next);