From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E21E95686 for ; Thu, 8 Jan 2015 11:54:45 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 08 Jan 2015 02:51:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,721,1413270000"; d="scan'208";a="658658688" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by fmsmga002.fm.intel.com with ESMTP; 08 Jan 2015 02:54:43 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.195]) by IRSMSX154.ger.corp.intel.com ([169.254.12.15]) with mapi id 14.03.0195.001; Thu, 8 Jan 2015 10:54:42 +0000 From: "Ananyev, Konstantin" To: "Liu, Jijiang" , 'Olivier MATZ' Thread-Topic: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and csum forwarding engine Thread-Index: AQHQFSvOf5ZHcwOIQ0S6LPFf4KIhoZyLUqAAgADVrYCAJ+m7AIAAhGKAgAAcY4CAAAaCgIABXQMAgAAfBJA= Date: Thu, 8 Jan 2015 10:54:41 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258213D3897@irsmsx105.ger.corp.intel.com> References: <1418173403-30202-1-git-send-email-jijiang.liu@intel.com> <54896F4A.4070601@6wind.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC01DA1B70@SHSMSX101.ccr.corp.intel.com> <548B18C9.3020408@6wind.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC01DA7699@SHSMSX101.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB977258213D337B@irsmsx105.ger.corp.intel.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC01DA789E@SHSMSX101.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB977258213D34AE@irsmsx105.ger.corp.intel.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC01DA7CC5@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC01DA7CC5@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] 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 v3 0/3] enhance TX checksum command and csum forwarding engine 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, 08 Jan 2015 10:54:46 -0000 Hi Frank, > -----Original Message----- > From: Liu, Jijiang > Sent: Thursday, January 08, 2015 8:52 AM > To: Ananyev, Konstantin; 'Olivier MATZ' > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and cs= um forwarding engine >=20 > Hi, >=20 > > -----Original Message----- > > From: Ananyev, Konstantin > > Sent: Wednesday, January 7, 2015 8:07 PM > > To: Liu, Jijiang; 'Olivier MATZ' > > Cc: dev@dpdk.org > > Subject: RE: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and > > csum forwarding engine > > > > > > > > > -----Original Message----- > > > From: Liu, Jijiang > > > Sent: Wednesday, January 07, 2015 11:39 AM > > > To: Ananyev, Konstantin; 'Olivier MATZ' > > > Cc: dev@dpdk.org > > > Subject: RE: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum command an= d > > > csum forwarding engine > > > > > > Hi Konstantin, > > > > > > > -----Original Message----- > > > > From: Ananyev, Konstantin > > > > Sent: Wednesday, January 7, 2015 5:59 PM > > > > To: Liu, Jijiang; 'Olivier MATZ' > > > > Cc: dev@dpdk.org > > > > Subject: RE: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum command > > > > and csum forwarding engine > > > > > > > > Hi Frank, > > > > > > > > > -----Original Message----- > > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Liu, Jijiang > > > > > Sent: Wednesday, January 07, 2015 2:04 AM > > > > > To: 'Olivier MATZ' > > > > > Cc: dev@dpdk.org > > > > > Subject: Re: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum comman= d > > > > > and csum forwarding engine > > > > > > > > > > Hi Olivier, > > > > > > > > > > > -----Original Message----- > > > > > > From: Olivier MATZ [mailto:olivier.matz@6wind.com] > > > > > > Sent: Saturday, December 13, 2014 12:33 AM > > > > > > To: Liu, Jijiang > > > > > > Cc: dev@dpdk.org > > > > > > Subject: Re: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum > > > > > > command and csum forwarding engine > > > > > > > > > > > > Hello, > > > > > > > > > > > > On 12/12/2014 04:48 AM, Liu, Jijiang wrote: > > > > > > > The 'hw/sw' option is used to set/clear the flag of enabling > > > > > > > TX tunneling packet > > > > > > checksum hardware offload in testpmd application. > > > > > > > > > > > > This is not clear at all. > > > > > > In your command, there is (hw|sw|none). > > > > > > Are you talking about inner or outer? > > > > > > Is this command useful for any kind of packet? > > > > > > How does it combine with "tx_checksum set outer-ip (hw|sw)"? > > > > > > > > > > > > > > > > I rethink these TX checksum commands in this patch set and agree > > > > > with you that we should make some changes for having clear meanin= g for > > them. > > > > > > > > > > There are 3 commands in patch set as follows, 1. tx_checksum set > > > > > tunnel (hw|sw|none) (port-id) > > > > > > > > > > Now I also think the command 1 may confuse user, they probably > > > > > don't understand why we need 'hw' or 'sw' option and when to us= e > > > > > the two option, so I will replace the command with 'tx_checksum > > > > > set hw-tunnel-mode > > > > (on|off) (port-id)' command. > > > > > > > > I am a bit confused here, could you explain what would be a > > > > behaviour for 'on' and 'off'? > > > > Konstantin > > > > > > I have explained the behaviour for 'on' and'off' below, > > > > > > The command 'tx_checksum set hw-tunnel-mode (on|off) (port-id)' is > > > used to set/clear TESTPMD_TX_OFFLOAD_TUNNEL_CKSUM flag. > > > > > > Actually, the PKT_TX_UDP_TUNNEL_PKT offload flag will be set if the > > > testpmd flag is set, which means to tell HW treat that transmit > > > packet as a tunneling packet to do checksum offload When 'on' is set= , which is > > able to meet Method B.1 and method C. > > > > > > When 'off' is set, the TESTPMD_TX_OFFLOAD_TUNNEL_CKSUM is not needed > > > to set, so the PKT_TX_UDP_TUNNEL_PKT offload flag is not needed to > > > set, then HW treat that transmit packet as a non-tunneling packet. = It is able to > > meet Method B.2. > > > > > > Is the explanation not clear? > > > > Ok, and how I can set method A (testpmd treat all packets as non-tunnel= ling and > > never look beyond outer L4 header) then? > > Konstantin >=20 >=20 > > > > > As to case A, I think it is not mandatory to cover it in csum fwd > > > > > engine for tunneling packet. >=20 > If you think the case A is essential, and it must be covered in csum fwd= , then we can add a command: >=20 > tx_checksum set sw-tunnel-mode (on|off) (port-id) >=20 > if the 'off' is set , csum fwd engine don't check if that packet is a t= unneling packet and treat all packets as non-tunneling and never > look beyond outer L4 header. >=20 > if the 'on' is set, csum fwd engine will check if that packet is a tunne= ling packet. >=20 > And we are able to test all of cases in http://dpdk.org/ml/archives/dev/= 2014-December/009213.html >=20 > Test case A: >=20 > tx_checksum set sw-tunnel-mode off > tx_checksum set hw-tunnel-mode off > tx_checksum set ip hw >=20 > test case B.1: >=20 > tx_checksum set sw-tunnel-mode on > tx_checksum set hw-tunnel-mode on > tx_checksum set ip hw > tx_checksum set tcp hw >=20 > test case B.2: >=20 > tx_checksum set sw-tunnel-mode on > tx_checksum set hw-tunnel-mode off > tx_checksum set ip hw >=20 > test case C: >=20 > tx_checksum set sw-tunnel-mode on > tx_checksum set hw-tunnel-mode on > tx_checksum set outer-ip hw > tx_checksum set ip hw > tx_checksum set tcp hw >=20 >=20 > In addition, the reason of discarding ' tx_checksum set tunnel (hw|sw|n= one) (port-id)' command is that user probably confuse the > following case. > tx_checksum set tunnel sw > tx_checksum set ip hw >=20 > In fact, we are still using hardware TX checksum offload in this case, b= ut the command " tx_checksum set tunnel sw" seems tell user > that software compute the checksum. So ' set hw-tunnel-mode on' implies that ' sw-tunnel-mode' is already set = to 'on'? What would happen if user would do: tx_checksum set sw-tunnel-mode off tx_checksum set hw-tunnel-mode on Or this combination is not allowed?=20 As long as we have all 4 cases covered, I don't really care would it be: tx_checksum set tunnel (hw|sw|none) or=20 tx_checksum set sw-tunnel-mode (on|off) tx_checksum set hw-tunnel-mode (on|off) Though having 2 commands instead of 1 seems like overcomplicating and more= error prone... Might be: tx_checksum set tunnel-mode (none | hw | sw) ? Konstantin >=20 > > > > > > > > > > > > > > > > > 2. tx_checksum set outer-ip (hw|sw) (port-id) 3. tx_checksum set > > > > > (ip|udp|tcp|sctp) (hw|sw) (port-id) > > > > > > > > > > The command 2 will be merged into command 3, the new command is ' > > > > > tx_checksum set (outer-ip|ip|udp|tcp|sctp) (hw|sw) (port- id)'. > > > > > > > > > > These most of the cases in > > > > > http://dpdk.org/ml/archives/dev/2014-December/009213.html will be > > > > > covered by using the two commands > > > > > > > > > > The command 'tx_checksum set hw-tunnel-mode (on|off) (port-id)' > > > > > is used to set/clear TESTPMD_TX_OFFLOAD_TUNNEL_CKSUM flag. > > > > > Actually, the PKT_TX_UDP_TUNNEL_PKT offload flag will be set if > > > > > the testpmd flag is set, which tell driver/HW treat that transmi= t > > > > > packet as a > > > > tunneling packet. > > > > > > > > > > When 'on' is set, which is able to meet Method B.1 and method C. > > > > > > > > > > When 'off' is set, the TESTPMD_TX_OFFLOAD_TUNNEL_CKSUM is not > > > > > needed to set, so the PKT_TX_UDP_TUNNEL_PKT offload flag is not > > > > > needed to set, then > > > > HW treat that transmit packet as a non-tunneling packet. It is abl= e > > > > to meet Method B.2. > > > > > > > > > > As to case A, I think it is not mandatory to cover it in csum fwd > > > > > engine for > > > > tunneling packet. > > > > > > > > > > Is the above description clear for you? > > > > > > > > > > > Regards, > > > > > > Olivier