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 484415A42 for ; Wed, 7 Jan 2015 14:06:38 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 07 Jan 2015 05:06:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,714,1413270000"; d="scan'208";a="633746344" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by orsmga001.jf.intel.com with ESMTP; 07 Jan 2015 05:06:12 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 7 Jan 2015 21:06:11 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.240]) with mapi id 14.03.0195.001; Wed, 7 Jan 2015 21:06:10 +0800 From: "Qiu, Michael" To: "Liu, Jijiang" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and csum forwarding engine Thread-Index: AQHQFBU1ZLFOqTODxUOXZsqHEI8SZA== Date: Wed, 7 Jan 2015 13:06:09 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286CA4DB9@SHSMSX101.ccr.corp.intel.com> References: <1418173403-30202-1-git-send-email-jijiang.liu@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 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: Wed, 07 Jan 2015 13:06:38 -0000 On 12/10/2014 9:04 AM, Jijiang Liu wrote:=0A= > In the current codes, the "tx_checksum set (ip|udp|tcp|sctp|vxlan) (hw|sw= ) (port-id)" command is not easy to understand and extend, so the patch set= enhances the tx_checksum command and reworks csum forwarding engine due to= the change of tx_checksum command. =0A= > The main changes of the tx_checksum command are listed below,=0A= >=0A= > 1> add "tx_checksum set tunnel (hw|sw|none) (port-id)" command=0A= >=0A= > The command is used to set/clear tunnel flag that is used to tell the NIC= that the packetg is a tunneing packet and application want hardware TX che= cksum offload for outer layer, or inner layer, or both.=0A= >=0A= > The 'none' option means that user treat tunneling packet as ordinary pack= et when using the csum forward engine.=0A= > for example, let say we have a tunnel packet: eth_hdr_out/ipv4_hdr_out/ud= p_hdr_out/vxlan_hdr/ehtr_hdr_in/ipv4_hdr_in/tcp_hdr_in. one of several scen= arios:=0A= >=0A= > 1) User requests HW offload for ipv4_hdr_out checksum, and doesn't care = is it a tunnelled packet or not. So he sets:=0A= >=0A= > tx_checksum set tunnel none 0=0A= >=0A= > tx_checksum set ip hw 0=0A= =0A= Hi Jijiang,=0A= =0A= I have one question, you know lots of command need port-id field like here,= why we do not put port-id just after the command? like below:=0A= =0A= tx_checksum (port-id) set tunnel (hw|sw|none)=0A= =0A= Then for users, if we do not care whether it is a tunneling packet, we just= ignore the field after port-id.=0A= =0A= tx_checksum (port-id)=0A= =0A= For code it maybe simpler to praise command, and better for user.=0A= =0A= What all I mean is, we can put the required parameters just close the comma= nd and put the optional parameters(or can be optional) at the end of the co= mmand line.=0A= =0A= (Command) (required parameter) (optional parameters)=0A= =0A= Thus, it would be a better user experience.=0A= =0A= But just personal idea.=0A= =0A= Thanks,=0A= =0A= Michael=0A= =0A= >=0A= > So for such case we should set tx_tunnel to 'none'.=0A= >=0A= > 2> add "tx_checksum set outer-ip (hw|sw) (port-id)" command=0A= >=0A= > The command is used to set/clear outer IP flag that is used to tell the N= IC that application want hardware offload for outer layer.=0A= >=0A= > 3> remove the 'vxlan' option from the "tx_checksum set (ip|udp|tcp|sctp|= vxlan) (hw|sw) (port-id)" command=0A= >=0A= > The command is used to set IP, UDP, TCP and SCTP TX checksum flag. In the= case of tunneling packet, the IP, UDP, TCP and SCTP flags always concern i= nner layer.=0A= > =0A= > Moreover, replace the TESTPMD_TX_OFFLOAD_VXLAN_CKSUM flag with TESTPMD_TX= _OFFLOAD_TUNNEL_CKSUM flag and add the TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM an= d TESTPMD_TX_OFFLOAD_NON_TUNNEL_CKSUM flag in test-pmd application.=0A= >=0A= > v2 change:=0A= > redefine the 'none' behaviour for "tx_checksum set tunnel (hw|sw|non= e) (port-id)" command.=0A= > v3 change:=0A= > typo correction in cmdline help =0A= >=0A= > Jijiang Liu (3):=0A= > add outer IP offload capability in librte_ether.=0A= > add outer IP checksum capability in i40e PMD=0A= > testpmd command lines of the tx_checksum and csum forwarding rework=0A= >=0A= > app/test-pmd/cmdline.c | 201 +++++++++++++++++++++++++++++++= ++++--=0A= > app/test-pmd/csumonly.c | 35 ++++---=0A= > app/test-pmd/testpmd.h | 6 +-=0A= > lib/librte_ether/rte_ethdev.h | 1 +=0A= > lib/librte_pmd_i40e/i40e_ethdev.c | 3 +-=0A= > 5 files changed, 218 insertions(+), 28 deletions(-)=0A= >=0A= =0A=