vpp.git
3 years agoip-neighbor: Send API event when neighbor is removed 45/30045/3
Neale Ranns [Fri, 20 Nov 2020 13:05:59 +0000 (13:05 +0000)]
ip-neighbor: Send API event when neighbor is removed

Type: fix

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I9952497a108bac26445af95c28d4eed46099c2fc

3 years agoikev2: fix issue when sending multiple requests at once 91/30091/3
Filip Tehlar [Thu, 19 Nov 2020 21:34:48 +0000 (21:34 +0000)]
ikev2: fix issue when sending multiple requests at once

Type: fix

Change-Id: I8ed556de4370a03d10c56cce101cd5ea0d0aaf8b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agodpdk: patch broken virtio macro 90/29990/2
Matthew Smith [Wed, 18 Nov 2020 19:40:31 +0000 (13:40 -0600)]
dpdk: patch broken virtio macro

Type: fix

In DPDK 20.08, the macro ASSIGN_UNLESS_EQUAL(), which is defined in the
virtio PMD code, is broken. It does not actually set the variable that is
passed in to the value that is passed in. It just assigns the value
to a local variable that it declares. This results in
virtqueue_clear_net_hdr() failing to clear the fields in the virtio
net header. This can cause packets which were sent over an IPsec tunnel
and are subsequently transmitted on a virtio interface to have garbage
in the virtio net header.

Apply a post-20.08 patch from upstream to fix it.

Change-Id: Ic53e89d859db628e26a3c1988e53b626fede94d7
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agordma: fixed UAR writing at tx 15/30115/3
Mohammed Hawari [Tue, 24 Nov 2020 17:36:33 +0000 (18:36 +0100)]
rdma: fixed UAR writing at tx

Change-Id: Id81b4d27845c4e91cef90a4b8649662942d3cba1
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix

3 years agoapi: vat2 and json autogeneration for api messages 90/29890/13
Ole Troan [Wed, 18 Nov 2020 18:17:48 +0000 (19:17 +0100)]
api: vat2 and json autogeneration for api messages

VAT2: A completely auto-generated replacement of VAT.
Reads input message in JSON from stdin and outputs received messages in JSON.

A VAT2 plugin is automatically built for a .api file.
There no longer a need for a separate _test.c.

Example:
vat2 show_version {}
{
        "_msgname":     "show_version_reply",
        "retval":       0,
        "program":      "vpe",
        "version":      "21.01-rc0~411-gf6eb348a6",
        "build_date":   "2020-11-19T09:49:25",
        "build_directory":      "/vpp/autogen3"
}

vat2 sw_interface_dump '{"sw_if_index": -1,
                         "name_filter_valid": 0,
                         "name_filter": ""}'
[{
                "_msgname":     "sw_interface_details",
                "sw_if_index":  0,
                "sup_sw_if_index":      0,
                "l2_address":   "00:00:00:00:00:00",
                "flags":        "Invalid ENUM",
                "type": "IF_API_TYPE_HARDWARE",
                "link_duplex":  "LINK_DUPLEX_API_UNKNOWN",
                "link_speed":   0,
                "link_mtu":     0,
                "mtu":  [0, 0, 0, 0],
                "sub_id":       0,
                "sub_number_of_tags":   0,
                "sub_outer_vlan_id":    0,
                "sub_inner_vlan_id":    0,
                "sub_if_flags": "Invalid ENUM",
                "vtr_op":       0,
                "vtr_push_dot1q":       0,
                "vtr_tag1":     0,
                "vtr_tag2":     0,
                "outer_tag":    0,
                "b_dmac":       "00:00:00:00:00:00",
                "b_smac":       "00:00:00:00:00:00",
                "b_vlanid":     0,
                "i_sid":        0,
                "interface_name":       "local0",
                "interface_dev_type":   "local",
                "tag":  ""
        }]

This is the first phase and vat2 is not integrated in packaging yet.

Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ib45ddeafb180ea7da8c5dc274a9274d7a4edc876
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agosvm: support for multi-segment enqueues 12/30112/7
Florin Coras [Tue, 24 Nov 2020 16:41:17 +0000 (08:41 -0800)]
svm: support for multi-segment enqueues

Type: feature

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

3 years agobuffers: add page-size config 93/30093/4
Nathan Skrzypczak [Mon, 23 Nov 2020 15:25:21 +0000 (16:25 +0100)]
buffers: add page-size config

Type: feature

Add a `buffers {page-size}` parameter to specify page size
for buffers. This also fixes an issue with the parsing in
unformat_log2_page_size.

Change-Id: I7d7b1fa0bb7febaa7509cf2c625882f07eeafaad
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agodpdk: fix eal in nohugtlb mode 92/30092/3
Nathan Skrzypczak [Mon, 23 Nov 2020 15:23:11 +0000 (16:23 +0100)]
dpdk: fix eal in nohugtlb mode

When running with `dpdk { no-hugetlb }` dont try
to allocate hugepages and remove --in-memory as
this seems to be rejected by DPDK

Type: fix

Change-Id: I02c56ade0b4e706b3f76331745e2af64bb62f6e0
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agotests: remove bond, pipe, session and api_namespace from vpp_papi_provider 04/30104/1
Jakub Grajciar [Tue, 24 Nov 2020 10:22:01 +0000 (11:22 +0100)]
tests: remove bond, pipe, session and api_namespace from vpp_papi_provider

Type: refactor

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

3 years agosession: init lookup before dgram accept notification 01/30101/2
Florin Coras [Mon, 23 Nov 2020 23:59:36 +0000 (15:59 -0800)]
session: init lookup before dgram accept notification

Avoids potential session pointer invalidation

Type: fix

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

3 years agotests: remove svs, proxy_arp and gso from vpp_papi_provider 05/30005/5
Ole Troan [Thu, 19 Nov 2020 15:01:23 +0000 (16:01 +0100)]
tests: remove svs, proxy_arp and gso from vpp_papi_provider

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I916a386af48fd558b4749e206b2bc4b82a888512
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agotests: [re]enable an ARP test form incomplete 96/30096/3
Neale Ranns [Mon, 23 Nov 2020 16:25:27 +0000 (16:25 +0000)]
tests: [re]enable an ARP test form incomplete

Type: test

must have been disabled when another test of the same name was added

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I108582a68cc3ac81c03ab641f562ff22947baf30

3 years agovlib: Fix sh int addr 97/30097/3
Nathan Skrzypczak [Mon, 23 Nov 2020 16:56:32 +0000 (17:56 +0100)]
vlib: Fix sh int addr

format_l2_input might return s=0 which
causes vlib_cli_output to print weird
things when calling sh int addr

Type: fix

Change-Id: I3fe747979355e41aed51656f3b44e0eb76d33ef9
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agovlib: add format_vlib_thread_name 94/30094/2
Damjan Marion [Mon, 23 Nov 2020 15:50:24 +0000 (16:50 +0100)]
vlib: add format_vlib_thread_name

Type: improvement
Change-Id: I2231f8e32964868ff6ef154b8ef431d99643c6a5
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agointerface: improve logging 95/30095/2
Damjan Marion [Mon, 23 Nov 2020 15:58:05 +0000 (16:58 +0100)]
interface: improve logging

Type: improvement
Change-Id: I3ea180e643434dfd9c21b27082ea8a125f75b813
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovirtio: fix overflow in case of buffering + drop 53/30053/2
Benoît Ganne [Fri, 20 Nov 2020 18:18:41 +0000 (19:18 +0100)]
virtio: fix overflow in case of buffering + drop

Type: fix
Fixes: 2e6f624f1f82ae0351dd05ad5d930d6876105519

Change-Id: Ib41c82ea1e8430afc920250fb0d054a2fb2d08c9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agocrypto-ipsecmb: bump to intel-ipsec-mb version 0.55 85/30085/1
Dariusz Kazimierski [Mon, 23 Nov 2020 08:27:55 +0000 (09:27 +0100)]
crypto-ipsecmb: bump to intel-ipsec-mb version 0.55

Type: feature

This patch bumps the intel-ipsec-mb engine version from 0.54 to 0.55,
to avail performance improvement brought by the library.

Signed-off-by: DariuszX Kazimierski <dariuszx.kazimierski@intel.com>
Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: Iea114acc6e8e55020e7409ab2d1d00f4c2081e9c

3 years agovppapigen: move import processing logic to individual plugins 77/30077/2
Paul Vinciguerra [Sat, 21 Nov 2020 04:10:09 +0000 (23:10 -0500)]
vppapigen:  move import processing logic to individual plugins

Vppapigen currently embeds the import following control logic in
the runner.  This change delegates the control to the plugins.

Type: refactor

Change-Id: Iad20341bc9d652bedb71ca7037d3957fe60c7a0d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agosvm: fix coverity warning 48/30048/2
Florin Coras [Fri, 20 Nov 2020 15:34:53 +0000 (07:34 -0800)]
svm: fix coverity warning

Type: fix

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

3 years agoip-neighbor: Use ip_address_t rather than ip46_address_t 03/28903/3
Neale Ranns [Thu, 20 Aug 2020 08:22:56 +0000 (08:22 +0000)]
ip-neighbor: Use ip_address_t rather than ip46_address_t

Type: improvement

Change-Id: Ica5f395075677bda5f38d28e704f65350af88610
Signed-off-by: Neale Ranns <nranns@cisco.com>
3 years agosvm: move chunk locks to linked list 73/29973/4
Florin Coras [Wed, 18 Nov 2020 02:42:38 +0000 (18:42 -0800)]
svm: move chunk locks to linked list

Type: improvement

We only need to protect the linked lists.

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

3 years agovcl: stop tracking vpp event queues and thread index 92/29992/7
Florin Coras [Thu, 19 Nov 2020 03:02:17 +0000 (19:02 -0800)]
vcl: stop tracking vpp event queues and thread index

Type: improvement

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

3 years agoipip: Don't crash when showing non-existant tunnel index 19/29819/2
Neale Ranns [Mon, 9 Nov 2020 10:13:24 +0000 (10:13 +0000)]
ipip: Don't crash when showing non-existant tunnel index

Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I9717d420e42098e291c5b6c7d18e935ad78fdc3d

3 years agolldp: allow to configure restricted interfaces 87/29487/9
Dmitry Vakhrushev [Fri, 16 Oct 2020 20:39:28 +0000 (23:39 +0300)]
lldp: allow to configure restricted interfaces

  This improvement intended to allow sending of LLDP packets on an
interface even if the interface cannot support programming an extra
MAC address in order to receive LLDP messages from the attached
link peer.
  vnet_hw_interface_add_del_mac_address function fails on some
'virtio' interfaces due to limitation to set MAC addresses.

Type: improvement

Change-Id: I636de148736a0797d1fd70c6ab14759ff8fa42be
Signed-off-by: Dmitry Vakrhushev <dmitry@netgate.com>
3 years agosvm: init chunk rb tree indices in fifo 72/29972/4
Florin Coras [Tue, 17 Nov 2020 23:56:38 +0000 (15:56 -0800)]
svm: init chunk rb tree indices in fifo

Type: improvement

Let fifo segment mainly deal with fifo and chunk allocations not
initialization.

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

3 years agoikev2: respect punting only for ipv4 92/29892/2
Benoît Ganne [Thu, 12 Nov 2020 09:29:23 +0000 (10:29 +0100)]
ikev2: respect punting only for ipv4

IPSec punting to IKEv2 is valid only for NAT-T in IPv4.
Fix coverity CID 214915.

Type: fix

Change-Id: I6f2db38abf179565316f50c5d47c78acce3a0d01
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agodpdk: Telemetry thread is off by default. 94/29794/7
Dmitry Vakrhushev [Fri, 6 Nov 2020 10:20:13 +0000 (05:20 -0500)]
dpdk: Telemetry thread is off by default.

Currently thread with telemetry is enabled by default, to prevent
to use resources, thread should be off. The thread can be switch on
back using additional option in the dpdk's stanza.

dpdk {
telemetry
}

Type: feature

Change-Id: I1c25e8ee99f31dd01dc372f54e77e81a5bb67126
Signed-off-by: Dmitry Vakrhushev <dmitry@netgate.com>
3 years agodpdk: remove dpdk_early_init 04/30004/2
Damjan Marion [Thu, 19 Nov 2020 14:12:29 +0000 (15:12 +0100)]
dpdk: remove dpdk_early_init

We cannot disable dpdk plugin if hugepages are not present, as there
are some valid uses cases where dpdk works unpriviledged without
hugepages.

Type: fix
Change-Id: If67d8c941617ac0f16d496655d2bb6e489d34ad4
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agosvm: fix high segment base address for ASan 69/29969/2
Benoît Ganne [Tue, 17 Nov 2020 16:58:59 +0000 (17:58 +0100)]
svm: fix high segment base address for ASan

AddressSanitizer has specific requirements on memory map. In particular,
the range [0x00007fff8000, 0x10007fff7fff] is reserved for ASan use.

Type: fix
Fixes: f260eb97866978746ebd3f3441dc66e4ff7111cd

Change-Id: Ie96c4dd88b4f02d7fc5c24464572ff72cb6fd96b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agopapi: add paul back as maintainer 68/29968/2
Ole Troan [Tue, 17 Nov 2020 07:53:11 +0000 (08:53 +0100)]
papi: add paul back as maintainer

Paul accidentially got removed as maintainer for papi. Add him back.

Fixes: 6df2c7954126a316f86908526c3bb4d649f06597
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I697342e0c3793d9f5ea5b39a0d37a8522b34858e

3 years agobuild: bump libbpf to v0.2 53/29953/2
Benoît Ganne [Mon, 16 Nov 2020 12:30:07 +0000 (13:30 +0100)]
build: bump libbpf to v0.2

Type: improvement

Change-Id: Ic97ed8c8ef8ba3b1bf3727810e7312456c52d808
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agobuild: bump rdma-core to 31.1 54/29954/2
Benoît Ganne [Mon, 16 Nov 2020 12:36:18 +0000 (13:36 +0100)]
build: bump rdma-core to 31.1

Type: improvement

Change-Id: I434d2013763e32bedf2188aea5b0c519ea0e06bb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agosvm: fifo segment cleanup 66/29966/12
Florin Coras [Tue, 17 Nov 2020 02:11:51 +0000 (18:11 -0800)]
svm: fifo segment cleanup

- consolidate chunk freelist functions
- remove redundant functions

Type: improvement

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

3 years agodpdk: change mlx5 pmd name in foreach_dpdk_pmd 26/29726/2
Matthew Smith [Fri, 13 Nov 2020 16:41:21 +0000 (10:41 -0600)]
dpdk: change mlx5 pmd name in foreach_dpdk_pmd

Type: fix

With DPDK 20.08, mlx5 devices get bound to the mlx5_pci PMD instead
of net_mlx5. Update the name in foreach_dpdk_pmd so the PMD will be
correctly recognized during initialization.

Change-Id: I1863ec55da9fcf6a289959dff22ca2dcc5d114bc
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agoikev2: fix memleak when tunnel protect fails 60/29860/4
Filip Tehlar [Tue, 10 Nov 2020 09:32:13 +0000 (09:32 +0000)]
ikev2: fix memleak when tunnel protect fails

Type: fix

Change-Id: I1d278fc2b03b948c054ff1686315635ac0278ae8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovirtio: virtio: implement packed queues from virtio 1.1 69/28569/11
Mohsin Kazmi [Mon, 16 Nov 2020 15:49:30 +0000 (16:49 +0100)]
virtio: virtio: implement packed queues from virtio 1.1

Type: feature

Change-Id: I12703371541298efa029903d6762b1cd1f7322ca
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agogeneve: Remove one bucket load-balance objects 18/29918/2
Neale Ranns [Thu, 12 Nov 2020 16:53:51 +0000 (16:53 +0000)]
geneve: Remove one bucket load-balance objects

Type: improvement

geneve uses the UDP source port for the flow hash to get load-balancing
over multiple paths to the tunnel destination. However, if there is only
one path, then we can elide the LB object, contributed by the resolving
FIB entry, from the dasta path.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I13a1bedc307a474d258a757bc1bae28564798730

3 years agopapi: remove dependency on aenum 22/27022/3
Paul Vinciguerra [Tue, 12 May 2020 14:45:17 +0000 (10:45 -0400)]
papi: remove dependency on aenum

remove the dependency on the aenum package which was used to
provide Enum.IntFlag which is now available in the python stdlib.

aenum is not provided as a .deb and causes issues in packaging.

Type: fix

Change-Id: Ie45ec2130a767345f0aad038451780a5ddc7e8db
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agotests: move crypto tests to src/vnet/crypto/test 59/29959/2
Dave Wallace [Mon, 16 Nov 2020 21:54:14 +0000 (16:54 -0500)]
tests: move crypto tests to src/vnet/crypto/test

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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

3 years agotests: move classifier tests to src/vnet/classify/test 58/29958/3
Dave Wallace [Mon, 16 Nov 2020 20:08:14 +0000 (15:08 -0500)]
tests: move classifier tests to src/vnet/classify/test

- Refactor make test code to be co-located with
  the vpp feature source code.

Type: test

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

3 years agotests: move vpp-api tests to src/vpe-api/test 63/29963/2
Dave Wallace [Mon, 16 Nov 2020 23:03:53 +0000 (18:03 -0500)]
tests: move vpp-api tests to src/vpe-api/test

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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

3 years agotests: move gre tests to src/vnet/gre/test 64/29964/2
Dave Wallace [Mon, 16 Nov 2020 23:10:27 +0000 (18:10 -0500)]
tests: move gre tests to src/vnet/gre/test

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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

3 years agotests: move GSO/GRO tests to src/vnet/gso/test 65/29965/2
Dave Wallace [Mon, 16 Nov 2020 23:21:23 +0000 (18:21 -0500)]
tests: move GSO/GRO tests to src/vnet/gso/test

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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

3 years agotests: move cli tests to src/vlib/test 60/29960/2
Dave Wallace [Mon, 16 Nov 2020 22:13:14 +0000 (17:13 -0500)]
tests: move cli tests to src/vlib/test

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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

3 years agotests: move buffer tests to src/vlib/test 57/29957/2
Dave Wallace [Mon, 16 Nov 2020 19:41:55 +0000 (14:41 -0500)]
tests: move buffer tests to src/vlib/test

- Refactor make test code to be co-located with
  the vpp feature source code.

Type: test

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

3 years agotests: move bihash tests to src/vppinfra/test 56/29956/1
Dave Wallace [Mon, 16 Nov 2020 19:18:51 +0000 (14:18 -0500)]
tests: move bihash tests to src/vppinfra/test

- Refactor make test code to be co-located with
  the vpp feature source code.

Type: test

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

3 years agodocs: fix memory troubleshooting doc 32/29932/2
Benoît Ganne [Fri, 13 Nov 2020 17:43:30 +0000 (18:43 +0100)]
docs: fix memory troubleshooting doc

Type: docs

Change-Id: Id9f8f6f13e4a41567adf7dc68e6c9be42dd82de7
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agofib: increase the reference counter size for mfib to 32 bits 28/29928/2
Miklos Tirpak [Fri, 13 Nov 2020 14:18:11 +0000 (15:18 +0100)]
fib: increase the reference counter size for mfib to 32 bits

The 16 bits counter size limits the number of interfaces to 65K which is
too low for certain use cases. GTP-U for example creates a new interface
for every tunnel.

This change makes the mfib reference counter size inline with the fib one.

Type: fix
Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com>
Change-Id: I9354367484f3232fc5a770f2df7e0959e22e626f

3 years agofib: remove misleading FIB_PATH_TYPE_LAST 31/29931/2
Benoît Ganne [Fri, 13 Nov 2020 17:33:39 +0000 (18:33 +0100)]
fib: remove misleading FIB_PATH_TYPE_LAST

FIB_PATH_TYPE_LAST seems to not have been updated accordingly. It is
unused anyway, just remove it.

Type: improvement

Change-Id: I195e556a6695e3250cc03070ffd9262349f2c77b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoavf: add L4 checksum offload support 09/29809/6
Mohammed Hawari [Fri, 6 Nov 2020 16:58:06 +0000 (17:58 +0100)]
avf: add L4 checksum offload support

Change-Id: Ie90437cf597c5d53ab1cc41ea7db15b97614e2fc
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement

3 years agordma: implement multiseg rx without striding rq 48/29648/12
Mohammed Hawari [Tue, 27 Oct 2020 16:42:32 +0000 (17:42 +0100)]
rdma: implement multiseg rx without striding rq

Change-Id: I623617ad3c80610805dd3cf2a5f371e6677f4844
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement

3 years agovlib: macro definition error 58/29858/2
yult [Tue, 10 Nov 2020 02:48:43 +0000 (10:48 +0800)]
vlib: macro definition error

in 'VLIB_DECLARE_INIT_FUNCTION(x, tag)' '_vlib_init_function_##tag_##x'
should be '_vlib_init_function_##tag##_##x'

Type: fix

Signed-off-by: yult <oopsadm@gmail.com>
Change-Id: I091c8aa6091fe6e314e50fa00201d035869a1d96

3 years agoavf: actually delete ethernet address if deletion was requested 77/29877/3
Andrew Yourtchenko [Wed, 11 Nov 2020 10:58:32 +0000 (10:58 +0000)]
avf: actually delete ethernet address if deletion was requested

fixes the coverity issue 214893.

Type: fix
Fixes: 1ab533cba2202e73c2296d7677d0b335f2afad7b
Change-Id: I1159f5e23d1cdfcf6575c29d11e884703afee20f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agocnat: zero-initialize structs 78/29878/2
Andrew Yourtchenko [Wed, 11 Nov 2020 11:02:54 +0000 (11:02 +0000)]
cnat: zero-initialize structs

fixes coverity errors 215294, 215295

Type: fix
Fixes: af897c5e3fa76180fbe0634052bde98b4b3c34d7
Change-Id: Ie5da2bcddb465020d827d9f7c519a528cf2bd035
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agonat: cleanup & reorganization 93/29893/3
Filip Varga [Mon, 9 Nov 2020 11:24:03 +0000 (12:24 +0100)]
nat: cleanup & reorganization

Fixed compatibility issue between
nat ei and nat ed modes. Moved nat
syslogging to nat librarry. Deprecating
apis that will be integrated in upcoming
candidate configuration patch.

Type: refactor

Change-Id: I334b1b05b81b74667c5c76a05f768442e0dcf7e8
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agosession: fix fifo tuning init on connect 87/29887/2
Florin Coras [Wed, 11 Nov 2020 21:25:53 +0000 (13:25 -0800)]
session: fix fifo tuning init on connect

Type: fix

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

3 years agopg: fix uninitialized variable in pg mac filter CLI 79/29879/3
Andrew Yourtchenko [Wed, 11 Nov 2020 11:22:40 +0000 (11:22 +0000)]
pg: fix uninitialized variable in pg mac filter CLI

Fixes coverity issue 214887

Change-Id: I81bfc009faabcb74f950a94715a0395fac264ee9
Type: fix
Fixes: 21fb4f71ee3824c8f177045f21fea258ece602a9
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agosvm: change high_seg_baseva 69/29869/2
Nathan Skrzypczak [Tue, 10 Nov 2020 15:57:49 +0000 (16:57 +0100)]
svm: change high_seg_baseva

Type: fix

It appears that the session layer baseva is conflicting
with DPDK. 0x2000000000 seem to be working experimentally
Configurable with :

session {
  segment-baseva 0x2000000000
}

Change-Id: Ie93b9b9eb56a796877d614f78eb5801ea8e5ab31
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agoaf_xdp: fix doc 94/29894/2
Benoît Ganne [Thu, 12 Nov 2020 13:25:03 +0000 (14:25 +0100)]
af_xdp: fix doc

Type: docs

Change-Id: I1d28fb31032412f0231d677e45281ca88185502e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agointerface: add multiarch support for per-interface tx node 29/29829/2
Benoît Ganne [Mon, 9 Nov 2020 14:23:52 +0000 (15:23 +0100)]
interface: add multiarch support for per-interface tx node

Type: improvement

Change-Id: Ia4ce47c0f727cf7b02294f05b94f14e788f52f30
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovlib: vlib_buffer_t should be always 128 bytes, not 2 cachelines 26/29926/2
Damjan Marion [Fri, 13 Nov 2020 09:46:32 +0000 (10:46 +0100)]
vlib: vlib_buffer_t should be always 128 bytes, not 2 cachelines

Fixes issues on systems with 128-byte cacheline.

Type: fix
Change-Id: I33689ffa5ef0a879b4bf93c25d48618dd43daf58
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoethernet: mac must support 64-bits loads 57/29557/3
Benoît Ganne [Tue, 20 Oct 2020 14:24:17 +0000 (16:24 +0200)]
ethernet: mac must support 64-bits loads

ethernet dataplane loads MAC addresses as 64-bits loads for efficiency.
We must make sure it is valid, especially for the vector of secondary
MACs.

Type: fix

Change-Id: I851e319b8a973c154e85ff9f05f3b8e385939788
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agocrypto-native: fix multi-arch variant initialization 25/29925/3
Ray Kinsella [Fri, 13 Nov 2020 09:29:44 +0000 (09:29 +0000)]
crypto-native: fix multi-arch variant initialization

crypto_native/main.h is being built as default,
and crypto_native_main is initialized with a size of 64 bytes.

crypto_native/aes_gcm.c and crypto_native/aes_cbc.c are march
variants, their ICL variants are expecting crypto_native_main
to be 256 bytes.

Type: fix

Signed-off-by: Georgii Tkachuk <georgii.tkachuk@intel.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I4cddb75b712ea83c9cfca621887605d7bae104ec

3 years agonat: api,cli and test update & cleanup 17/29717/5
Filip Varga [Mon, 2 Nov 2020 11:11:12 +0000 (12:11 +0100)]
nat: api,cli and test update & cleanup

Cleanup of print functions in api file,
splitting functionality of cleanup callbacks for ED
and EI NAT. Updating and fixing API & CLI calls.

Type: refactor

Change-Id: I7a9dc4c8b1d2ca29db4754be7dfa4f698942127a
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agosr: show the hop-limit value used for SRv6 encapsulation 70/29870/2
Ahmed Abdelsalam [Tue, 10 Nov 2020 17:19:12 +0000 (17:19 +0000)]
sr: show the hop-limit value used for SRv6 encapsulation

Implements CLI to show the hop-limit value used for the
outer IPv6 header of the SRv6 encapsulation.

Type: feature
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Change-Id: I1f3d8f71fb94494ae6ab8104b9fcf989c5585d5c

3 years agoavf: don't switch process if already running process node 16/29916/2
Damjan Marion [Thu, 12 Nov 2020 14:48:15 +0000 (15:48 +0100)]
avf: don't switch process if already running process node

Type: fix
Change-Id: I82b11339402b5848b27c600f6484aaeee66cc888
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotcp: push last buffered sequence 90/29790/11
Florin Coras [Fri, 6 Nov 2020 03:01:44 +0000 (19:01 -0800)]
tcp: push last buffered sequence

Type: improvement

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

3 years agonat: use table ID for nat44 ipfix session events 87/29787/2
Matthew Smith [Wed, 4 Nov 2020 23:07:44 +0000 (17:07 -0600)]
nat: use table ID for nat44 ipfix session events

Type: fix

IPfix messages about NAT44 session create/delete were being populated
with the FIB table index instead of the table ID. The table ID is the
correct identifier to report externally (NAT64 IPfix messages for BIB
and session create/delete use table ID, as does NAT syslogging). Convert
the table index to an ID before adding it to the IPfix NAT44 session
create/delete message data.

Change-Id: I0166384752b17ff3a8c55aa19fa2af7a8140791e
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agodevices: remove unused code 91/29891/2
Damjan Marion [Thu, 12 Nov 2020 10:20:27 +0000 (11:20 +0100)]
devices: remove unused code

Type: refactor
Change-Id: I3f561818bc7c221f676477a52c7c7781624c185a
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovirtio: fix the index issue 86/29886/2
Mohsin Kazmi [Wed, 11 Nov 2020 19:28:35 +0000 (20:28 +0100)]
virtio: fix the index issue

Type: fix

Fixes: 587f9130424fd451e4ba823240d02f655fb197d1

Change-Id: I230993a54c84e22e324de2a8defeda83c517d733
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agotcp: validate fin seq in closing states 07/29807/4
Florin Coras [Fri, 6 Nov 2020 22:21:26 +0000 (14:21 -0800)]
tcp: validate fin seq in closing states

Type: fix

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

3 years agovcl: remove unused configs 59/29859/3
Florin Coras [Tue, 10 Nov 2020 03:59:16 +0000 (19:59 -0800)]
vcl: remove unused configs

Type: refactor

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

3 years agovpp: use vpp heap for libc 49/28949/4
Benoît Ganne [Fri, 18 Sep 2020 08:05:37 +0000 (10:05 +0200)]
vpp: use vpp heap for libc

This makes libc use vpp main heap instead of the default libc heap.
This gives better visibility (accounting, tracing) on allocations
happening in external libraries called from vpp (eg. OpenSSL).

Type: feature

Change-Id: I5d8a673472145a4e090bedb443b8c58a967d1cca
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agotcp: fix test for trailing bytes 57/29857/2
Florin Coras [Tue, 10 Nov 2020 03:03:09 +0000 (19:03 -0800)]
tcp: fix test for trailing bytes

Type: fix

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

3 years agosr: Show IPv6 address used as SRv6 Encaps source 26/29826/2
Ahmed Abdelsalam [Mon, 9 Nov 2020 14:04:07 +0000 (14:04 +0000)]
sr: Show IPv6 address used as SRv6 Encaps source

Implements CLI to show the IPv6 address used as source address for the SRv6 encapsulation.

Type: feature
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Change-Id: Ia442d9345a7793836148d890745fc5dc92729b6f

3 years agoclassify: fix classify filter trace del cli processing 36/29736/5
Jon Loeliger [Tue, 3 Nov 2020 20:49:10 +0000 (15:49 -0500)]
classify: fix classify filter trace del cli processing

When a 'del' is used to delete a classify table, only the
mask is needed to locate the table.  Any match vector is
unneeded.  The tests failed to notice this, but if the
test is run by hand in vppctl, it issues a parse error.

Fix the test so that it doesn't supply irrelevant data.
Fix the CLI processing to read always complete newline
terminated line of input instead.  This allows unneeded
CLI parameters to be ignored.  It also necessitated
fixing a trace test which had then erroneously split
a single CLI command over multiple lines.

While in the area, fix a latent bug on table matching
where a test for compatible mask vector sizes were
not matching impedance properly (byte vs ux32x4).

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

3 years agocnat: Fix invalid adj_index 35/29735/2
Nathan Skrzypczak [Tue, 3 Nov 2020 16:44:28 +0000 (17:44 +0100)]
cnat: Fix invalid adj_index

Type: fix

When using sNAT in combination with cnat translations
it might happen that the cnat_node_vip.c picks up a
translation on a session that has an invalid lb index,
thus resulting in a later crash in ip4-load-balance

Change-Id: I82607086b2d672a9dcf26bfb82ad7f83e6474562
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agoip6-nd: fix memory leaks 56/29856/3
Dave Barach [Mon, 9 Nov 2020 22:11:57 +0000 (17:11 -0500)]
ip6-nd: fix memory leaks

Quite a noticeable amount of memory. Recoded ra event tx and rx fns in
the usual manner, which terminated the leaks.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I486d348456b465ad3940a280d4cf489e8dd655a5

3 years agohsa: remove fake binary api registration in echo apps 31/29831/3
Florin Coras [Mon, 9 Nov 2020 17:39:28 +0000 (09:39 -0800)]
hsa: remove fake binary api registration in echo apps

Type: improvement

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

3 years agovcl: remove support for shm api connections 17/29817/3
Florin Coras [Mon, 9 Nov 2020 02:04:33 +0000 (18:04 -0800)]
vcl: remove support for shm api connections

Session layer only supports bapi with socket transport or app socket api
attachements. Going forward this will be further restricted to the
latter.

Type: improvement

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

3 years agosession: remove support for shm bapi attachment 16/29816/5
Florin Coras [Mon, 9 Nov 2020 00:50:39 +0000 (16:50 -0800)]
session: remove support for shm bapi attachment

Type: improvement

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

3 years agovlib: support macros in initial config file 28/29828/2
Dave Barach [Mon, 9 Nov 2020 15:30:06 +0000 (10:30 -0500)]
vlib: support macros in initial config file

Type: improvement
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: If8a19eb6688755311a3430437331ddf13c7e28c8

3 years agosession: delegate fifo ooo lookup init to transports 12/29812/3
Florin Coras [Sat, 7 Nov 2020 00:59:08 +0000 (16:59 -0800)]
session: delegate fifo ooo lookup init to transports

Fifo chunk ooo lookup data structures are private (not allocated on
segment heap) and should only be initialized by transport protocols that
require out-of-order enqueues/dequeues (like tcp).

Type: improvement

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

3 years agoikev2: add tests for DPD 25/29825/2
Filip Tehlar [Mon, 9 Nov 2020 13:23:24 +0000 (13:23 +0000)]
ikev2: add tests for DPD

Type: test

Change-Id: I9c1129a8596344551f3f8f2e029846d22511482e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agosession: default to using memfd mq segments 15/29815/2
Florin Coras [Sun, 8 Nov 2020 22:36:19 +0000 (14:36 -0800)]
session: default to using memfd mq segments

First step towards deprecating the use of binary api's segment for mq
allocation.

Type: improvement

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

3 years agovlib: fix trace number accounting 22/29222/5
Benoît Ganne [Fri, 2 Oct 2020 17:36:57 +0000 (19:36 +0200)]
vlib: fix trace number accounting

When using classifier to filter traces, not all packets will be traced.
In that case, we should only count traced packets.

Type: fix

Change-Id: I87d1e217b580ebff8c6ade7860eb43950420ae78
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoikev2: fix msg IDs generation 47/29747/2
Filip Tehlar [Sat, 31 Oct 2020 02:17:16 +0000 (02:17 +0000)]
ikev2: fix msg IDs generation

Type: fix

Change-Id: Id922895c269f0d2450e55fcb6871b6857f443462
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoikev2: fix udp encap 95/29795/2
Filip Tehlar [Fri, 6 Nov 2020 11:00:42 +0000 (11:00 +0000)]
ikev2: fix udp encap

Type: fix

Change-Id: I8c66f79f2d8cfff7c6d45e1fc5b529ffb3941491
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agotap: add function to set speed 84/28684/3
Alexander Chernavin [Fri, 4 Sep 2020 13:24:20 +0000 (09:24 -0400)]
tap: add function to set speed

A plugin can set the speed on a host interface making it possible for
host applications to be aware of the actual interface speed, not the
one that the driver reports by default.

With this change, add a function to set speed on a host interface.

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

3 years agoipsec: fix unformat types 99/29799/2
Benoît Ganne [Fri, 6 Nov 2020 09:51:47 +0000 (10:51 +0100)]
ipsec: fix unformat types

ipsec_{crypto,integ}_alg_t are packed and smaller than u32. Callers are
using those enums so unformat functions should too instead of u32 to
not overflow the stack.

Type: fix

Change-Id: Ifc86366f1928ca6352f06f390a88ac64668289d5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoipsec: fix outer table id lookup in ipsec tun script 00/29800/2
Benoît Ganne [Fri, 6 Nov 2020 09:55:22 +0000 (10:55 +0100)]
ipsec: fix outer table id lookup in ipsec tun script

Type: fix

Change-Id: I195949b610dca1b860baca18a059d39949627961
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoipsec: add support for tx-table-id in cli + example 01/29801/2
Benoît Ganne [Fri, 6 Nov 2020 13:14:23 +0000 (14:14 +0100)]
ipsec: add support for tx-table-id in cli + example

Type: improvement

Change-Id: I840741dfe040718b682935cdbcb0ba958d45a591
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agotcp: avoid consuming trailing bytes 88/29788/2
Florin Coras [Thu, 5 Nov 2020 21:39:48 +0000 (13:39 -0800)]
tcp: avoid consuming trailing bytes

Thanks to Shaligram Prakash <Shaligram.Prakash@enea.com> for reporting.

Type: fix

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

3 years agonat: fix hairpinning trace 31/29531/4
Klement Sekera [Mon, 19 Oct 2020 13:42:41 +0000 (13:42 +0000)]
nat: fix hairpinning trace

Type: fix
Fixes: 17a8ab6857f023bc1436d84808acc58dd614203e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I597d08d1d2457116e6856fa40cd65987e13a28d4

3 years agovppinfra: mspace_get_aligned should respect MALLOC_ALIGNMENT 83/29783/2
Damjan Marion [Thu, 5 Nov 2020 13:54:08 +0000 (14:54 +0100)]
vppinfra: mspace_get_aligned should respect MALLOC_ALIGNMENT

While underlying mspace_malloc() respects MALLOC_ALIGNMENT (16)
mspace_get_aligned moves start of data for 4 bytes making final result
not aligned to MALLOC_ALIGNED.

Type: fix
Change-Id: Ib1584f315e3658b3b748ebf4886fb7389ce640fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agobuild: link time optimization for release builds 97/29597/10
Damjan Marion [Thu, 22 Oct 2020 12:23:47 +0000 (14:23 +0200)]
build: link time optimization for release builds

Type: improvement
Change-Id: I0e24f1d2ad5c7a11a8bd40125428f86aca867bec
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agobuild: run garbage collection while linking plugins 85/29785/2
Damjan Marion [Thu, 5 Nov 2020 16:55:53 +0000 (17:55 +0100)]
build: run garbage collection while linking plugins

Ask linker to remove symbols which are not referenced or exported.

Type: improvement
Change-Id: Iec01fda7ec5b14bab8f36d25c2652bd6fe619961
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: remove unnecessary code 01/29701/2
Klement Sekera [Fri, 30 Oct 2020 16:17:00 +0000 (16:17 +0000)]
nat: remove unnecessary code

Type: improvement

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

3 years agotap: allow change of carrier state on host 45/28645/4
Matthew Smith [Fri, 24 Jul 2020 18:38:03 +0000 (13:38 -0500)]
tap: allow change of carrier state on host

Type: feature

Add a function to adjust the link state of the host side of a tap
interface. If an application (e.g. route protocol daemons) running on
the host uses netlink to monitor interface state, a plugin
could use this function to communicate a loss of connectivity
to the application by making the interface appear to go down.

Requires a somewhat recent kernel. E.g. it does not have any effect
on CentOS 7 but it works on CentOS 8.

Change-Id: I677ee7889d2eb142e2395bea98f0b4d7e7e7f810
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agovirtio: misc optimizations 06/29706/4
Damjan Marion [Sat, 31 Oct 2020 22:40:51 +0000 (23:40 +0100)]
virtio: misc optimizations

Type: improvement
Change-Id: Iaf98a60e37dd28828feca365b8fdc5d2f7ae6935
Signed-off-by: Damjan Marion <damarion@cisco.com>