9921 Commits

Author SHA1 Message Date
Klement Sekera
d417fe2616 nat: fix incorrect session removal case
Add a condition where a TCP session in transitory timeout is kept
instead of being erroneously deleted.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ic625c8c88cc8864293ebd57b0321505652af9380
2020-12-03 13:41:07 +00:00
Elias Rudberg
12b1b5611d tests: fix typo in numbered list in documentation
Fix a typo in numbered list in the documentation. Also mention
possibility of using TEST= to run a specific test.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I026703af014493afb3dea2d9ad99a7bb510b135d
2020-12-03 13:29:38 +01:00
Paul Vinciguerra
27860dd068 tests: remove aenum library
the aenum library was used to provide intflag functionality
for python versions earlier than 3.6

Type: test

Change-Id: I914d390ee5364f337006c1c59abafe4b9a3c1bde
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-12-03 00:46:03 -05:00
Paul Vinciguerra
45eff787cd tests: add type annotations to the vpp object abstract class
make it easier to detect logical mistakes.

Type: test

Change-Id: I853748ffaeebc545c8d31299f0d105405ad80bba
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-12-02 10:44:42 +00:00
Benoît Ganne
4abc866392 nat: use correct per-thread vlib_main
Using vlib_main of another thread is prohibited.

Type: fix

Change-Id: I9a85a5fee5c6665d423b4306faf3b3f2c5e22f99
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-12-02 10:12:16 +00:00
Paul Vinciguerra
46d6864b9d papi: improve unit testability
refactor the code so that snippets of json can be used to test vpp_papi
example unit test provided

Type: improvement

Change-Id: Ibec608fd2e5b12515aa4db17d85d4319134c22ea
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-12-02 10:11:38 +00:00
Elias Rudberg
41f15ae1df stats: void-pointer arithmetic fix
Cast to (char *) to avoid pointer arithmetic for (void *) pointers.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I62607b4cbc553449e2c60d514b4b17dbb4f88216
2020-12-02 10:08:53 +00:00
Paul Vinciguerra
cebed411cc papi: fix copy/paste error
Type: fix

Change-Id: I8bd20fb38e132f6ab8cbc0e73095b649b5946498
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-12-02 10:07:45 +00:00
Filip Tehlar
18107c974c ikev2: fix nat traversal
Type: fix

Change-Id: Ie723cf680745ec2292a15e2df05c1821436dba19
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-12-02 09:04:03 +00:00
Florin Coras
a39f472a2c session: make pacer worker load aware
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I71b9d54311fcad808fcdaad0df2dca8c161d580e
2020-12-01 18:50:59 +00:00
Florin Coras
7808df2e2f session: allow small pacer bursts
Instead of enforcing a "strict" release of data, which relies on
frequent rescheduling of sessions, allow some pacer coalescing, i.e.,
short bursts, that can minimize load on scheduler/session layer and
potentially leverage tso.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I67e38e5b8dc335bd214113b70c68c27ae92bd6da
2020-12-01 18:49:38 +00:00
Nathan Skrzypczak
de22111b52 wireguard: return public key in api
Type: feature

Change-Id: Iacb0da8bc738ed400678f9bb40e70e0031c6588e
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-12-01 16:49:32 +00:00
Jakub Grajciar
2df2f75ec5 tests: remove ip_punt from vpp_papi_provider and add ip_punt object models
Type: refactor

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I1bf53c2554e6b313467f618717698ed158db9065
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-12-01 13:31:41 +01:00
Fan Zhang
153e41a331 ipsec: change prediction
Type: improvement

This patch changes the prediction of the comparison between
SA owner thread index and the current thread index.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I48de0bb2c57dbb09cfab63925bf8dc96613d8bcf
2020-12-01 08:02:06 +00:00
Mohammed Hawari
bb7991a037 avf: add TSO support
Change-Id: Ica663e1d07225acf53fd74b0051a5a2a34174960
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement
2020-12-01 08:00:27 +00:00
Mohammed Hawari
8f5c6107c9 ebuild: perform build and install at the same time for external.mk
Change-Id: I65379f346fe3f881ce4196d99882cd6013e5e154
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2020-12-01 07:55:21 +00:00
Dave Wallace
54a778010a tests: Fix unversioned python shebang lines
- Unversioned python shebang lines may cause
  mixed python 2.7 and python 3 execution in
  make test.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Ia82c37be33902718c48878378b8343eedb76c2c8
2020-11-30 16:56:43 -05:00
Florin Coras
2440a8a6e7 svm: make svm queue mutex robust
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I256774c25b3c4105139a4728724a1a0c775e740f
2020-11-30 16:05:59 +00:00
Neale Ranns
7d8a956287 tests: IPv6 multicast over GRE
Type: test

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I6fc907ba923581540380bc9b456b5183fc100775
2020-11-30 12:33:09 +00:00
Paul Vinciguerra
f55c34173a map: add include guard to map.h
Type: fix

Change-Id: I26c3640d9fe82d4cf22f19935eeca1411f9a1c3b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-11-30 09:08:08 +00:00
Fan Zhang
7acab3790c dpdk: fix cryptodev compile
Type: fix

VPP 20.09 used new cryptodev raw APIs in cryptodev_dp_api.c
provided by the DPDK 20.08 patch attached.

The APIs has been updated between now and then and will cause
Cryptodev engine compile failed when bumping DPDK to 20.11
due to the incompatible API formats.

As a temp solution to successfully bumping DPDK version this patch
makes the newer DPDK version using old cryptodev APIs by compiling
cryptodev.c instead.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I3db607c8c1b2b028166a750c4d66dfc6ff18814c
2020-11-27 15:50:35 +00:00
Neale Ranns
6dc0c8d147 ip: Sub Address Family types. Feature enable for each SAFI
Type: improvement

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I318424ffa569d9a09187066d6ba15576757c1cf6
2020-11-27 12:25:23 +00:00
Benoît Ganne
633122e1fd vlib: fix vlib log elog vector overrun
vlib log strings are vectors not necessarily null-terminated C-string.

Type: fix
Fixes: bc867c3d2137dab4b1395196c1936233517980ab

Change-Id: Ia805ecdf4e76ccb1001dc93647161ee1c3adebc9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-26 22:45:40 +00:00
Fan Zhang
98e682dd91 crypto: improve ipsecmb engine performance
Type: improvement

This patch improves ipsecmb engine performance by disabling
safety features: SAFE_DATA, SAFE_PARAM, and SAFE_LOOKUP.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I756edc54d6bc35a1b0e9383e94cba0f73cf663cb
2020-11-26 21:33:13 +00:00
Dave Barach
0b8fccb403 docs: fix bihash doc bugs
Change hash -> hash_table in the pro forma main_t structure.
Remove trailing whitespace.

Type: docs

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I10c310dded14d52ad09df7ca3a76e60f15266b6b
2020-11-26 21:06:15 +00:00
Florin Coras
fe1ab7e216 svm: use internal function to prealloc fifo hdrs
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic13828e235d01ec5b73658e4bdd19e510932713d
2020-11-26 19:37:44 +00:00
Filip Varga
6bf3dfd2ca nat: fix tests
Fixed nat_ha and ipfix tests. Removed obsolete tests
and moved extended tests to standard tests.

Type: fix
Change-Id: I2d7f4c4fa4c52a4aa10d70c956e085a0fe00b911
Signed-off-by: Filip Varga <fivarga@cisco.com>
2020-11-26 19:27:02 +00:00
Florin Coras
54fe32cdff vcl: avoid coalescing dgrams on read
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I035f1ef26202bbcf918548cbaa3cdbc17944bf8a
2020-11-26 19:22:25 +00:00
Benoît Ganne
f23b1514a8 svm: only try to pre-allocate requested number of fifo pairs
Type: fix

Change-Id: I6f7679fd48d0ed98677c58f8c08d7e969e8e8220
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-26 17:45:36 +00:00
Dave Barach
aa676749d8 vlib: clean up event-logger CLI
Change "elog trace" to "event-logger trace"; corresponding change in
test/test_vlib.py, verified that the vlib test vectors still pass even
though they're not run on a regular basis ("make GCOV_TESTS=yes
TEST=test_vlib ...")

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Idee4aa036573865e071a9bab87e27fb5d53b4933
2020-11-26 17:17:36 +00:00
Neale Ranns
119c0d78f4 gre: Move to new API generated types/messages
Type: improvement

also clean up GRE includes across the code base.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I90928b0da3927b7ca1a23683aa80d4b53bbf63fd
2020-11-26 14:59:55 +00:00
Neale Ranns
fdf6b6f524 fib: Expressive type for walk return code. Honour code.
Type: improvement

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I487e698555545fce85d02d55deaaf7bb0007e388
2020-11-26 13:18:29 +00:00
Neale Ranns
ab4fbedf27 fib: DPO layout add u64 parameter.
Type: improvement

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: Iee04af801814b6360b045cf7dc8bcad6f517229e
2020-11-26 13:12:27 +00:00
Filip Tehlar
e1ab06c14d ikev2: better handling when no IKE DH configured
Type: improvement

Change-Id: I4289d20adaa3f2872889d5dbaafd9c025df8aca8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-11-26 12:18:56 +00:00
Klement Sekera
fe8371f02c ip: reassembly - fix handoff for custom node
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: If484725d48190246e4da09ceaed48a68a8a253f2
2020-11-26 10:45:14 +00:00
Klement Sekera
78ef61e4a0 ip: trace icmp echo request/reply id
Type: improvement
Change-Id: Ie3a5b182e446c407f258c043c22d1cf25eb7ee59
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2020-11-26 10:29:38 +00:00
Neale Ranns
87866037c4 fib: Only track cover if activated
Type: fix

also cleanup any tracking at delete

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Id1037920c88c63e2029384af931064c00ed497aa
2020-11-26 10:16:58 +00:00
Neale Ranns
cfe949dbf0 ipsec: A P2MP ipsec interface is NBMA
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I1922463683201215933e9f85b587d7c7123f3bfd
2020-11-25 19:35:38 +00:00
Florin Coras
e92c946498 session: add startup option to poll in main
Type: improvement

Needed to support multi-worker tests

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I68d5590cece24a744513dc6c324dfb2861a38a94
2020-11-25 19:02:59 +00:00
Dave Barach
bc867c3d21 vlib: add elog events for vlib log entries
Pretty interesting to see how long plugins take to load.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: If496eb73b2e1fd9dd714142cd5195fa7ccd93ebd
2020-11-25 19:01:08 +00:00
Benoît Ganne
7483a7272d dns: use correct per-thread vlib_main
Using vlib_main of another thread is prohibited.

Type: fix

Change-Id: I7ae294dfaf2526738e91408c9b4865ef9f801b8a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-25 18:59:22 +00:00
Benoît Ganne
0a2fde105a syslog: use per-thread vlib_main
We should not use main thread vlib_main in workers.

Type: fix

Change-Id: I58c0a8cadf2dc7f768b20ac90e7ec7921e2e8ca4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-25 18:58:46 +00:00
Florin Coras
9404a077a0 tcp: enable lc if any other debug option enabled
Also fix debug build after snd_una_nxt removal.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ife52689cd30cdebf36057cf4d20d7f6207f1e29e
2020-11-25 17:14:09 +00:00
Damjan Marion
4a348e8668 pci: add PCIe Gen4 link speed
Type: improvement
Change-Id: Iccf4fabe912ab7ac45b6fc082824a67d4fd9f216
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-25 17:12:53 +00:00
Benoît Ganne
2113c7f28b dns: fix double-unlock
dns cache should no longer be unlocked by caller.

Type: fix
Fixes: 84a563ae4050cc0389dcd438fbe9ea882f2b8404

Change-Id: I3708718ae8f00e4e4f4e04381caa0095c8494b82
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-25 16:49:47 +01:00
Neale Ranns
4ac36bcb19 ip-neighbor: Send API event when neighbor is removed
Type: fix

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I9952497a108bac26445af95c28d4eed46099c2fc
2020-11-25 12:57:16 +00:00
Filip Tehlar
38340fa32c ikev2: fix issue when sending multiple requests at once
Type: fix

Change-Id: I8ed556de4370a03d10c56cce101cd5ea0d0aaf8b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-11-25 12:24:11 +00:00
Matthew Smith
45d60492a4 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>
2020-11-25 10:51:09 +00:00
Mohammed Hawari
3ef653aa88 rdma: fixed UAR writing at tx
Change-Id: Id81b4d27845c4e91cef90a4b8649662942d3cba1
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
2020-11-25 10:35:01 +00:00
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