From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <wenzhuo.lu@intel.com>
Received: from mga04.intel.com (mga04.intel.com [192.55.52.120])
 by dpdk.org (Postfix) with ESMTP id DC4E42BD5
 for <dev@dpdk.org>; Mon, 29 Aug 2016 04:42:57 +0200 (CEST)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga104.fm.intel.com with ESMTP; 28 Aug 2016 19:42:56 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.28,594,1464678000"; d="scan'208";a="1042701823"
Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204])
 by orsmga002.jf.intel.com with ESMTP; 28 Aug 2016 19:42:56 -0700
Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by
 FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Sun, 28 Aug 2016 19:42:56 -0700
Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by
 fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Sun, 28 Aug 2016 19:42:55 -0700
Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by
 SHSMSX152.ccr.corp.intel.com ([169.254.6.107]) with mapi id 14.03.0301.000;
 Mon, 29 Aug 2016 10:42:53 +0800
From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: "Iremonger, Bernard" <bernard.iremonger@intel.com>, "dev@dpdk.org"
 <dev@dpdk.org>
CC: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>, "Wu, Jingjing"
 <jingjing.wu@intel.com>
Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: fix DCB config issue on ixgbe
Thread-Index: AQHR7tknDiVthxIrsEOjebEG23OHI6BXcGYAgABiQICAASpzEP//95OAgAGUWTCAABWcgIAEv/hg
Date: Mon, 29 Aug 2016 02:42:52 +0000
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC090939286AA2@shsmsx102.ccr.corp.intel.com>
References: <1470374429-14848-1-git-send-email-wenzhuo.lu@intel.com>
 <8CEF83825BEC744B83065625E567D7C21A06A32E@IRSMSX108.ger.corp.intel.com>
 <8CEF83825BEC744B83065625E567D7C21A06A573@IRSMSX108.ger.corp.intel.com>
 <6A0DE07E22DDAD4C9103DF62FEBC09090349EA68@shsmsx102.ccr.corp.intel.com>
 <8CEF83825BEC744B83065625E567D7C21A06A70A@IRSMSX108.ger.corp.intel.com>
 <6A0DE07E22DDAD4C9103DF62FEBC09090349EFA0@shsmsx102.ccr.corp.intel.com>
 <8CEF83825BEC744B83065625E567D7C21A06AC8C@IRSMSX108.ger.corp.intel.com>
In-Reply-To: <8CEF83825BEC744B83065625E567D7C21A06AC8C@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] app/testpmd: fix DCB config issue on ixgbe
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: Mon, 29 Aug 2016 02:42:58 -0000

Hi Bernard,


> -----Original Message-----
> From: Iremonger, Bernard
> Sent: Friday, August 26, 2016 6:04 PM
> To: Lu, Wenzhuo; dev@dpdk.org
> Cc: De Lara Guarch, Pablo; Wu, Jingjing
> Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix DCB config issue on ixgb=
e
>=20
> Hi Wenzhuo,
>=20
> <snip>
>=20
> > > > > If nb_rxq and nb_txq are set to max_rx_queues and max_tx_queues
> > > > > respectively, there is a failure when the port is started in
> > > > > ixgbe_check_mq_mode() at line
> > > > > 1990 in ixgbe_ethdev.c.
> > > > > SRIOV is active, nb_rx_q=3D128 nb_tx_q=3D128 queue number must be
> > > > > less than or equal to 1.
> > > > I haven't hit this issue. Would you like to give more details
> > > > about how to hit it? I'll check if I miss something.
> > >
> > > There is a Niantic PF and VF bound to igb_uio. Port 0 is the PF and
> > > Port 1 is the VF.
> > > ./testpmd -c 3f -l 1-5 -n 4 -- -i
> > > testpmd> set corelist 2,3,4,5
> > > testpmd> port stop 0  /* PF is 0 */
> > > testpmd> port config 0 dcb vt on 4 pfc on port start 0 /* PF is 0 */
> > > line 1990   ixgbe_ethdev.c
> > > SRIOV is active, nb_rx_q=3D128 nb_tx_q=3D128 queue number must be les=
s
> > > than or equal to 1.
> > > /* Works if nb_rx_q and nb_tx_q set to 1 */
> > To my opinion, it's a by-design limitation. After using the DCB
> > configuration CLI, the queue number is set to a fix number which is
> > the max number. But as you pointed, when SRIOV is active there's
> > another requirement for the queue number.
> > We need to investigate deeper and find a solution for it. But I think
> > it's another story. We need another patch for it.
>=20
> Line 1997 in testpmd.c
> 1997	if (dcb_mode =3D=3D DCB_VT_ENABLED) {
> 		nb_rxq =3D rte_port->dev_info.max_rx_queues;
> 		nb_txq =3D rte_port->dev_info.max_tx_queues;
> 	} else {
> 2001		/*if vt is disabled, use all pf queues */
> 		if (rte_port->dev_info.vmdq_pool_base =3D=3D 0) {
> 			nb_rxq =3D rte_port->dev_info.max_rx_queues;
> 			nb_txq =3D rte_port->dev_info.max_tx_queues;
> 		} else {
> 			nb_rxq =3D (queueid_t)num_tcs;
> 			nb_txq =3D (queueid_t)num_tcs;
> 		}
> 	}
>=20
> The comment at line 2001 implies that when dcb_mode is DCB_VT_ENABLED all
> pf queues should not be used.
> When dcb_mode is DCB_VT_ENABLED, setting nb_rxq and nb_txq equal to 1
> works when the PF (port 0) is started.
> When dcb_mode is DCB_VT_ENABLED, setting nb_rxq to max_rx_queues and
> nb_txq to max_tx_queues results in the following failure in ixgbe when th=
e PF
> (port 0) is started.
> SRIOV is active, nb_rx_q=3D128 nb_tx_q=3D128 queue number must be less th=
an or
> equal to 1.
PF and its VF port cannot be used in the same APP. As VF depends on its PF.=
 We must wait until PF is completed, then run VF. Normally, like use DPDK P=
F on host, then use DPDK VF on guest. If you use PF and VF on parallel, the=
 behavior is unpredicted. I think that's why you see this prompt " SRIOV is=
 active, nb_rx_q=3D128 nb_tx_q=3D128 queue number must be less than or equa=
l to 1.".
I've tried PF only testpmd. The result is like " PMD: ixgbe_check_mq_mode()=
: SRIOV active, unsupported mq_mode rx 6.". It means DCB is not supported b=
y DPDK PF.