| 294 | } |
| 295 | |
| 296 | uint16_t |
| 297 | test_node1_worker(struct rte_graph *graph, struct rte_node *node, void **objs, |
| 298 | uint16_t nb_objs) |
| 299 | { |
| 300 | test_main_t *tm = &test_main; |
| 301 | uint8_t second_pass = 0; |
| 302 | uint32_t obj_node0 = 0; |
| 303 | struct rte_mbuf *data; |
| 304 | uint32_t count = 0; |
| 305 | uint32_t i; |
| 306 | |
| 307 | obj_stats[2] += nb_objs; |
| 308 | fn_calls[2] += 1; |
| 309 | for (i = 0; i < nb_objs; i++) { |
| 310 | data = (struct rte_mbuf *)objs[i]; |
| 311 | if ((*graph_field(data) >> 32) != tm->test_node[1].idx) { |
| 312 | printf("Data idx miss match at node 1, expected = %u" |
| 313 | " got = %u\n", |
| 314 | tm->test_node[1].idx, |
| 315 | (uint32_t)(*graph_field(data) >> 32)); |
| 316 | goto end; |
| 317 | } |
| 318 | |
| 319 | if ((*graph_field(data) & 0xffff) != (i - count)) { |
| 320 | printf("Expected buff count miss match at node 1\n"); |
| 321 | goto end; |
| 322 | } |
| 323 | |
| 324 | if (*graph_field(data) & (0x1 << 16)) |
| 325 | count = i + 1; |
| 326 | if (*graph_field(data) & (0x1 << 17)) |
| 327 | second_pass = 1; |
| 328 | } |
| 329 | |
| 330 | if (count != i) { |
| 331 | printf("Count mismatch at node 1\n"); |
| 332 | goto end; |
| 333 | } |
| 334 | |
| 335 | obj_node0 = nb_objs; |
| 336 | for (i = 0; i < obj_node0; i++) { |
| 337 | data = &mbuf[2][i]; |
| 338 | *graph_field(data) = ((uint64_t)tm->test_node[2].idx << 32) | i; |
| 339 | if ((i + 1) == obj_node0) |
| 340 | *graph_field(data) |= (1 << 16); |
| 341 | if (second_pass) |
| 342 | *graph_field(data) |= (1 << 17); |
| 343 | } |
| 344 | rte_node_enqueue(graph, node, 0, (void **)&mbuf_p[2][0], obj_node0); |
| 345 | |
| 346 | end: |
| 347 | return nb_objs; |
| 348 | } |
| 349 | |
| 350 | uint16_t |
| 351 | test_node2_worker(struct rte_graph *graph, struct rte_node *node, void **objs, |
no test coverage detected