da4b610415
Add packet drop node process function for pkt_drop rte_node. This node simply free's every object received as an rte_mbuf to its rte_pktmbuf pool. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
27 lines
543 B
C
27 lines
543 B
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright(C) 2020 Marvell International Ltd.
|
|
*/
|
|
|
|
#include <rte_debug.h>
|
|
#include <rte_graph.h>
|
|
#include <rte_mbuf.h>
|
|
|
|
static uint16_t
|
|
pkt_drop_process(struct rte_graph *graph, struct rte_node *node, void **objs,
|
|
uint16_t nb_objs)
|
|
{
|
|
RTE_SET_USED(node);
|
|
RTE_SET_USED(graph);
|
|
|
|
rte_pktmbuf_free_bulk((struct rte_mbuf **)objs, nb_objs);
|
|
|
|
return nb_objs;
|
|
}
|
|
|
|
static struct rte_node_register pkt_drop_node = {
|
|
.process = pkt_drop_process,
|
|
.name = "pkt_drop",
|
|
};
|
|
|
|
RTE_NODE_REGISTER(pkt_drop_node);
|