3803 Commits

Author SHA1 Message Date
Damjan Marion
b4ff07a2f8 Intel Adaptive Virtual Function native device driver plugin
Change-Id: If168a9c54baaa516ecbe78de2141f11c17aa2f53
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-26 12:39:36 +02:00
Florin Coras
f6647e0f36 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>
2018-03-25 21:22:41 +00:00
Klement Sekera
e1ace19b65 make test: fix DEBUG=gdb/gdbserver options
Change-Id: I5a7fa3b1c247ad5611907db27835724dcd31f575
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-24 15:20:41 +00:00
Klement Sekera
b6866046df make test: fix ext build on centos
Change-Id: I2b01f73c4b10a230310a65b6f35526818bf4f76d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-24 15:20:29 +00:00
Klement Sekera
3d6edf5a96 make test: use vpp-dev repo for py-lispnetworking
Change-Id: Ia87d55cad1d466a4cc624f06abbc322cddb5608c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-24 15:20:11 +00:00
Klement Sekera
8432e6e6f7 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>
2018-03-24 15:19:07 +00:00
Klement Sekera
9b6ece7952 make test: enhance core-file information
Change-Id: I1283960a9a49f6d70b9d7b7793cfb345c22ccdea
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-24 15:17:30 +00:00
Matthew Smith
f0d0ddbff2 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>
2018-03-24 07:24:13 +00:00
Neale Ranns
1f2f4b7055 Add client hw address to DHCP offer and ack in test case
Change-Id: Ifc9bb4ea39b504372a6a39bbf56c29761d0c6111
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-23 11:53:24 -07:00
Andrew Yourtchenko
563a8531cb 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>
2018-03-23 18:18:41 +00:00
Dave Barach
4585eb86c5 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>
2018-03-23 18:17:52 +00:00
Marco Varlese
4631610a20 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>
2018-03-23 17:18:27 +00:00
Florin Coras
81a13db67f tcp/session: sprinkle prefetches
Change-Id: Idef3c665580c13d72e99f43d16b8b13cc6ab746f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-23 14:30:06 +00:00
Florin Coras
0bee9ce4af session: allow builtin apps to register names
Change-Id: I4b428e170436671b329657283cf7653befc85c9f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-23 14:20:10 +00:00
Andrew Yourtchenko
beca266229 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>
2018-03-23 13:00:52 +00:00
Andrew Yourtchenko
915899a827 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>
2018-03-23 13:00:00 +00:00
Klement Sekera
13a83ef4d4 make test: code cleanup
Change-Id: Ic689de569e5b6e6209d16d6acdb13c489daca1f5
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-23 12:57:41 +00:00
Matus Fabian
3f2dd30b0b NAT44: fix ICMP checksum update crash (VPP-1205)
Change-Id: I3e4bbfe205c86cb0839dd5c542f083dbe6bea881
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-23 11:48:49 +00:00
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