From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ECEDA41DC7; Fri, 3 Mar 2023 12:32:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DAFB142BAC; Fri, 3 Mar 2023 12:32:07 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id B289D427EE for ; Fri, 3 Mar 2023 12:32:05 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 323A4E6d013534; Fri, 3 Mar 2023 03:32:03 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=IRN1SSBhzS8hi6WXppJwAPwZp7S84n1aqjbnZaU6FM0=; b=F4XcLB9WDeO+lrYnGY9/7FzS5qB7Hi76HBojMfDUd9x4zpc42zFyxUzyFEt/rI5Wwn0l PJ4b7/0c8aFAkSw58brtCPaEOkLw++nDnlBCHIiSKiL/mLZ1d2CT5lfTMgLbfkXswLA7 UmyiTvQPJd5ggyzFTrB5pvbDaMzaLnqa/X2sT3k/D/85sshkoDMsQye1Mt6hLKqM/E/J VNNPcKv7Rqdt2yIDMvfgfvnZ6YWT18i2dP5r0/4+YWPX/ztCcDnCQpSguJ8Xss6M5GyO ouM9Mmb9O4fvB2waEHs/v6A92UTJSChQ5/GQ9iMfPSpMUHdbmtlDMAZfXXlw3ISnAqGO 0w== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3p2vg53udc-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 03 Mar 2023 03:32:03 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 3 Mar 2023 03:32:01 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Fri, 3 Mar 2023 03:32:01 -0800 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id 3FF893F7048; Fri, 3 Mar 2023 03:31:59 -0800 (PST) From: Ankur Dwivedi To: CC: , , , , , , , Ankur Dwivedi Subject: [PATCH v2 2/2] ethdev: pass structure pointer Date: Fri, 3 Mar 2023 17:01:37 +0530 Message-ID: <20230303113137.2745570-3-adwivedi@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230303113137.2745570-1-adwivedi@marvell.com> References: <20230223123029.2117781-1-adwivedi@marvell.com> <20230303113137.2745570-1-adwivedi@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 32UOKYCZfA15CvoJa3Om3l-A1bY2uJTm X-Proofpoint-GUID: 32UOKYCZfA15CvoJa3Om3l-A1bY2uJTm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-03_01,2023-03-03_01,2023-02-09_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Acked-by: Ferruh Yigit --- 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