From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <wenzhuo.lu@intel.com>
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id 35A3B6CB8
 for <dev@dpdk.org>; Wed, 19 Oct 2016 02:39:33 +0200 (CEST)
Received: from fmsmga004.fm.intel.com ([10.253.24.48])
 by fmsmga102.fm.intel.com with ESMTP; 18 Oct 2016 17:39:32 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.31,364,1473145200"; d="scan'208";a="181248261"
Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205])
 by fmsmga004.fm.intel.com with ESMTP; 18 Oct 2016 17:39:32 -0700
Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by
 fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Tue, 18 Oct 2016 17:39:31 -0700
Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by
 FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Tue, 18 Oct 2016 17:39:31 -0700
Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by
 SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0248.002;
 Wed, 19 Oct 2016 08:39:29 +0800
From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: "Iremonger, Bernard" <bernard.iremonger@intel.com>, "dev@dpdk.org"
 <dev@dpdk.org>, "Shah, Rahul R" <rahul.r.shah@intel.com>
Thread-Topic: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
Thread-Index: AQHSJh8BY+XgBspwfEi5wBOpQ26HZ6Cr90bAgABc+oCAARP7cIAAAPsAgAGItKA=
Date: Wed, 19 Oct 2016 00:39:28 +0000
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093933CC27@shsmsx102.ccr.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>
In-Reply-To: <8CEF83825BEC744B83065625E567D7C21A09368C@IRSMSX108.ger.corp.intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.239.127.40]
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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Oct 2016 00:39:33 -0000

Hi Bernard,


> -----Original Message-----
> From: Iremonger, Bernard
> Sent: Tuesday, October 18, 2016 4:58 PM
> To: Lu, Wenzhuo; dev@dpdk.org; Shah, Rahul R
> Subject: RE: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with
> SRIOV
>=20
> Hi Wenzhuo,
>=20
> <snip>
>=20
> > > 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'.

> > > > > +		} 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'.
I've checked the V4, the same problem too. I think the problem is the comme=
nts, right?

> > > > > +		}
> > > > 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 mode=
.
> > What I don't get is the reason.
>=20
> Please refer to section 4.6.11.3.1 page 180 of the 82599-10-gbe-controlle=
r-
> datasheet.pdf
> The last paragraph on page 180 states:
>=20
> "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
>=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...
>=20
> In my test scenario the nb_rx_queues is 1.
Glad to know that, thanks :)

>=20
> Regards,
>=20
> Bernard