From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 3167C8D8F for ; Thu, 4 Feb 2016 03:40:03 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 03 Feb 2016 18:40:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,393,1449561600"; d="scan'208";a="905152552" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 03 Feb 2016 18:40:01 -0800 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 3 Feb 2016 18:40:01 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 3 Feb 2016 18:40:00 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.218]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.210]) with mapi id 14.03.0248.002; Thu, 4 Feb 2016 10:39:59 +0800 From: "Wang, Xiao W" To: "Chen, Jing D" Thread-Topic: [PATCH v2 1/3] fm10k: enable FTAG based forwarding Thread-Index: AQHRXaeOKFZTyb10xEK8R+CIHeCsqp8ZXYGAgAHO4fA= Date: Thu, 4 Feb 2016 02:39:59 +0000 Message-ID: References: <1453709251-32309-2-git-send-email-xiao.w.wang@intel.com> <1454410216-13333-1-git-send-email-xiao.w.wang@intel.com> <1454410216-13333-2-git-send-email-xiao.w.wang@intel.com> <4341B239C0EFF9468EE453F9E9F4604D0443C079@shsmsx102.ccr.corp.intel.com> In-Reply-To: <4341B239C0EFF9468EE453F9E9F4604D0443C079@shsmsx102.ccr.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 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 1/3] fm10k: enable FTAG based forwarding 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: Thu, 04 Feb 2016 02:40:03 -0000 Hi Mark, > -----Original Message----- > From: Chen, Jing D > Sent: Wednesday, February 3, 2016 2:53 PM > To: Wang, Xiao W > Cc: dev@dpdk.org; Qiu, Michael ; He, Shaopeng > > Subject: RE: [PATCH v2 1/3] fm10k: enable FTAG based forwarding >=20 > Hi, >=20 > Best Regards, > Mark >=20 >=20 > > -----Original Message----- > > From: Wang, Xiao W > > Sent: Tuesday, February 02, 2016 6:50 PM > > To: Chen, Jing D > > Cc: dev@dpdk.org; Qiu, Michael; He, Shaopeng; Wang, Xiao W > > Subject: [PATCH v2 1/3] fm10k: enable FTAG based forwarding > > > > This patch enables reading sglort info into mbuf for RX and inserting > > an FTAG at the beginning of the packet for TX. The vlan_tci_outer > > field selected from rte_mbuf structure for sglort is not used in fm10k = now. > > In FTAG based forwarding mode, the switch will forward packets > > according to glort info in FTAG rather than mac and vlan table. > > > > To activate this feature, user needs to turn > > ``CONFIG_RTE_LIBRTE_FM10K_FTAG_FWD`` > > to y in common_linuxapp or common_bsdapp. Currently this feature is > > supported only on PF, because FM10K_PFVTCTL register is read-only for > > VF. > > > > Signed-off-by: Wang Xiao W > > --- > > config/common_bsdapp | 1 + > > config/common_linuxapp | 1 + > > drivers/net/fm10k/fm10k_ethdev.c | 12 ++++++++++++ > > drivers/net/fm10k/fm10k_rxtx.c | 17 +++++++++++++++++ > > drivers/net/fm10k/fm10k_rxtx_vec.c | 9 +++++++++ > > 5 files changed, 40 insertions(+) > > > > diff --git a/config/common_bsdapp b/config/common_bsdapp index > > ed7c31c..451f81a 100644 > > --- a/config/common_bsdapp > > +++ b/config/common_bsdapp > > @@ -208,6 +208,7 @@ CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=3Dn > > CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX_FREE=3Dn > > CONFIG_RTE_LIBRTE_FM10K_DEBUG_DRIVER=3Dn > > CONFIG_RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE=3Dy > > +CONFIG_RTE_LIBRTE_FM10K_FTAG_FWD=3Dn > > > > # > > # Compile burst-oriented Mellanox ConnectX-3 (MLX4) PMD diff --git > > a/config/common_linuxapp b/config/common_linuxapp index > > 74bc515..c928bce 100644 > > --- a/config/common_linuxapp > > +++ b/config/common_linuxapp > > @@ -207,6 +207,7 @@ CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX_FREE=3Dn > > CONFIG_RTE_LIBRTE_FM10K_DEBUG_DRIVER=3Dn > > CONFIG_RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE=3Dy > > CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=3Dy > > +CONFIG_RTE_LIBRTE_FM10K_FTAG_FWD=3Dn > > > > # > > # Compile burst-oriented Mellanox ConnectX-3 (MLX4) PMD diff --git > > a/drivers/net/fm10k/fm10k_ethdev.c > > b/drivers/net/fm10k/fm10k_ethdev.c > > index e4aed94..3a15c24 100644 > > --- a/drivers/net/fm10k/fm10k_ethdev.c > > +++ b/drivers/net/fm10k/fm10k_ethdev.c > > @@ -668,6 +668,18 @@ fm10k_dev_tx_init(struct rte_eth_dev *dev) > > PMD_INIT_LOG(ERR, "failed to disable queue %d", i); > > return -1; > > } > > +#ifdef RTE_LIBRTE_FM10K_FTAG_FWD > > + /* Enable use of FTAG bit in TX descriptor, PFVTCTL > > + * register is read-only for VF. > > + */ > > + if (hw->mac.type =3D=3D fm10k_mac_pf) > > + FM10K_WRITE_REG(hw, FM10K_PFVTCTL(i), > > + > > FM10K_PFVTCTL_FTAG_DESC_ENABLE); > > + else { > > + PMD_INIT_LOG(ERR, "FTAG is not supported in > > VF.\n"); >=20 > "\n" is not necessary. Yes, PMD_INIT_LOG has already included a "\n". I will remove it. >=20 > > + return -1; >=20 > Return "-ENOTSUP"? >=20 Yes, "-ENOTSUP" is meaningful, thanks for your comments, I'll fix it in v3. Best Regards, Wang Xiao > > + } > > +#endif > > > > /* set location and size for descriptor ring */ > > FM10K_WRITE_REG(hw, FM10K_TDBAL(i),