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 0F19CA0C4C; Mon, 4 Oct 2021 10:46:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF91E412EE; Mon, 4 Oct 2021 10:46:38 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 2F1F4412EB for ; Mon, 4 Oct 2021 10:46:37 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10126"; a="225660385" X-IronPort-AV: E=Sophos;i="5.85,345,1624345200"; d="scan'208";a="225660385" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2021 01:46:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,345,1624345200"; d="scan'208";a="712488020" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga005.fm.intel.com with ESMTP; 04 Oct 2021 01:46:26 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 4 Oct 2021 01:46:26 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Mon, 4 Oct 2021 01:46:26 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Mon, 4 Oct 2021 01:46:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MCv4eTBc9B/r9o+JNCSIVLYysUUgfA5l25yWY67I5KLFanqgUbFJTNTfQRYOV/TNNM7yhHSh/iz307Ub2b0A+Pc57/XPf29F4TjKnvvpU+lqp1Q00iGo8O7jQSp782QUbDQIcoLYS6/zI7dzHlh0z593NtiRY+1Q4036nbp77Kb0BGX8WbopayM3vzWnSZFdW68bLpvSzOQTv3i5j6tXFjN3lfwmm0rWXOWuArokI/enJETaSMm29WIDlW0Wop59ZCu8/vkEZUruJA9/strAKGwyQ0VruTJ5mkW6d5Hd1HF+zFprx9z2GvJUNZPludrjsHLy03Z/IXurqSlzSgx3yw== 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=jl9L1pyjVNVwRuoSDAABMtUXTo5b4q1/sP4IqgOHjR8=; b=EHXJuZ8nquQGOiZzdJg6IgTMQFY5l5EkYMc21IxNAalbGWQmRoy2ULGBYU0YH+sltYhfxsyjUvd5Ic9LPjpp2gWTKTGrjdeAvh5MQLGmgHH35WEIz+CQZFibap++E/o/ZlQyyROiqrIfq82L0B4YIjXYA5VolGTTxxFJlYQAG1twT0vp0FbHr2ZPmWcRDUb7WvG2NoH73Nu9G2h7M4BRsATjoqqnGFFqhe56/HE4DdEmLqFeDU6bL4/3CSQEHCuFUlP+RoRw52opelWHFI0HQ/BlB29tAeEVS5Bmec3aUOuCH9ab97mQdOCkldog5rntxMi5rdCTJjjIE7cF+q++SA== 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=jl9L1pyjVNVwRuoSDAABMtUXTo5b4q1/sP4IqgOHjR8=; b=pV++CpSfhpxKv99au8p1XjzY1Ee5fLhB7VsQoLyMerogm1Akbo2NsvX3LNfx7O9Za+fI/xBA3EVdf+NQEpT3KE9QvBWNDIAjXNLbawJDaaTmaKTmwl1wr6tKqQWAYa82FgMZ60j9oh+ieqLgbvcy+E3/pzIZg+PY0vn5AhlkubA= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5160.namprd11.prod.outlook.com (2603:10b6:510:3e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.16; Mon, 4 Oct 2021 08:46:22 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc%4]) with mapi id 15.20.4566.022; Mon, 4 Oct 2021 08:46:22 +0000 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" , "Wang, Haiyue" , "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" , "mdr@ashroe.eu" , "Jayatheerthan, Jay" References: <20210922140953.19388-1-konstantin.ananyev@intel.com> <20211001140255.5726-1-konstantin.ananyev@intel.com> <20211001140255.5726-5-konstantin.ananyev@intel.com> <64dd331c-8f35-38fe-998e-bac70ccc9d85@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <0b5a797e-2055-736f-3a5e-86a1a5cf3ae2@intel.com> Date: Mon, 4 Oct 2021 09:46:10 +0100 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB8P191CA0012.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::22) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB8P191CA0012.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Mon, 4 Oct 2021 08:46:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: efabc858-a995-4091-cd47-08d987137121 X-MS-TrafficTypeDiagnostic: PH0PR11MB5160: 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:2150; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5LP+3c8x+IddsDfZchxeRnE5Wqy+U6eyDMYUuaw8f92X+iLT4eYvC8HN0clKGJFOuXpJ6CZyUApufpYixPL/oIsyeyXsmXjjI+fSBfMDVlz0oFoXrpLP0MDLGbRSi60j74bRNKPbA34mfEaA0FmWJB5tTN70ICafQODzkoIjyhDXl2Dbqqbl0MywXymhpo3+6s9QUYgqb7RoyPQuMR7oj46eoiTfEK/uB2Fc3T/YHrLFBZKvQ2VeVQ8fIbAdTb55grlkSsdWs+YXNQPUIjuH1CBzC2hhIsVqtboyf9Rk5/SoX87qOWb4pJKDYZe39MPTmijc8eVg9ns5XgUch+LrLCWLcaQm2ueiSUHYv8fHWsSFzRCRjfg6Hpd2isntt6VfoYVxUCshB9bBWxNNRYosPsgAe9e3f8KW59cGgA64EtfgJRjvmLMEbHUp/590+rTGkVuqGwpzNIize14BWKmwXsWb2ePwgQpz9PDDXxYbXn2ZrlY8IVBcOt072eR7mKGa1PtFwmV58fCpz8TrSwTa9R9akAfNXoFaicwISniTvTMdtG+NfiWq5aK4gREFYqNL6IACNoy0ZIEcphmQbC8z5D3Ht8BsWan/1Xed6QRNy8dFAX+Oy7qbYNMYccJMaN3usi++TJUew0Ri1YzAds0JQtb+WNDx7kHQAQZVhOScGYI4Q7aDeM34Jp+7pkcva7ofDoYVArznIhP0xDzqBdAKeQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(7416002)(7406005)(26005)(44832011)(16576012)(8676002)(31686004)(186003)(36756003)(86362001)(66946007)(316002)(66476007)(66556008)(110136005)(956004)(6486002)(54906003)(508600001)(107886003)(5660300002)(83380400001)(2616005)(38100700002)(8936002)(31696002)(4326008)(53546011)(6666004)(2906002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aCs2enltcXhTYU1QQWJhTVgvZWs3ZTF6N0xEK0VpK2pGVDNkY0FzNUJGOUtS?= =?utf-8?B?KytYanZoM1R6QlhGU1dLWGJ2V3NSWWJoMHQyYjBIcmFZMGo2aGMyK2daMTVN?= =?utf-8?B?U0RkeWwrOTBwTCtOUkYvYS92OUxKMDlmN3FRUDlXT2svZWUzd1cwLzFGNi9H?= =?utf-8?B?ekNGVW9OaDBIejJFYi9IdDhFYk9xcytUODRRNTluWVZqOXFKbXRMdC9BY0x4?= =?utf-8?B?R0h4NTFVOGpZZWI5djZGcFJhbFArYlRScDVqalovK3RUK3UvVU5BY2dOTGRo?= =?utf-8?B?NjE1WGNITmZCckRieE51eTJ4Q1NEMkZOSitYQndRNHVrTzd2TEZHRDlnYkUy?= =?utf-8?B?clN5K2xSNVJSekdERk1rczhpNDZ0ckpVQkZFWVh4Ri9oT2lSNkFwejFjZ3JC?= =?utf-8?B?eVhxeXdsTUNVYVNwT3VDVUU4ellsK25YOVBhb0Z0d0RZTjJVbEVXVTczQmVl?= =?utf-8?B?SUh6Nm0vNjdzQTUwS010VTlPbTVEZndlaU9ZK284NjBmdExOTmRzWUJkQ3dM?= =?utf-8?B?dmpWZEwvaGxXRnpGUk1CN05PYmlKakFra1hoV0N5L3IyY0tVeTg1N1hvc2sv?= =?utf-8?B?aTE5NUl1N2t4QzJxWjVsQ25pTDYvTkhobEYvWjAxT2VQckZJc1BxNDhxd0ZR?= =?utf-8?B?R3kvclFvNC9BdktPMmlIRmNUd09IbTdUZTVSN2w4Rm5BaElPeWR4blM0Q0Nn?= =?utf-8?B?N0dhSWFMem50TTRSZHlaYTlEYVJldGltbUhRcTVtQks0d0ppODdGbkxxVFU2?= =?utf-8?B?N2lIYWdaR0hiakJDdUZu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BRW9TTEY5V1pxbHNhb1I5RG1oaVdZVFc3Z2FDckUrb0pkMkNoTEdO?= =?utf-8?Q?hpdV/G9J4G2AL5IEWoT4Nlh4GWRzWfC7Y1hTCPa?= X-MS-Exchange-CrossTenant-Network-Message-Id: efabc858-a995-4091-cd47-08d987137121 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2021 08:46:22.3825 (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: B8NiOXZRcy08WuwI5RnWSMdYU3VSdy09yrrPrxoR98Xn5SkCg3CJJOBGaWWzp8xkMMURMMRto7U15DuXyU8boA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5160 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 4/7] ethdev: make burst functions to use new flat array 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" On 10/1/2021 6:40 PM, Ananyev, Konstantin wrote: > > >> On 10/1/2021 3:02 PM, Konstantin Ananyev wrote: >>> Rework 'fast' burst functions to use rte_eth_fp_ops[]. >>> While it is an API/ABI breakage, this change is intended to be >>> transparent for both users (no changes in user app is required) and >>> PMD developers (no changes in PMD is required). >>> One extra thing to note - RX/TX callback invocation will cause extra >>> function call with these changes. That might cause some insignificant >>> slowdown for code-path where RX/TX callbacks are heavily involved. >>> >>> Signed-off-by: Konstantin Ananyev >> >> <...> >> >>> static inline int >>> rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id) >>> { >>> - struct rte_eth_dev *dev; >>> + struct rte_eth_fp_ops *p; >>> + void *qd; >>> + >>> + if (port_id >= RTE_MAX_ETHPORTS || >>> + queue_id >= RTE_MAX_QUEUES_PER_PORT) { >>> + RTE_ETHDEV_LOG(ERR, >>> + "Invalid port_id=%u or queue_id=%u\n", >>> + port_id, queue_id); >>> + return -EINVAL; >>> + } >> >> Should the checkes wrapped with '#ifdef RTE_ETHDEV_DEBUG_RX' like others? > > Original rte_eth_rx_queue_count() always have similar checks enabled, > that's why I also kept them 'always on'. > >> >> <...> >> >>> +++ b/lib/ethdev/version.map >>> @@ -247,11 +247,16 @@ EXPERIMENTAL { >>> rte_mtr_meter_policy_delete; >>> rte_mtr_meter_policy_update; >>> rte_mtr_meter_policy_validate; >>> + >>> + # added in 21.05 >> >> s/21.05/21.11/ >> >>> + __rte_eth_rx_epilog; >>> + __rte_eth_tx_prolog; >> >> These are directly called by application and must be part of ABI, but marked as >> 'internal' and has '__rte' prefix to highligh it, this may be confusing. >> What about making them proper, non-internal, API? > > Hmm not sure what do you suggest here. > We don't want users to call them explicitly. > They are sort of helpers for rte_eth_rx_burst/rte_eth_tx_burst. > So I did what I thought is our usual policy for such semi-internal thigns: > have '@intenal' in comments, but in version.map put them under EXPERIMETAL/global > section. > > What do you think it should be instead? > Make them public API. (Basically just remove '__' prefix and @internal comment). This way application can use them to run custom callback(s) (not only the registered ones), not sure if this can be dangerous though. We need to trace the ABI for these functions, making them public clarifies it. Also comment can be updated to describe intended usage instead of marking them internal, and applications can use these anyway if we mark them internal or not. >>> }; >>> >>> INTERNAL { >>> global: >>> >>> + rte_eth_fp_ops; >> >> This variable is accessed in inline function, so accessed by application, not >> sure if it suits the 'internal' object definition, internal should be only for >> objects accessed by other parts of DPDK. >> I think this can be added to 'DPDK_22'. >> >>> rte_eth_dev_allocate; >>> rte_eth_dev_allocated; >>> rte_eth_dev_attach_secondary; >>> >