From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E1C601B1A5 for ; Tue, 9 Jan 2018 13:39:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2018 04:39:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,335,1511856000"; d="scan'208";a="9846007" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by orsmga006.jf.intel.com with ESMTP; 09 Jan 2018 04:39:44 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.67]) by IRSMSX107.ger.corp.intel.com ([169.254.10.239]) with mapi id 14.03.0319.002; Tue, 9 Jan 2018 12:39:44 +0000 From: "Ananyev, Konstantin" To: "Wu, Yanglong" , "Lu, Wenzhuo" CC: "dev@dpdk.org" Thread-Topic: [PATCH v5] net/ixgbe: fix l3fwd start failed on Thread-Index: AQHTiC3kfXWzew4oiEqYytW2sKcz3qNp3fzQgAD1DgCAAKjTkA== Date: Tue, 9 Jan 2018 12:39:44 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725880E3A7A7@irsmsx105.ger.corp.intel.com> References: <20171120024026.152048-1-yanglong.wu@intel.com> <20180108030601.5622-1-yanglong.wu@intel.com> <2601191342CEEE43887BDE71AB97725880E388A9@irsmsx105.ger.corp.intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzA0YzBhNjItM2MwNi00Y2I4LWE1N2ItZWI0NzMzYWNiNjM0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Im5SaUtPeVlmWDg0bkhpV3VSYjZwdHA4RTgzNVE2QWNVRTI3bThmbjhSWjg9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] 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 12:39:47 -0000 Hi Yanglong, Sorry, I was just confused by the description of the patch. The code itself seems ok... probably need to rephrase the description (remove mentioning l3fwd?). Konstantin =20 > Hi, Konstantin >=20 > Thanks for your comments! > Do you means that tx_q is must less than rx_q when the SRIOV is active an= d if not, the application case will not be supported? > Do you think my patch will cause to 2 (or more cores) could try to TX p= ackets 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 eq= ual to number of core) and multi core use same tx_q is not > suggested for locker is needed in this situation. So why do you think my= patch will lead to multi core using same queue? >=20 > Yanglong Wu >=20 >=20 > -----Original Message----- > From: Ananyev, Konstantin > 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 >=20 >=20 >=20 > > -----Original Message----- > > From: Wu, Yanglong > > Sent: Monday, January 8, 2018 3:06 AM > > To: dev@dpdk.org > > Cc: Ananyev, Konstantin ; Wu, Yanglong > > > > Subject: [PATCH v5] net/ixgbe: fix l3fwd start failed on > > > > 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 > > equeal to max number of queues supported by HW not nb_rx_q. >=20 > But then 2 (or more cores) could try to TX packets through the same TX q= ueue? > Why not just fil to start gracefully (call rte_exit() or so) if such situ= ation occurred? > Konstantin >=20 > > > > Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to > > specific drivers) > > > > Signed-off-by: Yanglong Wu > > --- > > v5: > > Rework according to comments > > --- > > drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++--- > > 1 file changed, 7 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > 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 > > 0x680 > > > > +/*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 ad= dr. */ > > @@ -2194,9 +2197,10 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *d= ev, uint16_t nb_rx_q) > > return -EINVAL; > > } > > > > - 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; > > } > > > > -- > > 2.11.0