From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A0789A0353; Tue, 5 Nov 2019 14:23:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E5B805B3A; Tue, 5 Nov 2019 14:23:05 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130072.outbound.protection.outlook.com [40.107.13.72]) by dpdk.org (Postfix) with ESMTP id BBB965B32 for ; Tue, 5 Nov 2019 14:23:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k4JIqbxva3MN7RRIqkFT7mRx1REwHV05xnqks+LU7dUTczNo7bgfgy69vC6H0T0XEzqWuCK06Yvgj+IfG+H3SIH0dTksd8RQn3ZNu5Xm0Tb8QwligXKVgUEVronycGrCFA2ZGtm73b7i2AkjtlqgQlUoC2ucafSBkZFXDh1jwKWGiHWgEs9O0fuNO9wOBbisjmZHAZ8Bj1QI54/oqJitxhfsajFb2dO0iUgi/rGQzT2t05ClMxmKt8ZI8ijdR21cMhQ0lYOo3wW64l7KcSfihj6t7Sx29tqEDeJWaObZ+qMVQ4FeE+EGfUVTkN9i/zT7WO459ULLMM0dNvBF8xvE/g== 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-SenderADCheck; bh=R+Cty/bvi0sa/o9VwJtu94mSWLNb6mZOAjw6KDnKXMI=; b=egucxHrbNqcwhR35HC2ZwNHZKGLmEHYD9Px0dsGaUzx71n8XBogtftkljk3FjIrRf/QQmU9lRfIIStGNXLqX6WvXl5kYT/JT1p78StmC6QAfz5z8YTgqpudwX9wK90ZCnmwkT+RtEZiXqAcXXis4pFsZ8rXFtNBH79Smpn9iGzu8HF4n15cEXRu3px8k4XbIluIiTtpvOYovez6O1XGJBjQT1qXVHkNgyRsRjgDGFDObwe3osRxUCliNTAbdut9q448p52dQ7lEJ8DS1weSlutfRVG1EXcFesC1nb3tBC0Whbk4ImAhLwTVB5QG6U2B+zTpQJR/xD4cHvpQrbrYeMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R+Cty/bvi0sa/o9VwJtu94mSWLNb6mZOAjw6KDnKXMI=; b=AhwG0fRXmuunC6KmwTvAXb3GY/yl+znrnZdGUotjW9dDBLS8VgsMtTlix0e/5bqn8jnon7PZ2Jdd8MD15FMK2rJIMYsSc3eziI3M/2rbPTOZJ5BDcSnDNauDisup60iznKSpVHZXUsDMOT0e9LZmdQX6nv18pI8Y5GsBXikxikQ= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3300.eurprd05.prod.outlook.com (10.171.186.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.24; Tue, 5 Nov 2019 13:23:01 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::70a7:a312:cbc6:d178]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::70a7:a312:cbc6:d178%7]) with mapi id 15.20.2387.028; Tue, 5 Nov 2019 13:23:01 +0000 From: Ori Kam To: Thomas Monjalon , Andrew Rybchenko CC: Ferruh Yigit , John McNamara , Marko Kovacevic , "dev@dpdk.org" , "jingjing.wu@intel.com" , "stephen@networkplumber.org" , Jerin Jacob Thread-Topic: [dpdk-dev] [PATCH v7 02/14] ethdev: add support for hairpin queue Thread-Index: AQHVj31BWBrTcRDic0SmEQJ1CV5GOKd8eEqAgAACMdCAAASmAIAABG8AgAACJYCAAALvgIAAAQ0AgAAGsYCAAACngIAAAoIAgAAE/cA= Date: Tue, 5 Nov 2019 13:23:01 +0000 Message-ID: References: <1569479349-36962-1-git-send-email-orika@mellanox.com> <2045237.JHmPHeCnFR@xps> <39704abe-3a35-8879-0dba-068d09951064@solarflare.com> <3424559.MG90hyF9n4@xps> In-Reply-To: <3424559.MG90hyF9n4@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 49343a7e-a483-46a3-df8d-08d761f34876 x-ms-traffictypediagnostic: AM4PR05MB3300: x-ms-exchange-purlcount: 1 x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0212BDE3BE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(4636009)(366004)(39860400002)(376002)(136003)(396003)(346002)(52314003)(53754006)(189003)(13464003)(199004)(66946007)(4326008)(76116006)(9686003)(86362001)(6306002)(7736002)(478600001)(6246003)(99286004)(110136005)(71200400001)(55016002)(71190400001)(54906003)(316002)(476003)(486006)(446003)(11346002)(14444005)(256004)(52536014)(305945005)(2906002)(74316002)(6116002)(5660300002)(45080400002)(66476007)(186003)(25786009)(66066001)(33656002)(14454004)(966005)(229853002)(64756008)(66446008)(66556008)(6436002)(81166006)(76176011)(8676002)(7696005)(81156014)(8936002)(3846002)(102836004)(6506007)(26005)(53546011)(21314003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3300; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: j08g7jSweGvM9guFvxZ/kx20SkB9b4Z0fGlInGdlDVqX/6sTAEoPKR5Uexccib/nn/eWiAS/C5IJXxdn0igVaBiZpNrt7mUtqZfS3+4uDiNUYAQyHTGcA/zqnzMNVKub213uwGRMck81rM7eiDKxtgWeKehV5NgnWdx56MFDM5SuXuv5Cp6TE5/GXc4lzDInP/S/N/rpFaqxFq289ThIso4U97mJFcimiW/YdnXOVrpSquRFDBi+FPJCAijLhH81hMyRm66ByhECMDST+/gj4PHxX1CtkpfhRyYcfg67LD5YBiGgWqSWkFSEUJY+iQ1b+H+RtueyRWQ/QOBBl+njMnKm2U8tT3MAmSf1G7VOWLUN+FM5A85AIyxhm/FNC/YGOuYhgr24NCGybAOMbPIYkMyRWS4ONHmkQVpQR8bOZHuTCWc0Lsv6jtkr4wVEEWHd5Co84UtRkPMuicjXE0p3BUHt/KLlQ5GY9QmF0st3vQQ= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49343a7e-a483-46a3-df8d-08d761f34876 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2019 13:23:01.2354 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DJtrkQbnCITc6+oL2QuWD+yoZJuttB85/tGGs3l4J1R4n6vj01f3sO1VFvEcbhDQm1nWXRcSGBAHzX8Cq/Gv8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3300 Subject: Re: [dpdk-dev] [PATCH v7 02/14] ethdev: add support for hairpin queue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Hi All > -----Original Message----- > From: Thomas Monjalon > Sent: Tuesday, November 5, 2019 3:02 PM > To: Andrew Rybchenko > Cc: Ferruh Yigit ; Ori Kam ; > John McNamara ; Marko Kovacevic > ; dev@dpdk.org; jingjing.wu@intel.com; > stephen@networkplumber.org; Jerin Jacob > Subject: Re: [dpdk-dev] [PATCH v7 02/14] ethdev: add support for hairpin = queue >=20 > 05/11/2019 13:53, Andrew Rybchenko: > > On 11/5/19 3:51 PM, Thomas Monjalon wrote: > > > 05/11/2019 13:27, Andrew Rybchenko: > > >> On 11/5/19 3:23 PM, Ferruh Yigit wrote: > > >>> On 11/5/2019 12:12 PM, Andrew Rybchenko wrote: > > >>>> On 11/5/19 3:05 PM, Ferruh Yigit wrote: > > >>>>> On 11/5/2019 11:49 AM, Andrew Rybchenko wrote: > > >>>>>> On 11/5/19 2:36 PM, Ori Kam wrote: > > > >>>>>> From: Ferruh Yigit > > >>>>>>>>> /** > > >>>>>>>>> + * @internal > > >>>>>>>>> + * Check if the selected Rx queue is hairpin queue. > > >>>>>>>>> + * > > >>>>>>>>> + * @param dev > > >>>>>>>>> + * Pointer to the selected device. > > >>>>>>>>> + * @param queue_id > > >>>>>>>>> + * The selected queue. > > >>>>>>>>> + * > > >>>>>>>>> + * @return > > >>>>>>>>> + * - (1) if the queue is hairpin queue, 0 otherwise. > > >>>>>>>>> + */ > > >>>>>>>>> +int > > >>>>>>>>> +rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, > uint16_t > > >>>>>>>> queue_id); > > >>>>>>>>> + > > >>>>>>>>> +/** > > >>>>>>>>> + * @internal > > >>>>>>>>> + * Check if the selected Tx queue is hairpin queue. > > >>>>>>>>> + * > > >>>>>>>>> + * @param dev > > >>>>>>>>> + * Pointer to the selected device. > > >>>>>>>>> + * @param queue_id > > >>>>>>>>> + * The selected queue. > > >>>>>>>>> + * > > >>>>>>>>> + * @return > > >>>>>>>>> + * - (1) if the queue is hairpin queue, 0 otherwise. > > >>>>>>>>> + */ > > >>>>>>>>> +int > > >>>>>>>>> +rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, > uint16_t > > >>>>>>>> queue_id); > > > [...] > > >>>>>>>> These are causing build error, thanks Jerin for catching, beca= use > they are > > >>>>>>>> internal and called by a public static inline API, so whoever = calls > > >>>>>>>> 'rte_eth_rx/tx_burst()' APIs in the shared build, can't find > > >>>>>>>> 'rte_eth_dev_is_rx/tx_hairpin_queue()' functions [1], > > >>>>>>>> > > >>>>>>>> as far as I can see there are two options: > > >>>>>>>> 1) Remove these checks > > >>>>>>>> 2) Make 'rte_eth_dev_is_rx/tx_hairpin_queue()' public API inst= ead > of internal > > >>>>>>>> > > >>>>>>>> If there is a value to make 'rte_eth_dev_is_rx/tx_hairpin_queu= e()' > public API > > >>>>>>>> we > > >>>>>>>> should go with (2) else (1). > > >>>>>>>> > > >>>>>>> I think we can skip the tests, > > >>>>>>> But it was Andrew request so we must get is response. > > >>>>>>> It was also his empathies that they should be internal. > > >>>>>> It is important for me to keep rte_eth_dev_state internal and > > >>>>>> few patches ago rte_eth_dev_is_rx_hairpin_queue() was inline. > > >>>>> Are you saying you don't want to option to make > > >>>>> 'rte_eth_dev_is_rx_hairpin_queue()' static inline because it will= force > the > > >>>>> 'RTE_ETH_QUEUE_STATE_xxx' being public? > > >>>> Yes. > > >>> +1 > > >>> > > >>>>>> I'm OK to make the function experimental or keep it internal > > >>>>>> (no API/ABI stability requirements) but externally visible (in .= map). > > >>>>> I think we can't do this, add a function deceleration to the publ= ic > header file > > >>>>> and add it to the .map file but keep it internal. Instead we can = make it > a > > >>>>> proper API and it should be experimental at least first release. > > >>>> We have discussed similar thing with Olivier recently [1]. > > >>>> > > >>>> [1] > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Finbox.= dpdk > .org%2Fdev%2F20191030142938.bpi4txlrebqfq7uw%40platinum%2F&data > =3D02%7C01%7Corika%40mellanox.com%7Cb065a7e085aa47723cc408d761f06c9 > f%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C1%7C6370855575589250 > 92&sdata=3D6kY30p%2BEr4DMQiMqbBPX%2BJZ7h0eMp0FxnzhnE%2F7U%2 > BeM%3D&reserved=3D0 > > >>> Yes we can say they are internal but there won't be anything preven= ting > > >>> applications to use them. > > >> > > >> That's true, but making it internal says - don't use it. > > >> Anyway, I have no strong opinion on experimental vs internal. > > >> > > >>>>> The question above was do we need this API, or instead should rem= ove > the check > > >>>>> from rx/tx_burst APIs? > > >>>> I think these checks are useful to ensure that these functions > > >>>> are not used for hairpin queues. At least to catch it with debug > > >>>> enabled. > > >>> OK, if so what not make them proper API? Any concern on it? > > > > > > Why we should not use this API in applications? > > > > I think the valid question is why application needs the API. > > Basically I don't mind, just want to be sure that only required > > API is exposed. >=20 > Because hairpin queues are not standard queues, > we may need to distinguish them. > I see it as a good helper for applications. > Am I missing something obvious? >=20 >=20 Moving the API to experimental results in the following error: error: 'rte_eth_dev_is_rx_hairpin_queue' is deprecated (declared at /.autod= irect/mtrswgwork/orika/pegasus04_share/dpdk.org/x86_64-native-linuxapp-gcc/= include/rte_ethdev.h:4276): Symbol is not yet part of stable ABI [-Werror= =3Ddeprecated-declarations] I suggest that we remove the checks, in any case this checks are only on de= bug mode, and when using data path the user must be very careful and what h= e is doing. Best, Ori