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 C0784592B for ; Fri, 22 May 2015 10:44:33 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 22 May 2015 01:44:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,474,1427785200"; d="scan'208";a="496948065" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 22 May 2015 01:44:31 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t4M8iTFH024796; Fri, 22 May 2015 16:44:29 +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 t4M8iQED017410; Fri, 22 May 2015 16:44:28 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t4M8iPim017406; Fri, 22 May 2015 16:44:25 +0800 From: Helin Zhang To: dev@dpdk.org Date: Fri, 22 May 2015 16:44:06 +0800 Message-Id: <1432284264-17376-1-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1425042696-23162-1-git-send-email-helin.zhang@intel.com> References: <1425042696-23162-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH v5 00/18] unified packet type 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: Fri, 22 May 2015 08:44:34 -0000 Currently only 6 bits which are stored in ol_flags are used to indicate the packet types. This is not enough, as some NIC hardware can recognize quite a lot of packet types, e.g i40e hardware can recognize more than 150 packet types. Hiding those packet types hides hardware offload capabilities which could be quite useful for improving performance and for end users. So an unified packet types are needed to support all possible PMDs. A 16 bits packet_type in mbuf structure can be changed to 32 bits and used for this purpose. In addition, all packet types stored in ol_flag field should be deleted at all, and 6 bits of ol_flags can be save as the benifit. Initially, 32 bits of packet_type can be divided into several sub fields to indicate different packet type information of a packet. The initial design is to divide those bits into fields for L2 types, L3 types, L4 types, tunnel types, inner L2 types, inner L3 types and inner L4 types. All PMDs should translate the offloaded packet types into these 7 fields of information, for user applications. v2 changes: * Enlarged the packet_type field from 16 bits to 32 bits. * Redefined the packet type sub-fields. * Updated the 'struct rte_kni_mbuf' for KNI according to the mbuf changes. * Used redefined packet types and enlarged packet_type field for all PMDs and corresponding applications. * Removed changes in bond and its relevant application, as there is no need at all according to the recent bond changes. v3 changes: * Put the mbuf layout changes into a single patch. * Put vector ixgbe changes right after mbuf changes. * Disabled vector ixgbe PMD by default, as mbuf layout changed, and then re-enabled it after vector ixgbe PMD updated. * Put the definitions of unified packet type into a single patch. * Minor bug fixes and enhancements in l3fwd example. v4 changes: * Added detailed description of each packet types. * Supported unified packet type of fm10k. * Added printing logs of packet types of each received packet for rxonly mode in testpmd. * Removed several useless code lines which block packet type unification from app/test/packet_burst_generator.c. v5 changes: * Added more detailed description for each packet types, together with examples. * Rolled back the macro definitions of RX packet flags, for ABI compitability. Helin Zhang (18): mbuf: redefine packet_type in rte_mbuf ixgbe: support unified packet type in vectorized PMD mbuf: add definitions of unified packet types e1000: replace bit mask based packet type with unified packet type ixgbe: replace bit mask based packet type with unified packet type i40e: replace bit mask based packet type with unified packet type enic: replace bit mask based packet type with unified packet type vmxnet3: replace bit mask based packet type with unified packet type fm10k: replace bit mask based packet type with unified packet type app/test-pipeline: replace bit mask based packet type with unified packet type app/testpmd: replace bit mask based packet type with unified packet type app/test: Remove useless code examples/ip_fragmentation: replace bit mask based packet type with unified packet type examples/ip_reassembly: replace bit mask based packet type with unified packet type examples/l3fwd-acl: replace bit mask based packet type with unified packet type examples/l3fwd-power: replace bit mask based packet type with unified packet type examples/l3fwd: replace bit mask based packet type with unified packet type mbuf: remove old packet type bit masks app/test-pipeline/pipeline_hash.c | 7 +- app/test-pmd/csumonly.c | 10 +- app/test-pmd/rxonly.c | 178 ++++- app/test/packet_burst_generator.c | 10 - examples/ip_fragmentation/main.c | 7 +- examples/ip_reassembly/main.c | 7 +- examples/l3fwd-acl/main.c | 19 +- examples/l3fwd-power/main.c | 5 +- examples/l3fwd/main.c | 71 +- .../linuxapp/eal/include/exec-env/rte_kni_common.h | 4 +- lib/librte_mbuf/rte_mbuf.c | 6 - lib/librte_mbuf/rte_mbuf.h | 514 +++++++++++++- lib/librte_pmd_e1000/igb_rxtx.c | 98 ++- lib/librte_pmd_enic/enic_main.c | 14 +- lib/librte_pmd_fm10k/fm10k_rxtx.c | 30 +- lib/librte_pmd_i40e/i40e_rxtx.c | 786 ++++++++++++++------- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 139 +++- lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 49 +- lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c | 4 +- 19 files changed, 1498 insertions(+), 460 deletions(-) -- 1.9.3