diff options
| author | 童宗振 <[email protected]> | 2024-02-28 13:54:01 +0000 |
|---|---|---|
| committer | 童宗振 <[email protected]> | 2024-02-28 13:54:01 +0000 |
| commit | 5bedad46cda4df8b5c1fe01e28c07732ae7b1b99 (patch) | |
| tree | 0ccf3089acbe205cf6fd5b374a27548a72e1b8b8 /service/src/node.c | |
| parent | 6a8a4fe6a4e28b134696028222d789059a010548 (diff) | |
Basic API implementation for recording trace
Diffstat (limited to 'service/src/node.c')
| -rw-r--r-- | service/src/node.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/service/src/node.c b/service/src/node.c index 2448373..b1833ff 100644 --- a/service/src/node.c +++ b/service/src/node.c @@ -21,6 +21,9 @@ #include <common.h> #include <sc_common.h> #include <sc_node.h> +#include <sc_node_common.h> + +#include "sc_trace.h" #if 0 static int ethdev_rx_tx_nodes_setup(struct sc_main * sc, struct node_manager_main * ctx) @@ -274,3 +277,20 @@ errout: return RT_ERR; } + +static uint16_t pkt_drop_trap_process(struct rte_graph * graph, struct rte_node * node, void ** objs, uint16_t cnt) +{ + RTE_SET_USED(node); + RTE_SET_USED(graph); + + hook_rte_pktmbuf_free_bulk((struct rte_mbuf **)objs, cnt); + + return cnt; +} + +static struct rte_node_register pkt_drop_trap_node = { + .process = pkt_drop_trap_process, + .name = "pkt_drop_trap", +}; + +RTE_NODE_REGISTER(pkt_drop_trap_node);
\ No newline at end of file |
