From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id EF83D2A5F for ; Mon, 18 Jul 2016 13:14:08 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP; 18 Jul 2016 04:14:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,383,1464678000"; d="scan'208";a="735914369" Received: from adambynes.sh.intel.com (HELO adambynes) ([10.239.129.240]) by FMSMGA003.fm.intel.com with ESMTP; 18 Jul 2016 04:14:05 -0700 Date: Mon, 18 Jul 2016 10:57:05 +0800 From: Zhe Tao To: "Ananyev, Konstantin" Cc: "dev@dpdk.org" , "Wu, Jingjing" Message-ID: <20160718025705.GA22928@intel.com> References: <1467752375-25984-1-git-send-email-zhe.tao@intel.com> <1467865627-23524-1-git-send-email-zhe.tao@intel.com> <2601191342CEEE43887BDE71AB97725836B7B36E@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB97725836B7B3ED@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB97725836B7B3ED@irsmsx105.ger.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2] i40: fix the VXLAN TSO issue 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: Mon, 18 Jul 2016 11:14:09 -0000 On Thu, Jul 07, 2016 at 08:24:43PM +0800, Ananyev, Konstantin wrote: > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev, Konstantin > > Sent: Thursday, July 07, 2016 11:51 AM > > To: Tao, Zhe; dev@dpdk.org > > Cc: Tao, Zhe; Wu, Jingjing > > Subject: Re: [dpdk-dev] [PATCH v2] i40: fix the VXLAN TSO issue > > > > > > > > @@ -215,6 +216,7 @@ parse_vxlan(struct udp_hdr *udp_hdr, > > > > RTE_ETH_IS_TUNNEL_PKT(pkt_type) == 0) > > > > return; > > > > > > > > + *ol_flags |= PKT_TX_TUNNEL_VXLAN; > > Do we always have to setup tunnelling flags here? > Obviously it would mean an extra CTD per packet and might slowdown things. this flag is for tunnelling type, and CTD is based on whether we need to do the external ip offload and TSO.so this flag will not cause one extra CTD. > In fact, I think current patch wouldn't work correctly if > TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM is not set. > So, can we do it only when TSO is enabled or outer IP checksum is enabled? good comments and I aggree with you to let the APP to make sure all the flags driver needed is set. > > > > > info->is_tunnel = 1; > > > > info->outer_ethertype = info->ethertype; > > > > info->outer_l2_len = info->l2_len; > > > > @@ -231,7 +233,9 @@ parse_vxlan(struct udp_hdr *udp_hdr, > > > > > > > > + testpmd_ol_flags, ol_flags); > > > > } > > > > > > > > /* step 4: fill the mbuf meta data (flags and header lengths) */ > > > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > > > > index 049a813..4c987f2 100644 > > > > --- a/drivers/net/i40e/i40e_rxtx.c > > > > +++ b/drivers/net/i40e/i40e_rxtx.c > > > > @@ -801,6 +801,12 @@ i40e_txd_enable_checksum(uint64_t ol_flags, > > > > union i40e_tx_offload tx_offload, > > > > uint32_t *cd_tunneling) > > > > { > > > > + /* Tx pkts tunnel type*/ > > > > + if ((ol_flags & PKT_TX_TUNNEL_MASK) == PKT_TX_TUNNEL_VXLAN) > > > > + *cd_tunneling |= I40E_TXD_CTX_UDP_TUNNELING; > > > > + else if ((ol_flags & PKT_TX_TUNNEL_MASK) == PKT_TX_TUNNEL_GRE) > > > > + *cd_tunneling |= I40E_TXD_CTX_GRE_TUNNELING; > > > > + > > > > As I understand that fix is needed to enable TSO for tunnelling packets, correct? > > For that case, should we setup EIPLEN also, no matter is PKT_TX_OUTER_IP_CKSUM > > is on/off? > > In fact, it seems we have always to setup all 3: EIPLEN, MACLEN and L4TUNLEN, > when L4TUNT != 0. L4TUNT only means the tunnel type, but if we don't want to do the checksum, these fields will not be set > > > > > > > /* UDP tunneling packet TX checksum offload */ > > > > if (ol_flags & PKT_TX_OUTER_IP_CKSUM) { > > > > > > > > @@ -1510,7 +1516,8 @@ i40e_calc_context_desc(uint64_t flags) thanks again for the commets, I will resend the patch Zhe