From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 582E67E23 for ; Wed, 10 Dec 2014 02:03:28 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 09 Dec 2014 17:03:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,549,1413270000"; d="scan'208";a="651280105" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 09 Dec 2014 17:03:26 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id sBA13PVR006800 for ; Wed, 10 Dec 2014 09:03:25 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id sBA13Nrs030237 for ; Wed, 10 Dec 2014 09:03:25 +0800 Received: (from jijiangl@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sBA13NDX030233 for dev@dpdk.org; Wed, 10 Dec 2014 09:03:23 +0800 From: Jijiang Liu To: dev@dpdk.org Date: Wed, 10 Dec 2014 09:03:20 +0800 Message-Id: <1418173403-30202-1-git-send-email-jijiang.liu@intel.com> X-Mailer: git-send-email 1.7.12.2 Subject: [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, 10 Dec 2014 01:03:29 -0000 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. The main changes of the tx_checksum command are listed below, 1> add "tx_checksum set tunnel (hw|sw|none) (port-id)" command 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 checksum offload for outer layer, or inner layer, or both. The 'none' option means that user treat tunneling packet as ordinary packet when using the csum forward engine. for example, let say we have a tunnel packet: eth_hdr_out/ipv4_hdr_out/udp_hdr_out/vxlan_hdr/ehtr_hdr_in/ipv4_hdr_in/tcp_hdr_in. one of several scenarios: 1) User requests HW offload for ipv4_hdr_out checksum, and doesn't care is it a tunnelled packet or not. So he sets: tx_checksum set tunnel none 0 tx_checksum set ip hw 0 So for such case we should set tx_tunnel to 'none'. 2> add "tx_checksum set outer-ip (hw|sw) (port-id)" command The command is used to set/clear outer IP flag that is used to tell the NIC that application want hardware offload for outer layer. 3> remove the 'vxlan' option from the "tx_checksum set (ip|udp|tcp|sctp|vxlan) (hw|sw) (port-id)" command 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 inner layer. 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 and TESTPMD_TX_OFFLOAD_NON_TUNNEL_CKSUM flag in test-pmd application. v2 change: redefine the 'none' behaviour for "tx_checksum set tunnel (hw|sw|none) (port-id)" command. v3 change: typo correction in cmdline help Jijiang Liu (3): add outer IP offload capability in librte_ether. add outer IP checksum capability in i40e PMD testpmd command lines of the tx_checksum and csum forwarding rework app/test-pmd/cmdline.c | 201 +++++++++++++++++++++++++++++++++++-- app/test-pmd/csumonly.c | 35 ++++--- app/test-pmd/testpmd.h | 6 +- lib/librte_ether/rte_ethdev.h | 1 + lib/librte_pmd_i40e/i40e_ethdev.c | 3 +- 5 files changed, 218 insertions(+), 28 deletions(-) -- 1.7.7.6