| 404 | } |
| 405 | |
| 406 | uint16_t |
| 407 | test_node3_worker(struct rte_graph *graph, struct rte_node *node, void **objs, |
| 408 | uint16_t nb_objs) |
| 409 | { |
| 410 | test_main_t *tm = &test_main; |
| 411 | uint8_t second_pass = 0; |
| 412 | struct rte_mbuf *data; |
| 413 | uint32_t count = 0; |
| 414 | uint32_t obj_node0; |
| 415 | uint32_t i; |
| 416 | |
| 417 | obj_stats[4] += nb_objs; |
| 418 | fn_calls[4] += 1; |
| 419 | for (i = 0; i < nb_objs; i++) { |
| 420 | data = (struct rte_mbuf *)objs[i]; |
| 421 | if ((*graph_field(data) >> 32) != tm->test_node[3].idx) { |
| 422 | printf("Data idx miss match at node 3, expected = %u" |
| 423 | " got = %u\n", |
| 424 | tm->test_node[3].idx, |
| 425 | (uint32_t)(*graph_field(data) >> 32)); |
| 426 | goto end; |
| 427 | } |
| 428 | |
| 429 | if ((*graph_field(data) & 0xffff) != (i - count)) { |
| 430 | printf("Expected buff count miss match at node 3\n"); |
| 431 | goto end; |
| 432 | } |
| 433 | |
| 434 | if (*graph_field(data) & (0x1 << 16)) |
| 435 | count = i + 1; |
| 436 | if (*graph_field(data) & (0x1 << 17)) |
| 437 | second_pass = 1; |
| 438 | } |
| 439 | |
| 440 | if (count != i) { |
| 441 | printf("Count mismatch at node 3\n"); |
| 442 | goto end; |
| 443 | } |
| 444 | |
| 445 | if (second_pass) { |
| 446 | printf("Unexpected buffers are at node 3\n"); |
| 447 | goto end; |
| 448 | } else { |
| 449 | obj_node0 = nb_objs * 2; |
| 450 | for (i = 0; i < obj_node0; i++) { |
| 451 | data = &mbuf[4][i]; |
| 452 | *graph_field(data) = |
| 453 | ((uint64_t)tm->test_node[0].idx << 32) | i; |
| 454 | *graph_field(data) |= (1 << 17); |
| 455 | if ((i + 1) == obj_node0) |
| 456 | *graph_field(data) |= (1 << 16); |
| 457 | } |
| 458 | rte_node_enqueue(graph, node, 0, (void **)&mbuf_p[4][0], |
| 459 | obj_node0); |
| 460 | } |
| 461 | |
| 462 | end: |
| 463 | return nb_objs; |
no test coverage detected