| 348 | } |
| 349 | |
| 350 | uint16_t |
| 351 | test_node2_worker(struct rte_graph *graph, struct rte_node *node, void **objs, |
| 352 | uint16_t nb_objs) |
| 353 | { |
| 354 | test_main_t *tm = &test_main; |
| 355 | uint8_t second_pass = 0; |
| 356 | struct rte_mbuf *data; |
| 357 | uint32_t count = 0; |
| 358 | uint32_t obj_node0; |
| 359 | uint32_t i; |
| 360 | |
| 361 | obj_stats[3] += nb_objs; |
| 362 | fn_calls[3] += 1; |
| 363 | for (i = 0; i < nb_objs; i++) { |
| 364 | data = (struct rte_mbuf *)objs[i]; |
| 365 | if ((*graph_field(data) >> 32) != tm->test_node[2].idx) { |
| 366 | printf("Data idx miss match at node 2, expected = %u" |
| 367 | " got = %u\n", |
| 368 | tm->test_node[2].idx, |
| 369 | (uint32_t)(*graph_field(data) >> 32)); |
| 370 | goto end; |
| 371 | } |
| 372 | |
| 373 | if ((*graph_field(data) & 0xffff) != (i - count)) { |
| 374 | printf("Expected buff count miss match at node 2\n"); |
| 375 | goto end; |
| 376 | } |
| 377 | |
| 378 | if (*graph_field(data) & (0x1 << 16)) |
| 379 | count = i + 1; |
| 380 | if (*graph_field(data) & (0x1 << 17)) |
| 381 | second_pass = 1; |
| 382 | } |
| 383 | |
| 384 | if (count != i) { |
| 385 | printf("Count mismatch at node 2\n"); |
| 386 | goto end; |
| 387 | } |
| 388 | |
| 389 | if (!second_pass) { |
| 390 | obj_node0 = nb_objs; |
| 391 | for (i = 0; i < obj_node0; i++) { |
| 392 | data = &mbuf[3][i]; |
| 393 | *graph_field(data) = |
| 394 | ((uint64_t)tm->test_node[3].idx << 32) | i; |
| 395 | if ((i + 1) == obj_node0) |
| 396 | *graph_field(data) |= (1 << 16); |
| 397 | } |
| 398 | rte_node_enqueue(graph, node, 0, (void **)&mbuf_p[3][0], |
| 399 | obj_node0); |
| 400 | } |
| 401 | |
| 402 | end: |
| 403 | return nb_objs; |
| 404 | } |
| 405 | |
| 406 | uint16_t |
| 407 | test_node3_worker(struct rte_graph *graph, struct rte_node *node, void **objs, |
no test coverage detected