The rte_eth_xstat_name structure is of size 64 bytes. Instead of passing the structure as value it is passed as a pointer, to avoid copy of 64 bytes in function call stack.
Signed-off-by: Ankur Dwivedi <adwiv...@marvell.com> Acked-by: Ferruh Yigit <ferruh.yi...@amd.com> --- lib/ethdev/ethdev_trace.h | 4 ++-- lib/ethdev/rte_ethdev.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ethdev/ethdev_trace.h b/lib/ethdev/ethdev_trace.h index bfcb024ac1..c57ed08d36 100644 --- a/lib/ethdev/ethdev_trace.h +++ b/lib/ethdev/ethdev_trace.h @@ -513,11 +513,11 @@ RTE_TRACE_POINT( RTE_TRACE_POINT( rte_eth_trace_xstats_get_names, RTE_TRACE_POINT_ARGS(uint16_t port_id, int i, - struct rte_eth_xstat_name xstats_names, + const struct rte_eth_xstat_name *xstats_names, unsigned int size, int cnt_used_entries), rte_trace_point_emit_u16(port_id); rte_trace_point_emit_int(i); - rte_trace_point_emit_string(xstats_names.name); + rte_trace_point_emit_string(xstats_names->name); rte_trace_point_emit_u32(size); rte_trace_point_emit_int(cnt_used_entries); ) diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index 0266cc82ac..3b07e6feb8 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -3260,7 +3260,7 @@ rte_eth_xstats_get_names(uint16_t port_id, } for (i = 0; i < cnt_used_entries; i++) - rte_eth_trace_xstats_get_names(port_id, i, xstats_names[i], + rte_eth_trace_xstats_get_names(port_id, i, &xstats_names[i], size, cnt_used_entries); return cnt_used_entries; -- 2.25.1