| 12 | static struct ethdev_tx_node_main ethdev_tx_main; |
| 13 | |
| 14 | static uint16_t |
| 15 | ethdev_tx_node_process(struct rte_graph *graph, struct rte_node *node, |
| 16 | void **objs, uint16_t nb_objs) |
| 17 | { |
| 18 | ethdev_tx_node_ctx_t *ctx = (ethdev_tx_node_ctx_t *)node->ctx; |
| 19 | uint16_t port, queue; |
| 20 | uint16_t count; |
| 21 | |
| 22 | /* Get Tx port id */ |
| 23 | port = ctx->port; |
| 24 | queue = ctx->queue; |
| 25 | |
| 26 | count = rte_eth_tx_burst(port, queue, (struct rte_mbuf **)objs, |
| 27 | nb_objs); |
| 28 | |
| 29 | /* Redirect unsent pkts to drop node */ |
| 30 | if (count != nb_objs) { |
| 31 | rte_node_enqueue(graph, node, ETHDEV_TX_NEXT_PKT_DROP, |
| 32 | &objs[count], nb_objs - count); |
| 33 | } |
| 34 | |
| 35 | return count; |
| 36 | } |
| 37 | |
| 38 | static int |
| 39 | ethdev_tx_node_init(const struct rte_graph *graph, struct rte_node *node) |
nothing calls this directly
no test coverage detected