[PATCH v7 3/3] node: add xstats for ip4 nodes

David Marchand david.marchand at redhat.com
Wed Oct 16 10:39:48 CEST 2024


On Tue, Oct 15, 2024 at 7:43 AM <pbhagavatula at marvell.com> wrote:
@@ -88,4 +90,10 @@ node_mbuf_priv2(struct rte_mbuf *m)
>         return (struct node_mbuf_priv2 *)rte_mbuf_to_priv(m);
>  }
>
> +#define NODE_INCREMENT_XSTAT_ID(node, id, cond, cnt)                                               \
> +       {                                                                                          \
> +               if (unlikely(rte_graph_has_stats_feature() && (cond)))                             \
> +                       ((uint64_t *)RTE_PTR_ADD(node, node->xstat_off))[id] += (cnt);             \
> +       }
> +
>  #endif /* __NODE_PRIVATE_H__ */

Why introduce rte_node_xstat_increment() in patch 1, but not use it here?

I'll merge this as is, but recoding such helper as a macro in node
code is going in a wrong direction.


-- 
David Marchand



More information about the dev mailing list