summaryrefslogtreecommitdiffstats
path: root/src/spdk/dpdk/lib/librte_node/pkt_drop.c
blob: c350013236fd55d57952cc31f46a104ee908ae68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* 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);