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 AABC71B1A4 for ; Tue, 9 Jan 2018 03:29:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2018 18:29:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,333,1511856000"; d="scan'208";a="191658580" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 08 Jan 2018 18:29:44 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 8 Jan 2018 18:29:44 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 8 Jan 2018 18:29:43 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.189]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Tue, 9 Jan 2018 10:29:41 +0800 From: "Wu, Yanglong" To: "Ananyev, Konstantin" , "Lu, Wenzhuo" CC: "dev@dpdk.org" Thread-Topic: [PATCH v5] net/ixgbe: fix l3fwd start failed on Thread-Index: AQHTiC3knfrhf5rz6kmAOcaILeCxOKNpWIYAgAFppMA= Date: Tue, 9 Jan 2018 02:29:40 +0000 Message-ID: References: <20171120024026.152048-1-yanglong.wu@intel.com> <20180108030601.5622-1-yanglong.wu@intel.com> <2601191342CEEE43887BDE71AB97725880E388A9@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725880E388A9@irsmsx105.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzA0YzBhNjItM2MwNi00Y2I4LWE1N2ItZWI0NzMzYWNiNjM0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Im5SaUtPeVlmWDg0bkhpV3VSYjZwdHA4RTgzNVE2QWNVRTI3bThmbjhSWjg9In0= x-ctpclassification: CTP_NT 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 v5] net/ixgbe: fix l3fwd start failed on 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: Tue, 09 Jan 2018 02:29:47 -0000 Hi, Konstantin Thanks for your comments!=20 Do you means that tx_q is must less than rx_q when the SRIOV is active and = if not, the application case will not be supported? =20 Do you think my patch will cause to 2 (or more cores) could try to TX pac= kets through the same TX queue? And as far as I know, the way of core using= tx_q queue is depend on the application (e.g. in l3fwd tx_q equal to numbe= r of core) and multi core use same tx_q is not suggested for locker is need= ed in this situation. So why do you think my patch will lead to multi core= using same queue? Yanglong Wu =20 -----Original Message----- From: Ananyev, Konstantin=20 Sent: Monday, January 8, 2018 7:55 PM To: Wu, Yanglong ; dev@dpdk.org Subject: RE: [PATCH v5] net/ixgbe: fix l3fwd start failed on > -----Original Message----- > From: Wu, Yanglong > Sent: Monday, January 8, 2018 3:06 AM > To: dev@dpdk.org > Cc: Ananyev, Konstantin ; Wu, Yanglong=20 > > Subject: [PATCH v5] net/ixgbe: fix l3fwd start failed on >=20 > L3fwd start failed on PF, for tx_q check failed. > That occurred when the SRIOV is active and tx_q > rx_q. > The tx_q is equal to nb_q_per_pool. The number of nb_q_per_pool should=20 > equeal to max number of queues supported by HW not nb_rx_q. But then 2 (or more cores) could try to TX packets through the same TX que= ue? Why not just fil to start gracefully (call rte_exit() or so) if such situat= ion occurred? Konstantin >=20 > Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to=20 > specific drivers) >=20 > Signed-off-by: Yanglong Wu > --- > v5: > Rework according to comments > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c=20 > b/drivers/net/ixgbe/ixgbe_ethdev.c > index ff19a564a..baaeee5d9 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -95,6 +95,9 @@ > /* Timer value included in XOFF frames. */ #define IXGBE_FC_PAUSE=20 > 0x680 >=20 > +/*Default value of Max Rx Queue*/ > +#define IXGBE_MAX_RX_QUEUE_NUM 128 > + > #define IXGBE_LINK_DOWN_CHECK_TIMEOUT 4000 /* ms */ > #define IXGBE_LINK_UP_CHECK_TIMEOUT 1000 /* ms */ > #define IXGBE_VMDQ_NUM_UC_MAC 4096 /* Maximum nb. of UC MAC addr= . */ > @@ -2194,9 +2197,10 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev= , uint16_t nb_rx_q) > return -EINVAL; > } >=20 > - RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool =3D nb_rx_q; > - RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx =3D pci_dev->max_vfs * nb_rx_q; > - > + RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool =3D > + IXGBE_MAX_RX_QUEUE_NUM / RTE_ETH_DEV_SRIOV(dev).active; > + RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx =3D > + pci_dev->max_vfs * RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool; > return 0; > } >=20 > -- > 2.11.0