10741 Commits

Author SHA1 Message Date
Florin Coras
09843951dc session: only handle old ctrl events per dispatch
Avoids dispatching ctrl events generated while handling the
current pending list.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibeaf901ba4cf58a68fbd88e5ec3c23f6c2f6f145
2021-05-18 08:29:28 +00:00
Florin Coras
1d7a663f4b session: move tx-buffers to tx ctx
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I10ec410fb7f3acb47128dda23510162dc13b20d0
2021-05-18 06:39:27 +00:00
Damjan Marion
baedaf374d memif: remove unused code
Type: refactor
Change-Id: I127b8c7131fd993a5fe605c7c36cc1d0b6672984
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-17 20:05:58 +00:00
Andrew Yourtchenko
bfcd4b9868 build: fix the "show version" output in the centos release builds
A couple of releases ago I made a change that slightly changes
the naming of artifacts, in order to make the version sorting better.
However, that change broke the "show version" output of the VPP
in the RPM - that build copies the entire source tree into
a new location and builds there, supplying the version
information in .version file rather than using git describe.

Updating only the version script and not the .version file content
resulted in the VPP release builds within the RPM installs have
the "count of commits since tagging" being zero and the commit ID,
rather than having XX.YY-release format.

A couple of releases - 20.09 and 21.01, saw a more haphazard solution,
but it is proper to fix the content of the .version file so it
is all consistent.

This commit fixes the contents of this file made for the RPM build, so that
the versioning script does not see unexpected input, thus addressing
the issue of "show version" in the release build.

Change-Id: I0af68e69b1e40fc49ade759bb2f0ed9f47614217
Type: fix
Fixes: 1060332e62d1216bf33c697d0a54ba35d4903eb3
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-05-17 17:37:57 +00:00
Damjan Marion
bdef1281c8 memif: remove duplicate code in tx
Type: refactor
Change-Id: Idb82e28ee2e370ae8fc1becc2f8b92a548bc6b1b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-17 17:05:02 +00:00
Damjan Marion
d78ba5aa01 memif: optimize zero-copy rx ring refill
Type: improvement
Change-Id: I8169da230eb5f74651810a8e2490895620c38269
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-17 17:04:52 +00:00
Damjan Marion
263f381c95 memif: fix "remove barriers" commit
Type: fix
Change-Id: I60bb0261c05bf7e25ca01c72780f1cd77fde7a9a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-17 16:52:08 +02:00
Damjan Marion
3d2c6743f4 memif: remove barriers
Type: improvement
Change-Id: Idef30aee80b654ce424b6f1f1f730574ca68874c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-17 11:02:08 +00:00
Mohsin Kazmi
637c97c7d0 virtio: add the checks for descriptors chain len
Type: fix

virtio uses indirect descriptors for chain buffers.
indirect descriptor chain is mapped on a vlib_buffer_t.
Single descriptor is 16 bytes and vlib_buffer_t has
2048 bytes space. So maximum long chain can have
128 (=2048/16) indirect descriptors.

This patch adds check to make sure descriptors chain
len should not exceed 128.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I060cfb7709568f42c9b5634527172690ce66a1a3
2021-05-17 08:46:29 +00:00
Florin Coras
af97221c6a session: rpc for connects to main
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ifa47e1500e5cfb3c717f87b1d21131b9531c9005
2021-05-16 09:40:11 -07:00
Steven Luong
a7ec31750c lacp: coverity fix on null pointer dereference
Coverity complains on null pointer dereference. It is not likely to
happen.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Iab726a1e2d60725cec7ab0bbd2787b62e6393d33
2021-05-15 23:49:42 +00:00
Florin Coras
d5a588230f session: fix coverity warning
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I24484a5192d7e683507ed640f75fb37914c0efb0
2021-05-15 17:20:04 +00:00
Florin Coras
7dcc339ad4 tcp: remove ho lock
Half-open sessions are allocated by main thread and cleaned up on main
with timers.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I37f000920a45908b62b5501ae9d54a88a9e4c609
2021-05-14 18:06:22 +00:00
Damjan Marion
2034f35308 vlib: remove unused code
Type: refactor
Change-Id: Ia5f670541dd43a4f6d731dda84b2d898195643fc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-14 18:16:15 +02:00
Damjan Marion
9e7a0b48fe vlib: pass node runtime to vlib_buffer_enqueue_to_thread()
Mechanical change for patch following this one...

Type: improvement
Change-Id: Iee12f3a8851f35569e6c039494a94fc36e83d20f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-14 15:56:44 +00:00
Damjan Marion
ca1bbbb9e8 avf: free spinlock on txq removal
Type: fix
Change-Id: I8e9a907a227f82b870a945b94731dc3204c23ee1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-14 15:46:50 +00:00
Mohammed Hawari
c3d0012b67 interface: fix converity in update_runtime_data
Change-Id: I59eb41516b5e052109428ae70660ed49126c25bb
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-05-14 15:45:39 +00:00
Damjan Marion
c389de2aa8 interface: update tx queue runtime if vector size changes
Fixes issue which causes crash in case when VPP only runs with main thread.

Type: fix
Change-Id: Ia0ca973bb7e7ff81f15b37764ae248e2502bdcec
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-14 15:45:05 +00:00
liuyacan
4fca744234 vcl: fix lookup listener assert
The following timing may happen:

1. vpp accept new connection, send ACCEPTED to vcl, but vcl has
   not handle it
2. vcl unbind the listener, go into DISCONNECT state
3. vcl handle the ACCEPTED event

Type: fix

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: If9a96a153af38763db062df133c2fdcc04ceba9b
2021-05-14 14:35:34 +00:00
Florin Coras
374df7a294 session: switch ct to vc and track half-opens
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7f9c4b9b6e523ab549087ad21724f34f08fca793
2021-05-14 08:44:47 +00:00
Florin Coras
bab6c52f45 tls: switch dtls to vc and track half-opens
Also adds support for half-open support transport migration.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id04c194138956336f93246bbed0332a7030c67e2
2021-05-14 08:44:47 +00:00
Steven Luong
9f07085ab3 lacp: Prohibiting bonding with remote having different key than 1st member
After forming the bonding with 1st remote member, Subsequent member must
have the same key in order to join the same bonding group.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I9ff6d6c083a5b6a26beedbd7181d5a120cb5710b
2021-05-13 20:53:56 +00:00
Damjan Marion
e4c8d69013 interface: fix tx queue runtime update
Type: fix
Change-Id: I5ce7e57ae277de26af602fe786048bf21b8612f8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-13 13:57:52 +00:00
Dave Wallace
eddd8e3588 tests: move test source to vpp/test
- Generate copyright year and version
  instead of using hard-coded data

Type: refactor

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I6058f5025323b3aa483f5df4a2c4371e27b5914e
2021-05-13 09:33:06 +00:00
Nathan Skrzypczak
fd77f8c00c quic: remove cmake --target
Type: fix

This isnt needed as we pass
CMAKE_SKIP_INSTALL_ALL_DEPENDENCY

Change-Id: I1406d84192efb9baedf7df680aca0b96bb0eef01
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-05-12 19:18:10 +00:00
Damjan Marion
742a5039b0 misc: change VFIO group ownership and permissions in vfctl script
This is missing step to allow runing VPP unpriviledged
with AVF driver.

Type: improvement
Change-Id: I37dfad9236691c1a8e2837a5811536170c65d7bc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-12 16:53:25 +00:00
Damjan Marion
8b4d474abd avf: avoid eating our own tail
This happens in case we are not able to refill ring with new buffers.

Type: fix
Change-Id: I727e55c5b8482d9b8aeb4a9933a9a755fe21e55f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-12 15:46:59 +02:00
Chenmin Sun
ee32d66802 flow: fix vxlan vni convert bug
This patch fixes a vxlan vni field conversion bug in flow api layer

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I37b2ffb54792f48b390ff42da577db2c4869d253
2021-05-12 08:45:08 +00:00
Florin Coras
2c876f9c58 tls: switch to vc service and track half-open sessions
Half-open tls sessions are now tracked by the app worker and are cleaned
up only when tcp cleans up its half-open session, i.e., independent of
when the established tls context is allocated.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If5d594d7095192dd527daf4ea1358ffeccdfcc7a
2021-05-12 08:44:38 +00:00
Florin Coras
89a9f61dfc session: return connect session handle to app
App transports not supported for now. Will have to be updated
individually.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I75cb6c4e1c5af008af72858a9ee573016812abd4
2021-05-12 08:44:38 +00:00
Fan Zhang
106e24bd91 crypto: add chacha20-poly1305 support to ipsecmb
Type: feature

This patch adds chacha20-poly1305 single and chained algorithm
support to ipsecmb crypto engine.

Signed-off-by: DariuszX Kazimierski <dariuszx.kazimierski@intel.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: If04ee0c8f985b07fd31dad1ce29000ec6f1733c5
2021-05-12 08:44:08 +00:00
liuyacan
534468e9f7 session: support half-close connection
Some app(e.g. Envoy) may call shutdown() instead of close() when
draining connection.

Type: improvement

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I9543b9ca3caa87b10b134fd1fc4019124e41e4d2
2021-05-12 04:45:07 +00:00
Aloys Augustin
7b2917fbe2 ip: ensure ttl doesn't decrease to 0 when punting
Change-Id: I248ef12fd34ea2a1c383fbcc530a8ffeb31ba92b
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2021-05-11 21:21:27 +00:00
Damjan Marion
1bd6cbb7ae interface: tx queue infra
Type: improvement
Change-Id: I415b2f980de10ca3154d2c8677c24792453eccd0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-11 12:40:37 +00:00
Damjan Marion
0d39cbac6d build: compiler flags handling cleanup
Type: make
Change-Id: I51f30edb91e09525ba116fe3941f2e43f9718da7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-11 12:36:11 +02:00
Florin Coras
033e6ef524 quic: alloc ctx on udp thread
UDP sessions are allocated on first worker because main does not poll.
Consequently, quic should also allocate connection on first, to avoid
multiple migration events.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ice229a42c399e87150e0f6dd76e2e06ab271556c
2021-05-11 07:38:27 +00:00
Nathan Skrzypczak
04a14133c8 vppinfra: Add missing %o
This is used in vppinfra/socket.c:495

Type: feature

Change-Id: I89b409ae7abb01723108ae3e6c55bb1675db50ee
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-05-11 07:38:01 +00:00
Dave Barach
269e1569e1 vlib: exec cmd handle scripts with blank lines
Type: fix
Fixes: 2f96e7648b9b7d501088eddff7e4a761973e71f4

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ia75c863850c0df978f61bfc0343a167d8636ed97
2021-05-11 00:45:33 +00:00
hemant_mnkcg
1691da62d9 misc: fix crash in lawful intercept CLI
Type: fix

Signed-off-by: hemant_mnkcg <hemant@mnkcg.com>
Change-Id: I097815617053dac09de7ad3092b3d3071770114f
2021-05-10 22:47:09 +00:00
Florin Coras
ea72764204 session: use half-open sessions for vc establishment
Use half-open sessions to track virtual circuit connection
establishment. These sesssions can only be allocated and freed by the
thread that allocates half-open connections (main). Consequently, they
can only be freed on half-open cleanup notifications from transports.

Goal is to simplify state tracking within the session layer but it's
also a first step towards allowing builtin apps to track and cleanup
outstanding connects.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I8a535906d13eb7f8966deb82333839de80f8049f
2021-05-10 20:53:32 +00:00
Benoît Ganne
e2272ac27c dpdk: do not crash when failing to bring interface up
If dpdk device starts failed for some reason, we should not try to get
stats and the interface must remain down.

Type: fix

Change-Id: I0079f89d3b43a9b47553991347da8ed4ce6ede8d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-05-10 16:49:11 +00:00
Benoît Ganne
028c9fda3c rdma: bump to rdma-core v35.0
Type: improvement

Change-Id: I5f7ff309aacbfd7a5a8a973bcc7ba04ba44923c5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-05-10 16:07:39 +00:00
Florin Coras
0d31b9cb9f svm: try chunk alloc only if enough space available
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3c52dd783601d50e981f75bd05a7b95c03bb5c22
2021-05-10 14:38:36 +00:00
Mohsin Kazmi
9314ed8215 gso: fix the gro coalesced chain len
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I86b940384a6898d4cb04f3decf30996c94b43d07
2021-05-10 09:08:12 +00:00
wanghanlin
9f42fff3ef api: fix crash in vl_msg_api_free
VPP crash when ASSERT in clib_mem_free.

Type: fix

Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
Change-Id: Id06d833caab3385446528d62a6ed3bde38d57db0
2021-05-10 04:42:58 +00:00
Steven Luong
27e93a5d76 vhost: low performance in interrupt mode in some cases
When vhost and another interface, say tap, are configured for interrupt
mode, performance number may be very low from vhost.

Further analysis discovers that when vhost posts an interrupt to the
RX infra, there is a 10 msec delay in waking up its input routine.
The delay is due to vhost posts the interrupt from the main thread
which tries to wake up the worker thread.

The fix is for vhost to move the posting interrupt call to the
corresponding input worker thread by calling
vnet_hw_if_set_rx_queue_file_index() to set it up.

While at it, streamline the function vhost_user_kickfd_read_ready()
since it will be called from the worker thread.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I9beedcd33e1558c8335da4ee7fadc51c29ee4589
2021-05-08 10:51:59 +00:00
Nathan Skrzypczak
95b67a4348 memif: Fix delete on error
Type: fix

Change-Id: I3cc09630cae999cc194a0eedb4d2cfee7a826b76
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-05-08 08:56:51 +00:00
Mohammed Hawari
90ce4fd180 avf: fix coverity
Change-Id: I54025eb0e4ee861b2b2fed554b006405cba38bb9
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
Fixes: bd376a8ce8425f45b23074398949e8055de29280
2021-05-08 08:56:01 +00:00
Dave Wallace
c44402f7b5 tests: fix another race condition in punt tests
- Don't close the socket and don't stop receiving
  until after draining the existing data in the
  socket.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I38dfff4d6273eeddb5196f5cf2a60b580e1c93e6
2021-05-08 02:49:06 +00:00
Fan Zhang
7508f0a7ea dpdk: fix cryptodev session handler
Type: fix

This patch fixes the possible segmentation fault in DPDK
cryptodev when deleting session.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: Ie81de09f7250eb5c1ed6ee471363137d8372fe27
2021-05-07 16:31:42 +00:00