vpp.git
2 years agomisc: update my email-address 75/35775/1
Klement Sekera [Thu, 24 Mar 2022 17:01:16 +0000 (18:01 +0100)]
misc: update my email-address

Type: fix
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I756bff7ecedf36cc685a20ba63c9d5229fc2ff32

2 years agobfd: use local error index when incrementing node counters 71/35771/2
Paul Atkins [Thu, 24 Mar 2022 11:26:16 +0000 (11:26 +0000)]
bfd: use local error index when incrementing node counters

When incrementing node counters with vlib_node_increment_counter
the local error index should be passed in. vlib_node_increment_counter
adds the local index to the nodes base index to get the counter to
write to. If we pass in the global counter index, the offset gets
added again in the fn, and we then potentially write into memory that
is not part of the counter vector.

Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I43be33a51bcb52d520495d326b971c1d848d96b5

2 years agosession: safe reallocs for transport endpoint pool 60/35760/5
Florin Coras [Wed, 23 Mar 2022 23:35:05 +0000 (16:35 -0700)]
session: safe reallocs for transport endpoint pool

Type: improvement

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

2 years agoip: The check for 'same packet' must include the FIB index 68/35768/2
Neale Ranns [Thu, 24 Mar 2022 12:28:42 +0000 (12:28 +0000)]
ip: The check for 'same packet' must include the FIB index

Type: fix

otherwise if two packets arrive with the same source address but from different VRFs, then they are treated as the same and they use the same LB and thus share the same fate. but the lookup, when done, results in two different LBs, and hence the fate can be different.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Id6e16f7c577a561d9ddd7066339fa4385361d07f

2 years agoip6-nd: stop sending RA by default 53/35553/4
Alexander Chernavin [Sat, 5 Mar 2022 15:51:54 +0000 (15:51 +0000)]
ip6-nd: stop sending RA by default

Type: improvement

Currently, RA message sending is enabled by default - both periodic and
in response to RS message. However, RFC 4861 section 6.2.1 says the
following:

  Note that AdvSendAdvertisements MUST be FALSE by default so that a
  node will not accidentally start acting as a router unless it is
  explicitly configured by system management to send Router
  Advertisements.

With this change, RA message sending is disabled by default and
"test_ip6.TestIPv6.test_rs" updated appropriately.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I2a8865199cb665c59268504aefe2976e5ee96dc2

2 years agompls: Set the MTU field in the frag-needed ICMP when doing MPLS fragmentation 10/35710/3
Neale Ranns [Fri, 18 Mar 2022 13:05:09 +0000 (13:05 +0000)]
mpls: Set the MTU field in the frag-needed ICMP when doing MPLS fragmentation

Type: fix

The reported MTU should include the MPLS label overhead

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3df6d2e0b13f49701e187a766a157498dcaafbc0

2 years agocrypto-native: fix index in VAES aes-cbc encrypt 67/35767/2
Benoît Ganne [Thu, 24 Mar 2022 12:39:22 +0000 (13:39 +0100)]
crypto-native: fix index in VAES aes-cbc encrypt

Type: fix

Change-Id: Id7ae0d4c53cbca3785964f0bef92e9cd589d4ce9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agobuild: set OS_ID_LIKE on to be OS_ID on Debian proper 65/35765/3
Andrew Yourtchenko [Thu, 24 Mar 2022 11:45:10 +0000 (11:45 +0000)]
build: set OS_ID_LIKE on to be OS_ID on Debian proper

OS_ID_LIKE from /etc/os-release is used to determine
the type of packaging. On Debian it ends up being empty,
so the "ninja package" does not work for out of tree plugin
builds.

Solution: if OS_ID_LIKE is not set, set it to OS_ID

Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I077d4fdb509ea94b187d11391b1f49edb94c4e30
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2 years agodpdk: enable int mode for virtio 79/35679/2
Paul Atkins [Thu, 10 Mar 2022 15:32:56 +0000 (15:32 +0000)]
dpdk: enable int mode for virtio

The way of specifying which interface supports what has changed.
Re-add support for adaptive mode in virtio.

Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I2f8ffa6311a4081b93fb08a7e92408b8bffbae64

2 years agobuild: exclude dlmalloc.[ch] from checkstyle verification 61/35761/4
Dave Wallace [Thu, 24 Mar 2022 01:29:54 +0000 (21:29 -0400)]
build: exclude dlmalloc.[ch] from checkstyle verification

- dlmalloc.[ch] is an imported open source library which
  somehow manages to choke clang-format-diff to the point
  of consuming ~1 minute to run against a single character
  diff.

Type: make

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I16c6d6da664da8634aa682dce9d2120072626730

2 years agofib: Fix crash when removing a covering prefix 51/35751/3
Neale Ranns [Wed, 23 Mar 2022 14:51:57 +0000 (14:51 +0000)]
fib: Fix crash when removing a covering prefix

Type: fix

When a covering entry is removed from the table, the covered entries first see it 'updated' and then 'removed'.
the crash occurs because the covered prefixes share (simple pointer copy) the covereds hash table of path extensions. During the cervers deletion this hash table has been removed and the update of the covered crashes when recaluationg forwarding becuase it uses the free'd hash.
Fix is to refetch the shared hash table (which is NULL) when the covered is updated.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Icefca9d7b21da975111d0e974d75f663fc0cc00c

2 years agodpdk: copy the enable_rxq_int flag from driver to conf 78/35678/2
Paul Atkins [Thu, 10 Mar 2022 16:20:47 +0000 (16:20 +0000)]
dpdk: copy the enable_rxq_int flag from driver to conf

The support for interrupt mode is not being respected as it is not
copied into the driver conf, which is what is checked when trying to
enable it.

Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I2e502306e27bd98f8037d1a0a396201e099b50b5

2 years agoclassify: fix typo in AVX-512 find entry 59/35759/2
Benoît Ganne [Wed, 23 Mar 2022 18:42:41 +0000 (19:42 +0100)]
classify: fix typo in AVX-512 find entry

Type: fix
Fixes: 26bc9f3c855496fb56f5fc648f75a299d4d539f8

Change-Id: Idab52bf856c03ded7b181608c3db1313aa2e33de
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agovlib: send full error message to syslog 51/35551/2
Jing Peng [Fri, 4 Mar 2022 22:43:50 +0000 (17:43 -0500)]
vlib: send full error message to syslog

Currently the last character of the error message string
is temporarily changed to a null byte '\0' before the string
is sent to syslog(3), resulting in confusingly incomplete log
entries.

This patch changes the syslog format to "%.*s" so that the
maximum number of characters to be printed could be controlled.

Type: improvement

Signed-off-by: Jing Peng <pj.hades@gmail.com>
Change-Id: I1bd6295c19b51b962a3d8ee3016cd91ffb2a4eaf

2 years agodevices: add tx trace for af-packet 41/35741/3
Mohsin Kazmi [Tue, 22 Mar 2022 23:17:46 +0000 (23:17 +0000)]
devices: add tx trace for af-packet

Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ib96ee54eaf967bf435d6da910a6b582e87fbedc0

2 years agodevices: add support for offloads 40/35740/5
Mohsin Kazmi [Tue, 22 Mar 2022 21:40:04 +0000 (21:40 +0000)]
devices: add support for offloads

Type: improvement

This patch adds support for:
  1) GSO
  2) checksum offload

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ib00629888c62da04d58db36ce021993769e736c9

2 years agodevices: af-packet v3 support 36/35636/3
Mohsin Kazmi [Fri, 18 Mar 2022 16:58:31 +0000 (16:58 +0000)]
devices: af-packet v3 support

Type: feature

CPU usage ~20% less than v2.
Performance improvement 20% more than v2.
High vector rate.

Change-Id: I24bc594200f42664b59d07b44d44578e61068bbc
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agovppinfra: deprecate clib_mem_is_vec 58/35758/2
Damjan Marion [Wed, 23 Mar 2022 17:53:29 +0000 (18:53 +0100)]
vppinfra: deprecate clib_mem_is_vec

Use of clib_mem_is_heap_object is not reliable enough for production use
as it relies on just few bytes of memory allocator chunk header.

Type: improvement
Change-Id: I48c8adde8b6348b15477e3a015ba515eb7ee7ec2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: change vlib_register_node so it takes format string for node name 57/35757/2
Damjan Marion [Wed, 23 Mar 2022 16:36:56 +0000 (17:36 +0100)]
vppinfra: change vlib_register_node so it takes format string for node name

This allows specifying both c string and vector for node name
and removes need for crafting temporary string.

Type: improvement
Change-Id: I0b016cd70aeda0f68eb6f9171c5152f303be7369
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agodpdk: fix rx/tx burst function name 42/35742/2
Tianyu Li [Tue, 22 Mar 2022 09:41:18 +0000 (17:41 +0800)]
dpdk: fix rx/tx burst function name

Type: fix
Fixes: 65105c95fe03 ("dpdk: improve logging")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I69d616c7e6e7b5395ebf083b1ac5c3e85f99bbdd

2 years agovppinfra: fix bihash key comparison for 512-bits vectors 48/35748/4
Benoît Ganne [Mon, 21 Mar 2022 14:01:41 +0000 (15:01 +0100)]
vppinfra: fix bihash key comparison for 512-bits vectors

bihash keys are less than 64-bytes, do not overflow.

Type: fix

Change-Id: Ic55407eb9ccca38058f7e62b363ec05c8445fbcb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agovlib: avoid use of vector of voids 53/35753/2
Damjan Marion [Wed, 23 Mar 2022 15:59:23 +0000 (16:59 +0100)]
vlib: avoid use of vector of voids

Type: fix
Change-Id: I76e28854db8a1e9134c816c0c5d81b031dc4e27d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agoip: Add unformat for flow_hash_config 54/35754/2
Nathan Skrzypczak [Wed, 23 Mar 2022 17:08:53 +0000 (18:08 +0100)]
ip: Add unformat for flow_hash_config

Type: improvement

This also makes the is_white_space function
public

Change-Id: Ifc1c0d4509f3ecae14f09bb5fa7a2eea33c49b09
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agovnet: Remove the unused fields from opaque2 99/35699/2
Neale Ranns [Thu, 17 Mar 2022 17:27:31 +0000 (17:27 +0000)]
vnet: Remove the unused fields from opaque2

Type: refactor

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ibb6d19de053c306e9758dbfa827ab7bcab5de856

2 years agovlib: mitigate outdated new cli session events 22/35722/2
Vladislav Grishenko [Wed, 29 Dec 2021 09:30:32 +0000 (14:30 +0500)]
vlib: mitigate outdated new cli session events

Possible races while concurrent additon to the new sessions vector
in a one process and remove from it in an another need to be avoided.
Let the vector be changed in the new session process function only.
Also cli_file_pool element may be freed already at the new session
event arrive timepoint, still causing unexpected cli banner for
noninteracive cli sessions.

Type: fix
Fixes: 17a67218587d40541ff522c6a86f354720481fbb
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I022d16dd3aad9c9330834d35c58938f04b015b08

2 years agovlib: fix memory leak on process nodes reforking 21/33821/2
Vladislav Grishenko [Sat, 25 Sep 2021 16:00:59 +0000 (21:00 +0500)]
vlib: fix memory leak on process nodes reforking

The processes vector leaked on reforking and needs to be
freed before recloning from main node processes.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Id69bc3fd42e2efacfcd521f98e6e51a9c712fef5

2 years agovlib: leave SIGCONT signal with its default handler 20/35720/3
Vladislav Grishenko [Sun, 20 Mar 2022 21:21:42 +0000 (02:21 +0500)]
vlib: leave SIGCONT signal with its default handler

Systemd always sends SIGCONT after KillSignal, to ensure that even suspended
tasks can be terminated cleanly. However, the default action of SIGCONT
handler in VPP such as unix_signal_handler() is process termination with
coredump, what is not really desired. So, leave it alike SIGSTOP with its
default handler.

Type: feature
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I54c06d21669ec3c709322d746db9e28448c31bb8

2 years agoapi: better segregate client and server code 58/35558/3
Benoît Ganne [Fri, 4 Mar 2022 16:17:04 +0000 (17:17 +0100)]
api: better segregate client and server code

 - move memory and server specific vl_msg_api_handler_with_vm_node()
   to memory server code only
 - keep api_global_main static

Apart from being cleaner, this also helps avoiding symbols conflict
when both client and server libs are loaded in the same process, as is
done by the prom plugin.
Those symbols conflict confuse ASan and can be nasty to debug.

Type: improvement

Change-Id: Iaf58596cc753ad8d3fedd8d65c4bf480ac129c2c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoperfmon: null-terminate string 44/35744/3
Damjan Marion [Wed, 23 Mar 2022 12:13:41 +0000 (13:13 +0100)]
perfmon: null-terminate string

Type: fix
Change-Id: I43ebb2c2922f3b8b8eddf26ccdf044f31d7b7a10
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agostats: fix crash due to pointer taken before validate 52/35752/1
Damjan Marion [Wed, 23 Mar 2022 15:35:18 +0000 (16:35 +0100)]
stats: fix crash due to pointer taken before validate

Type: fix
Change-Id: Iee9eab18da142bfe0645761deea13b0fe911a43b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: deprecate vppinfra/graph.[ch] 50/35750/2
Damjan Marion [Wed, 23 Mar 2022 13:53:51 +0000 (14:53 +0100)]
vppinfra: deprecate vppinfra/graph.[ch]

Type: refactor
Change-Id: Iba0466b60354955ba73f851435a7127435b7066d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agocrypto-native: fix dst index typo in VAES 46/35746/1
Benoît Ganne [Wed, 23 Mar 2022 13:17:26 +0000 (14:17 +0100)]
crypto-native: fix dst index typo in VAES

Type: fix

Change-Id: Ib025d8c1bc9bd651b6448d6a41fd1efa6f0b7362
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agosession: use safe realloc for pools 47/35647/24
Florin Coras [Tue, 15 Mar 2022 04:17:25 +0000 (21:17 -0700)]
session: use safe realloc for pools

Type: improvement

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

2 years agotests: add http tps test 89/35489/3
Filip Tehlar [Tue, 22 Feb 2022 15:19:20 +0000 (15:19 +0000)]
tests: add http tps test

Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I56a585a8a1f588e682552913cfbdd4551e057ead

2 years agobuild: remove clang-format-10 05/35705/2
Dave Wallace [Thu, 17 Mar 2022 21:44:35 +0000 (17:44 -0400)]
build: remove clang-format-10

- No longer used now that ubuntu-18.04 is deprecated.
- Change default to clang-format-11 in checkstyle.sh

Type: make

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I202244563738417bf4ae5b22fc8e2804bff2d25f

2 years agomemif: fix the maxmimum number of txqs 94/35694/2
Mohsin Kazmi [Thu, 17 Mar 2022 12:59:44 +0000 (12:59 +0000)]
memif: fix the maxmimum number of txqs

Type: fix

With multi-txq in VPP, user should be able to create
more txqs than vpp threads. MEMIF_MAX_M2S_RING should
be defined to 256 instead of number of vpp threads.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I337c3a5ea691470815653ff2dbfa862bb324b240

2 years agofib: refetech the adj after the walk in case the pool realloc'd 25/35725/2
Vladislav Grishenko [Tue, 26 Oct 2021 19:07:01 +0000 (00:07 +0500)]
fib: refetech the adj after the walk in case the pool realloc'd

Follow e3aeb38fa82b77ae84643f5140d9674056b6b5ca

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I743911cacc026af5da392d26eaf47ab83ea1de99

2 years agobuild: fix clang-format-diff[.py] detection 97/35397/4
Klement Sekera [Fri, 18 Feb 2022 16:23:33 +0000 (16:23 +0000)]
build: fix clang-format-diff[.py] detection

Fix clang-format-diff autodetection error in case of non-standard
clang-format-diff path. Also allow finding clang-format-diff.py in
non-standard location.

Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I3cb76aa152a8245e62db62f5fe2ba96b1ff86428

2 years agotests: fix DEBUG=attach functionality 16/35616/2
Klement Sekera [Thu, 10 Mar 2022 10:47:45 +0000 (11:47 +0100)]
tests: fix DEBUG=attach functionality

Make make test-start-vpp-in-gdb work again.
Fix incorrect temp directory when using DEBUG=attach.

Type: fix
Fixes: b23ffd7ef216463c35b75c831e6a27e58971f4ec
Change-Id: Ie98b637acbbe0221606ccdc7b54f63885e5951a4
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2 years agostats: fix vlib_stats_validate_will_expand_internal 35/35735/2
Damjan Marion [Mon, 21 Mar 2022 20:08:00 +0000 (21:08 +0100)]
stats: fix vlib_stats_validate_will_expand_internal

Type: fix
Change-Id: If4c0b23aaa4fc57c0783efcbe349aba5e5885b30
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agosession: linked list of events to be handled by main 34/35734/11
Florin Coras [Mon, 21 Mar 2022 17:38:01 +0000 (10:38 -0700)]
session: linked list of events to be handled by main

Minimize amount of rpcs from first worker to main

Type: improvement

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

2 years agosr: fix srv6 definition of behavior associated to a LocalSID 12/33312/5
Francesco Lombardo [Fri, 30 Jul 2021 13:54:01 +0000 (15:54 +0200)]
sr: fix srv6 definition of behavior associated to a LocalSID

The behavior associateted to a LocalSID accordig to the definition should be u8 instead of u16;

Type: fix

Signed-off-by: Francesco Lombardo <franclombardo@gmail.com>
Change-Id: I6dd60d5facc1c3f20900cb393619349e82eef38c
Signed-off-by: Francesco Lombardo <franclombardo@gmail.com>
2 years agovppinfra: use clib_mem_alloc 32/35732/3
Damjan Marion [Mon, 21 Mar 2022 14:06:57 +0000 (15:06 +0100)]
vppinfra: use clib_mem_alloc

Type: refactor
Change-Id: I26a2a410f8f4070d10696f796d5887842cad3916
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agowireguard: dont stacksmash bad peer base64 keys 25/35625/2
Jon Loeliger [Thu, 10 Mar 2022 17:23:27 +0000 (11:23 -0600)]
wireguard: dont stacksmash bad peer base64 keys

Just like commit 252647482b24bb3474e8f13bc86100718176832f
did for Wireguard interface keys, prevent stack smashing
the peer keys.

Integer math on 32 bytes of base64 data might yield 33 bytes
of data in some poorly formed user input of private key values.
Rather than smashing the stack (detected) and aborting, simply
allow for the possible yet irrelevant 33-rd byte of data.

Type: fix
Fixes: edca1325cf296bd0f5ff422fc12de2ce7a7bad88
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Change-Id: I9f77b3faaaa01d3123b356c958db60c87238db9c

2 years agowireguard: improve peer dump details 24/35624/3
Jon Loeliger [Wed, 2 Mar 2022 20:26:56 +0000 (14:26 -0600)]
wireguard: improve peer dump details

- Add peer_index, table_id, and keep-alive.
- Fix some lingering cut-n-paste issues in the API file.

Type: improvement
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Change-Id: I6fc0729ba0268bbcda0248f680979c44e68b6b0c

2 years agovppinfra: add new bihash exports 74/34674/3
Nathan Skrzypczak [Thu, 2 Dec 2021 13:40:06 +0000 (14:40 +0100)]
vppinfra: add new bihash exports

This adds two new exported functions
for the clib_bihash

* clib_bihash_add_with_overwrite_cb allowing
to pass a callback to be called on overwriting
a key with bucket lock held.
* clib_bihash_add_del_with_hash doing an add_del
with a precomputed hash.

Type: feature

Change-Id: I1590c933fa7cf21e6a8ada89b3456a60c4988244
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agohsa: add support for SAPI in vpp_echo 11/35711/3
Filip Tehlar [Fri, 18 Mar 2022 11:44:25 +0000 (11:44 +0000)]
hsa: add support for SAPI in vpp_echo

Type: feature

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: If24a43b7f79e05092306562c192de03994dec550

2 years agovppinfra: deprecate vec numa macros 12/35712/2
Damjan Marion [Fri, 18 Mar 2022 14:48:12 +0000 (15:48 +0100)]
vppinfra: deprecate vec numa macros

More generic vector heap code coming in another patch...

Type: refactor
Change-Id: I2327128fb3aba9d5d330f46a35afec32e1e3942e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agotests: fix the RND_SEED parsing 14/35714/2
Andrew Yourtchenko [Fri, 18 Mar 2022 17:05:53 +0000 (17:05 +0000)]
tests: fix the RND_SEED parsing

The random seed is not an integer, so the current code does not allow reproducing a test run by running e.g.

RND_SEED=1647595144.0940742 make test

Solution: make the random seed a positive float.

Also, add the missing positiveness check to the positive_integer function.

Type: fix

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

2 years agosession: add infra for safe pool reallocs 08/35608/41
Florin Coras [Wed, 9 Mar 2022 21:55:38 +0000 (13:55 -0800)]
session: add infra for safe pool reallocs

This is not to be used lightly.

The idea is to forces pool reallocs to be done only on main thread with
a barrier to make sure pools are always reallocated without
peekers/readers. If rpcs are delayed and the pool runs out of elements,
workers will block waiting for barrier and force the realloc.

Consumers of this api should be session layer and transports.

Type: feature

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

2 years agoudp: avoid grabbing vlib main if not needed 15/35715/3
Florin Coras [Fri, 18 Mar 2022 17:27:29 +0000 (10:27 -0700)]
udp: avoid grabbing vlib main if not needed

Type: improvement

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

2 years agomisc: Auto close PRs to GitHub mirror 16/35716/1
Ed Warnicke [Fri, 18 Mar 2022 17:26:04 +0000 (12:26 -0500)]
misc: Auto close PRs to GitHub mirror

Introduce a GitHub Action to auto close PRs submitted via GitHub
Will add a helpful comment to point folks towards gerrit.

Type: feature

Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Change-Id: I3c4a2590d4e38edd1061e65e800cfdb124c43866

2 years agovppinfra: refactor *_will_expand() functions 04/35704/4
Damjan Marion [Thu, 17 Mar 2022 17:59:46 +0000 (18:59 +0100)]
vppinfra: refactor *_will_expand() functions

Type: refactor
Change-Id: I3625eacf9e04542ca8778df5d46075a8654642c7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: deprecate vec_free_h() 03/35703/3
Damjan Marion [Thu, 17 Mar 2022 17:29:32 +0000 (18:29 +0100)]
vppinfra: deprecate vec_free_h()

vec_free() does the work

Type: refactor
Change-Id: I8a97607c3b2f58d116863642b32b55525dc15d88
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: use stored vec header size to find header 02/35702/3
Damjan Marion [Thu, 17 Mar 2022 14:46:25 +0000 (15:46 +0100)]
vppinfra: use stored vec header size to find header

Type: refactor
Change-Id: Iaa1e43c87c5725ab33ea8489bff2a7bda18b9c79
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: fixed pool from heap 08/35708/2
Damjan Marion [Fri, 18 Mar 2022 11:28:35 +0000 (12:28 +0100)]
vppinfra: fixed pool from heap

Immediate benefit is ability to use hugepage backed memory.

Type: improvement
Change-Id: Ibcae961aa09ea92d3e931a40bedbc6346a4b2039
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agocnat: Fix conflicting rsession 09/35209/3
Nathan Skrzypczak [Wed, 2 Feb 2022 18:31:43 +0000 (19:31 +0100)]
cnat: Fix conflicting rsession

When dNAT-ing to a VIP, it can happen
that the return session conflicts with
another forward session than the one
we own.

This patchs adds a rsession_flags
CNAT_SESSION_RETRY_SNAT that makes cnat_session_create
search for a free src port to use for the
resulting return session.

It also makes forward & return session
share their fate in the session scanner.

Type: fix

Change-Id: Id0edf59abf8e5bc0c0d8941ba289c4563c77dee0
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agomemif: fix rx/txqueue RC on connected 52/34852/3
Nathan Skrzypczak [Fri, 7 Jan 2022 15:02:02 +0000 (16:02 +0100)]
memif: fix rx/txqueue RC on connected

Type: fix

Calling vnet_hw_if_register_tx_queue should
be done with the worker barrier held, as
virtio-pre-input might be grabbing a queue
while a memif connect event is triggered.

Change-Id: Ie1272cdfd2477faf7a4e10f30778279872f04916
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agoip: fix assert in ip4_ttl_inc 39/35439/2
Aloys Augustin [Thu, 24 Feb 2022 15:44:23 +0000 (15:44 +0000)]
ip: fix assert in ip4_ttl_inc

There is no need to verify the checksum for packets that have the IP
checksum offload flag set. This uses the same logic as
ip4_ttl_and_checksum_check.

Type: fix

Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Change-Id: I177b07212a992362a4c965c074dcecf1e504c593

2 years agobfd: remove source IP check from session add 06/35606/2
Klement Sekera [Wed, 9 Mar 2022 15:11:27 +0000 (16:11 +0100)]
bfd: remove source IP check from session add

Checking for existence of source address on interface prevents creating
session before assigning address to said interface. Removing this check
allows more flexibility when configuring BFD feature.

Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: Ia57960e29b5dbdb758a7a64193c28f21482f229e

2 years agovlib: fix vlib_mains vector alignment 06/35706/2
Florin Coras [Thu, 17 Mar 2022 23:31:50 +0000 (16:31 -0700)]
vlib: fix vlib_mains vector alignment

Type: fix

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

2 years agovcl: fix invalid socket read 98/35698/2
Filip Tehlar [Thu, 17 Mar 2022 17:25:47 +0000 (17:25 +0000)]
vcl: fix invalid socket read

Type: fix

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ic8cc12788d9062f30faa992afaecc0c64078c4d7

2 years agovppinfra: vec_max_len, vec_mem_size use stored header size 01/35701/2
Damjan Marion [Thu, 17 Mar 2022 14:32:56 +0000 (15:32 +0100)]
vppinfra: vec_max_len, vec_mem_size use stored header size

Type: improvement
Change-Id: I17778e89674da0e8204713302e2293377bdabcbc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: store vector header size and alignment into header 91/35691/4
Damjan Marion [Wed, 16 Mar 2022 16:57:29 +0000 (17:57 +0100)]
vppinfra: store vector header size and alignment into header

On the forst vector alloc values are stored into header.
Later, when vector grows values from header are used istead of provided
ones.

In the debug image code will assert if same values are not provided.

Type: improvement
Change-Id: I8fdcfa495e9c1df0f6392c90f634e8c74b73b328
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: move hash bitmap out of vec header 00/35700/2
Damjan Marion [Thu, 17 Mar 2022 16:54:48 +0000 (17:54 +0100)]
vppinfra: move hash bitmap out of vec header

Type: refactor
Change-Id: Ibd29a717eaf12d795b3bceb31835d6fc655268b1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agomisc: Improve go bindings gen 17/35617/3
Nathan Skrzypczak [Thu, 10 Mar 2022 11:38:31 +0000 (12:38 +0100)]
misc: Improve go bindings gen

Type: improvement

Change-Id: Id705dab895602a60b053296b560ca3db5b0cd344
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agonat: fix ICMP error translation 96/35596/3
Klement Sekera [Tue, 8 Mar 2022 19:13:57 +0000 (20:13 +0100)]
nat: fix ICMP error translation

Add missing translation of ICMP inner IP layer.
Change responsible test so that it actually tests something.

Type: fix
Fixes: 4881cb4c6f
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: Id3a6f12a7308d81b1cdf9815f857221fab2f24d9

2 years agovpp: binary-api CLI weak linking workaround 85/35685/1
Damjan Marion [Tue, 15 Mar 2022 11:15:45 +0000 (12:15 +0100)]
vpp: binary-api CLI weak linking workaround

For some unknown reason sometimes calling exec() ends up on weak
exec() defined in src/vat/api_format.c which return -1 instead of using
one few lines above.

Another proof that use of weak symbols is bad idea.

Luckily this can be easily workarounded.

Type: fix
Change-Id: Ic84e8525bff75c1b8186c233cd524aac4d95c8b5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agotcp: update error counters in listen node 54/35654/1
Florin Coras [Wed, 16 Mar 2022 04:46:34 +0000 (21:46 -0700)]
tcp: update error counters in listen node

Type: fix

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

2 years agotcp: update persist timer if data acked 46/35646/2
Florin Coras [Mon, 14 Mar 2022 21:23:39 +0000 (14:23 -0700)]
tcp: update persist timer if data acked

Update persist timer if data sent during snd_wnd < snd_mss was acked.

Type: fix

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

2 years agoflow: add generic flow pattern for 5G flow enhancement 02/34802/11
Ting Xu [Thu, 16 Sep 2021 08:37:25 +0000 (08:37 +0000)]
flow: add generic flow pattern for 5G flow enhancement

In order to support the requirement of RSS and packet steering of new
protocols, such as GTPU PDU-type and QFI, for 5G UPF, a generic pattern
is introduced in vnet flow. The generic flow pattern is based on DDP
(Dynamic Device Personalization) function and Parser Library module in
DPDK. Using generic flow pattern, we do not need to create new packet
and field type and offset in API parser for every new protocols. We can
create flows for any protocol immediately as long as supported by DDP.
The generic flow can be used to support 5G related protocols in
different scenarios.

The input of this generic pattern are two binary strings for spec and
mask. Spec is the binary presentation of the target packet type, and
mask is used to mark the target fields.

In this patch DPDK plugins is enabled for POC. Next step we will enable
generic flow in native IAVF, which is the main target.

Here is an example. If we want to create a flow for GTPU QFI,
spec is:
00000000000100000000000208004500003C00000000001100000101010102020202000
008680028000034FF001C00000000000000850100010045000014000000000000000001
01010102020202
mask is:
00000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000007F0000000000000000000000000000
00000000000000

A naming API POC is created via VAPI to help create the rule with
the target packet format similar to Scapy. It is based on a function
module called PacketForge. In this way, the user no need to create
binary string spec and mask by themselves.

Type: feature

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

2 years agovlib: add vlib_frame_bitmap_and 49/35649/1
Damjan Marion [Tue, 15 Mar 2022 15:16:55 +0000 (16:16 +0100)]
vlib: add vlib_frame_bitmap_and

Type: improvement
Change-Id: I531115f32c484e4c4794173d24e15f3b5b8f547b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agomemif: fix memif_process_desc indexing 45/35645/4
Mauro Sardara [Mon, 14 Mar 2022 20:08:22 +0000 (20:08 +0000)]
memif: fix memif_process_desc indexing

The index i was incremented in the wrong place, and the check on the
presence of a next buffer in the chain was actually done for the
next desc_status rather than the current one.

Type: fix

Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I74a64a34fea497900b7969cd96e1aeeb570a1bba

2 years agovppinfra: fix vec capacity 35/35635/11
Florin Coras [Fri, 11 Mar 2022 18:58:55 +0000 (10:58 -0800)]
vppinfra: fix vec capacity

Rename vec_capacity to vec_mem_size  as it returned the size of the
underlying memory allocation not the number of bytes that can be used
for vector elements.

Add new vec_max_elts macro that returns number of elements that can fit
into generic vector.

Type: fix

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

2 years agostats: refactor vlib counters 43/35643/6
Damjan Marion [Mon, 14 Mar 2022 12:04:38 +0000 (13:04 +0100)]
stats: refactor vlib counters

Change-Id: I09d2da73eff42c52ba1373acc99ff28f283a6725
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agodpdk: add patch to support i226v 23/35623/2
Matthew Smith [Wed, 9 Mar 2022 23:30:16 +0000 (23:30 +0000)]
dpdk: add patch to support i226v

Type: improvement

Add a patch to the DPDK 21.11 build to enable the PCI device ID for the
I226-V.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I82ff4b70e6b6e0ba0803519943190a564e85d2ac

2 years agocrypto: Enabling IOMMU DMA translation table update for QAT card 34/35634/2
Govindarajan [Fri, 11 Mar 2022 18:43:59 +0000 (18:43 +0000)]
crypto: Enabling IOMMU DMA translation table update for QAT card

With DPDK plugin, VPP does the DMA page map in IOMMU, only when
DPDK supported ethernet devices are present. As a result, Mellanox NIC
and QAT combo doesn't work. As part of this fix, DPDK supported
crypto device check is added to do the DMA page map.

Type: fix
Signed-off-by: mgovind <govindarajan.mohandoss@arm.com>
Change-Id: I02de4588c5b021e0c9c62612137f28ed8784bea6

2 years agostats: support recursive locking 39/35639/3
Damjan Marion [Mon, 14 Mar 2022 12:04:38 +0000 (13:04 +0100)]
stats: support recursive locking

Type: improvement
Change-Id: I85dd3d34bcb175dd68dda34a58cd454848a0fc2b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agohsa: fix error message 42/35642/2
Filip Tehlar [Mon, 14 Mar 2022 13:42:36 +0000 (13:42 +0000)]
hsa: fix error message

Fixes a minor issue that causes printing an error message when there is no error.

Type: fix

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I59f5c6af7c5aeae3e812b4cf0c75a47894bb8bbd

2 years agovppinfra: don't account vec_header_t size twice in the pool header 43/35443/3
Damjan Marion [Thu, 24 Feb 2022 23:19:26 +0000 (00:19 +0100)]
vppinfra: don't account vec_header_t size twice in the pool header

Type: fix
Change-Id: I298d2a5067f7949002e6c010f892553f1eb9f477
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agodpdk: improve rx burst count per loop 20/35620/3
Fan Zhang [Thu, 10 Mar 2022 14:49:19 +0000 (14:49 +0000)]
dpdk: improve rx burst count per loop

Type: improvement

This patch improves the per dpdk-input loop number of packets
received from the port. The change mimics how packets rx happened
before VPP 22.02/DPDK 21.11: instead of trying to rx huge number
of packets (256) in one go, rx more times with up to 32 packets
max each time.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I804dce6d9121ab21b02e53dd0328dc52ac49d80f

2 years agomap: fix memory leak 36/34536/5
Benoît Ganne [Wed, 17 Nov 2021 08:16:09 +0000 (09:16 +0100)]
map: fix memory leak

Thanks to Ben McKeegan <ben@netservers.co.uk> for the report.

Type: fix

Change-Id: I8170dda572c326b6b1823fd330dbd5e961fdad74
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agobuild: Restrict tag names when discovering version 75/35575/2
Renato Botelho do Couto [Tue, 8 Mar 2022 18:40:49 +0000 (15:40 -0300)]
build: Restrict tag names when discovering version

Type: improvement

When `make install-ext-deps` is called, it creates a debian changelog
file and use `git describe` to fill project version.  On downstream
consumers it's possible to have different tags that makes it to end up
using an invalid version on changelog and breaking the installation
process.

Restrict tags to be considered by git-describe to match 'v[0-9]*'
pattern to get it fixed.

Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: Ieabd7b42ac33735ec4d484bed9039ff20c9872f2

2 years agotls: remove pkg dependencies on mbedtls 97/35597/5
Florin Coras [Wed, 9 Mar 2022 00:36:13 +0000 (16:36 -0800)]
tls: remove pkg dependencies on mbedtls

The tlsmbedtls plugin should only be built if mbedtls libraries are
present.

Type: fix

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

2 years agosession: fix crash during client detach 29/35629/2
Filip Tehlar [Fri, 11 Mar 2022 11:12:56 +0000 (11:12 +0000)]
session: fix crash during client detach

This fixes a crash caused by client closing socket before adding worker.
During detach vpp tries to delete worker based on invalid worker index.

Type: fix

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I3242bcbb116ef5fd1d4c449f5bcf907e4e2f8f30

2 years agovlib: remoove unused field 32/35632/1
Damjan Marion [Fri, 11 Mar 2022 13:57:42 +0000 (14:57 +0100)]
vlib: remoove unused field

Type: refactor
Change-Id: Ieb7a595e40d801af5349c83b128fa92c7698a346
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovlib: init logging eearlier 05/35605/2
Damjan Marion [Wed, 9 Mar 2022 15:10:54 +0000 (16:10 +0100)]
vlib: init logging eearlier

Type: improvement
Change-Id: I2eb5543aa470094d4c5ad420a2fcc9873b7808e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agodpdk: fix program vlans on ixgbevf 19/35619/2
Dzmitry Sautsa [Thu, 10 Mar 2022 13:17:07 +0000 (14:17 +0100)]
dpdk: fix program vlans on ixgbevf

Recent "dpdk: refactor device setup" have broken vlans programming for IXGBE_VF.

Type: fix

Signed-off-by: Dzmitry Sautsa <dzmitry.sautsa@nokia.com>
Change-Id: Idacda33a473f6b10dbe002d9926661a19d0f3f97

2 years agodevices: remove the unused code from af_packet 21/35621/3
Mohsin Kazmi [Thu, 10 Mar 2022 16:44:06 +0000 (17:44 +0100)]
devices: remove the unused code from af_packet

Type: refactor

Change-Id: If180816303909b92c9aa4ff9fd70dc7938a6cfbe
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agobuild: fix centos 8 steam build install-dep 10/35610/2
Tianyu Li [Thu, 3 Mar 2022 02:49:39 +0000 (10:49 +0800)]
build: fix centos 8 steam build install-dep

make install-dep sometimes failed at
downloading metadata for repository 'powertools-source':
disable unnecessary powertools-source repo.

Type: fix
Fixes: 1affb31ef528 ("build: fix centos-8 'make install-deps'")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I481d6106eea38190b3ddd79e8614b2ead7130807

2 years agoipsec: remove the redundant code 22/35622/1
Mohsin Kazmi [Thu, 10 Mar 2022 16:47:51 +0000 (17:47 +0100)]
ipsec: remove the redundant code

Type: refactor

Change-Id: I0a40e22e1439e13ffdbcbd6fd7cad40c8178418c
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agotests: fix test failure with parrallel test 11/35611/1
Tianyu Li [Fri, 25 Feb 2022 05:51:10 +0000 (05:51 +0000)]
tests: fix test failure with parrallel test

Several test cases re-use the same test class name,
which leads to test error when do parrallel test with TEST_JOBS=16,
change the test class names to unique values.

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

2 years agovppinfra: fix pool_free_elts 07/35607/5
Florin Coras [Wed, 9 Mar 2022 21:34:12 +0000 (13:34 -0800)]
vppinfra: fix pool_free_elts

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

2 years agoip: IPv4 Fragmentation fix for l2fragmetable size 74/35574/3
Neale Ranns [Tue, 8 Mar 2022 13:24:28 +0000 (13:24 +0000)]
ip: IPv4 Fragmentation fix for l2fragmetable size

Type: fix

The l2unfragmentable size is not included in the calculation of 'max', the maximum amount of data that can be added to a fragment, therefore the fragments created are too big.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Id1e949ad98203b6f8ea2f55322ef6fa3d507e2a6

2 years agovxlan: add l2 mode test 04/35404/4
Artem Glazychev [Mon, 21 Feb 2022 10:51:29 +0000 (17:51 +0700)]
vxlan: add l2 mode test

The same test for v22.02 was already merged: https://gerrit.fd.io/r/c/vpp/+/35390

Type: improvement

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

2 years agostats: refactor 16/35516/16
Damjan Marion [Tue, 1 Mar 2022 14:51:18 +0000 (15:51 +0100)]
stats: refactor

Type: refactor
Change-Id: Ifd533a095d979dc55bfbe5fac7e0b7510a4d900c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovat: fix vat_suspend crash 04/35604/1
Damjan Marion [Wed, 9 Mar 2022 13:47:05 +0000 (14:47 +0100)]
vat: fix vat_suspend crash

Deadly combination is clib_{set,long}jmp + lazy linking + tail call compiler
optimization. On the first call to clib_setjmp, dynamic linker executes loader
code which then calls clib_setjmp, so stored stack position contains dynamic
loader data. Tail call optimization simply jumps back to the calling
code when clib_longjump is called and that results in wrong return
address used from the stack.

Change-Id: Ia7d8dbd5b2c425cdd0449374aa07ab6b684a330e
Type: fix
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agoclassify: add API to retrieve punt ACL tables 09/34109/7
Benoît Ganne [Wed, 13 Oct 2021 17:16:07 +0000 (19:16 +0200)]
classify: add API to retrieve punt ACL tables

Type: feature

Change-Id: Ica3e60836c0f26518ba2c238a8c03ce3648ea69b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoipsec: input: drop by default for non-matching pkts 52/34252/3
Zachary Leaf [Tue, 26 Oct 2021 15:05:58 +0000 (10:05 -0500)]
ipsec: input: drop by default for non-matching pkts

As per IPSec RFC4301 [1], any non-matching packets should be dropped by
default. This is handled correctly in ipsec_output.c, however in
ipsec_input.c non-matching packets are allowed to pass as per a matched
BYPASS rule.

For full details, see:
https://lists.fd.io/g/vpp-dev/topic/ipsec_input_output_default/84943480

It appears the ipsec6_input_node only matches PROTECT policies. Until
this is extended to handle BYPASS + DISCARD, we may wish to not drop
by default here, since all IPv6 traffic not matching a PROTECT policy
will be dropped.

[1]: https://datatracker.ietf.org/doc/html/rfc4301

Type: fix
Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
Change-Id: Iddbfd008dbe082486d1928f6a10ffbd83d859a20

2 years agoip: set fib_index before exiting input ACL node 85/34785/3
Arthur de Kerhor [Wed, 22 Dec 2021 09:58:30 +0000 (10:58 +0100)]
ip: set fib_index before exiting input ACL node

While setting an ACL, a user can specify the adjacency to follow after
the input ACL node. Thus, we may skip a lookup and enter directly a
local node (ex: ip4_local). To prevent the local source check from
failing, we need to specify the fib index. And, we have to do it just
before exiting the input ACL node because the l2_classify object
is overlapping with the fib_index in the vnet_buffer_opaque_t struct.
We could have added a padding to avoid this overlap but there is no
place for that in the structure.

Type: fix

Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Change-Id: I383c36e4aec08d181f966f28565aefed950d2a74