From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 365872C37; Tue, 22 Jan 2019 10:34:01 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2019 01:34:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,505,1539673200"; d="scan'208";a="127868817" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by orsmga002.jf.intel.com with ESMTP; 22 Jan 2019 01:33:59 -0800 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.6]) by PGSMSX101.gar.corp.intel.com ([169.254.1.164]) with mapi id 14.03.0415.000; Tue, 22 Jan 2019 17:31:57 +0800 From: "Zhao1, Wei" To: "dev@dpdk.org" CC: "stable@dpdk.org" , "Zhang, Qi Z" , "Peng, Yuan" Thread-Topic: [PATCH] net/i40e: fix queue region error in priority configuration Thread-Index: AQHUsi3BA9fBBUc/SkGriJhhdh3rhKW7BYxQ Date: Tue, 22 Jan 2019 09:31:57 +0000 Message-ID: References: <1548144663-3735-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1548144663-3735-1-git-send-email-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix queue region error in priority configuration 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: , X-List-Received-Date: Tue, 22 Jan 2019 09:34:01 -0000 Tested-by: Peng Yuan < yuan.peng@intel.com@intel.com> applied the patch [https://patches.dpdk.org/patch/49990/] to dpdk 19.02-rc= 3 commit 84a1d4a873634f53cc6e3555dc78ca611bbc3458 verified with fortville 4*10g NIC driver: i40e version: 2.7.11 firmware-version: 6.01 0x80003205 1.1691.0 ./usertools/dpdk-devbind.py -b igb_uio 05:00.0 05:00.1 ./x86_64-native-linuxapp-gcc/app/testpmd -c 1ff -n 4 - -i --rxq=3D8 --txq= =3D8 --nb-cores=3D2 --nb-ports=3D2 --pkt-filter-mode=3Dperfect port config all rss all set verbose 1 port config 0 pctype mapping update 15 28 port config 0 pctype mapping update 17 30 set port 0 queue-region region_id 0 queue_start_index 2 queue_num 4 set port 0 queue-region region_id 1 queue_start_index 6 queue_num 1 set port 0 queue-region region_id 0 flowtype 15 set port 0 queue-region region_id 1 flowtype 17 set port 0 queue-region flush on port config all rss 28 port config all rss 30 start Input packet: sendp([Ether(type=3D0x8863,dst=3D'ff:ff:ff:ff:ff:ff')/PPPoED(= )],iface=3D"enp131s0f3",count=3D100) testpmd showed: testpmd> show port stats all ######################## NIC statistics for port 0 #####################= ### RX-packets: 100 RX-missed: 0 RX-bytes: 6000 RX-errors: 0 RX-nombuf: 0 TX-packets: 0 TX-errors: 0 TX-bytes: 0 Throughput (since last show) Rx-pps: 0 Tx-pps: 0 #########################################################################= ### ######################## NIC statistics for port 1 #####################= ### RX-packets: 0 RX-missed: 0 RX-bytes: 0 RX-errors: 0 RX-nombuf: 0 TX-packets: 100 TX-errors: 0 TX-bytes: 6000 Throughput (since last show) Rx-pps: 0 Tx-pps: 0 #########################################################################= ### =20 the issue is not reproduced. > -----Original Message----- > From: Zhao1, Wei > Sent: Tuesday, January 22, 2019 4:11 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Zhang, Qi Z ; Peng, Yuan > ; Zhao1, Wei > Subject: [PATCH] net/i40e: fix queue region error in priority configurati= on >=20 > There is no need to set vlan priority realted resigsters when there is no > configuration about that in queue region. >=20 > Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush") > Signed-off-by: Wei Zhao > --- > drivers/net/i40e/rte_pmd_i40e.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/i40e/rte_pmd_i40e.c > b/drivers/net/i40e/rte_pmd_i40e.c index 7ce5d02..c49c872 100644 > --- a/drivers/net/i40e/rte_pmd_i40e.c > +++ b/drivers/net/i40e/rte_pmd_i40e.c > @@ -2818,13 +2818,23 @@ i40e_queue_region_dcb_configure(struct > i40e_hw *hw, > struct i40e_dcbx_config *old_cfg =3D &hw->local_dcbx_config; > int32_t ret =3D -EINVAL; > uint16_t i, j, prio_index, region_index; > - uint8_t tc_map, tc_bw, bw_lf; > + uint8_t tc_map, tc_bw, bw_lf, dcb_flag =3D 0; >=20 > if (!info->queue_region_number) { > PMD_DRV_LOG(ERR, "No queue region been set before"); > return ret; > } >=20 > + for (i =3D 0; i < info->queue_region_number; i++) { > + if (info->region[i].user_priority_num) { > + dcb_flag =3D 1; > + break; > + } > + } > + > + if (dcb_flag =3D=3D 0) > + return 0; > + > dcb_cfg =3D &dcb_cfg_local; > memset(dcb_cfg, 0, sizeof(struct i40e_dcbx_config)); >=20 > -- > 2.7.5