1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
5 #ifndef _SAMPLE_PACKET_FORWARD_H_
6 #define _SAMPLE_PACKET_FORWARD_H_
10 /* MACROS to support virtual ring creation */
15 #define NUM_PACKETS 10
21 /* Sample test to create virtual rings and tx,rx portid from rings */
22 int test_ring_setup(struct rte_ring **ring, uint16_t *portid);
24 /* Sample test to free the virtual rings */
25 void test_ring_free(struct rte_ring *rxtx);
27 /* Sample test to forward packet using virtual port id */
28 int test_packet_forward(struct rte_mbuf **pbuf, uint16_t portid,
31 /* sample test to allocate buffer for pkts */
32 int test_get_mbuf_from_pool(struct rte_mempool **mp, struct rte_mbuf **pbuf,
35 /* Sample test to create the mempool */
36 int test_get_mempool(struct rte_mempool **mp, char *poolname);
38 /* sample test to deallocate the allocated buffers and mempool */
39 void test_put_mbuf_to_pool(struct rte_mempool *mp, struct rte_mbuf **pbuf);
41 /* Sample test to free the mempool */
42 void test_mp_free(struct rte_mempool *mp);
44 /* Sample test to release the vdev */
45 void test_vdev_uninit(const char *vdev);
47 #endif /* _SAMPLE_PACKET_FORWARD_H_ */