From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A91652BF0 for ; Fri, 26 Aug 2016 03:41:41 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 25 Aug 2016 18:41:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,578,1464678000"; d="scan'208";a="753628531" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 25 Aug 2016 18:41:40 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 25 Aug 2016 18:41:40 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 25 Aug 2016 18:41:39 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.8]) with mapi id 14.03.0248.002; Fri, 26 Aug 2016 09:41:37 +0800 From: "Lu, Wenzhuo" To: "Iremonger, Bernard" , "dev@dpdk.org" CC: "De Lara Guarch, Pablo" , "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: fix DCB config issue on ixgbe Thread-Index: AQHR7tknDiVthxIrsEOjebEG23OHI6BXcGYAgABiQICAASpzEP//95OAgAGUWTA= Date: Fri, 26 Aug 2016 01:41:37 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09090349EFA0@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> In-Reply-To: <8CEF83825BEC744B83065625E567D7C21A06A70A@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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2016 01:41:42 -0000 Hi Bernard, > > > > > > > > The return value of rte_eth_dev_configure() should be checked. > > > > Calling rte_eth_dev_configure() with parameters nb_rx_q and > > > > nb_tx_q equal to 0 returns -EINVAL, and does nothing. > > > > Should the values of nb_rx_q and nb_tx_q be non zero? > > The 0 is used on purpose. Because I don't want to configure the > > queues. The only purpose is to make all the configuration to write > > into the device. And that's why the return value is ignored by (void). >=20 > It might be useful to add a comment to explain why rte_eth_dev_configure(= ) is > being called in this way. Thanks for the suggestion. I'll add it:) > > > > > > 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 les= s > > > 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. >=20 > 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 less th= an 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 configurati= on CLI, the queue number is set to a fix number which is the max number. Bu= t 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 > testpmd> show port dcb_tc 0 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D DCB infos for port 0 = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > TC NUMBER: 4 (showing 8 a lot of the time ??) /* port start should b= e called > first */ > TC : 0 1 2 3 > Priority : 0 1 2 3 > BW percent : 25% 25% 25% 25% > RXQ base : 0 1 2 3 > RXQ number : 1 1 1 1 > TXQ base : 0 1 2 3 > TXQ number : 1 1 1 1 > testpmd> show port dcb_tc 1 > Failed to get dcb infos on port 1 >=20 > > > > > > nb_rxq and nb_txq are equal to 1 at this point, if they are not > > > changed, port start completes successfully. > > > > > > > > > > > } else { > > > > > /*if vt is disabled, use all pf queues */ > > > > > - if (dev_info.vmdq_pool_base =3D=3D 0) { > > > > > - nb_rxq =3D dev_info.max_rx_queues; > > > > > - nb_txq =3D dev_info.max_tx_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; @@ -1997,16 +2010,6 > @@ > > > > > init_port_dcb_config(portid_t pid, > > > > > } > > > > > rx_free_thresh =3D 64; > > > > > > > > > > - memset(&port_conf, 0, sizeof(struct rte_eth_conf)); > > > > > - /* Enter DCB configuration status */ > > > > > - dcb_config =3D 1; > > > > > - > > > > > - /*set configuration of DCB in vt mode and DCB in non-vt mode*/ > > > > > - retval =3D get_eth_dcb_conf(&port_conf, dcb_mode, num_tcs, > > > > > pfc_en); > > > > > - if (retval < 0) > > > > > - return retval; > > > > > - > > > > > - rte_port =3D &ports[pid]; > > > > > memcpy(&rte_port->dev_conf, &port_conf, sizeof(struct > > > > > rte_eth_conf)); > > > > > > > > > > rxtx_port_config(rte_port); > > > > > -- > > > > > 1.9.3 > Regards, >=20 > Bernard