Initial empty repository
Merge branch 'development' of https://github.com/01org/dpdk-ovs into development
CONTRIBUTING: Tighten rules for patch submission

Signed-off-by: Mark D. Gray <mark.d.gray@intel.com>
Fix build issues

Build is currently failing as some files have been removed
and the permissions on others have changed. This patch
fixes these issues.

Signed-off-by: Mark D. Gray <mark.d.gray@intel.com>
Port NIC TX output: More efficient simpler NIC  TX output

1): Simplified the NIC TX queuing code to make it more efficient, and fit in smaller
CPU cache space.
2): The simple read followed by write algorithm has been proven to operate very
well at near full NIC small packet performance during a substantial number of tests.
3): Eliminated the double access of the queue variables of size check then queue
read eliminating a double CPU cache synchronization of queue variables when
 a write to the queue occurs between the size check and queue read.
4): Eliminated arbitrary process latency by eliminating packets unnecessary being
held for a period of time which increases latency on arbitrary packets, which
could cause processing impacts outside the switch.
5): Optimized by eliminated the extra processing overhead of keeping track and
processing time related operations.
6): Optimized by eliminating the unnecessary clearing of the packet array that will
be written to and read from during the process in a well defined manner.
Optimized by eliminating initialization and use of variables no longer needed.
7): Decoupled the NIC TX pre-queue to TX queue transfer size tuning parameter
from global system tuning to ease future switch related tuning.
8): Eliminated the variable type difference between variables i and sent to prevent
possible additional variable type conversion code during the loop processing
potentially optimizing code size and performance.

This algorithm has been test by more than 50 RFC 2544 Spirent tests that converged
on the maximum zero loss throughput for 64, 128, ... 1518 bytes. Each 2544 test generally
had 50 or more individual test points. With such massive amount of data, it can be
concluded that the algorithm works very well and is very stable at all data rates, even
very high data rates that the current code base that this patch is for, but cannot reach.

Change-Id: I4ec24a72d950bd837d2cdc61da8d9f5a1f9eff2d
Signed-off-by: Mike A. Polehn <mike.a.polehn@intel.com>
New device type: Adds DPDK's userspace vhost device type

This patch integrates DPDK's userspace vhost sample application as an extra
device. Up to 64 vhost devices are supported starting from port 80. Userspace
vhost supports both Legacy and DPDK virtio implementations in the guest. No
modifications to QEMU are required. Included in this patch is the fd_link
kernel module. This module along with the CUSE module are required for
userspace vhost devices to work. The following steps are required to use
vhost devices in ovs_dpdk:

    1) modprobe cuse
    2) insert fd_link.ko kernel module included in this patch.
    3) Define number of devices when launching ovs_dpdk with "-h" option.
    4) Launch ovs_dpdk with "--socket-mem" option so that the application
       does not consume all hugepages.
    4) When launching QEMU, the tap device should be named using the
       convention "ovs_dpdk_<PORTID>".
    5) QEMU should be launched with the following options:
        -mem-prealloc
        -mem-path <Hugepage directory>
        -vhost=on option appended to netdev options
        e.g. -netdev type=tap,id=net1,ifname=ovs_dpdk_80,vhost=on

Change-Id: Ie5a7e32b51588883c8bbec78ab2840428b477056
Reviewed-by: Mark B. Kavanagh <mark.b.kavanagh@intel.com>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Kevin Traynor <kevin.traynor@intel.com>
Reviewed-by: Mark D. Gray <mark.d.gray@intel.com>
Signed-off-by: Anthony Fee <anthonyx.fee@intel.com>
fd_link Makefile: Added "check" targets to Makefile

"check" targets were added as they are required for top level Makefile.

Change-Id: Ia8c5eca88af2643fbaa3e09670077b094e4006ed
Reviewed-by: Mark D. Gray <mark.d.gray@intel.com>
Signed-off-by: Anthony Fee <anthonyx.fee@intel.com>
Vhost devices: Only init when devices used

At the moment userspace vhost is initialised even if vhost devices are
not being used. This patch only initialises vhost if the user passes
the "-h" option to ovs_dpdk. This has been tested with and without vhost
devices.

Change-Id: I40a08e0a5c32a9a8b9e1cb9b92c4f3c86ce27899
Reviewed-by: Mark D. Gray <mark.d.gray@intel.com>
Signed-off-by: Anthony Fee <anthonyx.fee@intel.com>
Merge "Vhost devices: Only init when devices used" into development
Makefile: Fix DPDK build target

DPDK build should be split into a config step and an
install step.

This patch also fixes the patch step which would fail if
the patch was not already applied before trying to revert
it.

Reviewed-by: Meghan Halton <meghan.halton@intel.com>
Signed-off-by: Mark D. Gray <mark.d.gray@intel.com>
Merge "Makefile: Fix DPDK build target" into development
datapath/dpdk-link: add free/alloc queues for vswitchd

- Add free and alloc rings to handle allocation and freeing of packets
  coming from vswitchd.
- Make the vswitchd core (in datapath) periodically dequeue packets from
  free queue and free them.
- Make the vswitchd core (in datapath) periodically allocate packets
  from memory pool and enqueue them into alloc queue.
- Remove pkt_free and pkt_alloc calls from vswitchd code.
- Re-arrange DPDK libraries linking in openvswitch/automake file.

Change-Id: I257d472c6d614c7e917a5cd21ec149350d67cfa5
Reviewed-By: mark.d.gray@intel.com
Signed-off-by: Nicolas Pernas Maradei <nicolasx.pernas.maradei@intel.com>
tests: Fix dpdk-link unit test

- Add missing free and alloc mock queues to test case.
- Remove unit test that checked for failures during mbuf allocation. Not
  valid anymore with new alloc queue model.

Change-Id: Icf51d8f72821665ed57369558a4f742437aa82e9
Signed-off-by: Nicolas Pernas Maradei <nicolasx.pernas.maradei@intel.com>
fd_link - Update licensing

Added correct license headers to fd_link files.

Change-Id: I9a123c46a620e3f39c2991eeef2783a8c8fbbf1f
Reviewed-By: mark.d.gray@intel.com
Signed-off-by: Anthony Fee <anthonyx.fee@intel.com>
ivshmem: ovs-ivshm-mngr utility app and libvport library

- Create a simple utility app to manage main ovs_dpdk objects sharing
  through IVSHMEM. This app resides in utility folder.
- App must be DPDK secondary process having ovs_dpdk running as a
  primary process in the background.
- Command line receives a list of metadata names and port names to be
  included in that IVSHMEM metadata. E.g.

    meta1:port0,port1 meta2:port3.

  Each metadata file will be use with a different VM making the sharing
  process totally isolated and dynamic. In this case we want to share
  ports 0 and 1 with one guest and port 3 with another.
- App is able to share DPDK rings, memzones and mempools.
- Take the port names from ovs_dpdk vport data structure using new library.
- Remove IVSHMEM API references from OVS code.
- Add static library that works as a facade to access vport internals without
  exposing any of its internal implementation.
- Make ivhsmem utility, ovs_client and kni_client use the new library. Remove
  all code duplication in .h files.
- Add vport names checking to allow only alphanumeric names.
- Add unit tests for libvport/ovs-vport API.
- Add stub application to run integration tests without need of
  ovs_dpdk.

Change-Id: I60b814612030d2a69d406eb3a07e6e944e0b0ac8
Reviewed-By: mark.d.gray@intel.com
Signed-off-by: Nicolas Pernas Maradei <nicolasx.pernas.maradei@intel.com>