3785 Commits

Author SHA1 Message Date
Andrew Yourtchenko
de3682f510 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>
2018-03-23 11:06:02 +00:00
Andrew Yourtchenko
0e89dfc916 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>
2018-03-23 09:34:29 +01:00
Neale Ranns
5237c77cdd IGMP: coverity fixes and remove checks for scapy IGMPv3
Change-Id: Ic2eddc803f9ba8215e37388a686004830211cf6f
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-03-23 03:55:54 +00:00
Steven
a005e7f0ef 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>
2018-03-22 17:46:58 -07:00
Mohsin Kazmi
c6a716b7c2 vom: itf: make vhost_user as socket slave
Change-Id: I57b2ec35d9629fb5336c1ccfa4c6c849df118f7b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-22 22:36:42 +00:00
Dave Barach
6e3c682b18 VPP-1204: Fix coverity warning
Change-Id: Iacb32e6e855f7b77108154d956ef27ee141bbde0
Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-22 22:36:28 +00:00
Dave Barach
6ddede7212 Add circular logging
Change-Id: Ide8bf41e24a427643a3a17b1c9089993790c12a6
Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-22 22:36:20 +00:00
Damjan Marion
f3639d00aa Revert "acl-plugin: improvement on 'show acl-plugin' CLI"
This reverts commit 378ac0533e5ac8c3121d8f66ba61a8548e55282f.

Change-Id: If34b1c964453adb0e4c44e3eab4f6e306bd9c9e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-22 23:34:53 +01:00
Andrew Yourtchenko
94f9a6de3f 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>
2018-03-22 20:50:09 +00:00
Mohsin Kazmi
8ced6e1a53 gbp: Add the next node lookup
Change-Id: Ia0f659b810f2c79b1a6c98ce566a86ce413c7448
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-22 18:35:13 +00:00
Matus Fabian
4d023c8c93 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>
2018-03-22 17:30:42 +00:00
Damjan Marion
5c37ce3e02 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>
2018-03-22 15:54:43 +00:00
Dave Barach
32f4e18c59 Avoid atomic ops when polling queues
Change-Id: I31c6a0a1d11b5b12d8a5c32c29fea9618b1a53d4
Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-22 13:59:43 +00:00
Mohsin Kazmi
0bbe576367 vom: l2-emulation: Fix sweep function
Change-Id: I6fdb9e7b718c696f7352541f90026cf60f11338f
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-22 13:57:17 +00:00
Damjan Marion
7b0b9612ee 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>
2018-03-21 23:12:29 +00:00
Steve Shin
378ac0533e 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>
2018-03-21 21:58:00 +00:00
Steven
9cd2d7a5a4 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>
2018-03-21 21:02:15 +00:00
Dave Barach
43ebe29b6e VPP_1202: handle DHCP NAK packets
Change-Id: I469a734747099cef2d135d77e4db0244e24bf0bc
Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-03-21 20:25:27 +00:00
Neale Ranns
43b1f44571 UDP Encap counters
Change-Id: Ib5639981dca0b11b2d62acf2c0963cc95c380f70
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-21 20:24:34 +00:00
Neale Ranns
0cae3f737f Detailed Interface stats API takes sw_if_index
Change-Id: Id09d777c1706c1d613b14b719bcac596194465cd
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-21 20:22:27 +00:00
Neale Ranns
1cbb19f59f IGMP plugin initialises the FIB/MFIB via ip4 module
Change-Id: If9d7b266c4b49d4e7810ebc7d18fa154532d0322
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-21 10:19:15 -04:00
Matus Fabian
e877d68407 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>
2018-03-21 09:44:29 +00:00
Klement Sekera
4c53313cd7 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>
2018-03-21 00:01:44 +00:00
Neale Ranns
2303cb181b 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>
2018-03-20 23:59:06 +00:00
Steve Shin
f55957e71c 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>
2018-03-20 02:35:02 +00:00
Dave Wallace
e535644dd3 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>
2018-03-19 19:45:31 +00:00
Neale Ranns
f704f38943 Use x(void) not x() in new interface stats code
Change-Id: Iaceaba4dc22341c631c858516b960ce97c4aa564
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-19 18:02:09 +00:00
Florin Coras
5090c57c4d session: fix coverity warnings
Change-Id: I022dc40476ea9c30957b12bf1bd0629c6eb41cda
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-19 17:15:56 +00:00
Neale Ranns
19bd1902cb Coverity found bugs in recent MPLS changes
Change-Id: I590945fdc1af53208c990a52bbecdc992fd27532
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-03-19 17:10:41 +00:00
Neale Ranns
9a1f49ef30 QoS code coverity found errors
Change-Id: I6b125b79bdc560bfb81f307367c844b6a5af6368
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-03-19 17:10:06 +00:00
Neale Ranns
26600e6e33 FIB code coverity found defect
Change-Id: I7cdc29dd6481242aaace75138cc34e2f5ea76b81
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-03-19 17:09:43 +00:00
Dave Wallace
bc0796678d VCL: Fix Coverity CID183009
Change-Id: I0233b20eb4c7dcb325e15b97a22ecd54200f6fde
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-19 17:09:19 +00:00
Neale Ranns
6f4a6be8f2 Interface Unicast, Multicast and Broadcast stats on the API
Change-Id: I7c75da358aff1bd0216a602a49f2909cef5d920d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-19 15:56:23 +00:00
Jakub Grajciar
7b867a8e49 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>
2018-03-19 15:53:19 +00:00
Matus Fabian
489cc82922 QoS: publish qos.api.h file
Change-Id: Ice041610c23563ead13019216516aff23b7775b9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-19 15:36:56 +00:00
Ole Troan
1d977dceee IPIP: Fix coverity error.
Change-Id: Ia2b3350bf8e2c72eee3f33936ba16dd817c75c72
Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-19 15:36:38 +00:00
Neale Ranns
2bc940272e 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>
2018-03-19 13:09:45 +00:00
Dmitry Vakhrushev
f38bef46a3 FIX: Fixed ip6_fib_dump api function response.
Change-Id: I26c5d61bc2f6188bcd4ecac4b5e9385821b0398b
Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
2018-03-19 11:17:48 +00:00
Neale Ranns
2ae2bc5380 Remove unnumbered configuration on interface delete
Change-Id: Iae5532c3d53e208831f3b2782242d9e59d367087
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-18 03:16:49 -07:00
Florin Coras
33d162909f 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>
2018-03-16 09:13:37 -07:00
Neale Ranns
039cbfe254 QoS recording and marking
Change-Id: Ie5a50def4ec1e4a3b3404a8b6ab9ec248bc16744
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-16 20:28:50 +00:00
Dave Barach
0d65d11053 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>
2018-03-16 20:28:13 +00:00
Juraj Sloboda
c03742346f IPv6 ND Router discovery control plane (VPP-1095)
Change-Id: I4b5b60e7c6f618bb935eab1e96a2e79bbb14f58f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-03-16 20:07:51 +00:00
Klement Sekera
ff92efe107 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>
2018-03-16 19:16:02 +00:00
Matus Fabian
ce8805c6a6 IPSec: fix IPv6 policy deleting
Change-Id: I9f487d6033edde09557709f94f97fc8a70246b09
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-16 16:14:01 +00:00
Neale Ranns
bce6b7bcf9 remove spurious print statements from DVR tests
Change-Id: I3b1c71b144b4760922a467086fcdb410cd225c57
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-16 05:08:24 -07:00
Damjan Marion
8c257205b8 Fix sample-plugin build on ubuntu 18.04
Change-Id: Ia10aadc7f969b20e8cd50989230a80e7e21cbff4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-16 11:34:53 +00:00
Juraj Sloboda
4b9669dc11 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>
2018-03-16 10:37:18 +00:00
Florin Coras
e1b819efac session: allow local host binds
Change-Id: I906bbc5bc75279f210093fb9276db9e35ee44c1f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-16 02:20:09 +00:00
Damjan Marion
55f99675e5 remove bootstrap from top-level Makefile
Change-Id: I9f2a1ba9153ff57958b230a1ba2afeb9df50fd45
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-15 22:14:55 +01:00