vpp.git
7 years agoFix LISP locator pair selection 54/1554/4
Florin Coras [Mon, 13 Jun 2016 16:37:15 +0000 (18:37 +0200)]
Fix LISP locator pair selection

Make sure when selecting the local and remote locator pair for a
data-plane tunnel that the local locator has a route, in the FIB,
to the remote one.

Change-Id: Idbc8a28a8ede786c11ef98cb18eba4a78c4a228e
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoFix remote mapping CLI for unset v6 local eid 71/1571/2
Florin Coras [Wed, 15 Jun 2016 15:13:28 +0000 (17:13 +0200)]
Fix remote mapping CLI for unset v6 local eid

If when configuring a remote v6 mapping the local eid is not set,
configuration fails because the code expects local (default v4) and
remote eids to have the same AFI.

Change-Id: If791d2e8a104ea36603576f8b2797cc07bc2654b
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoVPP-137: VPP sends ARP with wrong requested IP 47/1547/2
Neale [Tue, 14 Jun 2016 17:44:02 +0000 (18:44 +0100)]
VPP-137: VPP sends ARP with wrong requested IP

Change-Id: I01802f3dab04c940e65236ba6e680f1e504a0a5f
Signed-off-by: Neale <nranns@cisco.com>
7 years agoAdd dpdk per-interface startup config parameter to support rss-flag 52/1552/2
Srivatsa Sangli [Tue, 14 Jun 2016 20:10:55 +0000 (13:10 -0700)]
Add dpdk per-interface startup config parameter to support rss-flag

New parameter allows specifying rss-flag - one or more of following
ipv4-frag ipv4-tcp ipv4-udp ipv4-sctp ipv4-other ipv4
ipv6-tcp-ex ipv6-udp-ex ipv6-frag ipv6-tcp ipv6-udp
ipv6-sctp ipv6-other l2-payload ipv6-ex ipv6

Sample config:

dpdk {
    dev 0000:86:00.0 {
        rss {
            ipv4
            ipv4-tcp
            ipv4-udp
        }
    }
}

Change-Id: I33c047d69ef8710b8ba3c7e1a1964d5d54f6e880
Signed-off-by: Srivatsa Sangli <srivrama@cisco.com>
7 years agoAdd dpdk per-interface startup config parameter to specify worker threads 33/1533/3
Damjan Marion [Mon, 13 Jun 2016 22:36:09 +0000 (00:36 +0200)]
Add dpdk per-interface startup config parameter to specify worker threads

New parameter allows specifying which worker threads will process rx
queues. Parameter arguments is list of cores and number of worker specified
must be equal to the number of rx queues configured (num-rx-queues). If
num-rx-queues is not specified, it will be automatically set to
number of workers.

Sample config:

dpdk {
  dev 0000:86:00.0 {
    workers 2,3
    num-rx-queues 2
  }
}

Change-Id: I88bc381e0e542eb02def09a726c6f04de3e1ae17
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoReset new indirect adjacdncy template before using it 45/1545/2
Damjan Marion [Tue, 14 Jun 2016 16:11:52 +0000 (18:11 +0200)]
Reset new indirect adjacdncy template before using it

Change-Id: Ia69ba39364d4dfa1403c8fbb77b7990226bbcb85
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix node siblings 91/1491/4
Ole Troan [Fri, 10 Jun 2016 11:22:36 +0000 (13:22 +0200)]
Fix node siblings

Siblings did not work at all. Fixed by generating sibling relationships
earlier in vlib_node_main_init(). Also adding a node dynamically before
nodes were initialised failed for sibling nodes.

Change-Id: I2fb73eb33a6f5ee216f566074e18ed495e20634d
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agogitignore change due to DPDK download suffix change 44/1544/2
Keith Burns (alagalah) [Tue, 14 Jun 2016 16:10:53 +0000 (09:10 -0700)]
gitignore change due to DPDK download suffix change

Change-Id: Idc86d3435e742f3cb96cb9eb1d85b0fdc6a40fc5
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
7 years agoRetire io threads and main-thread-io mode 31/1531/2
Damjan Marion [Mon, 13 Jun 2016 20:49:44 +0000 (22:49 +0200)]
Retire io threads and main-thread-io mode

Change-Id: I64f5ec5e32f200834c63ec3b304f9f20cef332a7
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix double-enqueued packet in interface-output dual-loop, fixes VPP-116 02/1502/2
Damjan Marion [Fri, 10 Jun 2016 17:26:54 +0000 (19:26 +0200)]
Fix double-enqueued packet in interface-output dual-loop, fixes VPP-116

When speculative enqueue fails and a buffer needs to be moved to a new
node queue the original buffer is not correctly removed from the
original queue so buffer get send for transmit and encryption at the
same time. This issue will only be hit with the double loop so low
throughput traffic like pings will not hit the issue. This code path is
also only hit when the feature flag is enabled so will not be hit by
normal traffic

Patch also reorgnizes code to reduce number of branches in the interface
output node loop.

Change-Id: I3653400e58bdfd833e6c42823bab51586128b54b
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoCleanup /dev/shm before starting VPP from top-level Makefile 30/1530/2
Damjan Marion [Mon, 13 Jun 2016 19:06:20 +0000 (21:06 +0200)]
Cleanup /dev/shm before starting VPP from top-level Makefile

Change-Id: I3a8b85ad033707552b9df7d0d08548517a8571ce
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd sw_if_index to af_packet_create and various clean ups 34/1534/3
Keith Burns (alagalah) [Mon, 13 Jun 2016 23:56:04 +0000 (16:56 -0700)]
Add sw_if_index to af_packet_create and various clean ups

Change-Id: I4c2972b55d5d99f3aa7a05885791eef47351c734
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
7 years agoFix name confusion for gre interface index. 36/1536/1
Hongjun Ni [Tue, 14 Jun 2016 17:22:22 +0000 (01:22 +0800)]
Fix name confusion for gre interface index.

Change from free_vxlan_tunnel_hw_if_indices to free_gre_tunnel_hw_if_indices.

Change-Id: I32f04f2b6b28fcf80d2fc0c37c67e343317dce7c
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoFix NULL-pointer crash in handoff_init(...) 32/1532/1
Dave Barach [Mon, 13 Jun 2016 22:16:27 +0000 (18:16 -0400)]
Fix NULL-pointer crash in handoff_init(...)

Change-Id: If403f83b4e918e81e7b2e90dfca14960ad2c6aa6
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoAdd worker-handoff node 49/1449/6
Damjan Marion [Tue, 7 Jun 2016 23:37:11 +0000 (01:37 +0200)]
Add worker-handoff node

worker-handoff node is universal node which taakes packets
from the input node and hands them over to worker threads.
Currently it supports flow hashing based on ipv4, ipv6 and
mpls headers.

New cli:

set interface handoff <intrerface-name> workers <list>

e.g.

set interface handoff TenGigabitEthernet2/0/0 workers 3-6,9-10

Change-Id: Iaf0df83e69bb0e84969865e0e1cdb000b0864cf5
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd vxlan-gpe tunnel to sw_interface_dump 25/1425/3
Hongjun Ni [Tue, 7 Jun 2016 17:07:12 +0000 (01:07 +0800)]
Add vxlan-gpe tunnel to sw_interface_dump

Patchset 2: rebuild

Change-Id: I3375d6c9c7e18ab46896552614369b9d77ee6004
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoExplicity specify IP address type for format_ip46_address function 25/1525/3
Damjan Marion [Tue, 24 May 2016 21:19:11 +0000 (23:19 +0200)]
Explicity specify IP address type for format_ip46_address function

Change-Id: I3379517535a98a7a5fbd3173503f288a81378821
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-117: Fix ip4 and ip6 lookup and rewrite traces 26/1526/1
Pierre Pfister [Mon, 13 Jun 2016 09:28:09 +0000 (10:28 +0100)]
VPP-117: Fix ip4 and ip6 lookup and rewrite traces

Previous patch was printing wrong data since rewrite node traces
an ethernet packet while other ip nodes trace an IP packet.

This patch introduces different tracing functions for:
- lookup node (where the fib index is valid)
- rewrite node (where an ethernet frame is available)
- other ip nodes (only the ip header is traced)

Change-Id: I5971a2e89ae8668f5aed4a410565a5f27e01fc22
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
(cherry picked from commit 584b99a0120778108bd019b697639fbf3c1505d1)

7 years agoFix next-protocol issue configured from Honeycomb 11/1511/2
Hongjun Ni [Sun, 12 Jun 2016 10:45:25 +0000 (18:45 +0800)]
Fix next-protocol issue configured from Honeycomb

PatchSet 2: rebuild.

Change-Id: I18ee050629129871b44271f92a1e63b661d55c05
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoReturn 0 if no tap interfaces are ready 07/1507/1
Dave Barach [Fri, 10 Jun 2016 22:31:55 +0000 (18:31 -0400)]
Return 0 if no tap interfaces are ready

Otherwise, if tapcli-rx manages to make it into polled-mode, it will
never leave polled mode. This has been wrong since day 1, sometime in
early 2013.

Change-Id: I124e01a48db5abbc4eb5240c8d59f76dc562e9f2
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoCopy missing buffer metadata for ESP transport mode packets 03/1503/1
Damjan Marion [Fri, 10 Jun 2016 18:42:44 +0000 (20:42 +0200)]
Copy missing buffer metadata for ESP transport mode packets

Change-Id: I3f5113533b365366cc3f6ef87858e19879f703cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoNXP dpaa2 platform initial support 89/1489/3
Sachin Saxena [Fri, 10 Jun 2016 11:01:30 +0000 (16:31 +0530)]
NXP dpaa2 platform initial support

 - On ARMv8 aarch64 CPU
 - TARGET is aarch64-linux-gnu
 - Cross compilation enabled with "gcc-linaro-4.9" toolchain

make PLATFORM=dpaa2 TAG=dpaa2 ...

Change-Id: I8faf5c8b0d3c81d33a2834c6429a05c8379309c1
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
7 years agoFix issue: no handler for msg id 13 44/1444/4
Hongjun Ni [Wed, 8 Jun 2016 15:35:24 +0000 (23:35 +0800)]
Fix issue: no handler for msg id 13

Delete send_sw_interface_flags within sw_interface_dump, because send_sw_interface_details has covered the link status.

Change-Id: I8ea8024ff88cfcc5799913762f047767fdb3c79c
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoVPP-133: increase size of cli process stacks 82/1482/2
Dave Barach [Thu, 9 Jun 2016 19:32:48 +0000 (15:32 -0400)]
VPP-133: increase size of cli process stacks

Change-Id: Ic488b95b54438028940403b02a5916347c53bd05
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoAdd verbose flag for packet trace, show hexdump in verbose dpdk input trace 77/1477/2
Damjan Marion [Thu, 9 Jun 2016 14:16:27 +0000 (16:16 +0200)]
Add verbose flag for packet trace, show hexdump in verbose dpdk input trace

Verbose trace can be enabled with:

 trace add dpdk-input 1 verbose

Change-Id: If58cfc561143d5a44f7d11e61d54b6835692a0e3
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd format_hexdump function 70/1470/4
Damjan Marion [Thu, 9 Jun 2016 10:38:22 +0000 (12:38 +0200)]
Add format_hexdump function

Function output is compatible with text2pcap tool

Sample output:

00000: 54 68 65 20 71 75 69 63 6b 20 62 72 6f 77 6e 20 [The quick brown ]
00010: 66 6f 78 20 6a 75 6d 70 73 20 6f 76 65 72 20 74 [fox jumps over t]
00020: 68 65 20 6c 61 7a 79 20 64 6f 67 00             [he lazy dog.]

Change-Id: If77ec7d91b77146df770698e0cf35fe2f6dd0821
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-117: Add trace to ip4 and ip6 lookup nodes 76/1476/2
Pierre Pfister [Wed, 8 Jun 2016 11:23:21 +0000 (12:23 +0100)]
VPP-117: Add trace to ip4 and ip6 lookup nodes

The absence of trace in ip lookup nodes is misleading to many people.
This patch adds ip lookup tracing and therefore contribute to
worldwide happiness.

In addition, this patch makes sure sw_if_index[VLIB_TX] is
considered when tracing the fib_index value. In ip4/6-rewrite,
the value corresponds to the tx interface index. The formatting
function is therefore modified to take that case into account.

Change-Id: I5915f0446a15c45e391eedfdfcedd9057aa6a237
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
7 years agoVPP-106: fix performance hit due to unprefetched data read 72/1472/2
Dave Barach [Thu, 9 Jun 2016 12:39:47 +0000 (08:39 -0400)]
VPP-106: fix performance hit due to unprefetched data read

Change-Id: I1325b60b6deadcb51631e178011a31ee70c06cc7
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoFix DPDK init crash if bonded interface is created by startup conf 64/1464/2
John Lo [Thu, 9 Jun 2016 03:21:35 +0000 (23:21 -0400)]
Fix DPDK init crash if bonded interface is created by startup conf

Change-Id: I4d7d4a56aba010aa868b1f4c2c4e8db0b4c21fd7
Signed-off-by: John Lo <loj@cisco.com>
7 years agoVPP-119: JVpp notifications 29/1329/10
Maros Marsalek [Tue, 31 May 2016 15:45:16 +0000 (17:45 +0200)]
VPP-119: JVpp notifications

- add notification DTOs to JVpp
- add notification callbacks
- add notification registry
- provide/implement notification registry from future and callback facades

Change-Id: I1060ef2ec8ba1eb2e8cff279c93b73aa7c9f9aee
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
7 years agoHONEYCOMB-67 Introduce exception handling into JVPP 84/1184/18
Tibor Sirovatka [Wed, 18 May 2016 12:54:50 +0000 (14:54 +0200)]
HONEYCOMB-67 Introduce exception handling into JVPP

Send calls throws VppInvocationException on failure
Failed requests (negative retval) reported over onError callback interface method
Removed retval attributes from dto/xxxReply.java calls

Change-Id: Ibd4e90c320d080e02d75b4bd056a7b11c8e37aa7
Signed-off-by: Tibor Sirovatka <tsirovat@cisco.com>
7 years agoVPP-127 Removed spurious use of sudo 62/1462/2
Ed Warnicke [Thu, 9 Jun 2016 00:49:40 +0000 (19:49 -0500)]
VPP-127 Removed spurious use of sudo

Change-Id: I1eb18fc6379db30fb802e3b929931788f54e7dc2
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoVPP-129: Add build-root/scripts/csit-test-branch script 43/1343/6
Ed Warnicke [Wed, 1 Jun 2016 14:55:52 +0000 (09:55 -0500)]
VPP-129: Add build-root/scripts/csit-test-branch script

This script returns the csit branch that should be used
for testing and verification.

Related to csit patch:
https://gerrit.fd.io/r/#/c/1344/

Change-Id: I51e44e4ba4dc433056ac8a870f8b7c7f9518189b
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoVPP-115: Remove stale ACL CLIs which are not supported 56/1456/3
John Lo [Wed, 8 Jun 2016 20:08:48 +0000 (16:08 -0400)]
VPP-115: Remove stale ACL CLIs which are not supported

The old ACL CLIs still show up in CLI help which can confuse users.

Change-Id: I9a3722d3d649c4370df6a09b2c07628e7e4aa0f4
Signed-off-by: John Lo <loj@cisco.com>
7 years agoVPP-127: Make rpm/deb provide vpp group to access vpp-api 60/1460/2
Ed Warnicke [Wed, 8 Jun 2016 22:15:08 +0000 (17:15 -0500)]
VPP-127: Make rpm/deb provide vpp group to access vpp-api

Change-Id: I80b7f55034d64ad8360e29c669002948317c64ba
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoVPP-124: Fix rpms to work out of the box. 53/1453/1
Ed Warnicke [Wed, 8 Jun 2016 19:41:40 +0000 (14:41 -0500)]
VPP-124: Fix rpms to work out of the box.

Currently, for vpp we are not building any rpms for dpdk or igb_uio.
This is because uio_pci_generic as shipped with centos works with vpp.
However, our vpp rpms do not install kernel module uio_pci_generic at
start up and the /etc/vpp/startup.conf does not configure vpp to use
uio_pci_generic.

vpp rpms should do both, so that when the vpp rpm is installed and
vpp started, it just works out of the box.

This patch fixes the rpms to do so.

Change-Id: Ib934b51f9271cded466d235aa4044bef75c35960
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoIncrease jvpp connection timeout 20/1420/3
Maros Marsalek [Mon, 6 Jun 2016 13:34:54 +0000 (15:34 +0200)]
Increase jvpp connection timeout

Change-Id: I4d52c113336deac80dfcbad91b21a7a70eea2213
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
7 years agoVPP-83: fix collateral damage 41/1441/1
Dave Barach [Tue, 7 Jun 2016 21:35:38 +0000 (17:35 -0400)]
VPP-83: fix collateral damage

Accidentally removed pthread_mutex_unlock (&root_rp->mutex) in the
dead client scan case. Oops. Bad idea.

Change-Id: I488b7e39d01c267052785bd346e8846351db90a9
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoFix missing null termination in DPDK EAL Args 39/1439/1
Damjan Marion [Tue, 7 Jun 2016 19:49:56 +0000 (21:49 +0200)]
Fix missing null termination in DPDK EAL Args

Change-Id: I8292628ad359a19e02ff79568d773ad2b1af51ec
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdjust buffer data offset based on rte_mbuff data_off 35/1435/2
Damjan Marion [Thu, 18 Feb 2016 09:11:34 +0000 (10:11 +0100)]
Adjust buffer data offset based on rte_mbuff data_off

This commit removes assumption that all packets have
data offset equal to RTE_PKTMBUF_HEADROOM. Some drivers
like fm10K receive packets with different data offset.

Change-Id: I0aba6296458dab9df6fff639b4b827b2084ddc3e
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoRebase DPDK patches 28/1428/2
Damjan Marion [Tue, 7 Jun 2016 10:46:55 +0000 (12:46 +0200)]
Rebase DPDK patches

Change-Id: I3ef9faceb085bd06b55e3ba7800389eaae56177a
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-110: vxlan encap node should never touch a deleted tunnel 31/1431/1
John Lo [Tue, 7 Jun 2016 13:14:07 +0000 (09:14 -0400)]
VPP-110: vxlan encap node should never touch a deleted tunnel

Remove usage of dummy encap string for output from BD to a tunnel which
has been deleted. Instead, use a node l2-outpt-del-tunnel so that if
there are stale entries in the L2FIB for any deleted tunnel sw_if_index,
l2-output will send packets using this entry to the l2-output-tunnel-del
node which just setup the proper drop reason before sending packets
to the error-drop node to drop the packet.

Change-Id: I590982ee25e924ab74e2855c55c58baf29a9fad4
Signed-off-by: John Lo <loj@cisco.com>
7 years agoMulticore support for vCGN 91/1291/4
Shesha Sreenivasamurthy [Tue, 7 Jun 2016 00:10:20 +0000 (17:10 -0700)]
Multicore support for vCGN

    Locks are used while populating DB, which is once
    once per entry. Therefore, it is not in the performance
    critical path. Each thread is a PMD, therefore, spin locks
    are used instead of mutexes.

Change-Id: I4bc297f73a8f3eafebed1f00e51ec75ca24163f6
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
7 years agoAdd u32[] type handling in reply messages to jvpp 14/1414/3
Marek Gradzki [Mon, 6 Jun 2016 10:36:09 +0000 (12:36 +0200)]
Add u32[] type handling in reply messages to jvpp

Change-Id: I9fd0cd49e4636d5d8978567fa914487785035c8a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoFix link down issue of vxlan-gpe interface 24/1424/2
Hongjun Ni [Tue, 7 Jun 2016 10:43:05 +0000 (18:43 +0800)]
Fix link down issue of vxlan-gpe interface

Change-Id: Iaf72e7ffb2d30799733f641d66bbc74f40a4d6e1
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoIPv6 HBH: Refactor code. Separate out RFC2460 HBH handling and the more experimental 37/1237/7
Ole Troan [Tue, 24 May 2016 09:56:58 +0000 (11:56 +0200)]
IPv6 HBH: Refactor code. Separate out RFC2460 HBH handling and the more experimental
          IOAM code. Support dynamically adding options. By default
          only process HBH if explicitly configured to. Otherwise we'll just set
          ourselves up to be a victim of DOS.

Change-Id: I41cdfdc00aeaa0cf568e4463440b89be761b6b7d
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoONE-18: Fix trailing garbage string in LISP status dump API 15/1415/2
Filip Tehlar [Mon, 6 Jun 2016 11:13:16 +0000 (13:13 +0200)]
ONE-18: Fix trailing garbage string in LISP status dump API

Change-Id: I5cba5eae5a981e41df3f227834a079e10982537f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoAdd startup conf options to set per-interface descriptor ring size 17/1417/1
Damjan Marion [Mon, 6 Jun 2016 11:21:04 +0000 (13:21 +0200)]
Add startup conf options to set per-interface descriptor ring size

This patch introduces following 2 startup options:

  num-rx-desc
  num-tx-desc

Which can be specified under the dpdk { dev PCI_ADDR {...} } or
dpdk { dev default {...} } .

"show hardware" output is extended to display what is set:

TenGigabitEthernet2/0/0            5    down  TenGigabitEthernet2/0/0
  Ethernet address 90:e2:ba:96:d0:54
  Intel 82599
    carrier up full duplex speed 10000 mtu 9216
    rx queues 2, rx desc 512, tx queues 2, tx desc 1024
    cpu socket 0

Change-Id: Ia832885c8e5cf0eb0575367e97581e7065934753
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-94: Add build-data directory for plugins and Makefile target 86/1286/3
Pierre Pfister [Fri, 27 May 2016 09:30:13 +0000 (10:30 +0100)]
VPP-94: Add build-data directory for plugins and Makefile target

Commit e36af5f3153 moved sample-plugin a dedicated directory.
The build system could not find sources for sample-plugin-* targets.
This commit adds a dedicated build-data/packages directory for
plugins and moves sample-plugin.mk there.

Change-Id: I9e3ee8858580e86ff6d4f7317300df0a5e239a01
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
7 years agoVPP-112: linux kernel info missing from build log 95/1395/2
Dave Wallace [Fri, 3 Jun 2016 21:09:11 +0000 (17:09 -0400)]
VPP-112: linux kernel info missing from build log

Change-Id: I343418d409d682b00e74e41236382fdc6b3c780c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 years agoVPP-113: BVI shall filter unicast DMAC for L2 to L3 forwading 03/1403/2
John Lo [Sat, 4 Jun 2016 04:02:37 +0000 (00:02 -0400)]
VPP-113: BVI shall filter unicast DMAC for L2 to L3 forwading

As BVI receive a packet with unicast DMAC from the BD, including unknown
unicast flood packet, the packet should not be L3 forwarded unless its
DMAC matches the MAC of the BVI.

Change-Id: I46e18629c901062592c8ebe3a238c5cfdc1096b4
Signed-off-by: John Lo <loj@cisco.com>
7 years agoAdd per-device startup config support 94/1294/8
Damjan Marion [Wed, 25 May 2016 18:11:33 +0000 (20:11 +0200)]
Add per-device startup config support

This change adds support for providing per-interface
parameters in the startup config.

Sample configuration:

  dpdk {
    dev default {
      num-rx-queues 3
      num-tx-queues 3
    }

    dev 0000:02:00.0 {
      num-rx-queues 2
      num-tx-queues 2
    }

    dev 0000:02:00.1
  }

Change-Id: Ia7d9ae2ac9c4fd9baaa480d061a395f8a421a722
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agodpdk: download from dpdk.org 80/1380/4
Thomas Monjalon [Thu, 2 Jun 2016 12:52:32 +0000 (14:52 +0200)]
dpdk: download from dpdk.org

The tarball repository fast.dpdk.org is fast and reliable enough
to be used in VPP build process.

Change-Id: Ifaae57d6f8308127b93fc51b2a2a863da5766cd2
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
7 years agoAdd dpdk config parameter: poll-sleep <nn> 04/1404/1
Dave Barach [Sat, 4 Jun 2016 18:10:59 +0000 (14:10 -0400)]
Add dpdk config parameter: poll-sleep <nn>

Sleep <nn> milliseconds after each dpdk input device poll, useful when
oversubscribing CPUs.

Change-Id: I90ad1f21dae7eeeda56bfe845911118aa46f83ec
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVPP-100: Fix IP4 local handling of TCP/IP fragmented packet 01/1401/1
John Lo [Sat, 4 Jun 2016 00:48:31 +0000 (20:48 -0400)]
VPP-100: Fix IP4 local handling of TCP/IP fragmented packet

Fix previous change that does not work on little endian machines.
Use inline call ip4_is_fragment() which is endian neutral.

Change-Id: I5a35d89d936650ab6c628dfc388b8c992a74a589
Signed-off-by: John Lo <loj@cisco.com>
7 years agoSample plugin moved to .../plugins/sample-plugin 92/1392/1
Dave Barach [Fri, 3 Jun 2016 19:27:05 +0000 (15:27 -0400)]
Sample plugin moved to .../plugins/sample-plugin

Change-Id: I6de20c9883d6918899c4b5b03e900814961e824d
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVPP-107 Fix for mistake that breaks pkg-rpm in 68/1368/2
Ed Warnicke [Thu, 2 Jun 2016 22:38:22 +0000 (17:38 -0500)]
VPP-107 Fix for mistake that breaks pkg-rpm in
https://gerrit.fd.io/r/#/c/1338/

Change-Id: I8b7fffe24cbeb435b18faaada9ef1cea9fd93d39
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoVPP-92 Fixup some srv6 issues 66/1266/6
Chris Luke [Wed, 25 May 2016 18:39:47 +0000 (14:39 -0400)]
VPP-92 Fixup some srv6 issues

Some small fixes to the srv6 code to bring it toward
conformance with draft-previdi-6man-segment-routing-header-05.

- The first segment needs to remain in the segment list.
- The segment list template needs a space for the ultimate
  destination.
- The ultimate destination needs to be inserted into that
  space when adding the SRH.

Change-Id: I66db6912e0128da084f14ceca20918ef67ccff79
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoVPP-106: Patch e40i driver to support VLAN sub-interface 66/1366/2
John Lo [Thu, 2 Jun 2016 19:52:21 +0000 (15:52 -0400)]
VPP-106: Patch e40i driver to support VLAN sub-interface

Check packet for presence of VLAN tag in the MAC header and set
the PKT_RX_VLAN_PKT flag to trigger sub-interface lookup in VPP
ethernet-input node.

Change-Id: Iadbfc59d08ef85efb936c88323a90194f3cd656f
Signed-off-by: John Lo <loj@cisco.com>
7 years agoVPP-91 fix sr tunnel add_del collision check 65/1265/3
Chris Luke [Thu, 2 Jun 2016 15:00:41 +0000 (11:00 -0400)]
VPP-91 fix sr tunnel add_del collision check

The add_del function was not properly checking if a tunnel already
existed; instead it was checking if the given tunnel name existed.
If no tunnel name was given it flat out refused to add a tunnel
even though that is optional.

Cleanup the add/del parameter validation to "do what I expect" it
to do:

When adding a tunnel:
- If a "name" is given, it must not exist.
- The "key" is always checked, and must not exist.

When deleting a tunnel:
- If the "name" is given, and it exists, then use it.
- If the "name" is not given, use the "key".
- If the "name" and the "key" are given, then both must point to the
  same thing.

Change-Id: I9b48ae0203f9664cf8af0f7dc49bf480ddec10d5
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoVPP-100: Fix IPv4 local handling of IP fragmented packets 59/1359/2
John Lo [Thu, 2 Jun 2016 13:28:37 +0000 (09:28 -0400)]
VPP-100: Fix IPv4 local handling of IP fragmented packets

Before VPP is enhenced to do IP reassembly of local packets, just set
the protocol path to "experimental" for now so they will be error-punted
as unknow IP protocol.

Change-Id: I2ffefb0b4205357653ba24d80c722cafd5972fba
Signed-off-by: John Lo <loj@cisco.com>
7 years agoVPP-105 Map API SHM uid/gid name to number 48/1348/1
Chris Luke [Wed, 1 Jun 2016 23:25:49 +0000 (19:25 -0400)]
VPP-105 Map API SHM uid/gid name to number

When providing uid or gid for the API SHM, if non-numeric values
are given look them up in the local system user database and if
found use the values discovered.

Change-Id: I95152f58646643bc44d2af4cbad6338901935c69
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoVPP-83 Allow non-privileged clients to use the vpp binary API. 46/1346/2
Dave Barach [Tue, 31 May 2016 18:05:46 +0000 (14:05 -0400)]
VPP-83 Allow non-privileged clients to use the vpp binary API.

Use the command line argument "api-segment { uid <nnn> gid <nnn> }" to
configure shared memory segment file ownership. Defaults to uid = gid
= 0.  Shared-memory segments are explicitly set to 0770 mode, aka
"rwxrwx---".

Change-Id: Ic5d596b68139add61e7de6ace035c57dfd030111
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVPP-98 Dedicated storage for VXLAN over IPv6 hash keys 25/1325/3
Chris Luke [Tue, 31 May 2016 14:42:14 +0000 (10:42 -0400)]
VPP-98 Dedicated storage for VXLAN over IPv6 hash keys

When creating VXLAN over IPv6 the code was using storage for the
hash key that could later be moved. Since the key is larger than
the word size this was being referenced as a pointer; when the
storage moves that breaks the hash.

Instead allocate dedicated storage for the key.

This patch also includes other minor cleanups, including using
clib_memcpy in places it should be used and some whitespace
fixes.

Change-Id: I579f2cb515853ef56dedcca350fcad08aa6111a9
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agovagrant: disable automatic update on start 40/1340/1
Thomas Monjalon [Wed, 1 Jun 2016 08:02:04 +0000 (10:02 +0200)]
vagrant: disable automatic update on start

The box update requires an internet connection.
It is better to disable it on vagrant start.
It still can be updated with the manual command:
vagrant box update

Change-Id: I04e05ea08477bf36f25672c54d0a057d995d4a42
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
7 years agoFix build-root/scripts/version to not have spurious ~ 38/1338/2
Ed Warnicke [Tue, 31 May 2016 21:04:16 +0000 (14:04 -0700)]
Fix build-root/scripts/version to not have spurious ~

Change-Id: Id28f134e3a4aa19c5756014d53004501db0d0c88
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoFix u16 type handling in jvpp 16/1316/2
Marek Gradzki [Mon, 30 May 2016 19:52:37 +0000 (21:52 +0200)]
Fix u16 type handling in jvpp

Change-Id: I6e5ed2562c65dde6c9f6f085c8b9d40f80684894
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoVPP-102: vHost reconnect to previously used sockets on VPP restart 33/1333/2
John Lo [Tue, 31 May 2016 19:42:40 +0000 (15:42 -0400)]
VPP-102: vHost reconnect to previously used sockets on VPP restart

Change-Id: Ida11bddb52268e0e8513b7b379eeed6103bd48f1
Signed-off-by: John Lo <loj@cisco.com>
7 years agoVPP97: Flooding of pkts with multiple buffers in BD with BVI crashes VPP 36/1336/1
John Lo [Tue, 31 May 2016 20:25:13 +0000 (16:25 -0400)]
VPP97: Flooding of pkts with multiple buffers in BD with BVI crashes VPP

The loopback interface should use vnet_interface_output_no_flatten so
follow-on buffers of a jumbo packet do not get put on the output frame
and be sent back to ethernet-input or l2-input node.

The replication_recycle_callback() function should not assume follow-on
buffers of a jumbo packet are on the buffer free list.

Change-Id: Ide646a6d9b43e82782c0581ea3022a9e70f82582
Signed-off-by: John Lo <loj@cisco.com>
7 years agoFix hash table bogus read in ip6 vxlan-gpe 23/1323/3
Florin Coras [Tue, 31 May 2016 12:53:44 +0000 (15:53 +0300)]
Fix hash table bogus read in ip6 vxlan-gpe

- consistent use of hash_*_mem methods.
- tunnel setup copies the key from the wrong location
- remove extraneous storage for keys copied from the vxlan
  node that is not applicable here

Change-Id: I419fd30a52ba387104abe467c296de85233823d1
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoAdd CLI/API for clearing all remote mappings 21/1321/2
Filip Tehlar [Mon, 30 May 2016 13:57:40 +0000 (15:57 +0200)]
Add CLI/API for clearing all remote mappings

Change-Id: I5aef12d3a9c8daefff52e5f958c504f5d2ff9fd0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoONE-15: Fix duplicate locator, refactoring locator 22/1322/1
Andrej Kozemcak [Thu, 26 May 2016 10:20:08 +0000 (12:20 +0200)]
ONE-15: Fix duplicate locator, refactoring locator

Check duplication locator and clean after locator when remove it.
Refactoring locator_set code.

Change-Id: Ib83cbcddc7a363a60fa5b6a366203d0dc0ea7ca6
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
7 years agoONE-16: Locators are not properly cleaned 01/1301/2
Filip Tehlar [Mon, 30 May 2016 08:39:20 +0000 (10:39 +0200)]
ONE-16: Locators are not properly cleaned

Change-Id: Ia6eaaa9a741e84cbd0ff957cfd9a7143a3d0a977
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoAdd Dump API for VxLAN-GPE tunnel 99/1299/2
Hongjun Ni [Mon, 30 May 2016 11:45:51 +0000 (19:45 +0800)]
Add Dump API for VxLAN-GPE tunnel

Change-Id: I4913fe6c4b1280939147887896aea9b79a9f7f10
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoVPP-84 af_packet retry on EAGAIN, count on errors 34/1234/4
Chris Luke [Tue, 24 May 2016 01:30:26 +0000 (21:30 -0400)]
VPP-84 af_packet retry on EAGAIN, count on errors

When af_packet signals the kernel that there are packets in the tx
ring with sendto() the kernel sometimes responds with EAGAIN.
Previously the af_packet driver would treat any error from sendto()
as fatal.

Whilst there's not much we can do about this, count the errors
and let's try to not die on the spot or sit in a loop forever.

Change-Id: Id76ba5e07b744f1ed6f348ec838a1ac506a381c9
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoVPP-96 ENID driver update for rx of jumbo pkts using muliple mbuf's 96/1296/1
John Lo [Sat, 28 May 2016 02:07:44 +0000 (22:07 -0400)]
VPP-96 ENID driver update for rx of jumbo pkts using muliple mbuf's

Change-Id: I0e985b079da3224f4886e3ee2cece4d046e291eb
Signed-off-by: John Lo <loj@cisco.com>
7 years agoFix VxLAN-GPE add_del API issue 95/1295/1
Hongjun Ni [Sat, 28 May 2016 17:27:14 +0000 (01:27 +0800)]
Fix VxLAN-GPE add_del API issue

Change-Id: I4210b3320d3fe841ba7ff1349b6a52affc047338
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoVPP-95 VXLAN add_del API intermittent failure 89/1289/1
Chris Luke [Fri, 27 May 2016 16:11:24 +0000 (12:11 -0400)]
VPP-95 VXLAN add_del API intermittent failure

The VXLAN add_del API sometimes rejects calls with
VNET_API_ERROR_SAME_SRC_DST when the two parameters are obviously
different. This is because the API code is checking the "is_ip6" flag in
a not-yet initialized area of memory leading to random results.

Also fix help text for vxlan_add_del_tunnel in vat.

This does not change the API; it repairs intermittent failure.

Change-Id: I41863694f478c1f669078f82f69d8cca4841c989
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoFix dpdk march/mtune defaults 85/1285/1
Damjan Marion [Fri, 27 May 2016 08:17:45 +0000 (10:17 +0200)]
Fix dpdk march/mtune defaults

Change-Id: I6e6940c8467a331b37da153bb8a2154c1d165261
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd show command for LISP map resolvers 81/1281/1
Filip Tehlar [Thu, 26 May 2016 14:47:11 +0000 (16:47 +0200)]
Add show command for LISP map resolvers

Change-Id: I3ed6269f9a307b50b56ce04defc2576a139c6add
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoMove dpdk startup config data to separate struct 64/1264/1
Damjan Marion [Wed, 25 May 2016 16:40:13 +0000 (18:40 +0200)]
Move dpdk startup config data to separate struct

This is preparation work for moving DPDK
EAL and mempool initialization to vlib.

Change-Id: I2dc35aa53edec0e07fc2650d630aa625831154c3
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoONE-14: Fix crash when re-enable Lisp 55/1255/1
Andrej Kozemcak [Wed, 25 May 2016 10:43:21 +0000 (12:43 +0200)]
ONE-14: Fix crash when re-enable Lisp

Change-Id: Ib95338d7055dea9036eddb7dff5ca7ccbcb35639
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
7 years agoAdd Vxlan-Gpe over IPv6 36/1236/5
Hongjun Ni [Tue, 24 May 2016 17:16:19 +0000 (01:16 +0800)]
Add Vxlan-Gpe over IPv6

PatchSet4: consolidate code as per comments.

PatchSet3: simplify the code using ip_udp_encap_one/two

PatchSet2: consolidate comments and indent style

Change-Id: Ia8b43f854a46d77e838e198566200ad28fd72472
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoVPP-86: fix array copy in generated JNI code 39/1239/7
Marek Gradzki [Tue, 24 May 2016 11:32:26 +0000 (13:32 +0200)]
VPP-86: fix array copy in generated JNI code

Change-Id: Ic67b3c0623d98c5ee3f1ffa1e1bd9cfb96b233bd
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoFix an issue in format_vxlan_gpe_tunnel 35/1235/1
Hongjun Ni [Mon, 23 May 2016 18:54:10 +0000 (02:54 +0800)]
Fix an issue in format_vxlan_gpe_tunnel

Change-Id: Ib283c75505b787f715e34f5b325dda8a6c2fa125
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoNative VPP driver for Intel Niantic family of NICs 31/1231/3
Damjan Marion [Thu, 12 May 2016 20:14:45 +0000 (22:14 +0200)]
Native VPP driver for Intel Niantic family of NICs

Available only in vpp_lite platform

Change-Id: I09d112af5f7f4521ec25196ecdd8c02c20eedd5f
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoMove rte_delay_us_override so it overrides DPDK 19/1219/2
Todd Foggoa [Sat, 21 May 2016 02:10:34 +0000 (22:10 -0400)]
Move rte_delay_us_override so it overrides DPDK

The current location in the vnet dynamic library does not override the dpdk
weak function as intented. Moving this function to the main app allows the
linker to find the non-weak symbol and override it.

Change-Id: I96c6dc5af2e511cc1f84bd66419c5a4ac96a9541
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
7 years agoCreate /plugins directory, move sample-plugin 29/1229/1
Dave Barach [Mon, 23 May 2016 15:01:58 +0000 (11:01 -0400)]
Create /plugins directory, move sample-plugin

Change-Id: Ia58923c7c98dc04c027c8c5879a4dc5f5b144b8a
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVPP-81: Print interface name after creating an interface with CLI 24/1224/2
Pierre Pfister [Mon, 23 May 2016 11:51:54 +0000 (12:51 +0100)]
VPP-81: Print interface name after creating an interface with CLI

When the CLI is used to create an interface, and whend the operation
succeeds, the newly created interface name is printed-out.

The patch includes the following interfaces types:
- AF_PACKET
- Vhost User
- Netmap
- GRE
- L2TP
- MPLS-GRE
- Loopback

Change-Id: Id518c139ec63a261eae81d2ed95c4cd1f10b5157
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
7 years agoAdd LISP RTR support 11/1211/2
Filip Tehlar [Thu, 19 May 2016 12:25:44 +0000 (14:25 +0200)]
Add LISP RTR support

Change-Id: I8a3770f8f1cd1fde6765b81d35aacaaf4ff98b82
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoChanged JVPP interface for construction and connectivity 93/1093/6
Tibor Sirovatka [Fri, 13 May 2016 08:17:51 +0000 (10:17 +0200)]
Changed JVPP interface for construction and connectivity

Simplified construction, autoconnected; possible connect/close
See updated sample test cases with changed interface usage

Change-Id: Ib53e855880bc414868aa2b9bb8f5df086917e375
Signed-off-by: Tibor Sirovatka <tsirovat@cisco.com>
8 years agoAdd per-thread, per-node runtime stats serialization 02/1102/6
Dave Barach [Fri, 13 May 2016 16:55:01 +0000 (12:55 -0400)]
Add per-thread, per-node runtime stats serialization

Change-Id: Ic4009cdbac67b7cd53c88079439496b9d9dfaa35
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoVPP-80: netmap binary API message element name collision 18/1218/1
Dave Barach [Fri, 20 May 2016 18:43:57 +0000 (14:43 -0400)]
VPP-80: netmap binary API message element name collision

if_name collides w/ ietf-interfaces.yang member name, causing a build-break
in an existing yang-model-based app. Rename to "netmap_if_name".

Change-Id: Id386eacd77343dd15a868c28dacd2b0e4523bc9b
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoVPP-79: fix cross-compilation build break 16/1216/2
Dave Barach [Fri, 20 May 2016 16:56:41 +0000 (12:56 -0400)]
VPP-79: fix cross-compilation build break

.../packages/dpdk.mk must not set $(TARGET). The Makefile fragment
really only needed to use a temporary variable to control the
dpdk Makefile. Simple fix: set $(DPDK_PLATFORM_TARGET) instead.

Change-Id: Ieb61b603bc36ed708a1b1237dc6bc503e90a0b7b
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoVPP-77 Creating VXLAN over IPv6 via API fails 15/1215/1
Chris Luke [Fri, 20 May 2016 16:13:02 +0000 (12:13 -0400)]
VPP-77 Creating VXLAN over IPv6 via API fails

Tunnel dst is incorrectly being set to the requested src address.

Change-Id: I44e2ee475f0572e78d148951c5d4684e85e08ce7
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoAdd policer dump API 90/1190/2
Matus Fabian [Thu, 19 May 2016 06:40:37 +0000 (23:40 -0700)]
Add policer dump API

JIRA: VPP-67

Change-Id: I8fced60a884f1585b1f51002832d47631eea9571
Signed-off-by: Matus Fabian <matfabia@cisco.com>
8 years agoVPP-74 Fix signedness issue when terminal resizes 04/1204/1
Chris Luke [Thu, 19 May 2016 18:23:25 +0000 (14:23 -0400)]
VPP-74 Fix signedness issue when terminal resizes

When re-locating our current viewport into the pager buffer we need to
verify that the new viewport is within the boundaries of the index.
This condition is considered very rare, but nontheless the check is needed.

Unfortunately I assumed the variable was signed; it is not, and the
subtraction can in some cases cause the value to be negative. This is
therefore a bonafide semantic error that may cause problems.

This patch reworks the logic to avoid having to change it to be signed.

Change-Id: I26f0747d38dcc43dd9c092d50f2489b122009e7b
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoRemove unused PCI code 03/1203/2
Damjan Marion [Thu, 19 May 2016 17:19:41 +0000 (19:19 +0200)]
Remove unused PCI code

Change-Id: I1d91c9982823758059f9d6aa699982253930e7ba
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd support for multiple microarchitectures in single binary 75/1075/6
Damjan Marion [Wed, 11 May 2016 21:07:18 +0000 (23:07 +0200)]
Add support for multiple microarchitectures in single binary

 * compiler -march= parameter is changed from native to corei7
   so code is always genereted with instructions which are available
   on the Nehalem microarchitecture (up to SSE4.2)

 * compiler -mtune= parameter is added so code is optimized for
   corei7-avx which equals to Sandy Bridge microarchitecture

 * set of macros is added which allows run-time detection of available
   cpu instructions (e.g. clib_cpu_supports_avx())

 * set of macros is added which allows us to clone graph node funcitons
   where cloned function is optmized for different microarchitecture
   Those macros are using following attributes:
     __attribute__((flatten))
     __attribute__((target("arch=core-avx2)))

   I.e. If applied to foo_node_fn() macro will generate cloned
   functions foo_node_fn_avx2() and foo_node_fn_avx512() (future)
   It will also generate function void * foo_node_fn_multiarch_select()
   which detects available instruction set and returns pointer to the
   best matching function clone.

Change-Id: I2dce0ac92a5ede95fcb56f47f3d1f3c4c040bac0
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd netmap API 66/1066/5
Matus Fabian [Wed, 11 May 2016 11:49:46 +0000 (04:49 -0700)]
Add netmap API

JIRA: VPP-66

Change-Id: I421529fa8eafe5268745a34a4fcd40156defcdf8
Signed-off-by: Matus Fabian <matfabia@cisco.com>