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 1111C93F6 for ; Tue, 2 Feb 2016 11:03:17 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 02 Feb 2016 02:03:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,384,1449561600"; d="scan'208";a="906629861" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 02 Feb 2016 02:03:17 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 2 Feb 2016 02:03:16 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 2 Feb 2016 02:03:16 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.215]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.218]) with mapi id 14.03.0248.002; Tue, 2 Feb 2016 18:03:15 +0800 From: "Wang, Xiao W" To: "Qiu, Michael" , "Chen, Jing D" Thread-Topic: [dpdk-dev] [PATCH 1/3] fm10k: enable FTAG based forwarding Thread-Index: AQHRV0d6+t1T4xINy0iHnVgAhWaJLp8YkMFQ Date: Tue, 2 Feb 2016 10:03:15 +0000 Message-ID: References: <1453709251-32309-1-git-send-email-xiao.w.wang@intel.com> <1453709251-32309-2-git-send-email-xiao.w.wang@intel.com> <533710CFB86FA344BFBF2D6802E6028622F28C2D@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <533710CFB86FA344BFBF2D6802E6028622F28C2D@SHSMSX101.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 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: Tue, 02 Feb 2016 10:03:18 -0000 > -----Original Message----- > From: Qiu, Michael > Sent: Tuesday, February 2, 2016 11:07 AM > To: Wang, Xiao W ; Chen, Jing D > > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/3] fm10k: enable FTAG based forwarding >=20 > On 1/25/2016 4:08 PM, Wang Xiao W wrote: > > 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 V= F. > > > > Signed-off-by: Wang Xiao W > > --- > > config/common_bsdapp | 1 + > > config/common_linuxapp | 1 + > > drivers/net/fm10k/fm10k_ethdev.c | 8 ++++++++ > > drivers/net/fm10k/fm10k_rxtx.c | 17 +++++++++++++++++ > > drivers/net/fm10k/fm10k_rxtx_vec.c | 9 +++++++++ > > 5 files changed, 36 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..cc8317f 100644 > > --- a/drivers/net/fm10k/fm10k_ethdev.c > > +++ b/drivers/net/fm10k/fm10k_ethdev.c > > @@ -668,6 +668,14 @@ 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); >=20 > So here if somebody enable FTAG, when compile, but he use VF, what will > happen? We'd better to give a error message when he try to use VF with FT= AG. >=20 > Thanks, > Michael Yes, we'd better to give an error message and return failure in this use ca= se, I'll rework the patch. Thanks for your comment.=20 Best Regards, Wang, Xiao W