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

Function test_mbuf_linearize_check

dpdk/app/test/test_mbuf.c:1340–1366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1338}
1339
1340static int
1341test_mbuf_linearize_check(struct rte_mempool *pktmbuf_pool)
1342{
1343 struct test_mbuf_array {
1344 int size;
1345 int nb_segs;
1346 } mbuf_array[] = {
1347 { 128, 1 },
1348 { 64, 64 },
1349 { 512, 10 },
1350 { 250, 11 },
1351 { 123, 8 },
1352 };
1353 unsigned int i;
1354
1355 printf("Test mbuf linearize API\n");
1356
1357 for (i = 0; i < RTE_DIM(mbuf_array); i++)
1358 if (test_mbuf_linearize(pktmbuf_pool, mbuf_array[i].size,
1359 mbuf_array[i].nb_segs)) {
1360 printf("Test failed for %d, %d\n", mbuf_array[i].size,
1361 mbuf_array[i].nb_segs);
1362 return -1;
1363 }
1364
1365 return 0;
1366}
1367
1368/*
1369 * Helper function for test_tx_ofload

Callers 2

test_mbufFunction · 0.85

Calls 2

test_mbuf_linearizeFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected