9922 Commits

Author SHA1 Message Date
Ole Troan
df87f8092f 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>
2020-11-25 08:25:50 +00:00
Florin Coras
c95cfa218b svm: support for multi-segment enqueues
Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I06c7022a6afbb146b23cbd3a430497ec9e8be73d
2020-11-24 21:44:14 +00:00
Nathan Skrzypczak
61559029da 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>
2020-11-24 15:56:08 +01:00
Nathan Skrzypczak
f06b3bdd92 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>
2020-11-24 12:54:21 +00:00
Jakub Grajciar
6a2794ea2b 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
2020-11-24 11:24:53 +01:00
Florin Coras
473556dcf1 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
2020-11-24 10:22:08 +00:00
Ole Troan
5c2a23720f 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>
2020-11-24 09:12:51 +00:00
Neale Ranns
77f9162b4a 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
2020-11-24 07:01:37 +00:00
Nathan Skrzypczak
19ce502225 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>
2020-11-23 19:08:09 +00:00
Damjan Marion
2cdb301678 vlib: add format_vlib_thread_name
Type: improvement
Change-Id: I2231f8e32964868ff6ef154b8ef431d99643c6a5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-23 17:02:46 +01:00
Damjan Marion
d1bd5d26cc interface: improve logging
Type: improvement
Change-Id: I3ea180e643434dfd9c21b27082ea8a125f75b813
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-23 17:02:38 +01:00
Benoît Ganne
e7af6f7ca4 virtio: fix overflow in case of buffering + drop
Type: fix
Fixes: 2e6f624f1f82ae0351dd05ad5d930d6876105519

Change-Id: Ib41c82ea1e8430afc920250fb0d054a2fb2d08c9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-23 15:59:07 +00:00
Dariusz Kazimierski
b5df85e243 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
2020-11-23 09:27:55 +01:00
Paul Vinciguerra
9046e44c84 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>
2020-11-21 15:44:56 +00:00
Florin Coras
79b3f8ce33 svm: fix coverity warning
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Icead1cbff69cf652fa566a79645c89864b6f3a0f
2020-11-20 07:41:49 -08:00
Neale Ranns
dc617b8df4 ip-neighbor: Use ip_address_t rather than ip46_address_t
Type: improvement

Change-Id: Ica5f395075677bda5f38d28e704f65350af88610
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-11-20 10:27:01 +00:00
Florin Coras
d01d2ce449 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
2020-11-19 23:53:19 +00:00
Florin Coras
52dd29ff51 vcl: stop tracking vpp event queues and thread index
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Icbee02a39650bc792532adc714bcf4f47f3fbe59
2020-11-19 22:14:39 +00:00
Neale Ranns
8b276df32f ipip: Don't crash when showing non-existant tunnel index
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I9717d420e42098e291c5b6c7d18e935ad78fdc3d
2020-11-19 21:56:49 +00:00
Dmitry Vakhrushev
4a98cf9648 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>
2020-11-19 21:54:57 +00:00
Florin Coras
91b364010c 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
2020-11-19 21:36:32 +00:00
Benoît Ganne
d9ed0b6786 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>
2020-11-19 21:32:54 +00:00
Dmitry Vakrhushev
83f37fc3bd 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>
2020-11-19 20:54:53 +00:00
Damjan Marion
97d6860b22 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>
2020-11-19 18:03:22 +00:00
Benoît Ganne
e3e9d8af46 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>
2020-11-19 15:35:00 +00:00
Ole Troan
2064047b9e 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
2020-11-19 14:01:37 +00:00
Benoît Ganne
4b73b55d70 build: bump libbpf to v0.2
Type: improvement

Change-Id: Ic97ed8c8ef8ba3b1bf3727810e7312456c52d808
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-19 10:03:49 +00:00
Benoît Ganne
a54fce3a26 build: bump rdma-core to 31.1
Type: improvement

Change-Id: I434d2013763e32bedf2188aea5b0c519ea0e06bb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-19 10:03:35 +00:00
Florin Coras
473c846047 svm: fifo segment cleanup
- consolidate chunk freelist functions
- remove redundant functions

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idd7e6700e2cc98a0fb9cfe20a2b739218fd48043
2020-11-18 21:54:59 +00:00
Matthew Smith
9585d79f7a 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>
2020-11-18 13:37:22 -06:00
Filip Tehlar
727082016f 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>
2020-11-18 08:14:46 +00:00
Mohsin Kazmi
b977d3f7c2 virtio: virtio: implement packed queues from virtio 1.1
Type: feature

Change-Id: I12703371541298efa029903d6762b1cd1f7322ca
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-11-17 16:43:26 +00:00
Neale Ranns
b18796092b 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
2020-11-17 12:26:40 +00:00
Paul Vinciguerra
2e8760628d 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>
2020-11-17 08:36:30 +00:00
Dave Wallace
ff1f089c3a 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
2020-11-17 00:51:50 +00:00
Dave Wallace
b5c6d08f03 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
2020-11-17 00:51:22 +00:00
Dave Wallace
e1887c1765 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
2020-11-17 00:47:31 +00:00
Dave Wallace
634c293949 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
2020-11-17 00:46:44 +00:00
Dave Wallace
99bf1670c2 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
2020-11-17 00:45:30 +00:00
Dave Wallace
85b0f79126 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
2020-11-16 23:21:43 +00:00
Dave Wallace
2f10886a71 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
2020-11-16 20:59:20 +00:00
Dave Wallace
8de5fc2bd4 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
2020-11-16 14:18:51 -05:00
Benoît Ganne
34a19b2ddc docs: fix memory troubleshooting doc
Type: docs

Change-Id: Id9f8f6f13e4a41567adf7dc68e6c9be42dd82de7
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-16 13:03:19 +00:00
Miklos Tirpak
69842be389 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
2020-11-16 09:57:52 +00:00
Benoît Ganne
fcee30d6f5 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>
2020-11-16 09:55:00 +00:00
Mohammed Hawari
80ac72894c avf: add L4 checksum offload support
Change-Id: Ie90437cf597c5d53ab1cc41ea7db15b97614e2fc
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement
2020-11-15 08:52:15 +00:00
Mohammed Hawari
798267aaa2 rdma: implement multiseg rx without striding rq
Change-Id: I623617ad3c80610805dd3cf2a5f371e6677f4844
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement
2020-11-13 16:58:18 +00:00
yult
b8e129314a 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
2020-11-13 16:18:02 +00:00
Andrew Yourtchenko
fba2732ec8 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>
2020-11-13 15:49:50 +00:00
Andrew Yourtchenko
66d10589f4 cnat: zero-initialize structs
fixes coverity errors 215294, 215295

Type: fix
Fixes: af897c5e3fa76180fbe0634052bde98b4b3c34d7
Change-Id: Ie5da2bcddb465020d827d9f7c519a528cf2bd035
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-11-13 15:48:14 +00:00