From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D462956B7 for ; Wed, 3 Feb 2016 07:52:39 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 02 Feb 2016 22:52:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,388,1449561600"; d="scan'208";a="41517709" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 02 Feb 2016 22:52:38 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 2 Feb 2016 22:52:38 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 2 Feb 2016 22:52:38 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.172]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.215]) with mapi id 14.03.0248.002; Wed, 3 Feb 2016 14:52:35 +0800 From: "Chen, Jing D" To: "Wang, Xiao W" Thread-Topic: [PATCH v2 1/3] fm10k: enable FTAG based forwarding Thread-Index: AQHRXaeOiED7Yrc7xkG3r/B9DzhR858Z4YeQ Date: Wed, 3 Feb 2016 06:52:35 +0000 Message-ID: <4341B239C0EFF9468EE453F9E9F4604D0443C079@shsmsx102.ccr.corp.intel.com> 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> In-Reply-To: <1454410216-13333-2-git-send-email-xiao.w.wang@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: Wed, 03 Feb 2016 06:52:40 -0000 Hi, Best Regards, Mark > -----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 >=20 > 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. >=20 > 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. >=20 > 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(+) >=20 > 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 >=20 > # > # 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 >=20 > # > # 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"); "\n" is not necessary. > + return -1; Return "-ENOTSUP"? > + } > +#endif >=20 > /* set location and size for descriptor ring */ > FM10K_WRITE_REG(hw, FM10K_TDBAL(i),