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 3F448A0C4C; Mon, 4 Oct 2021 12:13:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 154534130E; Mon, 4 Oct 2021 12:13:31 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 5FFFC41307 for ; Mon, 4 Oct 2021 12:13:29 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10126"; a="311570549" X-IronPort-AV: E=Sophos;i="5.85,345,1624345200"; d="scan'208";a="311570549" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2021 03:13:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,345,1624345200"; d="scan'208";a="622047276" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga001.fm.intel.com with ESMTP; 04 Oct 2021 03:13:27 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 03:13:27 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx609.amr.corp.intel.com (10.18.126.89) 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 03:13:27 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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 03:13:27 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.68) 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 03:13:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RpuefZHYxmHbKe7beLD16gzvHGvw18P/dqcKnByItuxNlR5d4ojoLYD4IyQMjW/KEjhN8uUre8zJYydgfhSnqwq9SVeFrLVkU5106XPNdrLbv7mGvhsQo4p8JFFffwgdzfq7t9+DNnEZRNZgDOxlmGf8YLC/b0sHoBw6/nha2P8T06xDf53nnA5URfBbBECNQ+PLSBA8igTVK4cMeekIlfbcMYJQp8BllI5ksaxLY8X9eigVd7jflTNdWG9+2x206DJvG/wBPki7wtso2eouJsZFLvKM+82PISGHCwalAZEyfOhSbO8D71pn00cqBPNXfTEHo9frIsNzSUel5Dz1DQ== 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=or82EsCGQt7GKGWpRURZUbQ0mSaT0Zu/Rjb0GT955fM=; b=KSkvD1hQWBQmfL15epZoyQXqbKyhiAD7FbOxg/y4UK6TcV7rG0WWgNQDxVPb+cAfwxKNcKUTYOmJyjPDx+7FdgR5aynLaZwEKNeVA5UljNZABD6wA3mS4EgXV0US9Ce8VUmL6yl5yYKbabgx222IaWy9UWql1n1aTjC6rN3rhPw4jWsyYphcfv1C6Kg+KFjNSZGzDjRVhcEHnzn9G9gEfdj9S+zjYcguw3XhNkS5N1zEKsheQD3EN0sIrSxWyOdPng+bKoYhQjhbnuilbRp1z+HZy8moQVIKZnrEPQmMVv0fKkhMKvM8+vuhNwGszexPovhEFVmCy6jPC90gq2GPdQ== 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=or82EsCGQt7GKGWpRURZUbQ0mSaT0Zu/Rjb0GT955fM=; b=CjZCyvC7AAzQxvrT6Oal2JCAGFa/bRxaQZWVsg9ln4h7E7W67QUTIbn4ZAAyd7lQcCZAcVmLLBQHlt/TVziYdzKCD40nWPsyXW2n3tKNQcS297+zxo70Fe4U61u0kOwlnmVEr1udKqNxbVDtPnZ8DBYh9sMLgXz7DnBWYXaLE+g= 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 PH0PR11MB5144.namprd11.prod.outlook.com (2603:10b6:510:3e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14; Mon, 4 Oct 2021 10:13: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 10:13: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> <0b5a797e-2055-736f-3a5e-86a1a5cf3ae2@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Mon, 4 Oct 2021 11:13:09 +0100 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB6PR07CA0203.eurprd07.prod.outlook.com (2603:10a6:6:42::33) 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 DB6PR07CA0203.eurprd07.prod.outlook.com (2603:10a6:6:42::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.11 via Frontend Transport; Mon, 4 Oct 2021 10:13:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dd2bd160-030b-4bd7-a19b-08d9871f987e X-MS-TrafficTypeDiagnostic: PH0PR11MB5144: 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:873; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4AFaHBe5wCDTibbCUMQb/eeBCbBLHbgxIpb4fjmW5k7mbQd4B42HbymnGs4uGRRHz/hz0cYos9PDCpsNDXZijvncuCGbSTrkWo5t8fPBDaj6zQaIke/YwFXG5NNx/qmyv/G2KLTihfnwx6WhOoDC7U/Yk3ThBAOa9gGnUjCFNitS9AkChigVPUQC9YeSiKBB14xs6eFHl9gtYX97mvf5AIbWeWap67vpVPxuYJRXL8bswDr2iWsIYsUiVijXsT4ef8oGH99wr6Oa3dzZeXxH4d8XypS6rJKppTLNehdrV4p3kNJl6R/C2P7gtps4a7pbH5Hnv4E/tCaefa3QteonVEln5feYVmRGDwYB6JHS+GzoCxhV+kEyypKlZKkdZGeg6PWwx9pamfMH7hFaq6wZcKZ/Qd/N6lHhwbdr1M/Ew23Av5BfrOGoUmUK4nlXTxEDPLcD8+nkjsYy6p++LMmmimkt89dZbnyUrb+29Ev1BG1MvCps+GPBbmj6m02gbnbN3Bbl2a7Abn2W2znF46hLgO/k8IeBaFQloEkzduMkBaKnmjBcXteeB7xNlM7I29sHCjX6kMzOOXE6dEu/z5gVqE3fXrGcn5YqB5X5lfLCqXwkZJE32mBDwLwYScDmG3TWwb4yfI88k7+H7L2EkN+E8AJlRT5AxIHFLeRiBSsEk36sZzHGcWaO/fpIcdAY9n8TPSXltuPOBL0b8+QNtwGVVw== 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)(86362001)(31686004)(7406005)(107886003)(4326008)(26005)(66476007)(5660300002)(7416002)(36756003)(186003)(66946007)(66556008)(44832011)(53546011)(508600001)(2906002)(6666004)(31696002)(16576012)(6486002)(2616005)(956004)(316002)(8676002)(54906003)(110136005)(8936002)(83380400001)(38100700002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aWd1QzJTTDhPaml1SUxJd1Y2TEkxZlA5aWVlQ1BSTU81ZHQrV2Fva0hlQ1Ja?= =?utf-8?B?TGhKeFBMaWhwdDlSQlUrUGZqYWZGcnJETjlLMnh0TkRMV0s3NklVSkZucmhJ?= =?utf-8?B?a0tJMURtNks1K3RFZ01LWE44TmRLMWxuMDNvQzU3YTdjZzRQTTZVamNwbThK?= =?utf-8?B?RzYrQXlsazVaL3dXVlNLQ2hJdzZlVGl2ZWIxZ25ST2pzN2JlbFlkK1BGRnJ3?= =?utf-8?B?Y2VNUHA3N3VGY01aeDNpc3l2QnF1QnhqUWxta0lQZ0RuaGhDQjRHbXN6RFNB?= =?utf-8?B?ekdhMSszM0hMRGRZcUUxUW9zY3JteTJRVGdPVVlqWUJybUJBalZJbGJZQmpW?= =?utf-8?B?U2RQYXM3Mk9JenBLem13SWI3Sk9hdGVQQUlRaXM5NVlpMTJDMi80SW0zRExH?= =?utf-8?B?QlRhNjY0UUpSK3NKQk8rS29ib1ZzMFdqK1lldlpvbGI4Z1RiTDdSMFZsSWd2?= =?utf-8?B?d1p4dk5aS2dMMzk4UFJuNlJYNFhHeVcyY2ppYkNEWG9rc0xhRXptS3BzY3A1?= =?utf-8?B?blB3TFBpTEdpWkVVOEM3T3dNcEVoTm5GOThQYXhjWGVtUjMzYWZzR0pHUGFa?= =?utf-8?B?RWxWZ205YzQrcEJhS05zcW9SQ2l4UEdNT3NSVGFRWWFNZHBoV2oweDh5MU5M?= =?utf-8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5NlNjOHI1cjlzZFpj?= =?utf-8?B?OHNDRnRnTFgxakpVT3FlQ2xQUG82ckZTaXhOakFzUDZEajE2M21nWG50MjFu?= =?utf-8?B?cTN1N0ZQWTJOSUl3VUkvbVRIaGU5LzNzbDNEbUF3cXRqTnVpT0pwKysvQjha?= =?utf-8?B?dnlhb1VRY1dRMktJd2lNRUF6WDF3d1BxYmtqTS9kaGhIZ0ZBdmY2RkZNRGJP?= =?utf-8?Q?Nt5iroVQOor6T6c/eiCiynGvGRLvCBPU+kWhiLl?= X-MS-Exchange-CrossTenant-Network-Message-Id: dd2bd160-030b-4bd7-a19b-08d9871f987e X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2021 10:13:22.5302 (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: NBvq1ACil9PNxfrf7RU3P0R7DWBIBPFOYlWKBborxZSm31krzVU/+O3fzsw0AJkCzHZb3JVr69wr2n+xZqrpqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5144 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/4/2021 10:20 AM, Ananyev, Konstantin wrote: > >>>> >>>>> 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. > > Hmm, as I said above, I don't want users to call them explicitly. > Do you have any good reason to allow it? > Just to get rid of this internal APIs that is exposed to application state. >> >> We need to trace the ABI for these functions, making them public clarifies it. > > We do have plenty of semi-internal functions right now, > why adding that one will be a problem? As far as I remember existing ones are 'static inline' functions, and we don't have an ABI concern with them. But these are actual functions called by application. > From other side - if we'll declare it public, we will have obligations to support it > in future releases, plus it might encourage users to use it on its own. > To me that sounds like extra headache without any gain in return. > If having those two as public API doesn't make sense, I agree with you. >> 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. >