DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 00/18] software parser for packet type
@ 2016-07-05 15:41 Olivier Matz
  2016-07-05 15:41 ` [dpdk-dev] [PATCH 01/18] doc: add template for release notes 16.11 Olivier Matz
                   ` (18 more replies)
  0 siblings, 19 replies; 71+ messages in thread
From: Olivier Matz @ 2016-07-05 15:41 UTC (permalink / raw)
  To: dev

This patchset introduces a software packet type parser. This
feature is targeted for v16.11.

The goal here is to provide a reference implementation for packet type
parsing. This function will be used by testpmd to compare its result
with the value given by the hardware.

It will also be useful when implementing Rx offload support in virtio
pmd. Indeed, the virtio protocol gives the csum start and offset, but
it does not give the L4 protocol nor it tells if the checksum is
relevant for inner or outer. This information has to be known to
properly set the ol_flags in mbuf.

Olivier Matz (18):
  doc: add template for release notes 16.11
  mbuf: add function to read packet data
  net: move Ethernet header definitions to the net library
  mbuf: move packet type definitions in a new file
  mbuf: add function to get packet type from data
  mbuf: support Vlan in software packet type parser
  mbuf: support QinQ in software packet type parser
  net: add Mpls header structure
  mbuf: support Mpls in software packet type parser
  mbuf: support Ip tunnels in software packet type parser
  net: add Gre header structure
  mbuf: support Gre in software packet type parser
  mbuf: support Nvgre in software packet type parser
  mbuf: get ptype for the first layers only
  mbuf: add functions to dump packet type
  mbuf: clarify definition of fragment packet types
  app/testpmd: dump ptype using the new function
  app/testpmd: display sw packet type

 app/test-pmd/rxonly.c                  | 195 ++-------
 doc/guides/rel_notes/release_16_11.rst | 173 ++++++++
 lib/librte_ether/Makefile              |   3 +-
 lib/librte_ether/rte_ether.h           | 416 -------------------
 lib/librte_mbuf/Makefile               |   7 +-
 lib/librte_mbuf/rte_mbuf.c             |  36 ++
 lib/librte_mbuf/rte_mbuf.h             | 530 ++----------------------
 lib/librte_mbuf/rte_mbuf_ptype.c       | 735 +++++++++++++++++++++++++++++++++
 lib/librte_mbuf/rte_mbuf_ptype.h       | 735 +++++++++++++++++++++++++++++++++
 lib/librte_mbuf/rte_mbuf_version.map   |  16 +
 lib/librte_net/Makefile                |   4 +-
 lib/librte_net/rte_ether.h             | 419 +++++++++++++++++++
 lib/librte_net/rte_gre.h               |  71 ++++
 lib/librte_net/rte_mpls.h              |  64 +++
 14 files changed, 2317 insertions(+), 1087 deletions(-)
 create mode 100644 doc/guides/rel_notes/release_16_11.rst
 delete mode 100644 lib/librte_ether/rte_ether.h
 create mode 100644 lib/librte_mbuf/rte_mbuf_ptype.c
 create mode 100644 lib/librte_mbuf/rte_mbuf_ptype.h
 create mode 100644 lib/librte_net/rte_ether.h
 create mode 100644 lib/librte_net/rte_gre.h
 create mode 100644 lib/librte_net/rte_mpls.h

Test report
===========

Topology:

     dut            
   +-------------+   
   |             |   
   | ixgbe pmd   +---.
   |             |   |
   |             |   |
   | ixgbe linux +---'
   |             |   
   +-------------+   

We will send packets with scapy from the kernel interface to
testpmd with rxonly engine, and check the logs to verify the
packet type.

# compile and run testpmd
cd dpdk.org/
make config T=x86_64-native-linuxapp-gcc
make -j32

mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
echo 256 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
modprobe uio_pci_generic
python tools/dpdk_nic_bind.py -b uio_pci_generic 0000:04:00.0

./build/app/testpmd -l 2,4 -- --total-num-mbufs=65536 -i --port-topology=chained --enable-rx-cksum --disable-hw-vlan-filter --disable-hw-vlan-strip
  set fwd rxonly
  set verbose 1
  start

# on another terminal, run scapy
scapy

eh = Ether(src="00:01:02:03:04:05", dst="00:1B:21:AB:8F:10")
vlan = Dot1Q(vlan=0x666)
eth = "ixgbe2"

class MPLS(Packet):
   name = "MPLS"
   fields_desc =  [ BitField("label", 3, 20),
     BitField("cos", 0, 3),
     BitField("bs", 1, 1),
     ByteField("ttl", 0)  ]

bind_layers(Ether, MPLS, type=0x8847)
bind_layers(GRE, IPv6, type=0x86dd)

v4/udp
======

# scapy
p = eh/IP()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/vlan/IP()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/vlan/vlan/IP()/UDP()/Raw("x"*32)
p.type=0x88A8 # QinQ
sendp(p, iface=eth)
p = eh/MPLS(bs=1)/IP()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IP(options=IPOption('\x83\x03\x10'))/UDP()/Raw("x"*32)
sendp(p, iface=eth)

# displayed in testpmd
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=74 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4 L4_UDP  - sw ptype: L2_ETHER L3_IPV4 L4_UDP  - l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x8100 - length=78 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4 L4_UDP  - sw ptype: L2_ETHER_VLAN L3_IPV4 L4_UDP  - l2_len=18 - l3_len=20 - l4_len=8 - Receive queue=0x0
  PKT_RX_VLAN_PKT
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x88a8 - length=82 - nb_segs=1 - hw ptype: L2_ETHER  - sw ptype: L2_ETHER_QINQ L3_IPV4 L4_UDP  - l2_len=22 - l3_len=20 - l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x8847 - length=78 - nb_segs=1 - hw ptype: L2_ETHER  - sw ptype: L2_ETHER_MPLS  - l2_len=18 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=78 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT L4_UDP  - sw ptype: L2_ETHER L3_IPV4_EXT L4_UDP  - l2_len=14 - l3_len=24 - l4_len=8 - Receive queue=0x0

v4/tcp
======

# scapy
p = eh/IP()/TCP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/vlan/IP()/TCP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/vlan/vlan/IP()/TCP()/Raw("x"*32)
p.type=0x88A8 # QinQ
sendp(p, iface=eth)
p = eh/IP(options=IPOption('\x83\x03\x10'))/TCP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IP()/TCP(options=[('MSS',1200)])/Raw("x"*32)
sendp(p, iface=eth)

# displayed in testpmd
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=86 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4 L4_TCP  - sw ptype: L2_ETHER L3_IPV4 L4_TCP  - l2_len=14 - l3_len=20 - l4_len=20 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x8100 - length=90 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4 L4_TCP  - sw ptype: L2_ETHER_VLAN L3_IPV4 L4_TCP  - l2_len=18 - l3_len=20 - l4_len=20 - Receive queue=0x0
  PKT_RX_VLAN_PKT
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x88a8 - length=94 - nb_segs=1 - hw ptype: L2_ETHER  - sw ptype: L2_ETHER_QINQ L3_IPV4 L4_TCP  - l2_len=22 - l3_len=20 - l4_len=20 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=90 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT L4_TCP  - sw ptype: L2_ETHER L3_IPV4_EXT L4_TCP  - l2_len=14 - l3_len=24 - l4_len=20 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=90 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4 L4_TCP  - sw ptype: L2_ETHER L3_IPV4 L4_TCP  - l2_len=14 - l3_len=20 - l4_len=24 - Receive queue=0x0

v6/udp
======

# scapy
p = eh/IPv6()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/vlan/IPv6()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/vlan/vlan/IPv6()/UDP()/Raw("x"*32)
p.type=0x88A8 # QinQ
sendp(p, iface=eth)
p = eh/IPv6()/IPv6ExtHdrHopByHop()/UDP()/Raw("x"*32)
sendp(p, iface=eth)

# displayed in testpmd
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x86dd - length=94 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6 L4_UDP  - sw ptype: L2_ETHER L3_IPV6 L4_UDP  - l2_len=14 - l3_len=40 - l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x8100 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6 L4_UDP  - sw ptype: L2_ETHER_VLAN L3_IPV6 L4_UDP  - l2_len=18 - l3_len=40 - l4_len=8 - Receive queue=0x0
  PKT_RX_VLAN_PKT
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x88a8 - length=102 - nb_segs=1 - hw ptype: L2_ETHER  - sw ptype: L2_ETHER_QINQ L3_IPV6 L4_UDP  - l2_len=22 - l3_len=40 - l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x86dd - length=102 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT L4_UDP  - sw ptype: L2_ETHER L3_IPV6_EXT L4_UDP  - l2_len=14 - l3_len=48 - l4_len=8 - Receive queue=0x0


v6/tcp
======

# scapy
p = eh/IPv6()/TCP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/vlan/IPv6()/TCP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/vlan/vlan/IPv6()/TCP()/Raw("x"*32)
p.type=0x88A8 # QinQ
sendp(p, iface=eth)
p = eh/IPv6()/TCP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IPv6()/IPv6ExtHdrHopByHop()/TCP(options=[('MSS',1200)])/Raw("x"*32)
sendp(p, iface=eth)

# displayed in testpmd
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x86dd - length=106 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6 L4_TCP  - sw ptype: L2_ETHER L3_IPV6 L4_TCP  - l2_len=14 - l3_len=40 - l4_len=20 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x8100 - length=110 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6 L4_TCP  - sw ptype: L2_ETHER_VLAN L3_IPV6 L4_TCP  - l2_len=18 - l3_len=40 - l4_len=20 - Receive queue=0x0
  PKT_RX_VLAN_PKT
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x88a8 - length=114 - nb_segs=1 - hw ptype: L2_ETHER  - sw ptype: L2_ETHER_QINQ L3_IPV6 L4_TCP  - l2_len=22 - l3_len=40 - l4_len=20 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x86dd - length=106 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6 L4_TCP  - sw ptype: L2_ETHER L3_IPV6 L4_TCP  - l2_len=14 - l3_len=40 - l4_len=20 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x86dd - length=118 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT L4_TCP  - sw ptype: L2_ETHER L3_IPV6_EXT L4_TCP  - l2_len=14 - l3_len=48 - l4_len=24 - Receive queue=0x0


tunnels
=======

# scapy
p = eh/IP()/IP()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IP(options=IPOption('\x83\x03\x10'))/IP()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IP()/IPv6()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IPv6(nh=4)/IP()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IPv6()/IPv6()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IP()/GRE()/IP()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IP(options=IPOption('\x83\x03\x10'))/GRE()/IP()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IP()/GRE(key_present=1)/IP()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IP()/GRE(proto=0x86dd)/IPv6()/UDP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IP()/GRE(proto=0x6558)/Ether()/IP()/UDP()/Raw("x"*32)
sendp(p, iface=eth)

# displayed in testpmd
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=94 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV4 INNER_L4_UDP  - l2_len=14 - l3_len=20 - tunnel_len=0 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT  - sw ptype: L2_ETHER L3_IPV4_EXT TUNNEL_IP INNER_L3_IPV4 INNER_L4_UDP  - l2_len=14 - l3_len=24 - tunnel_len=0 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=114 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV6 INNER_L4_UDP  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV6 INNER_L4_UDP  - l2_len=14 - l3_len=20 - tunnel_len=0 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x86dd - length=114 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6  - sw ptype: L2_ETHER L3_IPV6 TUNNEL_IP INNER_L3_IPV4 INNER_L4_UDP  - l2_len=14 - l3_len=40 - tunnel_len=0 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x86dd - length=134 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6  - sw ptype: L2_ETHER L3_IPV6 TUNNEL_IP INNER_L3_IPV6 INNER_L4_UDP  - l2_len=14 - l3_len=40 - tunnel_len=0 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_GRE INNER_L3_IPV4 INNER_L4_UDP  - l2_len=14 - l3_len=20 - tunnel_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=102 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT  - sw ptype: L2_ETHER L3_IPV4_EXT TUNNEL_GRE INNER_L3_IPV4 INNER_L4_UDP  - l2_len=14 - l3_len=24 - tunnel_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=102 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_GRE INNER_L3_IPV4 INNER_L4_UDP  - l2_len=14 - l3_len=20 - tunnel_len=8 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=118 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_GRE INNER_L3_IPV6 INNER_L4_UDP  - l2_len=14 - l3_len=20 - tunnel_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=112 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_NVGRE INNER_L2_ETHER INNER_L3_IPV4 INNER_L4_UDP  - l2_len=14 - l3_len=20 - tunnel_len=4 - inner_l2_len=14 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x0

L2 or L3 only
=============

# scapy
p = eh/IP()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/IPv6()/Raw("x"*32)
sendp(p, iface=eth)
p = eh/Raw("x"*32)
sendp(p, iface=eth)

port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=66 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x86dd - length=86 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6  - sw ptype: L2_ETHER L3_IPV6  - l2_len=14 - l3_len=40 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0000 - length=60 - nb_segs=1 - hw ptype: L2_ETHER  - sw ptype: L2_ETHER  - l2_len=14 - Receive queue=0x0

fragments
=========

# scapy
p1, p2 = fragment(eh/IP()/UDP()/Raw("x"*32), 32)
sendp(p1, iface=eth)
sendp(p2, iface=eth)
p3, p4 = eh/IP()/GRE(proto=0x6558)/p1, eh/IP()/GRE(proto=0x6558)/p2
sendp(p3, iface=eth)
sendp(p4, iface=eth)

# displayed in testpmd
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=66 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 L4_FRAG  - l2_len=14 - l3_len=20 - l4_len=0 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=60 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 L4_FRAG  - l2_len=14 - l3_len=20 - l4_len=0 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=104 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_NVGRE INNER_L2_ETHER INNER_L3_IPV4 INNER_L4_FRAG  - l2_len=14 - l3_len=20 - tunnel_len=4 - inner_l2_len=14 - inner_l3_len=20 - inner_l4_len=0 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=80 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_NVGRE INNER_L2_ETHER INNER_L3_IPV4 INNER_L4_FRAG  - l2_len=14 - l3_len=20 - tunnel_len=4 - inner_l2_len=14 - inner_l3_len=20 - inner_l4_len=0 - Receive queue=0x0

# scapy
p1, p2 = fragment6(eh/IPv6()/IPv6ExtHdrFragment()/UDP()/Raw("x"*32), 100)
sendp(p1, iface=eth)
sendp(p2, iface=eth)
p3, p4 = eh/IP()/GRE(proto=0x6558)/p1, eh/IP()/GRE(proto=0x6558)/p2
sendp(p3, iface=eth)
sendp(p4, iface=eth)

# displayed in testpmd
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x86dd - length=94 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT  - sw ptype: L2_ETHER L3_IPV6_EXT L4_FRAG  - l2_len=14 - l3_len=48 - l4_len=0 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x86dd - length=70 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT  - sw ptype: L2_ETHER L3_IPV6_EXT L4_FRAG  - l2_len=14 - l3_len=48 - l4_len=0 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=132 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_NVGRE INNER_L2_ETHER INNER_L3_IPV6_EXT INNER_L4_FRAG  - l2_len=14 - l3_len=20 - tunnel_len=4 - inner_l2_len=14 - inner_l3_len=48 - inner_l4_len=0 - Receive queue=0x0
port 0/queue 0: received 1 packets
  src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=108 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_NVGRE INNER_L2_ETHER INNER_L3_IPV6_EXT INNER_L4_FRAG  - l2_len=14 - l3_len=20 - tunnel_len=4 - inner_l2_len=14 - inner_l3_len=48 - inner_l4_len=0 - Receive queue=0x0

-- 
2.8.1

^ permalink raw reply	[flat|nested] 71+ messages in thread

end of thread, other threads:[~2016-10-11 16:24 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-05 15:41 [dpdk-dev] [PATCH 00/18] software parser for packet type Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 01/18] doc: add template for release notes 16.11 Olivier Matz
2016-07-06 11:48   ` Mcnamara, John
2016-07-06 12:00     ` Olivier MATZ
2016-07-05 15:41 ` [dpdk-dev] [PATCH 02/18] mbuf: add function to read packet data Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 03/18] net: move Ethernet header definitions to the net library Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 04/18] mbuf: move packet type definitions in a new file Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 05/18] mbuf: add function to get packet type from data Olivier Matz
2016-07-06  6:44   ` Liang, Cunming
2016-07-06  7:42     ` Olivier MATZ
2016-07-06 11:59       ` Chilikin, Andrey
2016-07-06 12:08         ` Olivier MATZ
2016-07-06 12:21           ` Chilikin, Andrey
2016-07-07  8:19       ` Liang, Cunming
2016-07-07 15:48         ` Olivier Matz
2016-07-08 10:08           ` Liang, Cunming
2016-07-05 15:41 ` [dpdk-dev] [PATCH 06/18] mbuf: support Vlan in software packet type parser Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 07/18] mbuf: support QinQ " Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 08/18] net: add Mpls header structure Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 09/18] mbuf: support Mpls in software packet type parser Olivier Matz
2016-07-06  7:08   ` Liang, Cunming
2016-07-06  8:00     ` Olivier MATZ
2016-07-07  8:48       ` Liang, Cunming
2016-07-07 16:01         ` Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 10/18] mbuf: support Ip tunnels " Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 11/18] net: add Gre header structure Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 12/18] mbuf: support Gre in software packet type parser Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 13/18] mbuf: support Nvgre " Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 14/18] mbuf: get ptype for the first layers only Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 15/18] mbuf: add functions to dump packet type Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 16/18] mbuf: clarify definition of fragment packet types Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 17/18] app/testpmd: dump ptype using the new function Olivier Matz
2016-07-05 15:41 ` [dpdk-dev] [PATCH 18/18] app/testpmd: display sw packet type Olivier Matz
2016-08-29 14:35 ` [dpdk-dev] [PATCH v2 00/16] software parser for " Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 01/16] mbuf: add function to read packet data Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 02/16] net: move Ethernet header definitions to the net library Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 03/16] mbuf: move packet type definitions in a new file Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 04/16] net: introduce net library Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 05/16] net: add function to get packet type from data Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 06/16] net: support Vlan in software packet type parser Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 07/16] net: support QinQ " Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 08/16] net: support Ip tunnels " Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 09/16] net: add Gre header structure Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 10/16] net: support Gre in software packet type parser Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 11/16] net: support Nvgre " Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 12/16] net: get ptype for the first layers only Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 13/16] mbuf: add functions to dump packet type Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 14/16] mbuf: clarify definition of fragment packet types Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 15/16] app/testpmd: dump ptype using the new function Olivier Matz
2016-08-29 14:35   ` [dpdk-dev] [PATCH v2 16/16] app/testpmd: display software packet type Olivier Matz
2016-10-03  8:38   ` [dpdk-dev] [PATCH v3 00/16] software parser for " Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 01/16] mbuf: add function to read packet data Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 02/16] net: move Ethernet header definitions to the net library Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 03/16] mbuf: move packet type definitions in a new file Olivier Matz
2016-10-10 14:52       ` Thomas Monjalon
2016-10-11  9:01         ` Olivier MATZ
2016-10-11 15:51           ` Thomas Monjalon
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 04/16] net: introduce net library Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 05/16] net: add function to get packet type from data Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 06/16] net: support Vlan in software packet type parser Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 07/16] net: support QinQ " Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 08/16] net: support Ip tunnels " Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 09/16] net: add Gre header structure Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 10/16] net: support Gre in software packet type parser Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 11/16] net: support Nvgre " Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 12/16] net: get ptype for the first layers only Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 13/16] mbuf: add functions to dump packet type Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 14/16] mbuf: clarify definition of fragment packet types Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 15/16] app/testpmd: dump ptype using the new function Olivier Matz
2016-10-03  8:38     ` [dpdk-dev] [PATCH v3 16/16] app/testpmd: display software packet type Olivier Matz
2016-10-11 16:24     ` [dpdk-dev] [PATCH v3 00/16] software parser for " Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).