| 999 | } |
| 1000 | |
| 1001 | static int |
| 1002 | graph_setup(void) |
| 1003 | { |
| 1004 | int i, j; |
| 1005 | |
| 1006 | static const struct rte_mbuf_dynfield graph_dynfield_desc = { |
| 1007 | .name = "test_graph_dynfield", |
| 1008 | .size = sizeof(graph_dynfield_t), |
| 1009 | .align = __alignof__(graph_dynfield_t), |
| 1010 | }; |
| 1011 | graph_dynfield_offset = |
| 1012 | rte_mbuf_dynfield_register(&graph_dynfield_desc); |
| 1013 | if (graph_dynfield_offset < 0) { |
| 1014 | printf("Cannot register mbuf field\n"); |
| 1015 | return TEST_FAILED; |
| 1016 | } |
| 1017 | |
| 1018 | for (i = 0; i <= MAX_NODES; i++) { |
| 1019 | for (j = 0; j < MBUFF_SIZE; j++) |
| 1020 | mbuf_p[i][j] = &mbuf[i][j]; |
| 1021 | } |
| 1022 | if (test_node_clone()) { |
| 1023 | printf("test_node_clone: fail\n"); |
| 1024 | return -1; |
| 1025 | } |
| 1026 | printf("test_node_clone: pass\n"); |
| 1027 | |
| 1028 | return 0; |
| 1029 | } |
| 1030 | |
| 1031 | static void |
| 1032 | graph_teardown(void) |
nothing calls this directly
no test coverage detected