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 3F64841CF6 for ; Mon, 20 Feb 2023 07:12:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1A3C42F8A; Mon, 20 Feb 2023 07:12:10 +0100 (CET) Received: from CNSHPPMGWESA01.NOKIA-SBELL.COM (unknown [116.246.26.71]) by mails.dpdk.org (Postfix) with ESMTP id A2FC242F8C for ; Mon, 20 Feb 2023 07:12:08 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.97,311,1669046400"; d="scan'208,217";a="10993100" Received: from unknown (HELO CNSHPPEXCH1604.nsn-intra.net) ([135.251.51.104]) by CNSHPPMGWESA01.NOKIA-SBELL.COM with ESMTP; 20 Feb 2023 14:12:00 +0800 Received: from CNSHPPEXCH1601.nsn-intra.net (135.251.51.101) by CNSHPPEXCH1604.nsn-intra.net (135.251.51.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 20 Feb 2023 14:12:00 +0800 Received: from CNSHPPEXCH1601.nsn-intra.net ([135.251.51.101]) by CNSHPPEXCH1601.nsn-intra.net ([135.251.51.101]) with mapi id 15.01.2375.034; Mon, 20 Feb 2023 14:12:00 +0800 From: "Xiaoping Yan (NSB)" To: "users@dpdk.org" , "anatoly.burakov@intel.com" 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: AdlCBFLV8QoElG47QfeDBKVxvG5wigC7XY2w Date: Mon, 20 Feb 2023 06:12:00 +0000 Message-ID: <0684cc0bac6f4b4996899b1dd9eafbf4@nokia-sbell.com> References: <0c6664b4318142df94531165fb2acf94@nokia-sbell.com> In-Reply-To: <0c6664b4318142df94531165fb2acf94@nokia-sbell.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [135.251.51.115] Content-Type: multipart/alternative; boundary="_000_0684cc0bac6f4b4996899b1dd9eafbf4nokiasbellcom_" MIME-Version: 1.0 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_0684cc0bac6f4b4996899b1dd9eafbf4nokiasbellcom_ Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 SGkgQW5hdG9seQ0KDQpJIHNlZSB0aGlzIG11bHRpcGxlIHF1ZXVlIHN1cHBvcnQgaXMgYWRkZWQg YnkgeW91Lg0KQ291bGQgeW91IGtpbmRseSBoZWxwIG1lIHRvIHVuZGVyc3RhbmQgd2h5IHJ0ZV9w b3dlcl9ldGhkZXZfcG1nbXRfcXVldWVfZW5hYmxlIG5lZWQgb3RoZXIgcXVldWVzIHRvIGJlIGlu IHN0b3BwZWQgc3RhdGU/DQoNCmNvbW1pdCA1ZGZmOWE3MmIwZWZlYWIwMmEyYjcxZTUyYzQ4NzE4 MDViN2U2NGNiDQpBdXRob3I6IEFuYXRvbHkgQnVyYWtvdiBhbmF0b2x5LmJ1cmFrb3ZAaW50ZWwu Y29tPG1haWx0bzphbmF0b2x5LmJ1cmFrb3ZAaW50ZWwuY29tPg0KRGF0ZTogICBGcmkgSnVsIDkg MTY6MDg6MTUgMjAyMSArMDAwMA0KDQpwb3dlcjogc3VwcG9ydCBjYWxsYmFja3MgZm9yIG11bHRp cGxlIFJ4IHF1ZXVlcw0KDQoNClRoYW5rIHlvdS4NCg0KQnIsIFhpYW9waW5nDQoNCkZyb206IFhp YW9waW5nIFlhbiAoTlNCKQ0KU2VudDogMjAyM8TqMtTCMTbI1SAyMTowMA0KVG86IHVzZXJzQGRw ZGsub3JnDQpTdWJqZWN0O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k IGFzIHdlbGwgKi8NCiAgICByZXQgPSBjZmdfcXVldWVzX3N0b3BwZWQobGNvcmVfY2ZnKTsNCiAg ICBpZiAocmV0ICE9IDEpIHsNCiAgICAgICAgLyogZXJyb3IgbWVhbnMgaW52YWxpZCBxdWV1ZSwg MCBtZWFucyBxdWV1ZSB3YXNuJ3Qgc3RvcHBlZCAqLw0KICAgICAgICByZXQgPSByZXQgPCAwID8g LUVJTlZBTCA6IC1FQlVTWTsNCiAgICAgICAgZ290byBlbmQ7DQogICAgfQ0KVGhpcyBzZWVtcyBx dWl0ZSBzdHJhbmdlIGZvciBtZSwgd2h5IG90aGVyIHF1ZXVlcyBoYXZlIHRvIGJlIGluIHN0b3Bw ZWQgc3RhdGU/DQpDYW4gYW55b25lIGhlbHAgdG8gZXhwbGFpbj8NCg0KVGhhbmsgeW91Lg0KDQoN CkJyLCBYaWFvcGluZw0KDQo= --_000_0684cc0bac6f4b4996899b1dd9eafbf4nokiasbellcom_ Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable

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
=C4=EA2=D4=C216=C8=D5 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=A1=AFm trying to use dpdk power pmd management APIs in my dpdk application.<= o:p>

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; =A1=AD

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_0684cc0bac6f4b4996899b1dd9eafbf4nokiasbellcom_--