From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 2A1ED106B for ; Thu, 2 Jul 2015 10:46:42 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 02 Jul 2015 01:46:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,391,1432623600"; d="scan'208";a="517687127" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by FMSMGA003.fm.intel.com with ESMTP; 02 Jul 2015 01:46:39 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 2 Jul 2015 16:45:44 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.46]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.168]) with mapi id 14.03.0224.002; Thu, 2 Jul 2015 16:45:36 +0800 From: "Liu, Yong" To: "Ananyev, Konstantin" , "Zhang, Helin" , "dev@dpdk.org" Thread-Topic: [PATCH v8 00/18] unified packet type Thread-Index: AQHQrc+kwyGtbyHu70emR4kleJ+GIJ3H6Z7A Date: Thu, 2 Jul 2015 08:45:35 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10E57032@SHSMSX103.ccr.corp.intel.com> References: <1434701661-9943-1-git-send-email-helin.zhang@intel.com> <1435024235-19483-1-git-send-email-helin.zhang@intel.com> <2601191342CEEE43887BDE71AB97725836A1D370@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725836A1D370@irsmsx105.ger.corp.intel.com> Accept-Language: zh-CN, 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 v8 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: Thu, 02 Jul 2015 08:46:43 -0000 Tested-by: Yong Liu - Tested Commit: 7e1fa1de8a536c68f6af76cf8d222a9e948c93ba - OS: Fedora20 3.15.5 - GCC: gcc version 4.8.3 20140911 - CPU: Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz - NIC: Intel Corporation XL710 10-Gigabit SFI/SFP+ [8086:1572] - NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ [8086:10fb] - NIC: Intel Corporation I350 Gigabit Network Connection [8086:1521] - Default x86_64-native-linuxapp-gcc configuration - Prerequisites: Enable CONFIG_RTE_NEXT_ABI in dpdk configuration Disable CONFIG_RTE_IXGBE_INC_VECTOR in dpdk configuration - Total 10 cases, 10 passed, 0 failed - Case: L2 packet type detect Description: check L2 only packet can be normally detected by Fortville Command / instruction: Start testpmd and enable rxonly verbose mode ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 4 -- -i --txqflags= =3D0x0 set fwd rxonly set verbose 1 start Send time sync packet and verify Timesync packet detected Send ARP packet and verify ARP packet detected Send LLDP packet and verify LLDP packet detected - Case: IPv4&L4 packet type detect Description: check L3 and L4 packet can be normally detected Fortville did not detect whether packet contian ipv4 header options, so= L3 type will be shown as IPV4_EXT_UNKNOWN Command / instruction: Start testpmd and enable rxonly verbose mode Send IP only packet and verify L3 packet detected Send IP+UDP packet and verify L3&L4 packet detected Send IP+TCP packet and verify L3&L4 packet detected Send IP+SCTP packet and verify L3&L4 packet detected Send IP+ICMP packet and verify L3&L4 packet detected Send IP fragment+TCP packet and verify L3&L4 packet detected - Case: IPv6&L4 packet type detect Description: check IPv6 and L4 packet can be normally detected Fortville did not detect whether packet contian ipv6 extension options,= so L3 type will be shown as IPV6_EXT_UNKNOWN Command / instruction: Start testpmd and enable rxonly verbose mode Send IPv6 only packet and verify L3 packet detected Send IPv6+UDP packet and verify L3&L4 packet detected Send IPv6+TCP packet and verify L3&L4 packet detected Send IPv6 fragment+TCP packet and verify L3&L4 packet detected - Case: IP in IPv4 tunnel packet type detect Description: check tunnel packet can be normally detected by Fortville Command / instruction: Send IPv4+IPv4 fragment packet and verify tunnel packet detected Send IPv4+IPv4 packet and verify tunnel packet detected Send IPv4+IPv4+UDP packet and verify tunnel packet detected Send IPv4+IPv4+TCP packet and verify tunnel packet detected Send IPv4+IPv4+SCTP packet and verify tunnel packet detected Send IPv4+IPv4+ICMP packet and verify tunnel packet detected Send IPv4+IPv6 fragment packet and verify tunnel packet detected Send IPv4+IPv6 packet and verify tunnel packet detected Send IPv4+IPv6+UDP packet and verify tunnel packet detected Send IPv4+IPv6+TCP packet and verify tunnel packet detected Send IPv4+IPv6+SCTP packet and verify tunnel packet detected Send IPv4+IPv6+ICMP packet and verify tunnel packet detected - Case: IPv6 in IPv4 tunnel packet type detect by niantic Description: check tunnel packet can be normally detected by Niantic Niantic only can detect few types of ip in ip tunnel packets, this case designed to test them. Command / instruction: Send IPv4+IPv6 packet and verify tunnel packet detected Send IPv4+IPv6_EXT packet and verify tunnel packet detected Send IPv4+IPv6+UDP packet and verify tunnel packet detected Send IPv4+IPv6+TCP packet and verify tunnel packet detected Send IPv4+IPv6_EXT+UDP packet and verify tunnel packet detected Send IPv4+IPv6_EXT+TCP packet and verify tunnel packet detected - Case: IP in IPv6 tunnel packet type detect Description: check tunnel packet can be normally detected by Fortville Command / instruction: Send IPv6+IPv4 fragment packet and verify tunnel packet detected Send IPv6+IPv4 packet and verify tunnel packet detected Send IPv6+IPv4+UDP packet and verify tunnel packet detected Send IPv6+IPv4+TCP packet and verify tunnel packet detected Send IPv6+IPv4+SCTP packet and verify tunnel packet detected Send IPv6+IPv4+ICMP packet and verify tunnel packet detected Send IPv6+IPv6 fragment packet and verify tunnel packet detected Send IPv6+IPv6 packet and verify tunnel packet detected Send IPv6+IPv6+UDP packet and verify tunnel packet detected Send IPv6+IPv6+TCP packet and verify tunnel packet detected Send IPv6+IPv6+SCTP packet and verify tunnel packet detected Send IPv6+IPv6+ICMP packet and verify tunnel packet detected - Case: NVGRE tunnel packet type detect Description: check tunnel packet can be normally detected by Fortville Fortville did not distinguish GRE/Teredo/Vxlan packets, all those types will be displayed as GRENAT Command / instruction: Send IPv4+NVGRE fragment packet and verify tunnel packet detected Send IPV4+NVGRE+MAC packet and verify tunnel packet detected Send IPv4+NVGRE+MAC_VLAN packet and verify tunnel packet detected Send IPv4+NVGRE+MAC_VLAN+IPv4 fragment packet and verify tunnel packet detected Send IPv4+NVGRE+MAC_VLAN+IPv4 packet and verify tunnel packet detected Send IPv4+NVGRE+MAC_VLAN+IPv4+UDP packet and verify tunnel packet detec= ted Send IPv4+NVGRE+MAC_VLAN+IPv4+TCP packet and verify tunnel packet detec= ted Send IPv4+NVGRE+MAC_VLAN+IPv4+SCTP packet and verify tunnel packet detected Send IPv4+NVGRE+MAC_VLAN+IPv4+ICMP packet and verify tunnel packet detected Send IPv4+NVGRE+MAC_VLAN+IPv6+IPv6 fragment acket and verify tunnel pac= ket detected Send IPv4+NVGRE+MAC_VLAN+IPv6 packet and verify tunnel packet detected Send IPv4+NVGRE+MAC_VLAN+IPv6+UDP packet and verify tunnel packet detec= ted Send IPv4+NVGRE+MAC_VLAN+IPv6+TCP packet and verify tunnel packet detec= ted Send IPv4+NVGRE+MAC_VLAN+IPv6+SCTP packet and verify tunnel packet detected Send IPv4+NVGRE+MAC_VLAN+IPv6+ICMP packet and verify tunnel packet detected - Case: NVGRE in IPv6 tunnel packet type detect Description: check tunnel packet can be normally detected by Fortville Fortville did not distinguish GRE/Teredo/Vxlan packets, all those types will be displayed as GRENAT Command / instruction: Send IPV6+NVGRE+MAC packet and verify tunnel packet detected Send IPV6+NVGRE+MAC+IPv4 fragment packet and verify tunnel packet detec= ted Send IPV6+NVGRE+MAC+IPv4 packet and verify tunnel packet detected Send IPV6+NVGRE+MAC+IPv4+UDP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC+IPv4+TCP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC+IPv4+SCTP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC+IPv4+ICMP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC+IPv6 fragment packet and verify tunnel packet detec= ted Send IPV6+NVGRE+MAC+IPv6 packet and verify tunnel packet detected Send IPV6+NVGRE+MAC+IPv6+UDP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC+IPv6+TCP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC+IPv6+SCTP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC+IPv6+ICMP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC_VLAN+IPv4 fragment packet and verify tunnel packet detected Send IPV6+NVGRE+MAC_VLAN+IPv4 packet and verify tunnel packet detected Send IPV6+NVGRE+MAC_VLAN+IPv4+UDP packet and verify tunnel packet detec= ted Send IPV6+NVGRE+MAC_VLAN+IPv4+TCP packet and verify tunnel packet detec= ted Send IPV6+NVGRE+MAC_VLAN+IPv4+SCTP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC_VLAN+IPv4+ICMP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC_VLAN+IPv6 fragment packet and verify tunnel packet detected Send IPV6+NVGRE+MAC_VLAN+IPv6 packet and verify tunnel packet detected Send IPV6+NVGRE+MAC_VLAN+IPv6+UDP packet and verify tunnel packet detec= ted Send IPV6+NVGRE+MAC_VLAN+IPv6+TCP packet and verify tunnel packet detec= ted Send IPV6+NVGRE+MAC_VLAN+IPv6+SCTP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC_VLAN+IPv6+ICMP packet and verify tunnel packet detected Send IPV6+NVGRE+MAC_VLAN+IPv6 fragment packet and verify tunnel packet detected - Case: GRE tunnel packet type detect Description: check tunnel packet can be normally detected by Fortville Fortville did not distinguish GRE/Teredo/Vxlan packets, all those types will be displayed as GRENAT Command / instruction: Send IPv4+GRE+IPv4 fragment packet and verify tunnel packet detected Send IPv4+GRE+IPv4 packet and verify tunnel packet detected Send IPv4+GRE+IPv4+UDP packet and verify tunnel packet detected Send IPv4+GRE+IPv4+TCP packet and verify tunnel packet detected Send IPv4+GRE+IPv4+SCTP packet and verify tunnel packet detected Send IPv4+GRE+IPv4+ICMP packet and verify tunnel packet detected Send IPv4+GRE packet and verify tunnel packet detected - Case: Vxlan tunnel packet type detect Description: check tunnel packet can be normally detected by Fortville Fortville did not distinguish GRE/Teredo/Vxlan packets, all those types will be displayed as GRENAT Command / instruction: Add vxlan tunnle port filter on receive port rx_vxlan_port add 4789 0 Send IPv4+Vxlan+MAC+IPv4 fragment packet and verify tunnel packet detec= ted Send IPv4+Vxlan+MAC+IPv4 packet and verify tunnel packet detected Send IPv4+Vxlan+MAC+IPv4+UDP packet and verify tunnel packet detected Send IPv4+Vxlan+MAC+IPv4+TCP packet and verify tunnel packet detected Send IPv4+Vxlan+MAC+IPv4+SCTP packet and verify tunnel packet detected Send IPv4+Vxlan+MAC+IPv4+ICMP packet and verify tunnel packet detected Send IPv4+Vxlan+MAC+IPv6 fragment packet and verify tunnel packet detec= ted Send IPv4+Vxlan+MAC+IPv6 packet and verify tunnel packet detected Send IPv4+Vxlan+MAC+IPv6+UDP packet and verify tunnel packet detected Send IPv4+Vxlan+MAC+IPv6+TCP packet and verify tunnel packet detected=09 Send IPv4+Vxlan+MAC+IPv6+SCTP packet and verify tunnel packet detected Send IPv4+Vxlan+MAC+IPv6+ICMP packet and verify tunnel packet detected Send IPv4+Vxlan+MAC packet and verify tunnel packet detected > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev, Konstantin > Sent: Wednesday, June 24, 2015 12:14 AM > To: Zhang, Helin; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v8 00/18] unified packet type >=20 >=20 >=20 > > -----Original Message----- > > From: Zhang, Helin > > Sent: Tuesday, June 23, 2015 2:50 AM > > To: dev@dpdk.org > > Cc: Cao, Waterman; Liang, Cunming; Liu, Jijiang; Ananyev, Konstantin; > Richardson, Bruce; yongwang@vmware.com; > > olivier.matz@6wind.com; Wu, Jingjing; Zhang, Helin > > Subject: [PATCH v8 00/18] unified packet type > > > > 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 1= 6 > > 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 field= s > 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. > > > > To avoid breaking ABI compatibility, currently all the code changes for > > unified packet type are disabled at compile time by default. Users can > enable > > it manually by defining the macro of RTE_NEXT_ABI. The code changes wil= l > be > > valid by default in a future release, and the old version will be > deleted > > accordingly, after the ABI change process is done. > > > > Note that this patch set should be integrated after another patch set > for > > '[PATCH v3 0/7] support i40e QinQ stripping and insertion', to clearly > solve > > the conflict during integration. As both patch sets modified 'struct > rte_mbuf', > > and the final layout of the 'struct rte_mbuf' is key to vectorized ixgb= e > PMD. > > > > 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 the= n > > 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 rxonl= y > > mode in testpmd. > > * Removed several useless code lines which block packet type unificatio= n > 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. > > > > v6 changes: > > * Disabled the code changes for unified packet type by default, to > > avoid breaking ABI compatibility. > > > > v7 changes: > > * Renamed RTE_UNIFIED_PKT_TYPE to RTE_NEXT_ABI. > > * Integrated with patch set for '[PATCH v3 0/7] support i40e QinQ > stripping > > and insertion', to clearly solve the conflicts during merging. > > > > v8 changes: > > * Moved the field of 'vlan_tci_outer' in 'struct rte_mbuf' to the end o= f > the 1st > > cache line, to avoid breaking any vectorized PMD storing, as fields o= f > > 'packet_type, pkt_len, data_len, vlan_tci, rss' should be in an > contiguous 128 > > bits. > > > > 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 packe= t > > type > > mbuf: remove old packet type bit masks > > > > app/test-pipeline/pipeline_hash.c | 13 + > > app/test-pmd/csumonly.c | 14 + > > app/test-pmd/rxonly.c | 183 +++++++ > > app/test/packet_burst_generator.c | 6 +- > > drivers/net/e1000/igb_rxtx.c | 102 ++++ > > drivers/net/enic/enic_main.c | 26 + > > drivers/net/fm10k/fm10k_rxtx.c | 27 ++ > > drivers/net/i40e/i40e_rxtx.c | 528 > +++++++++++++++++++++ > > drivers/net/ixgbe/ixgbe_rxtx.c | 163 +++++++ > > drivers/net/ixgbe/ixgbe_rxtx_vec.c | 75 ++- > > drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 + > > examples/ip_fragmentation/main.c | 9 + > > examples/ip_reassembly/main.c | 9 + > > examples/l3fwd-acl/main.c | 29 +- > > examples/l3fwd-power/main.c | 8 + > > examples/l3fwd/main.c | 123 ++++- > > .../linuxapp/eal/include/exec-env/rte_kni_common.h | 6 + > > lib/librte_mbuf/rte_mbuf.c | 4 + > > lib/librte_mbuf/rte_mbuf.h | 517 > ++++++++++++++++++++ > > 19 files changed, 1837 insertions(+), 13 deletions(-) > > > > -- >=20 > Acked-by: Konstantin Ananyev >=20 > > 1.9.3