[dpdk-dev] [PATCH v8 00/18] unified packet type
Liu, Yong
yong.liu at intel.com
Thu Jul 2 10:45:35 CEST 2015
Tested-by: Yong Liu <yong.liu at intel.com>
- 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=0x0
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 detected
Send IPv4+NVGRE+MAC_VLAN+IPv4+TCP packet and verify tunnel packet detected
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 packet
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 detected
Send IPv4+NVGRE+MAC_VLAN+IPv6+TCP packet and verify tunnel packet detected
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 detected
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 detected
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 detected
Send IPV6+NVGRE+MAC_VLAN+IPv4+TCP packet and verify tunnel packet detected
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 detected
Send IPV6+NVGRE+MAC_VLAN+IPv6+TCP packet and verify tunnel packet detected
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 detected
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 detected
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
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 at dpdk.org] On Behalf Of Ananyev, Konstantin
> Sent: Wednesday, June 24, 2015 12:14 AM
> To: Zhang, Helin; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v8 00/18] unified packet type
>
>
>
> > -----Original Message-----
> > From: Zhang, Helin
> > Sent: Tuesday, June 23, 2015 2:50 AM
> > To: dev at dpdk.org
> > Cc: Cao, Waterman; Liang, Cunming; Liu, Jijiang; Ananyev, Konstantin;
> Richardson, Bruce; yongwang at vmware.com;
> > olivier.matz at 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 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.
> >
> > 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 will
> 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 ixgbe
> 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 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.
> >
> > 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 of
> the 1st
> > cache line, to avoid breaking any vectorized PMD storing, as fields of
> > '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 packet
> > 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(-)
> >
> > --
>
> Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
>
> > 1.9.3
More information about the dev
mailing list