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 6626841D9E; Tue, 28 Feb 2023 16:01:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56EC74282D; Tue, 28 Feb 2023 16:01:33 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2070.outbound.protection.outlook.com [40.107.243.70]) by mails.dpdk.org (Postfix) with ESMTP id 573E9427EE for ; Tue, 28 Feb 2023 16:01:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T3jdcSmDfr9npwzno7FTbEw/QPByG+aJyWVX20Xcd+7HIJF/VnbB/g/YA0AZfUU3Sl6Xf7fIIIKDuF+xk2hCNsd2bghmQHVio5r5SQ6fz/bI0j8Z6KbXc8EZ5lEpqyuAfJGQ1lcBmsEnUKCPeftIw2yU1IQQySyXLzhJ6F5MnUazKuKRvcBQNtk7JVoBAI/lbgWl/2axsLKTOoUI6WjrRGfDN9b5e/+qAzW/fJz4ngn2gxBx6OgL4TfBy9QOaiMcTuIvLRSVASRh3c7B4xzF5+9VWSmiBnZO86dDEWd+bINNcV5aO5BN7YV2ggKhlVJLDQ0sH7Q7KJdcR9TP12jYSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dRvAhAWjY8lO5dQLsxM/WUc9gMlxzvl880vNLc6kRiA=; b=BVAVSh4iZaaHcj06YTDc2mdghdEpTGHwt93pn67yz433r//CgDwE11I9D3s9h+wnTyhveYUwamPVVU+/66suvqm2XYE9iLyg8BEx1fMU3qRYHv3kHd5mwBHCo6ZUjaH8SJ1tBDllLeguzsXtVOvtPNCGc/sDJe515dMyLPC4s07KnJ/FcjbK1Wm9vBhrePdaqsd/y11UJDc2huB0YmZayu8pNbBePvTcdo56kV11+tefDQKlnKF0y8TlvQYx037h/Wre9CkXT6eq5uH/BCKowgZaeyUoG/Lt8vqYaK+cHclm+i4TW4VmZk1vvKN9i0YYyTCpIicBS4/W0HpY4F/hhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dRvAhAWjY8lO5dQLsxM/WUc9gMlxzvl880vNLc6kRiA=; b=0jf1pCtD6zPYftj2rOf+rMiIhNyHmqaxd3pv1paAus849xJi9WM5zxHg4dKUW7z2E5nBdlCeEuyDiygH++e72wHh9mseBGjrfYm87Ce3gDLqLT+sxyReh+KSUWrXSdTIS7UmqntN8TJ+JiEcxycLyUNaRmegtVdAwxRFvmFOa38= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN2PR12MB4301.namprd12.prod.outlook.com (2603:10b6:208:1d4::22) by DM6PR12MB5519.namprd12.prod.outlook.com (2603:10b6:5:1b5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.30; Tue, 28 Feb 2023 15:01:29 +0000 Received: from MN2PR12MB4301.namprd12.prod.outlook.com ([fe80::80ae:e5ed:4fa7:2ad7]) by MN2PR12MB4301.namprd12.prod.outlook.com ([fe80::80ae:e5ed:4fa7:2ad7%9]) with mapi id 15.20.6134.030; Tue, 28 Feb 2023 15:01:29 +0000 Message-ID: <31803b20-1c59-e567-029b-a0ff4a2a2008@amd.com> Date: Tue, 28 Feb 2023 15:01:24 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v1 2/2] ethdev: pass structure pointer Content-Language: en-US To: Ankur Dwivedi , dev@dpdk.org Cc: jerinj@marvell.com References: <20230223123029.2117781-1-adwivedi@marvell.com> <20230223123029.2117781-3-adwivedi@marvell.com> From: Ferruh Yigit In-Reply-To: <20230223123029.2117781-3-adwivedi@marvell.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0096.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:191::11) To MN2PR12MB4301.namprd12.prod.outlook.com (2603:10b6:208:1d4::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4301:EE_|DM6PR12MB5519:EE_ X-MS-Office365-Filtering-Correlation-Id: 01e6ab58-99a6-4b8b-f967-08db199cabac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vhsT2l39FSCk7zgeCHL483ucF4fL9IFIaPhAofRVccJigtqr55DipsYPF4D9k6qc5Bkfpw1sTtbzIPBsQ1iP+QKDtsRI9AZl4YE2tr0iot420TNRokt8A6K3Z65a1jABjgR+SpWH8w+cs2SdZYzRw/8rOjT7M1jZlc34OVnYoSi/eJlbQfZQZOX5FN+BWtP439YsplKHWnpyrMbgdcY6UXJzknRSAKVADY/P33UFjL++QufeVQP6TMHjLUzn6+3uS1rBar9NJxkYr42BUkZh6NC3qgY+bMWTmLwL0Xu38TPSO8zf5rOT6wVdrla5nf+boNpAL+Xn8ltkPaRbKJIskSs8XNTq55izEhDG6PWz5CGe2EPEisavbPL1XKnLVVWcMEVy5xMQ6VY3n7mXhgEy3isUF5aQpgO+l+BUYaqzyz8Az0YLoDbDyyKMMuaEIA3cqh3eJ9XAE5RFozI6vOG7cRUNWecAEmwHEvHvN9Ute8iYX2qtb+ZZs2IJ/VTPk2eV9MfEuDpk8BkTX2GsjmGzj8l6nVfh5sg+fLvIpJx3fELGfm9vVOcqK5L+SiOUIz19TwXC+r2uJKNSh4IMbZTXMQPgdHXVDh4aDhuEvVIeVPIzMbziNZ2cqZabCQihn8Sn5B85JQBWcxiUtVM2mU3+aEq+L/DNwsrS1EX1N+b2wDbnYm1WCNL1rzTkA1GB967DP9cbJP5KBHQtNi5pWPZgkLboIskywA46yqYLEhkt22w= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB4301.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(366004)(376002)(346002)(136003)(39860400002)(396003)(451199018)(38100700002)(36756003)(86362001)(44832011)(2906002)(31696002)(66946007)(66556008)(66476007)(41300700001)(8676002)(4326008)(5660300002)(8936002)(2616005)(53546011)(6512007)(6506007)(26005)(186003)(83380400001)(478600001)(316002)(6666004)(6486002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?K0hrTkFsb3BmOWtxNVNxNWZvU3hwcHNudkgwTHVPSlBMKzJHMjhzTjg0bDdX?= =?utf-8?B?MmkzZVh1cFZpbWhaUG9MNWlLSjNZT3JZRzhwZ0lzbnJvYktrcFFCbXJadjNR?= =?utf-8?B?M0MxTVYyeHZWU05RbHNmSWN5akpLOU9NMjJOVmRDaTF0bFV6UGQ5L3hXbXlF?= =?utf-8?B?ekJUaSt4RXU4cFJDODJZUGQxTFN3elpiV1RjTERNdG8yMjFVcGdGdTBNSytD?= =?utf-8?B?eWlub2NuRklOUkYrZEdoZDAxY2xvNDJsaEZ1SE5JL3pUNlk0RUl5cTNEY3hi?= =?utf-8?B?OWpZQUtIVVZJUWRP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?Q?IXJKqdaaeR/rVi+oFW9/7lL/H?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01e6ab58-99a6-4b8b-f967-08db199cabac X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4301.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2023 15:01:29.2170 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: krMHpQGXyP+1ZxV+frmisFdaShn/OkUpcYBBMOlUly8Yr5mdZksxD3Dtt83iRl/P X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5519 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 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 > --- > 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