vpp.git
7 months agomisc: Initial 24.02-rc0 commit 48/39148/1 v24.02-rc0
Andrew Yourtchenko [Wed, 20 Sep 2023 13:59:48 +0000 (15:59 +0200)]
misc: Initial 24.02-rc0 commit

Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I42af9706461034957f83103e2756cc6bfab054f7

7 months agotests: remove unsupported qemu feature 37/39437/3
Naveen Joy [Wed, 23 Aug 2023 20:27:55 +0000 (13:27 -0700)]
tests: remove unsupported qemu feature

pretty=on|off has been removed from qemu and its presence
causes VM boot up issues.

Type: fix

Change-Id: I4a9f15dba5015e81fbd32278b1c74b2606c32c8f
Signed-off-by: Naveen Joy <najoy@cisco.com>
7 months agonpt66: ensure feature is not configured multiple times 06/39506/3
Ole Troan [Fri, 8 Sep 2023 09:32:33 +0000 (11:32 +0200)]
npt66: ensure feature is not configured multiple times

If the control agent enabled a binding on an interface multiple times,
we would add the node in the feature arc multiple times.

Type: fix
Change-Id: I2ca247db0a0211f5fa3974a18ca4fcae8485cb12
Signed-off-by: Ole Troan <otroan@employees.org>
7 months agovcl: unset fifo evt before size check 36/39536/1
Florin Coras [Mon, 18 Sep 2023 16:56:21 +0000 (09:56 -0700)]
vcl: unset fifo evt before size check

For blocking sessions, if fifo event still active before size check it
could lead to vpp not generating an event because of race to check flag
in vpp and to eventually unset flag in vcl.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0e350b9ff92a4e08a9249345ae224589c09d305b

7 months agovapi: fix coverity warnings 10/39410/2
Dave Wallace [Tue, 22 Aug 2023 18:18:32 +0000 (14:18 -0400)]
vapi: fix coverity warnings

- CID-322713, CID-322712, CID-314881, CID-314880,
  CID-314878 COPY_INSTEAD_OF_MOVE

Type: fix

Change-Id: Idad6806fcd4e1a89a750dcc0584b5b1f0432bf3c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 months agomisc: VPP 23.06 Release Notes 25/39425/1
Andrew Yourtchenko [Mon, 26 Jun 2023 11:50:58 +0000 (13:50 +0200)]
misc: VPP 23.06 Release Notes

Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Id39d7d6a6340e65885ab0845b6fc9a2b81e4f565
(cherry picked from commit 493b8990d1185f818890560101e13e1b69f54b1d)

7 months agovpp-swan: fix configuration of policies 34/39534/1
Gabriel Oginski [Thu, 14 Sep 2023 09:03:36 +0000 (09:03 +0000)]
vpp-swan: fix configuration of policies

This patch fixes configuration of priority, port and type of protocol
for inbound and outbound policies in policy-based IPsec of this plugin.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I01ddc2e13ebbe87380e66a525aac1b615f619604

7 months agonat: fix nat44_ed set_session_limit crash 41/37241/5
Vladislav Grishenko [Mon, 5 Sep 2022 05:32:46 +0000 (10:32 +0500)]
nat: fix nat44_ed set_session_limit crash

Setting session limit should return error for unknown fib.
Optimize max_translations_per_fib expanding and drop unnecessary
trailing fib entry.

Type: fix
Change-Id: Ie7d2b363ade48f53598faa617a49cce7b2db6400
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
7 months agoquic: fix quic sessions state updates 01/39501/5
Florin Coras [Thu, 7 Sep 2023 02:09:30 +0000 (19:09 -0700)]
quic: fix quic sessions state updates

Session state cannot be updated after async notification event is
generated for app. Instead, make sure quic sessions that accept new
streams are switched to listening state only on accept.

Type: fix
Fixes: 0242d30

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9663ccadbea99d555ad49e871f7dff897239dc84

7 months agosr: mark sr_policies_v2_details message as production 44/39144/2
Andrew Yourtchenko [Tue, 1 Aug 2023 11:00:13 +0000 (13:00 +0200)]
sr: mark sr_policies_v2_details message as production

As per discussion on the VPP community call,
since the message is used in CSIT tests and did
not see the changes in a while, mark as production
for the purposes of change process.

Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I4a79aafb1a9f37ac87faea7abea28cf01d1ffb4c

7 months agoadl: stabilize the API 40/39140/2
Andrew Yourtchenko [Tue, 1 Aug 2023 10:43:46 +0000 (12:43 +0200)]
adl: stabilize the API

As discussed on the VPP call, since CSIT tests use these messages
and they have not been changedfor quite a while, bump the version
so these messages are considered as "production" from the change
process standpoint.

Type: improvement
Change-Id: I93a04b10b273d5904c0678fa0b85d47f9f683a9b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 months agoflow: mark API as production 43/39143/3
Andrew Yourtchenko [Tue, 1 Aug 2023 10:54:36 +0000 (12:54 +0200)]
flow: mark API as production

As per discussion on the VPP call - since the APIs are used
in CSIT tests, mark them as production from the change process
perspective.

Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I9164073425384e8aa281445a2852fee49b777e2f

7 months agowireguard: stabilize the API 42/39142/2
Andrew Yourtchenko [Tue, 1 Aug 2023 10:52:04 +0000 (12:52 +0200)]
wireguard: stabilize the API

As per discussion on VPP call - since the APIs are used in CSIT tests,
and there has not been changes in a while, mark them as stable from
the API change process PoV.

Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Ia644e1dfcd9d182cc6f10089fc44397a61e8aaf6

7 months agocrypto-sw-scheduler: stabilize the API 41/39141/2
Andrew Yourtchenko [Tue, 1 Aug 2023 10:49:20 +0000 (12:49 +0200)]
crypto-sw-scheduler: stabilize the API

As per discussion on the VPP call: since the CSIT tests use these
APIs and the APIs have not changed in quite a while, stabilize the API
from the change process point of view.

Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Id81999d03cce37764f6ed7d4f77ef5a71fe41ad1

7 months agohsa: fix coverity issue CID-313635 11/39411/3
Dave Wallace [Wed, 23 Aug 2023 03:17:54 +0000 (23:17 -0400)]
hsa: fix coverity issue CID-313635

Type: fix

Change-Id: Ieb50ab548bb34bdbb44d973037ee452d48f412ea
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 months agoapi: fix vlibmemory coverity warning CID-300152 13/39413/2
Dave Wallace [Wed, 23 Aug 2023 03:42:02 +0000 (23:42 -0400)]
api: fix vlibmemory coverity warning CID-300152

Type: fix

Change-Id: Icdebc8629946e0e7c8dde3e45ee93ff9027e7c68
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 months agovppinfra: add ARM Neoverse-N2 support 23/39523/3
Damjan Marion [Tue, 12 Sep 2023 13:08:58 +0000 (15:08 +0200)]
vppinfra: add ARM Neoverse-N2 support

Type: improvement

Change-Id: Ief77ae7338667ede290aece6933bb5ae2e76ffc6
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 months agobuild: fix clang-16 build 00/39500/3
Damjan Marion [Wed, 6 Sep 2023 19:18:18 +0000 (21:18 +0200)]
build: fix clang-16 build

Change-Id: I882bef6f45fd276587fb93944ff4e21dc57dbca2
Type: fix
Fixes: 1c82cd4
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 months agoidpf: make plugin default disabled until issues are fixed 22/39522/2
Damjan Marion [Tue, 12 Sep 2023 13:00:46 +0000 (15:00 +0200)]
idpf: make plugin default disabled until issues are fixed

Type: improvement
Change-Id: I2daa8fc338289555649135e7f0898e139807fdce
Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
7 months agodocs: mention how to build VPP outside git 05/39505/7
Vratko Polak [Wed, 13 Sep 2023 08:22:57 +0000 (10:22 +0200)]
docs: mention how to build VPP outside git

Type: docs

Change-Id: Iceee9ef489f7f68049882651bb338311295ca12d
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 months agobuild: add vpp_plugins include directory 15/39415/3
Benoît Ganne [Mon, 21 Aug 2023 07:24:38 +0000 (09:24 +0200)]
build: add vpp_plugins include directory

Type: fix

Change-Id: Iacb04846c634231854f26348cc17cc729d6e0d87
Signed-off-by: Benoît Ganne <bganne@cisco.com>
7 months agovppinfra: fix coverity warning CID-313632 12/39412/2
Dave Wallace [Wed, 23 Aug 2023 03:24:01 +0000 (23:24 -0400)]
vppinfra: fix coverity warning CID-313632

Type: fix

Change-Id: Idc036d5967495cc2522b2a30e3acd3ec4c0cd3ff
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 months agovlib: deuglify the offset finding loop in pci.c 36/39436/2
Vratko Polak [Wed, 23 Aug 2023 16:39:25 +0000 (18:39 +0200)]
vlib: deuglify the offset finding loop in pci.c

Type: style
Fixes: 054229ebbdeb3f87d96c1abf93b511c86cd6ff0f

Change-Id: I7c3080db94566af249e5082d59a4e6373c616888
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 months agoperfmon: fix perf_user_access_enabled type 69/39469/2
Tianyu Li [Tue, 29 Aug 2023 07:59:12 +0000 (07:59 +0000)]
perfmon: fix perf_user_access_enabled type

perf_user_access_enabled is defined as u8,
clib_sysfs_read format type is %u, this is for unsigned int,
change type from u8 to u32.

Type: fix
Fixes: 268d7be66b8b ("perfmon: enable perfmon plugin for Arm")

Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I48ec00605e496d185370e77d894d7852d6d22124

7 months agovppinfra: fix setns typo 03/39503/2
Artem Glazychev [Thu, 7 Sep 2023 07:16:56 +0000 (14:16 +0700)]
vppinfra: fix setns typo

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Ib8eb70336956bc2e8d0454f3c1f2c62ec98cb009

7 months agopci: fix coverity issue CID-322372 09/39409/2
Dave Wallace [Tue, 22 Aug 2023 16:51:09 +0000 (12:51 -0400)]
pci: fix coverity issue CID-322372

Type: fix

Change-Id: Iaf16bb720d76ea3ae04afb8123b7cac15771ef2b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 months agoipsec: improve fast path policy searching performance 33/38733/5
Xiaoming Jiang [Wed, 26 Apr 2023 11:58:25 +0000 (11:58 +0000)]
ipsec: improve fast path policy searching performance

Type: improvement
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: Ib8bb300f5b62648f6b634046415742bdf5365982

7 months agocrypto: allow changing dispatch mode 86/39386/6
Vratko Polak [Thu, 17 Aug 2023 14:22:48 +0000 (16:22 +0200)]
crypto: allow changing dispatch mode

This change aims to affect crypto_sw_scheduler behavior,
but all the edits end up in vnet/crypto.

Previous release CSIT tests were testing async crypto in polling mode.
After 9a9604b09f15691d7c4ddf29afd99a31e7e31eed introduced adaptive mode
for crypto dispatch, the CSIT performance got way worse.

Possibly, there is another VPP bug related to adaptive mode
(it should not lose as many packets as seen in CSIT),
but the next release is too close for trying to fix that.

This change (instead of fixing adaptive mode)
allows CSIT to continue testing polling mode (after explicit API call),
while keeping the adaptive mode as default behavior.

The deprecated crypto_set_async_dispatch always disable adaptive mode,
crypto_set_async_dispatch_v2 has parameter to enable or disable it.
The mode parameter is still used for the inital state of adaptive mode.

Type: feature

Change-Id: Ib98080eefb4be291207af543884f2c3837f92f59
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 months agocrypto-sw-scheduler: improve function indentation 70/39370/3
Vratko Polak [Thu, 17 Aug 2023 14:15:38 +0000 (16:15 +0200)]
crypto-sw-scheduler: improve function indentation

The checkstyle --fix command remains confused
around the def/foreach/undef usage in convert_async_crypto_id,
but at least the other functions now look correctly indented to me.

Type: style

Change-Id: Ic8f7b580267386b7a6b07d33d9ba7ae9787c0e0a
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 months agosession: make sure rx evt flag is cleared for builtin rx 02/39502/3
Florin Coras [Thu, 7 Sep 2023 02:38:44 +0000 (19:38 -0700)]
session: make sure rx evt flag is cleared for builtin rx

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I99631b1be6e19f0cefd1cefa82a51e6f8e9be2ac

7 months agoipsec: clear L4-cksum flags when decap'ing packets 38/39238/8
Frédéric Perrin [Fri, 14 Jul 2023 10:13:42 +0000 (11:13 +0100)]
ipsec: clear L4-cksum flags when decap'ing packets

Type: fix

Signed-off-by: Frédéric Perrin <fred@fperrin.net>
Change-Id: I45191b7316c88038bcd57d62aeb07bb109cf4a4d

7 months agodpdk-cryptodev: fix cache ring stats cli command 91/39491/2
Piotr Bronowski [Tue, 5 Sep 2023 21:18:59 +0000 (21:18 +0000)]
dpdk-cryptodev: fix cache ring stats cli command

The logic for calcuating processed elements in the cache ring was broken.
In case tail and deq_tail equals and frame element pointed by the tile
is not NULL it means there is exactly one processed element in the ring.

Type: fix

Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I69c978334fc952049393214ccc9cc5245351f7f7

7 months agobuild: add option to specify native -march= flag with VPP_BUILD_NATIVE_ARCH 62/39462/2
Damjan Marion [Thu, 31 Aug 2023 15:00:16 +0000 (17:00 +0200)]
build: add option to specify native -march= flag with VPP_BUILD_NATIVE_ARCH

Type: improvement
Change-Id: I98eeba1ad2f9ed0531a7c615e0e70e535f24f813
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 months agonat: improve nat44-ed outside address distribution 21/38521/3
Vladislav Grishenko [Thu, 16 Mar 2023 14:31:00 +0000 (19:31 +0500)]
nat: improve nat44-ed outside address distribution

Use client address hash to pick the first outside address
instead of just address high octet, becasue it may denegerate
into stable 10/172/192, depending on nat address count.

Fix outside address distribution test to acually test the
distribution, not the algo, so previous distribution will
fail with 65 nat addresses and 100 clients:

FAIL: Outside address distribution based on source address
Traceback (most recent call last):
  File ".../test/test_nat44_ed.py", line 2048, in test_outside_address_distribution
    msg="Bad outside address distribution")
AssertionError: 156.25 not less than 0.33 : Bad outside address distribution

Type: improvement
Change-Id: I604b1294422f20d211db5614c47559557a78a193
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
7 months agovirtio: add support for tx-queue-size 25/36725/6
Mohsin Kazmi [Tue, 29 Aug 2023 09:18:20 +0000 (09:18 +0000)]
virtio: add support for tx-queue-size

Type: improvement

DBGvpp# set loggin class virtio level debug
DBGvpp# create int virtio 0000:00:03.0 tx-queue-size 1024

show virtio pci
```
  Virtqueue (TX) 1
    qsz 1024, last_used_idx 0, desc_next 0, desc_in_use 0
    avail.flags 0x1 avail.idx 0 used.flags 0x0 used.idx 0
```

show logging
```
2022/07/22 23:20:22:557 debug      virtio         0000:00:03.0: tx-queue: number 1, default-size 256
2022/07/22 23:20:22:557 debug      virtio         0000:00:03.0: tx-queue: number 1, new size 1024
```

Change-Id: Ib1a3ebe742b3a6c9fe72bd1c5accfe07682cbdd1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
7 months agoip: punt add punt socket support for icmp6 84/39484/6
Ole Troan [Tue, 5 Sep 2023 06:27:53 +0000 (08:27 +0200)]
ip: punt add punt socket support for icmp6

Punt support for ICMP6 messages allows for an external IPv6 RA advertisement agent.

Type: feature
Change-Id: I0cc928b747ac1f8335ee9f7c42a3231424825dbc
Signed-off-by: Ole Troan <otroan@employees.org>
7 months agoapi: fix mp-safe mark for some messages and add more 25/38525/2
Vladislav Grishenko [Sat, 18 Mar 2023 21:57:01 +0000 (02:57 +0500)]
api: fix mp-safe mark for some messages and add more

Several api messages were not mp-safe although marked as such
because non-zero base id was not taken into account, and therefore
some other (from zero base id) were falsely mp-safe instead.

Keep messages as mp-safe, as they falsely were before:
    10   get_first_msg_id                              0       1
    12   api_versions                                  0       1

Messages that are no longer mp-safe as they weren't marked:
    15   sockclnt_create                               0       1
    33   proxy_arp_intfc_dump                          0       1

Fix messages to be really mp-safe:
    809  bridge_domain_dump                            0       1
    920  ip_route_add_del                              0       1
    921  ip_route_add_del_v2                           0       1
    1362 get_node_graph                                0       1
    1671 create_vhost_user_if                          0       1
    1675 create_vhost_user_if_v2                       0       1

Additionally mark messages as mp-safe, seems they need no barrier:
    1360 show_threads                                  0       1
    1370 show_version                                  0       1
    1372 show_vpe_system_time                          0       1

Type: fix
Change-Id: Ie6c1e3aa89f26bf51bfbcb7e7c4d9fee885487b7
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
7 months agovapi: fix verification for reply message 92/39292/4
Sylvain Cadilhac [Wed, 26 Jul 2023 14:16:47 +0000 (16:16 +0200)]
vapi: fix verification for reply message

Type: fix
Byte swapping should be done before verifying message otherwise the message length will be wrongly computed.

Change-Id: I90b2f60bd33e5362e0edd5ee425f6a6f07886f1e
Signed-off-by: Sylvain Cadilhac <sylvain.cadilhac@freepro.com>
7 months agohs-test: point gdb to vpp source files 89/39489/2
Filip Tehlar [Tue, 5 Sep 2023 13:36:28 +0000 (15:36 +0200)]
hs-test: point gdb to vpp source files

Type: test

Change-Id: Ie5867737e5d49fd45cc15b690af3493263fb2f6f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 months agohs-test: verbose output on single test run 90/39490/1
Filip Tehlar [Tue, 5 Sep 2023 13:58:28 +0000 (15:58 +0200)]
hs-test: verbose output on single test run

Type: test

Change-Id: I12ae7db36a6f7f9758fd195088877dfcd5606f84
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 months agonpt66: make plugin default disabled 71/39471/4
Ole Troan [Fri, 1 Sep 2023 12:18:23 +0000 (14:18 +0200)]
npt66: make plugin default disabled

Plugin is still in experimental state. No reason why it needs
to be default enabled.

Type: fix
Change-Id: Ibf1810215d4c8079a068bfc60aa7dd49306ee4e4
Signed-off-by: Ole Troan <otroan@employees.org>
7 months agohs-test: log external apps 61/39461/3
Filip Tehlar [Sat, 2 Sep 2023 06:54:21 +0000 (08:54 +0200)]
hs-test: log external apps

Type: test

Change-Id: Id2b0d408bd46f20b81422506f9db4eb655feddac
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 months agohs-test: fix gdb attach 74/39474/2
Filip Tehlar [Sat, 2 Sep 2023 06:39:25 +0000 (08:39 +0200)]
hs-test: fix gdb attach

Type: test

Change-Id: Ic48ca7a3aab47df50d4e38e6123c90140c944172
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 months agoudp: buffer packets for connections in accepting state 73/39473/3
Florin Coras [Sat, 2 Sep 2023 00:19:33 +0000 (17:19 -0700)]
udp: buffer packets for connections in accepting state

Type: fix
Fixes: 0242d30

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6e313000bccce749b813f20a52432154bfd494ed

7 months agoarping: api to return responder mac address 58/39458/4
Ole Troan [Thu, 31 Aug 2023 07:48:45 +0000 (09:48 +0200)]
arping: api to return responder mac address

The new arping_acd call includes the responders mac address in the reply.
Enabling a client doing address conflict detection to identify if it
is itself that is replying or that it is another host uses the IP
address.

Type: feature
Change-Id: Ia4bab2af1086f06ed71ba42e2e07368d4e330a27
Signed-off-by: Ole Troan <otroan@employees.org>
7 months agonpt66: checksum applied to src address instead of dst address on rx 70/39470/2
Ole Troan [Fri, 1 Sep 2023 12:15:39 +0000 (14:15 +0200)]
npt66: checksum applied to src address instead of dst address on rx

Applied the checksum delta to the source address instead of the destination address
in the RX direction.

Cleaned up tests a little.

Type: fix
Change-Id: I871f3448365587e5319dfbca6ea356935321ff9b
Signed-off-by: Ole Troan <otroan@employees.org>
7 months agotracenode: filtering feature 13/39213/15
Maxime Peim [Tue, 11 Jul 2023 07:45:56 +0000 (09:45 +0200)]
tracenode: filtering feature

In order to be able to filter on encapsulated packet, a new node
has been added to the ip4/6-unicast arcs.

Type: feature
Change-Id: I1e8ee05bc6d0fce20cadd8319c81bab260c17d21
Signed-off-by: Maxime Peim <mpeim@cisco.com>
7 months agosession: fix allocation of proxy fifos 67/39467/7
Florin Coras [Fri, 1 Sep 2023 00:33:47 +0000 (17:33 -0700)]
session: fix allocation of proxy fifos

Fifos need to be synchronously allocated once a transport like tcp
accepts a session. Since events are now delivered asynchronously,
proxy apps must explicitly register a cb function that manages
fifo allocation prior to being notified of connect event.

Type: fix
Fixes: 0242d30

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7df973b7014e53e0766ea2bdc61e9871160bc18b

8 months agomap: test fix feature disabling 04/39304/8
Maxime Peim [Tue, 1 Aug 2023 09:29:15 +0000 (11:29 +0200)]
map: test fix feature disabling

Upon test teardown, MAP features were not disabled, potentially
leading packets to be treated by the wrong node.

Type: test
Change-Id: I0c1c614318d1308f825c5cc0bf95688e92f6d00a
Signed-off-by: Maxime Peim <mpeim@cisco.com>
8 months agovcl: set min threshold for tx ntf 48/39448/5
Florin Coras [Mon, 28 Aug 2023 06:14:50 +0000 (23:14 -0700)]
vcl: set min threshold for tx ntf

Make sure there's at least 3% space in the tx fifo before notifying vcl
of a tx event. The threshold is somewhat arbibrary but for a 4M fifo, it
now means that ~120kB of space should be available.

Should help minimize the amount of tx notifications generated by
session layer when apps are faster.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I11dd0931dca8f989000a2481f1f495bd267589c4

8 months agofateshare: a plugin for managing child processes 38/35638/23
Andrew Yourtchenko [Mon, 14 Mar 2022 09:49:15 +0000 (09:49 +0000)]
fateshare: a plugin for managing child processes

For the reasons of modularity and security, it is useful
to have various functionality split into processes different from VPP.
However, this approach presents the challenges of managing those processes,
and is markedly different from simply running everything within VPP process.

This plugin is an experiment in having the VPP itself start off a monitor
process which in turn starts the child processes, and restarts them if they
quit.

If the VPP process ceases to exist, the monitor process terminates all
the descendant processes and quits itself.

This allows to preserve the "single entity to manage" approach of
simply running a barebones VPP.

An example of running it:

export DPDK_CONFIG=""
export DISABLED_PLUGINS=dpdk
export EXTRA_VPP_CONFIG="fateshare { monitor ./build-root/install-vpp_debug-native/vpp/bin/vpp_fateshare_monitor command ./test1 }"
make run

Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I66221fd7403f220d9652fe76958ca499cfd070a7
Type: feature

8 months agosession: fix compilation when SESSION_DEBUG is on 50/39450/5
Florin Coras [Mon, 28 Aug 2023 06:30:39 +0000 (23:30 -0700)]
session: fix compilation when SESSION_DEBUG is on

Wrap SESSION_EVT in do loop to avoid complaints about if statement
having no arguments which can happen if debugging for groups is not
enabled.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I35af179b806ed47a1e20816a19291c31fdb7566a

8 months agompls: add mpls_interface_dump 22/39022/4
Pim van Pelt [Sat, 10 Jun 2023 14:46:34 +0000 (16:46 +0200)]
mpls: add mpls_interface_dump

Add an API call mpls_interface_dump() which returns a list of mpls_interface_details:
- If no sw_if_index is given, all MPLS enabled sw_if_index are returned.
- If a particular sw_if_index is given, and it doesn't exist, an empty list is returned.
- If a sw_if_index exists and has MPLS enabled, a list of that one sw_if_index is returned.

Tested:
- Create 3 loopback interfaces
- Call for ~0 and for sw_if_index 0..5 all return empty lists
- set int mpls loop0 enable
- set int mpls loop1 enable
- Call for ~0 returns 2, and the call for sw_if_index=1 and =2 (the loopbacks) returns
  each a list of one sw_if_index 1 resp 2, the other values of sw_if_index return empty list
- set int mpls loop0 disable
- Call for ~0 returns 1, and the call for sw_if_index=2 (loop1) returns both a list of one
  sw_if_index=2, the other values of sw_if_index return empty list
- set int mpls loop1 disable
- Call for ~0 and for sw_if_index 0..5 all return empty lists

Example Python3 API program:
```
api_response = vpp.api.mpls_interface_dump()
print(f"Response is {api_response}")

for i in [ 0, 1, 2, 3, 4, 5 ]:
  api_response = vpp.api.mpls_interface_dump(sw_if_index=i)
  print(f"Response[{i}] = {api_response}")
```

Type: improvement
Change-Id: If87f7d7f8972d99260e859757dbcb251c6fa54a8
Signed-off-by: Pim van Pelt <pim@ipng.nl>
8 months agoperftool: fix delsvec use of _vec_len 47/39447/3
Florin Coras [Sat, 26 Aug 2023 19:59:11 +0000 (12:59 -0700)]
perftool: fix delsvec use of _vec_len

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iab80e009d8717f759edb8133beaa55ed05e57bd5

8 months agonat: nat44-ed bug fix 42/38442/2
Wei Li [Wed, 8 Mar 2023 11:36:55 +0000 (11:36 +0000)]
nat: nat44-ed bug fix

fix lb static mapping
"nat44_ed_sm_o2i_add" laddr and lport

Type: fix

Signed-off-by: Wei Li <realbaseball2008@gmail.com>
Change-Id: I249a00919e8154d92cbce03f6db196c13612948f

8 months agonat: nat44-ed cli bug fix 40/38440/3
Wei Li [Wed, 8 Mar 2023 08:01:01 +0000 (08:01 +0000)]
nat: nat44-ed cli bug fix

lport and eport in Cli "nat44 add load-balancing static mapping" should hton()

Type: fix

Signed-off-by: Wei Li <realbaseball2008@gmail.com>
Change-Id: I2eadb7e341efb70cc406e10b3b189e5ebff09ff4

8 months agocnat: fix cnat_endpoint_encode 41/39441/1
Benoît Ganne [Thu, 24 Aug 2023 12:40:41 +0000 (14:40 +0200)]
cnat: fix cnat_endpoint_encode

Type: fix

Change-Id: I4ab713811626c097c7927228f3819b7785bbb951
Signed-off-by: Benoît Ganne <bganne@cisco.com>
8 months agonpt66: network prefix translation for ipv6 93/39393/5
Ole Troan [Thu, 17 Aug 2023 11:36:08 +0000 (13:36 +0200)]
npt66: network prefix translation for ipv6

This is the initial commit of a NPTv6 (RFC6296) implementation for VPP.
It's restricted to a single internal to external binding and runs
as an output/input feature on the egress interface.

Type: feature
Change-Id: I0e3497af97f1ebd99377b84dbf599ecea935ca24
Signed-off-by: Ole Troan <otroan@employees.org>
8 months agobuild: support linuxmint OS 07/39407/3
spencercoder [Tue, 22 Aug 2023 04:42:09 +0000 (12:42 +0800)]
build: support linuxmint OS

Support compiling in Linux Mint OS

Type: improvement

Change-Id: I08721227352b00127fe0acac67269775997fd974
Signed-off-by: spencercoder <xiexiaosong@ruijie.com.cn>
8 months agodpdk-cryptodev: fix coverity issues 04/39404/2
Piotr Bronowski [Mon, 21 Aug 2023 13:36:38 +0000 (13:36 +0000)]
dpdk-cryptodev: fix coverity issues

This patch addresses coverity issues CID 322716 and CID 322717.

Type: fix
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I59d6f40c1af8e829d8cb3c042a52e144aeaf1e6b

8 months agol2: fix prefetch 14/39214/3
Vratko Polak [Wed, 12 Jul 2023 11:24:45 +0000 (13:24 +0200)]
l2: fix prefetch

This is a clone of Gerrit 35419.
(It is abandoned and I am not the owner so I cannot reopen.)

Ticket: CSIT-1816
Type: fix
Fixes: 5e0ea09d96010e99a7ce0d2f3370f0de50c46c83

Change-Id: I2265cf38a9ce3155460a1025821c2749afca0add
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
8 months agosr: SRv6 Path Tracing midpoint processing performance improvement 67/39367/2
Julian Klaiber [Mon, 14 Aug 2023 11:39:13 +0000 (11:39 +0000)]
sr: SRv6 Path Tracing midpoint processing performance improvement

Moved the kernel call for the timestamp outside of the inner loop to improve the batch proccessing, and minimizing the kernel calls.

Type: improvement

Change-Id: I0245c223fc8a178724bb8c5df2b98083be046c26
Signed-off-by: Julian Klaiber <julian@klaiber.me>
8 months agonat: documention fix 00/39400/1
Steven Luong [Fri, 18 Aug 2023 18:20:00 +0000 (11:20 -0700)]
nat: documention fix

s/nat44 enable sessions/nat44 plugin enable sessions/

Type: docs

Change-Id: I93dbd161f085bff5b98df50cd29c9bedf5038307
Signed-off-by: Steven Luong <sluong@cisco.com>
8 months agodpdk-cryptodev: improve cryptodev cache ring implementation 46/39346/2
Piotr Bronowski [Thu, 6 Jul 2023 23:02:57 +0000 (23:02 +0000)]
dpdk-cryptodev: improve cryptodev cache ring implementation

Sw ring is renamed to the cache ring. This name better reflects the
puropse of this ring. We've introduced push/pop functions, as well as
other utility functions which remove code repetition. Error handlig
is improved: previously in case of an error all frame elements were
marked as bad, now only these for which errors occured have the error
status set.
Unnecessary stats counters have been removed.

Type: improvement
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I2fd42a529ac84ce5ad260611d6b35a861d441c79

8 months agovapi: improve vl_api_string_t handling 43/39343/2
Klement Sekera [Sun, 6 Aug 2023 17:33:16 +0000 (19:33 +0200)]
vapi: improve vl_api_string_t handling

Define vl_api_string_t to correspond with vlibapi/api_types.h
Fix allocation and size calculation routine generation.

Type: improvement
Change-Id: I6b0a3eb3459d75d326e67bfb76dac8125e480afa
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
8 months agovapi: support services 91/38491/9
Stanislav Zaikin [Thu, 21 Jul 2022 17:07:50 +0000 (19:07 +0200)]
vapi: support services

Add missing support for

service { rpc X_get returns X_get_reply stream X_details; }

Type: improvement

Change-Id: I27555f61a2974e414cb6554f32c550b8ee5eb037
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
8 months agocnat: add host tag to bitmap in cnat snat 87/39387/6
HediBouattour [Wed, 16 Aug 2023 11:26:22 +0000 (13:26 +0200)]
cnat: add host tag to bitmap in cnat snat

Type: feature

this patch adds a new tag "host" to interfaces for cnat-snat
if an interface is tagged pod and host we do not snat traffic outgoing through it

Change-Id: I71f5bfcb85581bb8508ba547374f0603f1079ac6
Signed-off-by: hedi bouattour <hedibouattour2010@gmail.com>
8 months agotests: more descriptive error message 95/39395/3
Klement Sekera [Thu, 17 Aug 2023 17:38:34 +0000 (19:38 +0200)]
tests: more descriptive error message

Type: improvement
Change-Id: Icf8a5dc711e1e11ec919b515d7af2f487a1c04c2
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 months agoidpf: add native idpf driver plugin 08/38708/16
Ting Xu [Thu, 15 Dec 2022 02:10:59 +0000 (02:10 +0000)]
idpf: add native idpf driver plugin

Add a new native idpf driver. This patch enables the device
initialization. Add some necessary functions and definations
for input and output. A new version of virtchnl is introduced.

Type: feature

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: Ibbd9cd645e64469f1c4c8b33346c1301be3f6927

8 months agodpdk: Newer meson 0.55.3 82/39382/4
nucleo [Tue, 15 Aug 2023 17:59:35 +0000 (20:59 +0300)]
dpdk: Newer meson 0.55.3

Fixes error with python 3.12

No module named 'pkg_resources'

'import pkg_resources' removed in 0.55.3

Type: fix

Change-Id: I15c8cf195fd07a0eb2f3b58f895ef4b26cc17b90
Signed-off-by: nucleo <alekcejk@googlemail.com>
8 months agotests docs: update python3 venv packages 85/39385/5
Dave Wallace [Tue, 15 Aug 2023 23:05:26 +0000 (19:05 -0400)]
tests docs: update python3 venv packages

- Package update performed by
  1. updating pip, pip-tools, setuptools
  2. 'make test-refresh-deps' on ubuntu 22.04
  3. fixing 'make test' and 'make docs' issues
     on ubuntu 22.04
  4. 'make test-refresh-deps' on ubuntu 20.04
- Add dependency for 'make test-refresh-deps'
  to insure python venv is set up.
- Update of python formatter, black,
  caused reformating of 41 python code
  files.

Type: make

Change-Id: I7cafdf4b5189065ac57cb6b254937f6e0897a924
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 months agol2:Add doc for l2 rewrite, and add examples 45/39345/9
yanlong [Tue, 8 Aug 2023 03:36:32 +0000 (11:36 +0800)]
l2:Add doc for l2 rewrite, and add examples

Supplemented the documentation of "l2 rewrite", and added examples

Type:docs

Change-Id: If49ae0b22989b3cd1c88a27a4e51b74be32d75e7
Signed-off-by: yanlong <dyl_wlc@163.com>
8 months agonat: mark several messages as production 45/39145/2
Andrew Yourtchenko [Tue, 1 Aug 2023 11:03:29 +0000 (13:03 +0200)]
nat: mark several messages as production

As per discussion on the VPP call, since they are being
used in CSIT tests and have not seen changes in a while,
mark the messages as production from the change process
standpoint.

Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I7fda71edd923b798d034380320a869f7c35cb5a6

8 months agovcl: fix ldp epoll events array overrun 84/39384/3
Florin Coras [Tue, 15 Aug 2023 19:11:50 +0000 (12:11 -0700)]
vcl: fix ldp epoll events array overrun

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3dd65946c220f958a4fda0551b053d690bf06c39

8 months agovcl: handle postponed disconnects with select 83/39383/3
Florin Coras [Tue, 15 Aug 2023 18:16:34 +0000 (11:16 -0700)]
vcl: handle postponed disconnects with select

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia8449344a471129c0d148b39d97a5d310c2a1fc7

8 months agovcl: fix error state switch for vcl_handle_mq_event 44/39344/4
wanghanlin [Tue, 8 Aug 2023 02:40:04 +0000 (10:40 +0800)]
vcl: fix error state switch for vcl_handle_mq_event

When a listen session receives an ACCEPTED message, but then
receives either a RESET or DISCONNECTED message from VPP before the
session is accepted, the listen session state is switched to
VPP_CLOSING or DISCONNECT.
The subsequent CLEANUP message handler attempts to send a
disconneted or reset reply message to VPP, but since the vpp_evt_q
for the listen session is null, this leads to a crash.

Type: fix
Change-Id: Ic51f78f631fe8d15bf8c56b795f4a900c3e2f724
Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
8 months agodpdk: bump rdma-core to 46.1 72/39372/1
Dave Wallace [Mon, 14 Aug 2023 20:19:46 +0000 (16:19 -0400)]
dpdk: bump rdma-core to 46.1

- Per dpdk 23.07 release notes (rdma-core >= 46.0)

Type: feature

Change-Id: I7c15e15e1cf4b6f652711f9446d9f8324f6c4092
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 months agodpdk: bump to DPDK 23.07 52/39352/2
Kai Ji [Tue, 8 Aug 2023 23:46:12 +0000 (23:46 +0000)]
dpdk: bump to DPDK 23.07

This patch bumps DPDK version from 23.03 to 23.07.

Type: feature

Change-Id: I15140cecd008bfafb358f6348a1cb8fc08f70f02
Signed-off-by: Kai Ji <kai.ji@intel.com>
8 months agosession: fix coverity warnings 62/39362/2
Florin Coras [Fri, 11 Aug 2023 21:40:13 +0000 (14:40 -0700)]
session: fix coverity warnings

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I910c8ce1713c6d346cc5ea4eb58a89c1c30a10a1

8 months agotests: filter coverage report output 55/39355/2
Dave Wallace [Wed, 9 Aug 2023 16:58:22 +0000 (12:58 -0400)]
tests: filter coverage report output

- Remove test code & non-vpp code from coverage report
- Remove driver/hardware vpp code which cannot be tested
  in 'make test' from coverage report

Type: fix

Change-Id: I04b50c14bc3437b845f2afafae47297189e61e3f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 months agocrypto-sw-scheduler: avoid crypto work on vpp_main 99/39299/4
Vratko Polak [Mon, 31 Jul 2023 15:08:21 +0000 (17:08 +0200)]
crypto-sw-scheduler: avoid crypto work on vpp_main

+ Checkstyle demanded indentation edits.

Type: fix
Ticket: VPP-2083
Fixes: 9a9604b09f15691d7c4ddf29afd99a31e7e31eed

Change-Id: Ie2d33d290330247d36435a073675b732bb64ae93
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
8 months agodocs: correct the directory path for index.html 49/39349/2
Steven Luong [Tue, 8 Aug 2023 18:20:09 +0000 (11:20 -0700)]
docs: correct the directory path for index.html

Type: fix

Change-Id: Ia0d6f57790dbca92662c6d8b986c325f1c399131
Signed-off-by: Steven Luong <sluong@cisco.com>
8 months agosession: async rx event notifications 58/37858/46
Florin Coras [Thu, 22 Dec 2022 23:03:44 +0000 (15:03 -0800)]
session: async rx event notifications

Move from synchronous flushing of io and ctrl events from transports to
applications to an async model via a new session_input input node that
runs in interrupt mode. Events are coalesced per application worker.

On the one hand, this helps by minimizing message queue locking churn.
And on the other, it opens the possibility for further optimizations of
event message generation, obviates need for rx rescheduling rpcs and is
a first step towards a fully async data/io rx path.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id6bebcb65fc9feef8aa02ddf1af6d9ba6f6745ce

8 months agocnat: remove rwlock on ts 48/29748/11
Nathan Skrzypczak [Wed, 4 Nov 2020 10:41:05 +0000 (11:41 +0100)]
cnat: remove rwlock on ts

Type: improvement

Remove rwlock contention on timestamps. ~10% pps with
10k sessions. Use fixed-size-pools of increasing sizes
starting with 4K, and with a x2 step each time.
We don't free/shrink allocated pools.

Change-Id: I5fea51faba40430106c823275a6356e81709d118
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
8 months agocnat: add ip/client bihash 21/32821/12
Nathan Skrzypczak [Fri, 4 Jun 2021 16:37:27 +0000 (18:37 +0200)]
cnat: add ip/client bihash

This replace the cnat ip4/ip6 to client
lookups previously done with a regular
hash, by a bihash lookup.

Type: improvement

Do the client lookup in a bihash instead of
a hash.

Change-Id: I730c1893525c002b44ada8e290a36802835e88e9
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
8 months agotests: fix setting gcov flag for test-cov target 51/39351/2
Dave Wallace [Tue, 8 Aug 2023 19:25:21 +0000 (15:25 -0400)]
tests: fix setting gcov flag for test-cov target

Type: fix

Change-Id: I3c663babe4f32f5d2870265336b5d272cc029ce7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 months agocnat: flag to disable rsession 08/34108/10
Nathan Skrzypczak [Thu, 14 Oct 2021 15:41:57 +0000 (18:41 +0300)]
cnat: flag to disable rsession

This adds a flag on the translation
asking the VIP & input-feature nodes
not to create the return session when
translating / load-balancing an incoming
flow. This is needed with maglev & DSR

Type: feature

Change-Id: I699012310ddc59f6ceeeb4878638eac6da5128dc
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
8 months agodocs:Improve the README of vpp docs 71/39271/14
yanlong [Wed, 26 Jul 2023 07:12:04 +0000 (15:12 +0800)]
docs:Improve the README of vpp docs

Type:fix

Change-Id: Ie2ae728450ef123379b697cdf9c873d5bec01b47
Signed-off-by: yanlong <dyl_wlc@163.com>
8 months agoipsec: add support for RFC-4543 ENCR_NULL_AUTH_AES_GMAC 70/38470/9
Benoît Ganne [Fri, 10 Mar 2023 16:33:03 +0000 (17:33 +0100)]
ipsec: add support for RFC-4543 ENCR_NULL_AUTH_AES_GMAC

Type: improvement

Change-Id: I830f7a2ea3ac0aff5185698b9fa7a278c45116b0
Signed-off-by: Benoît Ganne <bganne@cisco.com>
8 months agovcl: Fix the ldp init check 42/39242/4
Gao Feng [Mon, 17 Jul 2023 14:19:32 +0000 (22:19 +0800)]
vcl: Fix the ldp init check

Maybe some function calls the wrapper funtion like read which invokes
the ldp_init_check in the other libs as a constructor before
ldp_constructor. Then the ldp has been initialized already when
ldp_constructor is invoked. And it's normal case, we shouldn't treat it
as an error.

So ldp_init should return success if ldp is initialized already instead
of an assert.

Type: fix

Change-Id: Ifa2a7b1d5471981a3f840b14a4fa5d48fb1f1374
Signed-off-by: Gao Feng <gfree.wind@outlook.com>
8 months agovlib: support sibling node creation with vlib_register_node() 33/39333/2
Damjan Marion [Sun, 6 Aug 2023 23:15:37 +0000 (01:15 +0200)]
vlib: support sibling node creation with vlib_register_node()

Type: improvement
Change-Id: I7e82a262692b2b6513f81889d78a43c10ca7bfb2
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 months agovppinfra: add clib_file_get_resolved_basename 32/39332/3
Damjan Marion [Sun, 6 Aug 2023 23:07:09 +0000 (01:07 +0200)]
vppinfra: add clib_file_get_resolved_basename

more generic version of clib_sysfs_link_to_name with support for
format strings...

Type: improvement
Change-Id: I0cb263748970378c661415196eb7e08450370677
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 months agovppinfra: add vec_foreach_pointer macro 31/39331/2
Damjan Marion [Sun, 6 Aug 2023 18:41:40 +0000 (20:41 +0200)]
vppinfra: add vec_foreach_pointer macro

works with vectors of pointers...

Type: improvement
Change-Id: I530653978fcf981be299cf42a1133be000d74d0c
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 months agovppinfra: add unformat_init_path 30/39330/3
Damjan Marion [Sun, 6 Aug 2023 18:39:38 +0000 (20:39 +0200)]
vppinfra: add unformat_init_path

More conveninet way to unformat file by providing filesystem path.
Takes format string for easier constuction of path...

Type: improvement
Change-Id: I433204fa20dc98e2b11c53914883d047a7fc62c6
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 months agovcl: fix error state switch for VCL_STATE_LISTEN_NO_MQ sessions 38/39338/2
wanghanlin [Mon, 7 Aug 2023 09:23:53 +0000 (17:23 +0800)]
vcl: fix error state switch for VCL_STATE_LISTEN_NO_MQ sessions

When a VCL_STATE_LISTEN_NO_MQ session receives an ACCEPTED message,
but then receives either a RESET or DISCONNECTED message from VPP
before the session is unlistened, the listen session state is
switched to DISCONNECT.
The subsequent CLEANUP message handler attempts to send a reset
reply message to VPP, but since the vpp_evt_q for the listen
session is null, this leads to a crash.

Type: fix
Change-Id: Id7e88dcb16df3eda912b3f763730ec8d8973473a
Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
8 months agocnat: Support offloaded check sums 49/31449/14
Nathan Skrzypczak [Thu, 25 Feb 2021 18:13:19 +0000 (19:13 +0100)]
cnat: Support offloaded check sums

This patch removes zero checks for new_addr, new_port
meaning sessions with zero values will rewrite the packet
with a 0 value instead of leaving it in place. This allows
to reduce branchiness in the code, and sessions are fully
resolved at creation time anyway.

This also adds support for checksum offloads:
- IP checksum offload : we always compute the checksum to
avoid issues with drivers. We'll revert this if we realize
cost gets too important.
- TCP/UDP checksum offload : we add the implementation for
pseudo header checksum computation. This is needed for the
drivers that do not re-compute this pseudo-checksum before
the packet is TX-ed (e.g. a few DPDK drivers).

Type: improvement

Change-Id: I6543f3aec8c120ec50f4219108609138283620ef
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
8 months agonsh: fix nsh gre references 28/39328/1
Benoît Ganne [Fri, 4 Aug 2023 14:13:43 +0000 (16:13 +0200)]
nsh: fix nsh gre references

Since gre is a plugin, nsh should not use symbol names directly.

Type: fix
Fixes: cefb178aa487a217d4ac75d7d4fa62db4b7d70fd

Change-Id: I1a1c20740aabdaafd69f507cd71016c3109b0205
Signed-off-by: Benoît Ganne <bganne@cisco.com>
8 months agovpp: detect early nosyslog and interactive flags 26/39326/1
Damjan Marion [Fri, 4 Aug 2023 10:47:44 +0000 (10:47 +0000)]
vpp: detect early nosyslog and interactive flags

So error logs are displayed on console earlier....

Type: improvement
Change-Id: If31b76c9d06254b0fec5b5b3f4e92a881b4cf786
Signed-off-by: Damjan Marion <damarion@cisco.com>
9 months agovppinfra: add pool_foreach_pointer() 11/39311/2
Damjan Marion [Wed, 2 Aug 2023 15:58:58 +0000 (15:58 +0000)]
vppinfra: add pool_foreach_pointer()

Works on pools of pointers...

Type: improvement
Change-Id: I194dec389ca4c5ec2ce3361b54a9968c9caecefc
Signed-off-by: Damjan Marion <damarion@cisco.com>
9 months agoquic: fix closing of streams 06/39306/2
Florin Coras [Tue, 1 Aug 2023 17:53:22 +0000 (10:53 -0700)]
quic: fix closing of streams

Avoid explicit manipulation of session state and generate closing event
if need be.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I07cda1db08a2673b27b496ea1371b0dfd8e6f98a