| 81 | } |
| 82 | |
| 83 | static int |
| 84 | kernel_tx_node_init(const struct rte_graph *graph __rte_unused, struct rte_node *node) |
| 85 | { |
| 86 | kernel_tx_node_ctx_t *ctx = (kernel_tx_node_ctx_t *)node->ctx; |
| 87 | |
| 88 | ctx->sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); |
| 89 | if (ctx->sock < 0) |
| 90 | node_err("kernel_tx", "Unable to open RAW socket"); |
| 91 | |
| 92 | return 0; |
| 93 | } |
| 94 | |
| 95 | static void |
| 96 | kernel_tx_node_fini(const struct rte_graph *graph __rte_unused, struct rte_node *node) |