From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Ankur Dwivedi <adwivedi@marvell.com>, dev@dpdk.org
Cc: jerinj@marvell.com
Subject: Re: [PATCH v1 2/2] ethdev: pass structure pointer
Date: Tue, 28 Feb 2023 15:01:24 +0000 [thread overview]
Message-ID: <31803b20-1c59-e567-029b-a0ff4a2a2008@amd.com> (raw)
In-Reply-To: <20230223123029.2117781-3-adwivedi@marvell.com>
On 2/23/2023 12:30 PM, Ankur Dwivedi wrote:
> 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 <adwivedi@marvell.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 a13e33fe64..7518c902d1 100644
> --- a/lib/ethdev/ethdev_trace.h
> +++ b/lib/ethdev/ethdev_trace.h
> @@ -551,11 +551,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;
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
next prev parent reply other threads:[~2023-02-28 15:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 12:30 [PATCH v1 0/2] bug fix in ethdev trace Ankur Dwivedi
2023-02-23 12:30 ` [PATCH v1 1/2] ethdev: fix null pointer dereference Ankur Dwivedi
2023-02-28 11:04 ` Ferruh Yigit
2023-02-28 11:29 ` David Marchand
2023-02-28 12:46 ` Ferruh Yigit
2023-02-28 13:17 ` Jerin Jacob
2023-02-28 13:39 ` Ferruh Yigit
2023-02-28 15:01 ` Ferruh Yigit
2023-02-28 15:40 ` [EXT] " Ankur Dwivedi
2023-02-28 16:08 ` Ferruh Yigit
2023-02-28 16:27 ` Ferruh Yigit
2023-03-02 9:58 ` Ferruh Yigit
2023-03-02 16:49 ` Ankur Dwivedi
2023-02-23 12:30 ` [PATCH v1 2/2] ethdev: pass structure pointer Ankur Dwivedi
2023-02-28 15:01 ` Ferruh Yigit [this message]
2023-03-03 11:31 ` [PATCH v2 0/2] bug fix in ethdev trace Ankur Dwivedi
2023-03-03 11:31 ` [PATCH v2 1/2] ethdev: fix null pointer dereference Ankur Dwivedi
2023-03-03 13:38 ` Ferruh Yigit
2023-03-03 11:31 ` [PATCH v2 2/2] ethdev: pass structure pointer Ankur Dwivedi
2023-03-03 13:39 ` [PATCH v2 0/2] bug fix in ethdev trace Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=31803b20-1c59-e567-029b-a0ff4a2a2008@amd.com \
--to=ferruh.yigit@amd.com \
--cc=adwivedi@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).