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

Function send_pkts

dpdk/app/test/test_pdump.c:139–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139uint32_t
140send_pkts(void *empty __rte_unused)
141{
142 int ret = 0;
143 struct rte_mbuf *pbuf[NUM_PACKETS] = { };
144 struct rte_mempool *mp;
145 char poolname[] = "mbuf_pool_server";
146
147 ret = test_get_mbuf_from_pool(&mp, pbuf, poolname);
148 if (ret < 0)
149 printf("get_mbuf_from_pool failed\n");
150
151 ret = test_dev_start(portid, mp);
152 if (ret < 0)
153 printf("test_dev_start(%hu, %p) failed, error code: %d\n",
154 portid, mp, ret);
155
156 while (ret >= 0 && flag_for_send_pkts) {
157 ret = test_packet_forward(pbuf, portid, QUEUE_ID);
158 if (ret < 0)
159 printf("send pkts Failed\n");
160 };
161
162 rte_eth_dev_stop(portid);
163 test_put_mbuf_to_pool(mp, pbuf);
164 return 0;
165}
166
167/*
168 * This function is called in the primary i.e. main test, to spawn off secondary

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