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

Function test_latency_packet_forward

dpdk/app/test/test_latencystats.c:150–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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