diff options
Diffstat (limited to 'service/src/node_shmdev.c')
| -rw-r--r-- | service/src/node_shmdev.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/service/src/node_shmdev.c b/service/src/node_shmdev.c index 6142d15..6e2d3cf 100644 --- a/service/src/node_shmdev.c +++ b/service/src/node_shmdev.c @@ -177,14 +177,19 @@ uint16_t shmdev_tx_node_process(struct rte_graph * graph, struct rte_node * node while (nr_pkts) { unsigned int nr_mbufs_this_batch = (nr_pkts > RTE_GRAPH_BURST_SIZE) ? RTE_GRAPH_BURST_SIZE : nr_pkts; - vdev_dispatch(shm_dev_desc, graph->id, mbufs, nr_mbufs_this_batch, 0); + int ret = vdev_dispatch(shm_dev_desc, graph->id, mbufs, nr_mbufs_this_batch, 0); + if (unlikely(ret < 0)) + { + /* these mbufs should be dropped */ + rte_node_enqueue(graph, node, 0, (void **)mbufs, nr_mbufs_this_batch); + } nr_pkts -= nr_mbufs_this_batch; mbufs += nr_mbufs_this_batch; /* retrieve the backpressure packets */ struct rte_mbuf * rt_mbufs[RTE_GRAPH_BURST_SIZE]; - int ret = vdev_rt_pkts_retrieve(shm_dev_desc, graph->id, rt_mbufs, RTE_GRAPH_BURST_SIZE); + ret = vdev_rt_pkts_retrieve(shm_dev_desc, graph->id, rt_mbufs, RTE_GRAPH_BURST_SIZE); /* these packet to pkt drop node */ if (unlikely(ret > 0)) |
