8972 Commits

Author SHA1 Message Date
Vratko Polak
6fdd7a5f77 session: improve .api comments slightly
Type: style

Change-Id: Iccd2c205059abcdf121093ff03da603fe3dda1f7
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2020-05-05 17:27:46 +00:00
Mohsin Kazmi
1ab8b3c6f9 gso: fix the make test for ipip
Type: test

This commit fixes the make test for GSO/IPIP which are added in
following commit id: 84f91fa9c54f82c54b58ea3bf6e9ba22ff735d3a

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I66a57fe195e626b432ff0acba3a5bdf242a7a46e
2020-05-05 11:34:40 +00:00
Christian Hopps
f5d38e05ac api: ip: add IP_ROUTE_LOOKUP API
Add an IP_ROUTE_LOOKUP function that does either an exact match or
longest prefix match in a given fib table for a given prefix
returning the match if present.

Add API test.

Type: improvement
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-ID: I67ec5a61079f4acf1349a9c646185f91f5f11806
2020-05-05 11:25:58 +00:00
Filip Tehlar
2fdb41ae41 ikev2: remove sa from main thread
Type: fix

Change-Id: Ib73ce48552cfa9e825a6833f5594650783d82f3b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-05-05 10:44:42 +00:00
Chenmin Sun
ed63a0ff7b gtpu: RX offload for IPv6 payload supporting
this patch adds the offloading capability for the IPv4 GTPU
tunnel which the next-node is assigned as IPv6

Type: feature

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ie39cd43058d36514656351dc6e906a19d5de89c0
2020-05-05 09:50:32 +00:00
Chenmin Sun
350737cd45 flow: explicitly convert RSS function types in dpdk_plugin
explicitly convert RSS function types from vnet_rss_function_t to
rte_eth_hash_function to avoid these two types go out of sync in the future...

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ic09f6bb7f2cfbcf7cc4d380e51554b7f2b7a3b90
2020-05-05 09:49:26 +00:00
Mohsin Kazmi
84f91fa9c5 gso: add support for IP-IP
Type: feature

Change-Id: I37752af8496e0042a1da91124f3d94216b39ff11
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-05-05 07:44:12 +00:00
Klement Sekera
5ec6a4ea44 nat: remove unused code
Type: refactor

Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I33b2b38961b200dc3297b82124a7107b9ecbd0de
2020-05-05 06:44:40 +00:00
Dave Barach
bdfe5955f5 ethernet: add sanity checks to p2p_ethernet_add/del
Binary API message handlers need to check sw_if_index
values.

Found in binary api fuzz testing.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I51e717e9260e58a4c36d4d95981fd001be594fed
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-05-04 21:12:03 +00:00
Andrew Yourtchenko
08ad7804d5 misc: 19.08.2 Release Notes
Change-Id: I78f9edf9c15e9f4a2451be084c04c6318fbb978d
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit ec9ce338f05fb8bc90908ed17b8a0bc9eb8cd9f9)
2020-05-04 19:23:36 +00:00
Pivo
6017ff0dd7 vcl: allow vcl worker index to be set by applications
When using vppcom_session* apis to setup TCP sessions in applications build outside of the VPP repository, it is necessary to set the worker_index explicitly when these apis are called from the none-VCL worker threads. An example is when data is to be sent to the TCP session that is originated from a different thread, like the main program thread or from the bin api thread. This change allows the application to set it.

Type: fix

Signed-off-by: IJsbrand Wijnands <ice@cisco.com>
Change-Id: I37f3654a49ea9a8cf3a0d3d0e672583018c12299
2020-05-04 19:03:25 +00:00
Florin Coras
9845c20d77 session: add option to preallocate fifo headers
Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie47546ef36590b90ed481b14cf812afbecf7981c
2020-05-04 18:28:16 +00:00
Filip Tehlar
933c4ca5a0 ikev2: fix string in api
Type: fix

key file name should be a string and not array of u8.

Change-Id: I7d280d2397030e73732b374ad9d3146fad0bb19f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-05-04 18:12:10 +00:00
Paul Vinciguerra
d7a32ebd99 vapi: add support for defaults in typedefs
refactored out of Neale's change:
    https://gerrit.fd.io/r/c/vpp/+/26276

Type: refactor

Change-Id: Ibb0c019856dc44640e94d6d80a5d119a6296d95c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit a751d8d61fe5880f6d447e63b81e2df30561e9f9)
2020-05-04 17:26:28 +00:00
Neale Ranns
4ec36c5535 fib: midchain adjacency optimisations
Type: improvement

 - inline some common encap fixup functions into the midchain
   rewrite node so we don't incur the cost of the virtual function call
 - change the copy 'guess' from ethernet_header (which will never happen) to an ip4 header
 - add adj-midchain-tx to multiarch sources
 - don't run adj-midchain-tx as a feature, instead put this node as the
   adj's next and at the end of the feature arc.
 - cache the feature arc config index (to save the cache miss going to fetch it)
 - don't check if features are enabled when taking the arc (since we know they are)

the last two changes will also benefit normal adjacencies taking the arc (i.e. for NAT, ACLs, etc)

for IPSec:
 - don't run esp_encrypt as a feature, instead when required insert this
   node into the adj's next and into the end of the feature arc. this
   implies that encrypt is always 'the last feature' run, which is
   symmetric with decrypt always being the first.
 - esp_encrpyt for tunnels has adj-midchain-tx as next node

Change-Id: Ida0af56a704302cf2d7797ded5f118a781e8acb7
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-05-04 17:09:34 +00:00
Florin Coras
b723ccf95f tcp: fix max tx sack blocks upper bound
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I70c63db91c3512fb724bba4762e3ca1e369ca421
2020-05-04 14:14:57 +00:00
Dave Barach
7784140f2b misc: binary api fuzz test fixes
Add a hook to src/vlibapi/api_shared.c to fuzz (screw up) binary API
messages, e.g. by xoring random data into them before processing. We
specifically exempt client connection messages, and inband debug CLI
messages. We step over msg_id, client index, client context, and
sw_if_index. Otherwise, "make test" vectors fail too rapidly to learn
anything.

The goal is to reduce the number of crashes caused to zero. We're
fairly close with this patch.

Add vl_msg_api_max_length(void *mp), which returns the maximum
plausible length for a binary API message.

Use it to hardern vl_api_from_api_to_new_vec(...) which takes an
additional argument - message pointer - so it can verify that
astr->length is sane. If it's not sane, return a u8 *vector of the
form "insane astr->length nnnn\0".

Verify array lengths in vl_api_dhcp6_send_client_message_t_handler(...)
and vl_api_dhcp6_pd_send_client_message_t_handler(...).

Add a fairly effective binary API fuzz hook to the unittest plugin,
and modify the "make test" framework.py to pass "api-fuzz { on|off }"
to enable API fuzzing: "make API_FUZZ=on TEST=xxx test-debug" or similar

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I0157267652a163c01553d5267620f719cc6c3bde
2020-05-04 14:03:21 +00:00
Mohsin Kazmi
d88fc0fced tap: refactor existing flags
Type: refactor

This patch refactor the existing flags and also add a new
flag for packet coalescing.

Change-Id: Ic826e4c81313f26d87c475cdf666b06cbed60a3a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-05-04 13:56:29 +00:00
Filip Varga
6bb080f1e5 nat: per vrf session limits
Type: improvement

Change-Id: I170256ab47978db34fb0ff6808d9cd54ab872410
Signed-off-by: Filip Varga <fivarga@cisco.com>
2020-05-04 12:15:02 +02:00
Paul Vinciguerra
2f1563129a tests: vpp_interface remove deprecated packed properties
The api no longer requires packed ip addresses.

Type: test

Change-Id: If67365d86b7c3189f871a58234e99f9c8f875371
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-05-03 15:21:42 -04:00
Paul Vinciguerra
0b0a84c403 tests: improve vpp_papi_provider exception output
saves time debugging tests by replacing 'API call' with
the actual function signature:

  vpp_papi_provider.UnexpectedApiReturnValueError: API call failed, expected 0 return value instead of -2 in vxlan_add_del_tunnel_reply(_0=247, context=5052, retval=-2, sw_if_index=4294967295)

  vpp_papi_provider.UnexpectedApiReturnValueError: vxlan_add_del_tunnel(is_add=0, src_address=172.16.1.1, dst_address=239.1.1.209, vni=209, sw_if_index=26, mcast_sw_if_index=1, encap_vrf_id=None, instance=None, decap_next_index=None) failed, expected 0 return value instead of -2 in vxlan_add_del_tunnel_reply(_0=247, context=5052, retval=-2, sw_if_index=4294967295)

Type: test

Change-Id: Ie3b6a5fdb4e1d427d60c51f7a7bf815af0bb3de6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-05-03 13:52:46 -04:00
Ruslan Babayev
e31820af10 vlib: add nosyslog unix option
The "nosyslog" option disables syslog just like the "interactive" mode
but can be used together with "nodaemon".

This is useful for when VPP is running under a process supervisor like
runit or daemontools that pipe the stdout/stderr to a dedicated logger
service.

Type: feature

Change-Id: Ic4287338d6836fea9f3eabdcf960dc1f51875dd1
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2020-05-02 16:06:16 -07:00
Ruslan Babayev
24b417c481 ip-neighbor: honor walk callback return value
Type: fix

Change-Id: I5e1f7c37d612f4666edf2262b457ae0e13f20791
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2020-05-02 13:15:51 +00:00
Ruslan Babayev
7f286f720d api: fix include_guard when path contains a plus
The path to VPP source might contain a '+' when building it
with Yocto/OpenEmbedded.

Type: fix

Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
Change-Id: I205ac0de7d8726724af0e30f5b199391e05dc615
2020-05-01 17:06:52 -07:00
Paul Vinciguerra
073d74d0ba tap: implement sw_interface_tap_v2_dump filtering by sw_if_index
Type: feature

Change-Id: I6f607f383dc77a71e8712124f7613b38b4ac065a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-05-01 18:08:45 +00:00
Dave Barach
e891ac2f19 misc: add Matt Smith to the committer list
In hopes of restoring his +2 button...

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I2600daab5afa4334713695d1074706fbb287832f
2020-04-30 20:52:37 +00:00
Dave Barach
6068601c25 l2: fix coverity warnings in l2_fwd.c
Type: fix
Ticket: VPP-1837

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ibf468970b56fc6bf8d5fb6ba491dd3e727464fc0
2020-04-30 20:52:15 +00:00
Florin Coras
1a18d11eaf tcp: fix v6 ll lookup fib
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie4b2bca3b6b0ca6097152aab232991ca7935e442
2020-04-30 20:51:01 +00:00
Florin Coras
bf39597d41 session: cleanup listener segment manager on wrk free
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1585af9e4f4273f055aed824b133ddc8eddd1df7
2020-04-30 20:50:14 +00:00
Neale Ranns
240dcb24a0 ip-neighbor: Add flush API
Type: feature

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I96509c274895b917c3e220204d7959d9270de30d
2020-04-30 20:24:45 +00:00
Florin Coras
f3783e1501 hsa: bind af-unix socket only for echo tests
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6da8cc7c4577d199e9dc0aa52c73b1230a380018
2020-04-30 17:31:51 +00:00
Chenmin Sun
8b43aaaf16 flow: add l2tpv3oip flow
This patch adds the l2tpv3oip type flow support
Have tested on E810 with Intel iAVF driver

Type: feature

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Icb5114b5f70dd7a63f681e7c6ac802fade8b8cf1
2020-04-30 15:37:15 +00:00
Fan Zhang
f539578bac crypto: introduce async crypto infra
Type: feature

Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Signed-off-by: Dariusz Kazimierski <dariuszx.kazimierski@intel.com>
Signed-off-by: Piotr Kleski <piotrx.kleski@intel.com>
Change-Id: I4c3fcccf55c36842b7b48aed260fef2802b5c54b
2020-04-30 14:38:33 +00:00
Damjan Marion
162330f25a build: rework x86 CPU variants
Type: improvement
Change-Id: Ief243f88e654e578ef9b8060fcf535b364aececb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-30 13:25:29 +02:00
Florin Coras
dc0ded7dd7 vcl: disconnect both flavors of bapi transport on destroy
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6697296b45c5816a31535b0cf44b8e726292b8bb
2020-04-30 10:18:54 +00:00
Lijian.Zhang
690ce8672c build: support arch-specific compiling for Neoverse N1
Enable arch-specific compiling and dynamic optimal function selection
for Arm Neoverse-N1.

Support for -march=armv8.2-a+crc+crypto -mtune=neoverse-n1 for
Neoverse-N1 is added starting from gcc-9.2.0

                    without change  with change improvement
[L2 - 1x flows]     11.00 Mpps      11.46 Mpps  4%
[L2 - 10Kx flows]   6.83 Mpps       7.17 Mpps   5%
[L3 - 1x flows]     10.39 Mpps      10.78 Mpps  3.7%
[L3 - 10Kx flows]   6.67 Mpps       7.19 Mpps   7.8%

Type: feature

Change-Id: I5d24d17820b3dd6909b913202e8c31fc7d48650f
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com>
Reviewed-by: Govindarajan Mohandoss <Govindarajan.Mohandoss@arm.com>
2020-04-30 10:18:39 +00:00
Filip Tehlar
e09912001f ikev2: use thread local vlib_main in vlib_time_now
Type: fix

Change-Id: I8e4a47bd16fa8475ef695c09e3487eabf08faabe
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-04-30 10:16:13 +00:00
Matthew Smith
3d18fbf8e6 tap: allow deletion of tun interface
Type: improvement

tap_delete_if() returns early if the interface type is not
VIRTIO_IF_TYPE_TAP. Allow VIRTIO_IF_TYPE_TUN also and take
appropriate action for those interfaces.

Change-Id: I196b6d6f3f5e1543a14d6be76fd879d44c9794fd
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2020-04-30 07:59:52 +00:00
Damjan Marion
6e39ff03a6 build: detect GNU Assembler AVX-512 bug and disable AVX-512 variants if needed
Type: fix
Change-Id: I098f6c79be3c2e4db001edc0cf0a229bf6e0b13d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-29 20:04:03 +00:00
Tom Seidenberg
5a7f2f1224 ip: use thread local vm instead of thread main for vlib_time_now calls
Type: fix
Change-Id: I8d68e7c7392dcb748a2a84e72c7b1ca0c6c0eb07
Signed-off-by: Tom Seidenberg <tseidenb@cisco.com>
2020-04-29 17:48:55 +00:00
Damjan Marion
4ba16a44b1 misc: switch to clang-9
Type: improvement
Change-Id: Iebf77a63c0c19b130a3fbd26b5293304a9fed4c1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-29 17:20:47 +00:00
Florin Coras
a3108e65f3 hsa: cleanup ifdefs in sock tests
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1f03d80c4ee2a555dc6baa262d6df4521c1ae818
2020-04-29 16:39:16 +00:00
Benoît Ganne
3a76dc3f4f devices: vhost: simplify string copies for GCC-10
GCC-10 increases string truncations warnings. Refactor string copies
confusing it.

Type: refactor

Change-Id: I9720a0539059de00ab212ff2fc73055f04f5af1d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-29 15:18:52 +00:00
Mohsin Kazmi
28adbb3aef tap: fix missing "num-rx-queues" from cli help
Type: fix

Change-Id: Ib09c7cebb6978b3adc09ac36cb32f7947b143e51
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-29 13:10:08 +02:00
Florin Coras
d7586d50f6 vcl: add separate fcntl64 ldp handler
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idb81e2901398dd6ae94931c705a704c7b52bbb36
2020-04-29 08:45:39 +00:00
Paul Vinciguerra
c4ae0fffb5 interface: fix interface_types.api enums
Unspecified c enums start at 0.
Unspecified api enums start at 1.

Type: fix

Change-Id: I431c11302c0ad897a968134ce90496af3db7bb86
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-29 07:44:33 +00:00
Florin Coras
34de6fea13 flow: explicit rss function enum cast
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I8c0eb5b5b12ffac1ff5dc89cab10bdb8e4be4322
2020-04-29 04:08:47 +00:00
Dave Barach
77d9838282 vlib: add ASSERT to vlib_time_now(...)
Calling vlib_time_now (&vlib_global_main) from a worker thread is a bad
mistake. ASSERT (vm->thread_index == __os_thread_index) will catch it.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I55af6de84e06143f8f43adc62103b77267a7a441
2020-04-28 23:04:23 +00:00
Florin Coras
635f5068f0 svm: fix fifo alignemnt in batch prealloc
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5cdf3cff820a0679f78b212a277d1873c2cfb980
2020-04-28 21:50:55 +00:00
Benoît Ganne
049d0b438e vlib: use flexible array in vlib_buffer for GCC-10
GCC-10 increase overflows-related warnings but gets confused by 0-length
arrays. Use C99 flexible length array instead.

Type: fix

Change-Id: Ie62cfa8faaa408479a598785fd3f06ffd0233c7a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-28 21:19:22 +00:00