From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 15FCF6CCC for ; Wed, 19 Oct 2016 12:19:41 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 19 Oct 2016 03:19:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,514,1473145200"; d="scan'208";a="1056023359" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga001.fm.intel.com with ESMTP; 19 Oct 2016 03:19:40 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.164]) by IRSMSX153.ger.corp.intel.com ([169.254.9.140]) with mapi id 14.03.0248.002; Wed, 19 Oct 2016 11:16:58 +0100 From: "Iremonger, Bernard" To: "Lu, Wenzhuo" , "dev@dpdk.org" , "Shah, Rahul R" Thread-Topic: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV Thread-Index: AQHSJh8AWrU2NvB8IEC6J+DlFFxIZKCsHbwAgAC4HvCAAIUzgIAAkahQgAD4yACAALE2gA== Date: Wed, 19 Oct 2016 10:16:57 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C21A093C81@IRSMSX108.ger.corp.intel.com> References: <1472202487-20119-1-git-send-email-bernard.iremonger@intel.com> <1476451768-21278-1-git-send-email-bernard.iremonger@intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093933BE4F@shsmsx102.ccr.corp.intel.com> <8CEF83825BEC744B83065625E567D7C21A0934D0@IRSMSX108.ger.corp.intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093933C29B@shsmsx102.ccr.corp.intel.com> <8CEF83825BEC744B83065625E567D7C21A09368C@IRSMSX108.ger.corp.intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093933CC27@shsmsx102.ccr.corp.intel.com> In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093933CC27@shsmsx102.ccr.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTY1NTViMWYtNmY2OC00NzhlLWJjNzctNTFlZDc4YjcyNWZmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkZ0Q3ZDRVpseWcxWW51aDJIWUI1djVzWThnSnc0bkJiTk1jcTJXT1dKbkU9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 10:19:42 -0000 Hi Wenzhuo, > > > > Subject: RE: [PATCH v2] net/ixgbe: support multiqueue mode VMDq > > > > DCB with SRIOV > > > > > > > > Hi Wenzhuo, > > > > > > > > > > if (hw->mac.type !=3D ixgbe_mac_82598EB) { @@ -3339,11 > > > > > > +3340,17 > > > > > @@ > > > > > > ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, > > > > > > if (dcb_config->vt_mode) > > > > > > reg |=3D IXGBE_MTQC_VT_ENA; > > > > > > IXGBE_WRITE_REG(hw, IXGBE_MTQC, reg); > > > > > > - > > > > > > - /* Disable drop for all queues */ > > > > > > - for (q =3D 0; q < 128; q++) > > > > > > - IXGBE_WRITE_REG(hw, IXGBE_QDE, > > > > > > - (IXGBE_QDE_WRITE | (q << > > > > > > IXGBE_QDE_IDX_SHIFT))); > > > > > > + if (RTE_ETH_DEV_SRIOV(dev).active =3D=3D 0) { > > > > > > + /* Disable drop for all queues in VMDQ > mode*/ > > > > > > + for (q =3D 0; q < 128; q++) > > > > > > + IXGBE_WRITE_REG(hw, IXGBE_QDE, > > > > > > + (IXGBE_QDE_WRITE | > > (q << > > > > > > IXGBE_QDE_IDX_SHIFT) | IXGBE_QDE_ENABLE)); > This code is used to enable drop, but the comments say 'disable drop'. The comment is correct but the code is not. =20 > > > > > > + } else { > > > > > > + /* Enable drop for all queues in SRIOV mode > */ > > > > > > + for (q =3D 0; q < 128; q++) > > > > > > + IXGBE_WRITE_REG(hw, IXGBE_QDE, > > > > > > + (IXGBE_QDE_WRITE | > > (q << > > > > > > IXGBE_QDE_IDX_SHIFT))); > This code is used to disable drop, but the comments say 'enable drop'. The comment is correct but the code is not. > I've checked the V4, the same problem too. I think the problem is the > comments, right? No, the comments are correct but the code is reversed. I will send a v5.=20 =20 =20 > > > > > > + } > > > > > I think it has nothing to do with mq mode. Do I miss something? > > > > > > > > Behavior is different when SRIOV is enabled. > > > I don't understand why the behavior is different. To my opinion, the > > > drop has nothing to do with the mode. We can enable or disable it. > > > The old behavior is disabling it by default. Now you change it to > > > disabling it by default in NO-SRIOV mode, but enabling it in SRIOV mo= de. > > > What I don't get is the reason. > > > > Please refer to section 4.6.11.3.1 page 180 of the > > 82599-10-gbe-controller- datasheet.pdf The last paragraph on page 180 > > states: > > > > "Queue Drop Enable (PFQDE) - In SR-IO the QDE bit should be set to 1b > > in the PFQDE register for all queues. > > In VMDq mode, the QDE bit should be set to 0b for all queues." > Got it, thanks a lot :) >=20 > > > > > > > > > > /* Enable the Tx desc arbiter */ > > > > > > reg =3D IXGBE_READ_REG(hw, IXGBE_RTTDCS); @@ - > 3378,7 > > > > > > +3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev > > > > > > +*dev, > > > > > > vmdq_tx_conf->nb_queue_pools =3D=3D > ETH_16_POOLS > > > > > ? > > > > > > 0xFFFF : 0xFFFFFFFF); > > > > > > > > > > > > /*Configure general DCB TX parameters*/ > > > > > > - ixgbe_dcb_tx_hw_config(hw, dcb_config); > > > > > > + ixgbe_dcb_tx_hw_config(dev, dcb_config); > > > > > > } > > > > > > > > > > > > static void > > > > > > @@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct > > > > > > rte_eth_dev > > > > > *dev, > > > > > > /*get DCB TX configuration parameters from > rte_eth_conf*/ > > > > > > ixgbe_dcb_tx_config(dev, dcb_config); > > > > > > /*Configure general DCB TX parameters*/ > > > > > > - ixgbe_dcb_tx_hw_config(hw, dcb_config); > > > > > > + ixgbe_dcb_tx_hw_config(dev, dcb_config); > > > > > > break; > > > > > > default: > > > > > > PMD_INIT_LOG(ERR, "Incorrect DCB TX mode > > > > > configuration"); @@ > > > > > > -3810,9 +3817,6 @@ void ixgbe_configure_dcb(struct rte_eth_dev > > > *dev) > > > > > > (dev_conf->rxmode.mq_mode !=3D ETH_MQ_RX_DCB_RSS)) > > > > > > return; > > > > > > > > > > > > - if (dev->data->nb_rx_queues !=3D ETH_DCB_NUM_QUEUES) > > > > > > - return; > > > > > I remember it's a limitation of implementation. The reason is > > > > > the resource allocation. Why could we remove it now? > > > > > > > > ETH_DCB_NUM_QUEUES is 128, nb_rx_queues may not be 128. > > > I think it's a limitation to force the queue number to be > > > ETH_DCB_NUM_QUEUES. > > > Just to confirm it, have you try to set rx queue number to something > > > different from 128, like 64, 32... > > > > In my test scenario the nb_rx_queues is 1. > Glad to know that, thanks :) >=20 Regards, Bernard