xref: /dpdk/lib/node/pkt_drop.c (revision 30a1de105a5f40d77b344a891c4a68f79e815c43)
1*99a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause
2*99a2dd95SBruce Richardson  * Copyright(C) 2020 Marvell International Ltd.
3*99a2dd95SBruce Richardson  */
4*99a2dd95SBruce Richardson 
5*99a2dd95SBruce Richardson #include <rte_graph.h>
6*99a2dd95SBruce Richardson #include <rte_mbuf.h>
7*99a2dd95SBruce Richardson 
8*99a2dd95SBruce Richardson static uint16_t
pkt_drop_process(struct rte_graph * graph,struct rte_node * node,void ** objs,uint16_t nb_objs)9*99a2dd95SBruce Richardson pkt_drop_process(struct rte_graph *graph, struct rte_node *node, void **objs,
10*99a2dd95SBruce Richardson 		 uint16_t nb_objs)
11*99a2dd95SBruce Richardson {
12*99a2dd95SBruce Richardson 	RTE_SET_USED(node);
13*99a2dd95SBruce Richardson 	RTE_SET_USED(graph);
14*99a2dd95SBruce Richardson 
15*99a2dd95SBruce Richardson 	rte_pktmbuf_free_bulk((struct rte_mbuf **)objs, nb_objs);
16*99a2dd95SBruce Richardson 
17*99a2dd95SBruce Richardson 	return nb_objs;
18*99a2dd95SBruce Richardson }
19*99a2dd95SBruce Richardson 
20*99a2dd95SBruce Richardson static struct rte_node_register pkt_drop_node = {
21*99a2dd95SBruce Richardson 	.process = pkt_drop_process,
22*99a2dd95SBruce Richardson 	.name = "pkt_drop",
23*99a2dd95SBruce Richardson };
24*99a2dd95SBruce Richardson 
25*99a2dd95SBruce Richardson RTE_NODE_REGISTER(pkt_drop_node);
26