10701 Commits

Author SHA1 Message Date
Paul Vinciguerra
dc22c839f0 tests: clean up gbp calls from vpp_papi_provider
Move info from vpp_papi_provider to .api/vpp_objects

Change-Id: Iaf46483fda2840dfec8d37e0b9262e1c9912be59
Type: test
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-04-26 06:05:52 +00:00
liuyacan
9f299030fd session: fix race condition in fifo allocation
Under some timing conditions,VCL may receive CONNECTED/ACCEPTED
event before ADD_SEGMENT event.

Timing example:

2 threads call segment_manager_alloc_session_fifos() parallelly

         Thread 1                Thread 2

       sm read lock                 |
            |                       |
     try to alloc fifo =>failed     |
            |                       |
       sm read unlock               |
            |                       |
       sm write lock                |
            |                       |
       add segment                  |
            |                       |
       sm write unlock              |
            |                  sm read lock
            |                       |
            |               try to alloc fifo=>successful
       sm read lock                 |
            |                  sm read unlock
            |                       |
            |                 emit CONNECTED/ACCEPTED
   emit ADD_SEGMENT event
            |
       sm read unlock

This commit move ADD_SEGMENT notification under the protection
of the write lock in some scenarios.

Type: fix

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I25d5475c5e6d37cfccefa9506f6030c26ce8ee9b
2021-04-26 04:25:40 +00:00
Damjan Marion
b14c49d227 vppinfra: add COMPILE_TIME_CONST() macro
Type: improvement
Change-Id: I10d7489f57bc60eb92049962b4e6ea84974f17b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-25 20:48:53 +00:00
Damjan Marion
e984831e07 vppinfra: AVX512 mask load/stores and compress store
Type: improvement
Change-Id: Id6be598aade072653e408cca465e62931d060233
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-25 17:43:34 +00:00
Damjan Marion
e21a0b2604 vppinfra: add clear_lowest_set_bit() function, use BMI2 if available
Type: improvement
Change-Id: I973cacd0cade0ca98e6261c1fb026a5eb38b44d3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-25 10:59:42 +02:00
Klement Sekera
1ca6c65e51 nat: correct detection of icmp bypass presence
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Iead167e7497e0779c440f7fb243014a06ae2b452
2021-04-23 19:59:27 +00:00
Nathan Skrzypczak
3e38422ab9 vxlan: Fix L3 mode
Type: fix

Partially revert fix SEGV reported in VPP-1962
[commit a4b0541f64eef02fa0d003d8f831cfdeb45d3668]

This adds an is_l3 option to choose between L2 & L3
mode add tunnel creation time

Change-Id: Ia2c91a1099074b7d23fc031b78ed0f68628eeabe
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-04-23 19:23:12 +00:00
Florin Coras
893bc97ed6 session: set connected session index for ct
Set connected session index for ct as well.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id82ffcf5572b6a9d2769c0e685c7a0b4d1ea9e9f
2021-04-23 16:04:00 +00:00
Alexander Chernavin
961d363112 dpdk: support md5 async handler in dpdk cryptodev
With this change, enable MD5 with AES-CBC support in dpdk cryptodev.

Type: improvement
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: Ic587aaa1fa0dc102e36eb34f329ef21a16156f26
2021-04-23 16:02:18 +00:00
Florin Coras
607ece36b6 tcp: try to update sack list only if not empty
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ieb5af96de5be33356dbab7bc4ab4696731fa8866
2021-04-23 15:24:26 +00:00
Florin Coras
6469840803 tcp: reorganize connection members
Optimize connection size and move timestamp_delta closer to other
timestamp related members.

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iec42efb46482ebfdf234518a4e91af836e4f4c07
2021-04-23 15:00:50 +00:00
Florin Coras
e5f18337f1 tls quic: improve error reporting
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I92f0c1f7c0f4696fa12071440a643aa703d6306f
2021-04-23 14:59:48 +00:00
liuyacan
5724aecd20 session: set fifo's session index before vcl attach
Current implementation may have timing issue:

1. The TCP 3-way-handshake is completed but the app is busy and
   does not process the CONNECTED event.
2. VPP receive some data from peer and try to send a RX event to
   VCL, but the fifo's client session index is not initialized yet.
   So this event will be sent to incorrect session 0.

Type: fix

Change-Id: I54f222232968bfaea5f4745284a1cfacc89482a9
Signed-off-by: liuyacan <liuyacan@corp.netease.com>
2021-04-23 16:23:37 +08:00
Florin Coras
2ba0177f38 session: remove unused connect/listen msg members
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie46824f95f9488b04fa1f701ff94345e2dc83de2
2021-04-22 18:08:08 +00:00
Florin Coras
a54b62d777 vcl session: refactor passing of crypto context
Pass tls/quic crypto context using extended config instead of bloating
conect/listen messages.

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0bc637ae310e6c31ef1e16847501dcb81453ee94
2021-04-22 16:07:11 +00:00
Chenmin Sun
c7e7819ad5 flow: Add API implementation of IP4/IP6, IP4_VXLAN/IP6_VXLAN
This patch adds the API handler implementation of the below flows:
    FLOW_TYPE_IP4,
    FLOW_TYPE_IP6,
    FLOW_TYPE_IP4_VXLAN,
    FLOW_TYPE_IP6_VXLAN

Type: feature

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I62e1c466b46f940180e957c859d122086aa22f1c
2021-04-22 14:44:10 +00:00
Nathan Skrzypczak
f04a8d1114 tls: tlspicotls require version when building
Type: fix

When building the tlspicotls plugin, we rely
on vpp-ext-deps having installed quicly & picotls.
We add a dependancy on the version installed thus
ensuring that people with older vpp-ext-deps version
installed don't have their build fail.

This has the drawback that picotls doesn't have its
own versionning scheme

Change-Id: I9e2ccfc00b3c37af2bc2483a791eb05f994dd4a4
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-04-22 14:35:33 +00:00
Florin Coras
4ac2584973 vcl session: extended connect/listen configuration
Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic8d9386fef37ffd3446aaeb93a96ee6d60633831
2021-04-22 11:41:38 +00:00
Benoît Ganne
5cfe45211a misc: add filter for specific error for pcap trace
Type: feature

Change-Id: I325257454df1cc22833fa6a1dedd4739d4d5a558
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-22 11:12:59 +00:00
Damjan Marion
d06e2eb1a1 ip: remove unnecesary inlining in ip4-rewrite node
Type: refactor
Change-Id: Ifbaf42ef88a7e0f1715b7b5e342af790e3b6acd9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-22 05:54:48 +00:00
Mathias Raoul
db36fda74e quic: update quicly to v0.1.3
This bumps quicly version to v0.1.3 ( sha
d44c089364067dbcdfbad7fb2c821900fb4aef5e in
https://github.com/h2o/quicly )

Also simplifies the build to only make needed
dependancies, and silence compiletime warnings

Type: feature

Change-Id: Ie00ec7e408d234464871b68ddc79bb33dc4179ed
Signed-off-by: Mathias Raoul <mathias.raoul@gmail.com>
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-04-22 00:52:15 +00:00
Dave Barach
9292c32b45 docs: document "make test-help"
Type: docs

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I67a582b7bf16c3fe307941973e983a0fe28cb221
2021-04-21 23:30:31 +00:00
Damjan Marion
5420885978 buffers: vlib_get_buffers() with 512-bit SIMD
Type: improvement
Change-Id: Id8ce3ffc1299a38171b82a7082454412c840a40c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-21 18:30:52 +00:00
Damjan Marion
1c2297144a vlib: don't inline vlib_buffer_enqueue_to_*
Function call in this case is not bad thing, as those functions
are called once per frame.

Type: improvement
Change-Id: I7bd61cf746b905e2c8e3085ebb2ff001c0a52da8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-21 18:30:44 +00:00
Damjan Marion
09aeee64da vppinfra: more avx512 inlines (compress, expand, from, is_equal_mask)
Type: improvement

Change-Id: I4cb86cafba92ae70cea160b9bf45f28a916ab6db
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-21 15:24:05 +00:00
Nathan Skrzypczak
832926bd96 cnat: Fix session flag initialization
Type: fix

Sometimes session->value.flags wasn't initialized
leading to next_node index corruption.
Also added a debug flag to tell session/rsessions appart

Change-Id: I80da50f2267e03a4552e8c9efc8e3aa08bc5569d
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-04-21 14:50:24 +00:00
Klement Sekera
1fbf034e3e nat: fix multi worker scenarios
Properly select worker from hash table in out2in direction, increase
number of worker threads in MW test to 4 to test these cases.

Type: fix
Change-Id: I76eda5761ff497b85b031dd913a64b7fcb53b33a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-04-21 09:24:50 +00:00
Florin Coras
00338e0912 svm: allow external chunk alloc on segment
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I89f9caa8dd44dc640615a58fe7708f388fdd84e9
2021-04-20 22:04:49 +00:00
Klement Sekera
ec62af5299 pmalloc: tolerate move_pages failure on numa node #0
Type: fix
Change-Id: I65dbc4f3db47c745a0187e015845e07b3b0568e5
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-04-20 17:25:57 +00:00
Filip Varga
f9e02772bc nat: fixing cli bug for nat44-ei and nat44-ed
Removing obsolete optional parameters.

Type: fix

Change-Id: I135eb4767979ab81636da16e91752a2ad80e0a45
Signed-off-by: Filip Varga <fivarga@cisco.com>
2021-04-20 17:05:10 +00:00
Florin Coras
adef691a6f tls: honor tcp deq notification request
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic24516a7242ef4193c5d751a2d5424918c390759
2021-04-20 16:48:49 +00:00
Florin Coras
5a41fd5ee7 tcp: req app deq notification on fifo full
If fifo full, default to requesting an app deq notification and forcing
an ack (window update) if zero rcv window sent is still active.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iade7e1722503da149c62c465c472edbb0a5599f7
2021-04-20 16:48:16 +00:00
Alexander Chernavin
005d1e4d48 crypto: support async handlers for 3des and md5
With this change, add support for 3DES and MD5 in IPsec async mode.

After changes in foreach_crypto_link_async_alg, the last combination in
the list (aes-256-cbc-hmac-sha-512) started to fail during decription.
That was also fixed by proper vector size validation.

Type: improvement
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I660657bdab62ea9cf031c3e43d99f2317e5f74d7
2021-04-20 16:30:07 +00:00
Filip Varga
3b3cbfb1c0 nat: nat44-ed i2o & o2i trace fix
If cache used than we don't print in trace session index.

Type: fix

Change-Id: Ib965cd8632b5217f8b2dd8b6cc6af3286c747582
Signed-off-by: Filip Varga <fivarga@cisco.com>
2021-04-20 16:01:48 +00:00
Damjan Marion
9789898bde ipsec: remove WITH_LIBSSL macros
We don't use libssl anymore... At least not directly.

Type: improvement
Change-Id: I9a0fab6e3c576d945498ce46f030bd26c1a14d15
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-20 14:53:29 +00:00
Mohammed Hawari
94761f6d42 dpdk: fix mlx4 mlx5 detection in plugin build
Since the move to DPDK 21.02, compatibility build symbols were depreca-
ted, breaking the static linkage of the DPDK plugin to libibverbs.

Change-Id: I2fec0807e4c0eb00268618f1495af862eede9081
Type: fix
Fixes: 5f35a185d5afee2c364fe84f33922bac1a808113
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-04-20 10:08:36 +02:00
Damjan Marion
5b6f3dad9b vlib: remove unused code
Type: refactor
Change-Id: I01dba12a7f8aa2fa6d2e4113c91dc97e638aca77
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-20 05:10:24 +00:00
Damjan Marion
6db633bde1 vppinfra: momve clib_sysfs_list_to_bitmap to sysfs.c
Type: refactor
Change-Id: Ia5a7ebd5c8492326f5bf2f1264f1c5ef38ccb4dc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-19 21:45:09 +02:00
Aloys Augustin
ac6c528fb2 ip: fix offload flags handling
The per-protocol offload flags only make sense if F_OFFLOAD is set on
the vlib buffer main flags.
vnet_calc_checksums_inline is called from many places which should do
this check and don't, moving the check to this function is less error
prone and shouldn't have an impact on performance since the function
is always_inline.

Type: fix
Change-Id: I0297f109f31e409f07bfbaea3cd8b90c659658c4
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2021-04-19 17:32:05 +00:00
Damjan Marion
8932e45022 interface: interface-output end node rework
- rename node to more meaningful name
 - introduce lookup tables
 - enable multiarch
 - quad-loop node
 - enqqueue to next instead of enqueueing to node

Type: improvement
Change-Id: Ibb208047ae04bb6cfe56db558d3b8938bc14b4fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-19 16:43:22 +00:00
Damjan Marion
ae34872077 ip: remove dead code from ip_csum
Type: fix
Change-Id: I3b37257e86175743a7bac80c531491565f0a8dcd
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18 21:02:26 +00:00
Damjan Marion
e3b256ed5b vppinfra: remove outdated and unused unix format functions
Type: refactor
Change-Id: If1772980dbdbde1fbf3d1989daa40599e9f23e8c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18 21:02:15 +00:00
Damjan Marion
f8cb70177f vppinfra: remove linux/syscall.h
For portabiliy reasons it is better to have all wrapped in clib code.
I.e. instead of using getcpu() we have clib_get_current_numa_node () and
clib_get_current_cpu_id().

Type: refactor
Change-Id: I29b52d7f29bc7f93873402c4070561f564b71c63
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18 15:22:50 +02:00
Benoît Ganne
30a819579c classify: honor pcap interface filter also when classify filter is used
Type: fix

Change-Id: Ic32550ee9c5d76d232d8b67a7810611f6c8b9177
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-17 11:55:33 +00:00
Klement Sekera
558ceabc6c tests: cpus awareness
Introduce MAX_CPUS parameters to control maximum number of CPUs used by
VPP(s) during testing, with default value 'auto' corresponding to all
CPUs available.

Calculate test CPU requirements by taking into account the number of
workers, so a test requires 1 (main thread) + # of worker CPUs.

When running tests, keep track of both running test jobs (controlled by
TEST_JOBS parameter) and free CPUs. This then causes two limits in the
system - to not exceed number of jobs in parallel but also to not exceed
number of CPUs available.

Skip tests which require more CPUs than are available in system (or more
than MAX_CPUS) and print a warning message.

Type: improvement
Change-Id: Ib8fda54e4c6a36179d64160bb87fbd3a0011762d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-04-16 09:26:33 +00:00
Damjan Marion
f70cf23376 vlib: make vlib_pending_frame_t smaller
Type: improvement
Change-Id: I8715631718dca9bc7d7b364451b137484aadd58e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-15 22:05:10 +02:00
Florin Coras
7fdf8b2d5d tcp: support for rate sample attr flag
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I94b8063c9d8f9b811589c6815cb5c8ca6220f2b5
2021-04-15 17:12:10 +00:00
Paul Vinciguerra
a5dd6d7874 vrrp: refactor test
Move scapy packet generation code out of vpp object and into the test
case.

Type: test

Change-Id: Ib4de7409eefb79fc59f9815bed3befe5ecde483c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-04-15 16:52:07 +00:00
Florin Coras
cf0e257dcf vcl: validate fs before cleanup
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1d3677923ab28325380c4a9e8469da83077262a9
2021-04-15 16:38:02 +00:00
Tianyu Li
0e79bc14ba papi: fix ubuntu 1804 make test socket.close error
make test failed on ubuntu 18.04
  File "/vpp/src/vpp-api/python/vpp_papi/vpp_stats.py", line 135, in connect
    socket.close(mfd)
AttributeError: module 'socket' has no attribute 'close'

Due to ubuntu 18.04 using python3.6 and
socket.close() is introduced since python3.7

Using os.close to replace socket.close as mfd is a memory fd

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I6d980fc87ae6c77bbed416879f9b2fcd0a0abe6a
2021-04-15 16:35:45 +00:00