DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v3 00/10] Add a VXLAN sample
@ 2015-06-08  3:01 Jijiang Liu
  2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 01/10] examples/tep_termination:initialize the " Jijiang Liu
                   ` (11 more replies)
  0 siblings, 12 replies; 17+ messages in thread
From: Jijiang Liu @ 2015-06-08  3:01 UTC (permalink / raw)
  To: dev

This VXLAN sample simulates a VXLAN Tunnel Endpoint (VTEP) termination in DPDK, which is used to demonstrate the offload and filtering capabilities of i40 NIC for VXLAN packet.

And this sample uses the basic virtio devices management function from vHost example, and the US-vHost interface and tunnel filtering mechanism to direct the traffic to/from a specific VM.

In addition, this sample is also designed to show how tunneling protocols can be handled. For the vHost interface, we do not need to support zero copy/inter VM packet transfer, etc. The approaches we took would be of benefit to you because we put a pluggable structure in place so that the application could be easily extended to support a new tunneling protocol.

The software framework is as follows:


       |-------------------|   |-------------------|
       | VM-1(VNI:100)     |   |  VM-2(VNI:200)    |
       | |------| |------| |   | |------| |------| |
       | |vport0| |vport1| |   | |vport0| |vport1| |
       |-|------|-|------|-|   |-|------|-|------|-|      Guests
                      \         /      
         |-------------\-------/--------|
         |     us-vHost interface       |
         |          |-|----|--|         |
         |     decap| | TEP|  | encap   |       DPDK App
         |          |-|----|--|         |
         |            |    |            |
         |------------|----|------------|
                      |    |     
        |-------------|----|---------------|
        |tunnel filter|    | IP/L4 Tx csum |
        |IP/L4 csum   |    | TSO           |
        |packet type  |    |               |               NIC
        |packet recogn|    |               |
        |-------------|----|---------------|
                      |    |   
                      |    |   
                      |    |   
                     /-------\  
                    VXLAN Tunnel  

The sample will support the followings:
1> Tunneling packet recognition.

2> The port of UDP tunneling is configurable

3> Directing incoming traffic to the correct queue based on the tunnel filter type such as inner MAC address and VNI.

 The VNI will be assigned from a static internal table based on the us-vHost device ID. Each device will receive a unique device ID. The inner MAC will be learned by  the first packet transmitted from a device.

4> Decapsulation of Rx VXLAN traffic. This is a software only operation.

5> Encapsulation of Tx VXLAN traffic. This is a software only operation.

6> Tx outer IP, inner IP and L4 checksum offload

7> TSO support for tunneling packet

The limitations:
1. No ARP support.
2. There are some duplicated source codes because I used  the basic virtio device management function from VHOST sample. Considering that the current VHOST sample is quite complicated and huge enough,  I think we shall have a separate sample for tunneling packet processing.
3. Currently, only the i40e NIC is tested in the sample, but other types of NICs will also be supported if they are able to support tunneling packet filter.

v2 changes:
    Fixed an issue about the 'nb_ports' duplication in check_ports_num().
    Removed the inaccurate comment in main.c
    Fixed an issue about TSO offload.

v3 changes:
    Changed some viriable name that don't follow coding rules.
    Removed the limitation of VXLAN packet size due to TSO support.
    Removed useless 'll_root_used' variable in vxlan_setup.c file.
    Removed defination and use of '_htons'.

Jijiang Liu (10):
  create VXLAN sample framework using virtio device management function 
  add basic VXLAN structures 
  addthe pluggable structures
  implement VXLAN packet processing
  add udp port configuration
  add filter type configuration
  add tx checksum offload configuration
  add TSO offload configuration
  add Rx checksum statistics
  add encapsulation and decapsulation flags


 examples/Makefile                      |    1 +
 examples/tep_termination/Makefile      |   55 ++
 examples/tep_termination/main.c        | 1205 ++++++++++++++++++++++++++++++++
 examples/tep_termination/main.h        |  129 ++++
 examples/tep_termination/vxlan.c       |  262 +++++++
 examples/tep_termination/vxlan.h       |   76 ++
 examples/tep_termination/vxlan_setup.c |  444 ++++++++++++
 examples/tep_termination/vxlan_setup.h |   77 ++
 8 files changed, 2249 insertions(+), 0 deletions(-)
 create mode 100644 examples/tep_termination/Makefile
 create mode 100644 examples/tep_termination/main.c
 create mode 100644 examples/tep_termination/main.h
 create mode 100644 examples/tep_termination/vxlan.c
 create mode 100644 examples/tep_termination/vxlan.h
 create mode 100644 examples/tep_termination/vxlan_setup.c
 create mode 100644 examples/tep_termination/vxlan_setup.h

-- 
1.7.7.6

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

end of thread, other threads:[~2015-06-16 13:38 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-08  3:01 [dpdk-dev] [PATCH v3 00/10] Add a VXLAN sample Jijiang Liu
2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 01/10] examples/tep_termination:initialize the " Jijiang Liu
2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 02/10] examples/tep_termination:define the basic VXLAN port information Jijiang Liu
2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 03/10] examples/tep_termination:add the pluggable structures for VXLAN packet processing Jijiang Liu
2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 04/10] examples/tep_termination:implement " Jijiang Liu
2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 05/10] examples/tep_termination:add UDP port configuration for UDP tunneling packet Jijiang Liu
2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 06/10] examples/tep_termination:add tunnel filter type configuration Jijiang Liu
2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 07/10] examples/tep_termination:add Tx checksum offload configuration for inner header Jijiang Liu
2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 08/10] examples/tep_termination:add TSO offload configuration Jijiang Liu
2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 09/10] examples/tep_termination:add bad Rx checksum statistics of inner IP and L4 Jijiang Liu
2015-06-08  3:01 ` [dpdk-dev] [PATCH v3 10/10] examples/tep_termination:add the configuration for encapsulation and the decapsulation Jijiang Liu
2015-06-08  8:34 ` [dpdk-dev] [PATCH v3 00/10] Add a VXLAN sample Zhang, Helin
2015-06-16  9:00   ` Thomas Monjalon
2015-06-16 12:49     ` Liu, Jijiang
2015-06-16 13:31       ` Thomas Monjalon
2015-06-16 13:38         ` Liu, Jijiang
2015-06-09  9:28 ` Liu, Yong

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).