From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 3AB097260 for ; Fri, 12 Jan 2018 04:03:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2018 19:03:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,347,1511856000"; d="scan'208";a="194338427" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by fmsmga006.fm.intel.com with ESMTP; 11 Jan 2018 19:03:55 -0800 Received: from pgsmsx109.gar.corp.intel.com (10.221.44.109) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 12 Jan 2018 11:03:54 +0800 Received: from pgsmsx112.gar.corp.intel.com ([169.254.3.86]) by PGSMSX109.gar.corp.intel.com ([169.254.14.19]) with mapi id 14.03.0319.002; Fri, 12 Jan 2018 11:03:54 +0800 From: "Dai, Wei" To: "Wu, Yanglong" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VF Thread-Index: AQHTiRP3r8/RMkrvkUyJzuF5q0c/WqNubI1A//+JYgCAAFO2gIAAuuoAgACNHdA= Date: Fri, 12 Jan 2018 03:03:54 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D66CF219F0@PGSMSX112.gar.corp.intel.com> References: <20171120022557.151461-1-yanglong.wu@intel.com> <20180109063205.6708-1-yanglong.wu@intel.com> <49759EB36A64CF4892C1AFEC9231E8D66CF214DA@PGSMSX112.gar.corp.intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDJhNzNhODktOTJmNi00MTNlLTljOWMtNGEyN2EwOGZjNDhlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImlOU2NXdjVhdkkxb1pzVjJiaTRSUXoyZEFUZmhEeCtJSU5pN3V4U0lDcU09In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 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 v4] net/ixgbe: fix l3fwd start failed on VF 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: Fri, 12 Jan 2018 03:03:57 -0000 > -----Original Message----- > From: Wu, Yanglong > Sent: Friday, January 12, 2018 10:38 AM > To: Dai, Wei ; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on V= F >=20 > Hi > After confirm with Daiwei and according to the data sheet, > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool is the Max number of queue can > be used in VF, that would be assigned as IXGBE_MAX_RX_QUEUE_NUM / > RTE_ETH_DEV_SRIOV(dev).active, so that assigning nb_q_per_pool as 1 > when PF is in ETH_MQ_RX_NONE, which will make VF can just use only 1 > queue, is not right. So this patch is right. >=20 > Yanglong >=20 > -----Original Message----- > From: Wu, Yanglong > Sent: Thursday, January 11, 2018 11:29 PM > To: Wu, Yanglong ; Dai, Wei > ; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on V= F >=20 > Hi daiwei: >=20 > After I double checked with this bug, the problem can be described as fol= low: > When we start PF using testpmd like this: testpmd -c 0x3 -n 4 > --socket-mem=3D1024,1024 --file-prefix=3Dpf -w 0000:05:00.0 -w 0000:05:00= .1 > -- -i. The number of queue signed to each port would be 1 and the > rxmode.mq_mode of ixgbe eth_dev would be set as ETH_MQ_RX_NONE. > And this config info is make sense, so until now there is no problem, rig= ht? > And according to the code: > case ETH_MQ_RX_NONE: > > /* if nothing mq mode configure, use default scheme */ > > dev->data->dev_conf.rxmode.mq_mode =3D > ETH_MQ_RX_VMDQ_ONLY; > > - if (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool > 1) > > - RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool =3D 1; > > break; > The nb_q_per_pool of (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool would > be set as 1, that means for VF the number of max queue can be used would > be only 1. >=20 > And next we start VF using l3fwd: > l3fwd/build/l3fwd -c 0xc0000 -n 4 -w 0000:05:10.0 -w 0000:05:10.1 -- -p 0= x3 > --config '(0,0,18),(1,0,19)' --parse-ptype The number of rx_q equal to 1 = and > there is no problem. But, in l3fwd, the number of tx_q would equal to the > number of core used in l3fwd, so here number of tx_q equal to 2 but as > described above, the max number of queue can be used in VF is just only 1= . > So there is problem and l3fwd will check failed. >=20 >=20 > So there is two ways to fix this bug, the first is using this patch, don'= t assign > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool as 1 when mq_mode =3D > ETH_MQ_RX_VMDQ_ONLY. > And the second is that the number of tx_q would not assigned as the numbe= r > of cores used in l3fwd. >=20 > Which one do you think is make sense? >=20 >=20 >=20 >=20 > Yanglong >=20 >=20 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wu, Yanglong > Sent: Thursday, January 11, 2018 6:30 PM > To: Dai, Wei ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on V= F >=20 > Yes, this problem is caused by PF passing a wrong number of queue to VF. = So > basically, I removed model check of "case ETH_MQ_RX_NONE". It seem > right after I do that but I'am also not very sure the changing is really = right. So > thank to your comments, I will redebug this problem. >=20 > -----Original Message----- > From: Dai, Wei > Sent: Thursday, January 11, 2018 5:48 PM > To: Wu, Yanglong ; dev@dpdk.org; Yang, Zhiyong > > Cc: Wu, Yanglong > Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on V= F >=20 > According to 82599 datasheet, VF working mode is controlled by its host P= F. > If VF is working in RSS or DCB mode, it can use more than 1 queues. > That also means its host PF should enable RSS or DCB. > The PF Rx mode can be ETH_MQ_RX_VMDQ_RSS or > ETH_MQ_RX_VMDQ_DCB. > So I think that DPDK app with PF cause this issue, not ixgbe PMD itself. >=20 > By the way, you can reply your patch mail to provide more info about how > You reproduce this issue to easy others' reviewing and testing your patch= . >=20 > Thanks >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yanglong Wu > > Sent: Tuesday, January 9, 2018 2:32 PM > > To: dev@dpdk.org; Yang, Zhiyong > > Cc: Wu, Yanglong > > Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VF > > > > VF can't run in multi queue mode, if nb_q_per_pool was set as 1. > > Nb_q_per_pool is passed through to max_rx_q and max_tx_q in VF. > > So if nb_q_per_pool is equal to 1, max_rx_q and max_tx_q can't be more > > than 1 and VF multi queue mode will fail. > > > > Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check) > > > > Signed-off-by: Yanglong Wu Acked-by: Wei Dai > > --- > > v1~v3: > > coding style issue fix > > --- > > v4: > > Rework according to comments > > --- > > drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > index baaeee5d9..6af4f8b2b 100644 > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > @@ -2240,8 +2240,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev > *dev) > > case ETH_MQ_RX_NONE: > > /* if nothing mq mode configure, use default scheme */ > > dev->data->dev_conf.rxmode.mq_mode =3D > ETH_MQ_RX_VMDQ_ONLY; > > - if (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool > 1) > > - RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool =3D 1; > > break; > > default: /* ETH_MQ_RX_DCB, ETH_MQ_RX_DCB_RSS or > ETH_MQ_TX_DCB*/ > > /* SRIOV only works in VMDq enable mode */ > > -- > > 2.11.0