Compare commits

...

1029 Commits

Author SHA1 Message Date
c6833f804e Fix pretty-printing in "api trace custom-dump" (VPP-683)
This commit is different from the ones in 1704 and master
in that it also adds format_ip6_address which was missing
and is needed by the print functions.

Change-Id: I45a4c28bc54c6e7e01bf42c6c6e38a96a292a31d
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-05-15 21:14:51 +00:00
a558f61eb9 CSIT to oper-rls1701-170205
Change-Id: I628bce9b03e653cb0564770b05c3a47838bdb705
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-15 12:32:17 -07:00
5e323329ed ARP resilience in the absence of IP config on input and output interfaces
Change-Id: Ia9c6790436f8f6337b5351e3017ef5e441a8a4e9
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-08 01:30:17 -08:00
8099e90346 Bump to 17.01.1 Release
Change-Id: I023400208df277df6713303452e7089720792214
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-02 20:22:13 +01:00
e7dcee4027 Ensure sw_if_index to node mapping for L2 output path is only done via l2output_main.next_nodes
Before this commit, several output features that happen to be the
last in the list of features to be executed, send the packets directly
to <interfaceName>-output. To do this, they use l2_output_dispatch,
which builds a list of sw_if_index to next index mappings.

When interfaces are deleted and the new interfaces are created,
these mappings become stale, and cause the packets being sent to wrong
interface output nodes.

This patch (thanks John Lo for the brilliant idea!) adds a feature node "output",
whose sole purpose is dispatching the packets to the correct interface output
nodes. To do that, it uses the l2output_main.next_nodes, which is already
taken care of for the case of the sw_if_index reuse, so this makes the dependent
features all work correctly.

Since this changes the packet path, for the features that were always the last ones
it has triggered a side problem of the output feat_next_node_index not being properly
initalized. These two users are l2-output-classify node and the output nodes belonging
to the acl-plugin.

For the first one the less invasive fix is just to initialize that field.
For the acl-plugin nodes, rewrite the affected part of the code to use
feat_bitmap_get_next_node_index since this is essentially what the conditional
in l2_output_dispatch does, and fix the compiler warnings generated.

Change-Id: If44457b1c1c3e197b78470c08555720d0872c6e5
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-03-02 18:57:47 +01:00
32dfd77df0 Clean up the L2 interface configs when creating the interfaces
Without the cleanup in the L2 input/output configs,
the creation of an interface with sw_if_index belonging
to a previously deleted interface will use the stale
vlan tag push-pop configuration from that interface,
resulting in loss of connectivity when the host receives
tagged packets but expects untagged ones.

Change-Id: Ic186390ef3a41277f57847ed2962848b98379092
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-02-27 21:06:20 +01:00
149745f95e Update default Vagrant box to Ubuntu 16.04, VPP-616
- Hand merge of ed0e49c5 and 46f133d5 into stable/1701

Change-Id: Ib7260f07d22e546c6a92fb713b61b7e5edf247c9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-02-14 15:57:03 +00:00
0debfb1fa2 Plugin Makefiles did not install headers - VPP-631
Change-Id: I9f6fd1a63a9dfa2d2aa386cf0a3c2479525bbcec
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-02-09 14:47:26 -08:00
e23472662c vhost-user: fix missing speculative enqueue unwind
Running trex in a VM with a bad config, trex sent a bogus pack from
the VM to the Virtual interface. It caused a crash.

Change-Id: I64d0197b444265553ab4c24f21e6a962e89cb587
Signed-off-by: Steven <sluong@cisco.com>
2017-02-03 20:56:35 +01:00
43c9c959ff Fix make test scapy python patch issue, VPP-615
Change-Id: I1e6798905f0049c793224a2c880f3b2cfadcf1e7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 6f692d6e5a)
2017-02-03 14:21:41 +00:00
88d9b3be0e Fix issue with apt-get update not being run on Ubuntu 16.04
Change-Id: Ic05b86c4ea9b62afbf03a2a36c4a2ef45f5c140b
Signed-off-by: Ed Warnicke <eaw@cisco.com>
(cherry picked from commit eb82e7f27c)
2017-02-02 02:22:41 +00:00
e5bf04dc3c span: tx functionality
span-output (tx) was enabled on wrong arc_name

Change-Id: Ic21dfaec35c975de79abec66421b353637ac9394
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-01-26 16:02:37 +01:00
4831dc5ddf Fix PAPI async response
Previous changes forgot to return the decoded result

Change-Id: I4eb27802eb2672532d856d9b9671ef806374bcd0
Signed-off-by: Wojciech Dec <wdec@cisco.com>
2017-01-24 17:38:51 +01:00
cd111b2228 Fix plugin version numbers
Change-Id: Ie485e9dfa04747b5e4ba93fdeabc5802dc001d31
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-20 21:58:02 +01:00
7067350c41 vpp-python-api deb packaging - use easy_install to install the python api
(cherry picked from commit 5a68debd81)

Change-Id: Iabad73d6092b4561ba9d4d22a057bb5871d850a6
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2017-01-20 20:29:21 +00:00
fa87080d31 Fix issue in rpm versioning for release builds
Change-Id: I851d472c0838d56ca571f9f9e3ca412ac2107c4e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-20 19:09:22 +01:00
78aab80634 Release notes for release 17.01
Change-Id: I99c0898bb0cb99e1b2a28463245031e74afd401b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-20 16:22:03 +00:00
7104f93c75 Python API: Missing locking of results data structure.
The wrong assumption that the GIL combined with CPython's "mostly"
thread safe assurance does not hold. The combination of a slow
event handler for notification and calling the API at the same
time let to contention on the results data structure.

Added suitable locking.

Also added an atexit() to attempt a VPP disconnect on shutdown.

Also: lots more comments, docstrings, duplicated code removed.
Some of the problem here was a disagreement between caller
and author as to how the API should be used; the comments should
help.

Change-Id: I0cb7d0026db660ec141425c5ad474f14bacea36e
Signed-off-by: Ole Troan <ot@cisco.com>
Co-Authored-By: Ian Wells <iawells@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2017-01-20 01:49:04 +01:00
12713c70fc LISP: Fix fwd adding, VPP-607
Change-Id: Ie48209ba6d9aab0c5cfbd7b3cce4114cf88f952c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-01-18 18:16:22 +00:00
1b3d4ded5f Fix crash on deleting activated vhost-user - VPP-603
Vhost-user pool getting freed prematurely

Change-Id: I90b70889d2e5a01203dc7679583b7c9eff65a374
Signed-off-by: Wojciech Dec <wdec@cisco.com>
2017-01-18 17:40:55 +00:00
cd8a22ae1f Update CSIT tests 161218 -> rls1701-170115
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I00c83fa1db7006f600207306d320628ed3075854
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-01-17 17:45:12 +01:00
df44cc846f DHCPv6 Proxy; fix crash when DHCPv6 prxy is not configured and client packet is received
Change-Id: I0250acdee803545b8923549e2099863a95544691
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-16 19:23:11 +00:00
257d5e25bf Account for pool realloc when importing FIB entries during VRF export
Change-Id: I8ec6d53fa9c0790f85802663f70a6b3630239f8d
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-10 18:13:41 +01:00
bf2fcad04a Fix ARP on unnumbered interfaces (VPP-583)
Change-Id: Iea1e2c31c016c3bb6344f73173d082a2c548ffee
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-09 20:58:37 +00:00
2d7e16330f Fix disable ip6 interface (VPP-584)
Change-Id: I73e966f9afe866e7215fc2e57daecc4531381d92
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-09 15:27:55 +01:00
ee85bfabc9 Added basic tests for multicast vxlan tunnels
unicast flood test - test headend replication
multicast flood test - test flooding when a multicast vxlan tunnel is present in BD
multicast receive test - verify that multicast packet are received on their
   corresponding unicast tunnels and that unmatched packets are dropped

all tests run after adding and removing 200 mcast tunnels to test stability

Change-Id: Ia05108c39ac35096a5b633cf52480a9ba87c14df
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit c4aaee1146)
2017-01-08 21:07:20 +00:00
b95a916dc3 Fix uninitialized stack local, VPP-581
Sporadically messes up the client message allocation ring, by setting
c->message_bounce[msg_id] non-zero. A day-1 bug, made blatantly
obvious by the python API language binding for no particular reason.

Change-Id: I11084dd884622e7b44bdabb922466c4d07138235
Signed-off-by: Dave Barach <dave@barachs.net>
2017-01-05 10:04:30 -05:00
235c64f067 FIB memory leaks (VPP-578)
1) vec_free the fe_srcs of a fib_entry_t when the fib_entry_t is itself reed
2) in the load-balance fixup if a drop path is required add this to a new vector of next-hops 'fixed_nhs'. This vector is managed by the load-balance function. The caller continues to manage its own set. The function is now const implying that the caller is safe to assume the next-hops do not change.

Change-Id: I0f29203ee16b9a270f40edf237488fa99ba65320
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-01-04 18:36:46 +00:00
cdffe06bab vxlan fix mcast tunnel delete
Change-Id: I15f7ff1e957718e808bfad811895deaacb85d2a3
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-01-03 20:48:11 +01:00
35dc387354 LISP: fix EID addition (VPP-577)
Change-Id: I32f61ab89598a7911df3d0d8f45de1302af8aa6a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-01-03 18:23:19 +00:00
c48b58a216 LISP: fix fwd entry addition (VPP-576)
Change-Id: Ibdc9ad21cc53cf0a6d571a3f913038d61d9282a1
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-01-03 18:23:11 +00:00
856ab8aca3 VPP-574: fix the MACIP ACLs blocking ARP traffic
The initial assumption was that the MACIP ACL classifier tables would be applied
after the classification of the traffic based on the ethertype, it turned out
to be untrue, but the fix in the code did not happen.

Add the ethertype to the mask, and the logic to create the ACL classifier tables
permitting the ARP ethertype with the correct payload.

Change-Id: I70236a8a723970c662ddaef6bc9fce93d2e630c1
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-01-03 15:48:39 +00:00
81c09d03d8 VPP-574: fix VPP hang during security group configuration on a suspended VM
The unix connect() in vhost-user driver in VPP is blocking, and
a non-expedient accept() on the other side causes the entire VPP to hang.

Solution: set the nonblocking flag for the socket fd before calling
connect(), and set the socket back to blocking after the accept() succeeds.

Change-Id: I2d535ea9b95a92922d305d79a8d860062c95faf4
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-01-03 15:15:27 +00:00
b4f2525866 SNAT: fix out2in ICMP worker lookup
Change-Id: Ifce17a450a06c26670d474b0f774f2504843f221
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-01-03 05:07:54 -08:00
800429ddef ioam: fix Coverity warning (VPP-570)
Fix Coverity warning of uninitialized variable.
Initialize outer_fib_index to zero (vxlan_gpe_test.c)

Change-Id: If39d48c3906784c43c5af3e9e01ed9a5d5631d6e
Signed-off-by: Vengada <venggovi@cisco.com>
2017-01-02 10:13:43 +00:00
e4e9fbbb7c Merging all ioam plugin libraries to single library
Change-Id: I33a646ba45848c7400df4271e4933e28e62c9ad7
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
2016-12-24 14:11:36 +00:00
fe7cdfa629 SNAT: fix 'show snat verbose' bug - format vector as %v
Change-Id: Ia829da43a273c89dee47b32250ab032d992193cd
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-23 12:04:26 +00:00
e73d0a3aab SNAT: Remove the oldest translation fix (VPP-568)
Fixed bug and add test.

Change-Id: I60fbec48abd9d9cb86be1bd1cdbb7d16f9f93c3e
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-22 02:46:27 -08:00
436b319354 Change default branch in .gitreview
Change-Id: I061e4e59698407c9f96930d578cafd552c717861
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-21 19:01:43 +01:00
7e4edc8d1e VPP-470: Introduce VxLAN-GPE as transport for iOAM.
This is the second of the two commits. This commit introduces VxLAN-GPE
transit functionality.

Change-Id: I12f13e00f456df0047f2b7a0737addfeb683c420
Signed-off-by: Vengada Govindan <venggovi@cisco.com>
2016-12-21 17:52:33 +00:00
fff67c89c5 Support multiple VXLAN tunnels with same mcast dst
Support multiple vni's with the same group(multicast) address.
Implemented by sharing local adj. and rewrite among tunnels.

Change-Id: I8ca036b87af65dd6a8f1aff7da1855f72b4c8f4b
Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-12-21 17:50:42 +00:00
4348c85b3d Fix coverity issues
Change-Id: I7707a42321df2c73e5414926d4000f8672ecfaf3
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-12-21 17:50:03 +00:00
29396e6445 fix 'show trace' bug - format vector as %v
Change-Id: I1b5e633b92674c6c7118eaa6ff7be3d824a186c3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-21 17:48:53 +00:00
1b5ea88e1f Add missing variable definitions to java VPP API
Change-Id: I121b26f4d566417e7cb5ee1a021896dd7dc5599e
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-12-21 17:37:40 +00:00
1a9b5b71cd vagrant: Fixing sudo related vagrant errors
The dpkg sudo trigger appears to want to run interactively despite the noninteractive
debconf setting. This is a problem upstream for vagrant also, see.

https://github.com/hashicorp/terraform/issues/9763

Incorporating the recommended fix to Vagrantfile from upstream

https://github.com/hashicorp/terraform/pull/9783

Change-Id: I8da8522fc9e80fc3bd268b347a786054ad019170
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
2016-12-21 17:05:27 +00:00
85bdafacbd Python API: Incorrect error for empty VLA list.
Change-Id: Ie3e9a54ca23af6b9ee43615f59a48cb05e3906d4
Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-21 17:05:05 +00:00
ee49bf82f5 vagrant: updated Vagrantfile to use rsync
Replacing problematic nfs & git clone, with a simplier rsync.

Change-Id: I26a95bd81b7fbf6ea0179cd62361e0902f2d22ed
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
2016-12-21 15:46:07 +00:00
33e81950cf aarch64 compatibility
- lb plugin: compatibility for non x86 platforms.
- Add vector_neon.h to support simd instructions, especially
'u16x8_zero_byte_mask' used in
"vnet/vnet/ip/ip4_source_and_port_range_check.c"

Change-Id: I395546b0e2d5748e73daffa51269a200ef8d1235
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-12-21 15:16:44 +01:00
7e9e6e1f1c classify: add simple mechanism for automatic flow creation (VPP-338)
VPP-338 Support wildcards in IPFIX flow configuration

Change-Id: Ie5ab4f89d70153c3b15fc6bd8d97fa383ee842d9
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-21 10:18:42 +00:00
11fa895bb9 fix sample-plugin rpm packaging
Change-Id: I0f4d029fe16d1d272c8bbd5c380ba70a646ddb20
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2016-12-21 10:12:49 +00:00
7957d6e6f7 make test: Add classifier - ip/mac/pbr cases
Change-Id: I9cdf022a48b2b63e7ce07f4f5322ffda28c08ff0
Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-12-21 10:07:04 +00:00
7714b30028 Always set start_of_ethernet_header in ethernet-input speed path
The speed path of ethernet-input node is setting the packet context
field start_of_ethernet_header for L2 only. This is also needed for
L3 path because of IPv4 ARP processing which need to know the start
of ethernet header of the incoming ARP packet.

Change-Id: I98ee88c482f8536e4fccc0b8afcb8811d63f4435
Signed-off-by: John Lo <loj@cisco.com>
2016-12-20 17:13:31 -05:00
3be6b28454 Decouple dependencies/assumptions in MAC change
Change-Id: Ic38d0e468da1ad5b56eefda471a5961146a1c372
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-20 19:10:06 +00:00
fdf494439b VPP-525: multi-thread case binary API post-mortem dump AWOL
root cause: blocking all signals in worker threads

Change-Id: Ife0a5f04be0648fab84e493f203e79ba94890052
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-20 19:07:04 +00:00
767b2f59a8 dpdk: fix advance header for ip4-no-checksum
Fixes: 78eeef747b19
    ("Improve dpdk-input node to handle drivers not setting mbuf PTYPE")

Change-Id: I94addcec2bf3097ab047e8d7e957bc983eab9add
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-20 15:24:02 +00:00
a1bd0230d2 Remove RPATH from binaries before creating .deb and .rpm packages
Change-Id: I684d4eabac03e049524204864c985e14eea8d92e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-20 13:43:21 +00:00
fcfb3917f7 Add missing variable definitions to python VPP API
Change-Id: I03eee75fb8575ced6f126fa32c778850a570f0ea
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-20 13:23:13 +00:00
a60d4cb0a1 Improve dpdk-input node to handle drivers not setting mbuf PTYPE
For drivers that do not provide dpdk rte_mbuf PTYPE information,
check ethernet header Etype to acccelerate IP4 and IP6 forwarding
path. Update packet trace for dpdk-input node to provide more info
from DPDK rte_mbuf offload flags and packet types.

Change-Id: I207158797a155305314d002726c0af97b8cb0eb3
Signed-off-by: John Lo <loj@cisco.com>
2016-12-20 12:09:10 +00:00
6a7acc2f9a Declare variables as external
non-external declarations in header files are generating
multiple empty definitions of the same symbol.

Change-Id: I7f3933404f79d08579468d0052c106731b57507c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-20 10:23:44 +00:00
fc63973076 l2input: remove unused code and reduce number of branches
Change-Id: Ic37b5740285dc0020b9fdb0d8c98bc304cee7aa8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-19 21:41:48 +00:00
8e8b811ca1 make test: work around timing issue in bfd test
Change-Id: I3f70091950b9288670969e54eadd35ac733905e4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-19 21:40:57 +00:00
07ea7615ff snat: fix port allocation
Change-Id: Id6aeb4d19476934dfaa354562aa1703650bd037f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-19 21:40:26 +00:00
f5984bde04 Python API: Add back support for old-style VLA, e.g. mask[0]
Change-Id: I5be6bfe522e5ea93934f0ddf75d4e4707376dc0c
Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-19 21:38:35 +00:00
65cc8c0dbf make test: filter IPv6 RAs out by default
Most of the test cases are not interested in IPv6 Router Alerts,
so change the default behaviour of get_capture to filter out
these packets with the possibility of turning the filtering off,
for test cases which are interested in the RAs.

Change-Id: I0b5ee685f82c49cd32c6d6a4638eb3493d2988fc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-19 21:33:42 +00:00
72d0916b82 ioam: export plugin - genarate java bindings
Change-Id: Ia0b81418a2171464ca4b4753afa6898c0c9ee626
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
2016-12-19 18:52:16 +00:00
b75b8df6bd dpdk: fix IV physical address in esp-decrypt
Change-Id: I96b74aa82231038c54e9d07b54cc16fc53efe0be
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-19 18:51:52 +00:00
85bb93ae86 dpdk: fix dpdk-crypto-input packet trace
Change-Id: Ic8073215222e4800c62ac42738e73d5e990806ef
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-19 18:51:34 +00:00
71ce4a4bc5 Update CSIT tests 161211 -> 161218
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I2942502803e1fc6edaf35fc08dee4e7848594f96
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-12-19 18:15:19 +00:00
4db5b46858 dpdk backward compatibility
When building with an older dpdk version, the build fails
as the function 'rte_delay_us_override_cb' is not used.

Change-Id: I4eb5d1c5b357331cf020efd8c6492dd8c82710ee
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-12-19 14:51:57 +01:00
c294c4c92e VPP-563: Fix inter plugin dependency in ioam vxlan-gpe
Change-Id: I31684b3844cd02ba0d0b046d621db59ecac3992d
Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
2016-12-17 13:01:12 +05:30
bd6462e16a Coverity fixes, VPP-486
Change-Id: I8906bb983128e8f6e2664e367d2015325c1125fb
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-16 20:31:18 +00:00
d6900496dd Fix dpdk-input check for VLAN packets including VLAN strip case
For DPDK-16.11 or later, use packet_type to check packets with VLAN
tags. For earlier versions of DPDK, keep using ol_flags but include
PKT_RX_VLAN_STRIPPED bit as part of the VLAN tags check.

Change-Id: Ic4ad8f04e44658dc0a99de0232fdc949cfa13e93
Signed-off-by: John Lo <loj@cisco.com>
2016-12-16 14:29:31 +00:00
9225dee965 make test: improve robustness and performance
Introduce an API which asserts empty capture for interface.
Throw exception in old API if the capture does not exist, thus
making it clear if the test expects packets to arrive or not.
Improve performance by not doing sleeps after starting the packet
generator, rather lazily deleting captures when needed.
Fix wrong usage of packet.show() in various tests.

Change-Id: I456cb23316eef99b3f35f80344fe595c4db9a21c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-16 08:09:40 +00:00
cc53285baf Expand ethernet-input node speed-path for non-L2 paths
Improve ethernet-input speed path for untagged packets to also handle
L3 and other forwarding paths. In the IP4 forwarding path for untagged
IP4 packets, per packet clock count in ethernet-input node is reduced
to ~14 clocks from ~43 clocks.

Change-Id: I8e6f121820e056d6085dff3eb95d6913fc422f99
Signed-off-by: John Lo <loj@cisco.com>
2016-12-15 14:29:10 +00:00
fb9931ff16 LISP: Fix several control plane message issues, VPP-558
* Fix TTL in map-regster message (defaults to 15 minutes)
* Handle multiple local EID registration in a for loop
* Parse multiple records in map-notifies, not only one
* Parse map-notify in the worker thread instead of the main thread

Change-Id: Ife68c2227bc5abf14c19f1a948a88d34de3b4af9
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-12-15 09:53:28 +00:00
d4cfe15965 Fix NPE in JNI while handling int arrays, VPP-559
Change-Id: Idc3760b65e62cfa5d37dd7379e35331b7f95f913
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-12-15 07:38:08 +01:00
cb630ff691 Ping response in a VRF context uses correct FIB for response
Change-Id: I3b626a1fb9d74ebc609ded14c16c5e3d5a1655ab
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-14 16:09:14 +00:00
8c2f05c2dc IP and MPLS route debug CLI fixes
Change-Id: I1b61f36c88308c1bcf9a61a87843d1fea457d8fe
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-14 12:25:23 +00:00
9f9d07b801 make test: improve virtualenv patching process
Change-Id: I5041bdc733c4da633d83f60f7db7747b4d0b8894
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-14 08:55:40 +00:00
bc5643d180 Fix coverity build-break, VPP-255
Change-Id: I6a68f2ba5e7a5c76ac4e6b3e8f7cf695b1d66c54
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-13 18:22:53 -05:00
04f4b78ce2 vpp_papi: Add help() support for python interactive mode
The python api 1.3 removed the ability to call 'help' in interactive
mode.

example:
> help(vpp.sw_interface_span_enable_disable)
Help on function sw_interface_span_enable_disable in module vpp_papi.vpp_papi:

sw_interface_span_enable_disable(**kwargs)
    u16 _vl_msg_id, u32 client_index, u32 context, u32 sw_if_index_from, u32 sw_if_index_to, u8 state

Change-Id: Iea1944fdc862482490174ff966592cf3c8208a98
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-12-13 16:24:21 +00:00
cdab4bde04 LISP: Move parsing of LISP map-reply to worker thread, VPP-554
Change-Id: I2c3093068b97bb3ed10e1ecb067fc297013d063c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-12-13 15:43:03 +00:00
b1e7ead54b ACL: Install ACL JSON in install directory.
Change-Id: I3f7dbd23114acf37322f97da80be746616a9d95d
Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-13 12:32:14 +00:00
deb6984471 make test: Use VXLAN built in scapy 2.3.3
- fix documentation issues.
- fix mpls test.

Change-Id: Ieef6b4b5e4aca99e89bd03e45a991be89d42adba
Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-12-13 07:06:56 +01:00
abd98b2c88 Update CSIT tests 161204 -> 161211
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I141dad311139d2b819352fab6038d440f76c7fc2
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-12-12 18:42:19 +00:00
f78a70d494 snat: Hairpinning (VPP-444)
Change-Id: I73881ef32d547852da96e77402a1758f37e812d5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-12 13:45:06 +00:00
1a419f2b63 make test: remove unneeded print
Change-Id: I99242486371cea230e72974a7fc8768ffee9af62
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-12 13:44:29 +00:00
4d4899390c ip4: perf optimization in the ip4-input node
Change-Id: I9ddbbf8ce0d7307b9eb82ccd0c51f84e479ffd23
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-12 13:05:00 +00:00
1b6f902046 ipsec: go straight to lookup after esp encrypt
Currently, IPsec tunnel traffic goes to ip4-input/ip6-input after esp-encrypt.
It is not necessary to check that the new IP header is valid (if it is not
valid then we have otehr issues).

Instead, just send packets straight to ip4-lookup/ip6-lookup after esp-encrypt.

Change-Id: I5e35d500cb0f33f418f8554ed1f4390f02b6647d
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-12 13:03:27 +00:00
64bc612d4c Fix for PAPI async call registration
Introduce async API call registration

Change-Id: Iccc89eca1b6e7dcce96a8e7bc5da80d9abc363fc
Signed-off-by: Wojciech Dec <wdec@cisco.com>
2016-12-12 11:37:15 +01:00
9ca18c604a MPLS Nodes Dual Loop
Change-Id: Ic54d4cb9dec8e91446b9b4d2b40ed69a14bd4355
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-11 14:14:30 +00:00
fa0fb5821a VRF imported FIB entry should inherit the flags from the export entry.
Change-Id: Ie2c3d62a468315390ef2c4314a73cff0f6d3cdaf
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-11 14:10:05 +00:00
4a72c8e0d9 ioam: trace plugin read api fix
-fix verify job failures

Change-Id: I0756f4b6577d58598702185ebe6f8ed9db23b0fa
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
2016-12-10 04:30:59 -08:00
892e076a1e ip4: perf optimization in the ip4-rewrite node
This change shows around 7% improvement in ip4 path
when ip4-output features are not used.

Change-Id: I81c1c4c38c99fff0ad8270d3c0df907acf1d8c58
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-09 21:43:23 +00:00
5929085918 python api rpm packaging - json files are not executables
Change-Id: If8231aad2b95cf9e06cd8c95978e6a3128cdf084
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2016-12-09 20:13:28 +00:00
b4bc55b9d7 ioam: pot plugin - pot profile read API
Addition of read API to ioam-pot plugin which returns the current
pot profile(s) configured

Change-Id: I188e53811391e053860009dde3719612a2446521
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
2016-12-09 20:12:55 +00:00
d24625fbd1 ioam:trace plugin - trace profile read API
Addition of read API to ioam-trace plugin which returns the current
trace profile configured

Change-Id: Ibe2baf0f60fb2a74ddc140747b53128aba975aaa
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
2016-12-09 20:12:18 +00:00
0ebe8d7d76 Add FIB unit test to 'make test'
Change-Id: I57126416f57649768f3601cd715c7f5f4b9b9fad
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-09 20:11:30 +00:00
637b9c4531 BFD: handle timing wheel prematurely firing events
Improve handling of timeouts. Add a workaround for when timing wheel
fires an event a tiny amount of time before it should actually be
fired.  Don't delete unneeded events at all from timing wheel, instead
ignoring unexpected events. Enable the skipped BFD test, which passes
now.

Change-Id: I6ffd4fc0ba7a049ffe63bb0e5290641a7300dd6f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-09 20:10:02 +00:00
0279b29f32 Add make test code coverage reporting using gcov
Change-Id: Ia8247841fdbe76e1d888aab49ae213b4216af273
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-09 20:09:35 +00:00
d7cb1b5f22 Coding standards cleanup for vnet/vnet/ip, VPP-255
Change-Id: I12892fa571cc50e0541d6463a8b68e1b618edd9f
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-09 11:47:00 -05:00
b78292efdf VPP-547: Fix for co-existence of HbH and RH header in Segment routing:
1. sr-rewrite - SR insertion in v6 : SR RH is inserted immediately after v6 header
but if hbh header is present as per RFC2460 it should immediately follow
v6 header. This is fixed.
2. sr-local : v6 packet destined to a sr segment is received if hbh is present
it is not handed over to sr-local for processing. fixed ip6-local handling to
skip hbh as there is no register handler for hbh for now.
3. sr-replicate - update in dual of sr_rewrite to handle replicate, fixes in
sr-replicate to handle presence of hbh header

Change-Id: I034523a42d2fedf97134761f956ab534babb8b36
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-12-09 14:57:21 +00:00
16a14cdb16 make test: FIB add/update/delete - ip4 routes
- JIRA:CSIT-483

Change-Id: Idb4c5bd7a234bc975f3380ece58c0e8d4bfdafd9
Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-12-09 09:03:19 +00:00
82a06a9335 When waiting for an IPv6 response, filter non-ND packets
Change-Id: Ia5f5e00db84022bb7ee89a1b9d036fffa734295a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-09 09:02:36 +00:00
199ca9c449 DPDK HQoS: enable vpp control plane thread connection to hqos thread
The vpp control plane thread generates different types of packets such as ARP,
DHCP client, IPv6 RA, etc. which need to go through HQoS thread associated
with the output interfaces. Therefore, this patch enables vpp main thread
connection with the HQoS thread through dedicated SWQ.

Change-Id: Idcb759546d4bcd9b40beedaec4f12b29baae3e40
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2016-12-09 09:00:56 +00:00
e4504c6320 BFD: fix timing in the main loop
Properly wakeup the main process loop only when necessary to avoid
missed events. Improve BFD unit test reliability and speed. Add
timestamps to logs and replace Queue with more efficient deque.

Change-Id: I01255a02057d3146917b43b669ccdc74f31ef0c8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-09 09:00:26 +00:00
56912c896a Add extra validation for VXLAN packets and tunnels
- On VXLAN packet decap, validate its DIP against VXLAN tunnel.
- Add extra logic to validate and handle creation of multicast
  VXLAN tunnels.

Change-Id: I6abdddd7be4cd9f1bcfc88d9970ba681fdd72f7c
Signed-off-by: John Lo <loj@cisco.com>
2016-12-09 09:00:11 +00:00
6d403a0132 VPP-470: Introduce VxLAN-GPE as transport for iOAM.
See Jira ticket for more details
- New plugins created to (a) Add VxLAN-GPE as transport (b) Provide export infra for
  VxLAN-GPE.

Change-Id: Ife50c7434f53d17a4783062310f73d063d53494c
Signed-off-by: Vengada Govindan <venggovi@cisco.com>
2016-12-09 06:15:02 +00:00
c9b20bc7a5 acl: make MACIP ACL apply/unapply/delete logic more robust
1. vnet_set_input_acl_intfc expects currently applied table ids to
   remove them properly, fixed that.
2. check if the interface has MACIP ACL applied before unapplying it
3. if applying MACIP ACL to interface that has one already applied,
   unapply that first.

These changes required also swapping the order of the add/del functions.

Change-Id: I179490371507b07e9dd8852000954156c318d98c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-08 21:18:38 +00:00
32905661d1 vpp-python-api packaging - use easy_install to install the python api
adds python-setuptools as dependency

Change-Id: I186f5d4353ee7667377fb6b0486d16a1571bdf09
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2016-12-08 20:05:48 +00:00
b868e4ea38 Adapt LuaJIT VPP library and a few examples to API with per-message CRC and JSON
Change-Id: Ibb886e418d338588e61c7bb6cb57f2093c7c5062
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-08 17:15:18 +00:00
6162e1e26b Fix incorrect creation of classifier entries for macip ACL
The is_ip6 flag was incorrectly set during classifier
table creation phase, which intermittently caused the mismatch
between the mask value and the match values, resulting
in dropped packets. Fix that.

Also get rid of the magic numbers in that part of the code.

Change-Id: I0606561e6b07e70a1aa733746b56ed0e91752c94
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-08 17:13:05 +00:00
0c1519b5e7 BFD: improve ip header handling, fix assert
Instead of storing a pointer, store an offset within vlib_buffer marking
the start of the ip header (similar to storing start of ethernet
header). Handle negative timeout in the bfd process main loop.

Change-Id: I05a1ff3ac41da5bdc3b2ac6f9e03b3241994688b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-08 12:16:42 +00:00
b1135432d7 Fix bug in code for setting dpdk interface descriptors (VPP-552)
Change-Id: I6401b745eeb402ec980e86dc179b774d341c4764
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-08 11:56:09 +01:00
5c3bfab786 ioam: pot plugin - generate java bindings for ioam-pot plugin
Change-Id: I078bbc9ea495b395ade499fe3ad7d98dd766f2be
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
2016-12-08 10:37:48 +00:00
2c4dbff25b dpdk: don't drop packets if l4 checksum is flagged as bad
Sometimes NICs are flagging checksum 0 as bad, which is not
always true.

Change-Id: Ibb0147c94f436966e6afa472025bdf92c41f201e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-08 10:04:28 +00:00
10fd425cd2 l2fwd: fix isssue with setting mac age from api
Change-Id: Ib08b87ac91f78bebb539f544850b07dbf76f31f6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-08 09:57:29 +00:00
14ac8010ef vhost: fix coverity warning
Change-Id: Ifb9f8d2528142ad9f11a2b6d5ac10ff9639dd5d6
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-12-08 07:58:47 +00:00
4183d6d763 Acl JVpp api generation (HONEYCOMB-305)
Includes simple test cases for acl management.

Change-Id: Ifff4f4baf9bfe84d73ebc46b591ecc46c85c94ad
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-12-07 21:24:45 +00:00
0e3c0de1ed BFD: basic asynchronous session up/down
This is a work-in-progress basic BFD session handling. Only
asynchronous mode is supported at the moment. Setting the session flags
doesn't work.

Change-Id: Idba27f721b5c35be5a66a6d202a63d23ff7ecf6f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-07 19:54:12 +00:00
d171d48edc l2fib: add mac aging support
Change-Id: Ib617ae0f76320d596cc6c4b384da76c91d701a24
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-07 17:42:07 +00:00
38bcb56e99 Make jvpp connection fail if control ping fails
Change-Id: Ib57cf97514fb6831f41930d9492e92ad11a3730d
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-12-07 17:20:02 +00:00
19c68d2a02 Prevent re-entrant walks on an adjacency.
The re-entrant walks were caused when the walk from an IP adj updated a fib_netry with an MPLS adj which in turn triggers a walk of the IP adj. Re-entrant walks do unnecessary work.
also fixed a walk merge issue where the encountered walk should only be checked for equivalence woth the most recent alk, not any in the list. Otherwise an UO,DOWN,UP beceoms (2*)UP,DOWN

Change-Id: Ib8b27f055dc6c1366d33740276d1c26cd314220a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-07 17:17:30 +00:00
9677a944d5 LISP mapping timers
Change-Id: I4cd600189e936b07b628371df2f7fe2e2dc3e63d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-12-07 16:31:13 +00:00
496e127c58 Refactor tap binary APIs, VPP-550
Change-Id: I1599b3659411b5f4451c364cc5ada63cfa8e0a6b
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-07 16:20:49 +00:00
18bc907afa epoll_input: don't sleep if we expect event in less than 1 ms
Change-Id: I81652fb04608d805497a600c7dc8041911bbf39a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-07 14:54:53 +00:00
de8867535a make test: add S-NAT plugin tests
Change-Id: I7859f63c5b28480be1ae587fc923d15212769e66
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-07 14:46:05 +00:00
cd06b72892 Fix coverity CIDs 157344, 157343, 157341, 157340, 157339, 157336
The macros used to verify the validity of sw_if_index passed in
the API calls have puzzled coverity.

Even though the issues are false positives, the checks are rather
simple, so edited them to avoid using the preprocessor macros,
it makes the code easier to follow.

Added the null check for 157336.

Change-Id: I24651346851215b236e53e682261e1f91219b381
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-07 12:20:07 +00:00
288e8930ee Make table chain deletion optional in classifier API (VPP-206)
Change-Id: If30c0f6d5de34943bc399b3412c2d10847538c3c
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-07 09:42:18 +00:00
32575801c9 Enable Span Jvpp api generation
Change-Id: Ia8c0e8255f9ac5bb7ef1a174ffd933d46b017767
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2016-12-07 07:36:40 +01:00
399ca1ca52 SPAN API: Fix various errors making SPAN break make tests.
- s/l2/span in span_api.c in foreach macro
- Not installing .json from Makefile.am

Change-Id: I2469fe01138d62e044b8262cdb5a6e3b009bb43e
Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-06 23:48:43 +01:00
7e3a875c94 API: Adapt make test to Python API changes.
Change the test wrapper script for the updated Python API.
All tests but the L2BD multi instance runs fine.
That is currently skipped.

I see intermittent failures when an MLD message is received
before the ND NA in MPLS and IPV6 FIB tests.

Change-Id: If809877c9abdf596dbb0a419ce5429552f63d212
Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-06 21:17:45 +00:00
b5e8a771fb Refactor binary APIs for IP, VPP-549
Change-Id: Ieff6b22e2432600a231f74e75716e000d488a78f
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-06 20:00:57 +00:00
dfc19232df Add binary API for reading interface/vrf assignment (VPP-439)
Change-Id: I9b7cb90127e464fea520bb1b0a3e93c05a0e9e8e
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-06 18:12:50 +00:00
3a2a1c47bc span: add tx functionality and support for multiple mirror ports
Change-Id: Ib6dd290085e6f9a434499af8d19f346220dc8428
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-12-06 17:26:48 +00:00
fc6e693d0a dpdk: fix rte_delay_us callback issue
Introduced by recent commit. It causes initalization failure on many
NICs.

Change-Id: I409ebb8ca5ae29eb9d43438017a0d1ddddb472fc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-06 17:26:03 +00:00
d3eb90ecfc vhost: Improve data path
This patch significantly improves vhost Tx and Rx
performance (20% Mpps improvement in PVP scenario).

Most significant change consists in the split of
virtio ring parsing and memory copies.
Other minor changes mostly consist in getting
rid of unnecessary variables.

Change-Id: Ia94e12ab9a6c114e3f7fef376a9343823d051209
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-12-06 16:22:16 +00:00
f3bd5716c1 Fix length in LCAF header
Change-Id: I56461c5d892ce223d1160fb57313ca1c51db9a23
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-12-06 15:54:13 +00:00
2a3e0ea435 snat: remove duplicate makefile var definition
Change-Id: Id910f033c693be882ef5da6adca4a9b46de057e4
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2016-12-06 14:00:07 +00:00
f0c90e20f7 MAP: Split MAP API out of vpe.api.
Change-Id: I91a612a00ea85a9ddd4233d9aa19a6a4332d9701
Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-06 13:59:10 +00:00
dbb3c25374 vhost: Code cleaning
After a bug was found, I decided to review old vhost code.
This change cleans some of it by:
- Use unix file private data rather than hash table
- Use vnet interface lookups rather than hash table
- Keep track of unix_fd index rather than fd value
- Change some indent
- Store interfaces in a clib pool rather than hand-made pool

The overall change reduces the number of lines as well as
the amount of state kept in vhost structures.

Change-Id: I6b9b670b9c7e1fb85981bcf2099f7140b0251fe0
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-12-06 13:58:13 +00:00
beb1a8db49 Add "vpp-api-install" to plugins_configure_depend in build-data/packages/plugins.mk
As per Ole Troan mail https://lists.fd.io/pipermail/vpp-dev/2016-November/003296.html
(message id <D3FB63FB-D144-4CBA-B4AB-CDE46B83D838@cisco.com>):

Change-Id: I7f9d13c079505257bc8b37eecd8318cd360a56c3
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-06 13:54:11 +00:00
Jan
0bd0b7ff61 test: l2xc instances multi-context test (CSIT-491)
- add/delete L2XC instances and verify results by traffic

Change-Id: Ib538a98e499ae3c9c9601a22afcabb1afb84c881
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-12-06 13:50:18 +00:00
d335dac3e2 dpdk: add rte_delay_us_callback
Converted DPDK16.07 "Allow-applications-to-override-rte_delay_us" patch
to of callback in DPDK16.11

Change-Id: I6c802e3ea8f817e5df591166b1e0a42f5f835a71
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-12-06 12:22:44 +00:00
a9b2d5831e add missing import to mpls test
Change-Id: If53a7c8066ec9713645a009218e264384afe93e4
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2016-12-06 12:22:04 +00:00
c9097d2060 api: set jvpp version to 17.01
Change-Id: Ib22a3a24f9b290465dc80fc683d903d58ba3804c
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-12-06 12:09:27 +00:00
3e046ea96e api: missing support for dumping of neighbours (VPP-333)
added API to dump ipv4/ipv6 neighboors (added by ip_neighbor_add_del).

Change-Id: I33209a3d06beba64d68465c0892a9f4c65657334
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-12-06 12:08:46 +00:00
397fd7d39f Implement LISP control plane messages
* Map-register
* Map-notify
* RLOC probing

Change-Id: I7f6295376b21cd67805446dfd1c1033acead2d4b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-12-06 09:30:43 +00:00
b09167f33d acl: The ACL plugin.
This is the commit from the accumulated work in the github ACL branch,
to move it to gerrit.

Change-Id: I85a6b0df0d3dd3c3c7588e92a1e22c553e4b6ef7
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-06 08:18:53 +00:00
Jan
65209ed18c test: l2bd instance multi-context correction
- small correction of docstrings
- fix of create_pg_interface

Change-Id: I1958bd5ddaddaa2f7e6cbb18b0076e59e86d1e68
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-12-05 23:32:03 +01:00
Jan
cf3658da71 Update CSIT tests 161128 -> 161204
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I84bfb828403a32087de3341f27c3e9a04292ca8b
Signed-off-by: Jan <jgelety@cisco.com>
2016-12-05 18:45:36 +00:00
7bb873a4cc make test: fix missing log/packet messages
Change-Id: Idb3119792943664748c4abc3829ad723f4156dfe
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-05 18:44:45 +00:00
86fb04db3e All mcast and All class E have /4 not /8 subnet masks
Change-Id: I29e54014f43f0b0ce087380b2318fe623d879204
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-05 18:43:24 +00:00
6d963c272c Move interface APIs to vnet/vnet/{interface.api,interface_api.c}
Change-Id: If3f0f73ad1c1d54ac69122052c977eb83a9e16eb
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-05 15:33:51 +00:00
6dcda02dd8 Fix l2.api patch in jvpp Makefile
Change-Id: Ic9a494725afde2e3507dda5b42c69680c20f090a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-12-05 14:06:35 +00:00
d162f3dcfd api: set interface MTU API (VPP-442)
Change-Id: I67178f2703febb8ad3eb011606cb8a86fab5ee94
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-05 12:54:10 +00:00
ff82ed6ccf Fix crash in debug mode when call ethernet_register_l3_redirect()
Change-Id: I1c2a13663ec75460cd28ea8593aa8de3f27e47b9
Signed-off-by: jerryian <gu.jian1@zte.com.cn>
2016-12-05 10:53:49 +00:00
b46227a6df api: enable Java API generation for l2.api (VPP-438)
Change-Id: I867c2f90d812007b874502d2aa60f09e40650941
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-12-05 10:51:58 +00:00
f06aea5c72 Locally generated packet go through lookup/load-balance - locally-generated is an attribute of the packet and checked where necessary
Add a flag to the vnet_buffer to indicate a packet is locally originated. Then in the rewrite nodes we can check this flag and not perform the TTL decrement. The switch path cost is expected to be fractions of a clock - the flags will be hot in the cache.
The cehcks are necessary to due the requirements that VPP must be able to emit an IP packet with TTL=255.

Change-Id: Ieb9cf06e34df54fd5c950293de8b665016295c51
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-05 09:20:26 +00:00
072f8debf2 Variable-message-length tracing support, VPP-370
Clean up several message handlers which spuriously depended on having
a vlib_main_t * pointer passed as a second argument. That definitely
doesn't happen when replaying an api trace...

Change-Id: Id4cf9745f770933566cb13698ee779333ee35d79
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-05 09:19:43 +00:00
e3371afc8a Fix vpp crash when generating jumbo packets
Change-Id: Ie1832f2b5df9f9f7ba2f0f406116e11014d3ac21
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-05 09:18:57 +00:00
c90dfdcf4f Fix ICMP echo reply punt path
Add ICMP echo reply punt logic in ip[46]-icmp-echo-reply (ping) nodes.
ICMP echo reply packets corresponding to the locally (VPP) originated
ICMP echo requests are still dropped as before. Rest of the (unknown)
ICMP echo reply packets are pushed to the “error-punt” node.

Also added ICMP echo packet (id/seq) trace information

Change-Id: I998198430dedc9b4d771b6aff2a97f18598663f9
Signed-off-by: Alexander Popovsky <apopovsk@cisco.com>
2016-12-05 09:18:34 +00:00
9dfd3383e5 Fix crash whith bonded ethernet / DPDK 16.11
In DPDK 16.11 bonded PMD is still using old naming ‘rte_bond_pmd’.
See: dpdk-16.11/drivers/net/bonding/rte_eth_bond_api.c
Fixed crash when VPP is generating a name for ‘unknown’ non-PCI interface

Change-Id: I59e15f009e1a11949a19abf5234d09425a81c6ce
Signed-off-by: Alexander Popovsky <apopovsk@cisco.com>
2016-12-04 16:04:06 -08:00
Jan
00dad123ab test: l2bd instances multi-context test (CSIT-479)
- add/update/delete L2BD instances and verify results by API
  command bridge_domain_dump and by traffic where applicable

Change-Id: Ic9d7f7b5f6f10e5df7053f27cbc87f653704dab1
Signed-off-by: Jan <jgelety@cisco.com>
2016-12-02 21:34:43 +00:00
3b222a35e2 Coverity errors in MPLS code
Change-Id: I3f98e3c30e29198cb8701bfb846ce194b7250ed7
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-02 20:52:56 +00:00
df1059f057 remove CLIB_DEBUG conditional in fib_protocol_t
Change-Id: I179941fe615935e63c6f4eacf1193c6bfab6631d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-02 20:52:27 +00:00
f468e23da6 api: L2 XConnect API (VPP-438)
Change-Id: I0a86184391723675488a5eb517c375f67940f5b5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-02 16:59:03 +00:00
8b2247d247 interfaces: make no_flatten variant of inteface_ouptut fn default
Flatten variant was used only by old native drivers.

Change-Id: If206c6c8b4f10843d60f908c3acb4e8db83ce03d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-02 16:02:44 +00:00
143faaa345 Coverity warning be gone, VPP-486
Change-Id: I72dc2eca558b4a28ade75f0a6d91840b48630543
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-02 15:56:32 +00:00
4933168df3 snat: fix 1:1 NAT with multiple workers
Assign worker when static mapping is created.

Change-Id: I204e486e2ba5d1ef8e357759c35ba92a25a9a097
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-02 14:42:26 +00:00
dcbc86a8af Initialize the UDP checksum, or no supper
Change-Id: I542fbe9ccdf83ee220080b2506b38016359e0ce5
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-02 14:20:53 +00:00
0529a743cc make test: handle exceptions from VppPapiProvider.__init__
Change-Id: I3c0372d5d09d554ad4ebe0adfa97c111571f628a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-02 14:20:29 +00:00
beb4bf7df8 Augment Vxlan to support NSH-Proxy
PatchSet 9: add range check for decap_next_index
PatchSet 6: delete runtime range check

Change-Id: I415e156d05d09d2ff34f6578924f0b243058f464
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-12-02 14:16:02 +00:00
dce0545441 buffers: fix vlib_buffer_copy
memcpy should happen after current_data is set.

Change-Id: I838f61b54d15a8bb55d54f770f47fb4d58d071cb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-02 14:15:02 +00:00
152e21dda6 feature: add interface-output arc
Change-Id: Ifea275a312e0f2474cdc3a336ac51ea83e403c74
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-02 14:14:50 +00:00
a03f4efa92 Python API: Support for per message CRC and API split.
These changes are incompatible with Python VPP API 1.2

There is now a new VPP Class and it can be used like:

from vpp_papi import VPP
jsonfiles = []
for root, dirnames, filenames in os.walk('../../../build-root/'):
    if root.find('install-') == -1: continue
    for filename in fnmatch.filter(filenames, '*.api.json'):
        jsonfiles.append(os.path.join(root, filename))

vpp = VPP(jsonfiles)
rv = vpp.show_version()
print('RV', rv.program.decode().rstrip('\0x00'))
vpp.disconnect()

Change-Id: Ic92d226de2cf3626e750404012247e7fc24fb7fc
Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-02 13:35:46 +00:00
58290ea2f6 Fix dpdk_validate_rte-mbuf for chained buffers
Change I4ad40f398f7b5cf introduced a bug with chained buffers.
This patch should fix it.

Change-Id: Ia409d5eb90fcd6d7ff3c7da0836edfd2eb25998b
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-12-02 12:25:09 +00:00
9dd34e00ed api: fix inconsistent behaviour when adding l2fib filter entry (VPP-147)
Inconsistency when adding L2 fib entry using CLI and API (doesn't work)

Change-Id: I6b58d8a4c444d2712d1a4c225cea5eb5189c355f
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-12-02 11:53:25 +00:00
21da6ce025 feature: introduce feature arc end nodes
This change allows us to keep feature path disabled
until 1st feature is enabled. Enabling 1st feature also means
that end feature node is enabled helping feature arc tenants
to reach the end.

Change-Id: Idbd64e681bd2b42e7c67612074649e5ae51f46e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-02 11:19:02 +00:00
ad422ed7ea MPLS infrastructure improvments
- deprecate MPLSoEth and MPLSoGRE; replace with generic MPLS tunnel.
- deprecates CLI 'mpls encap ..'; replace with addition of MPLS out label to a route/tunnel.
- support for MPLS 'routes', e.g. MPLS x-connects.
 - deprecates CLI 'mpls decap ..'; replace with 'mpls route .. '

Change-Id: Ibda46544912f880d0200f22bf9ff9b52828fcc2f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-02 11:09:36 +00:00
caffe0980a Fix wrong indentation in vppctl script
Change-Id: I6c67df0cef53f93161e3d6b697c4d0fdc1fee8a7
Signed-off-by: Andrew Li <zhaoxili@cisco.com>
2016-12-02 11:07:09 +00:00
f14e3bf7b2 API: Packaging of JSON files.
Change-Id: If041b6faf1a091d4758b514f0a8cd800ee0e6a89
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <otroan@ot-vpp.cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-02 09:11:11 +00:00
7be864ad0d Add a 64-byte interface "tag" for vhost and tap interfaces
This patch should dispose of spurious objections around interface tag
requirements, currently in use as excuses not to support the vpp ML2
plugin.

Add "u8 tag[64];" to the sw_interface_details message sent by vpp to
control-plane clients. Add u8 tag[64] to the create_vhost_user_if and
tap_connect APIs.

Added debug CLI to set/show/clear the interface tag on any vnet sw
interface. Added the sw_interface_tag_add_del API to set/clear
tags on any vnet sw interface.

There can be no expectation of "tag atomicity" with respect to
physical hardware. Vpp discovers devices before establishing a
control-plane connection.

This patch upload verifies using the csit oper-161128 branch

Change-Id: If8520119e7a586c5ccf0fdda82484ac205622855
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-01 22:27:31 +00:00
e245d5ecef "Update CSIT tests 161120 -> 161128""
This reverts commit b5388a5319.

Change-Id: I07160d08e469417933b3da3466ce856ab673e955
Signed-off-by: Peter Mikus <pmikus@cisco.com>
2016-12-01 22:24:10 +00:00
37682e1237 Add vxlan-bypass feature to IP4 forwarding path
Added vxlan-bypass feature which can be enabled on the underlay
interface which receive VXLAN packets to accelerate VXLAN decap
processing. The CLI to enable it is:
    set interface ip vxlan-bypass <interface> [del]
With this feature enabled on an interface, there is an overhead for
non-VXLAN packets at about 13 clocks per packet.
The API is created to support vxlan-bypass for both VXLANoIPv4 and
VXLANoIPv6. With this change, vxlan-bypass is only implemented for
IPv4 forwarding path.

Change-Id: Ica7239f642010b231eade7fd5009aa4b42c119d3
Signed-off-by: John Lo <loj@cisco.com>
2016-12-01 19:34:12 +00:00
436d06b1c7 ARP un-unmbered called when no interfaces are unnumbered
Change-Id: I4bb60d6382f0955dbf4848225a9fd6985b906fbc
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2016-12-01 11:28:35 +00:00
de7f3a7791 Add rx interface, ip4 src+dst to the flow-per-packet records
Change-Id: I1f49cdaf5879d9638742ed1ecc699f2e9a87f0f8
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-01 11:27:10 +00:00
10389371b3 Add banner for building deb and rpm packages to verify
Change-Id: I03fd6f32ad720a6a2443c6b350c8890dec579229
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-12-01 09:32:23 +00:00
1f417aac76 vppctl: clean exit cli when ctrl-d or ctrl-c entered
Ctrl-D now exits vpp cli using do_EOF function

Ctrl-C now exits cleanly without KeyboardInterrupt Error

Change-Id: I09d103df57b9512e572eb66c17c548b9c1801589
Signed-off-by: Padraig Connolly <padraig.connolly@intel.com>
2016-12-01 03:16:48 +00:00
a92501ab70 doc: doxygen documentation for vhost-user CLI Commmands (VPP-279)
Change-Id: I1f3cf7c786b0a86b56a1cd7d9650e446515f1504
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-12-01 03:15:52 +00:00
b5388a5319 Revert "Update CSIT tests 161120 -> 161128"
This revert is to probe to see if CSIT tests are being broken by this patch.

This reverts gerrit https://gerrit.fd.io/r/#/c/3985/

This reverts commit f8c94313a3.

Change-Id: I6e1a7285ab077823a5d0350b8eda6bb26609f70c
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-12-01 01:06:38 +00:00
31a64e55c2 Temporarily remove make test
Change-Id: I2b8c3c99f1358c53721790f8c6aefa7123c4959d
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-11-30 16:53:58 -06:00
865d6ba8a3 dpdk patch: virtio: tx with can_push when VERSION_1 is set
This patch for dpdk 16.11 enables the use of shallow
virtio descriptors when VERSION_1 is set.

More info on DPDK patchwork:
  http://dpdk.org/dev/patchwork/patch/17340/

Change-Id: I28cde77ed5a3588921d00da50678debfe0338b08
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-30 21:06:45 +00:00
6929ea9225 Enabling AES-GCM-128 with 16B ICV support
Change-Id: Ib57b6f6b71ba14952ad77477a4df3ab33b36fef4
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2016-11-30 20:37:45 +00:00
2fee4c8fad VPP-530: adapt jvpp generation for VPP API splitting
Now jvpp uses *.json instead of *.py api representation.
Multiple *.json files are supported.

Change-Id: I89fa556c7d2a35d42833f2faaa28398ebd2ed012
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-11-30 18:24:38 +00:00
c5b1360045 VXLAN multicast dst (remote) address support
Added support for multicast vxlan tunnels which are used for bridge domain flooding instead
of flooding the all unicast tunnels in the bridge domain.

features added:
* conditional flooding to some of the BD members - based on existance of multicast tunnel member
* added local multicast adjacency - multicast packets are handled as the same as unicast - based on src (unicast) address
* refactored some of vxlan tunnel creation code - to unify ip4/6 handling

Change-Id: I60cca4124265a8dd4f6b2d6ea8701e52e7c1baa4
Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-11-30 16:31:32 +00:00
aff7077d20 Start spliting vpe.api into logically related pieces
To reduce rebase / manual merge pain, among other things

Change-Id: I3186df0479066916a2ca69c48759178b45ef035c
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>
2016-11-30 15:06:08 +00:00
847944046c Improve test for unlocking LISP src FIB
Check that either src FIB is empty or only default is present. In some
situations we may overwrite/delete default.

Change-Id: I4a90804cc30ea8e3aa24e36a07f8096b8d3e46bc
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-11-29 17:25:44 -08:00
e2e95ce655 span: fix wrong next1 feature index in dual loop
Change-Id: I84e822f46fd1a0b83865073e797ef3ac03280e72
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-11-29 18:10:13 +00:00
ddff8a4ee4 Have make verify check deb and rpm builds
Change-Id: I7fe3558118835240ecd155609821f9de2d609553
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2016-11-29 17:35:44 +00:00
cfce8fa443 Added make test to make verify
Change-Id: If5dcfc330a7df69b2c811ce5a8a48c2e0f968270
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2016-11-29 17:35:44 +00:00
b8ff5d6a1b Fix "TypeError: cannot concatenate 'str' and 'NoneType' objects"
Change-Id: I85a42785d43a676b65f26b6e2cd71c997fddcbb1
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-11-29 17:35:44 +00:00
Jan
f8c94313a3 Update CSIT tests 161120 -> 161128
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: Ib0325dde7bd9f9769660d9c5c72f0fda5e752eaf
Signed-off-by: Jan <jgelety@cisco.com>
2016-11-29 10:08:34 +01:00
c3f92adf6b Add support for using documentation siphons in multiple ways
Experiental support for generating  multiple output formats from the
same siphoned data.

Adds a contrived example to generate a plain list of all CLI commands
(the "itemlist" format).

Eventually we can consider moving the tempate procesisng into the
Output class as well as a way to override how the data is traversed
(ordered).

Change-Id: I77629a74a8fa0c7e583993469dc50491f72f13e7
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-11-28 18:23:35 +00:00
39f9973f89 GRE Tests update after postinit removal
Change-Id: I33df256ca07c99149465c896c7063a3153021a5a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-28 17:42:32 +00:00
38fb44f51d snat: fix coverity issues
Change-Id: Icb8239c02af8758a9e4bf299726a89677f53451d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-11-28 05:36:24 -08:00
985f3d11fa Clean up the Lua API, make it luajit-only, no C
This removes the libcough which was a temporary layer atop
the libpneum to make it synchronous. Now Lua API only requres
luajit, and has no dependencies on compiling any C.
Also comment out a couple of debug print functions.

Change-Id: I35fd1c8088c6fd1b10b9e4d903ad241ab32fd91a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-11-28 11:55:34 +00:00
085f5c0066 make test: detect early vpp crash
If VPP process dies right at start, do a quick detection instead of being
stuck in the connect timeout (60s).

Change-Id: I41675181635fb81a6a7d93fbf652480a16bf78a0
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-28 11:54:47 +00:00
475f055305 snat: thread safe (VPP-443)
All traffic corresponding to a specific SANT user is handled by a CPU core.
in2out: Non-translated packets worker lookup by src address and VRF hash in
snat-in2out-worker-handoff node.
out2in: Translated packets worker lookup by dst address and port number hash in
snat-out2in-worker-handoff node.

Change-Id: Ia092a605689539469841d382588f3f486a29a769
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-11-28 11:35:22 +00:00
a10f62b11e dpdk: add ipsec cryptodev support
DPDK Cryptodev support and related IPsec ESP nodes using DPDK Cryptodev APIs.

When DPDK Cryptodev support is enabled, the node graph is modified by adding
and replacing some of the nodes.

The following nodes are replaced:
* esp-encrypt -> dpdk-esp-encrypt
* esp-decrypt -> dpdk-esp-decrypt

The following nodes are added:
* dpdk-crypto-input : polling input node
* dpdk-esp-encrypt-post : internal node
* dpdk-esp-decrypt-post : internal node

Change-Id: I6dca9a890abaf4fb2a4fffce3fd08ac013e4d701
Signed-off-by: Zhang, Roy Fan <roy.fan.zhang@intel.com>
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-11-28 11:29:50 +00:00
feeebfe019 Unlock LISP source FIB if only default left
If when removing a source route the LISP source FIB contains only the
default, remove the whole source FIB. Defaults are added when FIBs are
created so no forwarding entry depends on them.

Change-Id: I0dd5dc31d128d834ac3b92c962c4c68577aa7429
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-11-27 22:44:36 -08:00
dc5252b17a l2: quad loop l2input, l2learn and l2output nodes
Change-Id: I79f76bc9791d228e2ac2867a1b857bb03d9a5279
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-25 11:53:24 +01:00
30230dd7f8 l2: fix latency issue casued by unnecesary read of previous cacheline
In majority of cases ethernet header sits at the beggining of cacheline.
Reading (dst_mac - 2) into 64 bit register is much more expensive
than doing simple bitwise shift, specially if previous cacheline is
not prefetched.

Change-Id: I35e53eae735098fb917a87c307e60a87e76e460f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-25 09:27:31 +00:00
23a7412bda String (key,value) pair serialization
Change-Id: I0e713b5ee82e246d4e5bca138683f3205e984561
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-24 16:36:01 -05:00
4e969f9c18 vhost-user: add retry sequence in tx code
This change improves NDR rate with vhost-user
interface for ~ 40%.

Change-Id: Ibec0b7cd5a9c3a20c45f71e0081b9cb2db493cb8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-24 11:16:29 +00:00
a5e7c29d41 vlib: remove old memcpy implementation
Change-Id: I21f5abb00cf12da5c144da477badc38736be7a7d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-24 11:05:42 +00:00
ece983dd45 vhost: CLI delete interface by name
Adds interface name parsing to 'delete vhost' command
so an interface name can be provided.

Change-Id: Iacd50545a63548c13b9bb3c36a98e08f6ad74429
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-24 09:35:15 +00:00
7a91b46e03 vhost: Delete thread configuration when interface deleted
It does not make sense to keep interface configuration
when a vhost interface is deleted.
This fix makes sure thread configuration is removed.

Change-Id: I4b3b75d98c15b544c32928f79ef52b7622a86b75
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-24 09:34:56 +00:00
c5bf07fabe Remove postinit from make-test interfaces
Change-Id: I1eb0f735c5d025e6096d5760eb01419a1c58530a
Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-11-24 09:32:57 +00:00
1cd8f3c985 vlib: merge buffers.c and dpdk_buffer.c
Majority of those two files are identical so makes
sense to have only one.

Change-Id: Id23eeb332cb23a11e54eecccefe08594e21a724e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-24 09:25:22 +00:00
f3ebeda1da dpdk: remove old patches
Change-Id: I31244207ca5420558c6ff00b2021126ff5628e08
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-24 09:24:05 +00:00
e99007b3df ipsec: remove dependency on DPDK > 0
ipsec code is not depenent on dpdk anymore.

Change-Id: Iff3f960ca0f0435f66bcb575998d2fcea3377701
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-24 09:14:43 +00:00
4c6b34f742 l2: remove unused l3 packet type discovery in l2 path
This costs significant amount of cycles and it is not
used by anybody.

Change-Id: I42a0306aa7c254292621bdaa09b736421662d540
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-24 03:50:06 +00:00
e0a2d1796a dpdk: switch to 16.11
Change-Id: Icf9de5b89e5c2cda763e52d528fb70091860a754
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-23 22:39:02 +00:00
676554935a dpdk: remove rte_mbuf modifications at many places in the code
It is sole responsibility of dpdk tx function to fill/update
rte_mbuf prior to sending packet do PMD.

Change-Id: I8ca1dba3e7bef41034d36e3525831849f7ac4ac0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-23 22:12:25 +00:00
daa2cd1512 l2: quad loop l2fwd node
Change-Id: I8510575ee1d6b7c5ccf551766e77e40ce55e644c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-23 18:43:48 +01:00
754962130a dpdk: input node next and error optimizations
Change-Id: Iee90ed725e824a3beed2660d21d74dae48c76eb0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-23 17:22:58 +01:00
971158ee7b Fix coverity warnings, VPP-486
Change-Id: Id88805f77642187f304f8baef1f6b447728e4b5b
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-23 15:19:11 +00:00
Jan
4af521d297 CSIT-473: L2 FIB tests
- add/delete MAC entries and check the traffic

Change-Id: I82b568fdd7796461b2df900c07a4bd9b87ab17c2
Signed-off-by: Jan <jgelety@cisco.com>
2016-11-23 13:22:42 +01:00
22766b824d dpdk: quad loop dpdk tx and code optimizations
Beside performance optimization this change
also introduces rte_mbuf validation in dpdk tx code.
If packet is arrving from non-DPDK source like
self-originated packets or non-dpdk devices (tuntap,
af_packet, netmap, pg) it is not anymore exepcted
that it contains valid rte_mbuf metadata unless it is
explictely stated by setting VNET_BUFFER_RTE_MBUF_VALID
flag.

dpdk-input node sets VNET_BUFFER_RTE_MBUF_VALID on all
packets and that reduces cost of validation in tx node.

Change-Id: I4ad40f398f7b5cf90656a2069a27c0f6fc13efba
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-22 22:11:12 +00:00
177bbdcd8f GRE tests and fixes
Change-Id: I234240e9bdd4b69ad64a17b1449ae1e81c0edaca
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-22 21:26:55 +00:00
7afe9e3826 Fix coverity warnings, VPP-486
Change-Id: I4ec49e116fdb418ebf9d84000f2a0cec1cf78b14
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-22 21:25:47 +00:00
d28bc62a72 Span node configuration fix
Prefer to use the sw_if_index instead of the hw_if_index
to be compatible with vhost-user interfaces.

Change-Id: Id1e4255a992d428b8de47b3dd6175ed86e08c803
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-11-22 21:10:56 +00:00
8817061c73 Prevent a frame leak when a pending node dispatches packets to itself.
this patch recognises the case where the pending frame has packets dispatched to the same to-node, i.e. when restoring the frame there now exists a new to-node frame, and then frees the frame in hand.

Change-Id: If166bf56970b7b3412fa6097cd90bf22f72abe4d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-22 18:22:41 +00:00
fba8a95102 add vpp banner graphic when vpp-cli starts
Added check if termianl output is tty
*If terminal is tty, display banner

Added "FD.io VPP" banner to vppctl script on startup
*FD.io displays in red
*VPP displays in white

Change-Id: Iaab3513d4f9d7ba5eefe070c1daf319f5014cf85
Signed-off-by: Padraig Connolly <padraig.connolly@intel.com>
2016-11-22 16:22:21 +00:00
c0e939b34c vppinfra: fix TSC clock detection on newer intel CPUs
Change-Id: Iff88c9a0dd1b7401605075221640b269bec12859
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-22 14:35:46 +00:00
72c390917c VAT: don't pass u8 to unformat - it expects an 4 byte integer
Change-Id: I82f21a77b96b9d9f00a4d3cf261bb4bd4644460b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-22 14:29:02 +00:00
ed1c183504 Fix issues reported by coverity
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Change-Id: I5d8c542fd283f86c325200f3caab56294393cedf
2016-11-22 11:45:46 +01:00
2be95c1196 Dual Loop Load-Balance Nodes
Change-Id: I23bc477aa03f97dd546747b3297a878055d32e1c
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-21 19:02:59 +00:00
557d128b68 Add client-side msg_name_and_crc -> msg_index table
vppapigen now generates per-message crcs. Verified that whitespace
and real changes in message A don't change the crc for message B, etc.

Fixed the sample and flowperpkt plugins to participate. Others need
the same treatment. They don't build due to python/java language binding
build issues.

To use the scheme:

Client connects as usual.

Then call: u32 vl_api_get_msg_index(char * name_and_crc)
name_and_crc is a string like: "flowperpkt_tx_interface_add_del_753301f3",
aka the message name with _%08x <expected crc> appended.

Try these vpp-api-test commands to play with it:

vat# dump_msg_api_table
     <snip>
 [366]: punt_reply_cca27fbe
 [367]: ipsec_spd_dump_5e9ae88e
 [368]: ipsec_spd_details_6f7821b0
 [369]: sample_macswap_enable_disable_0f2813e2
 [370]: sample_macswap_enable_disable_reply_476738e5
 [371]: flowperpkt_tx_interface_add_del_753301f3
 [372]: flowperpkt_tx_interface_add_del_reply_d47e6e0b

vat# get_msg_id sample_macswap_enable_disable_reply_476738e5
 'sample_macswap_enable_disable_reply_476738e5' has message index 370

vat# get_msg_id sample_macswap_enable_disable_reply_476738e3
 'sample_macswap_enable_disable_reply_476738e3' not found

CRCs may vary, etc.

vppapigen is used to build a set of JSON representations
of each API file from vpp-api/Makefile.am and that is in
turn used by each language binding (Java, Python, Lua).

Change-Id: I3d64582e779dac5f20cddec79c562c288d8fd9c6
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>
2016-11-21 18:11:41 +00:00
Jan
fca670b0ec Update CSIT tests 161113 -> 161120
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: Ib8472f0a6eb4c8add5ca8ba51bccd9ba59938636
Signed-off-by: Jan <jgelety@cisco.com>
2016-11-21 17:50:10 +00:00
8b37b8732d Convergence Improvements
addressing convergence times when interface is shut.
1) prioritise the registered callback handlers. Add FIB convergence handler as high priority
2) hook the FIB convergence call-back into HW link down.
3) don't schedule a walk of a FIB node if it has no children
4) Checks at fib_path_t to prevent unnecessary walks, that it prevent the same information propagting the graph multiple times.

Change-Id: I406966b50f31d77c221821b8649776d66655194c
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-21 14:18:09 +00:00
c008ee186b pg: avoid possible buffer leak
Change-Id: Iad1a4028d7c3d603e644db9f8a743b92fc2a4dba
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-19 16:11:05 +00:00
eccf509a31 vlib: Add 'show cpu' command
Change-Id: I0d9af8e022cc25b8b4503f808f79028190475f8f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-19 11:30:36 +00:00
c21d59fa33 make: call install-dep on unatteded invocation
Change-Id: I7a3c21c47f49b56b6435397e731d4da961ef8ffd
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-19 12:15:52 +01:00
7dc4146eb1 dpdk: quad loop dpdk-input node
Change-Id: I761af883403b6740bd24ce196ae0bfe6bc77b409
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-18 13:42:30 +00:00
c6e8e1096b CLI for access to HQoS queue statistics
Change-Id: Ib9bc5d8d28b4742583f917c3a20e7c676df59de4
Signed-off-by: David Hotham <david.hotham@metaswitch.com>
2016-11-18 13:41:51 +00:00
c0a36c0d93 handoff - allow symmetrical dispatch
update cli cmd with symmetrical|asymmetrical flag
(asymetrical by default)

Change-Id: I8186506413a3ba0aa0561c0448b5e06e6d6e7ece
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2016-11-18 13:40:10 +00:00
5165cbc713 Fix bug in configure 'vlan-strip-offload on' first, then configure "set interface mtu" command,
vlan-strip-offload option will be changed to off.

Change-Id: I1f39628fc8cde4e46ed5b2e3208253a07327de81
Signed-off-by: jerryian <gu.jian1@zte.com.cn>
2016-11-18 13:39:24 +00:00
4015b19586 dpdk: maintain per-worker trace buffer
Change-Id: I8234054cef4cadada6745a8c00c8df2c20daac33
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-18 11:56:33 +00:00
36806d18e8 Add the Makefile to Lua API which got gitignored and adjust local .gitignore
Change-Id: I87358dc5dddc6964c128283f096d382492af5886
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-11-18 11:56:01 +00:00
4fafa623de dpdk: remove unused code
Change-Id: Iabb5a3b15e35fb062c04bbc076b19fe50910d412
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-18 10:35:35 +01:00
e48b828987 Fix VPP-132: leave IPv4 addresses in network byte order when sending.
Change-Id: Ibae771e7cba0a3e834382f43d4bc07b457844b00
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2016-11-17 21:04:18 +00:00
7490a75281 feature: API/CLI to enable/disable feature per interface
Change-Id: I91d5f5648189143903eb973fdc60de9880fd47c2
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-11-17 21:03:25 +00:00
999bbc4a20 remove reference to Intel with dpdk docs
*Changed configure files to say DPDK instead of Intel DPDK
*Changed rpm and deb config files to say DPDK instead of Intel DPDK
*Changed vnet Makefile to say DPDK instead of Intel DPDK

Change-Id: Ic6e3eacf2341af873d4bd2e036d5afa857ca6355
Signed-off-by: Padraig Connolly <padraig.connolly@intel.com>
2016-11-17 21:02:29 +00:00
75665d3ea1 Fix coverity warnings, VPP-486
Change-Id: If98e5e00eede8f2aa9f17517c726b337c98e5467
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-17 20:51:43 +00:00
0bd36eac47 Fixup Path weights of 0
A path wight of 0 is a meaningless value. We can either reject it and thus expect CLI/API clients to always write a non-zero value, or we can accept it and assume the intent was a weight of 1 - this fix does the latter.

Change-Id: Ide736dbbb8376f85441f5a67388d5e3acad4d34e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-17 18:46:20 +00:00
4ee3a65b93 dpdk: remove efd
Change-Id: I761af883403b6740bd24ce196ae0bfe6bc77b408
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-17 17:18:14 +00:00
5858a82e76 Put address in top bytes for the nexthop in vl_api_fib_path_t (VPP-532)
VPP-500 added the API for the fib dump capability. However, it puts the address of the
nexthop in the low bytes while the top bytes are padded with 0's if the address is ipv4.
The address field is defined as 16 bytes to accommodate both ipv4 and ipv6.
This fix is to correct the issue and put the address of the nexthop in the top bytes.

Change-Id: I429dec662e32040b186dfc323801ef49b76a42a3
Signed-off-by: Steven <sluong@cisco.com>
2016-11-17 14:46:26 +00:00
6b9c6df746 Fix 4 typos
As given, the macro was ignoring its bi0...bi3 arguments, and would
only work if the arguments happened to be given as pi0..pi3

Change-Id: I5a8b163fcfc6b8197534d474fcd952b2e8b2694b
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-17 10:06:45 +00:00
94ea8b7ff3 VPP-533 Fix ping race condition in JVpp
Improper synchronization between ping_send and ping_reply_handle

Change-Id: I844c96bc3f5cd750a1c43188d3133c92f8f14e38
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-11-17 10:05:26 +00:00
c0f6cf36a5 VPP-534 Remove references to DTOs created in JVpp
JVM objects allocated from a native thread need to be freed,
they are not subject to GC.

Change-Id: If1e140d2ceaec93631735ae7665f45db5aacf7cf
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-11-17 10:04:55 +00:00
cfba1e2476 Tune the ethernet input untagged l2-bridging case
Change-Id: I62fe0834e1031e191787a26452fb167c33e30ffd
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-16 10:25:06 -05:00
fbb2ef6456 vhost: Fix bug during interface deletion
This small patch fixes a critical bug during interface deletion.
While the interface was removed, thread placement was not corrected
properly.

This should help fixing VPP-528,VPP-531 as well as other FDS bug reports.

Change-Id: I02f9d44c62b6ca4c0b6d73f476600b342846507f
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-16 13:30:57 +00:00
740bcdbd2b Add an ability to punt all unknown UDP traffic to the host
By default, VPP replies with ICMP error: port unreachable when receives
an ‘unknown’ UDP (destination port with no registered listener) packet.

An existing punt() API is extended to accept ALL (~0) as a L4 port
number and if used redirects all ‘unknown’ UDP packets to the host.

New ‘all’ option is added to the “set punt udp” CLI as well.

Change-Id: I444fc5e32ffa3f0f085bb17708bf32b883ba09df
Signed-off-by: Alexander Popovsky (apopovsk) <apopovsk@cisco.com>
2016-11-16 07:24:26 +00:00
25e26dc513 VPP-521: Classify API enhancement to redirect traffic to pre-defined VRF
Ingress packets are punted to the “Input ACL node” where traffic is
classified based on n-tuple keys. If no matched session is found from
the classify tables, then it will be passed to “the lookup node” for
normal packet forwarding. If a classify session is hit from one of
classify tables, then packet vnet buffer field sw_if_index[VLIB_TX]
will be updated to the new FIB index used for subsequent IP lookup
for this packet.

Change-Id: Ifdea63196ddb81c2d5c43b8c98e11ddbf5b11858
Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-11-16 02:29:44 +00:00
9c6ae5f43b feature: remove old interface output feature code
Only consumer was ipsec which is now moved to the new
ip{4,6}-output feature arc.

Change-Id: I06008e67b5449c25eae77f28e1688521af3a23e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-15 23:32:17 +01:00
08a6f01590 feature: convert ipsec output to new feature code
Change-Id: Ia287298bac76c8e6bf760d48c1e1e697de52999c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-11-15 21:50:59 +00:00
aaef1eb92b threads: add support for multiple worker handoff queues
Change-Id: I2452df3c493eeb0a5078d53a230df6906651c057
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-15 20:27:50 +00:00
f6e3dc4778 span: add feature (rx only) (VPP-185)
Change-Id: I0f7cbf06b5a5acd745d13c9f5c761ea18132107b
Signed-off-by: marek <mazavods@gmail.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-15 17:49:14 +00:00
7c8eda16d4 VPP-393: Subinterface is still used after deletion
Fixed bug in delete of sub-interface, if sub-interface is xconnected it
was not deleted correctly (show interface address fails).

Interface is set to L3 mode before deletion.

Fixed help in API command.
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Change-Id: Ibe781e4b53422e6535e34ec72dbe274f9045f051
2016-11-15 16:08:20 +00:00
86d87c40dd Update test documentation.
- update IRB, IPv4, ipv6 doc
- revert 778c2765c8

Change-Id: I9af5ed9329ce5fe01392cf28d5bf321cfc647e48
Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-11-15 15:32:48 +00:00
Jan
b7c3f2c61c Update CSIT tests 161106 -> 161113
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I3a475b34764cfe3e433ce7ab8cfc5501f6131690
Signed-off-by: Jan <jgelety@cisco.com>
2016-11-15 14:39:02 +00:00
51f80fc0c2 DPDK_HQoS: fix coverity warnings on uninitialized variables
Change-Id: I76437b76619a280a44e4def4d6c048eaf3926102
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2016-11-15 13:56:08 +00:00
dac225e5e4 threads: add assert to silence coverity warning
Change-Id: I381786b26050f2dfcb4c74094309cf2114d26d85
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-15 11:08:30 +00:00
409ef615f8 buffer: clone free_list to each vlib_main on creation
Currently only packet-generator is creating free_lists
during runtime. This avoids crash when buffer is freed
on different worker thread.

Change-Id: If2ae066a12cf7c4b3267d56d8566806f31cf7ffc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-15 10:23:49 +00:00
01b071222d Dump routes (VPP-500)
Change-Id: I86e7382395a8b6471a0deaf57163718d41b71b83
Signed-off-by: Steven <sluong@cisco.com>
2016-11-15 08:13:26 +00:00
d4895d5415 dpdk: add build support for DPDK 16.11 release
Change-Id: Icec79bfc5d786cd293520b1dcc6b8dccd1419acb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-14 20:48:54 +00:00
74dcdbfb2c make test: improve naming of temporary pcap files
Change-Id: I0f4e83aab8bec80562bd90e8035f602ce903cd3e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-14 09:49:09 +01:00
558d5ebbb4 Add support for multi FIB DHCPv6 Proxy
- Support multiple DHCPv6 server targets across VRFs
- Allows clients and servers to be in different VRFs
- Aligns CLI and VAT for DHCPv6 to DHCPv4

Change-Id: If47756b3a51dc1b9d045a32b7d32ceb80c1746e2
Signed-off-by: Wojciech Dec <wdec@cisco.com>
2016-11-14 10:03:40 +00:00
e30872e660 Add clang to 'make verify'
Change-Id: I9ba84632da93ffb7713064db51f2888fc212713a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-12 18:55:49 +00:00
e5af88c820 Fix a bug in the timing wheel
Properly propagate vector allocated in advance_cpu_time_base() for a
special case, when the expired_user_data parameter passed to
timing_wheel_advance() is NULL and the only expired event is in the
overflow pool.

Change-Id: I5cefab0e881958334791aaa6354ec08225af23c1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-12 03:13:12 +00:00
7f3c36bb85 Use gcc for start in 'make verify'
Change-Id: I8ef5f8aeb9af5127337163c4767bfa92b62f8175
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-12 00:11:20 +00:00
ad95b5df27 pseudo atomic adjacency updates
When an adjacency changes from incomplete to complete (arp to rewrite) and vice-versa, that update must produce valid behavour w.r.t. the packets that continue to encounter it.

Change-Id: Icc2709aff9807c5d24f91ef7649268991ad9a45d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-12 00:06:39 +00:00
f5179c7144 Clean up coverity warnings, VPP-486
Change-Id: I709e7cf0bb52d8e6cdc9ddb3b7648660204aa3bd
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-12 00:05:41 +00:00
4cecc611be Add 'make verify' target to top-level makefile
Change-Id: I992df2b6ded9533d32f5f936e6d651055061f054
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-11 23:31:55 +01:00
Jan
49c0fcabad Add single-loop test variant to L2BD and L2XC tests
- create single-loop version of tests
 - update doc strings

 - add possibility to log CLI string for logging level "info"

Change-Id: Ibc9e5650b8a33d2ed168a8440c2ae03227be60bb
Signed-off-by: Jan <jgelety@cisco.com>
2016-11-11 18:06:15 +00:00
fa1456a38d Luajit API and some examples
Change-Id: Ia140c4750f06870c40b7058c4afb2e20ca633a49
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-11-11 18:05:53 +00:00
b95302ea09 Fix clang compile errors in plugins
Change-Id: I2c2df9b5ba567bde2564c924bd9ad2fbbac775c4
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-11 16:14:30 +00:00
8b3191e6d7 feature: convert all feature nodes to new feature infra
Change-Id: I34c527ba910fb282a95458b78d1d684eb337905e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-11 14:39:00 +00:00
0178d52384 Add IRB test
- JIRA: CSIT-255
- create loopback interfaces
- move pg-interface specific arp and neighbor discovery from vpp_interface to vpp_pg_interface
- base configuration of IRB tests
- IP test scenario

Change-Id: I9945a188163652a4e22325877aef008c4d029557
Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-11-11 10:29:04 +00:00
9db551cf50 ip_frag: fix implicit enum conversion
Change-Id: I024b8d79cced45cf53a7a912319eca2cc932b10e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-10 21:45:39 +00:00
96b41f7609 feature: fix init issue when multiple arc are present
Change-Id: I9c76b6d7ffebeeb92d5eeca5852c487d73151f28
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-10 21:44:49 +00:00
d6338ab752 Enable verification received packet for LB test
Change-Id: I9c8a2f5744f322b2bd91c5ae24aeb1279cd11e0c
Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-11-10 15:36:19 +01:00
c42912de8e VXLAN tunnel encap forwarding optimization with FIB 2.0
Optimize VXLAN encap node so that vxlan4-encap node is used for IP4
and vxlan6-encap node is used for IP6 underlay. Also stack the VXLAN
encap nodes to the appropriate FIB IP4 or IP6 load-balance node
instead of ip4/ip6-lookup node to save IP lookup operation.

For VXLAN decap node, check VXLAN header FLAGS field for each packet
and remove the code to support decap-next for IP4 or IP6. These decap-
next values were intended for experimentation purposes and not needed
any more since VXLAN-GPE tunnel is supported. The decap-next field is
still kept in API for backward compatibility and its value has no
effect. Decap next for both vxlan4-decap and vxlan6-decap nodes is
always l2-input node.

Change-Id: I8ac95774946549ec403ab691f999df0c006b460f
Signed-off-by: John Lo <loj@cisco.com>
2016-11-10 12:45:00 +00:00
450cd302ee Fix Compile errors from clang in FIB2.0 code
Change-Id: Ief769c966888094944b7a6b7f26527e7eff6103f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-09 23:17:54 +00:00
2138b351db Fix DHCP proxy when used for non-default FIB tables
An issue is that the server->server_fib_index is overwritten by
some incorrect value on subsequent calls to the function - e.g.
when setting DHCP proxy for the same FIB table several times.

Change-Id: I2e129b47f5c8fe3a0b924a7d71bb83e6fc53e9b5
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2016-11-09 12:38:33 -08:00
8d2e0e0243 Fix a batch of coverity warnings, VPP-486
Change-Id: I0379844824b4c2eb42588d0fb8e1a7eb441e923f
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-09 11:29:58 -05:00
Jan
8c83ef01c4 Update CSIT tests 161030 -> 161106
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5e705f4a4d1f843ff0041930399f707e59d01b05
Signed-off-by: Jan <jgelety@cisco.com>
2016-11-09 15:09:00 +00:00
fb33ce4fc5 threads: don't wait for dpdk init in vpp_lite
Change-Id: I110cdc3cc2a26aa36dc250302a6f26db2d884e08
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-09 14:04:01 +00:00
51327ac5f9 devices: create dummy device-input node to keep nexts in sync
device-input feature arc requires that all input-nodes have
nexts in sync. packet-generator tends to call vlib_node_add_next
when new stream is created and that puts nexts out of sync.

With this change all input node are siblings of device-input
node so call to vlib_node_add_next(...) will install same next
to the whole family.

Change-Id: I33d79492e5f30f348af19e527f36fe0222c524d7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-09 14:03:25 +00:00
66bcab2fff dpdk: bump to 16.11-rc3 release
Tarball available at:
 http://dpdk.org/browse/dpdk/snapshot/dpdk-16.11-rc3.tar.xz

Change-Id: Ib34f32206d866888c4b5bf6609b8ae53f570daaa
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-09 13:08:30 +00:00
05bb1dd7a9 fix errors reported by clang
Change-Id: Ib821e52dac7cd7ee24e6e495916689e23e8b699a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-09 12:12:55 +00:00
778c2765c8 Improve test framework documentation
Change-Id: I06f0cbbbdd29e04a07f1db6807b3e16f1d41e8d2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-09 12:00:18 +00:00
d72fdf5712 Disable non-working checks in load-balancer test and rename ip->ip4
Change-Id: If62011e29e912bf0c47625b0d3b3624ef6375013
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-09 11:44:59 +00:00
b7e2f3d312 Update sample plugin and plugin skeletons: use driver feature arc
Change-Id: Ic0a1479e4a0408a4b93f47e50752d07c2bdccdde
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-09 11:36:02 +00:00
3a4ed39345 pg: maintain per-worker bitmap of enabled streams
Change-Id: I38e476c8080faa5a8647ce6be5a71090e0aa8d5b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-08 19:29:53 +00:00
9f6186e055 Add the tap driver to the driver feature arc scheme
Change-Id: I5f5251ed6b2a39d5e83dd7c702079245ef5f32b0
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-08 12:13:13 -05:00
116ea4b2a1 vhost: Improve packet tracing
Packet tracing for packets sent or received on vhost interfaces
now includes:
- virtio header information
- virtio queue transmit mode (chained, indirect, etc...)

Should be *really* helpful for dealing with the many existing
qemu/driver versions/implementations.

Change-Id: Id0a5d1d671d8b9d3e05691fe13def991b30ee105
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-08 17:04:13 +00:00
64034367e3 pg: support for packet generator on different worker threads
New Debug CLI:
packet-generator new {
  worker X
}

Change-Id: I71499733a29b49cd36d753d54846d2553af6d024
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-08 12:01:00 +01:00
80e8816b41 Restore punt/inject after FIB2.0
The tuntap punt/inject should be enabled for IPv4/6 RX once any vpp
interface has an IP address.

Change-Id: I4a507b7540b7464ed6d21035ac9b8f9463028c6f
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2016-11-07 16:00:39 +00:00
d4048a46bb Fix a class of spurious clib_memcpy (...) warnings, VPP-486
Coverity doesn't understand the vector-unit memcpy functions. #ifdef
them out of the way when running a coverity scan.

Change-Id: I312eec1c861c1d3722510d2c121fb5f398fca868
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-07 15:47:53 +00:00
e74c1dc577 Fix dual-loop issue in vxlan_gpe decap
From logical point, if first packet is ipv4, and second packet is ipv6.
When first packet failed, the procedure will skip key6_1 setting.
This will lead to second packet's failure. 
But here the graph node only process either ipv4 or ipv6 packets completely.
So it is not an issue here.

This patch only make the packet processig's logic clear. It is just a cosmetic change.


Change-Id: I0104ebf2546208d9068000649ce6dccdeeb5aa79
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-11-07 14:58:58 +00:00
d2017f6de1 pg: add device-input feature arc support on pg interfaces
Change-Id: Ice97940a27c9f4d983d9199d59719d953520fcdb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-07 14:55:35 +00:00
cf4789498d use STATIC_ASSERT macro instead of calling _Static_assert directly
Change-Id: Iccae655334b6219d22c325108b0e7f37d1dd68cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-07 14:53:29 +00:00
109cd50261 fix isssues discovered by coverity scan
Change-Id: I62deaaa47a9259c886efa702eb4279c1c481585f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-07 14:51:46 +00:00
275b146bc1 Fix longArray type in JVPP generator
Change-Id: I0319b45d2e070ee2e20dcf900477fdaadd072aef
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-11-07 11:37:58 +01:00
20a29c7b4d VPP-498: Prepare vpp RPM packaging for use by downstream distros.
Change spec to add new macros to get rid of relative dir reference and
use vpp version. Store version string in .version to store metadata in
dist archive. New script to create dist archive.
Add dist and wipedist targets to Makefile for builds of source RPMs.

Change-Id: I7cf0164f0cb094ec70f3dc323ed7fa2ee82bd902
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2016-11-04 22:22:53 +00:00
dea6063219 VPP-524: Add support to API to dump IPsec SPDs
Change-Id: Ief37bef8db9f194fe2a75e0eb223a41bc739bc4f
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2016-11-04 22:21:20 +00:00
b0d680b138 vlib: fix cacheline alignement in several structs
sizeof(vlib_frame_queue_t) was 208 bytes so non-zero elements
of array were not aligned with cacheline.

Change-Id: I626615cb64fe9aa86122881a1fff1c5bcca1ec20
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-04 20:22:22 +00:00
87cd119ca9 feature: store arc index in vlib_buffer
Previos implementation imposed a limit that node can be member of
only one feature arc as feature arc index was stored in node runtime.
Now start node stores index into vlib_buffer_t and feature
nodes are taking it from there.

Change-Id: I252841083bc292af7ed36bf1ac652f2b8c16bfb8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-04 14:59:42 +00:00
96e6f958bb DHCPv6: relay reply fixes (VPP-510)
Fixes DHCPv6 relay reply message corruption.

Change-Id: Iead995f29d2fa9cbb04f0f9d42b3aa9002267117
Signed-off-by: Wojciech Dec <wdec@cisco.com>
2016-11-04 13:12:37 +00:00
e21c52861d vhost-user: multiqueue support
This patch adds multi-queue support to non-dpdk's vhost-user
driver.
Waiting for a unified way to manage threads, this patch
defines a way to assign threads to interfaces that is
specific to vhost.

Change-Id: I86298788b1a4e886c5431f187dc17175d12c7a8b
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-04 12:31:11 +00:00
f524f0add5 vppctl: Do not use sudo if already root
When using sudo, environment variable such as the PATH
are overwritten.
This patch just checks if user is already root and does
not use sudo in such situation.
This allows using approaches like:
sudo env PATH=path/to/vpp-binary/:$PATH vppctl

Not really important in production setups, but this is handy
for testing.

Change-Id: I079c104d026ae7d378468380b012279a6e5d765d
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-04 11:22:11 +00:00
05ab8cbdd4 vlib: add vlib_buffer_copy function
It works with and without DPDK so it allws us to enable
lawful-intercept code in vpp_lite images.

Change-Id: I08f234cbc652c3ff47a6123a43b9e7f8bdcd5534
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-03 22:16:15 +00:00
bcc889cd08 Crash when adding duplicate paths
Change-Id: Icd29c9013ae70f5444eb940aff4f08589e755f48
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-03 22:15:15 +00:00
931be3aca2 Test framework: improve gdbserver handling
Produce a user-friendly message if gdbserver is not available, instead
of cryptic exception.

Change-Id: Ia0d99e0488d2ee6e8af764b466dae2639f17ea55
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-03 16:43:04 +00:00
bdb1f81937 Fail to register Java API for plugin that was not loaded (VPP-522)
Change-Id: Idb95888ae6fc7a9df197a919e3d3283f915f4a4c
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-11-03 16:42:41 +00:00
e7637e7017 Fix vpp-plugins rpms
vpp by default looks in /usr/lib/vpp_plugins
rpmbuild has ${_libdir} as /usr/lib64

Thus vpp doesn't see the plugins.

Change-Id: Iecbc491940678728305c181b04bb0914ad174bf1
Signed-off-by: Ed Warnicke <eaw@cisco.com>
(cherry picked from commit 2dfd08242d)
2016-11-03 16:42:26 +00:00
74e2efad55 Remove unused jvpp dependency on plugins' control_ping
Change-Id: I6ebb69443e79e60c7ce6afded6a2d3af85048e6e
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-11-03 16:42:03 +00:00
cb4cda6912 Reset frame length after dispatch when recycling frames
Fixes a gross bug when enqueuing x->x->error-drop or similar

Change-Id: Ie1dc10371de4a265f5131b67cab7a62ed460a1fc
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-03 16:41:25 +00:00
393252a6b1 Timestamp now a 64-bit integer: ns since 1/1/1970
Properly initialize allocated buffers

Change-Id: Ib2005e605c89a164a4856790db6968fcd7520f5c
Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-03 13:29:13 +00:00
ed4a2fdd4d Adding Sequence Number - Per Packet Counter(PPC) support for iOAM6.
- Added support in classifier session to identify a flow to be iOAM6 encap/decap
- Sequence number as part of iOAM6 E2E header is created as a plugin.

Change-Id: Ib7605de45aecff25d684d099b525f8dc96ee7038
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
2016-11-03 11:44:21 +00:00
273c26a531 feature: recover "show ip features" command
Removed by accident.

Change-Id: Ifebbe99eb2825cb6ee7d33d55cf3c087a9817f72
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-02 21:54:32 +01:00
8bdc63b603 feature: all input nodes must have same nexts
Change-Id: Ie4c820933114af2269c99531856c45b0271a4a3e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-02 19:28:08 +00:00
3a8345f6e0 ethernet: fix wrong start node for ethernet tx feature path
Change-Id: I3e02588e8c05ec50eacbe7c10cd5ac185daad43b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-02 16:42:58 +00:00
Jan
d7724759fd Update CSIT tests 161024 -> 161030
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I9f7418a2161e6411375c2d7ff1f3f686b991fb87
Signed-off-by: Jan <jgelety@cisco.com>
2016-11-02 16:41:26 +00:00
017381ada5 vpp: remove unused code
Change-Id: I81c5b0f9acbffa41a75de497bf6dd68936813012
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-02 15:52:07 +01:00
01bbbe91fa Improve debug-cli in test framework
Opening debug-cli only makes sense if there is time for user to use it,
so either the run must be debugged or stepped. Only open the debug-cli
in these cases.

Change-Id: Ied276071797a549880d730cda43c59230a412efe
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-02 14:14:28 +00:00
446e1f577b Allow empty DPDK device init config
This patch allows for empty dpdk device configuration
such as: dpdk { dev 0000:0a:00.0 { } }

Instead of exiting.

Change-Id: If9488eecc7fb1e0b5c6626f9c074649b39b727d3
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-02 12:00:11 +00:00
77766a12e3 adj: fix typos
Change-Id: Ib5b5a15223ac9252e9cacd163bd870b009ec3b63
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-02 10:12:15 +00:00
63f70d2131 dpdk-hqos: don't hold up packets indefinitely under low load
Change-Id: If884637a6db0cb813a40920194795da2e98c8b23
Signed-off-by: David Hotham <david.hotham@metaswitch.com>
2016-11-01 23:50:36 +00:00
2231150b52 feature: add new feature handling code and device-input features
Signed-off-by: Damjan Marion <damarion@cisco.com>
Change-Id: I010ecde93863dbdad84b993cd3680a5446db59b5
2016-11-01 21:34:05 +00:00
3dffb1e4c6 Fix recursion loop - recurse through cover
Change-Id: I07870122f90e41fbb216b2f426bccbfd94049cd6
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-01 21:32:45 +00:00
57fc854c08 VPP-437: ip6 hbh processing with FIB 2.0
1. Modifies ip6 hbh selective processing in lookup
only when non-recursive routes are present.
2. Adds ip6 hbh processing in load balance.
3. Cleanup of ip6 iOAM hbh plugin formatting and
CLI handling found while testing the changes.
4. Deleted wrong asserts in dual loop for add
and pop iOAM hbh nodes. The current data of the buffer
ip6 start and will not be 0
5. Deleted set ioam destination cli and associate functions.
iOAM add/pop is enabled via classifier, this cli is no longer
used.

Change-Id: I3aac71ad512762c0b2b602fe88fe0291b85d39c7
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-11-01 21:30:54 +00:00
8fe8cc21d1 MPLS Exp-null Tests
Add some 'make test' unit tests for MPLS explicit NULL label handling.
Fix the stacking of the MPLS load-balance result form the lookup onto the IPx lookup object.

Change-Id: I890d1221b8e3dea99bcc714ed9d0154a5f602c52
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-01 19:26:24 +00:00
3b906b0d9b vppinfra: add STATIC_ASSERT macro
Change-Id: Icc4e74ae1627c5b97746ed64955a3dc089e3998f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-01 16:19:13 +00:00
a0bc391daf fix typo in .gitignore
Change-Id: I09c25b855c09f55da7e836e641570befead40f4f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-01 14:18:49 +00:00
eb90b7fbc1 node: ensure that vlib_node_runtime_t is cacheline sized
Change-Id: Ib14ba63d09212a172fe52b01131404bf50cc494d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-01 01:28:00 +01:00
d5c9d6f30a l2: fix l2-patch node
This node was not setting vnet_buffer (b0)->sw_if_index[VLIB_TX]
properly.

Change-Id: I3e9f095da5f79c4186e3988ef315a7045ac85708
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-01 00:12:07 +00:00
6e3c65e8b9 dpdk: use u32 for next0
Change-Id: I0158a290736f68d0d56dff2f15dd18518059efd2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-01 00:11:32 +00:00
0cd695c7ad config: rename ip_config_main_t to vnet_feature_config_main_t
It will not be used for IP only...

Change-Id: I90ef3030aff7f9e24767553f019cabc1ea987126
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-01 00:11:15 +00:00
277b89c946 add vpp debugging support to test framework
improve test documentation

Change-Id: Ia9678aa2532ecb4cb33736aedb4a31aa3f2a3f93
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-10-31 23:48:25 +00:00
cede3798b7 Update _slabshr fields when updating HQoS masks
Change-Id: Ia1042622c656861a80b856115aeb3c2e5cf5ea2a
Signed-off-by: David Hotham <david.hotham@metaswitch.com>
2016-10-31 22:52:47 +00:00
81c7dfc1bb VPP-120: add custom types support to jvpp
Generates java classes based on typeonly definitions
(hashcode, equals and toString methods are also included).

Adds JNI handling for request and reply messages
(also arrays of custom types).

Change-Id: I16f1cea17899704426aa083fad1cb800a8d115df
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-10-31 21:42:40 +00:00
c967a8239d vppinfra: use 64-bit crc32 instruction in bihash_24_8
Change-Id: Ibeb6d35e15a8d332753df7c352c0b51c277a0ee5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-31 16:40:30 +00:00
ff7d642f3d vhost-user: fix crash in vhost_user_intfc_tx (VPP-519)
The crash was the result of indexing off the end of the next[] array.
Removing that prefetch code completelly, as it is questionable
how much it helps so late in the game.

Change-Id: I7bc83483a1088437edb4ac0f95a54c39afce136b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-31 16:39:18 +00:00
860dacc3bd VPP-478: SNAT address range overlapping
Ignore adding duplicate address.

Change-Id: Icbb76bbcb3a78a18acb1a50d5d8ab777e9f9bd36
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-10-31 08:28:39 +00:00
588144ab45 VPP-459: SNAT dump API for in and out interfaces
Change-Id: Ie0cba0778b094eaafa960d3f432199e1e3b2d116
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-10-31 08:26:40 +00:00
6ce685d79b Initial deb packaging of vpp-python-api
Change-Id: I14d5180d6abd59b813906011718121a2bbc9bafd
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2016-10-29 20:14:56 +00:00
8c1bebe83f IPv6 Classify Forwarding Graph errors
Fix a few places where the protocol of the DPO object was incorrectly set and hence the graph traversed by the packet jumped between ip4 and ip6 nodes.

Change-Id: I75c4ecfdf79df39f5dbb7c68f1fc82ff04aaed28
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2016-10-29 13:15:14 +00:00
435a64b530 vppinfra: fix issue with bihash_8_8 hash function (VPP-518)
Change-Id: Ia9a484575d0142e89ec5b6b4c6c2e702e1098a1e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-28 22:22:57 +02:00
3891cd851f policer: replace uintX_t with uX, fix style
Change-Id: Ie4a0ba57d5c672ab04fe37801836f65d8731a90a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-28 11:41:33 +00:00
86a2c57808 Update test framework after API function change
Change-Id: I326ef57fa0c691c5a1cecea0364d770b6f7a73c8
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-10-28 11:39:37 +00:00
0fc9bc1206 Fix potential L2 forwarding crash with stale L2FIB entry (VPP-516)
On moving interface between L2 and L3 forwarding modes, adjust the
l2-output node next index for the sw_if_index of the interface so
packet output via stale MAC entries in L2 FIB will be dropped.

Change-Id: I25afd7a617edb4ae35ce296bac33e62683edad9a
Signed-off-by: John Lo <loj@cisco.com>
2016-10-27 17:29:10 +00:00
218170be70 Fix coverity issues in LISP
Change-Id: Ifef27540f02f423070e8843951be5cba0acea8cf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-10-27 13:43:09 +00:00
ad41b351bd Per-packet IPFIX record generation plugin
Change-Id: Ia790aa018e70d67ed343e3e466d1b33b22560fc0
Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-27 13:37:43 +00:00
e63947e57c features: fix crash due to missing null termination
Change-Id: I98b407f9b698307c5a0007b198a734674b33f925
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-26 23:10:59 +00:00
3977a21495 Fix description of devel package.
Change-Id: Ia289299691daa2ed47f0129d2695678e1d390ab8
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2016-10-26 20:15:03 +00:00
39162275f6 dpdk: enable building with dpdk 16.11-rc1
Works with:

http://dpdk.org/browse/dpdk/snapshot/dpdk-16.11-rc1.tar.xz

placed into dpdk/ or ~/Downloads

Change-Id: I17f6a721529dbefc796f555e2525d157b9bf8740
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-26 20:14:17 +00:00
dddcceadf1 Fix unformat-at-eof bug
Change-Id: Id9a64303b1d415b55a3bc0ea1483df6fc2eb5011
Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-26 20:12:29 +00:00
f62ae1288a refactor test framework
Change-Id: I31da3b1857b6399f9899276a2d99cdd19436296c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Matej Klotton <mklotton@cisco.com>
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-10-26 17:42:19 +02:00
f530a5526a dpdk: remove support for dpdk 16.04
This also removes old DPDK vhost-user code which doesn't help
much with DPDK 16.07 or newer.

Change-Id: Ic996df1eaccc33acd3fa6cabeaf7381a672c2a90
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-26 14:52:00 +00:00
6398397125 dpdk: remove support for dpdk 2.2
Change-Id: I2d1a7063f3776a9070e75a627beb5d0e45a67874
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-26 14:52:00 +00:00
b21b60eae5 dpdk: remove KNI support
This code is outdated and without real use case

Change-Id: I30628cc4ca293e5249aea3891173507cbfad8b61
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-26 14:52:00 +00:00
f195019a30 Use only 24 bits for vni in lisp-gpe data packets
Change-Id: I5a8ff12dfa8d4d9f24275590ff8293e7eb7ffbb6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-10-26 14:43:25 +00:00
513da53d96 python api - vla - allow the user to pass in a normal python list
Only add support for named variable-length-arrays as some api fo not
follow the expected order of length preceding the value.

Change-Id: I4c22c9b3c05f23edb3edc1cbc445be87b0a69162
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2016-10-26 13:02:41 +00:00
5d4759b0c9 dpdk: remove dpdk_pmd_constructor_init
This is not needed anymore, likely because we use --whole-archive
parameter during linking.

Change-Id: Iab0f2ec647b63c59663faceacfbc60aa4a4b84a6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-25 15:43:48 +00:00
af0c70cf76 Improve equals generation for jvpp DTOs
Variable 'other' is no longer defined in equals method
of DTOs without defined fileds.
Fixes dead local store coverity issues.

Change-Id: I69eddf2b4b3f433149ff4d49e49c46515572d61a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-10-25 15:24:06 +00:00
5b3808ed63 Improve JNI code generation (array truncation)
Fixes DEADCODE coverity issue:

size_t max_size = 0;
if (max_size != 0 && ...)

Change-Id: I0e3ea4e4ddddb476519490c6f00208379089397c
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-10-25 15:24:06 +00:00
948e00ff5e Support IETF routing Yang models (VPP-503).
Add support for special routes to send ICMP unreachable or admin prohibited.

Change-Id: Ia1ac65b0e5e925c0f9ebc7824141833b4e18f05e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-25 15:09:10 +00:00
Jan
dc5aac5c39 Update CSIT tests 161017 -> 161024
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: Icb36e5a68f6c1ef5edbc5159f2af3d255cecbdeb
Signed-off-by: Jan <jgelety@cisco.com>
2016-10-25 14:03:50 +00:00
06b14b914c Add API call of sw_interface_set_mpls_enable to vpp_api_test
Change-Id: If0e98c111b3dfa38cb2c619dde4ddb3e52ee8dfa
Signed-off-by: John Lo <loj@cisco.com>
2016-10-25 13:45:07 +00:00
749294dfeb Disable colored output for tests, when not tty
Change-Id: I73f01bd3a8e7caa00c75b845b9e61d3cb0f34877
Signed-off-by: Peter Ginchev <pginchev@cisco.com>
2016-10-25 13:34:06 +00:00
46a4d9f2e7 Add generated python bindings to .gitignore
Change-Id: I05b5955afa9fee5dd213a98126982626eae4d9ca
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-10-25 12:18:46 +02:00
d5fcc468f3 Fix LISP src/dst based policy
Change-Id: Ibcc58ad50e33cd26367fd28f60334e29f45a094c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-10-25 09:07:10 +00:00
0c38ea3e7b Fix VXLAN tunnel delete crash
Change-Id: I610648f28b7504798da9e377ea099629aa7a5150
Signed-off-by: John Lo <loj@cisco.com>
2016-10-24 12:13:27 -04:00
9c2964ce01 Fix jvpp coverity issues #2
- synchronize AbstractFutureJvppInvoker.getRequests
- handle registry & jvpp close in API usage examples

Change-Id: I918bf864b8212fde04f0d9194037f1c6a810fc3f
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-10-24 10:05:53 +00:00
e319de0b04 vppinfra: clib_memcpy optimization
This patch allows copiler to select which SIMD instructions
will be used for copying 16 and 32 byte block.

Immediate effect of this change will occur in avx2 variants of
graph node functions. So far 128 byte registers were used
even in code optimized for avx2 due to macro nature of
clib_memcpy. With this patch gcc should pick 256 byte registers
in such cases.

Change-Id: I3510ee9b3bf01f3f0a9184e1a3f8e1bd827f8eee
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-24 10:00:58 +00:00
d3b85b0157 Dual Loop Lookup and Adj-midchain
Change-Id: Id78b6dc637626c01b64bd5868d22425a30318348
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2016-10-23 13:47:31 +00:00
8cb034b397 VPP-504: Permissions Error on Centos Vagrant VPP VM
Change-Id: I5e63538e0ba2395fb13f99f0c7c2ca3123a34e59
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-22 02:45:04 +00:00
924d03a97b Fix Coverity Errors in FIB. This is mainly consolidating the vnet_link_t and fib_link_t enums into just vnet_link_t.
Change-Id: Id2147afec1a28e95fec86dfd524088cd56563f63
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-21 20:17:32 +00:00
670909eb6e Quad-loop ip4_lookup_inline, add _x4 validate buffer enqueue
Change-Id: I80a25fa90d8a65db619b8697cede2b98bed37cea
Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-21 20:16:40 +00:00
7b0196b826 Pretty-print vl_api_api_get_first_msg_id_t msgs
Change-Id: I380bef59d64c8c647a437026085dfa20b27727e1
Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-21 19:11:00 +00:00
047144853f Java api generation for ioam trace plugin
Makefile, configure, jvpp changes follow snat plugin jvpp
Fixes trace api handling for endianess

Change-Id: Id5c950ed3c85d5e0dc28ba31b580987baa1b133f
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-10-21 18:14:29 +00:00
14fbdfc800 Candidate fix for race condition in building jvpp_common and jvpp_registry
Change-Id: I244c4e02befc8c4d30915b219abe36ab03c4291d
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2016-10-21 03:35:23 +00:00
34d7791001 vppinfra: add 256-bit vector typedefs
Change-Id: Ic07c1c25f5ad99225209c73b5ff4deb9c52f3b1e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-20 10:08:03 +01:00
1a939e845e improve java build process
Change-Id: Ia4c7503ee31fca74fa45da4ff883f3b80b42e85e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-10-19 12:48:36 +00:00
1ce0879900 Fix coverity issues in jvpp (newlines + CompletableDumpFuture.ctxId)
Change-Id: I2931982ac1ae64313a6ab781212793620af24585
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-10-19 12:46:45 +00:00
1357f3b175 Deprecate MPLSoGRE tunnels (VPP-502)
Add shared memory APIs for MPLS routes and MPLS to IP prefix bindings.

Change-Id: I85b074a4dadc8249c410fdabd8ea019d20479cf8
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2016-10-18 20:44:22 +00:00
2b39a00795 DO_NOT_MERGE: Update CSIT tests 161002 -> 161017
- Update of CSIT operational branch with 16.04

Change-Id: I47346a5756e0944f29bee7760540912eb36081fa
Signed-off-by: pmikus <pmikus@cisco.com>
2016-10-18 17:01:15 +00:00
53194292b0 Fix test target build
Change-Id: Ib06b40292858f32df9c62e747808e0ef140bd9dd
Signed-off-by: Peter Ginchev <pginchev@cisco.com>
2016-10-18 14:36:19 +00:00
064f55da77 Update tx and output node runtime when recycling interface
When an interface is removed, and another one is created,
the nodes from the previous interface are reused. The current
code fails when the new interface type differs from the original.
It is necessary to update the node runtime, in particular the
node function, and the node format function.

Jira: VPP-460

Change-Id: I2fc3c609e0173a7f62597230768669039853ab03
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-10-18 14:29:15 +00:00
45c3850126 Load-balancing in IP4 dual loop typos. (VPP-501)
Change-Id: I7b70d52d11c228ec5e790632a91b042b34b38d28
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-18 14:26:27 +01:00
370dde3e7e LoadBal: Use intrinsics and use protocol number
This patch modifies the load balancer hash table such that
it uses vector operations.

It also fixes the hash computation logic such that the port
is only looked-up for TCP and UDP.
Some additional work is still needed for other types of traffic.

Change-Id: I788b4c782a9923d3792f3985f0580c0c81b3aad3
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-10-18 08:17:27 +00:00
ebb9a6a128 VPP-491: Update CLI Command documentation for "show ip fib" and "show ip6 fib".
Change-Id: I9d1d02ffbb3cdbe8c4a3f335ece40f3dcbd848a7
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-17 18:33:11 +00:00
aeb06f4bb5 Support MPLSoGRE with the new FIB 2.0
Note that the new way to provision MPLSoGRE is using the "normal"
GRE tunnel such as in the following example:
  create gre tunnel src 10.0.3.1 dst 10.0.3.3
  set in state gre0 up
  set int ip addr gre0 10.0.4.1/30
  set int mpls gre0 enable
  ip route table 4 6.0.0.0/24 via 10.0.4.2 gre0 out-label 30
  mpls local-label add 30 eos ip4-lookup-in-table 4

The previous CLIs/APIs used to configure MPLSoGRE tunnel such as
"create mpls gre tunnel...", "mpls encap|decap add label .." and
"show mpls tunnel", etc. can not be used. They will be deprecated
in a later update to the VPP code base.

Change-Id: I244916841924dc2b87d2143691cd8476716c06b1
Signed-off-by: John Lo <loj@cisco.com>
2016-10-17 14:15:37 +00:00
e11a282cc6 oam: fix compilation with gcc6
gcc6 reports:

vpp/oam/oam.c:560:531: error: self-comparison always evaluates to true
[-Werror=tautological-compare]

Change-Id: I7a086099c14c6661d0c6b4cf0370631fc06bc23d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-17 12:58:19 +00:00
e33b9e0a87 style: fix VLIB_NODE_FUNCTION_MULTIARCH indent
Change-Id: I9c23ddbbd576e8c900ba82425572ed7a3c4f56e3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-17 12:18:21 +00:00
a6b31779f5 VPP-492: Fix ability to change mac address of the interface
Fixed Coverity complaining about the clib_memcpy used in
/vnet/vnet/interface.c

Change-Id: I401f05aea1066d829abac1555021e1180b4a161e
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-10-17 12:17:39 +00:00
cfcf1e2c45 VPP-488: Fix build errors, which uncovered IPv6 load balance lookup bug.
Change-Id: Id17fcb9154c5337908f29b7ce3a282b6a4b72d64
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-15 15:30:55 +00:00
46529cda4b VPP-490: vpp crash in show ip6 neighbor
Change-Id: I003f95db85ce5085045c607f0b1daaefa792c910
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-14 10:45:49 -04:00
309fe069db VPP-489: CLI Command "test lookup" crashes with invalid fib-index.
Change-Id: If4c47b91e949483675cf569cd474b6c85fecef05
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-14 13:51:45 +00:00
b80c536e34 FIB2.0: Adjacency complete pull model (VPP-487)
Change the adjacency completion model to pull not push.

A complete adjacency has a rewirte string, an incomplete one does not. the re-write string for a peer comes either from a discovery protocol (i.e. ARP/ND) or can be directly derived from the link type (i.e. GRE tunnels). Which method it is, is interface type specific.
For each packet type sent on a link to a peer there is a corresponding adjacency. For example, if there is a peer 10.0.0.1 on Eth0 and we need to send to it IPv4 and MPLS packets, there will be two adjacencies; one for the IPv4 and one for the MPLS packets. The adjacencies are thus distinguished by the packets the carry, this is known as the adjacency's 'link-type'. It is not an L3 packet type, since the adjacency can have a link type of Ethernet (for L2 over GRE).
The discovery protocols are not aware of all the link types required - only the FIB is. the FIB will create adjacencies as and when they are required, and it is thus then desirable to 'pull' from the discovery protocol the re-write required. The alternative (that we have now) is that the discovery protocol pushes (i.e. creates) adjacencies for each link type - this creates more adjacencies than we need.
To pull, FIB now requests from the interface-type to 'complete' the adjacency. The interface can then delegate to the discovery protocol (on ethernet links) or directly build the re-write (i.e on GRE).

Change-Id: I61451789ae03f26b1012d8d6524007b769b6c6ee
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-14 13:50:39 +00:00
3ae1a91430 Add macro for sending large data structures to API clients
Change-Id: I1c4ec4dd02ce5a16e33aa0908a606496ad0d64cc
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-10-14 00:33:59 +02:00
77378332ac add xxx_or_null(...) message buffer allocation variants
Useful when attempting to serialize potentially very large data
structures and send them to API clients. NULL pointer checks are
MANDATORY when calling xxx_or_null(...) variant functions.

Change-Id: I6ae272deb7150a2c5aa82ec45a206e5bddee7a02
Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-13 17:36:12 -04:00
770930c45f feature: rename vnet_ip_feature_* to vnet_feature_*
Change-Id: Idf68266f705b0455e5ab0ac73d23c7e0f4120d5b
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-13 17:04:10 +00:00
241e52222e Add clib_mem_alloc_or_null(...)
Change-Id: I5177d6d3349384beb551b4f2f52b30b044ce335b
Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-13 10:56:20 -04:00
0683c9cc13 VPP-286: Add CLI Command documentation via doxygen comments for vnet/vnet/ip.
Change-Id: Ie1be9dc057d07c250852952ea159ed3c44c25f5f
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-13 08:29:02 -04:00
10eb1ea468 vhost-user: Add reconnect support
QEMU 2.7 introduces reconnect support. However it doesn't send
last state of last_avail_idx in the SET_VRING_BASE.

With this patch we are overriding SET_VRING_BASE with value taken
from used->idx.

It is a bit hackish as it basically overrides SET_VRING_BASE
provided value but it should work in most of the cases.
This is what author of reconnect code is also suggesting in his post:

https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg01495.html

Change-Id: I10e5f401c409d2989bf6c43eaea377800a9c76df
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-13 10:45:13 +00:00
7e46a4dc84 VPP-446: 1:1 SNAT Inside overlapping interfaces
Change-Id: Idabf89bd27ee95769da16331a6bd1439497b2765
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-10-13 09:54:52 +00:00
724b8159fe VPP-453: SNAT delete and dump addresses
Delete operation for SNAT addresses
Dump API for SNAT addresses

Change-Id: I84e888d20286ec2523fbd4ca7e68e3eef5927984
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-10-13 09:52:07 +00:00
388267a209 VPP-483: Fixed IPSec tunnel interface
Change-Id: I570f57218293a4824f83b38575eacdbe3da540d8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-10-13 08:13:58 +00:00
9876520f9b vpp_lite: add cpu pinning support (VPP-467)
Proper cpu pinning in vpp_lite platform, like in normal vpp image.
Extended “show threads” command to show propper information.
Changed handling of coreID and socketID for threads in "show threads"
CLI, pthread_getaffinity is used instead of info stored in DPDK.

Change-Id: Ic8299ec5e284472bb10a37a95fadeed57b6edae8
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-10-13 08:13:37 +00:00
1946a12a52 Fix coverity warnings, VPP-486
Change-Id: I7a14d9a28514cdb49f65fab1b120b53239fed7e3
Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-12 17:32:56 -04:00
1e66d5c54b VPP-213: vnet classifier does not work for l3 ip4 rules
The classifier was written with the assumption that next-indicies
of IP4 and IP6 IP_LOOKUP_NEXT nodes are equal. That's not true,
and this patch splits the classifier session for IP4 and IP6.

Change-Id: Id0368f17bb1d3f145b771d2dc283b56871264e99
Signed-off-by: Ole Troan <ot@cisco.com>
2016-10-12 19:49:33 +00:00
5899fdedad Coverity warnings in new FIB code (VPP-484)
Change-Id: Ie221e246dd8c6a1b3c76e7aa85924762d4397782
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-12 17:51:06 +00:00
69a9b76d64 VPP-362 Implement dumping of LISP adjacencies
Change-Id: Ieea56f3bf9e749878d9f2b35d39d9f7a9cdabde4
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-10-12 13:24:03 +00:00
75fc854da7 Rename ip_feature_init_cast(...) to vnet_feature_arc_init(...), VPP-481
Eliminate an unused parameter in vnet_feature_arc_init(...) which
eliminates a spurious relationship between feature arcs and ip.

Add doxygen tags for 2x debug CLI commands, and for
vnet_feature_arc_init(...)

Change-Id: If83589539bcbbbd4d85e84458dd7eb7eb08837a0
Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-11 17:29:29 -04:00
8e08e74ce0 VPP-474 Revert "FIX sysctl configuration directory"
This reverts commit 822af5c95d.
Reason for revert is a bug in procps upstart script.

Change-Id: Ie9e501c9b52e65d8d0f31ce6600823021e89fb6f
Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-10-11 18:36:51 +00:00
383740d102 vppinfra: use crc32q instruction instead of xxhash in bihash_8_8
xxhash calculation takes 10 clock cycles on Haswell so it makes sense
to use crc32q insutrction when available.

Change-Id: Iab5e7d9c8ec0125626bbcd067e5dc30574c8febc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-11 18:34:02 +00:00
dfa9c5bb9a Rebind kernel drivers on VPP uninstall
Change-Id: Icb0ce47134146c3a212b234f088c682982480128
Signed-off-by: Peter Ginchev <pginchev@cisco.com>
2016-10-11 19:56:16 +03:00
f588f35d66 Test: Add test case for Load Balancer plugin
This adds a basic test for the four existing encap modes
for the load balancer plugin.
- ip4 over gre4
- ip4 over gre6
- ip6 over gre4
- ip6 over gre6

Apparently, scapy does not support GRE and IPv6 combinations.
Hence, those tests do send packets through VPP, but only
ip4 over gre4 output is actually parsed and verified.

Change-Id: I7cedb0f88fd0788ee51b1428ddf9cff7c037511f
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-10-10 21:05:14 +00:00
51ffa817d9 ipfix: add l4 unformat support for mask and match (VPP-204)
Change-Id: Iff32c488af9b71acbc4e572c6741afae0a67333c
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-10-10 20:51:28 +00:00
506b24564d ipfix: add classification nodes for flow statistics (VPP-204)
In order to have meaningfull IPFIX implementation we should be able
to classify all packets flowing through vpp. But existing IPv4 and IPv6
classifier nodes are called only if destination IP address is local
to vpp. This commit adds new IPv4 and IPv6 classifier nodes that should
be used for collecting flow statistics.

Change-Id: I60e60105663ba15b5200862a23bb817047fe4d1a
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-10-10 20:51:28 +00:00
477570e587 Add signal handling
Please send SIGTERM to stop vpp_api_test, especially during
long-running operations such as a high-count asynchronous set of
ip_add_del_routes.

Otherwise, there's every chance that the data plane to vpp_api_test
message queue will fill and cause an easily-avoided deadlock.

Change-Id: I09309b445c354e1a692fed708dd5ea44d1ea9882
Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-10 20:49:29 +00:00
b21b6768ff platform: rewrote vppctl script to include history
Added more ability to search history to vppctl shell
*Up and down keys give history
*Script now written in Python 2.7.6
*Contains all original functionality
*Added Python dependency for deb/rpms

Change-Id: I5088f7b018fce92b9b5411df0bffc34709810dec
Signed-off-by: Padraig Connolly <padraig.connolly@intel.com>
2016-10-10 19:48:38 +00:00
33a7dd5ad9 FIB2.0: memory leaks during load-balance update (VPP-475)
some other fixes and enhancemets to address failures in the IPv6 Scale testing:
 - The rate at which VPP sends ARP/ND requests, 1 per-millisecond, is too high. This is reduced to 1 every 10 ms. probably still too high.
 - If an ARP/ND response is received that does not contain a change to the known MAC address, no further processing is done.
 - Added stats to get info about the async FIB walks.
 - When walking FIB entries and performing a load-balance update, it is not necessary to re-insert the LB in the forwarding table.

Change-Id: Ifd47e4bdbce94495f44aaf1b78e7d1395ed870d1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-10 18:58:22 +00:00
bfe737a1b2 Fix double free in af_packet api/cli
The api was allocating a vector for the name, passing it, then freeing
it, on create. The cli allocated, passed then forgot about it.

af_packet_create_if was storing a reference to the name, which in the
case of the api, meant it was referencing dead memory. On
af_packet_delete_if this reference was freed, so in the api case, there
was a double free.

Also, the cli for delete leaked the name.

Change-Id: I4d572bd2936eaf8ea7a0a8ff282e83ac2bf1b062
Signed-off-by: Ivan Kelly <ivan@midokura.com>
2016-10-10 16:23:31 +00:00
4c42e913c4 HONEYCOMB-228 Snat plugin jvpp support
Change-Id: I5510a0ae3ecfeb5bd41c3a73e6e05465ebd96165
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-10-10 09:56:56 +02:00
cd8e318a76 Test Infra: Add plugin support
This patch adds plugin path to vpp commandline arguments
when 'make test' is run.
Hence, test cases can test plugins.

Change-Id: Ib90efa1f62e03b45b84533c49c7a5d040aa8cddf
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-10-07 21:34:59 +00:00
3ee44040c6 unicast RPF for FIB2.0
In a heirarchical FIB performing a unicast RPF check would require the traversal of the data-plane graph to seek out all the adjacency objects and then read those to find their interface. This is not efficient. Instead, for each path-list we construct a list of unique input interfaces and link this uRPF-list against the entry in the prefix table. In the data-plane the uRPF list can be retrieved from the load-balance lookup result and the RPF check is a simple and efficient walk across the minimal interface list. The uRPF-list is maintained as the routing heirarchy changes, in a similar way to the data-plane object graph.
We also provide a knob to allow an arbitrary prefix to pass the loose check.

Change-Id: Ie7c0ae3c4483ef467cfd5b136ee0315ff98ec15b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-07 21:32:24 +00:00
4a7e58bf48 VPP-395 Add udp-punt node(s) and API
Uses existing UDP local API in order to register
requested UDP port punt to the host.

CLI: set punt udp [del] <port>
API: punt protocol <l4-protocol> [ip <ver>] [port <l4-port>] [del]
* Only UDP (l4-protocol = 17) is supported at this time

Change-Id: I9232af1c891d1ed174d77f3e0dfe60c4b9d85e40
Signed-off-by: Alex Popovsky <apopovsk@cisco.com>
2016-10-07 15:31:50 +00:00
02c826c6ab VPP-466: PG pg_create_interface API returns wrong interface index
Change-Id: Ife7b2907012a79e6893cfa7f2cf61c7a54865248
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-10-07 11:39:47 +00:00
025943b9d0 VPP-464: Fix IPSec-GRE tunnel input with FIB 2.0
Change-Id: Ic29592d39f1d672cb6e7e32b4af6123683e022a7
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-10-07 11:39:21 +00:00
f0ccbb02fd Add some useful scripts
Change-Id: Ic7ae9b43020ab4d26214bfab71b19ee259771c52
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-06 16:53:32 +02:00
3f993a6f07 Fix IP6 ND solicitation termination to allow link-local source IP
Move check for link-local source IP address for MAC/IP notification
only. Allow generation of response to IP6 ND solicitation request
if a match is found for target IP irrespective of source IP type.

Change-Id: Ib79d4b75fb4fe8aece625fd8cd26c8b9fc75ea47
Signed-off-by: John Lo <loj@cisco.com>
2016-10-06 12:08:12 +00:00
6c681c95e9 Fix sw_interface_set_unnumbered API for FIB2.0
ip[4|6]_sw_interface_enable_disable() should be called for
the unnumbered interface (and not on the interface with IP address)

Change-Id: Iffd347c539567c1302fa8136eea9c4e06b24d1bd
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2016-10-05 15:58:35 -07:00
b80f9d1b73 don't require root privileges when running the tests
Change-Id: Ib67bf1a898e3c1e4038698f1cb068ae9099d7921
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-10-05 16:43:25 +00:00
f154448baa Fix crash caused by "show trace" due to incorrect usage of IP adjacency.
Change-Id: Ice0a6939b399eed150b0c58139b79dd4bed91113
Signed-off-by: Vengada Govindan <venggovi@cisco.com>
2016-10-05 14:56:23 +00:00
4beb30c0b3 Fix LISP map-request resend deadlock
Change-Id: I2cc57079741279669241b88d0317853e1312e8c5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-10-05 14:56:04 +00:00
db64988481 VPP-339: SNAT static mapping
1:1 NAT
1:1 NAT with ports
1:1 NAT static mapping only - add "static mapping only [connection tracking]"
                              to snat startup config

Change-Id: I37cd06a9d71d1943eb6618034d7c547c4a9348c4
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-10-05 11:41:51 +00:00
b8602b595f Python API: Add support for shared memory prefix
Recheck.
This is to support multiple VPP instances on same host.

Change-Id: Ibe511b1f790fc8771900085577423f7e71dc45df
Signed-off-by: Ole Troan <ot@cisco.com>
2016-10-05 11:39:14 +00:00
d4bc9af55f Load Balancer: Use FIB 2.0
This patch fixes load balancer, which was not working
since FIB 2.0.

Two FIB DPO types are defined:
- One for IPv4 GRE
- One for IPv6 GRE

When an AS is created, the plugin automatically uses
the result from the FIB in order to transmit the packet.
Therefore, the packet does not need to visit ip-lookup twice.

The 'bypass' command was removed, as it is now done
automatically using this process.

Change-Id: Ib505ba31bfc67897eaff752821087821c360360a
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-10-05 09:33:07 +00:00
4c20e71977 dpdk: fix issue in parsing startup.conf dpdk section
Change-Id: Ibbcce6f54bc76b8922b1c649278643c6294d13f9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-05 09:29:45 +00:00
e91836368c Fix mutex/condvar sleep when adding API msgs, VPP-461
Simply put, threads cannot sleep waiting for the vlib memory api main
input queue to drain. If, say, thread i (i !=0) fills the vlib api
main input queue with rpc requests - and then blocks trying to add
another request - the game is over.

RPCs attempt a barrier synchronization, which fails with Pr = {1.0}
because thread i is in a mutex/condvar sleep.

Add a main-thread cut-through path, which directly invokes the RPC
callback function when called on the main thread.

Change-Id: Ib036f0cc43b5738455c3a111cff64a132537152e
Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-05 07:44:47 +00:00
15977efc45 Fix CLI 'set interface unnumbered' to work with FIB 2.0
Commit of the patch from Neale Ranns

Change-Id: Ia0480ef56036dd0aec990c3892a93b99eb9fb893
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2016-10-04 20:09:41 -07:00
d82799863a Minor tweaks to hqos doc
- correct formatting errors
- add to user_doc tree
- unix line endings, not windows(!)

Change-Id: I9aa5511c398fc33ecb25fb33ae64c8e666c56dd8
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-10-04 23:06:57 +00:00
2ccf768f13 Fix LISP L2 fwd entry updates
Change-Id: I554041bf47aa82dd6f6e0563c68d8bbd3b18b255
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-10-04 23:06:33 +00:00
95300d1915 VPP-355: add PBB (802.1ah) tag rewrite
- new API/CLI to define pbb tag rewrite on interface
- encapsulation/decapsulation of PBB tags
- tracing of PBB header
- PBB tag rewrite operations

Change-Id: I538b3025a8b2e41cdeed9f10fea94bbcd28b5f5f
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-10-04 17:15:16 +00:00
Jan
ac09280947 Update CSIT tests 160925 -> 161002
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I45f35e14e162bc1e8c69bd632f8813dde9f8270b
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-10-04 16:23:49 +02:00
f56b77a076 test: new test infrastructure
Change-Id: I73ca19c431743f6b39669c583d9222a6559346ef
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Signed-off-by: Stefan Kobza <skobza@cisco.com>
Signed-off-by: Matej Klotton <mklotton@cisco.com>
Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-03 19:58:19 +00:00
6c3ebcc2bf FIB Memory Usage Diagnostics
add two new CLI commands:
 show fib memory
 show dpo memory
to display the memory usage of the FIB and DPO object types respectively.

Change-Id: I759e149a0b6fbb58d59c139362221dc33531cffa
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-03 19:15:01 +00:00
5499b1968e vhost-user: avoid branching during prefetch
Change-Id: I1f4421289b2f93b64a2470559d834717ef40e181
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-03 16:58:56 +00:00
11f9205c10 vhost: predict map_guest_mem returns similar results over time
It is very likely that all packets are being stored in the same
memory area.
It is also likely that all indirect descriptors are being
allocated from the same area.

This patch takes this into account by predicting the value
returned by map_guest_mem will be the same as the previous one.
It falls back to slow mode otherwise.

Change-Id: Ic1044a172fc4abe77387ba2e19e11cd1f39ad1e3
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-10-03 16:19:46 +00:00
240977f2fb Fix string parsing in lisp map-request itr-rlocs command
Change-Id: Ie17b324492d61130690ba9d05821eaefe10072d4
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-10-03 14:20:03 +00:00
5e575b1d59 L2 over LISP and GRE (VPP-457)
Change-Id: I0d7f9c7f41a9f9e0acb0950adedb90d45df08c2a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-03 11:45:15 +00:00
553d808fc4 Remove old test files
Make space for upcoming test framework.

Change-Id: I14da6cf95c645d8ee2b71579a658dc7ef3b9f027
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-03 10:44:12 +00:00
df089a8a13 (VPP-455) arp doesn't work when ip4 classifier configured with fib 2.0
Change-Id: I046de0c00db75d25ed90e33e9910c9dd0ff95580
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-03 09:56:14 +01:00
c631f2de6d VPP-363: add ability to change mac address of the interface
Added ability to change interface address.
Added new CLI and API functions.

Change-Id: Ia336bc75ad8c5858c26f39af851485c4c6f19f58
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-09-30 19:08:24 +00:00
83486fb3ef Fix double-free crash
loop0 interfaces were transmitting the same packets multiple times,
eventually causing them to be freed multiple times

Change-Id: I32fcf5cfa10e58bb9e9bbbbc1b9312518d00ee9f
Signed-off-by: David Hotham <david.hotham@metaswitch.com>
2016-09-30 16:33:55 +01:00
f53f482f35 Remove RPM package dependency on vpp-devel
Change-Id: Ie6e1b3c8c2e0cf64f06aafe13a693686fd4b486a
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2016-09-30 13:33:31 +00:00
f3e3fd3e08 VPP-454 Fix LISP GID dictionary issue
GID dictionary IP prefix entries are rewritten with more narrow one
which is not desirable. This patch does exact matching instead of
longest prefix matching.

Change-Id: I0191e23229a69ffe86f82ea4d71e4a5534dbb5b0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-09-30 13:07:51 +00:00
f2c6ed1925 vat: add pg interfaces to sw_interface_dump (VPP-451)
Change-Id: I976a44dcfb32b1132c14363174239333315b2c6f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-30 12:09:33 +00:00
2fdaece087 VPP-450 Fix adding LISP adjacencies via CLI
Change-Id: If90c9c630629e727fffc5d450516045a04433661
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-09-30 08:42:28 +00:00
101759c0d6 VPP-120: include custom types to Python representation of vpe.api
Change-Id: Ide97a8bf55d3baf41a1e86af2c67c6b7b26b657a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-09-30 07:36:32 +02:00
e85581cd07 VPP-378: rename jvpp package to the same as groupId of deployed jars
Related changes:
- NSH: https://gerrit.fd.io/r/#/c/3181/
- Honeycomb: https://gerrit.fd.io/r/#/c/3182

Change-Id: Ifdd6b8b575916fdf99794618dbe604c2e17e8e82
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-09-29 08:54:43 +00:00
85ecc810ca DPDK HQoS: Enable Hierarchical Scheduler in VPP
This commit extends the vpp framework with new thread type "hqos-threads" that
runs the Hierarchical Quality of Service (HQoS) scheduler associted with output
interface.  HQoS Scheduler prioritize the packets from different users and
ensures sufficient bandwidth to pass the more important traffic.

At high level, HQoS scheduler is a buffer that can temporarily store a
large number of packets. In otherwords, it is a collection of large number
of queues organized into hierarchy of 5 levels; the port (i.e. the physical
interface) is at the root of the hierarchy followed by the subport (a set
of users), the pipes (individual users), the traffic classes (each with a
strict priority) and at the leaves, the queues.

In each HQoS scheduler, three operations are performed; classification
(setting HQoS port, subport, pipe, traffic class and queue within traffic
class from packet fields), enqueue (selecting HQoS queue for the packet,
and to drop the packet if the queue is full) and dequeue (schedule the
packet based on its length and available credits, and handover the scheduled
packet to the output interface).

In vpp, the number of hqos threads will be equal to cpu cores specified in
corelist-hqos-threads parameter cpu section of the vpp configuration file.
One hqos thread can run HQoS for multiple output interfaces. A particular HQoS
instance is initialised with default parameters required to configure hqos port,
subport, pipe and queues. Some of them can be re-configured in run-time
through CLI commands as well binary APIs.

Following illustrates the sample startup configuration file with 4x worker
threads feeding 2x hqos threads that handle each HQoS for 1x output interface.
For more details on HQoS configuration please refer to DPDK Programmer's Guide.

dpdk {
	socket-mem 16384,16384

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

	num-mbufs 1000000
}

cpu {
  main-core 0
  corelist-workers  1, 2, 3, 4
  corelist-hqos-threads  5, 6
}

Change-Id: I635c3395a7c4ddf0a239ef77b0b0a31a6dfc4767
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2016-09-28 16:37:28 +00:00
ac8146caf1 Fix packet trace for IP4/IP6 lookup/forwarding nodes
Change-Id: Ibf3d2e69dbac28fbef77d8ba20d7f5a60eea0198
Signed-off-by: John Lo <loj@cisco.com>
2016-09-28 16:13:24 +00:00
e162bc3884 classify: fix issue with output classify node using wrong sw_if_index
Output classify node should use sw_if_index[VLIB_TX]
Like in l2_output.c, we have to use sw_if_index[VLIB_TX]
to get the appropriate configuration.

Change-Id: I96b1a03ddf5c9e9c45fa3f5df3ea88895ed4345e
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-09-27 22:35:10 +00:00
62f88d8813 arp: handle ARP proxy after tunnelling
Only rewind the buffer back to the start of the ethernet header,
rather than all the way.  We don't want to undo earlier
decapsulation.

Change-Id: I5f4b183eb3e8df690695ce3a97e55f3b0579a266
Signed-off-by: David Hotham <david.hotham@metaswitch.com>
2016-09-27 22:28:07 +00:00
99492de719 Fix RPM packaging dependencies
Change-Id: Ife1523e11b7225ea0fd41c06c3b802bb171e91f4
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2016-09-27 22:27:49 +00:00
81ee70f93f VPP-308: Added workaround for failed vnet build. For some reason
the clock slew is greater with Vagrant 1.8.5 which causes Makefile.am to be
timestamped as newer which causes builds to fail.

Change-Id: Id0d35c41ac66a2841c5aae20dd678f4bc125e41b
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2016-09-27 20:48:26 +00:00
20f6441c63 Fix hugepage detection issue
Per-numa free hugepages number was not read correctly due
to wrong sysfs path.

Change-Id: I889111027d7f93c42e2e4673d8d4e8f75ae065b6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-27 19:39:46 +00:00
c08a1ed696 Scheduler policy & priority config, few minor fixes (VPP-425)
- scheduler-prio -> scheduler-priority
- improve formatting of "show threads" output
- add description to "startup.conf"
- bail out of priority is set without rr or fifo policy

Change-Id: Idf897f7603d989d6c2d0093eea89c5d1653eaa8c
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-09-27 19:35:24 +00:00
af405f77c7 Fix missing output in generated CLI/config
The templates were looking for the name of the CLI_COMMAND
and CONFIG_FUNCTION structures in the srong place.

Change-Id: I709d6716216173ba6a7ed41a260728238f96d2db
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-27 18:15:58 +00:00
822af5c95d FIX sysctl configuration directory
man sysctl.d:
...
Packages should install their configuration files in /usr/lib/. Files in
/etc/ are reserved for the local administrator, who may use this logic to
override the configuration files installed by vendor packages. All configuration
files are sorted by their filename in lexicographic order, regardless of which
of the directories they reside in. If multiple files specify the same option,
the entry in the file with the lexicographically latest name will take
precedence. It is recommended to prefix all filenames with a two-digit number
and a dash, to simplify the ordering of the files.

If the administrator wants to disable a configuration file supplied by
the vendor, the recommended way is to place a symlink to /dev/null in the
configuration directory in /etc/, with the same filename as the vendor
configuration file.
...

Change-Id: I24b8b7fddf64ec287282ae195e07c9592c494ebe
Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-09-27 18:15:42 +00:00
3fa0af5960 VPP-448 Fix LISP APIs using binary data
* use zero length array in LISP API to avoid confusion
* add missing LISP data structure definitions in API documentation
* fix wrong memory allocation in VAT

Change-Id: I9b5e656a071fc24cb698c164db953c09b66deeeb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-09-27 17:28:13 +00:00
719311ba82 Fix "show adj nbr" displaying IP4 address for IP6 neighbors
Change-Id: Ic453e68bbd3d5ae8d57b513da6781bb957fc84a4
Signed-off-by: John Lo <loj@cisco.com>
2016-09-27 12:05:00 -04:00
a4509cfd46 fix create sub-interface range cli
the create sub interface command was creating the interfaces with
the same outer_vlan value - causing an error

changed to use the interface id as outer_vlan in case of a range

Change-Id: I3808094d1c99a37adac61e3ece573a6687306461
Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-09-27 14:57:35 +00:00
1e7658340a VPP-425: Scheduler policy & priority configuration
Add ability to hadle scheduling policy and priority via config file.
CPU section contains new items to specify scheduling policy and
priority:

cpu {
scheduler-priority <num>
scheduler-policy [other | batch | idle | fifo | rr ]
}

Change-Id: Ie20765280e458e1d7deb4a8c66daaa69793f795e
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-09-27 09:04:22 +00:00
82bf7cddd2 Fix CLI for adding negative LISP fwd entries
Change-Id: I9ee7b6ea2def16715f717f8483c86e0157628946
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-27 08:11:39 +00:00
dca880446e LISP Source/Dest control plane support, VPP-197
Change-Id: If88e4161e0944b657e6183b7b44348f7f46ba0a8
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-09-27 08:11:19 +00:00
62a28716d8 Fix import line for setup.py
Build fails in case python-setuptools is not installed.

Change-Id: I1611f3560db82a4a48c51a9f614a813a9a540698
Signed-off-by: Peter Ginchev <pginchev@cisco.com>
2016-09-27 05:50:45 +00:00
ab3e42b08d Fix for potential use of uninitialized variables
The code allowed for the command 'set interface unnumbered'
to be processed without specifying any parameters,
thus the set logic of the command would have been using uninitialized
variables 'unnumbered_sw_if_index' and 'inherit_from_sw_if_index'.

Change-Id: I4de14fa1096527c5c48f74304db379f9953760a8
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2016-09-26 21:50:10 +00:00
Jan
271ad32d25 Update CSIT tests 160919 -> 160925
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5daf02786185159cd2a156144f247d3b45369c33
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-09-26 13:47:38 +00:00
a21cdafb88 Fix jvpp-core dependencies
Change-Id: I242d590c9d2fa733cc1411fa5d96bb3944d5b5fe
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-09-26 13:05:23 +02:00
b3bfb3efd1 Packet-generator related fib 2.0 fixes
Fix dpo0->dpo1 typo in ip4_local source RPF check.

Pass source RPF check on drop adjacencies. Add a bit of defensive driving
in ip4_icmp_error(...).

Change-Id: I0e444886953f5500766f9b9662fad79fef44a260
Signed-off-by: Dave Barach <dave@barachs.net>
2016-09-25 09:17:29 -04:00
f2e6a2d010 Rmove duplicate register of unformat_l2_input_next_node
Change-Id: I38dc7c37b0debcea9aa1a366b516e86505dd096e
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-09-23 20:35:31 +02:00
76260a61b2 Fix source RPF check in ip4_local
We need to accept src ip addresses which hit receive and clean
adjacencies.

Change-Id: I8cf07f622058203665ed09280452ed8412984bd5
Signed-off-by: Dave Barach <dave@barachs.net>
2016-09-23 12:05:35 -04:00
4448957b18 Fix eventfd leakage issue in vhost-user mode
The leakage happens on the file descriptors for kickfd and vring's callfd.
Those file descriptors should be closed when vhost-interface is disconnected.

Change-Id: I12453b0c3eac037a1dc040a001465059b8f672c2
Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-09-23 15:24:34 +00:00
57c3d66c55 Python API: Preparation for RPM/DEB packaging.
Recheck.

Repackage the Python API binding to include all
necessary modules in a single Python package.

Change-Id: I5e35141d413bfb1aad650217e1ca07d85646c349
Signed-off-by: Ole Troan <ot@cisco.com>
2016-09-23 13:18:46 +00:00
5fef9e523d VPP-424 fix lldp_main declaration
Change-Id: I1f30977f0b315fa72d73a29a8585b1711d5044d8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-09-23 07:55:02 +00:00
20e555155d Fix detection of packet output via BVI into a BD and SHG adjustment
In BVI output node, set a signature value in packet buffer field
sw_if_index[VLIB_TX] so l2-input node can reliably check that
packet came into a BD through BVI so it can set the SHG of the
packet to 0 for a unicast packet.

Change-Id: I301aa2896677e11d0c964ca476dddcb5a8804fc2
Signed-off-by: John Lo <loj@cisco.com>
2016-09-23 07:52:44 +00:00
36d2506382 Enable doc building on MacOS
Simple tweak to the Makefiles to allow "make doxygen" to work
natively on Macs - assuming the appropriate things have been
installed first, which it tests for.

Change-Id: I1a3e72759d533270a0512de38595c3bc3f71dee0
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-23 07:52:28 +00:00
b1136586a0 l2_output: fix packet drop error reporting when mapping is in progress
Change-Id: I64aa4c28e87e82a742313e9b89409c957fa62101
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-22 22:47:34 +00:00
87e40696d3 Fix lisp-cp table_id lookup for punted packets
Change-Id: Ibe6f8c6fadb2e467353bafebffde04bc6eb72af3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-22 22:42:51 +00:00
042d212cd8 VPP-189: fix coverity issue in api_format.c
Change-Id: I8cf3bb27bc699be3b8de781ea84db4c7fb3c7553
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-22 22:38:43 +00:00
3762370601 vhost-user: branchless SSE4.2 implementation of map_guest_mem()
Change-Id: I64349830c1f7534a8d090572e9473c51c0818e51
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-22 21:01:19 +00:00
c9e0843d5e VPP-426: Rename parameter in LISP remote mapping VAT command
Change-Id: Ie52243bd1654e3d0663b09bd1f21e8c15e93f07d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-09-22 20:38:53 +00:00
0dafaa78df vhost-user: remove dependency on dpdk code
Change-Id: I48908e0fa010570aefc43dd552ee81ee69fc2796
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-22 12:03:19 +00:00
90f52bf990 Refactor pre-Doxy siphon scripts; VPP-396
- Modularize the code to make the Siphon process easier to
  maintain.
- Move much of the output rendering into Jinja2 templates.
- Add syscfg siphon type for startup config documentation.
- Add sample syscfg documentation.
- Add clicfg and syscfg preamble docs, adapted from their wiki pages.
- Fix sorting of CLI items across multiple directories.

Change-Id: Ib8288fe005adfea68ceed75a38ff8eba25d3cc79
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-21 15:42:25 -04:00
ce64b8e5b2 vpp python api - fix vla pack generation
This fixes commit 1732fc1ab8.

Change-Id: I3d9f1384c20d2ca22eaf2aae553455789b934b6e
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2016-09-21 18:36:28 +00:00
0bfe5d8c79 A Protocol Independent Hierarchical FIB (VPP-352)
Main Enhancements:
 - Protocol Independent FIB API
 - Hierarchical FIB entries. Dynamic recursive route resolution.
 - Extranet Support.
 - Integration of IP and MPLS forwarding.
 - Separation of FIB and Adjacency databases.
 - Data-Plane Object forwarding model.

Change-Id: I52dc815c0d0aa8b493e3cf6b978568f3cc82296c
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-09-21 17:37:39 +00:00
60537f3d83 Move doxytags file to html output directory
So that downstream projects can make use of the generated
Doxygen tags file, move it into the html directory that is
transferred to Nexus.

Change-Id: I04dc4777c9ea62f429f783f66ef4e2ecb2923131
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-21 16:27:23 +00:00
fe9473f3b5 VPP-414: Fixed IPSec transport mode in esp_encrypt.c
Change-Id: I27accb0c87d6bf2fbbe90d8d1bc074697299e639
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-09-21 15:12:38 +00:00
f304552665 Copy the 16.09 release notes to master
- Copy the 16.09 release notes to master
- Add some notes for 16.06 (from the press release)
- Add some structure around notes for each release
- Add skeleton for next release

Change-Id: Id5a5d8bf02fce1bbaed303e6c6e4f8908c7e7d75
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-21 09:35:01 -04:00
b58598b731 dpdk: fix wrong tx ring size calculations
At many places code was using constant ring size od 4096
which was defined in macro DPDK_TX_RING_SIZE.

As we support differnet ring size and default value s now
1024, we need to remove DPDK_TX_RING_SIZE and use
value stored in device structure.

For that reason dpdk_device_t.nb_tx_desc is moved to
first cacheline.

Change-Id: I2c2ac11f0f5e8ae779d34f9a9104eaf2921ec34c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-21 07:54:59 +00:00
a7cc4479db dpdk: move number of sub-interfaces to 2nd cacheline, introduce flag
This saves 2 bytes from the 1st cacheline.

Change-Id: I691a3a0ee07ec2db4ae85b96b451ef53ad8c9458
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-20 22:26:14 +00:00
5643170220 dpdk: use flags for identifying interface types
This will allow us to handle some more complex situations
like in case when hqos needs to be enabled only for some PMDs.

Change-Id: I5421a8d4cf29b8394b9e956cc4e39737dd07dbbb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-20 22:22:40 +00:00
b94bdad5c0 Use SSE instructions for matching tagged frames by ethertype
This change improves performance in l2 scenarios for about 1-2%.

Change-Id: Ie35ed8ad70a3b95dd78c0d158c485a10dabaf0eb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-20 17:37:02 +00:00
48a9a54e7c VPP-419 add thread-safety to LLDP feature
Change-Id: I3b1153a64674c2caef71c968739ecca6512e9929
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-09-20 17:30:01 +00:00
f298ecfe1d fd closed twice
fd close()ed after call to unix_file_del of same fd

Change-Id: Ia8bf77b72b6cea7c70e004199ce11a33b6260720
Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-09-20 17:29:19 +00:00
d334a6b458 Added volatile to local variables needed by setjmp
Function vlib_main uses nonlocal control transfer (setjmp, longjmp),
local variables might be mapped to cpu registers which might be
different when longjmp'ing back to it. Added volatile to keep those
variables on the stack. to fix vpp crash when exiting via SIGTERM.

Change-Id: I03e836966c68a966a84d635bc1f7b3a3c252f3ea
Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-09-20 16:24:53 +00:00
2d085d9c61 VPP-282: Document changes for vnet/vnet/ethernet
Change-Id: Ie75f43516fdd76ba3720f65f38d66f14749e3e2d
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-09-20 14:42:58 +00:00
f07fb71b62 VPP-189: fix coverity issue in api_format.c
Change-Id: Ib16fd69abe93c1afb2ee1d38144763f57888585c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-09-20 14:34:20 +00:00
560e809b44 VPP-348 Return empty DumpReply instead of null
Change-Id: If44f8d37649e5a9d5033ec2c0ab7452397e22691
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-09-20 13:20:37 +00:00
a53b0e2909 VPP-413 DTOs generated by JVpp improvements:
- hashCode & equals
- toString

Change-Id: I5f8bc8868c216862a307dcc8f6b423f0ce29e7b5
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-09-20 13:20:37 +00:00
e83b7d5d01 vhost-user: announce VIRTIO_F_VERSION_1
On some setups with QEMU 2.7.0 and xenial guests following
error message is reported in guest dmesg:

[    0.895944] virtio_net virtio3: virtio: device uses modern interface
but does not have VIRTIO_F_VERSION_1

Change-Id: I5a0b3beffe75c9b0344d377098d94923b2ad7ae9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-20 12:13:14 +00:00
Jan
3bb0c50462 Update CSIT tests 160912 -> 160919
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: Ibcc937f68311a9809cc31965633f2d21f111e2c7
Signed-off-by: Jan <jgelety@cisco.com>
2016-09-20 10:53:55 +00:00
5ccbaa97a8 Add structure to some of the documentation; VPP-223
Moves the random .md files, when rendered by Doxygen,
into a config examples tree. We may later flesh this
out into a more complete user documentation section.

Change-Id: If423b82f1047f1c84f90876a786313054b5f7c77
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-20 10:53:04 +00:00
a8cd30937e Add support for transparent ethernet bridging to GRE
Change-Id: Iaa3cefe223eb48b128893029a17e092b72a5157c
Signed-off-by: David Hotham <david.hotham@metaswitch.com>
2016-09-19 19:01:59 +00:00
16b7aaafac Cloned buffer refcount was set to 0
The cloned buffer returned by rte_mempool_get_bulk had a refcount set to 0. This triggered an assert in drop-punt node.

Change-Id: I77f53abd72dcdbf5dd512a05e13fe6d3fd569843
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-09-19 11:55:02 +00:00
c5d9cdab8e VPP-306: Document changes for vnet/vnet/vxlan
Change-Id: I1ec4a80ee431758998716014e3fb6f80a5b9c168
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-09-15 13:03:44 +00:00
5164086d85 VPP-407 fix coverity warning
Change-Id: Ic3e5df2d272c2b31fbe875e1c09db0edac4813b8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-09-14 18:14:56 +00:00
acfb47d6c1 VPP-408: fix coverity warning in run_ping_ip46_address()
CID 147141: Security best practices violations (DC.WEAK_CRYPTO)
/vnet/vnet/ip/ping.c: 496 in run_ping_ip46_address()
490 ping_main_t *pm = &ping_main;
491 uword curr_proc = vlib_current_process (vm);
492 u32 n_replies = 0;
493 u32 n_requests = 0;
494 ping_run_t *pr = 0;
495 u32 ping_run_index = 0;
CID 147141: Security best practices violations (DC.WEAK_CRYPTO)
"rand" should not be used for security related applications, as linear congruential algorithms are too easy to break.
496 u16 icmp_id = rand ();
497 while (hash_get (pm->ping_run_by_icmp_id, icmp_id))
498 { 499 vlib_cli_output (vm, "ICMP ID collision at %d, incrementing", icmp_id); 500 icmp_id++; 501 }

Change-Id: I822350c03afce0b2dd35f37e27f55df82ca3443f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-09-14 15:51:16 +00:00
400c1cfc7a Add vlan-strip-offload help into startup.conf
Change-Id: Icb240ce9c62e9a2e2ff18107729cffb8e4884a0c
Signed-off-by: Alex Popovsky <apopovsk@cisco.com>
2016-09-14 13:37:23 +00:00
698b952c31 VPP-404: IKEv2 profile auth rsa-sig cert-file fixed
Change-Id: Iaeca4a86eb96096d6840d38c16d60641e9179662
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-09-13 23:15:56 -07:00
dd9310389d l2_output: reset bit after mapping is created
Change-Id: I894d71b397e7451d4e596b10258933287b7e965f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-13 20:29:16 +00:00
de4582b4c2 VPP-344 Add LLDP feature
Change-Id: Iac96773e7f9028c0f09c3388893e69f67177439d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-09-13 16:05:04 +00:00
7e68220de8 Implement IPv6/IPv4 ping.
Change-Id: Id53797c795c17fbacce3659c945f5126dc9dee86
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-09-13 12:56:00 +00:00
6144802627 Add some help into startup.conf
Change-Id: I84e9d7c3ccd32814c3eebf1cef0a4887c75812a8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-13 11:37:55 +00:00
ff0bf136c0 VPP-292 Document vnet/vnet/lisp-gpe
Change-Id: I5b282964330f4c14f7991453ee02c455a8d367ea
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-13 11:15:49 +00:00
c5bb0d6667 VPP-376: Refactor LISP dump API + VAT
- refactor VAT so it won't cache data
- remove unused filter flag from locator dump API call
- json structure changed for locator and EID table dump calls
- remote mapping VAT cli now accepts string for negative mapping action

Change-Id: I776fb50659aaa7e98ad93715d282a83f78287344
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-09-13 07:26:17 +00:00
22aa3e970d VPP-288: Documentation changes via doxygen for vnet/vnet/l2.
Change-Id: I55b552fd054610c993d14078ce048c8c4b676104
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-09-13 02:06:48 +00:00
1732fc1ab8 Python API: Re-adding rudimentary variable length array pack support.
Fixed bug in message-id mapping with non-consequtive APIs.

Change-Id: Icd6073e4655f7ce5432816861ae58915e5b336af
Signed-off-by: Ole Troan <ot@cisco.com>
2016-09-13 01:38:14 +00:00
01e3caa095 Use the correct thread stack alignment constraint, VPP-401
Change-Id: Ia7837dfaa9ed200145aeea19177fe549ab4bd087
Signed-off-by: Dave Barach <dave@barachs.net>
2016-09-13 01:35:46 +00:00
Jan
4802501f4d Update CSIT tests 160904 -> 160912
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I7a8024378dee33c89b58835af1b7de020fac3e5e
Signed-off-by: Jan <jgelety@cisco.com>
2016-09-13 01:33:17 +00:00
f5a1436dc9 Provide vpp-plugins rpm packaging
Change-Id: Ifbd99818ead5f38c5f8ad3ecdb36b24a9fa59798
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-09-12 20:40:37 +00:00
96eefd4874 MAP: Doxyfying CLI macros - VPP-165
Change-Id: Iee203bf24e8c68e1367d12f297bf31019cc44c5c
Signed-off-by: Ole Troan <ot@cisco.com>
2016-09-12 12:20:13 +00:00
553f6bd853 af_packet: allocate per-worker list of free buffers
Change-Id: I7850f04787fa7ce10c0ae8adefa166c91420f02d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-12 09:45:51 +00:00
019481ba1d DPDK virtio patch: Enable indirect descriptor features
http://dpdk.org/dev/patchwork/patch/15610/

This change only includes patch for DPDK 16.07 as
DPDK 16.04 doesn't seem to compile for me.

Change-Id: I18d84456ef6a15aa308d5e14673a24cb4a7b6909
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-09-12 09:37:30 +00:00
2cee01d1f7 VPP-392 properly pass flags from vnet_hw_interface_set_flags_helper to
vnet_main->hw_interface_link_up_down_functions

Change-Id: I7aacaebade695e8fec8306426f693f287b605ed8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-09-12 07:57:54 +00:00
6ef7bb993e Move CLI examples from wiki to code - VPP-165
Change-Id: I50ad0d79a6ffaf0a51848abf2c5ed57e83c8640f
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-09-11 13:49:24 +00:00
df65ea8e20 VPP-367: Peg vpp and vpp-plugins to depend on specific versions
vpp now depends on the version of vpp-lib it was built with
vpp-plugins now depends on the version of vpp it was built with

Change-Id: Idf706f94d3a35bdf51930badf61cac288855873d
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-09-10 23:18:06 +00:00
3542514038 Check for zero-sized Graphvix config file on Ubuntu; VPP-396
- The previous change only accounted for a missing Graphviz config
  file; apparently it can be zero-sized too.

Change-Id: Ic6957d10cdc7cb7b9da72d2b2a0f8913100870c5
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-09 20:16:04 -04:00
c87fa6dede On Ubuntu check for graphviz system config
- Sometimes it seems Ubuntu doesn't always set up the Graphviz
  handler config. If it's missing, generate it.

Change-Id: I2c1e566817de8415f8b360c6f967cd76307a2a52
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-09 17:51:42 -04:00
24648ad088 Fix bugs in IPFIX code discovered by coverity
Change-Id: Ibe6ccb99c3c29c14efb34191f209a2f6a14293f7
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-09-07 00:06:01 -07:00
7a35ee91a4 Fix Coverity issue in trace_util.c (REVERSE_INULL), thanks to Damjan for highlighting this.
Change-Id: I22b1dc800624042e043e7632179f6281a6ccaafc
Signed-off-by: Vengada Govindan <venggovi@cisco.com>
2016-09-07 22:19:36 -07:00
3b480933c8 VPP-346 Improve Doxygen include path mechanism
- If present, include the directories where API header files
  are generated into.
- Improve extraction of include paths from CPP
- Generalize the file/directory exclusion

This reduces some of the "warning" chatter from Doxygen.

Change-Id: I7ac02bff1639fe63f11263176020b0f040255017
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-07 21:20:43 +00:00
fb28e9a80c VPP-388 Improve IP header lookup in ipsec_output
Change-Id: I5df0067c9ce56d7a15a991b82d4761924d91758b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-07 19:35:47 +00:00
bf1fa7fa39 Fix MTU size for the bonded interface
Configure the MTU/L3 packet size of the bonded interface
as the lowest value of the slave intefaces

Change-Id: I34fb4c2156e8ad3d9bf45efe332405d53f72867c
Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-09-07 19:34:56 +00:00
f5a0e73e53 VPP-390: include *.so symlinks in vpp-lib
Currently, vpp-lib rpm includes symlinks for

*.so.0 -> *.so.0.0.0

but not

*.so -> *.so.0.0.0

This causes linker issues in cases where vpp-lib and vpp-devel rpms
are installed and sources are built that rely on libraries in vpp-lib.

Example:

libtool: link: gcc -shared -fPIC -DPIC jvpp/.libs/libjvpp_nsh_la-jvpp_nsh.o -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra -lpthread -lm -lrt -ljvpp_common -L/usr/lib64 -O2 -Wl,-soname -Wl,libjvpp_nsh.so.0 -o .libs/libjvpp_nsh.so.0.0.0
/usr/bin/ld: cannot find -lvlibmemoryclient
/usr/bin/ld: cannot find -lvlibapi
/usr/bin/ld: cannot find -lsvm
/usr/bin/ld: cannot find -lvppinfra
collect2: error: ld returned 1 exit status

Change-Id: Ic8eebc696f973ea348be0b43e7cfb289efbe44fe
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-09-07 18:42:03 +00:00
8fce3e3c51 VPP-382: Add ipsec tunnel interface to sw_interface_dump
Change-Id: I9e49c9b6deedb750269da04e3332a3b0742d382c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-09-07 17:21:01 +00:00
5539a077ef VPP-387: Fixed ipsec-input trace
Change-Id: I0a687c5d5f745a6c82a58c8e20b987180704a685
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-09-07 17:20:07 +00:00
ba1d046414 Vhost-User: Implement Indirect Descriptors
One of the main issue with virtio is the small queue size.
VPP can quickly fill the queue before Linux could empty it,
resulting in packet losses.
Virtio indirect descriptors double the number of packet
which may fit in the virtio queue (From 128 to 256 with standard qemu
which hardcodes queue size to 256).

Linux will not use such descriptors if the virtio MRG feature is
enabled. You may add mrg_rxbuff=off option to qemu commandline
when starting the VM such as to disable this feature. This way,
Linux will use indirect buffers to receive packets.

But it seems that Linux never uses indirect buffers to send packets.

This patch also includes some optimization modifications.

Change-Id: I26940d41ce6b7e3a08d5516018a8c46c5316ce1c
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-09-07 17:19:11 +00:00
2470485158 checkstyle: improve speed by checking only recently changed files
This change makes checkstyle much faster by checking only recently
changed files. It only checks files changed in last commit and files
which are localy modified. Old behavior is preserved by specifying
argument "--full" when invoking script.

In addition "make checkstyle" and "make "fixstyle" actions are added
to the top-level Makefile.

Change-Id: I7d86225bd282f32ee508e7f52692a3778ac8dcda
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-07 15:50:36 +02:00
ffa652afd8 VPP-204 Rework and finish IPFIX implementation
Rework flow report registration system - add streams
Add support for IPv6 and src and dst ports for TCP and UDP protocols
Implement binary API for IPFIX classifier module

Change-Id: Id05cc0127a7b95ceaeebf9c79a32c6936449bd63
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-09-07 07:35:50 +00:00
d4798a394a Avoid use of node index 0 by registering null-node
In some cases it is convenient to use 0 as an invalid node index
so here we make sure that index 0 is not used.

Change-Id: I5af6bef6769d56086ceb343423185f22843732bd
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-07 00:49:29 +00:00
5d447a9f64 Add support for input nodes in interrupt mode on the worker threads
Change-Id: Ice2e0e60c801bd6fb67f3a544e95e9ffaa22ca16
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-06 23:15:25 +00:00
d4024f5862 VPP-346 More VPP doc fixes
- Fix issue in Doxy dependency check when nothing needs to be installed.
  'set -e' and plain '[]' logic don't mix well.
- Fix Makefile snafu when building Doxy output for a single file.
- Include only one of vnet/vnet/buffer.c/dpdk_buffer.c in docs depending on
  DPDKness. This could do with some improvement in future, eg to properly
  align the pre-doxy steps with what Doxy does.
- Fix rendering of 'inline' tag in Doxygen by having it interpret
  always_inline as "inline static".
- Bunch of duplicate CLI command structure names that confused docs and may
  one day have caused debugging issues.
- Several other Doxygen syntax issues fixed, like documenting non-existant
  parameters (usually just the wrong parameter name, typos, etc)

Change-Id: Ia8cca545e5de9f8750602bffa3c4548acc8971aa
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-06 20:35:28 +00:00
7394b5b06b Add packet/byte count output tx stats to tunap interface
Change-Id: I167c49d2a64e7a36a176d57054ecd99b398a9cca
Signed-off-by: John Lo <loj@cisco.com>
2016-09-06 20:08:36 +00:00
07d2f84907 Move iOAM Trace as a plugin
Change-Id: I78322e91485e5429871bd356f668b8ed90f4265a
Signed-off-by: Vengada Govindan <venggovi@cisco.com>
2016-09-06 18:53:51 +00:00
5a1c11b53f VPP-386 Fix map-server output in lisp-cp-lookup trace
Change-Id: I67dd7896932b8ea96062b9ff074959c172b51ba4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-06 18:49:35 +00:00
ce98275ac3 VPP-381 Add LISP interfaces to sw_interface_dump
Change-Id: I62b65472e77a33b1fc94f7c4975b5e9cbf358f41
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-06 18:47:44 +00:00
73c0110502 IPsec speculative enqueue in exception path, fixes VPP-384
Enqueue buffers into next frame before validating them.

Change-Id: I466518bc6f304678136a2c3d37f136ce878eef05
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-09-06 18:45:51 +00:00
df9d3bc3c4 VPP-385: Fix ARP for indirect adjacencies
Change-Id: I48cffb8acbd9e6655d7ec661ee8f7e0689b12a2d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-06 18:10:34 +00:00
Jan
0c6a6750da Update CSIT tests 160821 -> 160904
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5159d0a320305fd3a8ca927fa742ddd4df87b271
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-09-05 11:32:30 +02:00
e016b5e3fb VPP-358: Add IPv6 ND Event Notification and Termination
Additional fix to vpp_api_test to show which kind of arp/ip6-nd
event is received, whether it is address resolution or mac/ip binding.

Change-Id: Ic65b895cd1bfbe2f34d1b68891a1a580852fbcdb
Signed-off-by: John Lo <loj@cisco.com>
2016-09-03 20:35:10 +00:00
c27213a30f Add in-message cli_request/cli_reply API
This new CLI API is meant to replace the
cli_request/cli_reply that uses shared memory.

PS: checkstyle -- *hate*

Change-Id: I6318f8f6b9be2c2398b49dac9e2193c1998ea724
Signed-off-by: Ole Troan <ot@cisco.com>
2016-09-02 12:36:48 +00:00
52901246e0 Fix for invalid check of SPARSE_VEC_INVALID_INDEX
When looking up a UDP port / GRE protocol in the sparse vectors
next_by_dst_port / next_by_protocol a data from the vector was
tested for SPARSE_VEC_INVALID_INDEX instead of sparse index itself.

This doesn’t matter for most cases since V[0] = 0 is true for all
sparse vectors. This however could cause an issue when a valid
sparse entry e.g. V[1234] = 0, with data (0) mistakenly passing
the test for SPARSE_VEC_INVALID_INDEX, while the index itself (1234)
is a valid index.

Change-Id: I04818cc43efeae047a4dae79078157d48b8c359c
Signed-off-by: Alex Popovsky <apopovsk@cisco.com>
2016-09-02 10:46:15 +00:00
ee4743adf5 VPP-221 Improve doxygen dependency check
Only try to install packages if they're not installed.
Saves a trip through sudo which is useful when you have a
non-privileged account generating the docs.

Change-Id: I3709aceb15516a45ea2f9510d91c6d2e42c8c349
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-02 05:33:01 +00:00
406ab9d365 VPP-374: getting jvppgen.py into rpm vpp-devel package
Change-Id: Ia2643f33170da92fde0f8228c8d8393f23e98d11
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-09-02 05:04:51 +00:00
87a0d77c62 Clean-up unused context arrays in UDP and GRE nodes
Removed unused sparse_index_by_next_index vector in local context
of UDP and GRE nodes. Most probably copy paste leftovers from PPP
implementation where it is realy used

Change-Id: I97e81035e2fd451c6f5a7bc31df96db9e6d2cebf
Signed-off-by: Alex Popovsky <apopovsk@cisco.com>
2016-09-02 03:50:00 +00:00
3ba4d36d92 VPP-373: stop building from /vpp mount
Change-Id: I7f8fe8fa6c24b4229b0cb45e6c83e7cb2828e2da
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-09-02 02:05:57 +00:00
16bcf7d8dc VPP-346 A swathe of doc fixes
Fixes various Doxygen warnings and other structural defects.

Note: This does not attempt to improve the content of the
documentation; only to improve the syntax and structure of it
and in some cases the consistency.

Change-Id: Ib1915f33edbdbc4558c85565de80dce323193906
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-01 14:31:46 -04:00
f074eef040 VPP-341: iOAM plugin documentation
Change-Id: I0042ce8b8a70bb709765037c3636be667ad88aa2
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-09-01 07:29:19 +01:00
5c377a1b7f Fix for vl_client_get_first_plugin_msg_id:266: plugin 'export_eb694f98' not registered
Change-Id: Iad6d8513e55a5f4609c7edb5505067d1136e84ea
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-09-01 01:53:58 +00:00
b84a3e56e1 VPP-369 Add an L2 output classification feature
Change-Id: If03162d328c1ea179249e734537ebb01bade3331
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-31 21:53:01 +00:00
1edfba9a63 VPP-358: Add IPv6 ND Event Notification and Termination
Add IPv6 equivalent of IPv4 ARP event notification which covers address
resolution for L3 and MAC/IP binding in L2 BD and ARP termination in BD.
For IPv6, ICMP6 neighbor solicitation and advertisement packets are
utilized instead of ARP request and response packets for IPv4.

Change-Id: I0088fa173e4480de297c8053ea2fcd0821322815
Signed-off-by: John Lo <loj@cisco.com>
2016-08-31 21:05:06 +00:00
7214cf11e9 VPP-303 - Documentation changes for vnet/vnet/sr
Change-Id: If8b76959d7c29c216bf03609483a2c9e1d034f46
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-31 17:12:52 +00:00
16649375fe VPP-210: Add "sh api status"
Change-Id: I164761bc2b242b6be527d057108dd09b99653ff5
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-08-31 17:11:56 +00:00
e0d802bc53 VPP-221 Loosen Doxygen CLI command struct parser
Make the struct parser slighty slightly more accomodating of
whitespace in places it has no business being.

Also add missing OS_ID thing to Doxygen makefile.

Change-Id: Id3d198fd926f7a6c2ed40bc2d08907aad5d5ac33
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-08-31 10:07:45 -04:00
5cdaf63582 VPP-189 Tweak hash_foreach_pair to avoid static warning
Coverity doesn't like when an incrementing pointer is taken from
the address of a singleton; it cries that this is a potential
buffer overrun.

Since the cases of this in hash_foreach_pair are based on items
from a simple union used just to have different types point to
the same location it's a simple matter of using the pointer to
that location directly. Since we then aren't using the members
of the union, we can change that to an opaque pointer (void *).

This accounts for >60 issues in Coverity.

Whilst here, convert some useful existing comments into a docblock.

Change-Id: I114183ab7d7948d4a6a703451417f79fa37634eb
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-08-31 12:57:33 +00:00
54ccf2261c VPP-221 CLI auto-documentation infrastructure
As a step before Doxygen, extract CLI-related struct initializers
from the code and parse that into a summary of the CLI commands
available with the provided help text, such as it is. At the moment
this only renders this into an indexed Markdown file that Doxygen
then picks up but later we can use this information to enrich the
existing VLIB_CLI_COMMAND macro documentor as well as provide
runtime documentation to VPP that is stored on disk outside the
binary image.

Additionally support a comment block immediately prior to
VLIB_CLI_COMMAND CLI command definitions in the form /*? ... ?*/
that can be used to include long-form documentation without having
it compiled into VPP.

Examples of documenting CLI commands can be found in
vlib/vlib/unix/cli.c which, whilst not perfect, should provide a
starting point. Screen captures of sample output can be seen at
https://chrisy.flirble.org/vpp/doxy-cli-example.png and
https://chrisy.flirble.org/vpp/doxy-cli-index.png .

Next, shift the Doxygen root makefile targets to their own Makefile.
The primary reason for this is that the siphon targets do dependency
tracking which means it needs to generate those dependencies whenever
make is run; that is pointless if we're not going to generate any
documentation. This includes the package dependencies since they since
they sometimes unnecessarily interfere with the code build in some cases
at the moment; later we will look to building a Python venv to host the
Python modules we use.

One final remark: In future we may consider deprecating .long_help
in the VLIB_CLI_COMMAND structure entirely but add perhaps .usage_help.
.short_help would be reserved for a summary of the command function
and .usage_help provide the syntax of that command. These changes would
provide great semantic value to the automaticly generated CLI
documentation. I could also see having .long_help replaced by a
mechanism that reads it from disk at runtime with a rudimentary
Markdown/Doxygen filter so that we can use the same text that is used in
the published documentation.

Change-Id: I80d6fe349b47dce649fa77d21ffec0ddb45c7bbf
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-08-31 12:56:56 +00:00
d85590a004 VPP-240: delete subinterface
Added new CLI and API command to delete subinterface.

Change-Id: Ia92a8facc6ad84634bdec430093e6add02ee674e
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-08-31 10:02:15 +00:00
f53db2a6c2 Fix for vppctl to suppress "load_one_plugin:63: Loaded plugin:" msgs
Change-Id: I06fcb024036b48a6401d2865a2181b122cb32108
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-08-30 18:09:24 -07:00
5a4e2dde94 VPP-365: Fix sending of bd_index in lisp_eid_table_add_del_map
Change-Id: I1f8fd65fa33b0bc7ee07aa0eeb5f794a7ede9537
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-30 19:28:37 +00:00
459f4d61a8 VPP-364 Add vpp-api/python/build to gitignore
Change-Id: I16a594ad75c085b8d0b74cf2f472f88a655253c0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-30 13:41:13 +00:00
cb9f3d7120 VPP-361: Memory leak on delete of VXLAN over IPv6 tunnel
The key for VXLAN over IPv6 tunnel is allocated on create and should
be freed on delete.

Change-Id: I11bdd9465030fed57cc4bbd28dbccdf952633b34
Signed-off-by: John Lo <loj@cisco.com>
2016-08-30 10:52:34 +00:00
c00617b13c VPP-353: Fully support LISP negative mappings in API
Change-Id: I71943fb4ae2a2f71bcf1ad73512812edf96c06da
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-30 10:30:59 +00:00
ed47b4cd4e VPP-360 Allow L2 classify to use dynamic graph arcs
Simple change so we can program L2 classifier per-session next-indices
and per-table miss-next-indices using dynamically-created graph arcs.

Change-Id: I9d4a3c82b83e94557075d56a6842d7075ed58905
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-29 16:32:00 -04:00
d575e69177 VPP-310 Mapping algorithm compute wrong ea-bits
Mapping of IPv4 prefixes ended up writing past IPv6 prefix + EA bits
length.
(Added some unit testing code).

Change-Id: I59893b44eea5cebf00a23afc405832741f84cf4f
Signed-off-by: Ole Troan <ot@cisco.com>
2016-08-29 11:57:31 +00:00
d46cca1743 VPP-307: Documentation for vnet/vnet/vxlan-gpe
Change-Id: Iaab6f4b63ed0d986be1ac0636c692b46098ad54d
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-29 11:53:04 +00:00
35f9daa267 VPP-357 Fix vni for LISP fwd entry removals
Change-Id: I5d20c1939f7a5a142bf696b34143f7ebca6afbcb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-26 16:20:50 +02:00
e3552c45f3 VPP-356: Fix wrong byte order in LISP API
Change-Id: Ib2284025b8394a87f1d5765713adb7070b450cba
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-26 12:40:16 +00:00
07203afe6f VPP-305: Documentation for vnet/vnet/unix
Change-Id: I3f1a225033ecebe0cedfc3466b552176461b76ab
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-26 12:39:03 +00:00
c068179a6c VPP-329: Add L2 support to lisp_eid_table_map_dump
Change-Id: Idfb115cd1f95394f4a4a569dc34c0488a1d58558
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-26 11:19:00 +00:00
cc6ca8832c VPP-271: Coding style cleanup vnet/vnet/snap
Change-Id: I810082b5a4072b11ffd0bcc2917347562deb253a
Signed-off-by: Calvin Ference <cference@inocybe.ca>
2016-08-25 21:00:38 +00:00
c7493e16f5 Save rewrite length for post-rewrite rewind action
Change-Id: I5dd52714f8422c15bf78da19bcb63246f9d0103d
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-25 17:50:57 +00:00
4fe2291bbd Fix vxlan-gpe next protocol value
vxlan4_gpe_rewrite and vxlan6_gpe_rewrite used the fixed value
VXLAN_GPE_PROTOCOL_IP4 for next protocol regardless of vxlan-gpe
port next protocol, this commit fixed it and used the value from
vxlan-gpe port.

Change-Id: I22ba25fbde1c0630960cbcfd196e14231fbf1af3
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
2016-08-25 13:06:26 +00:00
1557dfe844 Adding python-dev dependency to main Makefile.
Change-Id: I9968015acfc2cc63f97dee25538a9b3e61fac5b6
Signed-off-by: Ole Troan <ot@cisco.com>
2016-08-25 13:01:22 +00:00
07e7eab371 VPP-228 VPP-326: MAP: Adding additional API/CLI input parameter checks.
Added checks for EA bits length + PSID length > 64.
Removed incorrect check in VAT that required all arguments as mandatory.

Change-Id: I33a138612d199d7c5ce59abe1a7d7ecede3522bc
Signed-off-by: Ole Troan <ot@cisco.com>
2016-08-25 12:58:57 +00:00
50a4e14294 VPP-328: Add dump call for listing LISP VNIs
Change-Id: I45c054ad638a0e918dddefa4468ff65452949970
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-25 12:49:37 +00:00
082b39dc67 Fix ip6-rewrite drops when no feature is configured
In ip6_rewrite_inline(), only in dual loop next0 and next1 are set to IP6_REWRITE_NEXT_DROP and never updated unless there is an o/p feature configured on it. So any packets processed under dual loop are dropped.
Single loop works fine as next0 is updated correctly.
Fix is to update next node from adjacency under dual packet loop processing.

Change-Id: I902fcc84ed307464d92499f9d37137af660b592c
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
2016-08-25 12:26:19 +00:00
8d281b36e5 Fix issues with vhost-user when dpdk vhost-user is disabled, fixes VPP-347, VPP-349
Change-Id: I774bab98e43d55678a67a7708ca50edbbd4cbb06
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-25 07:41:08 +00:00
dc731bd4b1 VPP-345: pull in upstream checksum patch for ICMP packets
http://www.dpdk.org/dev/patchwork/patch/15216/

Change-Id: I91b67f3e5c0abff52626e504e2707814ae0c3ed0
Signed-off-by: Sean Chandler <seandchandler@gmail.com>
2016-08-25 00:30:37 +00:00
5f9dcff39d VPP Python language binding - plugin support
- Moved Python generator tool to tools directory
- Added build-vpp-api Makefile target
- Generator now only creates a Python representation of the .api
  the rest of the framework is in the vpp_papi script
- Each plugin has its own namespace.
- Plugin Python files are installed in vpp_papi_plugins for easy
  use inside the build tree.

Change-Id: I272c83bb7e5d5e416bdbd8a790a3cc35c5a04e38
Signed-off-by: Ole Troan <ot@cisco.com>
2016-08-25 00:29:40 +00:00
151fb72563 VPP-262: Coding standards cleanup vnet/vnet/llc
Change-Id: I15d71ecf9e8ed37a52cbbd45cdc0fc4ee87c0e5f
Signed-off-by: Calvin Ference <cference@inocybe.ca>
2016-08-25 00:26:38 +00:00
6d5bfb69f1 VPP-346 Document the ip feature registration scheme
Change-Id: I81a9e963bdeb437ca228f11aaedca8d122be7471
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-24 21:07:52 +00:00
d847d1c682 VPP-340: MAP-T wrong destination address
The bug was in VAT MAP code parsing a 32 bit integer into a 8 bit
type.  Perhaps we should try to build some defences in
unformat_chech_input() to avoid these errors.

Rebuild.

Change-Id: Iae4959f7e04d889da2e9650a4201c4db15d74201
Signed-off-by: Ole Troan <ot@cisco.com>
2016-08-24 16:48:11 +02:00
251aec436b VPP-321: Fix param order of unformat_lisp_eid_api
Change-Id: Ib00ca0f0dab4784a3fb34ffd91c18a3940e9a5d5
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-24 12:08:53 +00:00
3a83460868 VPP-323: Add LISP locator set index to reply API message
Change-Id: Id798f63f4cf1a8aa7a75931bc23d3c7f5d738938
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-23 13:23:13 +00:00
b1b1a14977 Fix PCI vendor_id/device_id detection for SR-IOV devices
Change-Id: I06ae392c7c8c3b4be7fd46560add442f42927c22
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-23 12:46:21 +00:00
3cd9e730f9 VPP-342: Don't allow remote mapping to overwrite local or static mapping
Change-Id: I9888d7c087da538b81a6a1967edbdf1103cc095a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-23 12:14:52 +02:00
b28e498a49 dpdk: Remove obsolete VMXNET3 driver start/stop workaround
Change-Id: I4f46f2965891b0bd0d69a2c426068b0fb1ba881e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-23 00:18:49 +00:00
71e97c631a VPP-267: Style cleanup for vnet/vnet/pg
Change-Id: I6c8bf1dfee7db4b658c2afa4888bcd52b03808fd
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-08-22 21:03:43 +00:00
aba0fe494d VPP-270: Code style cleanup for vnet/vnet/ppp
Change-Id: I637f1860fedb208d7242dc2798b3d55abac891a3
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-08-22 21:02:20 +00:00
a91cbe6982 Raw export of IP6 packet with iOAM metadata
- is enabled on iOAM pop nodes with "set ioam export ipfix collector"
- ioam_export_node Hooks into vlib graph b/n ip6-hop-by-hop node and ip6-pop-hop-by-hop node
- A buffer per worker thread is created for collecting packet data to be exported
- ioam_export_node exports first 3 cachelines by collecting it in a MTU sized frame, slaps on ipfix header for export
- ioam_export_thread process node - checks for unsent record buffers for longer than 20 seconds and exports it
- Added dual loop and prefetch in add, hop-by-hop and pop functions

To be done:
- IPfix template
- Multi collector distribution of ipfix packets
- Port to be configurable

Change-Id: I959b4253036551382562bdaf10a83fd6f2f1c88b
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-08-22 17:19:04 +00:00
Jan
aa88697b71 Update CSIT tests 160815 -> 160821
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I4791551fa0b161ac0347d992bcda4bc1fb8c74d2
Signed-off-by: Jan <jgelety@cisco.com>
2016-08-22 10:38:35 +02:00
5331c72daa VPP-337 Add per interface IN filtering
- ip post-rewrite feature subgraph arc support

Change-Id: Ia4b07197463021ade916326231af246e2559a290
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-19 18:42:04 +00:00
5e15c91b6c vhost-user: unmap previously configured memory if necessary
If there's any memory-mapped region configued previously,
it should be unmapped before setting up a new vhost memory table.
Otherwise, huge page leakage will happen.

Change-Id: I375f603ea303919f1502df44a26a7384ab2ea00e
Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-08-19 13:57:10 +00:00
82a7af95e7 tuntap_rx modification to handle jumbo packets ( > 2K bytes)
Change-Id: Iebe30b87457741ac268b24c96fa7ea8ad1e101a6
Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-08-18 10:38:30 -07:00
a8f7b750bb Bump of JVPP version for new MASTER.
Change-Id: If03efcea871641e33fa079d3c1c308dc8e23cdcc
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-17 17:43:39 -07:00
694265d4f1 VPP-202: L2-GRE over IPSec
GRE encapsulate layer 2 traffic and IPSec encrypt what is encapsulated by GRE.
The whole point of L2-GRE over IPSec is to tunnel layer 2 over GRE and IPSec by
bridging the physical interface with IPSec-GRE tunnel interface.

Change-Id: Ia4cf9ed407bf663770e0d8905c0ad44ce73bd23b
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-08-17 23:21:46 +00:00
0c25d1f2a8 VPP-336: Fix build order for jvpp_{core,registry}.la dependency on jvpp_common.la
Change-Id: I886d087532d20bf7e6555da44e4e75ee0ca38268
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-08-17 20:50:18 +00:00
00a9dcad03 Coding standards cleanup in vnet/vnet/devices, fixes VPP-248
Change-Id: I35cf89bf1aa54b76294876e9feb0ed0ccc316975
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-17 18:28:43 +00:00
5a5f5aac91 VPP-205: documentation update
Change-Id: I98e5bdbd0472c2973885defe2712b53d9da8a536
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-08-17 15:20:20 +02:00
220beac031 VPP-261 Coding standards cleanup - vnet/vnet/lisp-gpe
Change-Id: I1bc2098e79ce753f3d72f05f2fcac9ab00d0d052
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-17 12:52:19 +00:00
a2157cfa07 VPP-260 Coding standards cleanup - vnet/vnet/lisp-cp
Change-Id: I29b84c44c12ab746e9e61c30efa0ac3418d1a09a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-17 10:55:43 +00:00
3f54b18e05 Fix coverity issues in IPSec code, fixes VPP-189
Change-Id: I4e43606884ebad9a84abda779b82417192727ef3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-17 08:21:42 +00:00
607de1a063 Coding standards cleanup - remove trailing whitespace, fixes VPP-332
Change-Id: I649a17f8fa47599faf438b2e596f53761790d10c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-17 00:52:57 +00:00
256656735c Coding standards cleanup in vnet/vnet/devices/dpdk, partially fixes VPP-248
Change-Id: Ie3ee4ccc126c5db9020779cbd06b0d1da99c8411
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-16 22:56:03 +00:00
66ea26b1bc VPP-205: jvpp plugin support.
Splits jvpp into two jars
jvpp-registry.jar - base jvpp functionality
jvpp-core.jar - Java wrapper for vpe.api

Plugins can be generated the same way jvpp-core.jar is.
Example (nsh):
https://gerrit.fd.io/r/#/c/2118/

Change-Id: I2254f90b2c3e423563bb91bf70877979f1e90a7d
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-08-16 21:26:19 +00:00
f4691cd7be VPP-330 Track pending map-requests with a fifo
Change-Id: Icc64abb91047f756c955c880f6f85b26faef666a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-16 19:01:41 +00:00
adeb749d13 Create python package for jvpp generation.
Change-Id: I2254f90b2c3e423563bb91bf70877979f1e86a6b
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-08-16 17:55:55 +00:00
ee275a7333 VPP-258: Style change for l2tp
Change-Id: Ib456558974820d8d45114b2bbad014a3a3aa2d21
Signed-off-by: Calvin <calvin.ference@gmail.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-16 09:43:28 -04:00
b022cd1ed7 Fix coverity issues in DPDK code, fixes VPP-189
Change-Id: Ie2ebb29451200158504bda8c616d57821edbd749
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-16 13:00:16 +00:00
a290d7c4f5 Fix coverity issues in vhost-user code, fixes VPP-189
Change-Id: Ief95aac5d4451f411dbed8050528708c0b1b7732
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-16 12:37:24 +02:00
e70dcc8676 VPP251 - Code style vnet/vnet/ethernet
Change-Id: I3e51ca70a8e1ac7f6584bc5b0271ee4daacc1084
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-15 20:23:10 -07:00
81b52c5506 VPP-266: style change for vnet/vnet/osi
Change-Id: I6004a96f9f791fb9fbc961440c9988f7a3ca7db0
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-08-15 22:07:48 +00:00
8d98684a60 Vhost-User: Fix calculate memory region size
The memory region size calculation is wrong. For example, a region
with size of 1G (hugepage size is also 1G), and offset is zero, use
the previous way to calculate, the ultimate size to mmap and munmap
is 2G, which could lead to segment fault when munmap is executed.

This patch refers the way in DPDK to calculate the region size.

Change-Id: I6f35cde15e2402be0025c556c192b87a46bbf978
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
2016-08-15 21:52:12 +00:00
Jan
161b2c6a83 Update CSIT tests 160807 -> 160815
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: Ia9cb275d9471f3c25a02f943d0ace65aec425f8d
Signed-off-by: Jan <jgelety@cisco.com>
2016-08-15 20:57:31 +00:00
97d8dc2317 VPP-257 Coding standards cleanup for vnet/vnet/l2
Change-Id: Iba5f33675bb2eb806e9becdc42b11da5d3932d55
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-15 15:31:27 -04:00
a5abdeb296 VPP-198: LISP map-resolver failover algorithm
Change-Id: Iadd49e58a359a2e58610bd1793818ec8a25d51f1
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-15 17:04:52 +00:00
c379999665 VPP-327 Coding standards cleanup for vppinfra
Fix additional a few additional deviations reported elsewhere by
checkstyle

Change-Id: I026a8ae1c5b1856bbe3c4a555e1b690e7501b045
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-15 11:12:40 -04:00
b3d93dacfd VPP-236 Support 64-bit vector lengths, shared memory segments >4 GB
Change-Id: I02aee33e96e7ae32094b9f82f6a667d30bb52f59
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-15 13:57:25 +00:00
c53191deb3 VPP-189 Fix another batch of coverity warnings
Change-Id: I1d56bc9377db161ae9226e2b2da7c1916c8d1c3b
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-15 08:43:57 -04:00
be053b87cf VPP-237: Checkstyle script to check for new checkstyle breakage
indent is... cantankerous

It sometimes happens that if you run

indent A

resulting in A'

and then

indent A'

you get back A.  Since the check here is premised on being able
to run indent and not see any changed... we have to run it twice
to be sure.

Change-Id: I5b73e02f5996d8a01ec2e46741affbc6d62da6c9
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-08-12 13:56:29 -07:00
853e720fdd VPP-237: indent fixes in prep for checkstyle
Ran indent *twice*

Change-Id: If9c18b81983bb859cc8dc3b415c67cbf318fc618
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-08-12 12:07:54 -07:00
c1be59d3eb VPP-237: Bracket VL_API_PACKED(...) macros, which indent mangles
Change-Id: I208be749350ddb093ecfae149d420f580846c52a
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-08-12 18:22:47 +00:00
75f6904e25 Bracket CLIB_PACKED(...) macros, which indent mangles
Change-Id: I39722d7b778e6e0dc5a2d12d005c102845159116
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-12 16:02:31 +00:00
042ffb4f81 VPP-189 fix more coverity warnings
Change-Id: If464a5f06ab15eead9eaf12e89792d3761796956
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-12 09:27:05 -04:00
6353920e0c VPP-223 Add doxygen tags to counter.h
Change-Id: Ifddf37db04b2ecfa7b470cd52e8eaa2211823f3d
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-12 09:38:04 +00:00
9876d48c2d VPP-321: Fix filtering in LISP EID dump call
Change-Id: Ide5d461cf324c0d9010f20732748d9c71cf6f02e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-12 10:24:39 +02:00
3f0cb9efad VPP: NXP dpaa2 platform porting to dpdk-16.07
This patch will temporary add the "dpaa2" driver support in VPP in-built DPDK v16.07

Change-Id: Ieb7005c73bdb72e5eac88e17c21474479ad087f0
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-08-12 07:48:38 +00:00
58a90a4b16 Coverty error: Incorrect expression (PW.ASSIGN_WHERE_COMPARE_MEANT)
While the code is correct (assignment was intended) I have rewritten
it for readability.

Change-Id: I5f6fd7d7377c3904e74de4edfd478322a75af612
Signed-off-by: Ole Troan <ot@cisco.com>
2016-08-11 19:41:39 +00:00
da76de2304 VPP-319: Fix handling of ERANGE from getgrnam_r
Change-Id: I1c5b3ed678622a0352fb881f2236a514743f3c50
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-08-11 19:40:35 +00:00
2bc547cc17 Don't re-add *INDENT-OFF* ... *INDENT-ON* tags
Change-Id: Ifd2249c0152805e7b23c4629acce31634dca6f04
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-11 16:44:48 +00:00
6304884468 VPP-130: LoadBal: Add lookup bypass and fix adjacency format function
Change-Id: Ib83c6ba04c41dbb80603c6a08c324d71eb44a102
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-08-11 16:04:05 +01:00
5bcb3391f9 Custom adjacency formatting fix (Revived)
Looks like something strange is going on with indentation.

Change-Id: I8e734a2119a4a744d7ce76ce83ecc7b237828d3b
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-08-11 14:55:35 +00:00
041eacc816 VPP-130: MagLev-like Load Balancer
This plugin provides load balancing for VPP in a way that is largely inspired
from Google's MagLev: http://research.google.com/pubs/pub44824.html

More info in the README.md

Change-Id: I1223f495d5c2d5200808a398504119f2830337e9
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-08-11 14:05:40 +00:00
3590ac5881 VPP-196 LISP L2/L3 tunnel multihoming
Change-Id: If96d9ff23a7aacdb684494f854d4029f55837065
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-11 14:04:11 +00:00
77ae107ad6 VPP-321: Fix wrong checking of LISP mapping local flag
Change-Id: Ia1d5a53742a5ebe34566de0a68c2d0a81e002ffa
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-11 14:43:19 +02:00
e262ff10d4 Rename DPDK-16.07 patch file from 0007... to 0008... to avoid conflict
There are now two 0007... patch files. So renaming one to 0008...

Change-Id: I82ab883db3436b1fce6b169065b257df052fe63c
Signed-off-by: John Lo <loj@cisco.com>
2016-08-11 07:30:06 +00:00
2ab470a77f VPP-223 Document vlib cooperative multi-tasking threads
Change-Id: I283963b004ed6d91133e7e36811f75834280bbe7
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-11 00:34:30 +00:00
dd522cbaf4 VPP-189 Fix coverity warnings
Change-Id: Iea6d338e60a95f7f30c10c2e751d4827e816f700
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-10 16:56:32 -04:00
839fe3e6d6 VPP-189 Fix coverity warnings
in api_format.c.

Change-Id: Iedc510fe962b6e8fb8614be4038e695b13e12ef9
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-10 11:36:07 -04:00
c8af24fa99 VPP-315: Fix "show vxlan-gpe" issue
Change-Id: If721d3b701a7182e595ece1294c2767981d29d3e
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-08-10 13:44:50 +00:00
f43f6df44f VPP-313: Wrong API dump message in vxlan_add_del_tunnel
Fix API custom-dump format of ip4/ip6 addresses in the message.

Change-Id: I822e036691846ce6a437834df933c44098944c1f
Signed-off-by: John Lo <loj@cisco.com>
2016-08-10 13:43:03 +00:00
2bd44b7cdd DPDK: Fix a crash in igb_uio driver when the device is removed.
This crash happens because the device still has MSI configured,
the fix is to free the IRQ. Adding pending further investigation.

Change-Id: Ifcd3404fcc25fe27dcccc67d0dcf9d8f0ec18582
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
2016-08-10 12:51:18 +00:00
348c3b70a4 Temporarily disable unthrottled log message from DPDK 16.07
Patch to prevent the unthrottled message from spilling to syslog and
fill up disk space.

Change-Id: I239ca27a7568182217a675692e0be966fc3486f5
Signed-off-by: John Lo <loj@cisco.com>
2016-08-10 11:24:25 +00:00
13e3d45097 VPP-314: Vxlan wrong name of decap node
Fix VXLAN decap node counter update using the correct node index.

Change-Id: Iebfd2bfd97747bc6d0758f4c5829e23ef9899d74
Signed-off-by: John Lo <loj@cisco.com>
2016-08-09 19:20:51 -04:00
Ray
3a9b5d97ca dpdk: allow applications to override rte delay
Some applications may wish to define their own implentation of
usec delay other than the existing blocking one. The default
behavior remains unchanged.

Change-Id: I6cb626e7a5d9d985928aa266e522a849d264a2b2
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
2016-08-09 21:56:52 +00:00
861bd216eb VPP-245 Coding standards cleanup for vnet/vnet/cdp
Change-Id: I5253c52eace4b635f7791aa019ab01ec55d7fb4d
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-09 21:19:28 +00:00
d5d5ffa427 Revert "Custom adjacency formatting fix"
This reverts commit ffc7ecace8.

Change-Id: I32784a3e7ddf57abb9d70aa1e06884f028d78397
Signed-off-by: Keith Burns <alagalah@gmail.com>
2016-08-09 19:01:52 +00:00
ffc7ecace8 Custom adjacency formatting fix
Looks like something strange is going on with indentation.

Change-Id: I1522caffa3a8a5e3aa00e1169b7469facc505a8d
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-08-09 18:33:39 +00:00
166a9d4c21 VPP-256 - Coding style cleanup vnet/vnet/ipsec
Change-Id: Ie9e05e2c74e7843a937870e2c64db0499f03a6a4
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-09 13:58:49 +00:00
e2c987e21f VPP-235: fixed vat help message for sw_interface_set_l2_bridge
Change-Id: Ie2a771abbd579c4ffd9679c157dcf435d91ebf7b
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-08-09 13:06:38 +00:00
819ec6faf9 Rename flow_report_sample.c/.h files
Change-Id: I1f82e74977de8879dec9859275afc791f0a55606
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-08-09 13:04:02 +00:00
cc9658c8b3 VPP-189 - Coverity OVERRUN error in port-range
Change-Id: Ib9f43dffa9d04478d92063b71dd7bef4ac6969f1
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-09 13:02:46 +00:00
Ray
54360750d3 DPDK: adding patch to init ptype in vmxnet3, e1000 and virtio PMDs
Ensure the packet_type is reset before the buffer is used.
This can cause packets to be mishandled in systems with more than one type of driver in use.

Change-Id: I14ef9bd6be834d66d19bae36122b648450a9f7e6
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-08-09 13:01:38 +00:00
01d86c7f6f VPP-189 Fix Coverity warnings
Remove a bunch of historical SMP code that we're not using; clean up
coverity warnings as a side-effect.

Change-Id: Ic80d2f87c7fd4e654078cac23ad5ec287a1d7ffe
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-09 00:44:03 +00:00
3cff0e7076 VPP-239 Tag packets that hit LISP negative adjacencies
Change-Id: I88eaf23791d0a148513cc32262cd79a7f4e25d1f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-08 19:57:19 +00:00
7fbfad3ee3 VPP-189 Fix new Coverity warnings
Change-Id: I2a580320118d9ab638d9ac0986544ebad8d50e67
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-08 19:06:19 +00:00
6f6f34f620 VPP-189 Clean up more coverity warnings
Change-Id: If66713d79c545c762c385faf08cc809347741152
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-08 13:09:15 -04:00
06e3d07576 VPP-263 - Coding standards cleanup - vnet/vnet/map
Change-Id: I401124320a21e30b5cdf3684d36890e51a2fcb6c
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-08 15:32:42 +00:00
ba868bb789 VPP-311 Coding standards cleanup for vnet/vnet/*.[ch]
Change-Id: I08ed983f594072bc8c72202e77205a7789eea599
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-08 15:25:14 +00:00
Jan
da62e1a1d8 Update CSIT tests 160731 -> 160807
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: If21641bfa958f06a61e5b3534ed1fe809de4eca3
Signed-off-by: Jan <jgelety@cisco.com>
2016-08-08 14:34:00 +00:00
Ray
a581f20e5a DPDK: adding patch to revert ptype change to ixgbe vpmd
Commit d9a2009a81089093645fea2e04b51dd37edf3e6f on DPDK.org, reverted the ptype functionality
from the ixgbe vPMD. Reverting this change pending a deeper analysis.

Change-Id: I2515f3d700b2a4922495ba9e63f202d679543d01
Signed-off-by: Ray <ray.kinsella@intel.com>
2016-08-08 12:03:43 +00:00
5f3ca64a62 VPP-243 - Coding style changes - updated emacs LISP styleify
Change-Id: I46ae6badcccd14c0e34f1a19187749980baba3ac
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-07 16:13:27 +00:00
ff07b87773 VPP-303 vnet/vnet/sr docs
Change-Id: I66eff733dff5e7eb2fa429dcdbb2b6b82423d25c
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-07 15:00:49 +00:00
06c5ffd625 VPP-244 - Coding style cleanup vnet/vnet/sr
Change-Id: Ibbbaeacf9816ee0e7847cd53b45f9db48bddc85b
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-07 14:34:31 +00:00
d1408c8683 VPP-241: Add custom dump functions for LISP
Change-Id: I4ad86190b8f23a992a00f536492ba4f8caefeb43
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-07 10:48:51 +02:00
f8a554f724 Add DPDK definition to DOXYGEN
Change-Id: I04e8663b49b5f706940b7aada0a7c2cae913a82b
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-06 14:36:10 -07:00
f2421e19fc VPP-242: Fix wrong checking of LISP Proxy-ITR mode
Change-Id: I89c9e52ecf0d053a278a78e57c9e589798b4cb7f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-06 11:34:49 +02:00
a8d77eda73 VPP-237 Coding standards cleanup
Change-Id: I239143f920285050ad85244ece6893236195534f
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-05 18:10:06 -04:00
310f7fe7a6 VPP-223 Document vppinfra/bitmap.h
Change-Id: I259a5b716bd8a7abdb0e6bf778432f034338ffdc
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-05 14:36:41 -04:00
f9c231ec12 vpp-189 Clean up more coverity warnings
Time to make the donuts

Change-Id: I528937800f7daefce19723dda0216e58d857942c
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-05 10:10:38 -04:00
56faee8372 VPP-189 Clean up more coverity warnings
Change-Id: I1b971ab326dc334a4743fd7d4184cef106b0523d
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-05 13:21:59 +00:00
91c7d387fb VPP-197: LISP Source/Dest control plane support
Change-Id: I0db53af96b925ec0d975dd77f471804b61351aec
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-04 22:04:29 +00:00
114e8a91a0 Update coding style for hash_foreach_mem
Change-Id: I2f336331463cedb2703150b003761e5c6e4431e8
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-04 17:06:01 +00:00
72d7223163 VPP-237 vpp-api-test coding style cleanup
Change-Id: I50a5412463e9346149a7504344a68c8b5762dc97
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-04 10:15:21 -04:00
c08f5a7aef ENIC driver patch for PKT_RX_VLAN_PKT packet flag backward compatibility
The PKT_RX_VLAN_PKT flag will be totally obsolete by 16.11. We still need
this ENIC driver patch for 16.07.

Change-Id: I287035525d2d1b5313e88e9e74b6310536de2c32
Signed-off-by: John Lo <loj@cisco.com>
2016-08-04 12:13:05 +00:00
bb5c22f1b6 LISP multihoming API changes and cleanup
Change-Id: I106352a6da0fad2b91dc8593f8d6d664af3113a8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-04 11:58:07 +00:00
f3f2541690 VPP-166 Documentation changes for ip4_forward.c
Change-Id: Ia9f80bea9ca8a94430ed37ececbe4434f9f5ad48
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-03 23:29:34 +00:00
9d3a879d9d VPP-226 - adding UDP TCP to port-range
Change-Id: I5f4261279dcdbb03e182b18d05602407c0e55f89
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-03 22:02:27 +00:00
79b5f638e5 VPP-166 Documentation changes for ip4.h/lookup.h
Change-Id: Ia9f18b0eeba3a7cee35e66dbd15d3efb567acfc6
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-03 20:39:40 +00:00
3389bbcad0 VPP-180 Clean up multi-socket / multi-chunk mempool discovery
Change the default DPDK version to 16.07, and rename the indicated
patch directory. Use the native vhost-user driver.

Change-Id: Ie3d17e90e363ce86f0233b58c152de683b5d9456
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-03 15:18:37 +00:00
429e795197 LISP API/VAT cleanup
- cleaned up some of the LISP APIs
- added support for mac in dp APIs

Change-Id: I11d419a30d73ddbf6554768d6dc2a09cc5a6e072
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-03 11:48:32 +00:00
8a1531dfb7 VPP-233: disallow array[0] in reply messages
- updates jvpp generator to raise exception
  if array[0] is present in reply/detail/counter message

- fixes vpe.api reply/detail/counter messages
  that use incorrect variable array syntax.

Additional info:

Variable arrays in reply/detail/counter messages needs to have
lenght defined in other variable within the message.
The other variable can have any name, so it is impossible to
generate Java/Python code handling.

New syntax introduced by
https://gerrit.fd.io/r/#/c/1617/
fixes the problem:

u32 some_var;
XX array[some_var];

Change-Id: I0af50f1ef1d94d95b56d9326d4e944e72b4edcdd
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-08-03 11:42:34 +02:00
5ca5dc8651 API support for src/dst based routing policy in LISP
Change-Id: I0ae90f884378acabeda310a6431c89f3ec195d0e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-02 19:48:09 +02:00
8e5458caea VPP-229: fix NPE in JNI array handling
Change-Id: Ieb5182a7a3612e09bd2b28eb6a4abbdb4d29d34b
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-08-02 14:27:33 +00:00
7b75d211ae Fix for broken vagrant installs when using Vagrant 1.8.5.
I upgraded Fedora23 which installed kernel 4.6.4 which in turn required
VirtualBox 5.1.2 which in turn required Vagrant 1.8.5.

Workaround for a change in Vagrant 1.8.5 that breaks Centos. The
newer version of Vagrant doesn't chmod the ssh directory before trying to copy
new public key during installs. This will be fixed upstream in Vagrant 1.8.6.
Bug doesn't affect Ubuntu because it uses a different umask whereas Centos uses
0002.

Change-Id: I8108d4cc208fc47fa69f8a5cf27b2bba7e34293e
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2016-08-02 14:20:21 +00:00
734d291c2e VPP: Fixed dpdk-16.07 BAD checksum error
- Updated tarball name and checksum value

Change-Id: If06581285e506859bd1edb516b690e963c7de5d0
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-08-02 11:35:48 +05:30
6f9bca2194 VPP-226 IPv4 src-address + port range checker
Change-Id: Ia251e9d7d53e894a5666109f69e9626d27ea74cb
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-01 18:16:24 -07:00
f7643fd9e1 Fix new LISP Coverity warnings
Change-Id: I60ef5218110e596f77d11e3949284a7a7af7dedb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-01 17:21:17 +00:00
Jan
cb34a1fb3b Update CSIT test 160727 -> 160731
- update of CSIT operational branch to be user for VPP-patch test

Change-Id: I4c5200fbf0fcdc2f8fef2913a9b9a5981a6ecec1
Signed-off-by: Jan <jgelety@cisco.com>
2016-08-01 17:41:41 +02:00
b6737a10ac Jvpp: add handling for mising unsigned array types
Change-Id: I239082622ceabdd1d0a7b6b6489a2789096a01fc
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-08-01 07:41:16 +02:00
1a1adc7121 Initial L2 LISP support
This introduces support for layer 2 overlays with LISP. Similarly to L3,
all tenant packets to be encapsulated are captured by an interface, but
the mapping (layer binding) instead of being between an L3 VRF and a
LISP VNI, it is between and an L2 bridge domain and a VNI. At a high
level, this results in two important properties:
1) the source and destinations of all packets flooded in the
   bridge-domain are mapped via the LISP control plane and the replies are
   converted into data-plane tunnels tracked via a LISP specific
   source/dest L2 FIB
2) All packets reaching the interface and matching a source/dest L2 LISP
   FIB entry are L3 (IP4/6) encapsulated.

This is solely a unicast feature, therefore at this time ARPs are not
handled in any special way.

Change-Id: I0b7badcd7c6d5166db07d4acd2cc4ae7fba3e18e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-31 15:52:42 +02:00
d038dbf4aa Addition of u16[] to JVPP generator
Change-Id: I8d746cfae4d64ae200ff0053de23b80ee951c290
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-07-30 11:43:14 -07:00
a4525d5d8f VPP-189: Fix another batch of coverity warnings
Change-Id: I2b13894cca950ddb6732714f3acc180443552b5f
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-30 11:01:37 -04:00
8719fc4968 Remove per-worker destination frame queue
This frame queue is not part of the dpdk code anymore,
so it can be removed. It will save some space in the
1st cacelineof dpdk device data struct.

Change-Id: If839861961548750601400a511a609be7ae84b30
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-30 13:09:58 +00:00
819e0f4845 enic: fix bug introduced with scatter rx
Author: Nelson Escobar <neescoba@cisco.com>
    Date:   Mon Jun 13 17:24:41 2016 -0700

    We did not properly set the rq pointers we pass up to dpdk when
    rx scatter was introduced.  This resulted in segfaults whenever
    more than one rq was being used.

Change-Id: I77a9793ea9035baa1ada77d3af7bc83baf58d097
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-07-29 14:35:33 -07:00
ae2d252039 LISP - fix bug in ip_prefix_normalize_ip6
- fix bug
- refactoring code

Change-Id: I2c330f3fbdead567b65c889cfffc2562d99b61db
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-07-29 16:07:05 +02:00
c11ce3ee25 plugins/vcgn-plugin: Fix vpp hang with pthread spinlock
Currently, pthread spinlock is initialized in macro ASSERT, thus
the spinlock only will be initialized when CLIB_ASSERT_ENABLE is true.
But CLIB_ASSERT_ENABLE depends on CLIB_DEBUG been set.

Mostly, CLIB_DEBUG is zero, so spinlock will never been initialized,
which will lead vpp hang when try to hold the lock.

This patch fix this issue.

Change-Id: If01982b5df849834ccbc705f8e9291f2b6c32d0a
Signed-off-by: Michael Qiu <qiudayu@chinac.com>
2016-07-29 13:01:38 +00:00
2828efcfb9 plugin/vcgn:Remove local defined ip4_interface_first_address
Function ip4_interface_first_address has been defined in
vnet/ip/ip4.h, and result an compile issue.

  CC       vcgn/cnat_ipv4_icmp_error_outside_input.lo
  CC       vcgn/cnat_logging.lo
vcgn/cnat_logging.c:361:1: error: conflicting types for 'ip4_interface_first_address'
 ip4_interface_first_address (ip4_main_t * im, u32 sw_if_index)
 ^
In file included from /usr/include/vnet/ip/ip.h:57:0,
                 from vcgn/cnat_logging.c:24:
/usr/include/vnet/ip/ip4.h:390:1: note: previous declaration of 'ip4_interface_first_address' was here
 ip4_interface_first_address (ip4_main_t * im, u32 sw_if_index,
 ^
make: *** [vcgn/cnat_logging.lo] Error 1

Change-Id: I1165c9bb778263c195ed34ab438dcb27dfd207bc
Signed-off-by: Michael Qiu <qiudayu@chinac.com>
2016-07-29 13:01:37 +00:00
a2f27af214 VPP-142 Follow up fix for shared_count of indirect adjacencies
Clean up dead code path added in previous attempt.

Change-Id: Ib95b07bfd7699496f6808da97200993e2104d796
Signed-off-by: John Lo <loj@cisco.com>
2016-07-29 00:25:55 +00:00
16ad6ae79f VPP-189 More coverity bug fixes
Change-Id: I6e9290b26b1e74fc5652b689c8d5cc2972ac11d5
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-28 18:41:31 -04:00
dd3a57f36e VPP-223 Bounded-index extensible hash documentation
Change-Id: If162252062014dbd8ef44f7f10649d54d9a288b0
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-28 13:02:37 -04:00
4c3f39353d Add IP adjacency registration function
Given that it is possible and easy to add dynamic
IP adjacencies, it might be helpful to have an explicit
call to do so.
This way, additional information such as how to display
the adjacency can be provided at the same time.

Change-Id: I5c735ae45ed763560352f637e3462f2931dc97d9
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-07-28 12:19:21 +00:00
6cc6f9175c Edit eid table dump
- change output from eid table
- add eid filter:
	all - dump all eid
	local - dump local eid
	remote - dump remote eid

Change-Id: Ifaaad8abf44cf70c4c22d05252e501456f1f1083
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-07-28 11:55:27 +00:00
438109d576 LISP - Bug fix, can`t remove static remote mapping
Fix bug, can`t remove static remote mapping,
small update in LISP remote mapping API.

Change-Id: Ide32485a1a0d2cf08829d544500fa2755214b8cc
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-07-28 10:52:34 +00:00
d983118bf6 Edit Lisp locator_set API
Change the output format of lisp locator_set API.
Create new API for lisp locator.
Change lisp_enable_disable_status_dump -> show_lisp_status, not use dump
function.

Change-Id: Ie2024cbf5e55b22ba077266220bf8584d5cac07a
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-07-28 10:40:56 +00:00
5b43fd45b3 VPE_API small fix for LISP locator_set
- add documentation
- use new feature in vpe_api

Change-Id: I2708383aa886494d948feea1869c3fabae94c7bf
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-07-28 10:03:20 +00:00
829c51a2f5 Update CSIT test 160710 -> 160727
Change-Id: Ia6e4e951a409a3b8caef16bb62d9969ae030b667
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-07-28 09:28:32 +02:00
dd9f133176 VPP-210: Clearer error codes in vlib-api for API trace save
Change-Id: Ic02eaaaa8cf7a0f1c75eca8e3b87956d5e9045e7
Signed-off-by: root <calvin.ference@gmail.com>
2016-07-27 22:12:23 +00:00
b2a6e25067 VPP-189 coverity warning cleanups
Change-Id: Ia4fbf4352119504e022b89d10d44a5259d94f316
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-27 11:15:44 -04:00
5afccb2578 Vhost-User: Fix bind sockaddr length
The sockaddr length argument provided to bind was wrong.
This patch also adds an error message in the CLI when the
vhost-user add function fails.

Change-Id: Ib4466accffe49c8c3f4951ebf3a83a24529f6a5b
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-07-27 13:37:03 +00:00
a8691754d2 VAT add_locator_set api support multiple locators
Change-Id: I22df3d4407bd7fdd953783f00605380a2d6fb46e
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-07-27 13:23:24 +00:00
683d3ee1b1 VPP-214: IPSec cli/api vector ck and ik initialization
Change-Id: I34e19d1feb350c47987b9764b642ef9baa000581
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-07-26 23:54:07 -07:00
8e5b041f2b VPP-223 General documentation updates
Per the TWS session...

- Some simple treatment of the contents of pool.h
- Changing some \brief commands to @brief. (will do a more
  complete pass at this later.)

Change-Id: I050ee69c59c4b572ac295b5f86940b7f4c934cd9
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-07-26 13:29:58 -04:00
b52c40abf5 VPP-165 Update directory list in README
Change-Id: I7bc983860d6cc40f264e509e74b92978667324bc
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-07-26 17:04:35 +00:00
4aa76c1c16 Fix missing include dirs in doxygen
Also allow a developer to alter the directories scanned at runtime to
facilitate shorter run-times when writing documentation.

Change-Id: I2a09519661a3abe1fbc0cfc294000934852af951
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-07-26 17:04:19 +00:00
70e6a8dd52 policer classify
JIRA: VPP-114

If the classifier finds a matching entry, it sends packet to the policer,
packet should be pre-colored for color-aware policers.

Change-Id: I10cb53b49907137769418f230df2cab577d0f3a0
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-07-26 15:52:03 +00:00
ac0798db35 Fix coverity warnings
Change-Id: I37131f2d814a608fe9098daff83ff395f7ce99d7
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-26 10:31:05 -04:00
0f1c29c9d4 Fix Coverty warning in lisp_add_del_map_resolver_command_fn
Change-Id: I074d9e026ae42aa14caedc56287816ab64968425
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-26 12:12:17 +02:00
5c55e6bd04 Author: Dave Barach <dave@barachs.net>
--- log message follows this line --
Coverity: fix minor bug in test code

Change-Id: I5921874b4902fc7fe140a9b22852e7d18583e7ae
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-25 22:47:19 +00:00
1d98978823 VPP-142 - Follow up fix for shared_count in indirect adjacencies
Change-Id: Ia2d0351ffd40c75cbf9611e00a7e111189ad70b5
Signed-off-by: John Lo <loj@cisco.com>
2016-07-25 14:34:48 -04:00
9d716cdc3b VPP-108: fix buffer overrun
Probably not seen (yet) in practice due to the message ring allocation
scheme.

Change-Id: I7f01b5c09e0a172ad43ec3b8416e2791cada6122
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-23 19:25:58 -04:00
1642e3903d VPP-189 Fix 137 coverity no-op issues from vpeapigen
vpeapigen is not properly detecting no-op endian swap operations (on u8
or u8[] types) which in turn causes Coverity to currently report ~137
minor issues from the generated vpe.api.h file.

This patch makes vpeapigen comment out those no-op situations thus:

    /* a->interface_name[0..63] = a->interface_name[0..63] (no-op) */
    /* a->admin_up_down = a->admin_up_down (no-op) */

Change-Id: Ifbc5c93e1939206656e0515b528a4d167c539fd2
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-07-22 10:13:41 -04:00
1f0da170e8 Add DPDK 16.07 support (rc3 based)
DPDK vhost-user support is disabled due to significan changes
in the DPDK vhost-user code which are not compatible with current
VPP code.

Change-Id: I3f0d28cb75f6370282ec7e33d57cbfb77e1a3ce1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-22 09:10:58 +02:00
11bfc2f7f3 HONEYCOMB-83: Add Gre Feature
PatchSet 3: use clib_memcpy for copy.
PatchSet 2: use clib_memcpy() to copy IP address.
PatchSet 1: Support IPv6 interface for GRE API.

Change-Id: I80ee4b61df15da7fd851b682a97d5d49f89568b7
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-07-22 19:51:30 +08:00
80d7f4b2bc Add support for Chelsio T540-CR and T580-CR
Change-Id: Ibe927027c2aea6f2d85a9c50bf462c552b63861c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-21 20:53:40 +00:00
93a4691727 As interface is set to L3 mode, reset its output_node_index for l2-output
As an interface is changed from L2 bridging/xconenct to L3 mode, reset the
output_node_index for l2-output for the interface's sw_if_index. The reset
needs to be done in case the sw_if_index of this interface is freed and
reused for another interface type afterwards. Otherwise, the stale output
node may be used by l2-output for this sw_if_index and result in undesirable
behavior including the possibility of VPP crash.

Change-Id: Idd91d288c7643f0a1975a6787fcc330d03a7fac7
Signed-off-by: John Lo <loj@cisco.com>
2016-07-21 20:08:40 +00:00
32f7bc1fac Improve interface naming for NICs ports sharing same PCI ID
Change-Id: I68d708f5dd76dc7a46c3c8634aa8f18c515177e5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-21 19:24:38 +00:00
66ba6c4351 Updating gitignore for generated plugins folder
Change-Id: I266db9f4667c4f720d6109fad5c4d31eb182ed30
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-07-21 15:00:07 +00:00
365d7a5eb1 Rename reused LISP interfaces
Change-Id: I0efb4c488ea18504a87c845f8fe399f0333d5be2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-21 13:35:11 +00:00
03c4f99105 Fix CLI for adding LISP fwd entries
Change-Id: Ib707d252e624e3c1c4ac261fd3cef17b097633e5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-21 13:34:56 +00:00
404ca6e1c4 l2_rw preload starts where data is
Change-Id: I8819f78dedb02abd38ae0c404e9524ebde12191f
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-07-21 09:36:25 +00:00
ae6725b6fd tapcli: Use error counter for buffer allocation error
Change-Id: Ic51a0d17918de56869cfd4a371054fb380000089
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-07-21 09:35:58 +00:00
Ray
9387e51acb build-root/vagrant: Fix SSE4.x for VB
Number of users are reporting issues using VPP with Vagrant and the
VirtualBox provider. VPP quits complaining that SSE support is not enabled.

This change explicity enables SSE4.x support in the VirtualBox VM.

Change-Id: Ia26dc43276aae4179609febfd705d868fa3e07c6
Signed-off-by: Ray <ray.kinsella@intel.com>
2016-07-21 09:35:14 +00:00
9e6ed6e2e1 Add API calls for packet generator
Added new API to:
- create packet generator interface
- enable packet generator per stream or all
- capture into file

Change-Id: I0e6c1f28069853e4b26f0dc9d282353b0b7f6512
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-07-21 09:34:27 +00:00
948b95a9a0 VPP-123: remove japi (the old Java API)
MANUAL_JAVA flag (used only by the japi)
was also removed.

Change-Id: Ied21521b2410af1c357afb04cbf9e849632ddc5f
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-07-21 09:30:48 +00:00
84bde8dc13 ENIC driver update to init mbuf data offset to RTE_PKTMBUF_HEADROOM
Change-Id: I19e3e2b28c45d9f7efdd791d6dab126f6508df3e
Signed-off-by: John Lo <loj@cisco.com>
2016-07-20 16:14:57 -04:00
914f91b837 Add new lisp API - Show pitr
VAT API:
   - show_lisp_pitr
CLI API:
   - show lisp pitr

Change-Id: Ibd31cb09efc34a49b439338e9467faf7a151f2cd
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-07-20 15:03:18 +02:00
08e0312fe2 L2TP: Add option for custom fib id for outgoing encapsulated packets
If a custom fib ID is used (different from ~0), the associated
fib is used to forward outgoing encapsulated packets.
Otherwise, the fib used is the same as for any packet
received on the original RX interface (L2TP does not modify RX interface index).

Change-Id: I4533d5f7fa432c78c937d3acdd802d0d1c92a0c7
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-07-20 11:48:13 +00:00
8c4072696d IP6 forward: Add ND route when next-hop is unknown link local
Indirect routes have been recently added. When the next-hop is not known,
an indirect route is automatically installed instead. But it makes no
sense to add an indirect route for a link-local next-hop addresses.

Instead, it may make sense to add an ND entry to the
yet-to-be-met neighbor.

Also corrected some indentation.

Change-Id: Ia83c9cd1feafac742680745e82c6faf9f2e1e536
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-07-20 11:35:37 +00:00
59253a4989 ILA: Add direction option to disable ila2sir or sir2ila
In a ILA router use case as described by the draft, it is proposed
to disable ILA to SIR translation and do SIR to ILA only.

Change-Id: I8d0980bb75c8d925c1d1aa4563030919dd220620
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-07-20 08:39:38 +01:00
c61080e76c VPP-203 Find the relative next node index by node names
vat# get_next_index node-name vxlan4-input next-node-name l2-input
next node index 1

Change-Id: Ib71be8a408d08d59b0ed7dfb6ada9711cf29bd69
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-07-19 14:47:43 -07:00
3b2944d5f1 On bonded interface admin-down, should stop all slave links
When bonded interface is set to admin down, all slave links should
also be stopped or they will continue to receive packets and then
be dropped because bonded interface is down.

Also remove setting bonded interface L3 packet size limit to that of
slave on startup - it is not needed and can cause undesirable side
effect if its value become incompatible with bonded interface MTU.

Change-Id: Ibdd8acac0ca41a867131441eb26518592bb7d98a
Signed-off-by: John Lo <loj@cisco.com>
2016-07-19 14:21:41 +00:00
69ae1878d5 Fix CLI to add LISP interface
Change-Id: Id59a5f3dcea46679deb759a8e4af187125f33cbd
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-19 13:24:45 +00:00
90d8e2c4c3 Tap: Fix hardware address assignment
[VPP-200]: Previously, VPP set the same hardware address to tap interface as of
Linux side tap interface, if neither hardware address nor 'random'
keyword were given explicitly on VPP command line during tap creation or
modification, which was default case.

This patch makes sure to set the different hardware addresses randomly
as default case. While one can set unique hardware address or similar to
one at Linux side using VPP tap command line.

Change-Id: Ie0a82f3706834e87426d66c6e869ec4edfefe932
Signed-off-by: Mohsin KAZMI <sykazmi@cisco.com>
2016-07-19 13:23:32 +00:00
98cfc1aab0 Add uid/gid config parameters to shared-vm database map operator
So vpp_get_metrics and similar will not need to run as root

Change-Id: I635e830834c82990ad84ddaae06f2e50e55fd616
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-18 14:29:04 -04:00
2221cd8dd1 Fix "show hardware" CLI display for bonded interface may corrupt heap
Change-Id: Ie379844047b6402884653d3fd682010a1d09d14a
Signed-off-by: John Lo <loj@cisco.com>
2016-07-18 17:03:31 +00:00
bb43338025 Fix local eid API in VAT
Change-Id: I14fb0378944db5bf7a8843b4dc361de748659ece
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-18 17:09:05 +02:00
4575fb2df7 Use oper-160710 CSIT branch for 'verify' jobs
Change-Id: I798a1f4168a6d3e60fc9f115b33cd7a5b2782df6
Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-07-18 13:13:17 +00:00
ed740a968a Output format change from "vlan 802.1q" to "802.1q vlan", addition to VPP-111
Change-Id: Ieac14c88e6f0d2d88da1fe47f981fa33ae6f7c23
Signed-off-by: marek zavodsky <mazavods@gmail.com>
2016-07-18 11:02:41 +02:00
987fdfa125 Improve "indent foo.c" prep script
Change-Id: Ibb569b745954a11fb9c7751ad2d4140b922478fe
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-18 07:47:13 +00:00
08fc95568f VPP-187: Standardized retvalue types in vpe.api
Change-Id: I0cb0d2588a824c0fa040bbc5a30c3bb8be96aa0f
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-07-17 15:53:38 +00:00
fd8181b694 Add ILA plugin
This plugin is implementation of Identifier Locator Addressing (ILA)
per IETF draft-herbert-nvo3-ila-2

Change-Id: I5d5f8fb55c490f358f628bceb5f57e7e7408e6ed
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Wolfgang <wolfgang.beck01@gmail.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-17 14:00:16 +02:00
7d6b81e319 Add DPDK patches for i40e vPMD (ptype and ip checksum offload)
Change-Id: Idf38ee8f8cfc31be62fcf0b828832b2f06876815
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-16 17:02:03 +00:00
471109f938 - fixed misleading indentation (fixes compilation error on gcc versio 6.1.1)
Change-Id: I7f666a5fb9dac3cac88633d01e1941dac7cc012d
Signed-off-by: Wolfgang Beck <wolfgang.beck01@gmail.com>
2016-07-16 11:30:09 +02:00
7b053c5ecf vhost-user: Reset virt-queue info when a vhost interface is disconnected.
When a vhost interface is disconneted, virt-queue info should be cleaned up.
This will avoid any potential vpp crash due to unmmaped memory access.

Change-Id: Ia20153da9eb45412bb41d76ef66ede175ea6fef1
Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-07-14 22:09:09 +00:00
a86e60f176 Add a command line utility to display critical vpp engine metrics
vector rate, aggregate rx rate, [configurable] significant error rate

Change-Id: If0b7316a62cb8478d1466f1c9a9903d6df2a6ca0
Signed-off-by: Dave Barach <openvpp@barachs.net>
2016-07-14 19:24:53 +00:00
ad2c9c0e7f Show 802.1q/802.1ah details in the trace output, fixes VPP-111
added one line to dpdk-input trace to display vlan tci when PKT_RX_VLAN_PKT flag set
cleaned trace output of af_packet node. Added formatter for vlan_tci.
Merged with John Lo's ethernet trace extension:
Decode both dot1q and dot1ad VLAN tags in ethernet format function
and show what type of vlan tag it is.

dpdk-input & ethernet trace output example of ARP:

00:00:41:545481: dpdk-input
  TenGigabitEthernet8/0/1 rx queue 0
  buffer 0x10f2e: current data 0, length 60, free-list 0, totlen-nifb 0, trace 0x1
  PKT MBUF: port 4, nb_segs 1, pkt_len 60
    buf_len 2176, data_len 60, ol_flags 0x1, data_off 128, phys_addr 0x70e38ac0
    packet_type 0x0
    Packet Offload Flags
      PKT_RX_VLAN_PKT (0x0001) RX packet is a 802.1q VLAN packet ID 100
  ARP: 8c:60:4f:dd:ca:81 -> ff:ff:ff:ff:ff:ff vlan 802.1q id 100
  request, type ethernet/IP4, address size 6/4
  8c:60:4f:dd:ca:81/172.16.110.1 -> ff:ff:ff:ff:ff:ff/172.16.110.10
00:00:41:545492: ethernet-input
  ARP: 8c:60:4f:dd:ca:81 -> ff:ff:ff:ff:ff:ff vlan 802.1q id 100
00:00:41:545499: error-drop
  ethernet-input: unknown vlan

Change-Id: Iae67a945fda4aa2f24032e305a24544dd182b065
Signed-off-by: marek zavodsky <mazavods@gmail.com>
2016-07-14 15:36:21 +02:00
e282121d14 VPP-189 Addtional fixes for last coverity fix in linux_pci.c
Fix VPP startup problem where it cannot attach to a combination
of 3 Intel igb 1GE ports and 2 Intel ixgbe 10GE ports whose PCI
addresses are specified in the DPDK section of VPP startup
config file as follows:
dpdk { dev 0000:02:00.1 dev 0000:02:00.2 dev 0000:02:00.3
       dev 0000:05:00.0 dev 0000:05:00.1 }

Change-Id: Ibb12f9e9a9184d00da51a49961772ac3a42a2d1d
Signed-off-by: John Lo <loj@cisco.com>
2016-07-13 23:07:20 -04:00
2f653d08f4 Add API dump call for vrf/vni mapping to vpp-api-test
Change-Id: I7a028ce9ddf21bd3a7d4991ba1be05e5e74202d6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-07-13 19:36:43 +00:00
ad476c7861 Add plugins debian packaging
New debian package "vpp-plugins" is created with enabled plugins.

Change-Id: I8920178e8874f12e075858001ec44257dfaf497d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-13 13:42:39 +02:00
92217f3c1d packet-generator: various fixes
Change-Id: I8f1be9a501574ff4d5024ed0d632392708716e77
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-12 21:58:19 +02:00
f24e5d79d4 Show cli for plugin path, name filter and loaded plugins
Change-Id: If6ab5f08bcdcf5e24bb8b31926894d2a56cb6c14
Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
2016-07-12 15:21:33 +00:00
4ac74c9599 policer action
JIRA: VPP-90

Policer allows you to specify the action to be taken on a packet:
    conform-action (green color)
    exceed-action (yellow color)
    violate-action (red color)
Action to take on packets:
    drop - drops the packet
    transmit - transmits the packet, the packet is not altered
    mark-and-transmit <DSCP> - sets the DSCP value and transmits the packet

Change-Id: I59c037e55e7e2a9fc9b9752e92426f3977f5587b
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-07-12 15:12:58 +00:00
41da02d96b Add incrementing MAC / count support for the l2fib_add_del API
Change-Id: I1df1cd3d2630baab979e840153f1f109d3ead0c2
Signed-off-by: Dave Barach <openvpp@barachs.net>
2016-07-12 09:45:21 +00:00
3190f7ea3a ENIC driver update to allow bonded interface admin down/up to pass traffic
When ENIC ports are used as slaves to a bonded interface, these patches
enable traffic on bonded interface to resume properly on admin down and
then up of the bonded interface.

Change-Id: I339926010da614068417c72009b7af2f892890ce
Signed-off-by: John Lo <loj@cisco.com>
2016-07-12 00:55:20 +00:00
3659a5aa36 VPP-190: support variable length array syntax in request messages
The information is aleardy stored in array.length field, but
vpe.api syntax should be uniform.

Change-Id: Id84cd95c088281609c70548346cf0e408a6f49ff
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-07-11 23:03:40 +00:00
71893ac8b7 Simplify API to add LISP adjacencies
The API to add an adjacency requires that two things be provided 1) a
local and a remote eid 2) the whole remote mapping for the remote eid.
Since the API to add remote mappings can be used for 2), 1) in
combination with this API are enough to add an adjacency.

Change-Id: Ibe7474924bc3f28b6aed19cefa78fdb812de5eac
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-11 23:02:43 +00:00
efc3330959 VPP-183: IPSec transport mode
Change-Id: I22399aa9d55db0d91da7ba6acbbf552c0d201458
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-07-11 07:10:01 -07:00
1f2ed9fe23 dpdk: disable CRC stripping
Change-Id: I7006a3068c22e18e62c84abb8cc6124695b9ca44
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-09 11:18:08 +00:00
ddbdd4f993 packet-generator: fix pcap stream support
Change-Id: I494280964deda1d9448540cb5c6e7a8b750fff93
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-09 00:54:52 +00:00
8a7fb0cf68 fd-io-styleify for svm
Change-Id: I816de8b1f255dc3bc6d2904566ea0b0f68fac5d8
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-08 14:44:38 -04:00
49a6963b13 VPP-192 ip_neighbor_add_del incomplete vat help
Adds missing items to ip_neighbor_add_del help text

Change-Id: I1d74c7d31ec6d96f8de9bfb5bfc7872b9cbef682
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-07-08 16:53:46 +00:00
371e4e19d1 fd-io-styleify pass
Change-Id: I72d0dff064162d11321257c858f68da1ba79ea48
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-08 15:11:40 +00:00
9b8ffd99fb fd-io-styleify pass
Change-Id: If2d57a213fc2fec996db26df332910c3d2105f97
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-08 14:18:22 +00:00
0557a91ca7 IPv6 frag: avoid overflow while parsing extension headers
A malicious packet could advertise an extension header length bigger than
the actual packet length, which would cause an overflow.

Change-Id: I277123e6fde6937b0170f2b2e33846bd22848ac4
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-07-08 14:17:19 +00:00
4d5cabde54 Add locator prority and weight to LISP API
Change-Id: Ifa9bcd9a9c5dbda00ff8096909ccbc822445b8cb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-07-08 14:15:37 +00:00
bbae375ca2 Remove unnecessary and obsolete configure.ac directives
Also enable silent rules where missing

Change-Id: Ia521886815c862b013f01df4cc18fd8a298aaaa1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-08 13:55:35 +00:00
952f4f7422 Update emacs plugin skeleton
Change-Id: I52b370abd8b6fec34b8219a274f2de404e072a97
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-08 13:37:58 +00:00
ac645ad285 Add IPFIX to vpp-api-test
Change-Id: I32dcfb1c33f0b2324de1ebf08851e8b65793e4ea
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-08 12:38:46 +00:00
837fbb119c Add binary API for IPFIX
Change-Id: I3346b18126d65b72726e977dfb11ba4c380056c0
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-08 11:24:39 +00:00
483f668eda Make IPFIX src port configurable
Make src port configurable in flow report sample code

Change-Id: Ic7d3c3de17b83821106a827fb65e79381044da7e
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-08 11:23:48 +00:00
905a7f5520 Multiple changes in the plugin build infra
- configure.ac - some plugins are enabled by default
- Plugin .so files are placed into corresponding subdirs
- WITH_PLUGIN_TOOLKIT macro is retired - not needed anymore
- plugins/build-data is removed
- plugin makefiles are not building static libs anymore
- plugin makefiles are not installing header files to /usr/include
  anymore

Change-Id: I55681bd9ce34811f7eb1b2b24d9f0ca42df1cf04
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-08 10:43:38 +00:00
370e9e38e8 VPP-189 Some bugfixes for issues reported by Coverity
CID 130914 Buffer not null terminated
CID 130916 Unchecked return value
CID 130938 Unchecked return value from library
CID 130939 Unchecked return value from library
CID 130940 Unchecked return value from library
CID 131042 Argument cannot be negative
CID 131222 Resource leak
CID 131223 Resource leak
CID 131334 Double close
CID 131335 Read from pointer after free
CID 131211 Resource leak
CID 131212 Resource leak

Change-Id: Idd80b91f621278e0be15911f2ed4354dbe4fc7f2
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-07-08 09:41:03 +00:00
ce3e971bab Allow DPDK per interface startup config to enable/disable VLAN stripping
The init of VIC/ENIC ports enable VLAN stripping of received packets by
default, which is different to all other devices. The VLAN stripping of
ENIC ports can be disabled by adding the per device DPDK config as
"vlan-strip-offload off" such as:
  dpdk {...  dev 0000:0c:00.0 {vlan-strip-offload off} ...}
The per device config "vlan-strip-offload on" can be used for enabling VLAN
stripping for other devices which support this function but is disabled
by default.

Change-Id: I9c81904a87c26868a07900b03677aeeb57f72372
Signed-off-by: John Lo <loj@cisco.com>
2016-07-08 09:38:56 +00:00
618ab08c4f Reset IPFIX streams after configuration change
Reset IPFIX streams if reconfiguring IP addresses or collector port

Change-Id: Idc914f90462572342d4ed02b538bb2d30b317931
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-08 09:36:48 +00:00
a7775387b1 Set plugin path properly when using toplevel makefile to run/debug vpp
Change-Id: Ib6f7dd9d7e1d9f2f2108a8b89421149e4435d5ec
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-08 00:19:12 +00:00
5a49bb9ef5 Add configuration options for IPFIX
Make Path MTU configurable
Make template resend interval configurable
Make collector port configurable

Change-Id: Ia557916137995ea565f0ede12e169efe81eb0a5d
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-07 20:29:18 +00:00
86634f0e74 Use arbitrary FIB for IPFIX
Change-Id: I85b3543a3f72a10e15c252e04ce2e4a390513ca9
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-07 20:28:14 +00:00
e9dbd2b781 VPP-142 Recursive route sending traffic to wrong interface
Indirect routes should always result in an indriect adjacency even when the route's next-hop is covered by a connceted, since the covering route may change and no tracking is in place.
Some de-duplication of code for installing indirect routes via the CLI and API.

Change-Id: I7a440ffba43ae3990b68cb407244c06bd0827534
Signed-off-by: Neale <nranns@cisco.com>
2016-07-07 19:33:43 +00:00
689acafcab VPP-148 added bvi_mac flag to l2fib_add_del api call similarly to cli
Change-Id: I3b65e85d24ed37b6889af7e194fee45ec61b15a8
Signed-off-by: marek zavodsky <mazavods@gmail.com>
2016-07-07 19:30:08 +00:00
0d2a8e7897 Fix bugs and do some optimization in IPFIX code
Change-Id: Iba8627062874eac63c584ec05343f4591f48c286
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-07 16:10:08 +00:00
132d51d4d2 Document more nodes
Change-Id: Ib8ef0559aa0573bf1229e9c794d48520197f9c8a
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-07 16:06:42 +00:00
708357415d Remove #if DPDK == 0, to eliminate a data structure size mismatch
Otherwise, e.g. the ip4/6_main_t's change size between PLATFORM=vpp
and PLATFORM=vpp_lite. That, in turn, makes it far easier to build
broken plugins.

Change-Id: Ic962d75b170eee698de29c4e29849ce73d27caad
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-07 16:05:59 +00:00
57bf403b34 Remove duplicate code buffer_func.h
Change-Id: I57e442b1f3486c5e8caac9d2e288869ee10f37b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-07 15:28:23 +00:00
b93222f7e4 Fix deletion forwarding entries when deleting static remote mapping
Change-Id: I11207a0452cbccfb959ff426faefda4820463007
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-07-07 15:18:26 +00:00
3a94475e29 Retire support for DPDK 2.1.0 and older
Change-Id: I3c3427c61e32d4727360aa802950bb9ab44afd84
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-07 12:35:10 +00:00
9770e20a9e Add some doxygen tags
Also add an index of node names

Change-Id: Id65c2e607976d8bad73deb738035a471be077196
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-07-07 09:33:41 +00:00
1b1ee4f2e5 Add an option to dump details about specific LISP EID in API/CLI
Change-Id: Ie5e6751fd791e7ca728522632332abe442a1a75b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-07-07 08:13:47 +02:00
137c7c6126 Retire PLATFORM=virl
Change-Id: Iaf9735258f456574534c1a581b983326badea171
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-06 22:56:56 +00:00
3d9c86e9f7 Add support for capturing packets on packet generator interfaces
This patch introduces following changes:
 - 4 predefined pg/stream[0-3] interfaces are removed
 - Interface naming is changed form pg/streamX to pgX where X can be
   any u32 value
 - one pgX interface can handle multiple streams
 - keyword "source pgX" is added to "packet-generator add" command, X is 0
   by default
 - new cli "packet-generator capture" is introduced
 - new cli "create packet-generator interface pgX"

Change-Id: I768d075b9d4a34f0b5073debdc5dd4a0880c682c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-06 22:38:28 +00:00
64f450da8f Netmap: Fix Netmap Polling Issue
Previously, netmap node switched from interrupt to polling if
worker threads are enabled even if there was no netmap interface
running. Netmap input node consumed CPU cycles because of input
node calls but these cycles were wasted as input node did not have
any packet to process.

This patch fixes issue stated above using more intelligent way of enabling
or disabling polling based on interfaces count. But the pre-requisite
condition for polling is, worker thread(s) should be enabled.

Change-Id: I3a901823c7b040cce3393958981f439b9f290fe5
Signed-off-by: Mohsin KAZMI <sykazmi@cisco.com>
2016-07-06 20:43:15 +00:00
2e95f5a1d1 VPP-184 - Bad type translation in jvpp
Change-Id: I6dda9eb8d58a2bc9a1e4d6636688dfa1f8bb88c6
Signed-off-by: Jan Srnicek <jan.srnicek@pantheon.tech>
2016-07-06 19:16:58 +00:00
31a367417e Bug fix for VPP-104 about not being able to down a sub-if if the super-if is up
Change-Id: I913c9807519aa10e515d12fcfbcbfc22b58f5839
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-07-06 16:47:35 +00:00
cbec1a18e2 VPP-182: IPv4 static ARP entries should not be deleted on interface down
IPv4 static ARP entries should remain when interface is set admin-down
and be reapplied on interface admin-up.

Change-Id: Ic0051865154230c2561d6e6421b05d842f147ca7
Signed-off-by: John Lo <loj@cisco.com>
2016-07-06 14:02:21 +00:00
141977f60d VPP-177: IPsec empty buffers allocation fix
Change-Id: I6d224fe19f1e0dd7ad5659e0734bc96ba37337ff
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-07-06 09:23:14 +00:00
ed9b757a10 VPP-144: Fix that shows the empty segment field in sh sr tunnel
Change-Id: Idc71a48f2eab3b712f6953af8baf1a6ecd54dcaf
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-07-05 23:25:40 +00:00
2195706fef VPP-179 Fix adjacency reference-count botches
Change-Id: I3fe83a511064d73087c4526ef33cd7628f15b90f
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-05 13:37:46 -04:00
55bf5c9385 ENIC driver patches to address various issues
Also clear x-bit for old patch files 0013-xxx and 0014-xxx.

Change-Id: I217fdbfb32cef1ae575c668270d3baf593e688c6
Signed-off-by: John Lo <loj@cisco.com>
2016-07-05 16:21:35 +00:00
f727db9e6f LISP CP cleanup and refactoring
- avoid code duplication by using only one function for
  insertion/updating of remote mappings into map-cache. Static remote
  mappings are now inserted using this function as well and therefore
  the code does not try to build forwarding entries out of them now.
- bring up lisp dp interfaces when a vni is bound to a vrf.
- ensure eids are cleaned-up before parsing control plane messages
- ensure map-requests are always sent to default fib
- new API to insert lisp adjacencies as opposed to remote mappings which
  should be replaced post merged in CSIT
- reorganize and group functions according to their purpose and use. No
  need to pre-declare internal functions now.
- this does not touch locator-set logic

Change-Id: Ibcfc0f2d9c1bc1c9eab6e83c1af1b4cf9302ac10
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-04 18:48:50 +00:00
7d54a3d120 VPP-174 IPsec API fix
ipsec_sad_add_del_entry and ipsec_spd_add_del_entry parameters with IPv4 address
are always 0.0.0.0

Change-Id: I75cb211ce9069596df4ef1d910e263d22940b9d8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-07-04 01:31:56 -07:00
4b72a5812c Add gtags option to use ctags. Hidden option in Makefile
Change-Id: I6b01c1f2beec37d7aaad1ab9dab303835a9feb49
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-07-02 17:54:36 -07:00
dbacf85fed Finish cleanup of .../plugins/{configure.ac, Makefile.am}
To add a new plugin subdirectory, add this to Makefile.am:

if ENABLE_new_PLUGIN
SUBDIRS += new-plugin
endif

and add this to configure.ac:
PLUGIN(new)

Change-Id: I770a6f4f8f964fd7318a912be486accf46514b59
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-02 10:35:08 -04:00
a15568029a Enable PCI extended tags in the DPDK config
This change should improve DPDK performance on 40G+ NICs
with small packets.
It also removes ITR setting for i40e devices, allowing driver to set default.

Change-Id: I70761b155e48fb0281f7c231516d83027bd16ca2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-02 12:22:43 +00:00
20c02cb133 Simple ip4 NAT plugin
Change-Id: Iffe77bf2a05ced41474540ff54a842101aad7c41
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-01 18:20:13 +00:00
b8dca74c23 VPP-171: fix a set of hw interface recycling bugs
Change-Id: I735292bb2176742acab2295f90956c57e6f7ec1c
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-01 12:38:29 -04:00
bfd32fddb3 VPP-163 "show ip6 interface" ignores many addresses
The output of the CLI command "show ip6 interface" shows only the first
link-local address and any globally-scoped addresses. It ignores all
other valid address scopes.

This patch reworks that routine to cover the three main address scopes
("link-local", "global" and "local") and anything else it finds is
grouped under "other").

Rationale for this final grouping is that these other addresses fall under
ranges currently either "reserved" or "multicast" in scope. Whilst it's
good to show if these are present, they are not normally found as link
addresses.

DBGvpp# sh ip6 int tap-0
tap-0 is admin down
	Link-local address(es):
		fe80::e857:7fff:fe77:c1a9/64
	Local unicast address(es):
		fd50:7389:246b:4321::2/64
	Joined group address(es):
		ff02::1
		ff02::2
		ff02::16
		ff02::1:ff77:c1a9
		ff02::1:ff00:2
...

Change-Id: I1d750b3b39c54aa4eb75632d53089640601bcba5
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-30 15:19:27 +00:00
371fa44110 Fix buffer leak from L2 flooding replication process
vlib_buffer_free_inline actually checks (b->flags & VLIB_BUFFER_RECYCLE)
in order to decide whether to free the packet or not.
Although the flag was correctly set in replication_prep, it is not removed
by replication_recycle during last iteration.

This patch just removes VLIB_BUFFER_RECYCLE when is_last is set.

Change-Id: I2445ebce908d94d95535e706b40407b4f15906e4
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-30 14:15:52 +00:00
c4770ecc62 Fix wrong interger type when unformating value in VAT
Since format string "%d" expects a 32 bit value using u8 type in unformat()
results in buffer overflow.

Change-Id: Idee5b588049d7573ddbde56c28030f9db3758493
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-06-30 10:01:02 +02:00
ec175104cf Fix clang build
Change-Id: I678d7e0a7c91c7daf9feb3ec23a633b96fab56a7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-30 01:02:17 +02:00
33879c95b8 Fix the spelling of the word "suppress".
The spelling mistake where "suppress" is written as "surpress" was
sufficiently common and annoyed me enough to fix it.

For backwards compatibility, the CLI and API test tool both still accept
the erroneous spelling.

Change-Id: I82104ae9d8c2c9d6e3396ba0d72cb1dc133081d1
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-29 19:49:21 +00:00
006eb2689b Add support for ethernet address in LISP API
Change-Id: I9f1522f55bdd11602784a421fd850b839a1070e6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-06-29 18:54:02 +00:00
71fb06fba0 Don't re-write adjacency with same information.
This will cause FIB counters to appear to be reset.
This is an implementation of a patch from Dave Barach.

Change-Id: I19b9953d42dfb92ec22af6a855e2e519ae7c3bdc
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-29 07:07:16 -07:00
0f8ecf0eb2 Decouple worker thread code from dpdk, enable worker threads in vpp_lite
Change-Id: I28616f1a89f2da95484438ec1a1db64845f15ef6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-29 13:26:21 +00:00
2838a2355a VPP-158: VPP crashes in IKEv2 code when running multithreaded
Change tunnel interface creation to be done from the main thread instead
of a worker thread by calling vl_api_rpc_call_main_thread.

Make per-thread copies of volatile elements in ikev2_main.

Change-Id: I4cda8aaa392a04c2aea2d50a52a07933cf40c016
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2016-06-29 09:18:43 +00:00
816f3e1b87 VPP-48 Fixes for ip4/6 ttl checks and icmp responses
This patch fixes a few minor things:

- Previously ip[46]_input was rejecting packets with an input TTL (hop
  limit) of one; this was not correct behavior. Packets that are bound
  for this device can validly have a TTL of one.
- ip[46]_forward was not generating an ICMP TTL expired message if the
  act of decrementing the TTL caused it to become zero. This was not
  previously an issue because ip[46]_input was filtering packets where
  this could happen.
- udp_local was not generating ICMP Port Unreachable messages if
  UDP packets arrived for a port that is not listened to. This is
  typically the signal that "traceroute" uses to terminate its
  search.

Together these fixes mean that traceroute probes transiting a VPP
node, or are targetted toward a VPP node, now work as expected.

Change-Id: I84bb940883f7a18435f29f4518fb0445b989a3e3
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-28 23:35:13 +00:00
154d445f7f Fix native build on non x86_64 systems
Change-Id: Iab9f6793112f19a5b54a555623d84099aa8bb03e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-28 19:10:41 +02:00
a06dfb39c6 Reduce ring size for dpdk NICs and overtal mem footprint
Size of interface descriptor rings have direct impact
on Last Level Cache utilization, and can significantly affect performance.
So generally having smaller ring size is good idea as long as
there is enough buffer in the ring to accomodate line rate.

Here we are reducing rings sizes to 1024 which is still bigger
than lab verified 512 buffers per ring.

Indirectly, this also affects memory footprint, as we can have
smaller buffer allocation, which is now 16384 (previously it was 32768)

This patch also fixes issue with i40e vector PMD which was leaking
buffers when previous default ring sizes were set.

Change-Id: I58fb40586304b2f0cb5de9a444055da3cd3acb53
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-28 15:08:45 +00:00
310dca43a3 Add support for classify table/session read to jvpp:
* provides length information for variable length arrays
  in classify table/sessione reply messages
* provides jvpp example for reading classify tables/sessions

Change-Id: I47f8fca5c849ec874d4e23f28177e310689db522
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-06-27 17:11:41 +02:00
ea3e1fc875 Plugins: Clean up the plugin directory so that each plugin has its own
directory and GNU autotools setup.

Change-Id: I6c59d1297389c9413db0c0b9bdf3b759080bf1b8
Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-27 15:04:00 +00:00
aa6920e0a8 More janitorial work
Install vpp api header files in /usr/include/vpp-api, instead of
/usr/include/api. Someone will eventually complain if we continue with
the status quo.

Generate /usr/bin/vpp_plugin_configure, to correctly configure
standalone plugin compilation against header files installed from the
dev package.

If a plugin's CFLAGS don't precisely match the installed vpp engine
binary, subtle misbehavior can and will occur. Example: the ip4/ip6
main_t structure size / member offsets depend on DPDK=[0|1]. Screw
that one up, and your brand-new configurable ip feature will
mysteriously fail to appear, even though the plugin loads perfectly.

Change-Id: I20c97fe1042808a79935863209d995c31953b98c
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-27 06:54:32 -07:00
20c90f765d VPP-108 : API calls to read classify table and sessions
Added new API calls to read
- classify table ids as array
- classify table ids for specified interface
- classsify table info
and to dump sessions of specified classify table.

Change-Id: I089604fa98eea92866495089d76c2330ae7d850c
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2016-06-27 13:47:34 +00:00
8e39bb402a Add MAC address support to LISP map-cache
Change-Id: I80f05a222cb0f728ad2460efe33955e781b6849f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-06-27 13:15:39 +02:00
203c632d29 Misc. janitorial work:
Remove private / name-colliding "give me the first ip address on an
interface" routine from proxy_node.c

Return a proper error from ip4_lookup_init / ip6_lookup_init.

Change-Id: Idd3c574424ba2ea77c263af16b02cd4ad0cb4605
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-26 10:37:14 -04:00
63617fc8e4 Netmap: Resolve interface state issue
[VPP-155]: There is inconsistency in the netmap interface
state for software interface state and hardware interface
state. This patch resolves that issue.

Change-Id: I92199e117f919bd985670366a6d3b7753e40659c
Signed-off-by: Mohsin KAZMI <sykazmi@cisco.com>
2016-06-25 17:38:01 +00:00
034fccccab Doubly-linked list element pools
Change-Id: I96e7602be48dfb5bb3867ad1e9f15c543903b3d6
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-25 17:35:29 +00:00
692581faf8 vhost-dpdk: dequeue size fix
Burst size for DPDK is 32, which is different from VLIB_FRAME_SIZE.
A loop is needed to dequeue all packets.

Change-Id: Ie611c58c4e3434251a47fe6ad1f38abcb85180cb
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
2016-06-25 17:34:30 +00:00
07515d7aae add buf_physaddr to dpdk trace
Change-Id: Icbb6814306f51873af6ad9d1425b52d660bb99ce
Signed-off-by: Georgii Tkachuk <georgii.tkachuk@intel.com>
2016-06-25 16:04:18 +00:00
f8035649e9 Vagrantfile RAM default is too small.
- Will raise JIRA for someone to convert this to use binaries by default
- This means we should be able to get away with smaller VM for non-dev users

Change-Id: If3d9283ba2c169792a1ab71ff692c25de82d41f4
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-25 03:50:28 -07:00
a7575eacb9 netmap: multithreading support
This patch adds multithreading support for netmap interfaces.

Change-Id: Iba94386fe309a4aac71646fe567f8dabbebd0459
Signed-off-by: Mohsin KAZMI <sykazmi@cisco.com>
2016-06-24 21:24:33 +00:00
d6b3850c64 Move vcgn as plugin
Use appropriate libnames to copy

Change-Id: Iaa1e7e3ceed52f328e26e75ee7309fc6464d5c66
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-24 11:25:13 -07:00
b0ccf03b6e Reformat output of lisp eid-table show command.
Example output:

DBGvpp# sh lisp eid
EID                                type                locators
[100] 6.0.2.0/24                   local(ls1)          host-intervpp1
[200] 6.0.2.0/24                   local(ls2)          host-intervpp1
[100] 6.0.4.0/24                   remote              6.0.3.2
[200] 6.0.99.0/24                  local(ls3)          local0
                                                       host-intervpp1
[0] 6.0.0.0/16                     remote

Change-Id: I69200bf7636167bce931def88828503a75496f4b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-06-24 15:57:17 +00:00
fa42e25c4e VPP-118: add support for variable length arrays to jvpp
* extends VPP's message definition language with the following syntax:

u32 count:
u8 array[count];

which is traslated to:

u32 count;
u8 array[0];

but now, python API representation generated by vppapigen
contains information about where the array length is stored.

* modifies existing response messages to use the new syntax

Change-Id: I68210bc7a3a755d03d067e9b79a567f40e2d31f3
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-06-24 13:23:16 +00:00
80ee21386c Add admin-up flag to L2TP tunnels and start tunnels set to down
L2TP tunnels use virtual interfaces but directly send
packets to l2-input node (not ethernet-input).
This node requires a bridge-domain to be associated with
the interface.

Past code was immediatly turning the interface up, but
some packets could be sent to l2-input without bridge domain
between interface creation and association with a bridge domain.

The tunnel is now created as down and has to be set up later
(typically after being associated with a bridge-domain).

Another option would have been to change the api and enforce
a bridge-domain to be specified before the tunnel, but this
is less flexible for the user.

Change-Id: I26d1f36bb4f327d9fa1c8044023f2210c4117904
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-24 12:55:22 +00:00
de393bb76d Show command support for ip feature paths
"show ip features" displays all available features, in execution
order.

"show ip interface features <intfc>" displays all features currently
configures on an interface, in execution order.

Change-Id: I489bbdb85799a01721ba60b12ffaffcab1e0d1df
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-23 23:28:41 +00:00
0f6b796071 Use lisp_gpeX iface counters to store decap stats
The patch switches to using LISP interface counters for storing the
number of decapsulated packets instead of using per decap node stats. It
also removes the encap node (iface tx node) stats since the iface output
node already keeps track of the number of encapsulated packets.

Change-Id: I636702a824264c173792f2f0c7fec0b0f4c6a9f7
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-23 21:48:48 +00:00
2c21a9aa88 VPP-72 Added api call aquivalents to:
"show mpls fib" -> "mpls_fib_encap_dump" and "mpls_fib_decap_dump"
    "show mpls tunnel" -> "mpls_eth_tunnel_dump [tunnel-index <tunnel-id>]" and
                          "mpls_gre_tunnel_dump [tunnel-index <tunnel-id>]"

Change-Id: I59699039392f06dc61f62a015d07186a91cfaf45
Signed-off-by: marek zavodsky <mazavods@gmail.com>
2016-06-23 14:22:12 +00:00
324112fad0 LISP EID virtualization support
Change-Id: I892c001cfdff9d8d93e646641d96520beb3c6265
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-06-23 13:00:39 +00:00
0443212371 More LISP SD FIB and forwarding fixes
o) Avoid using explicit_fib_index in the dst (main) FIBs. It's used in
the IP6 lookup
o) use if_address_index instead of rewrite_header.node_index to store
tunnel indexes. This ensures the tunnel index is used in the signature
computation and thus avoids all complications/hacks needed to make src
adjacencies unique.
o) Fixed negative fwd entry route insertion

Change-Id: Ie56356f165b96dfa929da5672a3a429996366460
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-23 12:00:13 +00:00
d076f19b5e ARP/NDP does not send solicitation when no source address is available
Currently, when the interface has no address assigned to it,
VPP crashes as ip_interface_address_for_packet assumes there
always is at least one address.

This patch checks if an address is available at all.
The only part of VPP using it is ARP or NDP.
When a neighbor discovery message has to be sent while
there is no address assigned on the interace, no
solicitation is sent and an error counter is incremented.

Change-Id: Ia9fdaf8e84050a1ceeb47f5370819d3df95714f0
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-22 17:09:33 +00:00
5b7a563ff0 Add MAC address support for LISP
Change-Id: I79e3915fa61b497e6b586babcdf093937af07b2b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-06-22 17:18:43 +02:00
7511ae85b6 CLI to update locator-set
Change-Id: I60ea36362a2c4b7c936dde501a3d737b68a8c9ff
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-06-22 11:28:10 +00:00
355cf68f92 Fix for build failure due to iOAM plugin header file path
Change-Id: Ie5d270a01e3ca0687a407aeebc42aacc53a01ddc
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-06-22 10:16:47 +00:00
010972a95d Vagrantfile syntax error correction - requires string input instead of integer.
Change-Id: Ib291662c4ea2f5bef0f2c417b16d256f5c480d5c
Signed-off-by: Srivatsa Sangli<srivrama@cisco.com>
2016-06-21 12:58:19 -07:00
8ebb2a1632 Check if LISP is enable
Lisp enable flag is enforced. DP API should not be call if the dp is disable.

Change-Id: I265cf3ea0460987f3fd5fd84b43127dd3b1c43c3
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-06-21 13:41:22 +00:00
0977e4baab Fix problem with DPDK vector PMDs not working in VPP
Linker was picking wrong, weakly linked function from
dpdk drivers, so detection of vector mode was always failing.

Change-Id: I11725c8ddbc4604dd04ecb89ebb7f02ee05e52c7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-20 18:07:01 -07:00
a026eb1a6d VPP-143: Correctly drop local l2tp packets when no session is found
When receiving a local ipv6 packet containing an l2tp packet not associated
with any session, l2tp node was handling the packet as if provided by an ipv6 feature,
hence crashing.

This patch fixes the issue by correctly dropping the packet instead.

This patch also fixes a typo from commit d65346098d.

Change-Id: I1b377fc5685568c16831920227671feffac64287
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-20 15:32:08 +00:00
e0965d4e05 Using env.sh file for Vagrantfile inputs, but assume some defaults
Change-Id: Ia4b45d88be5943d413d61435ff38796d1b6a32a2
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-20 12:13:15 +00:00
889178c02a VPP-152: mheap_alloc returns 0 when the requested heap size is too small
mheap_alloc allocates memory_size bytes of memory and returns
a page-aligned memory space prefixed with a word-aligned
header of type mheap_t.

This header includes the actual usable space size, but
when the requested size is too small, the computed size
was incorrect (infinite).

mheap_alloc now returns 0 in such cases.

With help from Yoann Desmouceaux.

Change-Id: I00af63d573d6939aca53dbe7ff612b726bd8f0df
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-19 13:31:59 +00:00
f2868fcd2e Output interface MTU check ignored in double-loop
In the double loop of ip4-rewrite, when forwarding packets,
the outbound interface MTU check occurs too late in the
double-loop to be actioned.

Change-Id: Ifc44e65d6ddb832aa0161d0685b1a28378541905
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-19 13:30:36 +00:00
2459e4c5f5 Fix use of lookup_next_index in LISP src/dst FIB
Adjacencies in LISP src/dst FIB store the index of the LISP output
interface (next node after lookup) in the lookup_next_index. Since the
values of interface node indexes are not constrained, they can collide
with the 'special' adjacencies IP_LOOKUP_NEXT_LOCAL and
IP_LOOKUP_NEXT_DROP. As a result, at allocation time, LISP ajacencies
may be automatically shared with the previous two, predefined
adjacencies and all LISP specific state stored in the rewrite area is
lost.

This fixes the problem by 'hijacking' the explicit_fib_index instead
of the lookup_next_index field.

Change-Id: I3c59121dcf0851decf5c08004143d1201dbd1ece
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-19 13:26:11 +00:00
808b2db964 Improving cross_ldflags arguments for dpaa2 platform
- This helps in avoiding manual export of
   LD_LIBRARY_PATH for /usr/lib64/

Change-Id: I15fc9c9f961848411b093c891ca9517ef4e074a0
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-19 13:25:05 +00:00
e62c796b28 gitignore gtags
Change-Id: I0160cdfc8e749f875a232e07526d53a3a7c8395c
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-19 00:48:01 +00:00
693b7026a8 Enhanced RPM build process to make rpm for any given platform
- Currently default rpm.spec only look for  "install-vpp-native"

Change-Id: Iaa78c46ae62d2747bda6ffc1189cb8ac6d578bd8
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-18 15:28:08 +05:30
98897e26ce Fix node registration in ixge driver
Change-Id: Ia98ed873954feaa7bf1f13d8eb4054d0afba495e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-18 02:52:24 +00:00
a18e413085 Give correct argument to ip_call_add_del_adjacency_callbacks
ip_call_add_del_adjacency_callbacks requires an adjacency index, not a
sw_if_index.

Change-Id: I4ae6a6bbbe0abee4791217463d353c56f9735ba3
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-18 02:50:44 +00:00
b5adaeab2f Move pkt replication counter to the opaque2 cache line
Change-Id: I5e6edfd03ab41949be2c768dfe68aa824bbc1f38
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-18 01:01:36 +00:00
f289ca6bc6 Updated Makefile so install-dep doesn't prompt
Change-Id: I8e5f4d120c9add636054e740f2a8aa3a0f8bb7d1
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-17 22:11:04 +00:00
d65346098d Dynamically compute ip feature subgraph order
This change-set enables plugins to add themselves to the ip4/ip6
feature subgraphs without having to modify core vpp engine code
at all. Add VNET_IP4/IP6_UNICAST/MULTICAST_FEATURE_INIT macros
which express the required ordering constraints, and off you go.

Along the way, added an implementation of Warshall's algorithm to
vppinfra; to compute the positive transitive closure of a relation. In
this case, the relation is "feature A runs before feature B."

With that in hand, ip_feature_init_cast(...) computes a partial order
across the set of configured feature subgraph nodes.

In unit-testing, we discovered VPP-145 - ip4/6 inacl wiped out
vnet_buffer(b)->ip>current_config_index, which exists in main. So, we
fixed that by moving b->trace_index, adding b->current_config_index,
and removing the ip opaque union current_config_index.

Change-Id: Iff132116f66413dc6b31ac3377198c7a32d51f48
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-17 16:24:16 +00:00
378893a485 Support NAT across multiple interface pairs
Some of the commands require interface name as an
    additional parameter as we support multiple interfaces.
    Example:
    set vcgn map inside TenGigabitEthernete/0/0 10.1.0.1 - 10.1.0.1
    show vcgn inside-translation protocol tcp interface TenGigabitEthernete/0/0 inside-addr 1.0.0.2
    show vcgn outside-translation protocol tcp interface TenGigabitEthernet9/0/0 outside-addr 10.1.0.1

Change-Id: Id691ccd3f2c863c665a1568982c819b79dda007e
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-17 12:34:38 +00:00
bd05e17d79 NXP DPAA2 Poll Mode Driver Support in DPDK
Upstreaming of DPAA2 driver changes is in progress.This patch will
 temporary add the support in VPP in built DPDK.

 Two types of changes:
     1. Driver specfic independent files. No impact on any other functionality.
     2. Changes in common EAL framework. These changes are done in compile time DPAA2
        specific flag, so no impact is expected on other existing features if not
	compiling for DPAA2.

Change-Id: I02abe7189313835b51ff654b4d7e566bc0fb8327
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-17 12:33:43 +00:00
85b528e093 VPP-76:APIs for Proof of transit feature added to iOAM
Moved Proof of Transit utility as a plugin
Moved Proof of Transit option as a plugin

Change-Id: Idc9897205eb8ec80c5dea47b428e6209ac938c32
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-06-17 09:43:40 +00:00
b6e4d3990e New LISP API map-request itr-rloc
API to constrain source locator when sending map-requests.
lisp map-request itr-rloc <locator-set name>

Change-Id: I19f3a1aa8a387ca8662ccf3a4ad774ea7d655f80
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-06-17 09:17:31 +00:00
a29f200688 VNET: Initialization support for NXP DPAA2 poll mode driver
- NXP proposed a poll mode driver "rte_dpaa2_dpni" in DPDK upstream.
 - When using external DPDK with the given dpaa2 driver, VPP needs modification
   to initialize the PMD and to understand the DPAA2 N/W interfaces.

Change-Id: I00eb127fa88c71fb430d3def238d50ba68fd595f
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-17 07:10:55 +00:00
b84ccc614d vpp-83: fix double-unlock
Change-Id: I0b75b4f9bef62aba69e9cc163924f6b985a35455
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-17 07:09:44 +00:00
45050f8781 Fix generate-deb-changelog to handle YY.MM release
generate-deb-changelog was only properly handling x.y.z
releases.  This patch fixes it to handle YY.MM.

Change-Id: Iaaee8ff747abd6754d021535c889f67ad2c9998f
Signed-off-by: Ed Warnicke <eaw@cisco.com>
(cherry picked from commit 693f4358de)
2016-06-17 03:13:59 +00:00
1c494840b1 Consolidate use of IP fib functions in LISP CP
Clean up, refactor and consolidate LISP CP functions that interact with
ip interfaces and fibs.

Change-Id: I214eaebbec8d43646118df0948d0f82f923a5b43
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-17 03:13:21 +00:00
3b3688f9d3 6rd: Move to plugin
- Change toplevel plugins make target. Now builds all plugins under
  plugins/. (Apart from sample-plugin).
- Move sixrd code to plugins directory and make necessary changes to
  make it a plugin
- Remove 6rd hooks from IP lookup code

Change-Id: I447e92e3bee240cd8de01d0abac2e1708e8c27d1
Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-15 16:10:08 +02:00
f0f852251c VPP-19: Split the lookup.h IP_LOOKUP_NEXT enum.
IP4 and IP6 nodes currently shares the adj->lookup_next_index. That
has some issues, e.g. that one has to add non-functional nodes like
ip4-hop-by-hop and that anyone dynamically adding nodes to any of the
IP4/IP6 lookup nodes must ensure they add themselves to all relevant
nodes to ensure next index consistency.

This patch splits the IP_LOOKUP_NEXT into separate enums for IP4 and
IP6 with a common part for next-nodes used by both. It sets up other
IP nodes as siblings to avoid inconsistencies. This allows IP4 and IP6
lookup next nodes to evolve independently. The adj->lookup_next_index is
still shared, assuming that an IP4 adjacency isn't used by an
IP6 graph node.

Change-Id: I589b8364fe54e7a10c059b7ef9d6707eb0a345cc
Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-16 18:05:51 +00:00
81f7092d34 Fix hugepage leak on VM termination
When VM is terminated, the hugepages mapped
    should be unmapped so that the system does not
    run out of hugepage resources. Therefore, mapped
    pages are unmapped when VPP notices a disconnect.

Change-Id: I7398fb20028036738ab87db0b0e79609e95d69a4
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-16 15:11:51 +00:00
c0959c9c47 Fix vxlan-gpe interface state dump failure
Correspond to HONEYCOMB-84 VxLAN GPE - Wrong operational data.

Change-Id: Ia1b3c3b85e4b5435b0c690a4ce9ff93c65bfee5c
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-16 20:18:15 +08:00
445d6658d0 README file for vcgn
Change-Id: I6bd851e4b26f0b8d6f5826a19bded3af930cbc0e
Signed-off-by: Ranganathan T.S <rangan@cisco.com>
2016-06-15 23:06:55 +00:00
7deb139eac Delete useless field decap_next in tunnel
Field decap_next in vxlan-gpe tunnel is not needed.

Change-Id: I83cc42ca82274587a57e3c65711cf18ee8d692d3
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-15 19:40:33 +00:00
c2c9008444 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>
2016-06-15 19:25:13 +00:00
c86f3e5d2d 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>
2016-06-15 16:44:07 +00:00
2a34b9e1a6 VPP-137: VPP sends ARP with wrong requested IP
Change-Id: I01802f3dab04c940e65236ba6e680f1e504a0a5f
Signed-off-by: Neale <nranns@cisco.com>
2016-06-15 09:18:26 +00:00
820e363a8d 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>
2016-06-14 16:44:36 -07:00
0b14072b69 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>
2016-06-14 18:15:43 +00:00
d61b439358 Reset new indirect adjacdncy template before using it
Change-Id: Ia69ba39364d4dfa1403c8fbb77b7990226bbcb85
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14 17:38:33 +00:00
964f93e59f 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>
2016-06-14 17:10:53 +00:00
07929f2612 gitignore change due to DPDK download suffix change
Change-Id: Idc86d3435e742f3cb96cb9eb1d85b0fdc6a40fc5
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-14 16:58:58 +00:00
bf74147701 Retire io threads and main-thread-io mode
Change-Id: I64f5ec5e32f200834c63ec3b304f9f20cef332a7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14 16:36:27 +00:00
6c56a3c6f0 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>
2016-06-14 16:34:02 +00:00
1aa310fe3f Cleanup /dev/shm before starting VPP from top-level Makefile
Change-Id: I3a8b85ad033707552b9df7d0d08548517a8571ce
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14 13:35:58 +00:00
802255c908 Add sw_if_index to af_packet_create and various clean ups
Change-Id: I4c2972b55d5d99f3aa7a05885791eef47351c734
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-14 11:45:54 +00:00
24612b3fb8 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>
2016-06-15 01:22:22 +08:00
5a9c9b8bb5 Fix NULL-pointer crash in handoff_init(...)
Change-Id: If403f83b4e918e81e7b2e90dfca14960ad2c6aa6
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-13 18:17:23 -04:00
0247b46002 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>
2016-06-13 20:39:58 +00:00
c424879b4c Add vxlan-gpe tunnel to sw_interface_dump
Patchset 2: rebuild

Change-Id: I3375d6c9c7e18ab46896552614369b9d77ee6004
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-13 19:06:48 +00:00
86be48773c Explicity specify IP address type for format_ip46_address function
Change-Id: I3379517535a98a7a5fbd3173503f288a81378821
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-13 19:04:12 +02:00
a38c3df5fd 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 584b99a012)
2016-06-13 14:33:22 +00:00
51e332ab83 Fix next-protocol issue configured from Honeycomb
PatchSet 2: rebuild.

Change-Id: I18ee050629129871b44271f92a1e63b661d55c05
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-12 03:02:32 +00:00
b3ca6589eb 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>
2016-06-10 18:32:08 -04:00
902474657d Copy missing buffer metadata for ESP transport mode packets
Change-Id: I3f5113533b365366cc3f6ef87858e19879f703cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-10 20:42:44 +02:00
725c59cfc7 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>
2016-06-10 19:50:52 +05:30
c71c426f69 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>
2016-06-10 00:22:02 +00:00
96e1203e1b VPP-133: increase size of cli process stacks
Change-Id: Ic488b95b54438028940403b02a5916347c53bd05
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-09 20:37:56 +00:00
db7b269736 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>
2016-06-09 20:03:34 +00:00
a7e83ceeac 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>
2016-06-09 17:23:22 +00:00
0febaf15da 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>
2016-06-09 16:27:59 +00:00
3f3b085c8e VPP-106: fix performance hit due to unprefetched data read
Change-Id: I1325b60b6deadcb51631e178011a31ee70c06cc7
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-09 13:41:58 +00:00
55ef1b1f80 Fix DPDK init crash if bonded interface is created by startup conf
Change-Id: I4d7d4a56aba010aa868b1f4c2c4e8db0b4c21fd7
Signed-off-by: John Lo <loj@cisco.com>
2016-06-09 13:41:28 +00:00
7becd08c4b 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>
2016-06-09 02:41:57 +00:00
42bb61fd16 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>
2016-06-09 02:22:34 +00:00
b10427e060 VPP-127 Removed spurious use of sudo
Change-Id: I1eb18fc6379db30fb802e3b929931788f54e7dc2
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-06-09 01:38:02 +00:00
f9618ee484 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>
2016-06-09 00:45:14 +00:00
bbb7682790 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>
2016-06-09 00:44:11 +00:00
ec6290a8a5 VPP-127: Make rpm/deb provide vpp group to access vpp-api
Change-Id: I80b7f55034d64ad8360e29c669002948317c64ba
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-06-08 18:12:37 -05:00
40c6639428 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>
2016-06-08 14:41:40 -05:00
2f0a7a880c Increase jvpp connection timeout
Change-Id: I4d52c113336deac80dfcbad91b21a7a70eea2213
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-06-08 11:40:32 +00:00
599839d12d 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>
2016-06-07 18:28:51 -04:00
c883fa7cdb Fix missing null termination in DPDK EAL Args
Change-Id: I8292628ad359a19e02ff79568d773ad2b1af51ec
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-07 21:50:37 +02:00
b54db102ac 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>
2016-06-07 19:29:28 +00:00
19414deeaa Rebase DPDK patches
Change-Id: I3ef9faceb085bd06b55e3ba7800389eaae56177a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-07 16:34:44 +00:00
3ef822e1c3 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>
2016-06-07 09:14:07 -04:00
30097b5d22 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>
2016-06-07 11:30:34 +00:00
97d99518d7 Add u32[] type handling in reply messages to jvpp
Change-Id: I9fd0cd49e4636d5d8978567fa914487785035c8a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-06-07 11:28:58 +00:00
cccd1bfdd0 Fix link down issue of vxlan-gpe interface
Change-Id: Iaf72e7ffb2d30799733f641d66bbc74f40a4d6e1
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-07 11:28:22 +00:00
944f548d10 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>
2016-06-07 11:22:29 +00:00
6f91cfe4aa ONE-18: Fix trailing garbage string in LISP status dump API
Change-Id: I5cba5eae5a981e41df3f227834a079e10982537f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-06-07 11:10:10 +00:00
39da6211a3 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>
2016-06-06 13:29:30 +02:00
3535222f97 VPP-94: Add build-data directory for plugins and Makefile target
Commit e36af5f315 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>
2016-06-05 13:56:19 +00:00
431cd2f150 VPP-112: linux kernel info missing from build log
Change-Id: I343418d409d682b00e74e41236382fdc6b3c780c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2016-06-05 13:49:40 +00:00
7185c3bb68 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>
2016-06-05 13:48:31 +00:00
c68b4cbf3a 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>
2016-06-05 13:46:05 +00:00
96e10b554f 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>
2016-06-05 08:45:40 +00:00
08602d129b 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>
2016-06-04 14:11:15 -04:00
0128e59938 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>
2016-06-04 00:53:44 +00:00
2b54e996d4 Sample plugin moved to .../plugins/sample-plugin
Change-Id: I6de20c9883d6918899c4b5b03e900814961e824d
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-03 15:27:27 -04:00
227fe26987 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>
2016-06-03 00:30:09 +00:00
4b8b718ff9 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>
2016-06-02 20:58:38 +00:00
4cd850e7b2 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>
2016-06-02 20:46:12 +00:00
e544360053 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>
2016-06-02 11:28:59 -04:00
3419d0b9c1 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>
2016-06-02 14:16:05 +00:00
079d86e8c8 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>
2016-06-01 23:51:25 +00:00
16c75df797 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>
2016-06-01 20:05:08 +00:00
c79491571f 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>
2016-06-01 19:55:56 +00:00
9d6c0ab311 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>
2016-06-01 10:26:16 +02:00
750c62548e Fix build-root/scripts/version to not have spurious ~
Change-Id: Id28f134e3a4aa19c5756014d53004501db0d0c88
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-05-31 21:46:45 +00:00
34e7772443 Fix u16 type handling in jvpp
Change-Id: I6e5ed2562c65dde6c9f6f085c8b9d40f80684894
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-05-31 21:19:07 +00:00
cb51846ae0 VPP-102: vHost reconnect to previously used sockets on VPP restart
Change-Id: Ida11bddb52268e0e8513b7b379eeed6103bd48f1
Signed-off-by: John Lo <loj@cisco.com>
2016-05-31 21:06:13 +00:00
17f17cb44f 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>
2016-05-31 20:28:40 +00:00
1d3b2abc2c 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>
2016-05-31 19:38:50 +00:00
58f886ab9a Add CLI/API for clearing all remote mappings
Change-Id: I5aef12d3a9c8daefff52e5f958c504f5d2ff9fd0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-31 18:50:39 +00:00
6a2e4392e9 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>
2016-05-31 14:48:22 +02:00
d1c5cc3930 ONE-16: Locators are not properly cleaned
Change-Id: Ia6eaaa9a741e84cbd0ff957cfd9a7143a3d0a977
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-31 11:19:39 +00:00
0e06e2b142 Add Dump API for VxLAN-GPE tunnel
Change-Id: I4913fe6c4b1280939147887896aea9b79a9f7f10
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-05-30 03:31:13 +00:00
4b46c84901 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>
2016-05-28 16:34:39 +00:00
1220afe52a 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>
2016-05-28 15:47:11 +00:00
473ec878f9 Fix VxLAN-GPE add_del API issue
Change-Id: I4210b3320d3fe841ba7ff1349b6a52affc047338
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-05-29 01:27:14 +08:00
404be66978 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>
2016-05-27 12:13:51 -04:00
68c69d8967 Fix dpdk march/mtune defaults
Change-Id: I6e6940c8467a331b37da153bb8a2154c1d165261
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-27 10:17:45 +02:00
f747cd8b9b Add show command for LISP map resolvers
Change-Id: I3ed6269f9a307b50b56ce04defc2576a139c6add
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-26 16:47:11 +02:00
64ae669038 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>
2016-05-25 18:45:07 +02:00
94e34764b4 ONE-14: Fix crash when re-enable Lisp
Change-Id: Ib95338d7055dea9036eddb7dff5ca7ccbcb35639
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-05-25 13:34:53 +02:00
df921cc65a 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>
2016-05-25 10:42:43 +00:00
c4cb44c05d VPP-86: fix array copy in generated JNI code
Change-Id: Ic67b3c0623d98c5ee3f1ffa1e1bd9cfb96b233bd
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-05-24 15:44:28 +00:00
4a71314e0b Fix an issue in format_vxlan_gpe_tunnel
Change-Id: Ib283c75505b787f715e34f5b325dda8a6c2fa125
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-05-24 02:54:10 +08:00
b4d8927ac3 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>
2016-05-23 22:22:39 +00:00
e3eefff5b3 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>
2016-05-23 21:16:45 +00:00
e36af5f315 Create /plugins directory, move sample-plugin
Change-Id: Ia58923c7c98dc04c027c8c5879a4dc5f5b144b8a
Signed-off-by: Dave Barach <dave@barachs.net>
2016-05-23 11:02:11 -04:00
78ea9c2869 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>
2016-05-23 14:46:13 +00:00
53f09e36f9 Add LISP RTR support
Change-Id: I8a3770f8f1cd1fde6765b81d35aacaaf4ff98b82
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-23 09:15:39 +02:00
071d610dc4 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>
2016-05-23 06:25:05 +00:00
6931f59e54 Add per-thread, per-node runtime stats serialization
Change-Id: Ic4009cdbac67b7cd53c88079439496b9d9dfaa35
Signed-off-by: Dave Barach <dave@barachs.net>
2016-05-21 10:04:06 -04:00
6f7b992f56 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>
2016-05-20 14:44:10 -04:00
b635c567d1 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>
2016-05-20 17:46:12 +00:00
d686c632d1 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>
2016-05-20 12:15:30 -04:00
e855480acd Add policer dump API
JIRA: VPP-67

Change-Id: I8fced60a884f1585b1f51002832d47631eea9571
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-05-20 01:15:32 -07:00
270b6dee8c 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>
2016-05-19 14:35:03 -04:00
fd9014a184 Remove unused PCI code
Change-Id: I1d91c9982823758059f9d6aa699982253930e7ba
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-19 17:57:01 +00:00
1c80e831b7 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>
2016-05-19 18:14:38 +02:00
82e29c4558 Add netmap API
JIRA: VPP-66

Change-Id: I421529fa8eafe5268745a34a4fcd40156defcdf8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-05-18 17:14:46 +00:00
5a206eafdb Rework of the old PCI code
* adds support for VPP native PCI drivers using
   standard uio_pci_generic kernel driver
 * adds generic PCI interrupt callback
 * splits code to generic PCI handling and linux specific
 * adds new debug cli 'show pci [all]'

Change-Id: I447c2285e319e9725d70688c1b70c9dedda51fdc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-18 13:13:27 +00:00
a2a48305df Set java artifact versions to 16.09 for master
The nature of Java artifact versioning is different
that rpm/apt versioning in that artifacts are
traditionally numbered:

${NEXT_RELEASE_NUMBER)-SNAPSHOT

This patch sets ${NEXT_RELEASE_NUMBER) correctly for master.

Change-Id: Iab34c26c7440d5e04d6d05f46598832e9adf6920
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-05-17 23:57:07 +00:00
737547efc3 dpdk/Makefile - Allow dpdk target to be set according to the platform
Allows DPDK parameters to be overriden from the platform
definition.

$(PLATFORM)_dpdk_arch = "armv7a"
$(PLATFORM)_dpdk_target = "arm-armv7a-linuxapp-gcc"
$(PLATFORM)_dpdk_make_extra_args = "CONFIG_RTE_EAL_IGB_UIO=y"

Change-Id: I8c0f233942744cb82ca3ed2d65e33acee845cb4e
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-05-17 19:39:25 +00:00
95c8415531 dpdk/build - 32bits compilation
In vnet/vnet/devices/dpdk/device.c, post 2 event data instead of
merging them into 1 u64.

Change-Id: I8b1d61b894279fb6eb57bb82a05affc14360e6b8
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-05-17 19:24:17 +00:00
144a90f2e1 dpdk/init - Add compatibility to non numa architecture
On non numa aware platforms, the path "/sys/devices/system/node/node%u"
does not exist: the "free_hugepages" count is available in "/sys/kernel/mm/".

Change-Id: Id62018a2bd0937d267663699c620e89d02c26a72
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-05-17 19:15:15 +00:00
2df2e999fb Fix output feature issue where opque field is already used by previous node
Change-Id: I1470993668fa8c740229149bbb227bd1e410d5ab
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-17 18:34:09 +00:00
9341a1f850 vppinfra - ARM: cycle count 64bits register is only available on ARMv8
Change-Id: I7d622e591020a482af68667f4d1ed2056258d2c8
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-05-17 18:20:10 +00:00
862623da6e VPP-23 Re-work pager line collation
To better handle lines longer than the terminal width, re-work how
the pager collates lines. We still store each output line in a vector
or lines; additionally we index the start and end of displayable lines.

The index then becomes the data to work out what to display.

If the terminal is resized this index is rebuilt and the current page
redisplayed and an attempt made to keep the current top-of-screen line
in place.

Change-Id: Icc6f4f72dabad89682cd82be88adb03eadb7811d
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-16 21:37:00 +00:00
1349 changed files with 303108 additions and 122199 deletions

34
.gitignore vendored
View File

@ -1,4 +1,5 @@
*~
*.sw[op]
/build-root/.ccache
/build-root/build-*/
@ -8,12 +9,16 @@
/build-root/packages-vpp/
/build-root/path_setup
/build-root/build-config.mk
/build-root/deb/debian/vpp-plugins/
/build-root/*.deb
/build-root/*.rpm
/build-root/*.changes
/build-root/test-doc/
/build-root/test-cov/
/build-root/python/
/build-config.mk
/vpp-api/python/vpp_papi/vpp_papi.py
/dpdk/*.tar.gz
/dpdk/*.tar.xz
/path_setup
/tools/
# start autotools ignore
@ -49,7 +54,7 @@ test-driver
.settings
# stop autotools ignore
# OSX and some IDE
# OSX and some IDE
.DS_Store
.idea/
.project
@ -57,6 +62,29 @@ test-driver
# cscope and ctags
/cscope.*
/tags
ID
TAGS
# ggtags
GPATH
GRTAGS
GTAGS
# Generated documentation
/build-root/docs
/build-root/.doxygen-bootstrap.ok
/build-root/.doxygen-siphon.dep
# indent backup files
*.BAK
# Python bytecode
*.pyc
# Python api generator
/vpp-api/python/build
/vpp-api/python/dist
/vpp-api/python/vpp_papi.egg-info
/vpp-api/python/vpp_papi/memclnt.py
/vpp-api/python/vpp_papi/vpe.py
# Build files in the test directory
/test/*.ok

View File

@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/1701

200
Makefile

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
Vector Packet Processing
========================
## Introduction.
## Introduction
The VPP platform is an extensible framework that provides out-of-the-box
production quality switch/router functionality. It is the open source version
@ -16,7 +16,13 @@ For more information on VPP and its features please visit the
[What is VPP?](https://wiki.fd.io/view/VPP/What_is_VPP%3F) pages.
## Directory layout.
## Changes
Details of the changes leading up to this version of VPP can be found under
@ref release_notes.
## Directory layout
Directory name | Description
---------------------- | -------------------------------------------
@ -25,9 +31,8 @@ Directory name | Description
doxygen | Documentation generator configuration
dpdk | DPDK patches and build infrastructure
g2 | Event log visualization tool
gmod | perf related?
perftool | Performance tool
sample-plugin | A sample plugin
@ref plugins | VPP bundled plugins directory
@ref svm | Shared virtual memory allocation library
test | Unit tests
@ref vlib | VPP application library source
@ -43,7 +48,7 @@ Directory name | Description
ignore any @@ref labels in the above table.)
## Getting started.
## Getting started
In general anyone interested in building, developing or running VPP should
consult the [VPP wiki](https://wiki.fd.io/view/VPP) for more complete
@ -57,7 +62,7 @@ coverage of the topic.
For the impatient, some salient information is distilled below.
### Quick-start: On an existing Linux host.
### Quick-start: On an existing Linux host
To install system dependencies, build VPP and then install it, simply run the
build script. This should be performed a non-privileged user with `sudo`
@ -73,7 +78,7 @@ interest. To see the available targets run:
make
### Quick-start: Vagrant.
### Quick-start: Vagrant
The directory `build-root/vagrant` contains a `VagrantFile` and supporting
scripts to bootstrap a working VPP inside a Vagrant-managed Virtual Machine.
@ -88,7 +93,10 @@ for this can be found [on the Setting up Vagrant wiki page]
(https://wiki.fd.io/view/DEV/Setting_Up_Vagrant).
## More information.
## More information
Several modules provide documentation, see @subpage user_doc for more
information.
Visit the [VPP wiki](https://wiki.fd.io/view/VPP) for details on more
advanced building strategies and development notes.

280
RELEASE.md Normal file
View File

@ -0,0 +1,280 @@
# Release Notes {#release_notes}
* @subpage release_notes_17011
* @subpage release_notes_1701
* @subpage release_notes_1609
* @subpage release_notes_1606
@page release_notes_17011 Release notes for VPP 17.01.1
This is bug fix release.
For the full list of fixed issues please reffer to:
- fd.io [JIRA](https://jira.fd.io)
- git [commit log](https://git.fd.io/vpp/log/?h=stable/1701)
@page release_notes_1701 Release notes for VPP 17.01
@note This release was for a while known as 16.12.
## Features
- [Integrated November 2016 DPDK release](http://www.dpdk.org/doc/guides/rel_notes/release_16_11.html)
- Complete rework of Forwarding Information Base (FIB)
- Performance Improvements
- Improvements in DPDK input and output nodes
- Improvements in L2 path
- Improvmeents in IPv4 lookup node
- Feature Arcs Improvements
- Consolidation of the code
- New feature arcs
- device-input
- interface-output
- DPDK Cryptodev Support
- Software and Hardware Crypto Support
- DPDK HQoS support
- Simple Port Analyzer (SPAN)
- Bidirectional Forwarding Detection
- Basic implementation
- IPFIX Improvements
- L2 GRE over IPSec tunnels
- Link Layer Discovery Protocol (LLDP)
- Vhost-user Improvements
- Performance Improvements
- Multiqueue
- Reconnect
- LISP Enhancements
- Source/Dest control plane support
- L2 over LISP and GRE
- Map-Register/Map-Notify/RLOC-probing support
- L2 API improvements, overall code hardening
- Plugins:
- New: ACL
- New: Flow per Packet
- Improved: SNAT
- Mutlithreading
- Flow export
- Doxygen Enhancements
- Luajit API bindings
- API Refactoring
- file split
- message signatures
- Python and Scapy based unit testing infrastructure
- Infrastructure
- Various tests
- Packet Generator improvements
- TUN/TAP jumbo frames support
- Other various bug fixes and improvements
## Known issues
For the full list of issues please reffer to fd.io [JIRA](https://jira.fd.io).
## Issues fixed
For the full list of fixed issues please reffer to:
- fd.io [JIRA](https://jira.fd.io)
- git [commit log](https://git.fd.io/vpp/log/?h=stable/1701)
@page release_notes_1609 Release notes for VPP 16.09
## Features
- [Integrated July 2016 DPDK release](http://www.dpdk.org/doc/guides/rel_notes/release_16_07.html)
- DPDK-vhost is depreciated pending a complete rework of the original integration and
addressing of rx performance deltas.
- Patches required for DPDK 16.07:
- Correctly setting the Packet Type in the IGB, IXGBE and i40e drivers.
- Correctly setting checksum in the i40e driver.
- NXP DPAA2 PMD Driver.
- rte_delay (yield) functionality.
- Add “in tree” plugins:
- IPv6 ILA.
- iOAM.
- Load Balancer.
- SNAT.
- High-performance (line-rate) “neutron like” L4 port-filtering.
- API refactoring - addressing some of the issues around JVPP bindings.
- Accommodating plugins [(e.g. NSH_SFC)](https://wiki.fd.io/view/NSH_SFC)
- Binding for [python](https://wiki.fd.io/view/VPP/Python_API)
- LISP
- L2 LISP overlays
- Multitenancy
- Multihoming
- RTR mode
- Map-resolver failover algorithm
- Support 64-bit vector lengths, huge shared-memory segments.
- Dynamic IP Feature ordering
- IP Features can now specify features they appear before and after
- 16.09 Builds
- Ubuntu 14.04 LTS - Trusty Tahr
- Ubuntu 16.04 LTS - Xenial Xerus
- CentOS 7
- More information on [VPP wiki](https://wiki.fd.io/view/VPP/Installing_VPP_binaries_from_packages)
- Performance, characterize and document performance for this release
[(more information on CSIT page)](https://wiki.fd.io/view/CSIT)
- IPv4 and IPv6 Scale - performance tests.
- Bidirectional 10k/100k/1M flows.
- 64B,570B, 1518B,9000B packet sizes.
- IPv6 iACL - performance
- DUT1 and DUT2 are configured with IPv6 routing, two static IPv6 /64 routes and IPv6 iAcl
security whitelist ingress /64 filter entries applied on links.
- TG traffic profile contains two L3 flow-groups (flow-group per direction, 253 flows per
flow-group) with all packets containing Ethernet header, IPv6 header and generated payload.
MAC addresses are matching MAC addresses of the TG node interfaces.
- L2XC VXLANoIPv4 - performance
- DUT1 and DUT2 are configured with L2 cross-connect. VXLAN tunnels are configured between
L2XCs on DUT1 and DUT2.
- TG traffic profile contains two L3 flow-groups (flow-group per direction, 253 flows per
flow-group) with all packets containing Ethernet header, IPv4 header with IP protocol=61
and generated payload. MAC addresses are matching MAC addresses of the TG node interfaces.
- Documentation
- Autogenerated CLI documentation.
- Using doxygen to automate API/Node documentation.
- [(available online)](https://docs.fd.io/vpp/16.09/)
- Resolved all static analysis issues found by Coverity
- Beginning of 16.09 cycle: 505 issues.
- Release: 0 outstanding issues.
## Known issues
Issues in fd.io are tracked in [JIRA](https://jira.fd.io).
Issue | Description
--- | ---
VPP-391 | vpp debug version assert appeared in the process of start
VPP-380 | Mapping algorithm compute wrong ea-bits when IPv4 prefix 0.0.0.0/0
VPP-371 | load_one_plugin:63: Loaded plugin: message from vppctl
VPP-367 | vpp packages need to depend on specific versions of each other
VPP-312 | IP6 FIB gets in indeterminate state by duplicating commands
VPP-224 | Lookup-in-vrf can not be set correctly
VPP-206 | Fix classify table delete
VPP-203 | Fix binary API for reading vpp node graph
VPP-147 | Inconsistent behaviour when adding L2 FIB filter entry
VPP-99 | VPP doesn't discard DHCPOFFER message with wrong XID
## Issues fixed
Issues in fd.io are tracked in [JIRA](https://jira.fd.io).
Issue | Description
--- | ---
VPP-396 | Ubuntu systems Graphviz bug
VPP-390 | vpp-lib rpm fails to include *.so symlinks, causing linking problems with out of tree builds
VPP-388 | IPSec output feature assumes packets have been ethernet rewritten
VPP-385 | ARP for indirect adjacencies not working correctly
VPP-361 | Memory leak on delete of VXLAN over IPv6 tunnel
VPP-357 | VNI not set correctly when removing LISP fwd entries
VPP-349 | sw_interface_vhost_user_dump not working
VPP-345 | net/enic: bad L4 checksum ptype set on ICMP packets
VPP-340 | MAP-T wrong destination address
VPP-330 | Use fifo to store LISP pending map-requests
VPP-326 | map_add_domain VAT command: unable to configure domain with mtu parameter
VPP-318 | The map_add_domain VAT command accepts invalid arguments
VPP-315 | Fix "show vxlan-gpe" issue
VPP-310 | Mapping algorithm compute wrong ea-bits
VPP-239 | LISP IP forwarding does not tag packets that hit negative mapping entries
VPP-235 | Invalid help in VAT for sw_interface_set_l2_bridge
VPP-228 | Mapping algorithm sends packet to wrong IPv6 address
VPP-214 | vpp-api-test: api_ipsec_sad_add_del_entry: vector "ck" not initialized
VPP-200 | VPP - TAP port create problem
VPP-189 | Coverity Issues for 16.09
VPP-184 | u16 translating to char ,not short
VPP-179 | Adjacency share-count botch
VPP-163 | "show ip6 interface" ignores non-global addresses
VPP-155 | Netmap: Inconsistency in interface state between "show hardware" and "show interface"
VPP-145 | Dynamically compute IP feature ordering based on constraints
VPP-137 | VPP sends ARP with wrong requested IP
VPP-118 | JVpp: 0 length arrays not handled properly in VPP responses
VPP-112 | linux kernel info missing from build log
VPP-110 | vxlan encap node should never touch a deleted tunnel
VPP-107 | RPM build broken in master
VPP-92 | segment routing is not properly filling out the segment list
VPP-91 | segment routing add/del tunnel lookup doesn't work
VPP-84 | af_packet throws a fatal error on EAGAIN
VPP-74 | Clang compile fails due to warning in vlib/unix/cli.c
VPP-64 | Top level "make pkg-deb" fails if CDPATH is set in user env.
VPP-48 | Traceroute does not terminate when VPP is the target
VPP-23 | CLI pager does not gracefully handle lines longer than the terminal width
@page release_notes_1606 Release notes for VPP 16.06
The FD.io Project, relentlessly focused on data IO speed and efficiency
supporting the creation of high performance, flexible, and scalable software
defined infrastructures, announces the availability of the communitys first
software release (16.06).
In the four months since launching, FD.io has brought together more than 75
developers from 11 different companies including network operators, solution
providers chip vendors, and network equipment vendors who are collaborating to
enhance and innovate around the Vector Packet Processing (VPP) technology. The
FD.io community has quickly formed to grow the number of projects from the
initial VPP project to an additional 6 projects addressing a diverse set of
requirements and usability across a variety of deployment environments.
The 16.06 release brings unprecedented performance: 480Gbps/200mpps with 8
million routes and 2k whitelist entries on standard high volume x86 servers.
## Features
In addition to the existing full suite of vswitch/vrouter features, the new
16.06 release adds:
* Enhanced Switching and Routing:
* IPv6 Segment Routing multicast support.
* LISP xTR support.
* VXLAN over IPv6 underlay.
* Per interface whitelists.
* Shared adjacencies in FIB.
* New and improved interface support:
* Jumbo frame support for vhost-user.
* Netmap interface support.
* AF_Packet interface support.
* Expanded and improved programmability:
* Python API bindings.
* Enhanced JVPP Java API bindings.
* Debugging CLI.
* Expanded Hardware and Software Support:
* Support for ARM 32 targets including Rasberry Pi single-board computer.
* Support for DPDK 16.04.

View File

@ -4,6 +4,11 @@ ifeq ($(DPDK_MARCH),)
DPDK_MARCH="native"
endif
DPDK_TUNE = $(strip $($(PLATFORM)_mtune))
ifeq ($(DPDK_TUNE),)
DPDK_TUNE="generic"
endif
ifneq (,$(findstring debug,$(TAG)))
DPDK_DEBUG=y
else
@ -14,8 +19,23 @@ DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \
DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \
DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
DPDK_MARCH=$(DPDK_MARCH) \
DPDK_TUNE=$(DPDK_TUNE) \
DPDK_DEBUG=$(DPDK_DEBUG)
DPDK_CRYPTO_PMD=$(strip $($(PLATFORM)_uses_dpdk_cryptodev))
ifneq ($(DPDK_CRYPTO_PMD),)
DPDK_MAKE_ARGS += DPDK_CRYPTO_PMD=y
endif
DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target))
ifneq ($(DPDK_PLATFORM_TARGET),)
DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET)
endif
DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args))
ifneq ($(DPDK_MAKE_EXTRA_ARGS),)
DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)"
endif
dpdk_configure = echo

View File

@ -0,0 +1,45 @@
plugins_configure_depend = \
vppinfra-install \
vlib-api-install \
vpp-api-test-install \
vnet-install \
vlib-install \
vpp-api-install
plugins_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
vlib \
vnet \
svm \
vpp-api-test \
vlib-api \
vpp-api)
plugins_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
vlib \
vlib-api)
ifeq ($($(PLATFORM)_enable_tests),yes)
plugins_configure_args += --enable-tests
endif
# Platform dependent configure flags
plugins_configure_args += $(plugins_configure_args_$(PLATFORM))
# include & link with openssl only if needed
ifneq ($($(PLATFORM)_uses_openssl),no)
plugins_CPPFLAGS += $(call installed_includes_fn, openssl)
plugins_LDFLAGS += $(call installed_libs_fn, openssl)
endif
ifneq ($($(PLATFORM)_uses_dpdk),no)
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
plugins_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
plugins_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
plugins_configure_depend += dpdk-install
plugins_CPPFLAGS += $(call installed_includes_fn, dpdk)
plugins_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
endif

View File

@ -1,47 +0,0 @@
sample-plugin_configure_depend = \
vppinfra-install \
svm-install \
vlib-api-install \
vlib-install \
vnet-install \
vpp-install \
vpp-api-test-install
sample-plugin_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
openssl \
svm \
vlib \
vlib-api \
vnet \
vpp \
vpp-api-test)
sample-plugin_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
openssl \
svm \
vlib \
vlib-api \
vnet \
vpp \
vpp-api-test)
sample-plugin_post_install = \
mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins ; \
cp $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/*.so \
$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins
sample-plugin_image_include = echo $(arch_lib_dir)/vlib_plugins
ifneq ($($(PLATFORM)_uses_dpdk),no)
sample-plugin_configure_args = --with-dpdk
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
sample-plugin_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
sample-plugin_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
sample-plugin_configure_depend += dpdk-install
sample-plugin_CPPFLAGS += $(call installed_includes_fn, dpdk)
sample-plugin_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
endif

View File

@ -38,4 +38,7 @@ vnet_configure_depend += dpdk-install
vnet_CPPFLAGS += $(call installed_includes_fn, dpdk)
vnet_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes)
vnet_configure_args += --with-dpdk-crypto
endif
endif

View File

@ -33,3 +33,7 @@ vpp-api-test_CPPFLAGS += $(call installed_includes_fn, dpdk)
vpp-api-test_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
endif
ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes)
vpp-api-test_configure_args += --with-dpdk-crypto
endif

View File

@ -45,4 +45,7 @@ vpp_configure_depend += dpdk-install
vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)
vpp_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes)
vpp_configure_args += --with-dpdk-crypto
endif
endif

View File

@ -28,16 +28,33 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
| sed -e 's:.*:../& /usr/bin:' \
> deb/debian/vpp.install ; \
\
: core api definitions ; \
./scripts/find-api-core-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp.install ; \
\
: need symbolic links in the lib pkg ; \
find $(INSTALL_PREFIX)$(ARCH)/*/lib* \( -type f -o -type l \) \
-print | egrep -e '*\.so\.*\.*\.*' \
| grep -v plugins\/ \
| sed -e 's:.*:../& /usr/lib/x86_64-linux-gnu:' \
> deb/debian/vpp-lib.install ; \
\
: vnet api definitions ; \
./scripts/find-api-lib-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-lib.install ; \
\
: dev package ; \
./scripts/find-dev-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-dev.install ; \
\
: plugins package ; \
./scripts/find-plugins-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-plugins.install ; \
\
: python-api package ; \
./scripts/find-python-api-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-python-api.install ; \
\
: dpdk headers ; \
./scripts/find-dpdk-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-dpdk-dev.install ; \
@ -51,8 +68,14 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
>> deb/debian/vpp.install ; \
\
: dev package needs a couple of additions ; \
echo ../build-tool-native/vppapigen/vppapigen /usr/bin \
>> deb/debian/vpp-dev.install ; \
echo ../build-tool-native/vppapigen/vppapigen /usr/bin \
>> deb/debian/vpp-dev.install ; \
echo ../../vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
>> deb/debian/vpp-dev.install ; \
for i in $$(ls ../vpp-api/java/jvpp/gen/jvppgen/*.py); do \
echo ../$${i} /usr/lib/python2.7/dist-packages/jvppgen \
>> deb/debian/vpp-dev.install; \
done; \
\
: generate changelog; \
./scripts/generate-deb-changelog \
@ -72,6 +95,11 @@ install-rpm: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
$(ROOT_PACKAGES)) || exit 1; \
\
cd rpm ; \
rpmbuild -bb --define "_topdir $$PWD" vpp.spec ; \
mkdir -p SOURCES ; \
if test -f *.tar.gz ; then mv *.tar.gz SOURCES ; fi ; \
rpmbuild -bb --define "_topdir $$PWD" --define \
"_install_dir $(INSTALL_PREFIX)$(ARCH)" \
--define "_mu_build_root_dir $(MU_BUILD_ROOT_DIR)" \
vpp.spec ; \
mv $$(find RPMS -name \*.rpm -type f) ..

View File

@ -15,16 +15,24 @@
arm32_arch = native
arm32_native_tools = vppapigen
arm32_uses_dpdk = no
arm32_uses_dpdk = yes
arm32_uses_openssl = no
arm32_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
vpp-japi gmod
jvpp gmod
vlib_configure_args_arm32 = --with-pre-data=128
vnet_configure_args_arm32 = --with-dpdk --without-ipsec --without-ipv6sr
vpp_configure_args_arm32 = --with-dpdk --without-ipsec --without-ipv6sr
arm32_dpdk_arch = "armv7a"
arm32_dpdk_target = "arm-armv7a-linuxapp-gcc"
arm32_dpdk_make_extra_args = "CPU_CFLAGS='-mfloat-abi=hard' \
CONFIG_RTE_EAL_IGB_UIO=y \
CONFIG_RTE_LIBRTE_E1000_PMD=y \
CONFIG_RTE_MAX_LCORE=4 \
CONFIG_RTE_MAX_NUMA_NODES=1"
vnet_configure_args_arm32 = --without-vcgn --without-ipsec --without-ipv6sr
vpp_configure_args_arm32 = --without-vcgn --without-ipsec --without-ipv6sr
arm32_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector-all -fPIC -Werror

View File

@ -0,0 +1,66 @@
# Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Configuration for NXP DPAA2 ARM64 based platform
dpaa2_arch = aarch64
dpaa2_os = linux-gnu
dpaa2_target = aarch64-linux-gnu
dpaa2_mtune = cortex-A57
dpaa2_march = "armv8-a+fp+simd+crc+crypto"
dpaa2_cross_ldflags = \
-Wl,--dynamic-linker=/lib/ld-linux-aarch64.so.1 \
-Wl,-rpath=/usr/lib64
dpaa2_native_tools = vppapigen
dpaa2_root_packages = vpp vlib vlib-api vnet svm vpp-api-test
# DPDK configuration parameters
dpaa2_uses_dpdk = yes
# Compile with external DPDK only if "DPDK_PATH" variable is defined where we have
# installed DPDK libraries and headers.
ifeq ($(PLATFORM),dpaa2)
ifneq ($(DPDK_PATH),)
dpaa2_uses_dpdk = yes
dpaa2_uses_external_dpdk = yes
dpaa2_dpdk_inc_dir = $(DPDK_PATH)/include/dpdk
dpaa2_dpdk_lib_dir = $(DPDK_PATH)/lib
else
# compile using internal DPDK + NXP DPAA2 Driver patch
dpaa2_dpdk_arch = "armv8a"
dpaa2_dpdk_target = "arm64-dpaa2-linuxapp-gcc"
dpaa2_dpdk_make_extra_args = "CROSS=$(dpaa2_target)- DPDK_PKTMBUF_HEADROOM=256"
endif
endif
vpp_configure_args_dpaa2 = --with-dpdk --without-ipsec \
--without-ipv6sr --with-sysroot=$(SYSROOT)
vnet_configure_args_dpaa2 = --with-dpdk --without-ipsec \
--without-ipv6sr --with-sysroot=$(SYSROOT)
# Set these parameters carefully. The vlib_buffer_t is 256 bytes, i.e.
vlib_configure_args_dpaa2 = --with-pre-data=256
dpaa2_debug_TAG_CFLAGS = -g -O2 -DCLIB_DEBUG -fPIC -fstack-protector-all \
-march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
dpaa2_debug_TAG_LDFLAGS = -g -O2 -DCLIB_DEBUG -fstack-protector-all \
-march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
# Use -rdynamic is for stack tracing, O0 for debugging....default is O2
# Use -DCLIB_LOG2_CACHE_LINE_BYTES to change cache line size
dpaa2_TAG_CFLAGS = -g -O2 -fPIC -march=$(MARCH) -mcpu=$(dpaa2_mtune) \
-mtune=$(dpaa2_mtune) -funroll-all-loops -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
dpaa2_TAG_LDFLAGS = -g -O2 -fPIC -march=$(MARCH) -mcpu=$(dpaa2_mtune) \
-mtune=$(dpaa2_mtune) -funroll-all-loops -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6

View File

@ -11,10 +11,10 @@ qppc_root_packages = vppinfra vlib vlib-api vnet svm \
vpp vpp-api-test
vnet_configure_args_qppc = \
--without-ipsec --without-vcgn --without-ipv6sr
--without-ipsec --without-ipv6sr
vpp_configure_args_qppc = \
--without-ipsec --without-vcgn --without-ipv6sr
--without-ipsec --without-ipv6sr
vlib_configure_args_qppc = --with-pre-data=128

View File

@ -15,10 +15,10 @@ thunder_root_packages = vppinfra vlib-cavium-dpdk vnet-cavium-dpdk cavium-dpdk \
vpp-cavium-dpdk vpp-api-test-cavium-dpdk
vnet-cavium-dpdk_configure_args_thunder = \
--with-dpdk --without-ipsec --without-vcgn --without-ipv6sr
--with-dpdk --without-ipsec --without-ipv6sr
vpp-cavium-dpdk_configure_args_thunder = \
--with-dpdk --without-ipsec --without-vcgn --without-ipv6sr
--with-dpdk --without-ipsec --without-ipv6sr
cavium-dpdk_configure_args_thunder = --with-headroom=256

View File

@ -1,42 +0,0 @@
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# vector packet processor
virl_arch = native
virl_native_tools = vppapigen
virl_uses_dpdk = yes
virl_root_packages = vpp vlib vlib-api vnet svm dpdk vpp-api-test \
vpp-api
vpp_configure_args_virl = --with-dpdk
vnet_configure_args_virl = --with-dpdk --with-virl
# Set these parameters carefully. The vlib_buffer_t is 128 bytes, i.e.
vlib_configure_args_virl = --with-pre-data=128
# Override default -march and CONFIG_RTE_MACHINE settings
# Otherwise, illgal instructions will result
virl_march=corei7
virl_dpdk_arch=corei7
virl_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
virl_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
virl_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector -fPIC
virl_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector -fPIC

View File

@ -13,6 +13,15 @@
# vector packet processor
vpp_arch = native
ifeq ($(shell uname -m),x86_64)
vpp_march = corei7 # Nehalem Instruction set
vpp_mtune = corei7-avx # Optimize for Sandy Bridge
vpp_dpdk_arch = corei7
else
vpp_march = native
vpp_mtune = generic
vpp_dpdk_arch = native
endif
vpp_native_tools = vppapigen
vpp_uses_dpdk = yes
@ -21,7 +30,7 @@ vpp_uses_dpdk = yes
# vpp_enable_tests = yes
vpp_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
vpp-api gmod
vpp-api gmod plugins
vpp_configure_args_vpp = --with-dpdk
vnet_configure_args_vpp = --with-dpdk
@ -29,7 +38,10 @@ vnet_configure_args_vpp = --with-dpdk
# Set these parameters carefully. The vlib_buffer_t is 128 bytes, i.e.
vlib_configure_args_vpp = --with-pre-data=128
plugins_configure_args_vpp = --with-dpdk
# DPDK configuration parameters
# vpp_uses_dpdk_cryptodev = yes
# vpp_uses_external_dpdk = yes
# vpp_dpdk_inc_dir = /usr/include/dpdk
# vpp_dpdk_lib_dir = /usr/lib
@ -40,9 +52,14 @@ vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC -Werror
vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror
vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror
vpp_clang_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror
vpp_clang_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror
vpp_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \

View File

@ -13,24 +13,39 @@
# vector packet processor
vpp_lite_arch = native
ifeq ($(shell uname -m),x86_64)
vpp_lite_march = corei7 # Nehalem Instruction set
vpp_lite_mtune = corei7-avx # Optimize for Sandy Bridge
else
vpp_lite_march = native
vpp_lite_mtune = generic
endif
vpp_lite_native_tools = vppapigen
vpp_lite_uses_dpdk = no
# Uncoment to enable building unit tests
#vpp_lite_enable_tests = yes
vpp_lite_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
vpp-api gmod
vlib_configure_args_vpp_lite = --with-pre-data=128
vnet_configure_args_vpp_lite = --without-vcgn
vpp_configure_args_vpp_lite = --without-vcgn
vnet_configure_args_vpp_lite =
vpp_configure_args_vpp_lite =
vpp_lite_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC -Werror
vpp_lite_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC -Werror
vpp_lite_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
vpp_lite_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror
vpp_lite_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
vpp_lite_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror
vpp_lite_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
-fPIC -Werror -fprofile-arcs -ftest-coverage
vpp_lite_gcov_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
-fPIC -Werror -coverage

View File

@ -1,4 +1,4 @@
# Copyright (c) 2015 Cisco and/or its affiliates.
# Copyright (c) 2016 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@ -10,17 +10,18 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*** Settings ***
| Resource | resources/libraries/robot/default.robot
| Resource | resources/libraries/robot/interfaces.robot
| Test Setup | Setup all DUTs before test
*** Test Cases ***
| VPP reports interfaces
| | VPP reports interfaces on | ${nodes['DUT1']}
# Shared suffix rules
# Please do not set "SUFFIXES = .api.h .api" here
%.api.h: %.api
@echo " APIGEN " $@ ; \
mkdir -p `dirname $@` ; \
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
| vppapigen --input - --output $@ --show-name $@
| Loop the test
| | : FOR | ${INDEX} | in range | 10
| | | VPP reports interfaces on | ${nodes['DUT1']}
%.api.json: %.api
@echo " JSON APIGEN " $@ ; \
mkdir -p `dirname $@` ; \
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
| vppapigen --input - --json $@

View File

@ -220,6 +220,11 @@ else
endif
export MARCH
MTUNE = $(strip $($(PLATFORM)_mtune))
ifeq ($(MTUNE),)
MTUNE = generic
endif
######################################################################
# Generic build stuff
######################################################################
@ -1159,6 +1164,7 @@ distclean:
rm -rf $(MU_BUILD_ROOT_DIR)/*.deb
rm -rf $(MU_BUILD_ROOT_DIR)/*.rpm
rm -rf $(MU_BUILD_ROOT_DIR)/*.changes
rm -rf $(MU_BUILD_ROOT_DIR)/python
if [ -e /usr/bin/dh ];then (cd $(MU_BUILD_ROOT_DIR)/deb/;debian/rules clean); fi
rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/*.install
rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/*.dkms

View File

@ -11,3 +11,4 @@ vpp-dpdk-dev/
vpp-dpdk-dkms/
vpp-dbg/
vppctl/
vpp-python-api/

View File

@ -2,12 +2,12 @@ Source: vpp
Section: net
Priority: extra
Maintainer: Cisco OpenVPP Packaging Team <bogus.address@cisco.com>
Build-Depends: debhelper (>= 9), dkms, dh-systemd
Build-Depends: debhelper (>= 9), dkms, dh-systemd, chrpath
Standards-Version: 3.9.4
Package: vpp
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Depends: vpp-lib (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
Description: Vector Packet Processing--executables
This package provides VPP executables: vpp, vpp_api_test, vpp_json_test
vpp - the vector packet engine
@ -41,14 +41,28 @@ Description: Vector Packet Processing--runtime libraries
This package contains the VPP shared libraries, including:
.
vppinfra - foundation library supporting vectors, hashes, bitmaps, pools, and string formatting.
dpdk - Intel DPDK library
dpdk - DPDK library
svm - vm library
vlib - vector processing library
vlib-api - binary API library
vnet - network stack library
Package: vpp-plugins
Architecture: any
Depends: vpp (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: Vector Packet Processing--runtime plugins
This package contains VPP plugins
.
Package: vpp-dpdk-dkms
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: DPDK 2.1 igb_uio_driver
This package contains Linux kernel modules distributed with DPDK.
Package: vpp-python-api
Architecture: any
Depends: ${python:Depends}, ${misc:Depends}, vpp (= ${source:Version})
Description: VPP Python API bindings
This package contains VPP python api bindings
.

View File

@ -18,10 +18,11 @@ include /usr/share/dpkg/default.mk
# main packaging script based on dh7 syntax
%:
dh $@ --with dkms --with systemd
dh $@ --with dkms --with systemd,python2
override_dh_install:
dh_install --exclude .git
../scripts/remove-rpath .
override_dh_strip:
dh_strip --dbg-package=vpp-dbg

View File

@ -0,0 +1,5 @@
#!/bin/sh -e
# after installing python-api files
python2_sitedir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
easy_install --install-dir=$python2_sitedir -z $python2_sitedir/vpp_papi/vpp_papi-*.egg

View File

@ -0,0 +1,8 @@
#!/bin/sh -e
# before removing python-api files
python2_sitedir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
easy_install --install-dir=$python2_sitedir -mxNq vpp_papi
# the egg has been copied during install
rm $python2_sitedir/vpp_papi-*.egg

View File

@ -0,0 +1,21 @@
#!/bin/sh -e
removed=
# Unbind user-mode PCI drivers
pci_dirs=`find /sys/bus/pci/drivers -type d -name igb_uio -o -name uio_pci_generic -o -name vfio-pci`
for d in $pci_dirs; do
for f in ${d}/*; do
[ -e "${f}/config" ] || continue
echo 1 > ${f}/remove
basename `dirname ${f}` | xargs echo -n "Removing driver"; echo " for PCI ID" `basename ${f}`
removed=y
done
done
if [ -n "${removed}" ]; then
echo "There are changes in PCI drivers, rescaning"
echo 1 > /sys/bus/pci/rescan
else
echo "There weren't PCI devices binded"
fi

View File

@ -0,0 +1,4 @@
#!/bin/sh -e
# Add the vpp group
groupadd -f -r vpp

View File

@ -0,0 +1,162 @@
#!/usr/bin/emacs --script
;; Insert style boilerplate if it's not already there
;;
;; Breaking the string in half keeps emacs
;; from trying to interpret the local variable
;; settings e.g. when it reads the lisp source code
(defun insert-style-boilerplate () (interactive)
(save-excursion
(goto-char (point-min))
(if (eq nil (search-forward "coding-style-patch-verification"
(point-max) t))
(let ((junk 0)) (goto-char (point-max))
(insert "
/*
* fd.io coding-style-patch-verification: ON
*
* Local Var" "iables:
* eval: (c-set-style \"gnu\")
* End:
*/")))))
;; (cons xxx <list>) means insert xxx at the head of <list>
;; Build a sorted list of *INDENT-OFF* lines, by searching
;; backwards. The initial (setq indent-offset-list nil)
;; results in (cdr <last-cell>) nil, which makes it a proper list
(defun find-indent-offs () (interactive)
(save-excursion
(if (boundp 'indent-offset-list)
(makunbound 'indent-offset-list))
(setq indent-offset-list nil)
(goto-char (point-max))
(while (search-backward "*INDENT-OFF*" (point-min) t)
(move-beginning-of-line nil)
(setq indent-offset-list (cons (point) indent-offset-list))
(previous-line))))
;; Insert indent-off ... indent-on brackets around
;; a certain xxx_foreach macro, etc. which "indent"
;; completely screws up. Doesn't handle nesting, of which there
;; are few examples (fortunately).
(defun fix-initializer (what) (interactive)
(find-indent-offs)
(save-excursion
(goto-char (point-min))
(while (search-forward-regexp what (point-max) t)
(move-beginning-of-line nil)
(previous-line)
(let ((index 0)(pointval 0))
(while (and (< pointval (point))(elt indent-offset-list index))
(setq pointval (elt indent-offset-list index))
(setq index (1+ index)))
(if (not (eq pointval (point)))
(let ((junk 0))
(next-line)
(open-line 1)
(c-indent-line-or-region)
(insert "/* *INDENT-OFF* */")
(search-forward "{")
(backward-char)
(forward-sexp)
(move-end-of-line nil)
(newline 1)
(c-indent-line-or-region)
(insert "/* *INDENT-ON* */")
(find-indent-offs))
(search-forward "*INDENT-ON*"))))))
(defun fix-pool-foreach () (interactive)
(fix-initializer "pool_foreach *("))
(defun fix-pool-foreach-index () (interactive)
(fix-initializer "pool_foreach_index *("))
(defun fix-hash-foreach () (interactive)
(fix-initializer "hash_foreach *("))
(defun fix-hash-foreach-pair () (interactive)
(fix-initializer "hash_foreach_pair *("))
(defun fix-hash-foreach-mem () (interactive)
(fix-initializer "hash_foreach_mem *("))
(defun fix-clib-fifo-foreach () (interactive)
(fix-initializer "clib_fifo_foreach *("))
(defun fix-clib-bitmap-foreach () (interactive)
(fix-initializer "clib_bitmap_foreach *("))
(defun fix-foreach-ip-interface-address () (interactive)
(fix-initializer "foreach_ip_interface_address *("))
(defun fix-vlib-register-thread () (interactive)
(fix-initializer "VLIB_REGISTER_THREAD *("))
(defun fix-vlib-cli-command () (interactive)
(fix-initializer "VLIB_CLI_COMMAND *("))
(defun fix-vlib-register-node () (interactive)
(fix-initializer "VLIB_REGISTER_NODE *("))
(defun fix-reply-macro2 () (interactive)
(fix-initializer "REPLY_MACRO2 *("))
(defun fix-vnet-device-class () (interactive)
(fix-initializer "VNET_DEVICE_CLASS *("))
(defun fix-vnet-hw-interface-class () (interactive)
(fix-initializer "VNET_HW_INTERFACE_CLASS *("))
(defun fix-clib-packed () (interactive)
(fix-initializer "CLIB_PACKED *("))
(defun fix-vl-api-packed () (interactive)
(fix-initializer "VL_API_PACKED *("))
;; Driver routine which runs the set of functions
;; defined above, as well as the bottom boilerplate function
(defun fd-io-styleify () (interactive)
(fix-pool-foreach)
(fix-pool-foreach-index)
(fix-hash-foreach)
(fix-hash-foreach-pair)
(fix-hash-foreach-mem)
(fix-foreach-ip-interface-address)
(fix-clib-fifo-foreach)
(fix-clib-bitmap-foreach)
(fix-vlib-register-thread)
(fix-vlib-cli-command)
(fix-vlib-register-node)
(fix-reply-macro2)
(fix-vnet-device-class)
(fix-vnet-hw-interface-class)
(fix-clib-packed)
(fix-vl-api-packed)
(insert-style-boilerplate)
(if (boundp 'indent-offset-list)
(makunbound 'indent-offset-list)))
;; When run as a script, this sexp
;; walks the list of files supplied on the command line.
;;
;; (elt argv index) returns nil if you M-x eval-buffer
;; or M-x load-file the file, so we won't accidentally
;; evaluate (save-buffers-kill-emacs)...
(let ((file-index 0))
(if (elt argv file-index)
(while (elt argv file-index)
(find-file (elt argv file-index))
(fd-io-styleify)
(message "Done %s..." (elt argv file-index))
(setq file-index (1+ file-index))))
(if (> file-index 0)
(let ((junk 0))
(message "Save and quit...")
(save-buffers-kill-emacs t))))

View File

@ -24,19 +24,10 @@ nil
"
AC_INIT(" plugin-name "_plugin, 1.0)
AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])
AC_PROG_LIBTOOL
AM_PROG_AS
AC_PROG_CC
AM_PROG_CC_C_O
AC_ARG_WITH(plugin-toolkit,
AC_HELP_STRING([--with-plugin-toolkit],
[build using the vpp toolkit]),
[with_plugin_toolkit=${prefix}/include],
[with_plugin_toolkit=.])
AC_SUBST(TOOLKIT_INCLUDE,[${with_plugin_toolkit}])
AM_CONDITIONAL(WITH_PLUGIN_TOOLKIT, test \"$with_plugin_toolkit\" != \".\")
AC_OUTPUT([Makefile])
")

Some files were not shown because too many files have changed in this diff Show More