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 F319BA0C43; Thu, 23 Sep 2021 07:51:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79518410DC; Thu, 23 Sep 2021 07:51:29 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 66D0D410D7 for ; Thu, 23 Sep 2021 07:51:27 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10115"; a="309326553" X-IronPort-AV: E=Sophos;i="5.85,316,1624345200"; d="scan'208";a="309326553" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2021 22:51:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,316,1624345200"; d="scan'208";a="475386179" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga007.fm.intel.com with ESMTP; 22 Sep 2021 22:51:25 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 22 Sep 2021 22:51:24 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 22 Sep 2021 22:51:24 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 22 Sep 2021 22:51:24 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.48) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 22 Sep 2021 22:51:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nPsFos6F8G7bdB6sq29Hhfe/VasRjfAIgb8a4mpLWulzFjPPt4gNerPqWgOd8jLg2gPEY70Ev5amq4EbVlCSpHhdjk3nVOfFNJvGmGgc4J+vm1lc9GBZMPxvU1K+OW8mM3Qe1f1Q3a1I8vwKyX++en1q494swc+RmBsBdE+WVpv7jQswLBakHk+1PzPLxGNy47hdHPVSyNP7K/33d42fExJmSdq6zlPf+8i8tnywdpImgPKgWgxJBlpvx+Cx+aGv4qxDM/tGq55Io5KAW07AbKvjy43DLiQV5BYWS+18DRglglv3yYynHIicYuA5qK1GMiLsTSmDAPkHQN/Ql+H3yw== 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; bh=eiRYgJfb1OPsgwuDoPzSDyx64q0GPwvVAIoG6vl5MeM=; b=npujdH4Y51HRBTBLsNGQzasf02J1UqWpiF4mQzsynaWcUKuc8j2x9lRnnfYktWAFV08pxMxcRwT9kuKGrSIz5Cp7SPDadJVIUSTaUg5zEh9mVu0BuLNBgR0S1SsPpEC73VYy+ZzRKOXUs//TKxL1+SpVlsJfzxZdDVIYAixpymoiCFj2Aaw+sGumnIUY3k5rOYlbABMz5d2mimvZSlW0geNcYoRVd6z5Pt13bVUp4LFgcikKMjQAZBQOVfISLRv+Td25iYoBEph/MDJGLUC3WBaFATHnO35Lc7GFYvB/IZFXL4ym8f4d/7LJcgY2HxwfoyipHVS8adMFwy2QBMoiaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eiRYgJfb1OPsgwuDoPzSDyx64q0GPwvVAIoG6vl5MeM=; b=p33KobCsnrVNN8yUrIGhim9KHW7LovaLJsbi5EsnFKwjRMdSokfugPINyO2srN6nftqGzm5TcT6WfBefgzLGAN4juj6fg6XjdK6rXNuu3l9w3rAgc2MzeZ/zdQ2hVAdwyy+TdlvqciBR5BOG2/fOjW44R4/4JpwehZEi9T67ZMA= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN8PR11MB3796.namprd11.prod.outlook.com (2603:10b6:408:90::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Thu, 23 Sep 2021 05:51:18 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::a437:5cee:7df:1fa7]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::a437:5cee:7df:1fa7%3]) with mapi id 15.20.4544.014; Thu, 23 Sep 2021 05:51:18 +0000 From: "Wang, Haiyue" To: "Ananyev, Konstantin" , "dev@dpdk.org" CC: "Li, Xiaoyun" , "anoobj@marvell.com" , "jerinj@marvell.com" , "ndabilpuram@marvell.com" , "adwivedi@marvell.com" , "shepard.siegel@atomicrules.com" , "ed.czeck@atomicrules.com" , "john.miller@atomicrules.com" , "irusskikh@marvell.com" , "ajit.khaparde@broadcom.com" , "somnath.kotur@broadcom.com" , "rahul.lakkireddy@chelsio.com" , "hemant.agrawal@nxp.com" , "sachin.saxena@oss.nxp.com" , "Daley, John" , "hyonkim@cisco.com" , "Zhang, Qi Z" , "Wang, Xiao W" , "humin29@huawei.com" , "yisen.zhuang@huawei.com" , "oulijun@huawei.com" , "Xing, Beilei" , "Wu, Jingjing" , "Yang, Qiming" , "matan@nvidia.com" , "viacheslavo@nvidia.com" , "sthemmin@microsoft.com" , "longli@microsoft.com" , "heinrich.kuhn@corigine.com" , "kirankumark@marvell.com" , "andrew.rybchenko@oktetlabs.ru" , "mczekaj@marvell.com" , "jiawenwu@trustnetic.com" , "jianwang@trustnetic.com" , "maxime.coquelin@redhat.com" , "Xia, Chenbo" , "thomas@monjalon.net" , "Yigit, Ferruh" , "mdr@ashroe.eu" , "Jayatheerthan, Jay" Thread-Topic: [RFC v2 2/5] ethdev: change input parameters for rx_queue_count Thread-Index: AQHXr7u+aTP0o0AtaE+oC+wGi8awIKuxHgWg Date: Thu, 23 Sep 2021 05:51:18 +0000 Message-ID: References: <20210820162834.12544-1-konstantin.ananyev@intel.com> <20210922140953.19388-1-konstantin.ananyev@intel.com> <20210922140953.19388-3-konstantin.ananyev@intel.com> In-Reply-To: <20210922140953.19388-3-konstantin.ananyev@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5ceda4bb-c5d2-48ff-8b0d-08d97e562a04 x-ms-traffictypediagnostic: BN8PR11MB3796: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iwf9xZmqhAMl4GIw/K/3aUEitvKslM7jbj+sVdm3mMF5EtQ1PclFNVtAAawujGAnUMLO52L005shoqk8NnH6+8i+aNe6DDi2U+xxjqlN9BNaTKHADe5cazU0AjjcF5+xXrYM2Z0T73jG1NnZsjNO/8ZfK9fCEFUUmPap1mP+wSXKhNpfGxoyscvuVqBysUvqQZ900+6d5vWICw9wZOxDU3j7g6sS+5wx95fufOL0KVFvwH0moOexcFBNFOCiCYlRAYhDwywOSvNb93qB2+fPht3uuhLca/EWjLRfsDfb31xLPwxvFm4POIpkj4tsTmL9DJQfXEVNMAlQzqvStmED4tJmSfE03VTQ3M3yD73HO8j+vNZDg3jNjL/7K+IY2zgQoiXTrHGQXKieQOUJ1bZ2+FfmEbRcoI4qaBwmMqetAcDT5860OGs1xmcbZzIGyNXI2beDMhIF9IPa/+Ke76JLd5to+EL5cz86CExAtmqtToR33F83XrXfrACy3s5gzSKeMIgVu2cJB6vgEc6QxiYIGYfPPKNGZhwcEDmEoR9rLFquQ2rUV1WQD/fvq1KbcM9BD66VZheNKbqcKwGvpOzknVpOK7X3sd/HQa1UCNo82ZcaUOndNQBssI/ZJNFmfel2B2iwaGu6iEAbdJTZ/5MIqdOmCRsHPRJBvWBAAq3LLkv9om7mLx/mskCtdYO5yuucqum6Yd4mLiUytRRHlopZ0Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(71200400001)(66556008)(66446008)(64756008)(66476007)(7406005)(7416002)(38100700002)(66946007)(186003)(76116006)(316002)(9686003)(110136005)(38070700005)(107886003)(86362001)(55016002)(8936002)(2906002)(508600001)(26005)(8676002)(45080400002)(7696005)(52536014)(53546011)(4326008)(6506007)(54906003)(83380400001)(5660300002)(122000001)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?W7Q7P5nZ+9aF5Qj0266FAmG5PX16oi02AUrCKoTX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uRCl6QrcAm4iOo/1Uz/Oi+UBkIcknVOOIKa9ZdcVX8Ky4/U2Y?= =?us-ascii?Q?XaNUbnYaaOaDcKQKdx4wCEcQvySwfu5hAH5OJIVqFXfQbeIAGxgt2oC6jP4w?= =?us-ascii?Q?Zo/jqqSkz6JTSm2VkHNuhpxMHR7rWIcMkllTQI2x1ZV9LZ+xt/apfDlfdUl/?= =?us-ascii?Q?MF6f7KgTiaSfyp4gMI03PDfcdgmVoSaqG0cOxiE1qaeGTepO0DG6NlBpc4Nj?= =?us-ascii?Q?XpbtzBJWeR2iIYB815BDrcwnvhU41WOONCjfpP2zDEjx0An2GUNYnG8korO1?= =?us-ascii?Q?GZfV8E5c/N7N26RmVzU/CuKFixbY+C6gL9K949FmoOJaTWC2GlneKrEhrZcP?= =?us-ascii?Q?5Y1F+D9q0F81ci0UE2wg0pJZ236J+JjVmj6ODlKSbH07jMNC0vUOoa/+hi1X?= =?us-ascii?Q?3EeXmGL+0nfx2BH5OBfJ7dFb?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ceda4bb-c5d2-48ff-8b0d-08d97e562a04 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Sep 2021 05:51:18.4395 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: mldLjJ5qTxZdw3Y/7QXOUAlIM/4f5fDKV8el/NZMC/Z+8xj+WRobGxEBNL8MXk4wzYIqkOKzsarLbHfvNbgKNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3796 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [RFC v2 2/5] ethdev: change input parameters for rx_queue_count 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 Sender: "dev" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Wednesday, September 22, 2021 22:10 > To: dev@dpdk.org > Cc: Li, Xiaoyun ; anoobj@marvell.com; jerinj@marvel= l.com; > ndabilpuram@marvell.com; adwivedi@marvell.com; shepard.siegel@atomicrules= .com; > ed.czeck@atomicrules.com; john.miller@atomicrules.com; irusskikh@marvell.= com; > ajit.khaparde@broadcom.com; somnath.kotur@broadcom.com; rahul.lakkireddy@= chelsio.com; > hemant.agrawal@nxp.com; sachin.saxena@oss.nxp.com; Wang, Haiyue ; Daley, John > ; hyonkim@cisco.com; Zhang, Qi Z ; Wang, Xiao W > ; humin29@huawei.com; yisen.zhuang@huawei.com; oul= ijun@huawei.com; Xing, Beilei > ; Wu, Jingjing ; Yang, Qimi= ng ; > matan@nvidia.com; viacheslavo@nvidia.com; sthemmin@microsoft.com; longli@= microsoft.com; > heinrich.kuhn@corigine.com; kirankumark@marvell.com; andrew.rybchenko@okt= etlabs.ru; > mczekaj@marvell.com; jiawenwu@trustnetic.com; jianwang@trustnetic.com; ma= xime.coquelin@redhat.com; Xia, > Chenbo ; thomas@monjalon.net; Yigit, Ferruh ; > mdr@ashroe.eu; Jayatheerthan, Jay ; Ananyev,= Konstantin > > Subject: [RFC v2 2/5] ethdev: change input parameters for rx_queue_count >=20 > Currently majority of 'fast' ethdev ops take pointers to internal > queue data structures as an input parameter. > While eth_rx_queue_count() takes a pointer to rte_eth_dev and queue > index. > For future work to hide rte_eth_devices[] and friends it would be > plausible to unify parameters list of all 'fast' ethdev ops. > This patch changes eth_rx_queue_count() to accept pointer to internal > queue data as input parameter. > This is an API and ABI breakage. >=20 > Signed-off-by: Konstantin Ananyev > --- > drivers/net/ark/ark_ethdev_rx.c | 4 ++-- > drivers/net/ark/ark_ethdev_rx.h | 3 +-- > drivers/net/atlantic/atl_ethdev.h | 2 +- > drivers/net/atlantic/atl_rxtx.c | 9 ++------- > drivers/net/bnxt/bnxt_ethdev.c | 8 +++++--- > drivers/net/dpaa/dpaa_ethdev.c | 9 ++++----- > drivers/net/dpaa2/dpaa2_ethdev.c | 9 ++++----- > drivers/net/e1000/e1000_ethdev.h | 6 ++---- > drivers/net/e1000/em_rxtx.c | 4 ++-- > drivers/net/e1000/igb_rxtx.c | 4 ++-- > drivers/net/enic/enic_ethdev.c | 12 ++++++------ > drivers/net/fm10k/fm10k.h | 2 +- > drivers/net/fm10k/fm10k_rxtx.c | 4 ++-- > drivers/net/hns3/hns3_rxtx.c | 7 +++++-- > drivers/net/hns3/hns3_rxtx.h | 2 +- > drivers/net/i40e/i40e_rxtx.c | 4 ++-- > drivers/net/i40e/i40e_rxtx.h | 3 +-- > drivers/net/iavf/iavf_rxtx.c | 4 ++-- > drivers/net/iavf/iavf_rxtx.h | 2 +- > drivers/net/ice/ice_rxtx.c | 4 ++-- > drivers/net/ice/ice_rxtx.h | 2 +- > drivers/net/igc/igc_txrx.c | 5 ++--- > drivers/net/igc/igc_txrx.h | 3 +-- > drivers/net/ixgbe/ixgbe_ethdev.h | 3 +-- > drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++-- > drivers/net/mlx5/mlx5_rx.c | 26 ++++++++++++------------- > drivers/net/mlx5/mlx5_rx.h | 2 +- > drivers/net/netvsc/hn_rxtx.c | 4 ++-- > drivers/net/netvsc/hn_var.h | 2 +- > drivers/net/nfp/nfp_rxtx.c | 4 ++-- > drivers/net/nfp/nfp_rxtx.h | 3 +-- > drivers/net/octeontx2/otx2_ethdev.h | 2 +- > drivers/net/octeontx2/otx2_ethdev_ops.c | 8 ++++---- > drivers/net/sfc/sfc_ethdev.c | 12 ++++++------ > drivers/net/thunderx/nicvf_ethdev.c | 3 +-- > drivers/net/thunderx/nicvf_rxtx.c | 4 ++-- > drivers/net/thunderx/nicvf_rxtx.h | 2 +- > drivers/net/txgbe/txgbe_ethdev.h | 3 +-- > drivers/net/txgbe/txgbe_rxtx.c | 4 ++-- > drivers/net/vhost/rte_eth_vhost.c | 4 ++-- > lib/ethdev/rte_ethdev.h | 2 +- > lib/ethdev/rte_ethdev_core.h | 3 +-- > 42 files changed, 97 insertions(+), 110 deletions(-) >=20 > diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev= _rx.c > index d255f0177b..98658ce621 100644 > --- a/drivers/net/ark/ark_ethdev_rx.c > +++ b/drivers/net/ark/ark_ethdev_rx.c > @@ -388,11 +388,11 @@ eth_ark_rx_queue_drain(struct ark_rx_queue *queue) > } >=20 > uint32_t > -eth_ark_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t queue_id) > +eth_ark_dev_rx_queue_count(void *rx_queue) > { > struct ark_rx_queue *queue; Just change it to be one line : " struct ark_rx_queue *queue =3D rx_queue;"= ? >=20 > - queue =3D dev->data->rx_queues[queue_id]; > + queue =3D rx_queue; > return (queue->prod_index - queue->cons_index); /* mod arith */ > } > -- > 2.26.3