vpp.git
2 years agonat: nat44-ei configuration improvements 16/33916/9
Filip Varga [Thu, 30 Sep 2021 11:35:59 +0000 (13:35 +0200)]
nat: nat44-ei configuration improvements

nat44-ed core configuration improvements & fixes [0-5] adjusted
for nat44-ei plugin.

Improvements:
 * repeating code converted to functions
 * simplified functions used for pool address, static mapping
and interface configuration.

Clean up:
 * remove obsolete code and logic persisted after plugin
separation from old SNAT plugin.

Fixes:
 * [0] return correct API behavior changed in [5]

Type: improvement

[0] https://gerrit.fd.io/r/c/vpp/+/33622
[1] https://gerrit.fd.io/r/c/vpp/+/33431
[2] https://gerrit.fd.io/r/c/vpp/+/33337
[3] https://gerrit.fd.io/r/c/vpp/+/33249
[4] https://gerrit.fd.io/r/c/vpp/+/32796
[5] https://gerrit.fd.io/r/c/vpp/+/32951

Signed-off-by: Filip Varga <fivarga@cisco.com>
Change-Id: Ie197faa576cb49acb3d218f14e00cb7d13ad9342

2 years agonat: NAT44-ED api fix and improvement 42/33742/7
Filip Varga [Fri, 17 Sep 2021 12:11:59 +0000 (14:11 +0200)]
nat: NAT44-ED api fix and improvement

This patch fixes issue with NAT_API_IS_TWICE_NAT and
NAT_API_IS_ADDR_ONLY flags. Because of control plane
code change - move from boolean parameters to flags
in https://gerrit.fd.io/r/c/vpp/+/32796 patch these
api flags weren't correctly set.

Type: fix

Change-Id: Ieec5fe6bdcca314da027f2d23e3a24f174391a6f
Signed-off-by: Filip Varga <fivarga@cisco.com>
2 years agobfd: fix bfd_key_id update 16/34116/2
Alexander Skorichenko [Fri, 15 Oct 2021 16:04:44 +0000 (16:04 +0000)]
bfd: fix bfd_key_id update

Type: fix

Currently, auth activation CLI command
"bfd upd session auth activate ... conf-key-id <cki> bfd-key-id <bki>"
allows to change both key-ids to new values at once.
But if only bfd-key-id should be corrected, e.g. as a result of mistyping,
we can't do that in a single operation, and have to deactivate auth first
and then reactivate it with a correctly entered pair of ids.

Currently, backend's bfd_auth_activate() function returns immediately,
with no action, if it finds that submitted conf-key-id matches the
current record. No check on bfd-key-id value is made.

With this fix, bfd_auth_activate() checks if session's bfd-key-id has to
be changed to a new value, and if so, it updates and logs appropriately.

Change-Id: I3b915a936cb1721707860bb503f70e7dd29e0ddd
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2 years agobfd: fix desired_min_tx_nsec update 05/34105/4
Alexander Skorichenko [Thu, 14 Oct 2021 10:09:02 +0000 (13:09 +0300)]
bfd: fix desired_min_tx_nsec update

Type: fix

Currently, the change in desired_min_tx value initiated locally
doesn't result in actual update of the transmission interval.

bfd_session_t structure has two fields for each of protocol's
local time parameters
        desired_min_tx, required_min_rx
In a case of a parameter update,
"config_" prefixed fields store new values sent to remote
        bs.config_desired_min_tx_nsec,
        bs.config_required_min_rx_nsec
Those prefixed "effective_", keep old values, still in charge,
until new ones are being negotiated between peers:
        bs.effective_desired_min_tx_nsec,
        bs.effective_required_min_rx_nsec

Currently, upon termination of the Poll Sequence (negotiation) only
        bfd_set_effective_required_min_rx()
is called to update effective RX value. TX value remains unchanged.

With this fix, add a call to
        bfd_set_effective_desired_min_tx()
to set new, acknowledged TX value in effect.

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Change-Id: I80b6746533839c9572598f1ad9dabb33e621a525

2 years agoapi: remove legacy pd msg handlers 23/34123/2
Klement Sekera [Mon, 18 Oct 2021 10:28:48 +0000 (12:28 +0200)]
api: remove legacy pd msg handlers

While looking at a coverity warning it was discovered that it's caused
by return value modified by pd msg handlers. As these are legacy, it's
a good time to remove them and also fix the warning this way.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ic72ab8b2b7a2e55188d1c31cfd18a74b7cf82c43

2 years agointerface: add api test file 69/33269/9
Filip Tehlar [Fri, 23 Jul 2021 22:03:05 +0000 (22:03 +0000)]
interface: add api test file

Type: improvement

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

2 years agointerface: fix offload flag check 82/32482/9
Nathan Skrzypczak [Thu, 27 May 2021 17:34:59 +0000 (19:34 +0200)]
interface: fix offload flag check

We should compute offloads in interface_ouput.c
in the case when any of the UDP, TCP or IP
offload flags is not present in the interface
capabilities.

e.g. if the interface supports IP cksum offload
but not tcp/udp we should still compute cksums
here.

Type: fix

Change-Id: Ibaa3a56dbc92938dca45311c38f079d040052194
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agomemif: Enhance show memif descriptors to display region 15/34115/2
Steven Luong [Fri, 15 Oct 2021 15:35:56 +0000 (08:35 -0700)]
memif: Enhance show memif descriptors to display region

memif descriptors table may have more than one shared memory region.
To see whether a descriptor's memory address is valid or not, it
is beneficial to also display the descriptor's region. While at it,
fix the truncation problem for the offset field.

Type: improvement

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ia3b7062ac0323c39ade6f3a58333c6405889148f

2 years agoperfmon: topdown lvl 2 support on sapphire rapids 12/34112/3
Ray Kinsella [Fri, 15 Oct 2021 11:48:31 +0000 (12:48 +0100)]
perfmon: topdown lvl 2 support on sapphire rapids

Added topdown level  2 support on sapphire rapids,
including ability to indentify a sapphire rapids cpu.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I9f99a92fa0886b98bb5185cff32bebd5a094f329

2 years agoperfmon: additional perf counters on icelake 11/34111/3
Ray Kinsella [Fri, 15 Oct 2021 09:13:17 +0000 (10:13 +0100)]
perfmon: additional perf counters on icelake

The Intel Icelake uArch supports measuring up to 12 counters,
comprised of 4 fixed and 8 general counters.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I68369ea55a0c95d6a4a280a464e69502bbf5474f

2 years agovcl: narrow the scope of the restriction of vlsh_bit_val 02/34102/5
wanghanlin [Thu, 14 Oct 2021 03:10:26 +0000 (11:10 +0800)]
vcl: narrow the scope of the restriction of vlsh_bit_val

The restriction of vlsh_bit_val only effect select/pselect, so move the
check to select/pselect function.

Type: fix

Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
Change-Id: I3585c83cfc2f0a2fd834450be650dccda67e3faa

2 years agopppoe: fix coverity warning 07/34107/2
Klement Sekera [Thu, 14 Oct 2021 13:41:42 +0000 (15:41 +0200)]
pppoe: fix coverity warning

Initialise variable used in tracing code in case of early error so that
tracing doesn't use this uninitialised variable.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I6b1cef07e1f126cee56e1116606869dd667274d2

2 years agonat: static mappings in flow hash 77/34077/5
Klement Sekera [Wed, 26 May 2021 11:02:35 +0000 (13:02 +0200)]
nat: static mappings in flow hash

Put static mappings in flow hash, drop existing hash tables used for
static mappings. Drop refcount variables and use hash table as a single
point of truth. Allow creating a static mapping conflicting with dynamic
mapping, which will take precedence after dynamic mapping is freed, so
that the existing flow can finish transferring data.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Idfde8efabc09971be38921d4b0ca5ccf4e9fe412

2 years agoip6-nd: fix coverity warning 01/34101/2
Klement Sekera [Wed, 13 Oct 2021 20:29:49 +0000 (22:29 +0200)]
ip6-nd: fix coverity warning

Add a missing return statement in case there are no parameters supplied
to 'set ip6 nd proxy' CLI to avoid calling code with uninitialised
parameters.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ie4fdb4df5d1af49471c421e5e7a6c2f885d2e8d2

2 years agotests: fix coverity warnings 99/34099/5
Klement Sekera [Wed, 13 Oct 2021 19:45:42 +0000 (21:45 +0200)]
tests: fix coverity warnings

Fix coverity warnings by initialising variables and removing dead code.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I0254b81020cdc3d7075df003309065438526918f

2 years agomisc: fix coverity warning in ila plugin 00/34100/3
Klement Sekera [Wed, 13 Oct 2021 20:06:50 +0000 (22:06 +0200)]
misc: fix coverity warning in ila plugin

Remove non-null check for a pointer which cannot be null to avoid dead
code warning.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I5ff40a4f80db7bb0dff9928c90ff757b763902fd

2 years agodocs: C & C++ apis examples 95/34095/2
Nathan Skrzypczak [Wed, 13 Oct 2021 10:40:42 +0000 (12:40 +0200)]
docs: C & C++ apis examples

Type: docs

Change-Id: I5b6c388332bdd3a29777d728c3357816c8411ea2
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agodocs: better docs, mv doxygen to sphinx 45/33545/25
Nathan Skrzypczak [Thu, 19 Aug 2021 09:38:06 +0000 (11:38 +0200)]
docs: better docs, mv doxygen to sphinx

This patch refactors the VPP sphinx docs
in order to make it easier to consume
for external readers as well as VPP developers.

It also makes sphinx the single source
of documentation, which simplifies maintenance
and operation.

Most important updates are:

- reformat the existing documentation as rst
- split RELEASE.md and move it into separate rst files
- remove section 'events'
- remove section 'archive'
- remove section 'related projects'
- remove section 'feature by release'
- remove section 'Various links'
- make (Configuration reference, CLI docs,
  developer docs) top level items in the list
- move 'Use Cases' as part of 'About VPP'
- move 'Troubleshooting' as part of 'Getting Started'
- move test framework docs into 'Developer Documentation'
- add a 'Contributing' section for gerrit,
  docs and other contributer related infos
- deprecate doxygen and test-docs targets
- redirect the "make doxygen" target to "make docs"

Type: refactor

Change-Id: I552a5645d5b7964d547f99b1336e2ac24e7c209f
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2 years agodocs: convert plugins doc md->rst 25/34025/4
Nathan Skrzypczak [Fri, 8 Oct 2021 12:05:35 +0000 (14:05 +0200)]
docs: convert plugins doc md->rst

Type: improvement

Change-Id: I7e821cce1feae229e1be4baeed249b9cca658135
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agonat: fix coverity warning 98/34098/1
Klement Sekera [Wed, 13 Oct 2021 19:18:59 +0000 (21:18 +0200)]
nat: fix coverity warning

Fix coverity warning by initialising proto variable to a dummy value.
This value is never used because consuming function uses this
parameter value only if is_addr_only flag is not set and this flag is
always set if proto value is not provided by user.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I9b5e8c08346bea1e2b460bb09e962c4b8d3b6947

2 years agodocs: convert vpp doc md->rst 24/34024/3
Nathan Skrzypczak [Fri, 8 Oct 2021 12:01:27 +0000 (14:01 +0200)]
docs: convert vpp doc md->rst

Type: improvement

Change-Id: If453321785b04f9c16e8cea36fb1910efaeb2c59
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agodocs: convert extras doc md->rst 26/34026/3
Nathan Skrzypczak [Fri, 8 Oct 2021 12:05:58 +0000 (14:05 +0200)]
docs: convert extras doc md->rst

Type: improvement

Change-Id: Ie3b25a86b99098d2b3a21a11fc73234c8ed589d6
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agolibmemif: docs md->rst 54/34054/2
Nathan Skrzypczak [Tue, 12 Oct 2021 12:00:25 +0000 (14:00 +0200)]
libmemif: docs md->rst

Type: improvement

Change-Id: Ibebd2d47a4268189f11601d004073e4858548f25
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agolibmemif: update documentation 74/30574/7
Jakub Grajciar [Mon, 4 Jan 2021 10:36:44 +0000 (11:36 +0100)]
libmemif: update documentation

Type: refactor

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I0094ea8627cd8bcd5ea119c2fd48f077c8e2e4bb

2 years agosession: app name should format with %v 88/34088/2
Xiaoming Jiang [Wed, 13 Oct 2021 03:11:40 +0000 (03:11 +0000)]
session: app name should format with %v

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

2 years agonat: fix static mapping segv 86/34086/3
Joshua Roys [Tue, 12 Oct 2021 13:25:47 +0000 (09:25 -0400)]
nat: fix static mapping segv

Adding a nat44 static mapping during startup on a DHCP interface leads
to a segv via this path:
- dhcp_client_acquire_address
- ip4_add_del_interface_address
- ip4_add_del_interface_address_internal
- nat44_ed_add_del_interface_address_cb
- nat44_ed_add_static_mapping
- ip4_interface_first_address

Type: fix

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Change-Id: I38dac8a096b052550f2b87b4e13a950d2cd868b0

2 years agodpdk: fix vmbus device name parsing 92/34092/2
Benoît Ganne [Wed, 13 Oct 2021 09:35:15 +0000 (11:35 +0200)]
dpdk: fix vmbus device name parsing

unformat_init_vector() expects a vector, not a NULL-terminated C-string.

Type: fix

Change-Id: I20a266243f63d94b0c6fe24e25ee8346c08c8ff2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agovapi: fix vapi test coverity warning 84/34084/3
Florin Coras [Tue, 12 Oct 2021 20:55:19 +0000 (13:55 -0700)]
vapi: fix vapi test coverity warning

Type: fix

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

2 years agovppinfra: fix socket init netns coverity 80/34080/4
Florin Coras [Tue, 12 Oct 2021 15:52:12 +0000 (08:52 -0700)]
vppinfra: fix socket init netns coverity

Type: fix

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

2 years agovppinfra: fix format_table coverity warning 79/34079/4
Florin Coras [Tue, 12 Oct 2021 15:45:46 +0000 (08:45 -0700)]
vppinfra: fix format_table coverity warning

Type: fix

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

2 years agovlib: fix vmbus error log 93/34093/1
Benoît Ganne [Wed, 13 Oct 2021 09:37:04 +0000 (11:37 +0200)]
vlib: fix vmbus error log

struct dirent *e is freed when calling closedir(). Use ifname instead.

Type: fix

Change-Id: Icc9ca52c33ecc1dee7a9e28802149e4e3e4c8ac0
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agointerface: handle error during admin-up correctly 83/34083/2
Matthew Smith [Mon, 4 Oct 2021 20:19:44 +0000 (15:19 -0500)]
interface: handle error during admin-up correctly

Type: fix

In vnet_sw_interface_set_flags_helper(), the variable old_flags is set
to the original value of vnet_sw_interface_t.flags for an interface. If
an error occurs during the process of bringing an interface up, old_flags
is used to restore the original value.

Before the dev class or hw class admin_up_down_function can be called,
but after modifying vnet_sw_interface_t.flags to it's new value,
old_flags is set to the value of vnet_sw_interface_t.flags a second time.
This discards the original flags that were being preserved.

As a result, if an interface is being brought up and the dev class
or hw class function fails, at the end VPP believes that interface is up.
This can cause a crash if packets are routed through the interface
and some RX/TX initialization was not completed because of the error
while bringing the interface up.

Change-Id: Ica6b6bac13c24e88c4136bf084cd392e6217e7d9
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2 years agodhcp: fix coverity warning 85/34085/2
Florin Coras [Tue, 12 Oct 2021 21:02:05 +0000 (14:02 -0700)]
dhcp: fix coverity warning

Type: fix

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

2 years agovppinfra: use unaligned non-vector load/stores in x86 memcpy 55/34055/2
Damjan Marion [Tue, 12 Oct 2021 13:34:31 +0000 (15:34 +0200)]
vppinfra: use unaligned non-vector load/stores in x86 memcpy

Type: fix
Change-Id: I54ef23a52f05cc95210a736f84b927dd69b8a6f7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agofib: fix the drop counter for ipv6 RPF failures 44/34044/4
Neale Ranns [Tue, 12 Oct 2021 07:49:37 +0000 (07:49 +0000)]
fib: fix the drop counter for ipv6 RPF failures

Type: fix

the only change to the mfib forwarding node is to set the error code, the rest is checkstyle formatting.

The traces previously showed some bogus reason:

00:04:27:325550: ip6-mfib-forward-rpf
  entry 10 itf -1 flags
00:04:27:325551: ip6-drop
    fib:0 adj:10 flow:0
  UDP: fe80::b203:eaff:fe02:604 -> ff02::1:2
    tos 0x00, flow label 0x651ed, hop limit 1, payload length 64
  UDP: 546 -> 547
    length 64, checksum 0xec9a
00:04:27:325551: error-drop
  rx:GigabitEthernet6/0/0
00:04:27:325553: drop
  ip6-input: drops due to concurrent reassemblies limit

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

2 years agounittest: fix crypto key len coverity warning 81/34081/2
Florin Coras [Tue, 12 Oct 2021 16:03:18 +0000 (09:03 -0700)]
unittest: fix crypto key len coverity warning

Type: fix

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

2 years agoapi: cli coverity fixes 78/34078/4
Florin Coras [Tue, 12 Oct 2021 15:41:09 +0000 (08:41 -0700)]
api: cli coverity fixes

Type: fix

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

2 years agoipsec: Performance improvement of ipsec4_output_node using flow cache 94/31694/19
Govindarajan Mohandoss [Fri, 19 Mar 2021 19:20:49 +0000 (19:20 +0000)]
ipsec: Performance improvement of ipsec4_output_node using flow cache

Adding flow cache support to improve outbound IPv4/IPSec SPD lookup
performance. Details about flow cache:
  Mechanism:
  1. First packet of a flow will undergo linear search in SPD
     table. Once a policy match is found, a new entry will be added
     into the flow cache. From 2nd packet onwards, the policy lookup
     will happen in flow cache.
  2. The flow cache is implemented using bihash without collision
     handling. This will avoid the logic to age out or recycle the old
     flows in flow cache. Whenever a collision occurs, old entry will
     be overwritten by the new entry. Worst case is when all the 256
     packets in a batch result in collision and fall back to linear
     search. Average and best case will be O(1).
  3. The size of flow cache is fixed and decided based on the number
     of flows to be supported. The default is set to 1 million flows.
     This can be made as a configurable option as a next step.
  4. Whenever a SPD rule is added/deleted by the control plane, the
     flow cache entries will be completely deleted (reset) in the
     control plane. The assumption here is that SPD rule add/del is not
     a frequent operation from control plane. Flow cache reset is done,
     by putting the data plane in fall back mode, to bypass flow cache
     and do linear search till the SPD rule add/delete operation is
     complete. Once the rule is successfully added/deleted, the data
     plane will be allowed to make use of the flow cache. The flow
     cache will be reset only after flushing out the inflight packets
     from all the worker cores using
     vlib_worker_wait_one_loop().

  Details about bihash usage:
  1. A new bihash template (16_8) is added to support IPv4 5 tuple.
     BIHASH_KVP_PER_PAGE and BIHASH_KVP_AT_BUCKET_LEVEL are set
     to 1 in the new template. It means only one KVP is supported
     per bucket.
  2. Collision handling is avoided by calling
     BV (clib_bihash_add_or_overwrite_stale) function.
     Through the stale callback function pointer, the KVP entry
     will be overwritten during collision.
  3. Flow cache reset is done using
     BV (clib_bihash_foreach_key_value_pair) function.
     Through the callback function pointer, the KVP value is reset
     to ~0ULL.

  MRR performance numbers with 1 core, 1 ESP Tunnel, null-encrypt,
  64B for different SPD policy matching indices:

  SPD Policy index    : 1          10         100        1000
  Throughput          : MPPS/MPPS  MPPS/MPPS  MPPS/MPPS  KPPS/MPPS
  (Baseline/Optimized)
  ARM Neoverse N1     : 5.2/4.84   4.55/4.84  2.11/4.84  329.5/4.84
  ARM TX2             : 2.81/2.6   2.51/2.6   1.27/2.6   176.62/2.6
  INTEL SKX           : 4.93/4.48  4.29/4.46  2.05/4.48  336.79/4.47

  Next Steps:
  Following can be made as a configurable option through startup
  conf at IPSec level:
  1. Enable/Disable Flow cache.
  2. Bihash configuration like number of buckets and memory size.
  3. Dual/Quad loop unroll can be applied around bihash to further
     improve the performance.
  4. The same flow cache logic can be applied for IPv6 as well as in
     IPSec inbound direction. A deeper and wider flow cache using
     bihash_40_8 can replace existing bihash_16_8, to make it
     common for both IPv4 and IPv6 in both outbound and
     inbound directions.

Following changes are made based on the review comments:
1. ON/OFF flow cache through startup conf. Default: OFF
2. Flow cache stale entry detection using epoch counter.
3. Avoid host order endianness conversion during flow cache
   lookup.
4. Move IPSec startup conf to a common file.
5. Added SPD flow cache unit test case
6. Replaced bihash with vectors to implement flow cache.
7. ipsec_add_del_policy API is not mpsafe. Cleaned up
   inflight packets check in control plane.

Type: improvement
Signed-off-by: mgovind <govindarajan.Mohandoss@arm.com>
Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
Tested-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I62b4d6625fbc6caf292427a5d2046aa5672b2006

2 years agosession: set actual lcl ip on accepted ct 41/34041/4
Florin Coras [Tue, 12 Oct 2021 01:10:41 +0000 (18:10 -0700)]
session: set actual lcl ip on accepted ct

Type: improvement

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

2 years agomemif: fix the memif crash when slave disconnect 39/34039/2
Mohsin Kazmi [Mon, 11 Oct 2021 15:43:15 +0000 (15:43 +0000)]
memif: fix the memif crash when slave disconnect

Type: fix

Fixes: 3effb4e63068 ("memif: integrate with new tx infra")

memif is recently integrated with new tx infra. But it
introduces a crash when slave disconnect from master but
interface is not deleted. Disconnect routine was missing
unregister of all tx queues. This patch fixes it.

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

2 years agoRevert "nat: static mappings in flow hash" 50/34050/1
Ole Troan [Tue, 12 Oct 2021 10:45:08 +0000 (12:45 +0200)]
Revert "nat: static mappings in flow hash"

This reverts commit 69b7599e4b061a8996205f0304232ede84cb70d4.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: If531b122ae5a9f91c2fe6eaa0da69922a91f16d3

2 years agonat: static mappings in flow hash 87/32087/22
Klement Sekera [Wed, 26 May 2021 11:02:35 +0000 (13:02 +0200)]
nat: static mappings in flow hash

Put static mappings in flow hash, drop existing hash tables used for
static mappings. Drop refcount variables and use hash table as a single
point of truth. Allow creating a static mapping conflicting with dynamic
mapping, which will take precedence after dynamic mapping is freed, so
that the existing flow can finish transferring data.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ieeba691d83a83887d0a0baccd5f3832f66126096

2 years agoapi: set missing handlers 38/34038/3
Filip Tehlar [Mon, 11 Oct 2021 15:22:38 +0000 (15:22 +0000)]
api: set missing handlers

Type: fix

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

2 years agovat: move memset after init 37/34037/1
Filip Tehlar [Mon, 11 Oct 2021 15:08:25 +0000 (15:08 +0000)]
vat: move memset after init

Type: fix

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

2 years agol3xc: skip load balancing if not multipath 32/34032/1
Benoît Ganne [Fri, 8 Oct 2021 15:17:19 +0000 (17:17 +0200)]
l3xc: skip load balancing if not multipath

Type: improvement

Change-Id: I3d8e1c7a83530bbc4b1751358ad7d034476ff13f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoip: fix fib and mfib locks 49/33749/6
Nathan Skrzypczak [Fri, 17 Sep 2021 15:29:14 +0000 (17:29 +0200)]
ip: fix fib and mfib locks

This patches fixes an issue that could cause
fib locks to underflow: if an API user deletes
a fib and quickly recreates it, the fib may not
have been actually deleted. As a result, the
lock would not be incremented on the create call
leading to the fib potentially disappearing
afterwards - or to the lock to underflow when
the fib is deleted again.

In order to keep the existing API semantics,
we use the locks with API and CLI source as flags.
This means we need to use a different counter
for the interface-related locks.

This also prevents an issue where an interface being
bound to a vrf via API and released via CLI could
mess up the lock counter.

Finally, this will help with cleaning up the
interface-related locks on interface deletion
in a later patch.

Type: fix

Change-Id: I93030a7660646d6dd179ddf27fe4e708aa11b90e
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2 years agodocs: nitfixes in FEATURE.yaml 23/34023/2
Nathan Skrzypczak [Fri, 8 Oct 2021 13:13:07 +0000 (15:13 +0200)]
docs: nitfixes in FEATURE.yaml

Type: improvement

Change-Id: Iec585880085b12b08594a0640822cd831455d594
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agoaf_xdp: ensure at least one queue is created 32/33932/5
Joshua Roys [Fri, 1 Oct 2021 20:41:04 +0000 (16:41 -0400)]
af_xdp: ensure at least one queue is created

Attempting to create an af_xdp interface with zerocopy where the
underlying driver didn't support it would lead to a crash due to
queue creation silently failing.

Type: fix

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Change-Id: Ifd9070b8c2b3023d71120c5cf20f7e89d04e4cb3

2 years agotls: shutdown openssl context on app close 28/34028/2
Florin Coras [Fri, 8 Oct 2021 20:43:55 +0000 (13:43 -0700)]
tls: shutdown openssl context on app close

Type: improvement

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

2 years agovxlan-gpe: add udp-port configuration support 70/31170/9
Artem Glazychev [Fri, 28 May 2021 12:09:14 +0000 (19:09 +0700)]
vxlan-gpe: add udp-port configuration support

similar behavior as here: 839dcc0fb7313638d9b8f52a9db81350dddfe461

Type: improvement

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

2 years agoikev2: lazy initialization 77/33877/4
Benoît Ganne [Tue, 28 Sep 2021 16:59:53 +0000 (18:59 +0200)]
ikev2: lazy initialization

 - do not initialize resources if ikev2 is not used.
 - process IKE packets only if we have profile(s) configured

Type: improvement

Change-Id: I57c95a888532eafd70989096c0555ebb1d7bef25
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agobuild: fix centos rpm build 99/33999/1
Tianyu Li [Tue, 28 Sep 2021 05:00:16 +0000 (13:00 +0800)]
build: fix centos rpm build

When build vpp-plugins rpm package, found

/home/vpp/build-root/rpmbuild/vpp-21.10/build-root/\
install-vpp-native/vpp/lib/vpp_plugins: No such file or directory

RPM build errors:
File not found: /home/vpp/build-root/rpmbuild/../usr/lib/vpp_plugins/*

After e3cf4d0 ("build: use GNUInstallDirs install destinations")
vpp_plugins on centos src path changed from lib to lib64
Update RPM spec file accordingly.

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

2 years agoipsec: fix protect update log if nexthop is NULL 97/33997/2
Benoît Ganne [Thu, 7 Oct 2021 15:37:07 +0000 (17:37 +0200)]
ipsec: fix protect update log if nexthop is NULL

If logging is on, it will try to print the address nh. Make sure it is
not NULL.

Type: fix

Change-Id: I81c0295865901406d86e0d822a103b4d5adffe47
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agowireguard: peers dump fix 93/33993/2
Artem Glazychev [Thu, 7 Oct 2021 09:20:38 +0000 (16:20 +0700)]
wireguard: peers dump fix

Type: fix

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

2 years agovppinfra: asan: improve overflow semantic 98/33698/4
Benoît Ganne [Wed, 8 Sep 2021 13:36:56 +0000 (15:36 +0200)]
vppinfra: asan: improve overflow semantic

Type: improvement

Change-Id: Ia63899b82e34f179f9efa921e4630b598f2a86cb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agomisc: MAINTAINERS fixes for lldp and lisp 38/33138/4
Andrew Yourtchenko [Wed, 14 Jul 2021 20:13:02 +0000 (22:13 +0200)]
misc: MAINTAINERS fixes for lldp and lisp

They are now plugins

Type: docs
Change-Id: I37d0db10872218cb645feda83fc47b14a57ceada
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2 years agobuild: fix ipsecmb version check 86/33986/2
Fan Zhang [Wed, 6 Oct 2021 13:23:33 +0000 (14:23 +0100)]
build: fix ipsecmb version check

Type: fix

This patch fixes the chacha20-poly1305 support check in ipsecmb
engine build.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Change-Id: I74b52a27f78a0f6a65c867dbd44a44a8f4a2ed60

2 years agoudp: fix severity error info 82/33982/4
Filip Tehlar [Wed, 6 Oct 2021 12:48:34 +0000 (12:48 +0000)]
udp: fix severity error info

Type: fix

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

2 years agoip: fix path MTU node errors definition 00/33700/3
Benoît Ganne [Thu, 9 Sep 2021 09:58:28 +0000 (11:58 +0200)]
ip: fix path MTU node errors definition

The path mtu node uses errors defined by ip fragmentation.

Type: fix

Change-Id: I1f173955919a4f555ab0309cd8201ec342a0ae92
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoikev2: do not require optional IDr on IKE AUTH 73/33873/4
Benoît Ganne [Tue, 28 Sep 2021 09:19:37 +0000 (11:19 +0200)]
ikev2: do not require optional IDr on IKE AUTH

IDr is optional in IKE AUTH from the initiator. In that case, the
responder is free to use any matching profile and fills the
corresponding IDr in the response.
The initiator is then free to accept or reject it.

Type: improvement

Change-Id: I07a1c64a40ed22bd41767c259406238bbbab5cf4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoikev2: add logs in case of parsing errors 91/33891/3
Benoît Ganne [Wed, 29 Sep 2021 17:02:58 +0000 (19:02 +0200)]
ikev2: add logs in case of parsing errors

Type: improvement

Change-Id: Id0a6a9e68725ea7aa0b7da14cf54d14405a907fb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoikev2: do not send IDi on responder AUTH 90/33890/3
Benoît Ganne [Wed, 29 Sep 2021 16:51:31 +0000 (18:51 +0200)]
ikev2: do not send IDi on responder AUTH

The IDi is not mentioned in the RFC for the responder AUTH message, and
it confuses some IKE implementations.

Type: fix

Change-Id: I2bcefa1efd315412a6f5fa592668d4e0da510264
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoarp: source address selection 95/33495/7
Ed Warnicke [Sat, 14 Aug 2021 21:19:43 +0000 (16:19 -0500)]
arp: source address selection

https://gerrit.fd.io/r/c/vpp/+/30197 introduced SAS and inadvertently
broke ping in a variety of situations:

https://jira.fd.io/browse/VPP-1992
https://jira.fd.io/browse/VPP-1970
https://lists.fd.io/g/vpp-dev/topic/84038840

all of which seem to be rooted in situations where there's literally
nothing smarter ping can do for source address selection than
to pick the first IP on the interface.  This can happen for:

1. P2P interfaces, see attempted fix: https://gerrit.fd.io/r/c/vpp/+/32801
2. Interfaces with /32 IP addresses intentionally assigned

After some discussion, this problem was partially fixed in
https://gerrit.fd.io/r/c/vpp/+/33449

Unforunately, while source selection was fixed in ping, it continued
to be broken in arp/nd.  This gerrit builds on
https://gerrit.fd.io/r/c/vpp/+/33449
and fixes arp/nd.

Type: fix
Ticket: VPP-1970
Ticket: VPP-1992
Fixes: e2fe097424fb169dfe01421ff17b8ccd0c26b4a6

Change-Id: Ief60c321676a15f4f30bf4cd84d50b2f1efec432
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2 years agoperfmon: Topdown Level 1 support on Snowridge 96/33996/3
Ray Kinsella [Wed, 6 Oct 2021 15:21:33 +0000 (15:21 +0000)]
perfmon: Topdown Level 1 support on Snowridge

Enable Topdown Level 1 support on Snowridge,
enabled with standard CPU events on small core.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I58ad09383de7464265ac1b69e683f253591e3b5e

2 years agoperfmon: check bundle is supported 95/33995/2
Ray Kinsella [Wed, 6 Oct 2021 15:15:41 +0000 (15:15 +0000)]
perfmon: check bundle is supported

Add a check bundle is supported before futher activation.
Enable different bundles with same name, supported on different platforms.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I73e8bbd1e07c05ebccd9146d48a234eb598a2388

2 years agoperfmon: fix peusdo events 94/33994/2
Ray Kinsella [Thu, 7 Oct 2021 10:42:26 +0000 (11:42 +0100)]
perfmon: fix peusdo events

Fix peusdo events, missed populating "core" events with peusdo events.

Type: fix
Fixes: bf37bf6f7

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I569fa876f1b58540adac0b095be0ff4ade664dec

2 years agoip: check if interface has link-local address (addition) 68/33568/2
Artem Glazychev [Mon, 23 Aug 2021 06:35:31 +0000 (13:35 +0700)]
ip: check if interface has link-local address (addition)
previous - b31fbc47f5fcf8234c757558d7b0285348774086

Type: fix

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

2 years agowireguard: add events for peer 85/32685/12
Artem Glazychev [Thu, 10 Jun 2021 17:10:00 +0000 (00:10 +0700)]
wireguard: add events for peer

we can receive events from peer about its state:
-WIREGUARD_PEER_STATUS_DEAD
-WIREGUARD_PEER_ESTABLISHED

Type: improvement
Change-Id: Ide83fbe2cfafa79ded5bcf3f6a884c26a7583db0
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
2 years agosession: fix severity info 84/33984/2
Filip Tehlar [Wed, 6 Oct 2021 12:54:51 +0000 (12:54 +0000)]
session: fix severity info

Type: fix

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

2 years agowireguard: add ipv6 support 09/32009/12
Artem Glazychev [Thu, 3 Jun 2021 13:11:54 +0000 (20:11 +0700)]
wireguard: add ipv6 support

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

2 years agotcp: fix severity info 83/33883/5
Filip Tehlar [Wed, 6 Oct 2021 09:47:41 +0000 (09:47 +0000)]
tcp: fix severity info

Type: fix

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibe39bc045c3b154209a83b59ef95a37c61b32c0c

2 years agodocs: more nitfixes 85/33985/1
Nathan Skrzypczak [Wed, 6 Oct 2021 13:03:35 +0000 (15:03 +0200)]
docs: more nitfixes

Type: fix

Change-Id: I41455e1cdc62e7c0baa148630b0701b042f3b156
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agobuild: fix lib dir in debian packaging 80/33980/2
Damjan Marion [Wed, 6 Oct 2021 10:07:04 +0000 (12:07 +0200)]
build: fix lib dir in debian packaging

Type: fix
Change-Id: I64b0bbe5ba2317ab03b68f140df69a94a0dd7407
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agodocs: vnet comment nitfixes 21/33921/3
Nathan Skrzypczak [Wed, 29 Sep 2021 13:36:51 +0000 (15:36 +0200)]
docs: vnet comment nitfixes

Type: improvement

Change-Id: Iac01d7830b53819ace8f199554be10ab89ecdb97
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agovlib: doc nitfixes 86/33886/2
Nathan Skrzypczak [Wed, 29 Sep 2021 13:35:31 +0000 (15:35 +0200)]
vlib: doc nitfixes

Type: improvement

Change-Id: I9e761f908d9d2becbc61eb0515dc6b7c1e1e036f
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agodocs: extras/deprec nitfixes 87/33887/3
Nathan Skrzypczak [Wed, 29 Sep 2021 13:38:50 +0000 (15:38 +0200)]
docs: extras/deprec nitfixes

Type: improvement

Change-Id: I39038072eff3c09536917a32984daebab69e6fe7
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agoip: add classifier-based ACLs support on ip punt 49/33949/2
Benoît Ganne [Thu, 30 Sep 2021 11:41:00 +0000 (13:41 +0200)]
ip: add classifier-based ACLs support on ip punt

This feature allows one to add classifier-based ACLs on packets punted
from the ip infra, eg. to only whitelist specific sender(s).

Type: feature

Change-Id: Idab37b188583efbca980038875fc3e540cb2e880
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agosession: Add session_sapi_enable_disable 00/33300/5
Nathan Skrzypczak [Wed, 28 Jul 2021 12:09:50 +0000 (14:09 +0200)]
session: Add session_sapi_enable_disable

Type: feature

This adds an API message to do the switch
at runtime.

Change-Id: Ice6b69c57f0bfbf5668182e25593362ff4133615
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agobuild: don't hardcode triplet, allow specifying custom lib dir 23/33923/18
Damjan Marion [Thu, 30 Sep 2021 18:04:14 +0000 (20:04 +0200)]
build: don't hardcode triplet, allow specifying custom lib dir

Type: fix
Change-Id: I33f364fda88914f88f9b976cb83e6d3ff466f0bb
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2 years agotap: free the tap_fds vec on interface deletion 28/33928/2
Mohsin Kazmi [Fri, 1 Oct 2021 10:34:42 +0000 (12:34 +0200)]
tap: free the tap_fds vec on interface deletion

Type: fix

Tap fds are stored in vector array but deleting tap
was not freeing this vector.
This patch fixes it.

Change-Id: I5228e3b9f432c69cf2656b2ee7402360d775964b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agoperfmon: bundles with multiple types 18/33918/4
Ray Kinsella [Thu, 30 Sep 2021 14:15:32 +0000 (15:15 +0100)]
perfmon: bundles with multiple types

Allow perfmon bundles to support more than one bundle type, either node
or thread. Only used for topdown bundle for the moment.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Iba3653a4deb39b0a8ee8ad448a7e8f954283ccd8

2 years agonat: NAT44 ED api fix and improvement 22/33622/7
Filip Varga [Mon, 30 Aug 2021 14:23:38 +0000 (16:23 +0200)]
nat: NAT44 ED api fix and improvement

Backward compatibility fix returns erroneous behavior that lets user
add internally unused inside interface for the purpose
of complying with the old add/dump/details API behavior.
Change introduced in https://gerrit.fd.io/r/c/vpp/+/32951 removed
extra inside interface that wasn't required or any how used by the
output feature. This patch also changed outside interface flags to
inside & outside. This fix returns the old behavior by imitating
the old behavior through dummy registratoin data.

Added new API calls nat44_ed_add_del_output_interface
and nat44_ed_output_interface_get/details as a
replacement of old API's. New API introduces
simplified and cleaner way of configuring outside
feature without requirement of config flags.

Type: improvement
Signed-off-by: Filip Varga <fivarga@cisco.com>
Change-Id: I7a170f7325727c04da5e2e3ffbe3f02179531284

2 years agointerface: free the output_node_thread_runtimes 40/33940/2
Mohsin Kazmi [Mon, 4 Oct 2021 09:29:08 +0000 (11:29 +0200)]
interface: free the output_node_thread_runtimes

Type: fix

output_node_thread_runtimes was not freed when an interface
is deleted. This patch fixes it.

Change-Id: I763b0109be1904d43839528a346f3b9aa8927205
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agointerface: remove the redundant vec_free on rx_queue_indices 29/33929/3
Mohsin Kazmi [Mon, 4 Oct 2021 09:21:57 +0000 (11:21 +0200)]
interface: remove the redundant vec_free on rx_queue_indices

Type: fix

vnet_delete_hw_interface() calls vec_free on rx_queue_indices.
function vnet_hw_if_unregister_all_rx_queues() is used to free
rx_queue_indices which is also called by vnet_delete_hw_interface().
So, second vec_free is redundant.

Change-Id: Ibda4be38fd122d33532bb384c97b0b9e5f441134
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agobuild: Allow ipsec-mb plugin to build with libipsec_mb 0.55 29/33829/8
Nick Brown [Mon, 27 Sep 2021 15:53:23 +0000 (16:53 +0100)]
build: Allow ipsec-mb plugin to build with libipsec_mb 0.55

The 0.55 version of libipsec_mb does not support the chacha functions
used in the plugin.

The missing symobls are:
ipsecmb_ops_chacha_poly
ipsecmb_ops_chacha_poly_chained
IMB_CIPHER_DIRECTION

Check for ipsecmb_ops_chacha_poly() and conditionalise the chacha code
in the plugin on this.

ipsec_mb 0.55 is the version currently found in Debian Stable (bullseye)

Type: make
Signed-off-by: Nick Brown <nickbroon@gmail.com>
Change-Id: I88c962ac4f99a58b5cd61fb9b75f692e27d4ec30

2 years agomemif: integrate with new tx infra 47/33947/2
Mohsin Kazmi [Thu, 30 Sep 2021 09:28:07 +0000 (09:28 +0000)]
memif: integrate with new tx infra

Type: improvement

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

2 years agovcl: remove unsed configs 33/33933/2
Florin Coras [Fri, 1 Oct 2021 21:57:03 +0000 (14:57 -0700)]
vcl: remove unsed configs

Type: refactor

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

2 years agohsa: do not drop the barrier when creating echo server 14/33814/2
Filip Tehlar [Fri, 24 Sep 2021 06:21:25 +0000 (06:21 +0000)]
hsa: do not drop the barrier when creating echo server

Type: fix

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

2 years agowireguard: use the same udp-port for multi-tunnel 43/32443/11
Artem Glazychev [Tue, 25 May 2021 05:06:42 +0000 (12:06 +0700)]
wireguard: use the same udp-port for multi-tunnel

now we can reuse udp-port for many wireguard interfaces

Type: improvement
Change-Id: I14b5a9dbe917d83300ccb4d6907743d88355e5c5
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
2 years agovppinfra: fix potential memory access error in _pool_init_fixed 24/33324/4
Jieqiang Wang [Thu, 29 Jul 2021 17:03:16 +0000 (17:03 +0000)]
vppinfra: fix potential memory access error in _pool_init_fixed

_pool_init_fixed uses mmap to initialize a fixed-size and preallocated
pool, whose size is the sum of vector_size and free_index_size with
alignment to the CLIB_CACHE_LINE_BYTES and page size. In this way
vector_size equals to pool_header_t + vec_header_t + elt_size * max_elts
so moving to the end of the pool space should be pool_header_t pointer +
vector_size, instead of vec_header_t pointer + vector_size.

Simple code to reproduce this error:

u64 *pool;
pool_init_fixed(pool, 2042);

Improve unit test to cover this case

Type: fix

Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
Reviewed-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: If088ef89b3dcb2d874ee837ae9da60983b14615c
Signed-off-by: Dave Barach <dave@barachs.net>
2 years agovirtio: remove control queue support from virtio_show() for tap/tun 45/33945/2
Mohsin Kazmi [Mon, 4 Oct 2021 11:43:19 +0000 (13:43 +0200)]
virtio: remove control queue support from virtio_show() for tap/tun

Type: fix

Tap/Tun interfaces do not have control queue.
This patch removes the support of control queue
from virtio_show() which is used by show tap/tun cli.

Change-Id: Ib89144ad488ed548fb1ce50ee232a1b8659ccf29
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agofib: fix unitialized padding in fib_api_next_hop_decode 41/33941/2
Benoît Ganne [Fri, 1 Oct 2021 17:20:02 +0000 (19:20 +0200)]
fib: fix unitialized padding in fib_api_next_hop_decode

If the type is IPv4, makes sure the padding bytes are set to 0 as this
is used by ip46_address_is_ip4() to detect the type.

Type: fix

Change-Id: I6a81fa05a6b227086853901bf3dcdc66e6d04d2c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoip: fix punt for ipv6 42/33942/1
Benoît Ganne [Mon, 4 Oct 2021 10:03:20 +0000 (12:03 +0200)]
ip: fix punt for ipv6

Type: fix

Change-Id: I583c30e9b63c0b0b6cd5fef0b2cb9ed7ec9856e2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoperfmon: topdown events as peusdo events 20/33920/2
Ray Kinsella [Thu, 30 Sep 2021 15:02:04 +0000 (16:02 +0100)]
perfmon: topdown events as peusdo events

Topdown events are peusdo events exposed by linux,
and are only present on Intel platforms.
Change to clarifies this.

Type: fix

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I6a3dcea5f43f53dbb96475329baf5e596a24d54f

2 years agodocs: plugin comment nitfixes 22/33922/2
Nathan Skrzypczak [Wed, 29 Sep 2021 13:37:34 +0000 (15:37 +0200)]
docs: plugin comment nitfixes

Type: improvement

Change-Id: Ib7e2f5f314144064de7b6be0fade3db2f9c943fe
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agointerface: remove the input_node_thread_index_by_queue 30/33930/2
Mohsin Kazmi [Fri, 1 Oct 2021 17:01:48 +0000 (19:01 +0200)]
interface: remove the input_node_thread_index_by_queue

Type: fix

input_node_thread_index_by_queue is not being used anymore.

Change-Id: I0141fa0d024affb39771acf7516e064c5c8acfe9
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agohsa: proxy app worker thread deadlock 17/33917/2
Sivaprasad Tummala [Thu, 30 Sep 2021 13:43:46 +0000 (19:13 +0530)]
hsa: proxy app worker thread deadlock

proxy main lock not released in certain cases and resulting in deadlock.

Type: fix

Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
Change-Id: Ib869f459b447189bb921c05fd260f3691c2ac787

2 years agompls: Save the L3 header offset in the meta-data before label imposition 90/33390/2
Neale Ranns [Fri, 6 Aug 2021 09:03:45 +0000 (09:03 +0000)]
mpls: Save the L3 header offset in the meta-data before label imposition

Type: improvement

Subsequent features in the data-path can thus easily find the l3 header
without parsing the label stack.

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

2 years agodevices: add support for pseudo header checksum 21/31321/13
Mohsin Kazmi [Tue, 23 Feb 2021 14:55:04 +0000 (15:55 +0100)]
devices: add support for pseudo header checksum

Type: improvement

Linux uses pseudo header checksum when checksum of l4 is offloaded.
This patch adds similar support in virtual interfaces.

Change-Id: I6a94d1104e59356f95057e7c122e3be9cd8659a3
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agowireguard: move adjacency processing from wireguard_peer to wireguard_interface 13/32413/9
Artem Glazychev [Thu, 20 May 2021 05:33:52 +0000 (12:33 +0700)]
wireguard: move adjacency processing from wireguard_peer to wireguard_interface

now we should add routes manually

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