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 317D641D3D; Thu, 2 Mar 2023 10:30:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F6DF40E09; Thu, 2 Mar 2023 10:30:18 +0100 (CET) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2067.outbound.protection.outlook.com [40.107.100.67]) by mails.dpdk.org (Postfix) with ESMTP id 662E540DFB for ; Thu, 2 Mar 2023 10:30:16 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RNQ8vywWaFqYSXBk7Wx+GkskPZWJXXdm0WXbDJTsPrRhApWFBTVTvxCcQI8UChg3FWseWIzvJ+ONXJqZHKz+TmF9W1zSAd1khnizCEvBMyv9x7kV+WKynGmlXMoaq2hdoOw0NuXR+UFhXC8ClirAzqbt8Q60e1hZs0373mVrRSmCQFxtN91tmNoCiOG79NMD172ArC+0mg64VTRoDmEXYwhlbMLHY3V1qciD1mhqwe1Q+7eOyCVDpZusnC6j2waZk7Lc7K/T4L+yEqpRANioNFf7+kKTWpUA/zT/FrgTcKZrReU0CTVU1NgcvIu7noyYq3NNFdc2L5vSXew/Z9fvVQ== 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=TwQ+gAAUrsogZp9kGqOKFlNGpmdIgTcawjWkvTNFytE=; b=Lh9Enrn1edd0YCzZGGIno1g7toYQyPhCmKPuNBYwTRa0Glcxwz/agYy3yJLygYkr1qQe2Fix+8wWV34Z06WDFRxfuik4X7hFmKPEzdsMpaZRiiUJX/Kx65RMIlTAfa1nkKoDWw5E66ux55MGo/gye5TPI7CJv7eiZ1A0a+EGpW+wLE6BPqo1e90Uhi9wjDv20C3SI5cMyP05CLEuikDYRrGPe0BS1Cay3K/b+g554svAFyf+K+OyskXgMbTpw8bptfZ/3wg53RvSW7VQKuoehR38walSB5ahzYIzOPr8ufApcXv8+nP6t2Oizk4/WQMFa/3JwEE/iwc65HgXPVIfaw== 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=TwQ+gAAUrsogZp9kGqOKFlNGpmdIgTcawjWkvTNFytE=; b=dBnCO3WUTq81pFqUyhlPUOsB6ocGhfxWKk4gmb8SfSdaeUF1GndmH3bqc4HossjgFK4UBnMxFP69sem8NbvQQm4EzoYktCA1byxhUzM33IV8amKQ3wJbtWPDbHqnyxLchU29H9uTj/9wnLuErHmoMg4MqbhSkItx1akqVFBZnsM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SN7PR12MB6932.namprd12.prod.outlook.com (2603:10b6:806:260::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.18; Thu, 2 Mar 2023 09:30:14 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%4]) with mapi id 15.20.6156.017; Thu, 2 Mar 2023 09:30:14 +0000 Message-ID: Date: Thu, 2 Mar 2023 09:30:08 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v8 21/21] net/cpfl: add xstats ops Content-Language: en-US To: Mingxia Liu , dev@dpdk.org, beilei.xing@intel.com, yuying.zhang@intel.com References: <20230216003010.3439881-1-mingxia.liu@intel.com> <20230302103527.931071-1-mingxia.liu@intel.com> <20230302103527.931071-22-mingxia.liu@intel.com> From: Ferruh Yigit In-Reply-To: <20230302103527.931071-22-mingxia.liu@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0197.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a4::22) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SN7PR12MB6932:EE_ X-MS-Office365-Filtering-Correlation-Id: 51e78584-06e9-40cd-2b94-08db1b00ba4b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gAssgaVXXJEYivPAcTIasO35FDzRj0XgiAB54UA2aJNcGZ6nfB+K0L59DRH5eAodb6DxbPp3FESSFvemW80902ROW+cQU59CnKPxulMQlJS9QGn1EdJu2MDetXZilO1VUfb9ygNBsuBJTxa7wA6kxxrPO2j0+st226Z79gWNW69OYxOlvV0Lo8uhZnGcq7Ewo0/yF4GQXyvcllUrNAXxqepcg7xf8SYYQ9PwATns/j/PfelshOg1CgkFLbhAlZC6ZvH0OE2CQAvi14xvetfLn2twblSfqxVUaEYfhUXTUCLYKrRvtARzkBb8oo7Lln1NpWKPHYngQGBfZrZnbH80GPhVXSkpGLz+S5yfa56O3Fl3YyA5sCk5NiJe66bWPU4c65MiBxyR+JYpjRgVtp9sbERpi/SxB94EGRXBb1deL48uere7REgeXaB7HKpO4djfBVesglf7JS9CJJORiuR28+DgqY8fNPw+3s+rXzAwpC24T3a31tY6t/mENFmBVYVOCB3kdzdFQ9CbYvr2My9FV0U1dFPByRXYnaao2iaz8U/4kT1Dksk8wX5IFUuxNYImriA5bncREnQy/+Y/Nuc9ZjQTbz9/dpfafcfYLOBQlSowbTcV8Z6m13rCdwTGQS1v0og3wk+i6nk8KDfYb6ZoAodOHs9pHCBVFeBXdtMDDwmUTjUnIED9LKLpBPd/vN4kP/GTST6b+DJ8iWEvk/4JNL+qy5crvjLyK9qD2riOYVk= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(136003)(366004)(376002)(396003)(346002)(39860400002)(451199018)(66556008)(316002)(31686004)(2906002)(44832011)(5660300002)(4744005)(8936002)(36756003)(86362001)(31696002)(6512007)(8676002)(53546011)(66476007)(26005)(66946007)(186003)(6506007)(38100700002)(41300700001)(6666004)(83380400001)(2616005)(6486002)(478600001)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QUxmY2xuMmdzNUphdVJ1bDdTWTU1czVnZ3I4ZFgrWnh1ZWdUUjlxSUxwTU5L?= =?utf-8?B?clFwYzVJdXZjQjcwTGMvWitFd3ZyTlhyd3BkRFc3SllqS0VzdUhnUDJVK3Ew?= =?utf-8?B?ZngzWEhqSllrUzVGYWQzSm84Qi9ZbEovRTQwTGpIK0cvR3ZnejZlNzRuM2o4?= =?utf-8?B?Q0pXNWpQZ1RXNURKb0IvamViUTl4ODVtZSt4ekNIT0NiRkxubTVBSndiM1FV?= =?utf-8?B?SDB1dmNCNWF4bjVqM2xzRlZuTUVZQlF4L3lnbmtwVytZLzd6NTN1MnlIRTJ3?= =?utf-8?B?TFZQa0tsSkNEbmkzMW1hNE5XQ2FwZGVmQ3VLY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+IDGGtOQuvK4Th+kiyNZHF4?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51e78584-06e9-40cd-2b94-08db1b00ba4b X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2023 09:30:14.4527 (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: +Y2Gb8iImsBM6DcvaUB4WOhqKMS0104RrUbY0vA+fs6NVx/p1a6KNnJPulxWyhny X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6932 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 3/2/2023 10:35 AM, Mingxia Liu wrote: > Add support for these device ops: > - dev_xstats_get > - dev_xstats_get_names > - dev_xstats_reset > > Signed-off-by: Mingxia Liu <...> > +static int cpfl_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, > + struct rte_eth_xstat_name *xstats_names, > + __rte_unused unsigned int limit) > +{ > + unsigned int i; > + > + if (xstats_names) > + for (i = 0; i < CPFL_NB_XSTATS; i++) { > + snprintf(xstats_names[i].name, > + sizeof(xstats_names[i].name), > + "%s", rte_cpfl_stats_strings[i].name); > + } Although above is correct, can you please add {}, it is safer to do it for multi line blocks.