3463 Commits

Author SHA1 Message Date
Klement Sekera
75e7d13014 IPv4/6 reassembly
Change-Id: Ic5dcadd13c88b8a5e7896dab82404509c081614a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-01 23:41:17 +00:00
Jon Loeliger
2b9453c55a vxlan: Lookup FIB in either IPv4 or IPv6 families.
Prior to this commit, the VXLAN "create" API assumed
the vrf_id belonged to only the IPv4 FIB tables space.
With this commit, the FIB table is found in either the
IPv4 or IPv6 table as determined by the is_ipv6 flag.

This follows the same pattern that was already being
done in the CLI code for the VXLAN "create" command.

Change-Id: I35d5e37db24efa858e4696dc2c004fa64bb4a4a8
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-02-01 14:53:28 -06:00
Jon Loeliger
735f8793bf FIB: Consolidate several copies of fib_ip_proto() into one.
Rather than having multiple copies of the same function
scattered around, promote the function into the FIB
PROTOCOL definitions in fib_types.h.

Change-Id: I11c4d85931167d3a5f3dc1278afecc8845b23cd7
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-02-01 19:23:49 +00:00
Steven
5c42f50d2d tcp: tcp_output.c failed to compile when VLIB_BUFFER_TRACE_TRAJECTORY is enabled
Fixed a typo in tcp_push_header(). The typo only kicks in when the macro
VLIB_BUFFER_TRACE_TRAJECTORY is enabled.

Change-Id: I62832a4932ec5b14e3063d5eac113780851aae59
Signed-off-by: Steven <sluong@cisco.com>
2018-02-01 09:17:17 -08:00
Eyal Bari
67a9e54cd4 dpdk:fix typo in prefetch sequence
Change-Id: I7110436626352d45ffe0ca71fb88dea2c77ab639
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-02-01 14:46:13 +00:00
Pierre Pfister
953f551e36 Add flowhash hash table to vppinfra
This hash table intends to provide an alternative to the widely
used bihash table in places where either:
- Hash entry timeout is required
- The hash table data does not fit in CPU cache

Although the bihash table is very fast, each lookup requires
accessing two cache lines in a serialized fashion. It works fine
when the hash table is in cache, but hits a wall when it does not.

The 'flowhash' table uses a simplified design (at the cost of a
less good bucket auto-scaling) where each access only requires
a single memory lookup (in the absence of collision). The hash
table also uses a reduced number of registers.

In practice, a VPP node implementing a stateful feature would
typically:
- prefetch buffer metadata (in-cache)
- prefetch packet header (in-cache)
- compute hash & prefetch hash bucket (possibly in RAM)
- read/write key and value from bucket

Using this hash table, it is possible to pipeline accesses in a way
that does not exhaust CPU's line field buffers, even when the
requested value is located in RAM (i.e. not in cache).

Measurements showed it was possible to scale to tens of millions
of flows (with a full 5-tuple matching and 32B value, i.e. 1
cache line per flow) with no performance degradation when
the hash table grows to the point it doesn't fit in cache anymore.

I have used this table in a couple of non-open-sourced projects,
but think it might be useful to lb, nat, and possibly other VPP
subsystems.

More information in the .h file.

Change-Id: I2b13dde0eabd868b75da1cedbfca0bf74d705102
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2018-02-01 12:48:05 +00:00
Francois Clad
be9b41ba38 srv6-ad: fixing coverity issues
Change-Id: Ica6d8dd773bb3b478f1c7e40d59dfbdd4b588b85
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-02-01 11:03:51 +00:00
Francois Clad
49d8cddaba srv6-as: fixing coverity issues
Change-Id: I911e09aadd3df1123634fd97098920f107f9a2fc
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-02-01 11:00:07 +00:00
Damjan Marion
4edb2e4a8d Fix VNET_BUFFER_F_SPAN_CLONE flag
Change-Id: I670e41bcfc61a45555431603c937f8dad4d165e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-31 21:11:26 +00:00
Jon Loeliger
190282cb0a RPMS: Also install C.py, JSON.py for vppapipgen.
When building plugins outside of the VPP tree, the vppapigen
tool requires the use of the C.py / JSON.py code.  To that end,
install it in /usr/share/vpp as referenced.

Change-Id: I457d58e7bde7140c7811fa0a93b4f44d1310784a
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-01-31 19:14:17 +00:00
Steven
899a84b302 vlib: allocating buffers on thread-x and freeing them on thread-y causes
a crash on debug image (VPP-1151)

In debug image, there is extra code to validate the buffer when it is
freed. It uses the hash table to lookup the buffer index with spinlock
to prevent contention. However, there is one spinlock for each worker
thread. So allocating the buffer on thread-x and freeing the same buffer
on thread-y causes the validation to fail on thread-y. The fix is to
have only one spinlock, stored in vlib_global_main.

Change-Id: Ic383846cefe84a3e262255afcf82276742f0f62e
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit a7effa1b072463f12305a474f082aeaffb7ada4b)
2018-01-31 17:43:32 +00:00
Neale Ranns
8269d3dbe7 Improved tracing for the IP[46] not-enabled case.
now we get
00:00:03:665501: pg-input
 ...
00:00:03:665681: ethernet-input
 ...
00:00:03:665691: ip6-input
  UDP: 2001::1 -> ffef::1
    tos 0x00, flow label 0x0, hop limit 64, payload length 108
  UDP: 1234 -> 1234
    length 108, checksum 0x7b25
00:00:03:665695: ip6-not-enabled
    UDP: 2001::1 -> ffef::1
      tos 0x00, flow label 0x0, hop limit 64, payload length 108
    UDP: 1234 -> 1234
      length 108, checksum 0x7b25
00:00:03:665706: error-drop
  ethernet-input: no error

Same goes for IPv4

Change-Id: Ia360df39b43281d3a0aa1b686f04b73cfa37c546
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-31 17:42:27 +00:00
Matus Fabian
f2a23cc860 NAT66 1:1 mapping (VPP-1108)
Support the 1:1 translation of source address for IPv6

Change-Id: I934d18e5ec508bf7422d796ee5f172b79c048011
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-31 17:29:13 +00:00
Matus Fabian
f7ad5cbe81 NAT44: in2out output feature skip translation for already translated packets (VPP-1156)
Change-Id: I5395245c9e49f741a949ada1f725c34f9379c249
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-31 17:28:55 +00:00
Matus Fabian
b793d097c5 NAT44: Delete dynamic sessions matching new 1:1NAT (VPP-1158)
Change-Id: Ib99b597502b8335e57ecfa122b12e2e5aa45ee1a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-31 05:51:16 -08:00
Matus Fabian
9dba7816f6 NAT44: nat44_static_mapping_details protocol=0 if addr_only=0 (VPP-1158)
Change-Id: I1e3cfc751e7657464fc850dc56ddf763df45f62e
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-31 01:13:23 -08:00
Marco Varlese
8ad6a2dfed Prep-work patch for congestion-control
This patch addresses the missing field in various data-structures to
track valuable information to implement the congestion-control
algorithms and manage sub-connections states.

It adds the possibility to queue up to 2 SACKs chunks when the connection
is not gapping.

At the same time, it pushes some variable/field renaming for better
readibility.

Change-Id: Idcc53512983456779600a75e78e21af078e46602
Signed-off-by: Marco Varlese <marco.varlese@suse.de>
2018-01-31 03:29:33 +00:00
Dave Barach
8d6ef60b76 Compile valloc.c, install header file, etc.
Change-Id: Ibc252d9ed595be955790ec1c97d8730e43ad89b2
Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-30 14:12:57 -05:00
Billy McFall
28cf3b7da2 VPP-899: Run VPP under SELinux
Add an SELinux profile such that VPP can run under SELinux on RPM based
platforms. The SELinux Policy is currently only implemented for RPM
packages, specifically, Fedora, CentOS and RHEL. Doxygen User
Documentation has been included (selinux_doc.md). Once some discussion
on file locations has completed (see vpp-devlist), updates to the Debug
CLI documentation will also need to be updated.

Additional changes:
Patch Set 2:
- Rework selinux_doc.md such that each line is only 80 characters
  instead of each sentence on a line. Made additonal minor chnages
  to the text.
- Update vHost Debug CLI documentation to reflex new socket location.
  Cleaned up some text from when I originally wrote it, to better
  reflex proper use.
- Update exec Debug CLI documentation to be more inline with suggested
  helptext, added text regarding recommended script file location.
- For Debian builds, create the /var/log/vpp/ directory. I don't use
  Debian very much, so please pay extra attention to
  build-data/platforms.mk and build-root/deb/debian/.gitignore.
- Per discussion on VPP call, changed the default log location to
  /var/log/vpp/vpp.log.
- Changed the socket location for vHost in AutoConfig to
  /var/run/vpp/.
Patch Set 3:
- Update selinux_doc.md based on comments.

Change-Id: I400520dc33f1ca51012d09ef8fe5a7b7b96c631e
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2018-01-30 13:26:20 +00:00
Brian Brooks
c0379aec24 Arm system counter cleanup
Add some description and cleanup code that uses Arm system counter.

Change-Id: Ie1fe00e3e4b5d98867617b7b0184ac526e333c53
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
2018-01-30 13:23:31 +00:00
Matus Fabian
bc39e3470c NAT: add missing CLI and API documentation (VPP-1142)
Change-Id: I4e93595665b8d0e373c4df27311c27a51222961c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-30 09:23:56 +00:00
Matus Fabian
6898507b42 NAT: replace format_vnet_sw_interface_name with format_vnet_sw_if_index_name (VPP-1149)
Avoid crash when interface was deleted.

Change-Id: I2ac3031c13ca5ad3360495e1c4cb90b0002be5ff
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-30 09:22:24 +00:00
Neale Ranns
db14f5aff6 Allow the provider of a midchain adjacency to pass context data that is returned in the fixup function
Change-Id: I458e6e03b03e27775df33a2fd302743126d6ac44
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-30 08:54:29 +00:00
Florin Coras
bb16d3ffec vcl: fix VPPCOM_ATTR_GET_LIBC_EPFD elog
Change-Id: Idc3e8f4ee69d8871534a94d4f485e695fac81756
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-29 09:02:43 -08:00
Vijayabhaskar Katamreddy
c592ca527a DRAFT ip4/6_frag to support DPO Style based Next Node
Change-Id: I1df3d23c1c5668b83d52b41f51c0e3f24183af9e
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-01-29 15:50:36 +00:00
Jon Loeliger
30349b075c memif: Add new API calls to manage memif socket names.
New API calls and corresponding CLI commands allow the user
to manage the socket filenames for memif connections using:

    vppctl# create memif id <u32> filename <socket-filename>
    vppctl# delete memif id <u32>

and then referencing it later in a memif interface:

    vppctl# create memif <u32> socket-id <id> mode <mode> <master|slave> ...

Corresponding VAT cli entries have also been added.

The default memif socket file at id 0 are still always present.
The existing memif create/delete CLI commands have been slightly
altered into the new syntax:

    vppctl# create interface memif ...
    vppctl# delete interface memif ...

Change-Id: If2bdc7eac3d81e1d9011a5869747e52fc5e11639
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-29 13:09:57 +01:00
Francois Clad
b4d43d7901 SRv6 dynamic proxy plugin
Change-Id: Ie460005510b8a70d00de31b6651e762cc3a63229
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-01-29 11:05:48 +00:00
Neale Ranns
b93078df66 Remove last vestigies of auto-ip-table create
Change-Id: If0f8472c0de5e324b24c9c672c0f8b57cc9f49a8
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-01-29 10:32:21 +00:00
Florin Coras
84a30ef2b5 session: use clib rwlocks instead of custom implementation
Change-Id: I68933d709ce9cc686ba06466e136434b663920ef
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-27 19:02:12 +00:00
Dave Barach
6484a68215 First-fit virtual space allocator
Change-Id: I75e6c7d1a6ff1fcebc81ec10bd86b79f2bf3dc22
Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-27 18:53:02 +00:00
Florin Coras
fc804d9cf1 Fix session/tcp coverity warnings
Change-Id: I5c404eacb4a6c1e16485a6656168d9171ff49a8b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-27 10:51:10 +00:00
Marek Gradzki
d1660e9800 jvpp: map VPP API enums to primitive types
Adding enum support (VPP-1153) requires
JVPP generator refactoring
(see: VPP-1154, VPP-1155, VPP-480)

As a workaround we just update all the mappings
used for VPP API definitions to JAVA and C/JNI translation.

Change-Id: I9dff83e5199039a1a46a3d4685ce57cdeeeb2014
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-01-27 10:50:52 +00:00
Marek Gradzki
568cc60b70 jvpp: use Python's logging API
Change-Id: Iec437e4672af1f0d1a24458afb977ba6fbeba4ed
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-01-27 10:50:52 +00:00
Florin Coras
2f8d8fa501 session: disconnect and echo client improvements
Change-Id: If421bad17b6cfe8e321257c93bb38931e37d7b64
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-27 10:49:55 +00:00
John DeNisco
a7da67fcc6 Add support for 18.01.
Fixed bugs.
Improved some config as the result of Tetration experience.

Change-Id: Ie4b8d2d77ca3ad165675c42fa2d9a4798d871f9d
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-01-26 14:55:33 -05:00
Florin Coras
4399c2eb84 session: move builtin apps to their own folder
This consolidates builtin apps under session-apps folder. It also
removes duplicate builtin echo server/client implementations.

Change-Id: I75ed879399c5aa9b75b1eb38b33aedf69dd8df3f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-26 16:15:13 +00:00
Matus Fabian
87233b51bc NAT44: fix ICMP error translation for endpoint dependent sessions (VPP-1150)
Change-Id: I85c799f28c4246884107e569a36482af10d9be9d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-26 12:46:23 +00:00
Matus Fabian
5f22499e88 NAT44: add opaque string tag to static mapping APIs (VPP-1147)
Change-Id: I620e2081285ca8ac5c2da8efc12fe6f540ea4fd1
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-25 22:00:31 -08:00
Florin Coras
1f9600e50f vppinfra: add readers-writer lock
Change-Id: I606fd89c410369cbd9ce9dcaaaa9dc58796e7c0e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-25 23:54:22 +00:00
Florin Coras
b384b54331 session: add support for memfd segments
- update segment manager and session api to work with both flavors of
  ssvm segments
- added generic ssvm slave/master init and del functions
- cleanup/refactor tcp_echo
- fixed uses of svm fifo pool as vector

Change-Id: Ieee8b163faa407da6e77e657a2322de213a9d2a0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-25 23:53:35 +00:00
Keith Burns (alagalah)
4e578068fc Event log entries for VCL
Change-Id: I8303859ef65552f64c94525c9b1112ec9a1a88d0
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-01-25 21:45:00 +00:00
Dave Wallace
6f93da18a8 18.01 Release Notes
Change-Id: I2493a6135aecb4e2eead20a71dcb9ca16834cd63
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 9d21268d0a2277fb5a70db960d0d538620401834)
2018-01-25 18:54:50 +00:00
Jan Gelety
7e6f8cc4b6 Update CSIT tests 180115 -> 180122
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I1a5afd49c37e1faf59311e16389b3b5deff015a3
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-01-25 16:31:42 +00:00
Ole Troan
2eaf2d26fd VPP-1144: PAPI Import leads to duplicate type definition.
Change-Id: I54c147004fd93681a6a9cf30fa5277c1dabce67c
Signed-off-by: Ole Troan <ot@cisco.com>
2018-01-25 13:43:34 +00:00
Francois Clad
9f30c1708f srv6-as: fixing version
Change-Id: I0ce60729e82536d9a97823bc6701e62bf364ea6c
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-01-25 13:28:04 +00:00
Matus Fabian
82119542a8 NAT: nat.c refactor (split out CLI) (VPP-1140)
Moved CLI from nat.c to nat44_cli.c
Split "show nat44" to:
show nat44 addresses
show nat44 interfaces
show nat44 static mappings
show nat44 interface address
show nat44 sessions detail
show nat44 deterministic mappings
show nat44 deterministic timeouts
show nat44 deterministic sessions
show nat workers

Change-Id: I2d1be8941dd0e4a9e037f4a4d2cd192389beb8ed
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-25 12:56:00 +00:00
Gabriel Ganne
b295782c02 fixup python ply package name for fedora >= 25
package name is:
 * python-ply for centos7/rhel7
 * python2-ply / python3-ply for fedora >= 25

Change-Id: Id021802a46a0cc29e9db57e18841a76575437002
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2018-01-25 10:05:18 +01:00
Klement Sekera
da38715fa9 make test: verify that /dev/shm is big enough
Verify that /dev/shm size is >= 512M, which should be enough for `make
test' needs. If the verification fails, try to enlarge it automatically.
This helps avoid docker vpp/make test crashes (seen as SIGBUS).

Change-Id: I4e23d59ff8bf8befc320fa229fb6c9bfeb809a8f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-01-25 03:30:17 +00:00
Francois Clad
39d91fe248 SRv6 masquerading proxy plugin
Change-Id: Ia65cf2c7b7fdf84c64e60af4cc815251022c53a9
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-01-25 03:22:17 +00:00
Jon Loeliger
28227ad316 Makefile: Add python-ply to RPM_DEPENDS list.
Change-Id: I1bbb29ec2303f87c0053691fc157a747bff1626d
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-01-24 13:47:46 -06:00