MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_bit_packet_forward

Function test_bit_packet_forward

dpdk/app/test/test_bitratestats.c:151–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151static int
152test_bit_packet_forward(void)
153{
154 int ret;
155 struct rte_mbuf *pbuf[BIT_NUM_PACKETS] = { };
156 struct rte_mempool *mp;
157 char poolname[] = "mbuf_pool";
158 ret = test_get_mbuf_from_pool(&mp, pbuf, poolname);
159 if (ret < 0) {
160 printf("allocate mbuf pool Failed\n");
161 return TEST_FAILED;
162 }
163 ret = test_dev_start(portid, mp);
164 if (ret < 0) {
165 printf("test_dev_start(%hu, %p) failed, error code: %d\n",
166 portid, mp, ret);
167 return TEST_FAILED;
168 }
169
170 ret = test_packet_forward(pbuf, portid, QUEUE_ID);
171 if (ret < 0)
172 printf("send pkts Failed\n");
173
174 rte_eth_dev_stop(portid);
175 test_put_mbuf_to_pool(mp, pbuf);
176
177 return (ret >= 0) ? TEST_SUCCESS : TEST_FAILED;
178}
179
180static int
181test_bit_ring_setup(void)

Callers

nothing calls this directly

Calls 6

test_get_mbuf_from_poolFunction · 0.85
test_dev_startFunction · 0.85
test_packet_forwardFunction · 0.85
rte_eth_dev_stopFunction · 0.85
test_put_mbuf_to_poolFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected