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 A7EB641CEC for ; Mon, 20 Feb 2023 14:59:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8580943054; Mon, 20 Feb 2023 14:59:10 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 4B78940395 for ; Mon, 20 Feb 2023 14:59:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676901549; x=1708437549; h=from:to:subject:date:message-id:references:in-reply-to: mime-version; bh=gGUeEHdnpeLZRSPncEjCM1fNUiwYp7y3TTvGSTUm+Pk=; b=k67MyczptWKumaHwmvKOxK807brJF9uCKVzHBG9YHXq/8fGUEquZZ32R lpwqIGjR8GeS3YHlo710b3sCSN7b5+rtN+ztUd37qTBEF/SMp8of2gNJw 37cTEZ3kWSRgoSDrfxrPWAxboiCJA9Os4DsA6uEQkv+Sc/mfjXNBYt1V0 S7+PPKfk1FNfDa2nQIutNFbzfpp/gfV+xokJxXbxnm0GmpeXGWNognxzR eABLYJKK2TZQsK5JOg6ljNBzvC9M96AE06icwNm5E2YMnH3sPZyQmoR/x H3hFgcMBusW4XHLToORUo/VSBLdEHEfqYH8h2z9H6VIEPaVDxr8/npS92 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10627"; a="418624824" X-IronPort-AV: E=Sophos;i="5.97,312,1669104000"; d="scan'208,217";a="418624824" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2023 05:59:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10627"; a="701671042" X-IronPort-AV: E=Sophos;i="5.97,312,1669104000"; d="scan'208,217";a="701671042" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga008.jf.intel.com with ESMTP; 20 Feb 2023 05:59:07 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 20 Feb 2023 05:59:06 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Mon, 20 Feb 2023 05:59:06 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.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.2507.16; Mon, 20 Feb 2023 05:59:05 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XwqS7MNzApVwA10ia90n7jjQ53YDndeGNTjbCtKh+lyd0HaoUfovT+eF+ZH/aeBjY9+RYdfqJVZp/djwGO0No1qvUs0eG7tGwkEowimAZaF3iyplkZWYRkVJhp3yi6PsOxc1BBw8wNdR8ivF5XDdvleAFReac9Z3Zy8ktBLKbW4IWDf4/OH1GLKrS9lhfhNsIyFvlFFk0ewVBNsjXOlR94nxFyYAYfagD5X/Lu5r5gEPOzAI28grDSUDW0XCi1vP2svdJZUR2OvdyN5dA8Krx1cuIS9ksDryz/72El89nSjJk1YiVR9b8AICXohHSIIbHtc2H20Yog0J8s4zIgdw1A== 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=xoJYl+TMw02QvsOVHR8sG6uy1RSlua3rl29rnWpeqsQ=; b=PsF261jQSAa0uSn6jiUl8iYIKC4jsYk0B2Mbne4EvMvG4WLBaP+q+MesZv+z7c+LHv6daGhrw+y65YF2iHaXOhvcoA1rMLgOB+yvXQ6He34ZP6Cdgdc3rf750rWb3HErmxTywoX0+4Xufn/qafGApCC95MEY9e0UwTegl0z+ZF0tzlShWuvDcQnuvanW0wQ62gv04nxvu5ssshtPknK+3o1YbdKpLj98LNM4iv3nciGcx7UIoQZIfuePaha9bWPF9EydU8jYOZhoaNCvC6WXhx2M/+3F9Ne2uuePZzEu7I0YuaGj2USxtDAy3j1lH1KLdUMeTcJcgZgYJfVOiKl4dQ== 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 Received: from BN6PR11MB1251.namprd11.prod.outlook.com (2603:10b6:404:48::10) by CO1PR11MB5153.namprd11.prod.outlook.com (2603:10b6:303:95::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.13; Mon, 20 Feb 2023 13:59:02 +0000 Received: from BN6PR11MB1251.namprd11.prod.outlook.com ([fe80::b966:2d41:ca2e:6871]) by BN6PR11MB1251.namprd11.prod.outlook.com ([fe80::b966:2d41:ca2e:6871%6]) with mapi id 15.20.6111.020; Mon, 20 Feb 2023 13:59:02 +0000 From: "Burakov, Anatoly" To: "Xiaoping Yan (NSB)" , "users@dpdk.org" Subject: RE: why rte_power_ethdev_pmgmt_queue_enable need to check if other queues are stopped Thread-Topic: why rte_power_ethdev_pmgmt_queue_enable need to check if other queues are stopped Thread-Index: AdlCBFLV8QoElG47QfeDBKVxvG5wigC7XY2wAAj7pdAABqvI0AAAK9qQ Date: Mon, 20 Feb 2023 13:59:01 +0000 Message-ID: References: <0c6664b4318142df94531165fb2acf94@nokia-sbell.com> <0684cc0bac6f4b4996899b1dd9eafbf4@nokia-sbell.com> <4da7b78195454d6f823a983d71310c5d@nokia-sbell.com> In-Reply-To: <4da7b78195454d6f823a983d71310c5d@nokia-sbell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN6PR11MB1251:EE_|CO1PR11MB5153:EE_ x-ms-office365-filtering-correlation-id: 558a652d-591c-4c55-fab5-08db134a9eec x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6LEkhqNOTOhcthAqFoRGzAd2BQx603pMgfIS5UwBVeHnn4VbiMxbQgnCyxUcGSeI03qw/XXgxXdHFWUr0WiXXm9ONByF/smY593288G2Z3+dC1tKpjku+J2LBrbaPx+WSmyaYHVTPVVnLoIMy8G4Oshr4JvMTEqCtGK5SQXI3xmyEbd4cyK9arOFK9k2rXKVhB0R4JZU8EOHrBWymS6zwRLiveDbDSUl7UyhusjS1Ua+DjnEih005gUZ7wdQvGVokZfAVIag6gy3Ub1/nfteZeR2VGErHlof/vsUo6Zovo9KikeFTT3DA/QwCLO4s8K6Z9COXzr4f7LVDNFFaCdzUW0stdyd2rHexecheO5nF7sG+1fDt0M+xWuyyLzQZyt7ERyMdBIaz3lEYLs4btYLOMQzbnKtbsj1J/+q8cY/+rUHBx8ZS7CxOEAB8Bev+IrDIXElv/iHtR9wgTaV87lzKS2hbcbMIzWQ2d3U4gpgzY37SFcQRZGVOGhmx/ZVP8vGArgcOT8+kulTPD0ThjViQvxbu5Urri0zwn/oYIf6SP1zlwekYGdpp1GTxk7uXRzOfPFstg377NDII681/TZO4aIGBRExv54debakUcWAxMTChNxUyvrGopXxFX97xWiePL3PT1ZBZMoWaqdBHph7V2nrPFRPMa02rPhd1Rywop+JvQBCNnKNdetl8KUQQoPE2e3LH4lEWPgB5swkfJdXjQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB1251.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(366004)(376002)(396003)(39860400002)(136003)(346002)(451199018)(55016003)(71200400001)(186003)(53546011)(6506007)(26005)(478600001)(7696005)(9686003)(2906002)(316002)(110136005)(5660300002)(52536014)(66946007)(41300700001)(66476007)(8936002)(64756008)(66556008)(122000001)(33656002)(38100700002)(76116006)(66446008)(86362001)(38070700005)(82960400001)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?TTZUQzBqdy9BalNEdHc1RVZXbXJrSDQvZVFFQktIV0lsS3ZRVG9YVERI?= =?iso-2022-jp?B?ZmdyazNqTXhhMWlqcGQrOFdOdEs5WS9HalIrd0k0bTZRN1dLbXhjSW9u?= =?iso-2022-jp?B?VlAzN3dHYWYxL2VzbmZ6RmFlazMvcmZRNGRRTkNUUk1iMDcvcFNhUWN1?= =?iso-2022-jp?B?NkxVdmUwRzZRMkMwNG01MlFEUjJVeFJ3Mzl6K3Z6SWF6SE05Rnhzdkxq?= =?iso-2022-jp?B?K2ZSSG1Gdnc2bEU1UkJTWnhubnd4WlBWd2c0Yi8yMzVOZzFuSVc0ZzFQ?= =?iso-2022-jp?B?Rk9ESnNkQWlpRERvS3Z2NnNybDVGS2RSeUF3WFBiZ0tpN0kyeElVemsw?= =?iso-2022-jp?B?cE16Z1k5VHpGTitpYkp5MUwvYllDMlJiYnZna1kyOFczVDRFUmFWNFR0?= =?iso-2022-jp?B?Uk4zeTNCQUZEM0x5YWF0eVhKQkIzZTdWMXYvNWd2WWxYa3pxN3d2YVox?= =?iso-2022-jp?B?WEozanp1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vVkpwdmZKM3VI?= =?iso-2022-jp?B?cHJWQWJPWjhuUU1aN2JTdEJKTFBGTStzaVE9PQ==?= Content-Type: multipart/alternative; boundary="_000_BN6PR11MB1251C7D9C2D78CE47F8E50A5F7A49BN6PR11MB1251namp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN6PR11MB1251.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 558a652d-591c-4c55-fab5-08db134a9eec X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2023 13:59:01.7426 (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: ZwGBuiBUtZGViKE91ycP+Yu+NvGKx1nEjffbryq2cMSjXiFg84UL958mDE1JJcGPWIHDsvzX92ElR8JGfNyR8DD2aEIoEOsvgTLd5b15pW4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5153 X-OriginatorOrg: intel.com X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --_000_BN6PR11MB1251C7D9C2D78CE47F8E50A5F7A49BN6PR11MB1251namp_ Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Well, technically, no, you=1B$B!G=1B(Bre right, it wouldn=1B$B!G=1B(Bt - no= t unless you start polling those queues from some other thread. We can=1B$B= !G=1B(Bt prevent that from happening, so we figured the best way would be t= o just disallow queue starts until we=1B$B!G=1B(Bre done configuring everyt= hing. So, yes, we could relax that restriction, it=1B$B!G=1B(Bs just a matt= er of specifying what=1B$B!G=1B(Bs allowed and what=1B$B!G=1B(Bs not vs. ju= st doing a blanket =1B$B!H=1B(Bno=1B$B!I=1B(B and keeping things simple. From: Xiaoping Yan (NSB) Sent: Monday, February 20, 2023 1:41 PM To: Burakov, Anatoly ; users@dpdk.org Subject: RE: why rte_power_ethdev_pmgmt_queue_enable need to check if other= queues are stopped Hi, Thank you for the information. I see from rte_eth_add_rx_callback, the callback is added to per queue data= : rte_eth_devices[port_id].post_rx_burst_cbs[queue_id]; So it should not affect polling on other queues? Br, Xiaoping From: Burakov, Anatoly > Sent: 2023=1B$BG/=1B(B2=1B$B7n=1B(B20=1B$BF|=1B(B 18:28 To: Xiaoping Yan (NSB) >; users@dpdk.org Subject: RE: why rte_power_ethdev_pmgmt_queue_enable need to check if other= queues are stopped Hi, It is mainly because we=1B$B!G=1B(Bre install callbacks, which is not threa= d-safe unless the PMD is stopped. Our PMD=1B$B!G=1B(Bs internal config stru= ctures are not thread-safe. You should only start these ports after you con= figure everything. From: Xiaoping Yan (NSB) > Sent: Monday, February 20, 2023 6:12 AM To: users@dpdk.org; Burakov, Anatoly > Subject: RE: why rte_power_ethdev_pmgmt_queue_enable need to check if other= queues are stopped Hi Anatoly I see this multiple queue support is added by you. Could you kindly help me to understand why rte_power_ethdev_pmgmt_queue_ena= ble need other queues to be in stopped state? commit 5dff9a72b0efeab02a2b71e52c4871805b7e64cb Author: Anatoly Burakov anatoly.burakov@intel.com Date: Fri Jul 9 16:08:15 2021 +0000 power: support callbacks for multiple Rx queues Thank you. Br, Xiaoping From: Xiaoping Yan (NSB) Sent: 2023=1B$BG/=1B(B2=1B$B7n=1B(B16=1B$BF|=1B(B 21:00 To: users@dpdk.org Subject: why rte_power_ethdev_pmgmt_queue_enable need to check if other que= ues are stopped Hi experts, I=1B$B!G=1B(Bm trying to use dpdk power pmd management APIs in my dpdk appl= ication. My application uses several ports, each have one rx queue, and it goes like= this 1. Init first port, setup rx queue, call rte_power_ethdev_pmgmt_queue_e= nable, and start the first port 2. Init second port, setup rx queue, call rte_power_ethdev_pmgmt_queue_= enable, and start the second port 3. =1B$B!D=1B(B Now for the first port & queue, rte_power_ethdev_pmgmt_queue_enable return = success, but for the second port & queue, it returns -16 >From rte_power_ethdev_pmgmt_queue_enable code, I think it fails when checki= ng if other queues are stopped as well. /* check if other queues are stopped as well */ ret =3D cfg_queues_stopped(lcore_cfg); if (ret !=3D 1) { /* error means invalid queue, 0 means queue wasn't stopped */ ret =3D ret < 0 ? -EINVAL : -EBUSY; goto end; } This seems quite strange for me, why other queues have to be in stopped sta= te? Can anyone help to explain? Thank you. Br, Xiaoping --_000_BN6PR11MB1251C7D9C2D78CE47F8E50A5F7A49BN6PR11MB1251namp_ Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable

Well, technically, no, you=1B$B!G=1B(Bre right, it wouldn=1B$B!G=1B(Bt = 211; not unless you start polling those queues from some other thread. We c= an=1B$B!G=1B(Bt prevent that from happening, so we figured the best way wou= ld be to just disallow queue starts until we=1B$B!G=1B(Bre done configuring= everything. So, yes, we could relax that restriction, it=1B$B!G=1B(Bs just a matter of= specifying what=1B$B!G=1B(Bs allowed and what=1B$B!G=1B(Bs not vs. just do= ing a blanket =1B$B!H=1B(Bno=1B$B!I=1B(B and keeping things simple.

 =

From: Xiaoping Yan (NSB) <xiaoping.ya= n@nokia-sbell.com>
Sent: Monday, February 20, 2023 1:41 PM
To: Burakov, Anatoly <anatoly.burakov@intel.com>; users@dpdk.o= rg
Subject: RE: why rte_power_ethdev_pmgmt_queue_enable need to check i= f other queues are stopped

 =

Hi,

 

Thank you for the information.<= o:p>

I see from rte_eth_add_rx_callb= ack, the callback is added to per queue data: rte_eth_devices[port_id].post= _rx_burst_cbs[queue_id];

So it should not affect polling= on other queues?

 

 

Br, Xiaoping<= /p>

 

From: Burakov, Anatoly <anatoly.= burakov@intel.com>
Sent: 2023
=1B$BG/=1B(= B2=1B$B7n=1B(B20=1B$BF|=1B(B 18:28
To: Xiaoping Yan (NSB) <xiaoping.yan@nokia-sbell.com>; users@dpdk.org
Subject: RE: why rte_power_ethdev_pmgmt_queue_enable need to check i= f other queues are stopped

 

Hi,

 =

It is mainly because we= =1B$B!G=1B(Bre install callbacks, which is not thread-safe unless the PMD i= s stopped. Our PMD=1B$B!G=1B(Bs internal config structures are not thread-s= afe. You should only start these ports after you configure everything.

 =

From: Xiaoping Yan (NSB) <xiaoping.yan@nokia-sbell.com>
Sent: Monday, February 20, 2023 6:12 AM
To: users@dpdk.org; Burakov, A= natoly <anatoly.burakov@int= el.com>
Subject: RE: why rte_power_ethdev_pmgmt_queue_enable need to check i= f other queues are stopped

 =

Hi Anatoly

 

I see this multiple queue suppo= rt is added by you.

Could you kindly help me to und= erstand why rte_power_ethdev_pmgmt_queue_enable need other queues to be in = stopped state?

 

commit 5dff9a72b0efeab02a2b71e5= 2c4871805b7e64cb

Author: Anatoly Burakov anatoly.burakov@intel.com

Date:   Fri Jul 9 16:= 08:15 2021 +0000

 

po= wer: support callbacks for multiple Rx queues

 

 

Thank you.

 

Br, Xiaoping<= /p>

 

From: Xiaoping Yan (NSB)
Sent: 2023
=1B$BG/=1B(B2=1B$B7n=1B(B16=1B$BF|=1B(B 21:00
To: users@dpdk.org
Subject: why rte_power_ethdev_pmgmt_queue_enable need to check if ot= her queues are stopped

 

Hi experts,

 

I= =1B$B!G=1B(Bm trying to use dpdk power pmd mana= gement APIs in my dpdk application.

My application uses several por= ts, each have one rx queue, and it goes like this

1= .   &= nbsp; Init first port, setup = rx queue, call rte_power_ethdev_pmgmt_queue_enable, and start the first por= t

2= .   &= nbsp; Init second port, setup= rx queue, call rte_power_ethdev_pmgmt_queue_enable, and start the second p= ort

3= .   &= nbsp; =1B$B!D=1B(B

Now for the first port & qu= eue, rte_power_ethdev_pmgmt_queue_enable return success, but for the second= port & queue, it returns -16

From rte_power_ethdev_pmgmt_que= ue_enable code, I think it fails when checking if other queues are stopped = as well.

  &n= bsp; /* check if other queues are stopped as well */

  &n= bsp; ret =3D cf= g_queues_stopped(lcore_cfg);

  &n= bsp; if (ret !=3D 1) {

  &n= bsp;     /* error means invalid queue, 0 means queue wasn't stopp= ed */

  &n= bsp;     ret =3D re= t = < 0<= /span> ? = -EINVAL : -EBUSY;

  &n= bsp;     goto en= d;=

  &n= bsp; }

This seems quite strange for me= , why other queues have to be in stopped state?

Can anyone help to explain?

 

Thank you.

 

 

Br, Xiaoping<= /p>

 

--_000_BN6PR11MB1251C7D9C2D78CE47F8E50A5F7A49BN6PR11MB1251namp_--