vpp.git
6 years agoNAT44: fix nat44_user_session_dump and nat44_del_session crash with one worker (VPP... 92/11392/3
Matus Fabian [Tue, 27 Mar 2018 08:07:25 +0000 (01:07 -0700)]
NAT44: fix nat44_user_session_dump and nat44_del_session crash with one worker (VPP-1213)

Change-Id: I8e0c7ed2ff462b9ab59c233f56be262ec03c29ff
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agovxlan:refactor add del command function 96/11396/2
Eyal Bari [Tue, 27 Mar 2018 08:43:57 +0000 (11:43 +0300)]
vxlan:refactor add del command function

Change-Id: I33ba5a011100baf1c786f9a63a0cf3d2e1020493
Signed-off-by: Eyal Bari <ebari@cisco.com>
6 years agovlib: gcc-7 -O3 uninitialized values 10/11410/2
Damjan Marion [Tue, 27 Mar 2018 19:07:58 +0000 (21:07 +0200)]
vlib: gcc-7 -O3 uninitialized values

Change-Id: I59b4142daab439d60a1ebd48b2c1366df0160288
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovlib: make cloned structures cacheline aligned 09/11409/1
Damjan Marion [Tue, 27 Mar 2018 19:06:10 +0000 (21:06 +0200)]
vlib: make cloned structures cacheline aligned

This address crash with gcc-7 observed when -o3 is used.

Change-Id: I10e87da8e5037ad480eba7fb0aaa9a657d3bf48d
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoacl-plugin: autosize the ACL plugin heap and fix the heap size types and parsing 89/11389/2
Andrew Yourtchenko [Mon, 26 Mar 2018 16:19:20 +0000 (18:19 +0200)]
acl-plugin: autosize the ACL plugin heap and fix the heap size types and parsing

- autosize the ACL plugin heap size based on the number of workers
- for manual heap size setting, use the proper types (uword),
  and proper format/unformat functions (unformat_memory_size)

Change-Id: I7c46134e949862a0abc9087d7232402fc5a95ad8
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoVOM: Fix connection state 06/11406/1
Neale Ranns [Tue, 20 Mar 2018 23:30:51 +0000 (16:30 -0700)]
VOM: Fix connection state

Change-Id: I4851b2245f81bcf3cf5f40909c4d158a51af7068
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agomemif: add private header size field 03/11403/2
Damjan Marion [Tue, 27 Mar 2018 13:02:56 +0000 (15:02 +0200)]
memif: add private header size field

private header size allows to reserve firs X bytes of payload to be
considered as private metadata. For now we just support value 0
but adding this field to address future needs without changing protocol
version.

Change-Id: Id77336584c0194a303b20210aff584c7372cba01
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agobond: coverity woes 91/11391/2
Steven [Tue, 27 Mar 2018 04:52:11 +0000 (21:52 -0700)]
bond: coverity woes

coverity complains about statements in function A

function A
{
   x % vec_len (y)
}

because vec_len (y) is a macro and may return 0 if the pointer y is null.
But coverity fails to realize the same statement vec_len (y) was already
invoked and checked in the caller of function A and punt if vec_len (y) is 0.

We can fix the coverity warning and shave off a few cpu cycles by caching
the result of vec_len (y) and pass it around to avoid calling vec_len (y)
again in multiple places.

Change-Id: I095166373abd3af3859646f860ee97c52f12fb50
Signed-off-by: Steven <sluong@cisco.com>
6 years agoVOM: bond: Add support for LACP 41/10941/9
Mohsin Kazmi [Fri, 2 Mar 2018 11:31:37 +0000 (12:31 +0100)]
VOM: bond: Add support for LACP

Change-Id: I0245263b212142858d3305b0f365d8342912dbb9
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoVCL: add IPv6 to socket_test.sh and make test 39/11239/10
Dave Wallace [Tue, 20 Mar 2018 13:22:13 +0000 (09:22 -0400)]
VCL: add IPv6 to socket_test.sh and make test

Change-Id: If3827828062a46f1cce43642535333f677f06e62
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoplugins: dpdk: ipsec: fix l3 offset 41/11241/2
Szymon Sliwa [Tue, 20 Mar 2018 13:45:21 +0000 (13:45 +0000)]
plugins: dpdk: ipsec: fix l3 offset

Changes the source of the l3 offset to a more
proper one, same as I5d9f41599ba8d8eb14ce2d9d523f82ea6e0fd10d.

Change-Id: I5ff05d7d89507ecb378a2bd62f5b149189ca9e99
Signed-off-by: Szymon Sliwa <szs@semihalf.com>
6 years agoRestore the brief FIB entry printing 88/11388/2
Neale Ranns [Mon, 26 Mar 2018 16:10:41 +0000 (09:10 -0700)]
Restore the brief FIB entry printing

Change-Id: I007d48aeb934e5d2f087ca3b8ddc6f7a0e48d411
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agovlib: add support for vfio no-iommu mode 81/11381/3
Damjan Marion [Mon, 26 Mar 2018 13:35:33 +0000 (15:35 +0200)]
vlib: add support for vfio no-iommu mode

Change-Id: Ic83971d8d9d8d0bb90a35932e60761cd728457f3
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoafpacket: Fix the reply if itf already exits 76/11376/2
Mohsin Kazmi [Thu, 22 Mar 2018 22:45:23 +0000 (23:45 +0100)]
afpacket: Fix the reply if itf already exits

Change-Id: I47768ea50140222fec54e97cbaff2049bd3cb599
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoDisable -Waddress-of-packed-member warnings reported by clang 17/11317/3
Damjan Marion [Mon, 26 Mar 2018 11:36:46 +0000 (13:36 +0200)]
Disable -Waddress-of-packed-member warnings reported by clang

Change-Id: Ic07ea5b0a7addec7b0ccfbe0570f341056e6d55b
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoacl-plugin: defer the ACL plugin user module registration with ACL lookup until it... 64/11364/2
Andrew Yourtchenko [Mon, 26 Mar 2018 10:30:47 +0000 (12:30 +0200)]
acl-plugin: defer the ACL plugin user module registration with ACL lookup until it is needed

Registering ACL plugin user module within the "ACL as a service" infra during the plugin init
causes an unnecesary ACL heap allocation and prevents the changing of the ACL heap size
from the startup config.

Defer this registration until just before it is needed - i.e. when applying an ACL to
an interface.

Change-Id: Ied79967596b3b76d6630f136c998e59f8cdad962
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoplugin: Add plugin 'default' disable/enable 15/11315/6
Mohsin Kazmi [Thu, 22 Mar 2018 22:45:23 +0000 (23:45 +0100)]
plugin: Add plugin 'default' disable/enable

How to use:
  plugins
  {
    plugin default {disable}
    plugin dpdk_plugin.so {enable}
    plugin acl_plugin.so {enable}
  }

It also preserves the old behavior.

Change-Id: I9901c56d82ec4410e69c917992b78052aa6a99e0
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agolibmemif: version 2 62/11362/9
Jakub Grajciar [Mon, 26 Mar 2018 09:26:34 +0000 (11:26 +0200)]
libmemif: version 2

Change-Id: Ia2532695aa9199d2a7b684aebef43df0b8235531
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
6 years agoIntel Adaptive Virtual Function native device driver plugin 57/10457/41
Damjan Marion [Wed, 7 Feb 2018 21:35:06 +0000 (22:35 +0100)]
Intel Adaptive Virtual Function native device driver plugin

Change-Id: If168a9c54baaa516ecbe78de2141f11c17aa2f53
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agosession: fix local session disconnects 46/11346/4
Florin Coras [Sat, 24 Mar 2018 05:56:43 +0000 (22:56 -0700)]
session: fix local session disconnects

Select the right segment manager for local sessions established via
global table.

Change-Id: I88ad4bf70d0cae160a0c744950098a954dfbc911
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agomake test: fix DEBUG=gdb/gdbserver options 45/11345/2
Klement Sekera [Fri, 23 Mar 2018 20:54:12 +0000 (21:54 +0100)]
make test: fix DEBUG=gdb/gdbserver options

Change-Id: I5a7fa3b1c247ad5611907db27835724dcd31f575
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agomake test: fix ext build on centos 94/11294/3
Klement Sekera [Thu, 22 Mar 2018 10:50:42 +0000 (11:50 +0100)]
make test: fix ext build on centos

Change-Id: I2b01f73c4b10a230310a65b6f35526818bf4f76d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agomake test: use vpp-dev repo for py-lispnetworking 71/11271/5
Klement Sekera [Wed, 21 Mar 2018 16:48:50 +0000 (17:48 +0100)]
make test: use vpp-dev repo for py-lispnetworking

Change-Id: Ia87d55cad1d466a4cc624f06abbc322cddb5608c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoallow specifying number of concurrent jobs 70/11270/4
Klement Sekera [Wed, 21 Mar 2018 16:44:20 +0000 (17:44 +0100)]
allow specifying number of concurrent jobs

If defined, Use MAKE_PARALLEL_JOBS as number of concurrent jobs for
build process instead of the internal calculation based on /proc/cpuinfo.

Change-Id: I18d1f526dc5c156c1cd9c9cf6dbbfd9cb8dbbad7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agomake test: enhance core-file information 27/11327/3
Klement Sekera [Fri, 23 Mar 2018 09:50:11 +0000 (10:50 +0100)]
make test: enhance core-file information

Change-Id: I1283960a9a49f6d70b9d7b7793cfb345c22ccdea
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoUser session counters stay <= per-user limit 42/11342/2
Matthew Smith [Fri, 23 Mar 2018 13:30:16 +0000 (08:30 -0500)]
User session counters stay <= per-user limit

When a user session is allocated/reused, only increase
one of the session counters for that user if the counters
are below the per-user limit.

THis addresses a SEGV that arises after the following
sequence of events:

- an outside interface IP address is put in a pool
- a user exceeds the number of per-user translations by
an amount greater than the number of per-user translations
(nsessions + nstaticsessions > 100 + 100)
- the outside interface IP address is deleted and then added
again (observed when using DHCP client, likely happens if
address changed via CLI, API also)
- the user sends more packets that should be translated

When nsessions is > the per-user limit,
nat_session_alloc_or_recycle() reclaims the oldest existing
user session. When an outside address is deleted, the
corresponding user sessions are deleted. If the counters were
far above the per-user limit, the deletions wouldn't result
in the counters dropping back below the limit. So no session
could be reclaimed -> SEGV.

Change-Id: I940bafba0fd5385a563e2ce87534688eb9469f12
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agoAdd client hw address to DHCP offer and ack in test case 43/11343/1
Neale Ranns [Fri, 23 Mar 2018 18:53:12 +0000 (11:53 -0700)]
Add client hw address to DHCP offer and ack in test case

Change-Id: Ifc9bb4ea39b504372a6a39bbf56c29761d0c6111
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoacl-plugin: improvements in 'show acl-plugin macip acl' CLI 40/11340/2
Andrew Yourtchenko [Fri, 23 Mar 2018 14:23:15 +0000 (15:23 +0100)]
acl-plugin: improvements in 'show acl-plugin macip acl' CLI

- allow to optionally specify the specific MACIP ACL index:
  'show acl-plugin macip acl [index N]'
- after showing the MACIP ACL, show the sw_if_index of
  interface(s) where it is applied.

Also, add some executions of this debug commands
to the MACIP test case for easy verification.

Change-Id: I56cf8272abc20b1b2581b60d528d27a70d186b18
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoDrop dhcp pkts w/ hardware address mismatches 39/11339/3
Dave Barach [Fri, 23 Mar 2018 13:52:52 +0000 (09:52 -0400)]
Drop dhcp pkts w/ hardware address mismatches

Add a few dhcp client rx packet/state counters

Temporarily disable the dhcp client unit test, since it trips over the
newly-added hardware address check.

Change-Id: I7f68607e6ed3d738cba357c3fe76664a99b71cd8
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoIPSEC_AH: broken initialization (VPP-1208) 35/11335/4
Marco Varlese [Fri, 23 Mar 2018 12:32:50 +0000 (13:32 +0100)]
IPSEC_AH: broken initialization (VPP-1208)

The init-path for IPSEC_AH where the CTX gets initialized is broken
since the for-loop never executes due to the wrong usage of
tm->n_vlib_mains which being subtracted by 1.

Change-Id: I4d967f52cd3ca061aa60d824d65f446e06162403
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agotcp/session: sprinkle prefetches 94/11194/4
Florin Coras [Fri, 16 Mar 2018 15:48:31 +0000 (08:48 -0700)]
tcp/session: sprinkle prefetches

Change-Id: Idef3c665580c13d72e99f43d16b8b13cc6ab746f
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agosession: allow builtin apps to register names 34/11334/3
Florin Coras [Fri, 23 Mar 2018 04:24:31 +0000 (21:24 -0700)]
session: allow builtin apps to register names

Change-Id: I4b428e170436671b329657283cf7653befc85c9f
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoacl-plugin: make test: do not use a debug CLI where API can be used 32/11332/2
Andrew Yourtchenko [Fri, 23 Mar 2018 11:20:56 +0000 (12:20 +0100)]
acl-plugin: make test: do not use a debug CLI where API can be used

Parsing the list of applied ACLs from the debug CLI output
is not a good idea, since the debug CLI can and will change.
Fix that.

Change-Id: Ia47214863f2658a54219f59cb974b5cbc536f862
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoacl-plugin: set ACL heap within the exported functions that might alloc memory 29/11329/2
Andrew Yourtchenko [Fri, 23 Mar 2018 10:56:23 +0000 (11:56 +0100)]
acl-plugin: set ACL heap within the exported functions that might alloc memory

The functions which get called by other plugins need to set the acl plugin heap,
such that the other plugins do not have to think about it.

Change-Id: I673073f17116ffe444c163bf3dff40821d0c2686
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agomake test: code cleanup 69/11269/4
Klement Sekera [Wed, 21 Mar 2018 11:35:51 +0000 (12:35 +0100)]
make test: code cleanup

Change-Id: Ic689de569e5b6e6209d16d6acdb13c489daca1f5
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoNAT44: fix ICMP checksum update crash (VPP-1205) 28/11328/2
Matus Fabian [Fri, 23 Mar 2018 10:42:06 +0000 (03:42 -0700)]
NAT44: fix ICMP checksum update crash (VPP-1205)

Change-Id: I3e4bbfe205c86cb0839dd5c542f083dbe6bea881
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoacl-plugin: make test: add a test which deletes an interface with applied ACL 26/11326/3
Andrew Yourtchenko [Fri, 23 Mar 2018 09:38:46 +0000 (10:38 +0100)]
acl-plugin: make test: add a test which deletes an interface with applied ACL

There was no test coverage for a scenario of an interface having an
ACL and that interface being deleted. Add a basic sanity test which
applies an ACL to an interface and then deletes that interface.

Change-Id: Ib6462e02cf69f1173125ac2481c608f68eb389ac
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoacl-plugin: make test: shuffle applied ACLs as part of the tests 22/11322/1
Andrew Yourtchenko [Fri, 23 Mar 2018 08:34:29 +0000 (09:34 +0100)]
acl-plugin: make test: shuffle applied ACLs as part of the tests

During the testing of 94f9a6de3f706243d138e05b63fef1d5c8174f6c
I realized there was no test coverage for the cases where
the ACLs are added then modified while having beein applied.

This change adds some simple shuffling to l2l3 ACL test set,
whereby after each of the ACLs being applied, a few extra ACLs
are applied at the front and the back of the list, and are changed
several times, the base for the changes being the set of all the
ACEs that are being applied previously.

After these few shuffles, the routine restores the applied ACLs
and proceeds to the test as usual.

Change-Id: Ieda2aa5b7963746d62484e54719309de9c1ee752
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoIGMP: coverity fixes and remove checks for scapy IGMPv3 76/11276/3
Neale Ranns [Wed, 21 Mar 2018 23:34:28 +0000 (16:34 -0700)]
IGMP: coverity fixes and remove checks for scapy IGMPv3

Change-Id: Ic2eddc803f9ba8215e37388a686004830211cf6f
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agobond: performance enhancement 16/11316/1
Steven [Fri, 23 Mar 2018 00:46:58 +0000 (17:46 -0700)]
bond: performance enhancement

We were only puting one packet per frame to the output node. Change to
buffer multiple packets per frame. Performance is now on top of dpdk-based
bonding.
Put a spinlock in the tx thread in case the rug is pulled under us.

Change-Id: Ifda5af086a984a7301972cd6c8e428217f676a95
Signed-off-by: Steven <sluong@cisco.com>
6 years agovom: itf: make vhost_user as socket slave 13/11313/3
Mohsin Kazmi [Thu, 22 Mar 2018 15:07:05 +0000 (16:07 +0100)]
vom: itf: make vhost_user as socket slave

Change-Id: I57b2ec35d9629fb5336c1ccfa4c6c849df118f7b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoVPP-1204: Fix coverity warning 97/11297/3
Dave Barach [Thu, 22 Mar 2018 12:15:05 +0000 (08:15 -0400)]
VPP-1204: Fix coverity warning

Change-Id: Iacb32e6e855f7b77108154d956ef27ee141bbde0
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoAdd circular logging 12/11312/3
Dave Barach [Thu, 22 Mar 2018 14:54:45 +0000 (10:54 -0400)]
Add circular logging

Change-Id: Ide8bf41e24a427643a3a17b1c9089993790c12a6
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoRevert "acl-plugin: improvement on 'show acl-plugin' CLI" 14/11314/1
Damjan Marion [Thu, 22 Mar 2018 22:34:06 +0000 (23:34 +0100)]
Revert "acl-plugin: improvement on 'show acl-plugin' CLI"

This reverts commit 378ac0533e5ac8c3121d8f66ba61a8548e55282f.

Change-Id: If34b1c964453adb0e4c44e3eab4f6e306bd9c9e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoacl-plugin: implement ACL lookup contexts for "ACL as a service" use by other plugins 74/11274/7
Andrew Yourtchenko [Wed, 21 Mar 2018 18:53:39 +0000 (19:53 +0100)]
acl-plugin: implement ACL lookup contexts for "ACL as a service" use by other plugins

This code implements the functionality required for other plugins wishing
to perform ACL lookups in the contexts of their choice, rather than only
in the context of the interface in/out.

The lookups are the stateless ACLs - there is no concept of "direction"
within the context, hence no concept of "connection" either.

The plugins need to include the

The file acl_lookup_context.md has more info.

Change-Id: I91ba97428cc92b24d1517e808dc2fd8e56ea2f8d
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agogbp: Add the next node lookup 11/11311/2
Mohsin Kazmi [Thu, 22 Mar 2018 14:46:37 +0000 (15:46 +0100)]
gbp: Add the next node lookup

Change-Id: Ia0f659b810f2c79b1a6c98ce566a86ce413c7448
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoNAT44: interface output feature and dst NAT (VPP-1200) 06/11306/2
Matus Fabian [Thu, 22 Mar 2018 12:50:47 +0000 (05:50 -0700)]
NAT44: interface output feature and dst NAT (VPP-1200)

Do not translate packet which go out via nat44-in2out-output and was tranlated
in nat44-out2in before. On way back forward packet to nat44-in2out node.

Change-Id: I934d69856f0178c86ff879bc691c9e074b8485c8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agomemif: version 2 57/9857/31
Damjan Marion [Thu, 2 Nov 2017 16:07:59 +0000 (17:07 +0100)]
memif: version 2

In version 1 of the protocol sender was always ring producer and
receiver was consumer. In version 2 slave is always producer,
and in case of master-to-slave rings, slave is responsible for
populating ring with empty buffers.

As this is major change, we need to bump version number.

In addition, descriptor size is reduced to 16 bytes.

This change allows zero-copy-slave operation (to be privided in the separate
patch).

Change-Id: I02115d232f455ffc05c0bd247f7d03f47252cfaf
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
6 years agoAvoid atomic ops when polling queues 37/11237/2
Dave Barach [Tue, 20 Mar 2018 12:49:02 +0000 (08:49 -0400)]
Avoid atomic ops when polling queues

Change-Id: I31c6a0a1d11b5b12d8a5c32c29fea9618b1a53d4
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agovom: l2-emulation: Fix sweep function 24/11224/5
Mohsin Kazmi [Wed, 21 Mar 2018 14:55:28 +0000 (15:55 +0100)]
vom: l2-emulation: Fix sweep function

Change-Id: I6fdb9e7b718c696f7352541f90026cf60f11338f
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoudp: make udp encap pool cacheline aligned 75/11275/2
Damjan Marion [Wed, 21 Mar 2018 21:27:46 +0000 (22:27 +0100)]
udp: make udp encap pool cacheline aligned

This fixes issue with unaligned vector access on gcc-7.
As udp_encap_t is declared as cacheline aligned, alloc also need to be.

Change-Id: Ic30876911baf2c22c135097490075fa7bcf0ca18
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoacl-plugin: improvement on 'show acl-plugin' CLI 73/11273/2
Steve Shin [Wed, 21 Mar 2018 18:35:12 +0000 (11:35 -0700)]
acl-plugin: improvement on 'show acl-plugin' CLI

- Show interface on which given MACIP ACL is applied
- index is added for show acl-plugin macip acl:
  ex) show acl-plugin macip acl [index N]

Change-Id: I3e888c8e3267060fe157dfc1bbe3e65371bd858a
Signed-off-by: Steve Shin <jonshin@cisco.com>
6 years agobond: Add bonding driver and LACP protocol 92/9892/58
Steven [Wed, 20 Dec 2017 20:43:01 +0000 (12:43 -0800)]
bond: Add bonding driver and LACP protocol

Add bonding driver to support creation of bond interface which composes of
multiple slave interfaces. The slave interfaces could be physical interfaces,
or just any virtual interfaces. For example, memif interfaces.

The syntax to create a bond interface is
create bond mode <lacp | xor | acitve-backup | broadcast | round-robin>

To enslave an interface to the bond interface,
enslave interface TenGigabitEthernet6/0/0 to BondEthernet0

Please see src/plugins/lacp/lacp_doc.md for more examples and additional
options.

LACP is a control plane protocol which manages and monitors the status of
the slave interfaces. The protocol is part of 802.3ad standard. This patch
implements LACPv1. LACPv2 is not supported.
To enable LACP on the bond interface, specify "mode lacp" when the bond
interface is created. The syntax to enslave a slave interface is the same as
other bonding modes.

Change-Id: I06581d3b87635972f9f0e1ec50b67560fc13e26c
Signed-off-by: Steven <sluong@cisco.com>
6 years agoVPP_1202: handle DHCP NAK packets 72/11272/2
Dave Barach [Wed, 21 Mar 2018 17:45:12 +0000 (13:45 -0400)]
VPP_1202: handle DHCP NAK packets

Change-Id: I469a734747099cef2d135d77e4db0244e24bf0bc
Signed-off-by: Dave Barach <dbarach@cisco.com>
6 years agoUDP Encap counters 59/11259/2
Neale Ranns [Tue, 20 Mar 2018 08:47:35 +0000 (01:47 -0700)]
UDP Encap counters

Change-Id: Ib5639981dca0b11b2d62acf2c0963cc95c380f70
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoDetailed Interface stats API takes sw_if_index 60/11260/2
Neale Ranns [Wed, 21 Mar 2018 13:44:01 +0000 (09:44 -0400)]
Detailed Interface stats API takes sw_if_index

Change-Id: Id09d777c1706c1d613b14b719bcac596194465cd
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoIGMP plugin initialises the FIB/MFIB via ip4 module 62/11262/1
Neale Ranns [Wed, 21 Mar 2018 14:19:15 +0000 (10:19 -0400)]
IGMP plugin initialises the FIB/MFIB via ip4 module

Change-Id: If9d7b266c4b49d4e7810ebc7d18fa154532d0322
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoNAT44: fix removal of LB static mappings with same local address and port pair (VPP... 35/11235/2
Matus Fabian [Tue, 20 Mar 2018 11:31:42 +0000 (04:31 -0700)]
NAT44: fix removal of LB static mappings with same local address and port pair (VPP-1199)

Change-Id: Iad8c626e83bbc58d5c85b6736f5a3dd5bc9ceafb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoreassembly: feature/concurrency 88/11188/6
Klement Sekera [Thu, 22 Feb 2018 10:41:12 +0000 (11:41 +0100)]
reassembly: feature/concurrency

This change makes ip reassembly an interface feature, while adding
concurrency support. Due to this, punt is no longer needed to test
reassembly.

Change-Id: I467669514ec33283ce935be0f1dd08f07684f0c7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoFIB Interpose Source 28/10728/10
Neale Ranns [Wed, 21 Feb 2018 12:57:17 +0000 (04:57 -0800)]
FIB Interpose Source

The interpose source allows the source/provider to insert/interpose
a DPO in the forwarding chain of the FIB entry ahead of the forwarding
provided by the next best source. For example if the API source (i.e
the 'control plane') has provided an adjacency for forwarding, then
an interpose source (e.g. a monitoring service) couold interpose a
replicatte DPO to copy the traffic to another location AND forward
using the API's adjacency.
To use the interose feature an existing source (i.e FIB_SOURCE_PLUGIN_HI)
cn specifiy as a flag FIB_ENTRY_FLAG_INTERPOSE and provide a DPO to
interpose. One might also consider using interpose in conjunction with
FIB_ENTRY_FLAG_COVER_INHERIT to ensure the interpose object affects
all prefixes in the sub-tree.

Change-Id: I8b2737b985f8f7c08123406d0491881def347b52
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFix Allow ARP packets for dot1q interface with MACIP enabled 27/11227/2
Steve Shin [Mon, 19 Mar 2018 18:36:10 +0000 (11:36 -0700)]
Fix Allow ARP packets for dot1q interface with MACIP enabled

ARP packets need to be allowed for dot1q interface when MACIP is enabled.

Change-Id: I33dd3cb6c6100c49420d57360a277f65c55ac816
Signed-off-by: Steve Shin <jonshin@cisco.com>
6 years agoVCL: Fix Coverity CID183003 17/11217/2
Dave Wallace [Mon, 19 Mar 2018 14:38:00 +0000 (10:38 -0400)]
VCL: Fix Coverity CID183003

*** CID 183003:  Program hangs  (LOCK)
/src/vcl/vppcom.c: 2988 in vppcom_session_accept()

Change-Id: I123b73198d305fb0226516942caa410d3647a6bc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoUse x(void) not x() in new interface stats code 26/11226/2
Neale Ranns [Mon, 19 Mar 2018 16:24:07 +0000 (12:24 -0400)]
Use x(void) not x() in new interface stats code

Change-Id: Iaceaba4dc22341c631c858516b960ce97c4aa564
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agosession: fix coverity warnings 99/11199/4
Florin Coras [Sun, 18 Mar 2018 15:22:17 +0000 (08:22 -0700)]
session: fix coverity warnings

Change-Id: I022dc40476ea9c30957b12bf1bd0629c6eb41cda
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoCoverity found bugs in recent MPLS changes 04/11204/2
Neale Ranns [Mon, 19 Mar 2018 09:32:57 +0000 (02:32 -0700)]
Coverity found bugs in recent MPLS changes

Change-Id: I590945fdc1af53208c990a52bbecdc992fd27532
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoQoS code coverity found errors 05/11205/2
Neale Ranns [Mon, 19 Mar 2018 09:39:45 +0000 (02:39 -0700)]
QoS code coverity found errors

Change-Id: I6b125b79bdc560bfb81f307367c844b6a5af6368
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoFIB code coverity found defect 06/11206/2
Neale Ranns [Mon, 19 Mar 2018 09:43:28 +0000 (02:43 -0700)]
FIB code coverity found defect

Change-Id: I7cdc29dd6481242aaace75138cc34e2f5ea76b81
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoVCL: Fix Coverity CID183009 20/11220/2
Dave Wallace [Mon, 19 Mar 2018 15:18:30 +0000 (11:18 -0400)]
VCL: Fix Coverity CID183009

Change-Id: I0233b20eb4c7dcb325e15b97a22ecd54200f6fde
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoInterface Unicast, Multicast and Broadcast stats on the API 10/11210/2
Neale Ranns [Fri, 16 Mar 2018 23:26:21 +0000 (16:26 -0700)]
Interface Unicast, Multicast and Broadcast stats on the API

Change-Id: I7c75da358aff1bd0216a602a49f2909cef5d920d
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoIGMP plugin 66/9766/34
Jakub Grajciar [Fri, 8 Dec 2017 15:28:42 +0000 (16:28 +0100)]
IGMP plugin

- host mode:
  igmp_listen - API to signal that the host has joined an (S,G)

- route mode:
  igmp_enable - API to enable the reception of host IGMP messages
  igmp_event - API to report the host join/leave from an (S,G)

Change-Id: Id180ec27dee617d33ab3088f5dcf6125d3aa9c8f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
6 years agoQoS: publish qos.api.h file 07/11207/2
Matus Fabian [Mon, 19 Mar 2018 10:58:41 +0000 (03:58 -0700)]
QoS: publish qos.api.h file

Change-Id: Ice041610c23563ead13019216516aff23b7775b9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoIPIP: Fix coverity error. 08/11208/2
Ole Troan [Mon, 19 Mar 2018 11:14:02 +0000 (12:14 +0100)]
IPIP: Fix coverity error.

Change-Id: Ia2b3350bf8e2c72eee3f33936ba16dd817c75c72
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoScapy upgrade to 2.4.0.rc5 06/10806/9
Neale Ranns [Sun, 25 Feb 2018 20:27:18 +0000 (12:27 -0800)]
Scapy upgrade to 2.4.0.rc5

- many of the patches fd.io applies in test/patches/2.3.3 are now upstreamed in 2.4
- 2.4 adds support for IGMPv3 which is my main motivation for the upgrade

Change-Id: If2c0a524e3cba320b4a5d8cd07817c6ea2bf0c5a
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFIX: Fixed ip6_fib_dump api function response. 91/11191/3
Dmitry Vakhrushev [Fri, 16 Mar 2018 17:26:32 +0000 (20:26 +0300)]
FIX: Fixed ip6_fib_dump api function response.

Change-Id: I26c5d61bc2f6188bcd4ecac4b5e9385821b0398b
Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
6 years agoRemove unnumbered configuration on interface delete 85/11185/3
Neale Ranns [Fri, 16 Mar 2018 10:22:39 +0000 (03:22 -0700)]
Remove unnumbered configuration on interface delete

Change-Id: Iae5532c3d53e208831f3b2782242d9e59d367087
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agocli: make q work again 95/11195/1
Florin Coras [Fri, 16 Mar 2018 16:13:37 +0000 (09:13 -0700)]
cli: make q work again

After the addition of "qos" cli, "quit" command is not the only match
for "q". Therefore, add a separate "q" cli to avoid ambiguity.

Change-Id: I84f6ddce14ef7d5fa7089537cb62adfecea0e501
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoQoS recording and marking 53/11053/9
Neale Ranns [Tue, 27 Feb 2018 11:45:38 +0000 (03:45 -0800)]
QoS recording and marking

Change-Id: Ie5a50def4ec1e4a3b3404a8b6ab9ec248bc16744
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFix a long-latent bi=0 bug in vlib_buffer_add_data 93/11193/2
Dave Barach [Fri, 16 Mar 2018 19:21:35 +0000 (15:21 -0400)]
Fix a long-latent bi=0 bug in vlib_buffer_add_data

Change vlib_buffer_add_data() so it interprets ~0 to mean please
allocate a new buffer, instead of 0. Fixed a couple of calls to pass
~0 instead of 0.

Zero has always been a valid buffer index, we never happened to
actually use it until recent buffer allocator changes.

The presenting symptom: ASSERT failure when running "make
TEST=test_mpls test-debug"

Change-Id: Ic909913c1d464b3434d6d47e0c58f978806854d5
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoIPv6 ND Router discovery control plane (VPP-1095) 40/10840/7
Juraj Sloboda [Thu, 1 Feb 2018 14:18:49 +0000 (15:18 +0100)]
IPv6 ND Router discovery control plane (VPP-1095)

Change-Id: I4b5b60e7c6f618bb935eab1e96a2e79bbb14f58f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
6 years agostats: allow configuring poller delay 71/9671/14
Klement Sekera [Thu, 30 Nov 2017 06:00:31 +0000 (07:00 +0100)]
stats: allow configuring poller delay

This introduces a startup config option for configuring stats poller delay.

Use `stats { interval <seconds> }` to configure the delay at startup.

The default value remains unchanged - 10 seconds.

Change-Id: If12cb1f7f6f1f8ecfa461561bc77847cdf260388
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoIPSec: fix IPv6 policy deleting 89/11189/2
Matus Fabian [Fri, 16 Mar 2018 12:44:24 +0000 (05:44 -0700)]
IPSec: fix IPv6 policy deleting

Change-Id: I9f487d6033edde09557709f94f97fc8a70246b09
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoremove spurious print statements from DVR tests 87/11187/1
Neale Ranns [Fri, 16 Mar 2018 12:08:24 +0000 (05:08 -0700)]
remove spurious print statements from DVR tests

Change-Id: I3b1c71b144b4760922a467086fcdb410cd225c57
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFix sample-plugin build on ubuntu 18.04 81/11181/3
Damjan Marion [Thu, 15 Mar 2018 23:54:30 +0000 (00:54 +0100)]
Fix sample-plugin build on ubuntu 18.04

Change-Id: Ia10aadc7f969b20e8cd50989230a80e7e21cbff4
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoIPv6 ND Router discovery data plane (VPP-1095) 33/10333/5
Juraj Sloboda [Mon, 15 Jan 2018 09:39:21 +0000 (10:39 +0100)]
IPv6 ND Router discovery data plane (VPP-1095)

Add API call to send Router Solicitation messages.
Save info from incoming Router Advertisement messages and notify listeners.

Change-Id: Ie518b5492231e03291bd4c4280be4727bfecab46
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
6 years agosession: allow local host binds 80/11180/4
Florin Coras [Thu, 15 Mar 2018 14:45:27 +0000 (07:45 -0700)]
session: allow local host binds

Change-Id: I906bbc5bc75279f210093fb9276db9e35ee44c1f
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoremove bootstrap from top-level Makefile 76/11176/2
Damjan Marion [Thu, 15 Mar 2018 18:36:41 +0000 (19:36 +0100)]
remove bootstrap from top-level Makefile

Change-Id: I9f2a1ba9153ff57958b230a1ba2afeb9df50fd45
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoUpdate session local address is_ip4 on bind when not global 71/11171/2
Keith Burns (alagalah) [Thu, 15 Mar 2018 17:04:20 +0000 (10:04 -0700)]
Update session local address is_ip4 on bind when not global

Change-Id: I73ddca5a86e83c9f547778828bb49d2bd4675eaf
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agomake test: Add VCL iperf3 tests 61/11161/2
Dave Wallace [Thu, 15 Mar 2018 00:01:28 +0000 (20:01 -0400)]
make test: Add VCL iperf3 tests

Change-Id: I101a44aa4913bee8d9a1aa37822e8e7e61c7aa1d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agotls: add openssl engine 67/11067/17
Florin Coras [Fri, 9 Mar 2018 21:05:53 +0000 (13:05 -0800)]
tls: add openssl engine

Change-Id: I6c215858d2c9c620787632b570950b15274c0df2
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoIPIP: Linter on test_*.py 57/11157/3
Ole Troan [Wed, 14 Mar 2018 19:39:40 +0000 (20:39 +0100)]
IPIP: Linter on test_*.py

Change-Id: Icd491e382a2da0e5d55a673458605bc37e39b669
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoAdd a helper function to fetch vlib node index for already stacked dpos 59/11159/3
Vijayabhaskar Katamreddy [Wed, 14 Mar 2018 21:04:27 +0000 (14:04 -0700)]
Add a helper function to fetch vlib node index for already stacked dpos

Change-Id: Ie07c6f3723312ce88046570dcbe591b72724657b
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
6 years agouse system provided ccache links 60/11160/2
Damjan Marion [Wed, 14 Mar 2018 21:09:22 +0000 (22:09 +0100)]
use system provided ccache links

Change-Id: I0860bbd0cf368fc3638b861504ebf642ee9d3807
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoIPIP: Also publish the ipip.api.h file. 55/11155/2
Jon Loeliger [Wed, 14 Mar 2018 19:08:43 +0000 (14:08 -0500)]
IPIP: Also publish the ipip.api.h file.

Change-Id: I0b1237db541b752393483496ea19dec55799454e
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agofix 'make build' 58/11158/1
Damjan Marion [Wed, 14 Mar 2018 19:58:39 +0000 (20:58 +0100)]
fix 'make build'

Change-Id: I4ec24ffd39f83d9c2d4115e7a06a5eb84a08aae8
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agomake test: early core detection, code cleanup 53/11153/4
Klement Sekera [Wed, 14 Mar 2018 17:14:49 +0000 (18:14 +0100)]
make test: early core detection, code cleanup

Change-Id: I503d69f902f1c8d3107fb3f2b9f31b0083ebb747
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoClean up vpp build bootstrap step 23/11123/7
Dave Barach [Tue, 13 Mar 2018 16:54:43 +0000 (12:54 -0400)]
Clean up vpp build bootstrap step

Net of rewriting vppapigen in python-ply, there's no need to compile
vppinfra.

Install a copy of vppapigen in .../build-root/tools/bin, so
the sample plugin build will work. Rationalize suffix-rules.mk.

Add clang, clang++ links to .../build-root/ccache-bin.

Change-Id: Ib4017848b7767b6054238ea544ee5319667c3659
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoVPP-1197: SELinux: 'create tap' (vhost-net backend TAP) fails when 52/11152/2
Billy McFall [Wed, 14 Mar 2018 13:34:02 +0000 (09:34 -0400)]
VPP-1197: SELinux: 'create tap' (vhost-net backend TAP) fails when
SELinux is enable

Update the SELinux Policy to allow management of the new vhost-net
backend TAP interface.

Change-Id: I2d0633a7fce2ee2a4d6e0008ab13599647c14f42
Signed-off-by: Billy McFall <bmcfall@redhat.com>
6 years agovlib: internal buffer manager rework 38/11138/3
Damjan Marion [Tue, 13 Mar 2018 20:32:17 +0000 (21:32 +0100)]
vlib: internal buffer manager rework

 - buffer_main is no longer part of vlib_main_t
 - pool of free lists is still part of vlib_main_t
 - mheap is not used anymore for buffer allocation
 - simple bitmap bassed buffer alloc scheme is introduced

Change-Id: I3e1e6d00e2c8122293ed0a741245eb841315a1ff
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoPrevent calling rte_eth_xstats_get not initialized dev 44/11144/2
Szymon Sliwa [Wed, 14 Mar 2018 11:54:55 +0000 (11:54 +0000)]
Prevent calling rte_eth_xstats_get not initialized dev

DPDK API forbids calling rte_eth_xstats_get on a port
which has not been setup up yet.

Citing the DPDK docs (reformated):

"
The functions exported by the application Ethernet API to setup a device
designated by its port identifier must be invoked in the following order:

rte_eth_dev_configure()
rte_eth_tx_queue_setup()
rte_eth_rx_queue_setup()
rte_eth_dev_start()
Then, the network application can invoke, in any order, the functions
exported by the Ethernet API to get the MAC address of a given device,
to get the speed and the status of a device physical link, to
receive/transmit [burst of] packets, and so on.
"

original can be found here:
http://dpdk.org/doc/api/rte__ethdev_8h.html#a36ba70a5a6fce2c2c1f774828ba78f8d

Change-Id: I91854b8b0dd12dd028b4b36665cca49f16eac24c
Signed-off-by: Szymon Sliwa <szs@semihalf.com>
6 years agoIPIP: Add IP{v4,v6} over IP{v4,v6} configured tunnel support. 38/11038/8
Ole Troan [Thu, 8 Mar 2018 11:30:43 +0000 (12:30 +0100)]
IPIP: Add IP{v4,v6} over IP{v4,v6} configured tunnel support.

Change-Id: I166301c9e2388bae5f70ec0179d663a2703e27f5
Signed-off-by: Ole Troan <ot@cisco.com>