Age | Commit message (Collapse) | Author | Files | Lines |
|
This provides a functional interface to IP fragmentation.
Allowing external features to fragment. Supports
arbitrary encap size, for e.g. MPLS or inner fragmentation
of tunnels.
This also removed dual loop in MAP that was fundamentally broken.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ia89ecec8ee3cbe2416edbe87630fdb714898c2a8
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Type: feature
fts and trex rely on yaml config files. Verify
that they are valid, so comitters can catch
errors early.
Change-Id: Ide0bb276659119c59bdbbc8b8155e37562a648b8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Type: fix
Since CentOS 8, RPM build script doesn't accept '#!/usr/bin/env python'
as a valid shebang line. It requires scripts to explicitly chose
between python2 or python3.
Change all to use python3 as suggested by Paul Vinciguerra.
Depends-On: https://gerrit.fd.io/r/23170
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: Ie72af9f60fd0609e07f05b70f8d96e738b2754d1
|
|
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Icbe9ca3dc738c6575fe382740a1cc9d29a4a74ff
|
|
Remove map's implementation of reassembly and use common
ip6-full-reassembly functionality. This makes it easier to maintain by
removing duplicate code/functionality.
Type: refactor
Change-Id: I430e888b704e28c100a9ce075d1460cb529e4676
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
This patch allows ip4-map-t plugin to drop
packets if DF flag is set and packet size
is bigger than MTU
Type: fix
Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: I0c1531a1f876d9efc8e7e2bff9804f298becdb68
|
|
Replace erroneous INDENT-OFF with INDENT-ON and reformat code which is
non-conforming wrt to code style.
Type: style
Change-Id: Ia3310371e96b248e5da143fad8fdca3b2fb6650b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
This change is part of an effort to unify reassembly code. By removing
shallow virtual reassembly functionality in MAP and using the common
vnet provided shallow virtual reassembly, code size and complexity
is reduced.
Type: refactor
Change-Id: Iec8edd039f7b967b53e17bb9bca228a8b452ac0c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
This change is part of an effort to unify reassembly code. By removing
shallow virtual reassembly functionality in MAP and using the common
vnet provided shallow virtual reassembly, code size and complexity is
reduced.
Type: refactor
Change-Id: I431f47d4db97154fecaeaecd6719cfc3b83cfc4a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
Split generation of API message enum and the typedefs into
separate files, so that the type file can be included from
elsewhere.
Generate a C file for VPP that contains the API registration,
this was previously done via X macros by the C pre-
processor.
This allows deleting lots of skeleton/copy paste code
for each feature.
plugins/flowprobe
plugins/map
examples/sample-plugin
vnet/ipip
used as Guinea pigs.
Generate a C Test file for VAT, that does the same for VAT plugins.
Also add support for a per-message CLI option, that is currently
limited to VAT help text. option vat_help = "<help text>";
Type: refactor
Change-Id: I245e3104bb76f7e1fb69a59ab20cc7c8dfcdd460
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
In addition to the external vppapitrace tool, VPP itself supports dumping of API trace files.
In two formats, "custom-dump" and "dump". "dump" gives a human friendly list,
and "custom-dump" is meant to give a list of commands that can be fed to VAT.
This patch only deals with "dump".
Prior to this fix, auto-generation was only done for the basic types.
This fix adds support for any type, including lists, and supports pretty-printing
of enums, strings, IP addresses, MAC addresses and so on.
Usage: api trace dump <api-trace-file>
For example
Change-Id: I4e485680e6dcfce7489299ae6cf31d835071ac40
---------- trace 48 -----------
vl_api_sw_interface_set_flags_t:
_vl_msg_id: 75
client_index: 0
context: 10
sw_if_index: 1
flags: IF_STATUS_API_FLAG_ADMIN_UP
---------- trace 49 -----------
vl_api_sw_interface_add_del_address_t:
_vl_msg_id: 88
client_index: 0
context: 11
sw_if_index: 1
is_add: 1
del_all: 0
prefix: 172.16.1.1/24
---------- trace 51 -----------
vl_api_cli_inband_t:
_vl_msg_id: 819
client_index: 0
context: 13
cmd: packet-generator capture pg0 pcap /tmp/vpp-unittest-TestMAP-YhcmDX/pg0_out.pcap disable
---------- trace 58 -----------
vl_api_ip_neighbor_add_del_t:
_vl_msg_id: 199
client_index: 0
context: 20
is_add: 1
neighbor:
sw_if_index: 2
flags: IP_API_NEIGHBOR_FLAG_NONE
mac_address: 0202.0000.ff02
ip_address: fd01:2::2
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I5556d06008de2762e7c2d35a8b0963ae670b3db1
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Type: fix
Change-Id: Ia3a4693acd5eab234f60b37436c5b642b00bda46
Signed-off-by: Benoît Ganne <bganne@cisco.com>
|
|
Enforce that variable length fields are the last element of API messages.
Add a 'fixed' version of string type, since dealing with
multiple variable length strings turned out too painful
for the C language bindings.
The string type is now:
{
string name[64]; // NUL terminated C-string. Essentially decays to u8 name[64]
string name[]; // Variable length string with embedded len field (vl_api_string_t)
};
The latter notation could be made available to other types as well.
e.g.
{
vl_api_address_t addresses[];
}
instead of
{
u32 n_addr;
vl_api_address_t addresses[n_addr];
};
Type: fix
Change-Id: I18fa17ef47227633752ab50453e8d20a652a9f9b
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
- Relocate plugin tests for 'make test' into
src/plugins/*/test so that plugin test cases
are co-located with the plugin source code.
Type: refactor
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I503e6a43528e14981799b735fa65674155713f67
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
When working on the lb api, one of the field names was chosen as 'as'
(application server). Since 'as' is a python keyword, the field was
renamed to _1 in vpp_papi.
This changeset instead fails early with a descriptive message,
hopefully saving others time troubleshooting the issue.
ValueError: Fieldname 'as' is a python keyword and
is not accessible via the python API.
Type: feature
Change-Id: Ib048d97de0e392645540092e356cf8989848c947
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Spinlock performance improved when implemented with compare_and_exchange
instead of test_and_set. All instances of test_and_set locks were refactored
to use clib_spinlock_t when possible. Some locks e.g. ssvm synchronize
between processes rather than threads, so they cannot directly use
clib_spinlock_t.
Type: refactor
Change-Id: Ia16b5d4cd49209b2b57b8df6c94615c28b11bb60
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
|
|
All instances of test_and_set locks used the following sequence
to release the locks:
CLIB_MEMORY_BARRIER ();
p->lock = 0; // p is a generic struct with a TAS lock
Use clib_atomic_release to generate more efficient assembly code.
Type: refactor
Change-Id: Idca3a38b1cf43578108bdd1afe83b6ebc17a4c68
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
|
|
Modified test-and-set spin locks to call CLIB_PAUSE () when spinning
for code consistency. Decreases the memory bandwidth consumed.
Type: fix
Change-Id: I1cca4f87f44f23f257c7a35466cd2e7767072f51
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
|
|
Encoding the vpp node index into the vlib_error_t as a 10-bit quantity
limits us to 1K graph nodes. Unfortunately, a few nodes need 6 bit
per-node error codes. Only a very few nodes have so many counters.
It turns out that there are about 2K total error counters in the system,
which is (approximately) the maximum error heap index.
The current (index,code) encoding limits the number of interfaces to
around 250, since each interface has two associated graph nodes and we
have about 500 "normal, interior" graph node
This patch adds an error-index to node-index map, so we can store
error heap indices directly in the vlib_buffer_t.
Type: refactor
Change-Id: I28101cad3d8750819e27b8785fc0cf71ff54f79a
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Instead of all clients directly RR sourcing the entry they are tracking,
use a deidcated 'tracker' object. This tracker object is a entry
delegate and a child of the entry. The clients are then children of the
tracker.
The benefit of this aproach is that each time a new client tracks the
entry it doesn't RR source it. When an entry is sourced all its children
are updated. Thus, new clients tracking an entry is O(n^2). With the
tracker as indirection, the entry is sourced only once.
Type: feature
Change-Id: I5b80bdda6c02057152e5f721e580e786cd840a3b
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
clib_net_to_host_f64, clib_host_to_net_f64 are now implemented as '=',
https://gerrit.fd.io/r/#/c/20406/ set papi to match.
- all f64 api references are now wrapped with
clib_net_to_host_f64 or clib_host_to_net_f64.
IEEE f64 endianess is not defined. If clib_net_to_host_f64 and
clib_host_to_net_f64 are later defined in VPP as big-endian, it is
a single character change in the papi vpp_serializer.
Note: This breaks the api in a manner that would not be detected by
the flag day initiative. The scope is small. This only impacts map.api,
which applied the u64 transformation, while the gbp api uses '='.
The implementation of "=" raises issues for the papi socket implementation
if used between systems of differing endianess. See Vratko's comments.
- Added get_f64_endian_value() to api to allow client to verify endianess of f64's.
Type: fix
Depends-on: https://gerrit.fd.io/r/#/c/20484/
Change-Id: I00fc64a6557ba0190398df211aa0ea5c7eb101df
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
format_vl_api_prefix_t returns a dict with keys 'address' and 'address_length',
but other format_vl_api_prefix functions return a dict with 'prefix', and 'len'.
Refactor all format_vl_api_prefix_t to return consistent keys 'address' and 'len'.
Type: refactor
Change-Id: I5f9558fc2da8742a303266e011102f5b2db80aad
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
using inlines exposes the users to the internal data types used by VPP, namely vec.h. This file does not compile with a C++ compiler.
Type: feature
Change-Id: I1544fdd9eae998309f865df61df78571bdb96903
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Previous use of strndup() required user to remember to call free().
Now return a vector pointing directly to the API message string.
Of course user must remember to copy the string out if lifetime
is longer than API message lifetime.
Change-Id: Ib5e2b3d52d258e1a42ea9ea9a9e04abbe360e2bf
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Add tooling for feature metadata configuration files.
The main tool is in src/scripts/fts.py
make checkfeaturelist to validate against schema.
make featurelist to dump all feature lists to stdout.
Example feature definition:
name: IP in IP tunnelling
maintainer: Ole Troan <ot@cisco.com>
features:
- IPv4/IPv6 over IPv4/IPv6 encapsulation:
- Fragmentation and Reassembly
- Configurable MTU
- Inner to outer Traffic Class / TOS copy
- Configurable Traffic Class / TOS
- ICMPv4 / ICMPv6 proxying
- 6RD (RFC5969):
- Border Relay
description: "Implements IP{v4,v6} over IP{v4,v6} tunnelling as
described in RFC2473. This module also implement the border relay of
6RD (RFC5969)."
state: production
properties: [API, CLI, STATS, MULTITHREAD]
missing:
- Tunnel PMTUD
- Tracking of FIB state for tunnel state
- IPv6 extension headers (Tunnel encapsulation limit option)
JSON schema is embedded in fts.py
Example markdown: https://github.com/otroan/scratch/blob/master/features.md
Change-Id: I903b4ee6b316a9378c259e86dc937092e5d4b7da
Type: make
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
* Add optional tag to api call in tests
* Add test for map_domain_dump() for api code coverage.
Type: fix
Change-Id: I2f7784aecdca4bf9e94de3319f959786e3d2c607
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
- Make plugin descriptions more consistent
so the output of "show plugin" can be
used in the wiki.
Change-Id: I4c6feb11e7dcc5a4cf0848eed37f1d3b035c7dda
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
Change-Id: I965229f5bf8fcde9176357536a23ba8056542919
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Like other entities, allow an arbitrray user-supplied 'tag'
field to be place on created MAP domains. It is also later
returned with the MAP details. You might be thinking "User
assigned MAP name" here.
As the MAP domain structure was at the limit of a cacheline size,
introduce a parallel "extra data" vector with non-essential domain
information in it.
Change-Id: Icc12b64cc4cb3e040c9a475908b19f6abaf4c293
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Change-Id: I6f0830b786ac46c69c867f73b044aab174e6210b
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Problematic:
- It didn't have its counters initialized, so vpp crashed
during a "show map stat"
- Not all the tests for "are there any domains" actually
accounted for the fake entry at pool slot 0.
- Dump details happily returned its bogus entry.
Change-Id: I57aaa9f63917686334fd4a9fa7bc80044bf1718c
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Change-Id: I4c8bc3fb057d57339ce282a31b0bb70ad16dd03e
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: I151c1afac2133ad32ad7779a59fffafee4b9de60
Signed-off-by: Jim Thompson <jim@netgate.com>
|
|
Change-Id: I6031f3f9cfa048a901a8424d33d47679115c2eb3
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Change-Id: I97c6475920b7f7028c2bb1117ff9e5f629a54b44
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Change-Id: I25c86aea23dff19656449b23133db27b1f062ac0
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: Iabc8bcddd1b30a3b14f3cfd13b3c0b77a63028d6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change-Id: I336919a1d3a9d1b404e375a30575cce5e5335137
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
In preparation for adding input feature MAP support, as opposed to
going via the FIB, add MAP's own LPM data structures.
Change-Id: Ie363f0961b0ac9dde2a0fb76cb0c58c904876974
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: I3c77cadaa7b677073af00407f368bd48d703fdac
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: I5f05f112e8002e8b57db5c7a215ca4778ab6f76a
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Change-Id: I82e95358a4d710f1ddd4c8de584f03798e2b85f1
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
[84/597] Building C object vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o
FAILED: ccache /usr/lib/ccache/cc -DWITH_LIBSSL=1 -Dvnet_EXPORTS -I/vpp/src -I. -Iinclude -march=corei7 -mtune=corei7-avx -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror -fPIC -Wno-address-of-packed-member -Wall -MMD -MT vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o -MF vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o.d -o vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o -c /vpp/src/vnet/ip/ip_types_api.c
/vpp/src/vnet/ip/ip_types_api.c: In function 'ip_address_union_encode':
/vpp/src/vnet/ip/ip_types_api.c:70:13: error: incompatible type for argument 1 of 'memcpy'
memcpy (out->ip6, &in->ip6, sizeof (out->ip6));
^
In file included from /usr/include/string.h:635:0,
from /vpp/src/vppinfra/string.h:55,
from /vpp/src/vppinfra/mem.h:55,
from /vpp/src/vppinfra/vec.h:42,
from /vpp/src/vppinfra/error.h:53,
from /vpp/src/vppinfra/hash.h:41,
from /vpp/src/vnet/ip/ip.h:43,
from /vpp/src/vnet/ip/ip_types_api.h:23,
from /vpp/src/vnet/ip/ip_types_api.c:16:
/usr/include/x86_64-linux-gnu/bits/string3.h:50:42: note: expected 'void * restrict' but argument is of type 'vl_api_ip6_address_t {aka struct _vl_api_ip6_address}'
__NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
^
/vpp/src/vnet/ip/ip_types_api.c:72:13: error: incompatible type for argument 1 of 'memcpy'
memcpy (out->ip4, &in->ip4, sizeof (out->ip4));
^
In file included from /usr/include/string.h:635:0,
from /vpp/src/vppinfra/string.h:55,
from /vpp/src/vppinfra/mem.h:55,
from /vpp/src/vppinfra/vec.h:42,
from /vpp/src/vppinfra/error.h:53,
from /vpp/src/vppinfra/hash.h:41,
from /vpp/src/vnet/ip/ip.h:43,
from /vpp/src/vnet/ip/ip_types_api.h:23,
from /vpp/src/vnet/ip/ip_types_api.c:16:
/usr/include/x86_64-linux-gnu/bits/string3.h:50:42: note: expected 'void * restrict' but argument is of type 'vl_api_ip4_address_t {aka struct _vl_api_ip4_address}'
__NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
^
/vpp/src/vnet/ip/ip_types_api.c: At top level:
cc1: error: unrecognized command line option '-Wno-address-of-packed-member' [-Werror]
cc1: all warnings being treated as errors
[84/597] Building C object vnet/CMakeFiles/vnet.dir/ip/ip4_forward.c.o
ninja: build stopped: subcommand failed.
Makefile:691: recipe for target 'vpp-build' failed
make[1]: *** [vpp-build] Error 1
make[1]: Leaving directory '/vpp/build-root'
Makefile:394: recipe for target 'test' failed
make: *** [test] Error 2
DBGvpp# show cpu
Model name: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Microarchitecture: Haswell (Crystalwell)
Flags: sse3 ssse3 sse41 sse42 avx avx2 aes invariant_tsc
Base frequency: 2.49 GHz
DBGvpp# show version verbose
Version: v19.01-rc0~447-g3be662f
Compiled by: vagrant
Compile host: vpp
Compile date: Mon Dec 10 14:55:24 PST 2018
Compile location: /vpp
Compiler: GCC 5.4.0 20160609
Current PID: 14104
Change-Id: I6ff03bc5ad1c3517256e244b6986e9a1507a3349
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change-Id: Ic67073e1f2ebe54bee5cb96a951eb92a28b1de06
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Change-Id: Id8669bbadd1d6b2054865a310a654e9b38d1667d
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: I4e40bb6d6bf274a27892053f37aeeb81a7278965
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: Ic751fecc4a060eedcdb9eaf5d02e1416c838fd63
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
This reverts commit 0ae15ed43aaa600a75ca4c154bc62478820c00b4.
Re-add MAP CE support later. This patch polluted the code
with too many if (ce) ...
Change-Id: Ia0ffd6fdb452aa5d30abec57772c17fc16fb0dbd
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
|