Compare commits

...

129 Commits

Author SHA1 Message Date
Benoît Ganne
b6e090c493 ipsec: fix AES CBC IV generation (CVE-2022-46397)
For AES-CBC, the IV must be unpredictable (see NIST SP800-38a Appendix
C). Chaining IVs like is done by ipsecmb and native backends for the
VNET_CRYPTO_OP_FLAG_INIT_IV is fully predictable.
Encrypt a counter as part of the message, making the (predictable)
counter-generated IV unpredictable.

Fixes: VPP-2037
Type: fix

Change-Id: If4f192d62bf97dda553e7573331c75efa11822ae
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-02-07 17:21:43 +01:00
Juraj Linkeš
4f7b92f0a0 dpdk: disable i40evf in favor of iavf patch
Fix an issue where multiple VPP instances with DPDK starting at the
same time would not initialize VFs properly. This is done by using the
iavf PMD (where the issue can't be reproduced) instead of the i40evf
PMD.

Type: fix
Ticket: VPP-1943
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Change-Id: Idcc48088c7d66a76da2b4675c02c7c115706c8b3
2021-05-27 12:41:37 +02:00
Filip Tehlar
8b4bd27d60 ikev2: test responder behind NAT
Type: test
Ticket: VPP-1903

Change-Id: I7fab6931833d6e253b7b921172825387302d8f70
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 027d813a509be0f30e05b48b888007b0094e4faf)
2021-04-21 19:37:29 +00:00
Dave Barach
4f88004bc3 docs: vpp stateless traffic generator
Add a use-case writeup.

Type: docs

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib6e79e80455edbdeedcc96943dd98f16c57c559e
(cherry picked from commit b8f6122b4f4c828dee103d1f3116d27e6e3e6f3a)
2021-01-22 14:02:48 +00:00
Dave Wallace
14bfb66d39 build: add missing openssl-devel package for centos-8 vpp-ext-deps
- In a new centos-8 installation, vpp-ext-deps fails on missing
  ssl.h header file after 'make install-deps'.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I521d817dd1f1e21aff427d98b9832ea7c7b89339
2021-01-14 21:50:53 +00:00
Paul Vinciguerra
d1598d4274 docs: update list of plugins
The list of plugins is outdated.

This change introduces a dynamically
generated list of the plugins along with their descriptions,
extracted directly from the sources.

Type: docs

Change-Id: Icb7b65e6b45289e257d71a1c18d10f62ced59cbe
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 630ca994e0ff210a3de80d73bb395c931d2fd83f)
2020-12-21 23:23:53 +00:00
Paul Vinciguerra
1e44cf53b5 docs: fix missing quotes in ubuntu install instructions
type: docs

Change-Id: Ifa09b63924f4b7bf2719bba6ada0e1122407641c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit ac9a585c6207ac876025f924aeb96ddcac8c8805)
2020-12-18 23:37:48 +00:00
Elias Rudberg
3b82d3e393 nat: avoid hairpinning infinite loop problem
Fix in nat44 hairpinning code to check if anything was actually
changed in the snat_hairpinning() routine, and return 0 if nothing
changed. This helps avoid an infinite loop repeating the three
nodes nat44-hairpinning-->ip4-lookup-->ip4-local in case there
was no change. Also add a corresponding test case.

This is essentially a cherry-pick of change 30284 but the
automatic cherry-picking did not work because of some filename
changes.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I21a59ae7423f40abeff9fc0411330da58b3011f0
2020-12-10 09:30:46 +00:00
Dave Wallace
a23dd5dbb5 build: fix centos-8 'make install-deps' enable PowerTools repo
- The name of the powertools repo was changed [0]
  in centos-8 from 'PowerTools' to 'powertools'.
  Retrieve the correct name from 'dnf repolist all'
  instead of hard coding it.

[0] b759b17557

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Ic1402e671eb1d70dec429bab82ad18d8251f4eef
(cherry picked from commit 1affb31ef528dcbc90b718bd70a9882a4225a385)
2020-12-08 21:05:31 +00:00
Filip Tehlar
7847f172a3 ikev2: fix nat traversal
Type: fix

Change-Id: Ie723cf680745ec2292a15e2df05c1821436dba19
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 18107c974c24a708e309542d1dbf4a52acc70b08)
2020-12-02 09:04:22 +00:00
Ole Troan
007bd2f1fe stats: missing dimension in stat_set_simple_counter
A simple counter is a two dimensional array by threads and
counter index. 28017 introduced an error missing the first
dimension.

If a vector is updated at the same time as a client reads,
an invalid pointer my result. This will be caught by the
optimistic locking after copying out the data, but if
following a pointer outside of the stat segment then
the stat client would crash. Add suitable boundary checks
for access to stat memory segment.

Fixes: 7d29e320fb2855a1ddb7a6af09078b8ed636de01
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I94f124ec71d98218c4eda5d124ac5594743d93d6
(cherry picked from commit 65c56c83ce4e58178b5ad90a8f325692c9904381)
Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
2020-11-30 20:43:08 +01:00
Mohammed Hawari
e7a1006e86 rdma: fixed UAR writing at tx
Change-Id: Id81b4d27845c4e91cef90a4b8649662942d3cba1
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
(cherry picked from commit 3ef653aa886e6a07afba106b4f03c40e392e1307)
2020-11-26 15:04:05 +00:00
Neale Ranns
b72fb31d69 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-26 15:03:50 +00:00
Filip Tehlar
0e68a7cb5b ikev2: better handling when no IKE DH configured
Type: improvement

Change-Id: I4289d20adaa3f2872889d5dbaafd9c025df8aca8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit e1ab06c14deaff5cc0870f7ec76f36613ffcc2d3)
2020-11-26 15:02:41 +00:00
Filip Tehlar
6e13acc42e ikev2: fix issue when sending multiple requests at once
Type: fix

Change-Id: I8ed556de4370a03d10c56cce101cd5ea0d0aaf8b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 38340fa32c96e9c6cb1593f03117dd504efbd5f4)
2020-11-26 15:02:41 +00:00
Benoît Ganne
186f018f68 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>
(cherry picked from commit d9ed0b67866fa6b8a5f449fdb8da8d6aacb5f225)
2020-11-26 15:02:41 +00:00
Filip Tehlar
49de3282a3 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>
(cherry picked from commit 727082016f8822edcf40662d0059d3e8fab5e2ef)
2020-11-26 15:02:41 +00:00
Filip Tehlar
29ad98844b ikev2: add tests for DPD
Type: test

Change-Id: I9c1129a8596344551f3f8f2e029846d22511482e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 2008e314537500975acbd666e38d3fa6e7261bf5)
2020-11-26 15:02:41 +00:00
Filip Tehlar
6d878f3e61 ikev2: fix msg IDs generation
Type: fix

Change-Id: Id922895c269f0d2450e55fcb6871b6857f443462
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit f6b02e0d0bfd7e0f1d79e8ee426f48ca37ae5ff3)
2020-11-26 15:02:41 +00:00
Filip Tehlar
cbc3dc0b30 ikev2: fix udp encap
Type: fix

Change-Id: I8c66f79f2d8cfff7c6d45e1fc5b529ffb3941491
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 67b8a7fa76d8ec2d73f1b2380e11bf8e2793448e)
2020-11-26 15:02:41 +00:00
Filip Tehlar
8035ffe8dc ikev2: add option to disable NAT traversal
Type: feature
Ticket: VPP-1935

Change-Id: I705f84047b112279377590157a1c7b4a34f693d2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit d7fc12f07313f9147159f2562f6fcc928af7a963)
2020-11-26 15:02:41 +00:00
Filip Tehlar
f6deabd4fc ikev2: fix reply during rekey
Type: fix

Change-Id: If87f4b8ae92508215fe91178958fe2ddb91e5a35
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 68ad6258374201ba8f0dc052e6f44d6250555249)
2020-11-26 15:02:41 +00:00
Filip Tehlar
31b44a7a13 ikev2: increase tick interval in process node
This helps to resolve sporadic failures in unit tests.

Type: fix

Change-Id: I3abd77ed74310f9729a841e8569eafe6d7758dcb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 761f8f0eaaf43f38fdd9d160ba19ff833de7d210)
2020-11-26 15:02:41 +00:00
Filip Tehlar
56d712533b ikev2: cli for disabling dead peer detection
Type: feature

Change-Id: I0db0a9b2f872753fa64d27335838cb34645a9ee8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit af4a414eb74d1456121023e6b3aa76af6c16f89a)
2020-11-26 15:02:41 +00:00
Filip Tehlar
f7fd0e749b ikev2: fix memory leak
Type: fix

Change-Id: I33c38c791cc9a28898de402ae831c4862073eb2d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit b8bc2f1ef3332a795880f11f1c45a77b1b7851f6)
2020-11-26 15:02:41 +00:00
Filip Tehlar
a81bcf3945 ikev2: support sending requests from responder
Type: improvement
Ticket: VPP-1894

Change-Id: I5a24a48416bca2ffbd346cdaa813fb25801e6c9b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit edf2900ac633ae0d8575b04094b1bca40e1a221f)
2020-11-26 15:02:41 +00:00
Filip Tehlar
233b12d11d ikev2: fix setting responder/initiator addresses
Type: fix

Change-Id: Ic406aa914d92e802a5fb0f27c2ffa1b98db012b0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit ec112e5a9eb708c1ee85faf569fef6fa40178294)
2020-11-26 15:02:41 +00:00
Filip Tehlar
83c70b7a5a ikev2: prevent crash after no IP address
Type: fix
Ticket: VPP-1900

This fixes a crash when initiating IKE connection using interface
without any IP address.
It also ensures that the IKE connection is automatically retried once the
interface obtains an address.

Signed-off-by: jan_cavojsky <Jan.Cavojsky@pantheon.tech>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ia1919c349e64b3a0a4198365e075e177e3ba3de5
(cherry picked from commit 6960da528443ea40b1cdab323c76f978f7b16a8b)
2020-11-26 15:02:41 +00:00
Filip Tehlar
8b69f7546e ikev2: fix initial contact cleanup
When looking for existing SA connection to clean up search all per
thread data, not only current one.

Type: fix

Change-Id: I59312e08a07ca1f474b6389999e59320c5128e7d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit e7c8396982607634b4c747870499671ffa53868e)
2020-11-26 15:02:41 +00:00
Filip Tehlar
3ff88076d3 ikev2: fix coverity warning
Type: fix

Change-Id: Iee96b3ea3e71ec248c3c3c98d153a08372b5faf0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit dc6378f71bc7c9835845a91dbbc1646ea46df51e)
2020-11-26 15:02:41 +00:00
Filip Tehlar
ae0d24f1be ikev2: fix memory leak in auth routine
Type: fix

Change-Id: I93529b069925fcef32cdb22e27975b802b4c3b97
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 623d87fd39c53e2f4d8718014e76836fe07c4245)
2020-11-26 15:02:41 +00:00
Filip Tehlar
469181845b ikev2: support ipv6 traffic selectors & overlay
Ticket: VPP-1917
Type: feature

Change-Id: Ie9f22e7336aa7807b1967c48de9843df10fb575c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 84962d19ba76eafd5c7658aa86ec61c9b81f7702)
2020-11-26 15:02:41 +00:00
Filip Tehlar
0b685565c1 ikev2: refactor ikev2 node
Type: refactor

Change-Id: I65acbd5d9724c500a24699de973df08016d9d8d6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 3434cb8fe379791050a85617775bb518cdd0eb5d)
2020-11-26 15:02:41 +00:00
Filip Tehlar
df61e60815 ikev2: better packet parsing functions
Ticket: VPP-1918
Type: improvement

Change-Id: I2bc3e30121697404dcd54f1c2127bd85ccc1029e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 558607dc3a96232191f413b9bc894524ff85f2a1)
2020-11-26 15:02:41 +00:00
Filip Tehlar
447f673e75 ikev2: show IKE SA command improvements
Ticket: VPP-1898
Type: improvement

Change-Id: I1c56df331965c733a2d0eae63a12d5a4ee5a2e41
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 90690f1e8f39904990b4eeeb7851b248a9c908f3)
2020-11-26 15:02:41 +00:00
Benoît Ganne
7d304405ed 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>
(cherry picked from commit 7483a7272d15354486371be7a20c4bf35ab2eb38)
2020-11-26 14:56:28 +00:00
Benoît Ganne
7946c61c55 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>
(cherry picked from commit 0a2fde105a5a0c996333d67d2901b4eaedf7cbe1)
2020-11-26 13:10:42 +00:00
Benoît Ganne
c646d54b46 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>
(cherry picked from commit 2113c7f28b154df16af3637f67484971759a00a7)
2020-11-25 17:55:06 +00:00
Ray Kinsella
a6a5031e78 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
2020-11-13 10:26:48 +00:00
Benoît Ganne
1e0e3d55a8 ipsec: add support for tx-table-id in cli + example
Type: improvement

Change-Id: I840741dfe040718b682935cdbcb0ba958d45a591
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 40aa27ef7cf63daa11974d0b06ea9ee1a102cb32)
2020-11-12 12:33:34 +00:00
Benoît Ganne
e36b854a72 feature: reset interface feature arc on interface deletion
When removing an interface we must reset all per-interface per-feature
arc data to ensure we do not get wrong feature arc config data when the
sw_if_index is recycled.

Type: fix

Change-Id: I8c9d850d7c62b7b77193da4258ab5fb9bdda85a6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 6178bdafa6a318d50cc8ad82f07c6c798c7024ef)
2020-11-12 12:33:31 +00:00
Benoît Ganne
087d81dafa af_xdp: fix NUMA node parsing
Non-NUMA systems might report -1 as NUMA node.

Type: fix

Change-Id: I092c817ea670009d6f530cc70ad13d45e15fd363
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 4317b8efb1c4a4163b2585b9abd71ec38cd0862c)
2020-11-12 12:33:28 +00:00
Benoît Ganne
73a3476602 wireguard: reset secret data before freeing it
Type: fix

Change-Id: I880bdd55ae5da0b9775a3fb548d44512348a7bc6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 2531d50101991011fb1c7755d48f11b41f092628)
2020-11-12 12:33:25 +00:00
Benoît Ganne
07aeedd242 vpp: fix main heap init
NUMA node parsing with vlib_get_thread_core_numa() can failed on single
socket systems. Use clib_get_current_numa_node() instead as we already
pinned the main thread to the requested core.

Type: fix

Change-Id: I22339516d0305689a58584c92ded7c96eb53be39
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 33ce5e568f8b4fb1254bf5ee32865e9443c0185a)
2020-11-12 12:33:22 +00:00
Benoît Ganne
020f02cf3d 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>
(cherry picked from commit f6422ffbc82c55f50d06c8c7a2e230db7001ee35)
2020-11-12 12:33:18 +00:00
Benoît Ganne
b2a92ff3b9 svm: fix fifo unit test
- fix fifo initialization overflowing chunk size
 - stick to the default base virtual address to initialize fifo. ASAN
   can be picky about address space

Type: fix

Change-Id: If9a29138d2c207859d72845e928290c808c4a982
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 07b94558087facbb16c0fa82a79fcbbd9b44c485)
2020-11-12 12:33:15 +00:00
Benoît Ganne
19b477f977 ikev2: fix cli memory leak
Type: fix

Change-Id: Ibdd83fa336427ec0c66224ecebb1b6bd36d1d1ba
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 1f6a6b8b2b4efd4d6735ffd6fa683a0190f232e2)
2020-11-12 12:33:12 +00:00
Benoît Ganne
32c2b2ae60 rdma: add RSS support for IPv6 and TCP
Type: feature

Change-Id: I8b0d918e6f13325954b29bf34e4ef224c1315c51
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 91603958d1d4fc3114739f9b264808940942e5c8)
2020-11-12 12:33:09 +00:00
Benoît Ganne
9c73329588 build: better detection of libbpf dependencies
Type: fix

Change-Id: Ib496e6eb0a76e6268aea09d5f4495f3ecd921ec2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 24b5107edd21b191fac3d6f9f2ae58c6ede59a9e)
2020-11-12 12:33:05 +00:00
Benoît Ganne
dcb9fcfc64 af_xdp: add option to claim all available rx queues
Type: feature

Change-Id: I97176c2c90ea664a68078b3a7b7d44eb237a7f13
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit d4e109138279fcfbfce9d82384f0fa53b8f43ae1)
2020-11-12 12:33:02 +00:00
Benoît Ganne
52bbd86836 ipsec: fix outer table id lookup in ipsec tun script
Type: fix

Change-Id: I195949b610dca1b860baca18a059d39949627961
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 27632cae3dbed6afbaaf12d8da7798d7ecaa2ddb)
2020-11-12 12:32:58 +00:00
Benoît Ganne
019ce71c2d ip: fix doxygen doc for address add/del command
Type: docs

Change-Id: I96d5cdb41bd938f06d2d72f2625bf1b3d2c5b1b4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 7bed48cb79ea13dc34ef263942b4a74030aeb11c)
2020-11-12 11:25:16 +00:00
Benoît Ganne
071328283e svm: fix ASAN annotations for external chunks
Chunks can be allocated from another process. We need to manually
mark them as accessible for ASAN.

Type: fix

Change-Id: Ifbeef3346e9cee2c1231f80cbcf7f9673b5b54be
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit df601ae2d16ed127a9506a7a865484632ee1afe1)
2020-11-09 19:13:25 +01:00
Mohammed Hawari
8cfcbaa726 rdma: various fixes for chained buffers tx
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Change-Id: I428c87e581db335362fef30e274db8947a896416
(cherry picked from commit a210433d534fe0039ddc2a9aa9840895aef0405d)
2020-11-05 08:31:41 +00:00
Mohammed Hawari
7ed6a731ad pci: set PCI memory enable before mapping PCI BAR
This change mitigates software faults issued by some versions of the
linux kernel vfio-pci driver when VF PCI BARs are used without setting
the memory enable bit in the PCI configuration. This problem is
mentionned in https://lkml.org/lkml/2020/6/25/628

Change-Id: Idc177be4a5adb6ee467b4dd8f055f133ff267fe1
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
(cherry picked from commit 70fc36f26855fb4c7a56c5d1563d541b395f8f5d)
2020-10-28 16:27:23 +00:00
Steven Luong
11166453a5 virtio: checksum error reported for ip6 traffic with GSO enable
When GSO is enabled, vhost clears the checksum field prior to transmitting
the packet. Some newer kernel version does not like that and complains
about checksum error. This was seen with ip6 traffic.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I7c6f2a6148f4a30107bfa8b078f5990e64300cf1
(cherry picked from commit ac0f5363881fdce2721287bc5c756282166d9991)
2020-10-23 21:13:59 +00:00
Dave Wallace
ee3ea11496 build: fix typo in dpdk-20.08 patch #0003
Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Id0b3264e723f1df161a606e4dbdcd70c36d448a4
2020-10-23 09:35:12 -04:00
Dave Wallace
312e441a8e build: fix external patch application to not create .orig files
- Generation of patched original files (eg. dpdk-devbind.py.orig)
  causes build breakage of 'make install-ext-deps' on CentOS-8.
  Note: this only occurs on builds using 'make' for dpdk instead
  of 'meson'.  Thus only applies to stable/2009.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I3f1f70781b7a5564cd38e8876644d817e2eb4aad
2020-10-21 19:27:05 -04:00
Dave Wallace
9ef7eae699 build: fix broken debian dependencies on ubuntu-18.04 & debian-9
- Installation vpp-plugin-core from packagecloud.io/master
  & packagecloud.io/2009 breaks due to invalid dependencies
  on newer versions of libmbedtls & libmbedcrypto

Type: fix
Fixes: 641467406

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: If736dabcc4a91a04b46515620dd87662b7b14260
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-10-21 16:29:55 +00:00
Dave Wallace
4b50a90aad build: backport dpdk usertools support python3 only patch
- On Centos-8, 'make install-ext-deps' fails due to the
  bpr-mangle-shebangs script failing the dpdk usertools
  python scripts containing '#!/usr/bin/env python'.
  Backport usertools section of the DPDK patch which
  fixes this issue:
  http://git.dpdk.org/dpdk/commit/?id=3f6f83626cf4967a99382a6518a614a1bf3d2c20

- Also fix README to reflect name change of dpdk master
  branch to 'main'.

- On stable/2009, the dpdk build using make fails due to rpmbuild
  defaulting to using /usr/bin/python (version 2.7) which
  fails to build.  The build on master uses meson which somehow
  resolves this issue.  For this cherry-pick, fix the build by
  fixing the rpm vpp-ext-deps spec to force the use of python3.

Type: fix

Change-Id: I487b1ff2da786a4a3fd8fb0f859436b0e1885f1b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-10-19 23:38:00 +00:00
Chuan Han
d5f8a9b0ad build: Add missing debian dependencies
Otherwise, vpp install will fail.

Type: improvement

Signed-off-by: Chuan Han <chuan.han.comm@gmail.com>
Change-Id: Ifb4d7b8f6fb7b333b8205ba6b424176f8554cfdc
2020-10-16 08:05:03 -07:00
Dave Wallace
53604e5c83 build: add missing dnf-plugins-core package on centos-8
Type: fix

Change-Id: I1a4d9a7a8089cbf488dcd6f09eec6b4e0d0d72fe
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 858856df162adc095b8ce3c5998c383b0b2f10ff)
2020-10-14 16:34:34 +00:00
Filip Tehlar
4a232f88d0 ikev2: fix leaking pending INIT requests
.. when associated profile is deleted.

Type: fix

Change-Id: Ib05831d79b3b58664ee0a930960513fd465373bf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 6614df53509030f1c3faf52512bcd8a9851dec5c)
2020-10-14 16:08:59 +00:00
Filip Tehlar
94f5335efb ikev2: fix issue when decrypting packet with no keys
Type: fix

Change-Id: I0e615d5089587992012a0f280ee902b2906f21c2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-10-14 15:13:40 +00:00
Chuan Han
93a786b4d7 build: fix build for debian testing
1. add libelf-dev to default deb deps
2. Also use libffi7 instead of libffi6 for debian-testing

Type: fix

Signed-off-by: Chuan Han <chuan.han.comm@gmail.com>
Change-Id: I9f13955812877422ecb8aac3dd34c5828b9c4607
2020-10-02 10:38:39 -07:00
Andrew Yourtchenko
072def4738 build: fix the version in 'show version' for RPM
The RPM build ends up with "vXX.YY" to vstring,
which is not what we'd expect - so fix it up.

Change-Id: I0af68e69b1e40fc49ade759bb2f0ed9f47614217
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-09-30 23:58:50 +00:00
Andrew Yourtchenko
3c5414029b misc: 20.09 Release Notes
Type: docs
Change-Id: I1b12f1d14a1a68504767c01ceac0eed115fb7ba6
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2020-09-30 16:50:44 +00:00
Mohsin Kazmi
8eb1e6d1f0 virtio: fix modern device queue notify
QUEUE_SELECT and QUEUE_NOTIFY_OFF registers are shared between all
workers operating on the same device and operations are not atomic

Type: fix

Change-Id: Ie017b1bfc7e3b6b4e59029f45db78eeffd9f3aeb
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 162a296756f3dbead55079e4670973d859df1ef9)
2020-09-30 11:31:26 +00:00
Benoît Ganne
47e0bd7303 virtio: fix txq locking
Initialize txq lock only if some txq are shared and check if another
worker is already operating on the txq before processing gro timeouts
in input node.

Type: fix

Change-Id: I89dab6c0e6eb6a7aa621fa1548b0a2c76e6c7581
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit b6b484d01adb8ab2ef5a50d5a3d6f3f097df2e0c)
2020-09-30 11:31:13 +00:00
Vladimir Isaev
ddb070e8b1 tap: do not use strlen on vector
sanitizer complains about strlen on hi->name in tap_dump_ifs.
hi->name is a vector which is not null-terminated, so use vec_len.

Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: Icdd5f65369bb51b0c4a9cd86c24899e6febd837c
(cherry picked from commit 84f3d9fba4e1715237a41f0978430193363187c7)
2020-09-30 11:30:55 +00:00
Mohsin Kazmi
36e657032c virtio: fix the gro enable/disable on tx-vrings
Type: fix

Change-Id: I96c30baaf34fe7b0cd899966a507501e58cde934
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 1017a1d360cc1c38e2aee4b5f19ff1f2869a8cd9)
2020-09-30 11:30:25 +00:00
Filip Tehlar
c6f50a3e3e ikev2: fix false positive NAT detection
Type: fix

Change-Id: Id7f865f537c55d00a784eec51624ba28e903a083
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-09-30 11:30:08 +00:00
Benoît Ganne
db17fa2fb8 ikev2: fix memory leaks
Type: fix

Change-Id: I5be19a4923b37e2636621d36155178ac348ee41c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit a8af7cf253c4e8ab9ba1a2cfed50f6236fea3a62)
2020-09-29 17:23:26 +00:00
Dave Wallace
6cb106314b build: remove OS distros which are EOL
Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: If80ff6bfbd42779a663af1e7dcfff80d75f47f1e
2020-09-28 23:06:27 +00:00
Andrew Yourtchenko
29fd163e1c dpdk: Revert "call the meson-based build instead of Makefiles"
This reverts commit 73903d7e8a6141237637b2011386c7ee6ac969ee.

After discussion with Damjan, the change is more risky than it seemed,
so revert.

Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Idee82806cd4a12a92540f904397d259b531770d1
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-09-28 12:18:58 +00:00
Andrew Yourtchenko
a0b1329aa6 dpdk: Revert "prevent linking dpdk against libbsd"
This reverts commit 7a7601795171665eb71461c705f3fbb4b6c6f1ad.

After discussion with Damjan, the change is more risky than it seemed,
so revert.

Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I67defb01a0bebb8ff4231c27690b694f608fcb8e
2020-09-28 12:16:52 +00:00
Andrew Yourtchenko
c7b359ff53 misc: documentation fixes
Change-Id: Id7ae7bbc53e89777892b973008baa93f1a083aac
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-09-25 17:41:29 +00:00
Klement Sekera
a26b40af90 bfd: add missing unlock
Thanks to Martin Sustrik for spotting the bug introduced by a316744
and submitting the fix.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I4984fc32503b0c7b6db3543834dfbbfed2a1f23c
2020-09-25 13:31:26 +00:00
Florin Coras
df143bf705 wireguard: fix uninitialized peer index in handoff
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I41513b9aa6ca0db1fb9392a15e5ac329a635ebfa
2020-09-24 17:19:12 -07:00
Artem Glazychev
48d81b58df wireguard: add handoff node
All timer and control plane functions happen from main thread

Type: fix

Change-Id: I4fc333c644485cd17e6f426493feef91688d9b24
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
(cherry picked from commit 8eb69407c8075e101b773d5a27ea21bd3fc906d7)
2020-09-24 18:54:26 +00:00
Dave Wallace
c359dfa186 build: fix missing openssl package on debian-10
- libssl-dev missing on debian-10 breaks
  'make install-ext-deps'

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Ib6a6f120147e8ae0dcfead6fae9f0a7a3434d687
(cherry picked from commit 17569cbeb25c7eba9cd818bea98448b11b05532c)
2020-09-24 14:27:09 +00:00
Damjan Marion
dccf863d79 vppinfra: allow handoff to main thread
Type: improvement
Change-Id: If2e907967c9b75997b581ff0c058bd5c15e823f5
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit f6e6c788070e1421bbe7b10d449d9b65918ba561)
2020-09-24 12:15:52 +00:00
Steven Luong
cc4f3d9102 avf: wrong argument passed to avf_log_err
Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ica4601c9d17e182cbc348989a9f75ab1cb18b78a
(cherry picked from commit ba3a20082d8e17388bfeca6c2b422e3a11a4eb69)
2020-09-23 20:52:16 +00:00
Dave Wallace
ef73a0725d build: fix fts.py to run on debian-9/python3.5
Type: fix

Change-Id: I1404e73dd2ee62b51746e9f4760c7c3ca3b5989e
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit a079844cf01eea8a7085c2c03226ceb3d942838a)
2020-09-23 18:05:23 +00:00
Mohammed Hawari
7a76017951 dpdk: prevent linking dpdk against libbsd
If libbsd is detected by the DPDK build system, DPDK does not provide
implementations for strlcpy and dynamically link against the one
provided by libbsd. When the DPDK plugin is loaded by VPP, a crash
occurs because libbsd is not loaded by VPP.

Type: fix
Change-Id: Ib691bbe27edcf0f6f0a3d39952e439027cef72cb
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
(cherry picked from commit 1f799bc3cb7a3826395e544cafe587174393e2f0)
2020-09-23 18:04:41 +00:00
Andrew Yourtchenko
226e8e65bc vppapigen: crcchecker: harmonize the in_progress marking
The format for deprecation is "option deprecated" now,
so harmonize the in-progress marking to logically be
"option in_progress"

At the same time recognize the legacy/erroneous
types of marking, print the warning.

Change-Id: If418dfadd69ffb112550164d63d13420e51cefd7
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 6a3d4cc9a11efbe73a1cda35a64c619eebde0b24)
2020-09-23 15:21:58 +00:00
Andrew Yourtchenko
1aa63b83f9 build: allow for rc3/rc4 style tags
Historically, there was only rc1/rc2 tags, fix in case we tag
rc3/rc4 during longer release windows.

Type: fix
Change-Id: I4243a1c03663a877f96a06d647e89adb74abd977
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit bc31247c921d9bad94f2d4aeca9041aee518e7a6)
2020-09-23 15:20:53 +00:00
Mohammed Hawari
73903d7e8a dpdk: call the meson-based build instead of Makefiles
Type: feature
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Change-Id: I576d92605da6d43e9b9f12238b18a518a0d69385
(cherry picked from commit 4c4633cad1019d9aa28669ddfedc612f768d71a8)
2020-09-23 13:57:07 +00:00
Neale Ranns
f72b1aff7d vxlan-gbp: Mark APIs as in-progress
Type: fix

The GBP plugin that uses this module is also in-ptogress, hence so is
this module.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I3cb5dd124afac05da013d92d67b2abf6cdf9b769
(cherry picked from commit b468773aa4164bf52e0751fdf780f67248037cc0)
2020-09-23 12:54:48 +00:00
Yulong Pei
d69b12a7bf crypto: revert crypto set handler all API
This reverts commit 8c91b2ae2b32d428ef35605707788fe064621cb3,
but keep a comment fix.

Type: fix

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: Ia66941bf18d3efac96f41bdf905d877cfb3ab211
(cherry picked from commit 6816c3b3df8c91a319cca56784dca07f842ef178)
2020-09-22 13:33:56 +00:00
Dave Wallace
d88c9a13e8 build: remove opensuse build infra
- VPP on opensuse has not been supported
  for several releases.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I2b5316ad5c20a843b8936f4ceb473f932a5338d9
(cherry picked from commit bc35f469c89daf0126937580b6972516b5007d3a)
2020-09-22 11:35:12 +00:00
Dave Wallace
dd49451845 build: missing deb pkg on ubuntu-20.04
- The vpp build on the ubuntu-20.04 executor failed
  due to the package 'dh-python' not getting
  installed by 'make install-dep'

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Id9307ad1b4e34c413d90258c6bde2aa5afafec63
(cherry picked from commit 5cc11b1210910d6e56025d87688a52111f730469)
2020-09-22 11:34:54 +00:00
Dave Wallace
ef51f3696e build: touch files when extracting rpm tarballs
Type: fix

- Long story short, intermittently centos jobs have been
  failing with clock skew issues. When someone commits a
  patch on a machine with the date ahead of UTC, then clock
  skew will be encountered when extracting the RPM source
  tarball. See [0] and [1] for details.

- Replace 'make bootstrap' with 'make install-dep' in
  RPM package build specfile.

[0] https://unix.stackexchange.com/questions/164807/does-git-archive-use-the-wrong-file-timestamp
[1] https://git.fd.io/vpp/tree/Makefile#n380

Change-Id: Iebfb9eb2e26c1f2e4488e871da86d0c60b9f4048
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 27b50fea143f2d45613ef982870cd2052e21fb0f)
2020-09-22 11:33:28 +00:00
Steven Luong
56eed87058 vmxnet3: gso fixes
outbound:
wrong header len computation
gso size and header length need to be set in the first segment of the
chain

inbound:
EOP may have zero length descriptor to terminate the chain
missing endian conversion for ethertype

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Iaa003c0e9af3ead4df6c6c0d5772a179d2ff15c4
(cherry picked from commit 007abe751f2ee86528d0ccc005a3da1c90850868)
2020-09-16 17:03:13 +00:00
Andrew Yourtchenko
a87deb77da vppapigen: crcchecker: report in-progress messages
in-progress messages do not give any API stability guarantees,
by design, to allow easy iteration. Provide an easy way
to know which messages are in-progress.

If as a user you see "in-progress" message that you want
to use in production, please contact the feature owner
and discuss the path to removing the "in-progress" status
before that.

Change-Id: I27729995e26a70af373e642b871dbb5cc5526959
Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 8b0cd69d31a50e7f4a454d45e903c6cdaf23fbfe)
2020-09-16 15:53:00 +00:00
Yulong Pei
4035daffd5 crypto: Crypto set handler API to support set all as CLI
Type: improvement

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: I43556f8c76c7aae64d9c927e1fda3c1774d7e49d
(cherry picked from commit 8c91b2ae2b32d428ef35605707788fe064621cb3)
2020-09-16 15:13:56 +00:00
Damjan Marion
fb66fcf3fb avf: change promisc mode from the avf process node
Avoid situations where promisc mode is chaged while avf process
is suspended in the middle of adminq operation.

Type: fix
Change-Id: Ia1fc6551e83218b5938630ad3a15d4f3f0ceceff
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 160a2a9a8c5c4e054dcc0e8ebeb3de7654718582)
2020-09-16 12:45:49 +00:00
Damjan Marion
4b952f85bd avf: fix race between avf and cli/api process
device pool my grow during suspemd which will cause crash in avf process
after it exits from suspend.

Type: fix

Change-Id: I51fec90088c909cfbaaca6c245272a28c0827ca0
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 171d6aceb039a7f0b0d67c837ff74359dae01ae4)
2020-09-16 12:45:16 +00:00
Ole Troan
00f21fb2fe api: clean up use of deprecated flag
The syntax of the deprecated flag has evolved.
Clean up usage to be "option deprecated;".

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: If2b639f275eb8db58b36c457f9245fe35a4d8cb1
(cherry picked from commit f916414b383afd37ec78509ee613df8878160406)
2020-09-16 12:22:27 +00:00
Andrew Yourtchenko
ec7e8d8598 vppapigen: crcchecker: report deprecated messages
Report if the messages were marked as deprecated,
but not yet deleted.

Useful for building the release notes and comparing
between the releases.

Also, put the dict_compare() call into the report(),
since latter always consumes the output of the former.

Change-Id: Iceab3e94ff66da931a4669b612026bd162dd5d1a
Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 62bd50de97cd90cc09559a09fe46f98211279a1e)
2020-09-16 11:24:38 +00:00
Damjan Marion
97109b1ad8 avf: add assert to ensure that adminq is used only from avf process
Type: improvement
Change-Id: Ib64c9b8207776986656e5a26c13a221edc6cc950
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 698eeb126d01427313949241b961c27347db8c72)
2020-09-16 11:14:42 +00:00
Neale Ranns
6efd393965 wireguard: Fix for tunnel encap
Type: fix

add UT for sneding handshale init and transport packets

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Iab1ed8864c666d5a0ae0b2364a9ca4de3c8770dc
(cherry picked from commit d75a2d12c431fcffba2a2b4d59f18c9cec483ed9)
2020-09-16 11:03:59 +00:00
Onong Tayeng
21cbdc75f2 lisp: fix vat crash with one_add_del_local_eid api
VAT crashes when the one_add_del_local_eid api is invoked with mac
address as eid.

Type: fix

Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: I29e246f6cad4b350fec52d54e94dbed586d488c4
(cherry picked from commit 5f473c0efc9e0ff068273520b058b8ac498dc597)
2020-09-16 10:33:48 +00:00
Onong Tayeng
a14f367e27 lisp: fix help msg of show eid-table command
The lisp|one show eid-table command's help msg does not display the
available options. This patch fixes that.

  show lisp eid-table [local|remote|eid <eid>]
  show one eid-table [local|remote|eid <eid>]

Type: fix

Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: Id39148db2ff291a7fe859830c1488b69ccd15c05
(cherry picked from commit b418c397dc8c870c6561ea1d7565067333db9df4)
2020-09-16 10:32:48 +00:00
Onong Tayeng
c669272949 lisp: fix spelling mistake in option name
In the vat help msg for one_add_del_l2_arp_entry the IP address option
is misspelled as "ip4 <ip4>" when it should have been "ip <ip4>".

Type: fix
Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: Id4058a3ddfdb78b840d7e5a3c330e67b393f5d3b
(cherry picked from commit 8c6ba2957c985a1670e9fca6bc869008e6722364)
2020-09-16 10:32:37 +00:00
Onong Tayeng
d5f713ce60 lisp: fix lisp|one_eid_table_dump's local|remote options in vat
The local|remote options to vat's lisp|one_eid_table_dump api command
does not print the eid details instead it produces the following error
messages:

    Filter error, unknown filter: 1
    Filter error, unknown filter: 2

Type: fix
Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: I000c290b400dbf39bd883d57115923167092c9bd
(cherry picked from commit 2237cc8ce1e0eb7222a34bb30bdeb2f3f1df9a81)
2020-09-16 10:32:29 +00:00
Damjan Marion
2ee0098dee avf: fix race between avf process node and avf_delete_if(...)
It may happen that process node is suspended while it waits for response
from adminq and during that time CLI or API process can call
avf_delete_if. When avf process node resumes, it may happen that device
is not there anymeore.

This patch delegates interface deletion to process node, so CLI/API
process just sends signal instead of deleting device instance itself.

Type: fix

Change-Id: I7f12e12df3071650f6e60ad7eb5af23b7acfe335
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 66bb7dd64ee2377103e18b96f1e6bf6405de44b5)
2020-09-16 10:15:52 +00:00
Vladimir Isaev
95a77a2360 nat: Fix next feature for ED with multiple workers
Multiple (> 1) workers leads to handoff node being enabled.
This node pops next feature index to nat.arc_next to make sure
that packet will be pushed to the next feature in the arc.

But node nat44-ed-in2out-output also pops next feature and changes
arc_next. So actual next feature will be skipped in that case.

It leads to all nat44-ed-in2out packets being dropped if we have
multiple workers (handoff node enabled).

To resolve this a new node was added (nat-pre-in2out-output) to fill
arc_next in single worker case and multiple worker case is already
handled by handoff node.

Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I9dfba68f00164d2d5ab867224871811bef4411ed
(cherry picked from commit 8fb4d10dc208fb3f284fe79e838343797cb2d813)
2020-09-16 10:15:24 +00:00
Filip Varga
1f18c50174 nat: endian mismatch
Type: fix

Change-Id: Icf6ce0ddb5fe9d078503e9d9ff7e7b26423f53f8
Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 2fe25370ba0deed78c1240fa6788c5b5f14d6f97)
2020-09-16 10:15:15 +00:00
Nathan Skrzypczak
6c25154e95 quic: Clean quic_crypto_setup_cipher
Type: fix

Change-Id: I4c19636c2be8a577c6cba272708cb04bcc24785b
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 8847749269ffd591c7fb6c290b4a311f186fb7c5)
2020-09-16 10:14:37 +00:00
Onong Tayeng
7bae4911bf lisp: fix crash with arp and packet trace on
With packet trace on, VPP crashes when an arp packet arrives. This patch
fixes the crash and also ensures that the packet trace displays the eid
info.

Type: fix
Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: Iaad09a5e2b33e931ab9bd7bc3d4573b5ed5e4bfd
(cherry picked from commit a3960a8b74de5cef51db2c7575f8f2d71a013d0a)
2020-09-16 10:14:22 +00:00
Artem Glazychev
911d7563cb wireguard: fix handshake procedure
Type: fix

Change-Id: I96e8c5c9c792b1d9aefd39ce3e240d220827b7d1
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
(cherry picked from commit cf527882e2fe49eda108cd63af175431222beebe)
2020-09-16 09:45:13 +00:00
Neale Ranns
58db34c2ca wireguard: increase FIB source priority
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Icc1c458474d357c7d9b3b4df1897500de0c314a1
(cherry picked from commit a26b0d11e91e9abca6220e50f0240ab6ae09c6d3)
2020-09-16 09:43:21 +00:00
Neale Ranns
c71dad4a2d crypto: Crypto SW Scheduler Coverity Warnings
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I7f98d0c7847ecc40b90b78e5ae83f320575be310
(cherry picked from commit 69f77a3a3cca70876bd27c84b5ae932ca942d8de)
2020-09-15 14:40:10 +00:00
Damjan Marion
ddd8c0fe59 crypto-native: fix issues detected by coiverity
Type: fix
Change-Id: Id61aa407eeeb4d44cf47ed39283a0c79ed3abbee
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 139a6ae0dd460a6b8a5884e65cfd96f0c409f69e)
2020-09-15 11:25:25 +00:00
Yichen Wang
748bf82a50 build: fix the the build on centos/rhel 8
1. Remove uncessary runtime dependency;
2. Add missing build dependency;
3. Fix runtime dependency for api-python3 RPM;

Type: make

Change-Id: I2700f1a15112effba8d1527aca6467158f81f486
Signed-off-by: Yichen Wang <yicwang@cisco.com>
(cherry picked from commit 466872f0896139b34ef8ccf12f7fcc0093d7cb19)
2020-09-15 10:08:53 +00:00
Filip Tehlar
57b16c694c ikev2: fix copy-paste error when freeing memory
Type: fix

Change-Id: If44c807d188b3e88d819f4132d73e6a34402a525
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 999395cd6644a297c01dd6de033cf1ffb4e9951b)
2020-09-15 10:07:50 +00:00
Benoît Ganne
047eebfa97 build: fix build for Debian 9 and Debian 10
Type: fix

Change-Id: Ic07d0ae313b32e420ba93693cb75960a86f752a9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 3f0ae664faf33578515ffa1fd5287ad692f16c6f)
2020-09-15 08:40:06 +00:00
Florin Coras
89bdb836f9 vcl: always fill buffer or drain rx fifo
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibbe438aa6f2fe6d9f55c56ca6d3aec1a29b32cad
(cherry picked from commit 4a2c794c431c72364e241fa14327f03e35b886b7)
2020-09-15 08:39:26 +00:00
Neale Ranns
ec8a577ed9 wireguard: coverity fixes
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ib1eabbc87a573c660ac251602d631f167928259b
(cherry picked from commit 76770fd659420c23e43422d672a55e268f042129)
2020-09-15 08:39:03 +00:00
Benoît Ganne
a238082a8a vlib: fix call to vlib_get_node_by_name
Type: fix

Change-Id: I1b4f52e186165b04db5bd5f11058dc77b647bc94
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 268e3b647733807dbecf402fcebedceff4c85544)
2020-09-15 08:38:32 +00:00
Matthew Smith
649ba152cb l2: fix null deref in l2_to_bvi()
Type: fix

Static analysis identified a possible null pointer dereference. It
was introduced by a recent patch which expanded the DMAC comparison
on inbound packets on a BVI interface to include any secondary MAC
addresses which were added to an interface.

Check if the pointer is null before dereferencing.

Change-Id: Ic2afe2b062eda32977e05bf3f98d82c1fe64620c
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
(cherry picked from commit 78681def21b931309a779dfc6a5cbc6ff8b1f814)
2020-09-15 08:38:11 +00:00
Benoît Ganne
c13aab8ca1 ikev2: fix memory leaks
- make sure everything is freed on cleanup
 - reuse already allocated vectors where possible

Type: fix

Change-Id: Ibd8da1edb37126522dc2d525596521d32dceb73a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 730cec8c0697627cc1fb6a34acd094c77ba07622)
2020-09-15 08:35:37 +00:00
Martin Millnert
cb94290d5f misc: selinux fixes (packet_socket r/w)
vpp-20.05 on up-to-date Centos 7.8 host with enforcing SELinux fails to
create a host-interface due to two missing SELinux-permissions:

vpp_t self:packet_socket { read write }

This simple patch adds these two permissions. Tested successfully on
local installation.

The steps to reproduce:

$ ip link add vpeer-host type veth peer name vpeer-vpp
vpp# create host-interface name vpeer-vpp
create host-interface: Permission denied (errno 13)
[...]
$ semodule -i vpp-packet-socket.pp
vpp# create host-interface name vpeer-vpp
host-vpeer-vpp

Type: fix
Ticket: VPP-1931
Change-Id: I2b3d92b27b9a9f26aa1c85af2946b15e83e27944
Signed-off-by: Martin Millnert <martin@millnert.se>
(cherry picked from commit 68849350c56b0258d21fc906b09df71a1951f694)
2020-09-15 08:35:15 +00:00
Aloys Augustin
6f1a86f187 quic: fix coverity warning
Change-Id: Ic31cde8564a0705710d91e0a7b90dcc6cf2f8db6
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-09-15 08:34:37 +00:00
Mohammed Hawari
758e6776a8 af_xdp: documents incompatibility with 1GB hugepages and high buffers-per-numa.
Type: docs
Change-Id: If8602d4b73cc1f04e42d19b8df60a05f67aa90c9
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
(cherry picked from commit 5d2091da2a96cb1092b0744cdee8bb481788a6dc)
2020-09-15 08:34:05 +00:00
Chenmin Sun
f1b7953449 dpdk: fix coverity defect #214232, #182930
Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ie328834159687cdb4314c37d36697f2fb9081fbd
(cherry picked from commit 504bcb7c29da6ab45656f54cda394cccb0d97dae)
2020-09-12 21:54:43 +00:00
Andrew Yourtchenko
f96ce156b5 misc: edit the MAINTAINERS entries for crypto plugins for common style
Change-Id: Ic40bf11210cf1c36420578281f5a42668bad9801
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit f8b319359cd2a24271dbe7cebfc8a4147ab89727)
2020-09-11 18:07:25 +00:00
Andrew Yourtchenko
fb6d768419 misc: Initial changes for stable/2009 branch
Change-Id: Ibb982c877427c8382a30ee561c23d878adc9c28d
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-09-09 21:54:44 +00:00
177 changed files with 7585 additions and 3227 deletions

1
.gitignore vendored
View File

@ -81,6 +81,7 @@ GTAGS
/build-root/.doxygen-bootstrap.ok
/build-root/.doxygen-siphon.dep
/docs/_build
/docs/dynamic_includes
/sphinx_venv
!/docs/Makefile

View File

@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/2009

View File

@ -200,17 +200,17 @@ I: span
M: N/A
F: src/vnet/span
Crypto native Plugin
Plugin - Crypto - native
I: crypto-native
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/crypto_native/
Crypto openssl Plugin
Plugin - Crypto - OpenSSL
I: crypto-openssl
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/crypto_openssl/
Crypto ipsecmb Plugin
Plugin - Crypto - ipsecmb
I: crypto-ipsecmb
M: Neale Ranns <nranns@cisco.com>
F: src/plugins/crypto_ipsecmb/

View File

@ -55,14 +55,14 @@ endif
ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
PKG=deb
else ifeq ($(filter rhel centos fedora opensuse opensuse-leap opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
else ifeq ($(filter rhel centos fedora,$(OS_ID)),$(OS_ID))
PKG=rpm
endif
# +libganglia1-dev if building the gmond plugin
DEB_DEPENDS = curl build-essential autoconf automake ccache
DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-systemd
DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-systemd dh-python
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
DEB_DEPENDS += lcov chrpath autoconf indent clang-format libnuma-dev
DEB_DEPENDS += python3-all python3-setuptools check
@ -72,7 +72,7 @@ DEB_DEPENDS += python3-venv # ensurepip
DEB_DEPENDS += python3-dev # needed for python3 -m pip install psutil
# python3.6 on 16.04 requires python36-dev
LIBFFI=libffi6 # works on all but 20.04
LIBFFI=libffi6 # works on all but 20.04 and debian-testing
ifeq ($(OS_VERSION_ID),18.04)
DEB_DEPENDS += python-dev python-all python-pip python-virtualenv
@ -83,16 +83,17 @@ else ifeq ($(OS_VERSION_ID),20.04)
DEB_DEPENDS += libssl-dev
DEB_DEPENDS += libelf-dev # for libbpf (af_xdp)
LIBFFI=libffi7
else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
DEB_DEPENDS += libssl-dev
DEB_DEPENDS += python-dev python-all python-pip python-virtualenv
APT_ARGS = -t jessie-backports
else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-9)
DEB_DEPENDS += libssl1.0-dev
DEB_DEPENDS += python-all python-pip
DEB_DEPENDS += python-dev python-all python-pip python-virtualenv
else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-10)
DEB_DEPENDS += libssl-dev
DEB_DEPENDS += libelf-dev # for libbpf (af_xdp)
else
DEB_DEPENDS += libssl-dev
DEB_DEPENDS += libelf-dev # for libbpf (af_xdp)
LIBFFI=libffi7
endif
DEB_DEPENDS += $(LIBFFI)
@ -108,6 +109,7 @@ RPM_DEPENDS += libuuid-devel
RPM_DEPENDS += mbedtls-devel
RPM_DEPENDS += ccache
RPM_DEPENDS += xmlto
RPM_DEPENDS += elfutils-libelf-devel
ifeq ($(OS_ID),fedora)
RPM_DEPENDS += dnf-utils
@ -120,7 +122,7 @@ ifeq ($(OS_ID),fedora)
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
RPM_DEPENDS += yum-utils
RPM_DEPENDS += compat-openssl10
RPM_DEPENDS += compat-openssl10 openssl-devel
RPM_DEPENDS += python2-devel python36-devel python3-ply
RPM_DEPENDS += python3-virtualenv python3-jsonschema
RPM_DEPENDS += cmake
@ -144,42 +146,6 @@ RPM_DEPENDS_DEBUG = glibc-debuginfo e2fsprogs-debuginfo
RPM_DEPENDS_DEBUG += krb5-debuginfo openssl-debuginfo
RPM_DEPENDS_DEBUG += zlib-debuginfo nss-softokn-debuginfo
RPM_DEPENDS_DEBUG += yum-plugin-auto-update-debug-info
# lowercase- replace spaces with dashes.
SUSE_NAME= $(shell grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | sed -e 's/ /-/' | awk '{print tolower($$0)}')
SUSE_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake ccache check-devel chrpath
RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python3-ply
RPM_SUSE_DEVEL_DEPS = glibc-devel-static libnuma-devel
RPM_SUSE_DEVEL_DEPS += libopenssl-devel openssl-devel mbedtls-devel libuuid-devel
RPM_SUSE_PYTHON_DEPS = python-devel python3-devel python-pip python3-pip
RPM_SUSE_PYTHON_DEPS += python-rpm-macros python3-rpm-macros
RPM_SUSE_PLATFORM_DEPS = distribution-release shadow rpm-build
ifeq ($(OS_ID),opensuse)
ifeq ($(SUSE_NAME),tumbleweed)
RPM_SUSE_DEVEL_DEPS = libboost_headers1_68_0-devel-1.68.0 libboost_thread1_68_0-devel-1.68.0 gcc
RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
endif
ifeq ($(SUSE_ID),15.0)
RPM_SUSE_DEVEL_DEPS += libboost_headers-devel libboost_thread-devel gcc
RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
else
RPM_SUSE_DEVEL_DEPS += libboost_headers1_68_0-devel-1.68.0 gcc6
RPM_SUSE_PYTHON_DEPS += python-virtualenv
endif
endif
ifeq ($(OS_ID),opensuse-leap)
ifeq ($(SUSE_ID),15.0)
RPM_SUSE_DEVEL_DEPS += libboost_headers-devel libboost_thread-devel gcc git curl
RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
endif
endif
RPM_SUSE_DEPENDS += $(RPM_SUSE_BUILDTOOLS_DEPS) $(RPM_SUSE_DEVEL_DEPS) $(RPM_SUSE_PYTHON_DEPS) $(RPM_SUSE_PLATFORM_DEPS)
ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
@ -310,13 +276,6 @@ bootstrap:
.PHONY: install-dep
install-dep:
ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
ifeq ($(OS_VERSION_ID),14.04)
@sudo -E apt-get $(CONFIRM) $(FORCE) install software-properties-common
endif
ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
@grep -q jessie-backports /etc/apt/sources.list /etc/apt/sources.list.d/* 2> /dev/null \
|| ( echo "Please install jessie-backports" ; exit 1 )
endif
@sudo -E apt-get update
@sudo -E apt-get $(APT_ARGS) $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
else ifneq ("$(wildcard /etc/redhat-release)","")
@ -326,8 +285,9 @@ ifeq ($(OS_ID),rhel)
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
@sudo -E dnf install $(CONFIRM) epel-release
@sudo -E dnf config-manager --set-enabled PowerTools
@sudo -E dnf install $(CONFIRM) dnf-plugins-core epel-release
@sudo -E dnf config-manager --set-enabled \
$(shell dnf repolist all 2>/dev/null|grep -i powertools|cut -d' ' -f1)
@sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
@sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
else ifeq ($(OS_ID),centos)
@ -340,17 +300,8 @@ else ifeq ($(OS_ID),fedora)
@sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
endif
else ifeq ($(filter opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
@sudo -E zypper refresh
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
else ifeq ($(filter opensuse-leap,$(OS_ID)),$(OS_ID))
@sudo -E zypper refresh
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
@sudo -E zypper refresh
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
else
$(error "This option currently works only on Ubuntu, Debian, RHEL, CentOS or openSUSE systems")
$(error "This option currently works only on Ubuntu, Debian, RHEL, or CentOS systems")
endif
git config commit.template .git_commit_template.txt

File diff suppressed because it is too large Load Diff

View File

@ -79,7 +79,7 @@ $(B)/.$1.patch.ok: $(B)/.$1.extract.ok
ifneq ($$(wildcard $$($1_patch_dir)/*.patch),)
@for f in $$($1_patch_dir)/*.patch ; do \
echo "Applying patch: $$$$(basename $$$$f)" ; \
patch -p1 -d $$($1_src_dir) < $$$$f ; \
patch -p1 -d $$($1_src_dir) --no-backup-if-mismatch < $$$$f ; \
done
endif
@touch $$@

View File

@ -27,8 +27,10 @@ else
LIBBPF_CFLAGS+= -O2
endif
IF_XDP:=$(shell echo "\#include <linux/if_xdp.h>" | $(CC) -E -xc - > /dev/null 2>&1)
IF_XDP:=$(.SHELLSTATUS)
# check for libelf, zlib and kernel if_xdp.h presence
LIBBPF_DEPS_CHECK:="\#include <linux/if_xdp.h>\\n\#include <gelf.h>\\n\#include <zlib.h>\\nint main(void){return 0;}"
LIBBPF_DEPS_CHECK:=$(shell echo -e $(LIBBPF_DEPS_CHECK) | $(CC) -xc -lelf -lz -o /dev/null - > /dev/null 2>&1)
LIBBPF_DEPS_CHECK:=$(.SHELLSTATUS)
define libbpf_config_cmds
@true
@ -46,8 +48,8 @@ define libbpf_install_cmds
$(call libbpf_build_cmds__,install,$(libbpf_install_log))
endef
ifneq ($(IF_XDP),0)
$(warning "linux/if_xdp.h was not found on this system. libbpf will be skipped.")
ifneq ($(LIBBPF_DEPS_CHECK),0)
$(warning "Missing libbpf dependencies. libbpf will be skipped.")
libbpf-install:
@true
else

View File

@ -24,7 +24,7 @@ for release tag “v2.2.0” and will create a branch named “two_dot_two”.
5. Create the patch files with format-patch. This creates all the patch files
for your branch (two_dot_two), with your latest commits as the last ones.
# git format-patch master..two_dot_two
# git format-patch main..two_dot_two
6. Copy, add and commit the new patches into the patches directory.

View File

@ -0,0 +1,232 @@
From bd048f56bc4b85fed31f34db676f1ad67c86bd16 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Mon, 19 Apr 2021 03:05:39 +0000
Subject: [PATCH] net/iavf: deprecate i40evf pmd
The i40evf PMD will be deprecated, iavf will be the only VF driver for
Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:
Step 1: iavf will be the default VF driver, while i40evf still can be
selected by devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf
Step 2: i40evf and related devarg are removed, this will happen at DPDK
21.11
Between step 1 and step 2, no new feature will be added into i40evf except
bug fix.
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
doc/guides/nics/intel_vf.rst | 6 +++
doc/guides/rel_notes/deprecation.rst | 8 ++++
drivers/common/iavf/iavf_devids.h | 2 +
drivers/net/i40e/i40e_ethdev_vf.c | 45 ++++++++++++++++++++++
drivers/net/iavf/iavf_ethdev.c | 57 +++++++++++++++++++++++++++-
5 files changed, 116 insertions(+), 2 deletions(-)
diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst
index ade5152595..b95200698d 100644
--- a/doc/guides/nics/intel_vf.rst
+++ b/doc/guides/nics/intel_vf.rst
@@ -88,6 +88,12 @@ For more detail on SR-IOV, please refer to the following documents:
assignment in hypervisor. Take qemu for example, the device assignment should carry the IAVF device id (0x1889) like
``-device vfio-pci,x-pci-device-id=0x1889,host=03:0a.0``.
+ Starting from DPDK 21.05, the default VF driver for Intel® 700 Series Ethernet Controller will be IAVF. No new feature
+ will be added into i40evf except bug fix until it's removed in DPDK 21.11. Between DPDK 21.05 and 21.11, by using the
+ ``devargs`` option ``driver=i40evf``, i40evf PMD still can be used on Intel® 700 Series Ethernet Controller, for example::
+
+ -a 81:02.0,driver=i40evf
+
The PCIE host-interface of Intel Ethernet Switch FM10000 Series VF infrastructure
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index c2770feeae..25caf4e52d 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -335,3 +335,11 @@ Deprecation Notices
``make``. Given environments are too much variables for such a simple script,
it will be removed in DPDK 20.11.
Some useful parts may be converted into specific scripts.
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them are
+ duplicated. And now more and more advanced features are developed on iavf.
+ To keep consistent with kernel driver's name
+ (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to maintain.
+ Starting from 21.05, the default VF driver of i40e will be iavf, but i40evf
+ can still be used if users specify the devarg "driver=i40evf". I40evf will
+ be deleted in DPDK 21.11.
diff --git a/drivers/common/iavf/iavf_devids.h b/drivers/common/iavf/iavf_devids.h
index 2e63aac289..1c3acb586d 100644
--- a/drivers/common/iavf/iavf_devids.h
+++ b/drivers/common/iavf/iavf_devids.h
@@ -13,5 +13,7 @@
#define IAVF_DEV_ID_VF_HV 0x1571
#define IAVF_DEV_ID_ADAPTIVE_VF 0x1889
#define IAVF_DEV_ID_X722_VF 0x37CD
+#define IAVF_DEV_ID_X722_A0_VF 0x374D
+
#endif /* _IAVF_DEVIDS_H_ */
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 69cab8e739..3d61c092d8 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1592,9 +1592,53 @@ i40evf_dev_uninit(struct rte_eth_dev *eth_dev)
return 0;
}
+static int
+i40evf_check_driver_handler(__rte_unused const char *key,
+ const char *value, __rte_unused void *opaque)
+{
+ if (strcmp(value, "i40evf"))
+ return -1;
+
+ return 0;
+}
+
+static int
+i40evf_driver_selected(struct rte_devargs *devargs)
+{
+ struct rte_kvargs *kvlist;
+ const char *key = "driver";
+ int ret = 0;
+
+ if (devargs == NULL)
+ return 0;
+
+ kvlist = rte_kvargs_parse(devargs->args, NULL);
+ if (kvlist == NULL)
+ return 0;
+
+ if (!rte_kvargs_count(kvlist, key))
+ goto exit;
+
+ /* i40evf driver selected when there's a key-value pair:
+ * driver=i40evf
+ */
+ if (rte_kvargs_process(kvlist, key,
+ i40evf_check_driver_handler, NULL) < 0)
+ goto exit;
+
+ ret = 1;
+
+exit:
+ rte_kvargs_free(kvlist);
+ return ret;
+}
+
static int eth_i40evf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
struct rte_pci_device *pci_dev)
{
+ if (!i40evf_driver_selected(pci_dev->device.devargs))
+ return 1;
+
return rte_eth_dev_pci_generic_probe(pci_dev,
sizeof(struct i40e_adapter), i40evf_dev_init);
}
@@ -1617,6 +1661,7 @@ static struct rte_pci_driver rte_i40evf_pmd = {
RTE_PMD_REGISTER_PCI(net_i40e_vf, rte_i40evf_pmd);
RTE_PMD_REGISTER_PCI_TABLE(net_i40e_vf, pci_id_i40evf_map);
RTE_PMD_REGISTER_KMOD_DEP(net_i40e_vf, "* igb_uio | vfio-pci");
+RTE_PMD_REGISTER_PARAM_STRING(net_i40e_vf, "driver=i40evf");
static int
i40evf_dev_configure(struct rte_eth_dev *dev)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index c3aa4cd725..f22c3ccdb9 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -76,6 +76,10 @@ static int iavf_dev_filter_ctrl(struct rte_eth_dev *dev,
static const struct rte_pci_id pci_id_iavf_map[] = {
{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) },
+ { RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },
+ { RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF_HV) },
+ { RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_VF) },
+ { RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_A0_VF) },
{ .vendor_id = 0, /* sentinel */ },
};
@@ -1516,10 +1520,59 @@ iavf_dcf_cap_selected(struct rte_devargs *devargs)
return ret;
}
+static int
+iavf_drv_i40evf_check_handler(__rte_unused const char *key,
+ const char *value, __rte_unused void *opaque)
+{
+ if (strcmp(value, "i40evf"))
+ return -1;
+
+ return 0;
+}
+
+static int
+iavf_drv_i40evf_selected(struct rte_devargs *devargs, uint16_t device_id)
+{
+ struct rte_kvargs *kvlist;
+ const char *key = "driver";
+ int ret = 0;
+
+ if (device_id != IAVF_DEV_ID_VF &&
+ device_id != IAVF_DEV_ID_VF_HV &&
+ device_id != IAVF_DEV_ID_X722_VF &&
+ device_id != IAVF_DEV_ID_X722_A0_VF)
+ return 0;
+
+ if (devargs == NULL)
+ return 0;
+
+ kvlist = rte_kvargs_parse(devargs->args, NULL);
+ if (kvlist == NULL)
+ return 0;
+
+ if (!rte_kvargs_count(kvlist, key))
+ goto exit;
+
+ /* i40evf driver selected when there's a key-value pair:
+ * driver=i40evf
+ */
+ if (rte_kvargs_process(kvlist, key,
+ iavf_drv_i40evf_check_handler, NULL) < 0)
+ goto exit;
+
+ ret = 1;
+
+exit:
+ rte_kvargs_free(kvlist);
+ return ret;
+}
+
static int eth_iavf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
struct rte_pci_device *pci_dev)
{
- if (iavf_dcf_cap_selected(pci_dev->device.devargs))
+ if (iavf_dcf_cap_selected(pci_dev->device.devargs) ||
+ iavf_drv_i40evf_selected(pci_dev->device.devargs,
+ pci_dev->id.device_id))
return 1;
return rte_eth_dev_pci_generic_probe(pci_dev,
@@ -1542,7 +1595,7 @@ static struct rte_pci_driver rte_iavf_pmd = {
RTE_PMD_REGISTER_PCI(net_iavf, rte_iavf_pmd);
RTE_PMD_REGISTER_PCI_TABLE(net_iavf, pci_id_iavf_map);
RTE_PMD_REGISTER_KMOD_DEP(net_iavf, "* igb_uio | vfio-pci");
-RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf");
+RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf driver=i40evf");
RTE_LOG_REGISTER(iavf_logtype_init, pmd.net.iavf.init, NOTICE);
RTE_LOG_REGISTER(iavf_logtype_driver, pmd.net.iavf.driver, NOTICE);
#ifdef RTE_LIBRTE_IAVF_DEBUG_RX
--
2.20.1

View File

@ -0,0 +1,212 @@
From 858b4575513fe72dce95370944b0da237b755204 Mon Sep 17 00:00:00 2001
From: Dave Wallace <dwallacelf@gmail.com>
Date: Thu, 15 Oct 2020 15:22:22 -0400
Subject: [PATCH] backport dpdk usertools support python 3 only
Applicable usertools section of DPDK patch:
http://git.dpdk.org/dpdk/commit/?id=3f6f83626cf4967a99382a6518a614a1bf3d2c20
Required to avoid build failure of 'make install-ext-deps' on CentOS-8 due
to brp-mangle-shebangs failing on un-versioned python shebang (e.g.
'#! /usr/bin/env python'.
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
---
usertools/cpu_layout.py | 15 ++-------------
usertools/dpdk-devbind.py | 22 ++++------------------
usertools/dpdk-pmdinfo.py | 7 +------
usertools/dpdk-telemetry-client.py | 18 +++---------------
usertools/dpdk-telemetry.py | 2 +-
5 files changed, 11 insertions(+), 53 deletions(-)
diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py
index 5423c7965..cc3963821 100755
--- a/usertools/cpu_layout.py
+++ b/usertools/cpu_layout.py
@@ -1,19 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
# Copyright(c) 2017 Cavium, Inc. All rights reserved.
-from __future__ import print_function
-import sys
-try:
- xrange # Python 2
-except NameError:
- xrange = range # Python 3
-
-if sys.version_info.major < 3:
- print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
- print("Please use Python 3 instead", file=sys.stderr)
-
sockets = []
cores = []
core_map = {}
@@ -21,7 +10,7 @@
fd = open("{}/kernel_max".format(base_path))
max_cpus = int(fd.read())
fd.close()
-for cpu in xrange(max_cpus + 1):
+for cpu in range(max_cpus + 1):
try:
fd = open("{}/cpu{}/topology/core_id".format(base_path, cpu))
except IOError:
diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index 094c2ffc8..8278a748d 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
#
-from __future__ import print_function
import sys
import os
import getopt
@@ -12,10 +11,6 @@
from os.path import exists, abspath, dirname, basename
from os.path import join as path_join
-if sys.version_info.major < 3:
- print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
- print("Please use Python 3 instead", file=sys.stderr)
-
# The PCI base class for all devices
network_class = {'Class': '02', 'Vendor': None, 'Device': None,
'SVendor': None, 'SDevice': None}
@@ -154,14 +149,6 @@ def usage():
""" % locals()) # replace items from local variables
-
-# This is roughly compatible with check_output function in subprocess module
-# which is only available in python 2.7.
-def check_output(args, stderr=None):
- '''Run a command and capture its output'''
- return subprocess.Popen(args, stdout=subprocess.PIPE,
- stderr=stderr).communicate()[0]
-
# check if a specific kernel module is loaded
def module_is_loaded(module):
global loaded_modules
@@ -218,8 +205,7 @@ def get_pci_device_details(dev_id, probe_lspci):
device = {}
if probe_lspci:
- extra_info = check_output(["lspci", "-vmmks", dev_id]).splitlines()
-
+ extra_info = subprocess.check_output(["lspci", "-vmmks", dev_id]).splitlines()
# parse lspci details
for line in extra_info:
if len(line) == 0:
@@ -255,7 +241,7 @@ def get_device_details(devices_type):
# first loop through and read details for all devices
# request machine readable format, with numeric IDs and String
dev = {}
- dev_lines = check_output(["lspci", "-Dvmmnnk"]).splitlines()
+ dev_lines = subprocess.check_output(["lspci", "-Dvmmnnk"]).splitlines()
for dev_line in dev_lines:
if len(dev_line) == 0:
if device_type_match(dev, devices_type):
@@ -283,7 +269,7 @@ def get_device_details(devices_type):
# check what is the interface if any for an ssh connection if
# any to this host, so we can mark it later.
ssh_if = []
- route = check_output(["ip", "-o", "route"])
+ route = subprocess.check_output(["ip", "-o", "route"])
# filter out all lines for 169.254 routes
route = "\n".join(filter(lambda ln: not ln.startswith("169.254"),
route.decode().splitlines()))
diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
index f9ed75517..166198279 100755
--- a/usertools/dpdk-pmdinfo.py
+++ b/usertools/dpdk-pmdinfo.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2016 Neil Horman <nhorman@tuxdriver.com>
@@ -7,8 +7,6 @@
# Utility to dump PMD_INFO_STRING support from an object file
#
# -------------------------------------------------------------------------
-from __future__ import print_function
-from __future__ import unicode_literals
import json
import io
import os
@@ -28,9 +26,6 @@
pcidb = None
# ===========================================
-if sys.version_info.major < 3:
- print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
- print("Please use Python 3 instead", file=sys.stderr)
class Vendor:
"""
diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py
index 98d28fa89..d8e439027 100755
--- a/usertools/dpdk-telemetry-client.py
+++ b/usertools/dpdk-telemetry-client.py
@@ -1,10 +1,7 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
-from __future__ import print_function
-from __future__ import unicode_literals
-
import socket
import os
import sys
@@ -18,15 +15,6 @@
GLOBAL_METRICS_REQ = "{\"action\":0,\"command\":\"global_stat_values\",\"data\":null}"
DEFAULT_FP = "/var/run/dpdk/default_client"
-try:
- raw_input # Python 2
-except NameError:
- raw_input = input # Python 3
-
-if sys.version_info.major < 3:
- print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
- print("Please use Python 3 instead", file=sys.stderr)
-
class Socket:
def __init__(self):
@@ -86,7 +74,7 @@ def requestMetrics(self): # Requests metrics for given client
def repeatedlyRequestMetrics(self, sleep_time): # Recursively requests metrics for given client
print("\nPlease enter the number of times you'd like to continuously request Metrics:")
- n_requests = int(raw_input("\n:"))
+ n_requests = int(input("\n:"))
print("\033[F") #Removes the user input from screen, cleans it up
print("\033[K")
for i in range(n_requests):
@@ -107,7 +95,7 @@ def interactiveMenu(self, sleep_time): # Creates Interactive menu within the scr
print("[4] Unregister client")
try:
- self.choice = int(raw_input("\n:"))
+ self.choice = int(input("\n:"))
print("\033[F") #Removes the user input for screen, cleans it up
print("\033[K")
if self.choice == 1:
diff --git a/usertools/dpdk-telemetry.py b/usertools/dpdk-telemetry.py
index 8e4039d57..181859658 100755
--- a/usertools/dpdk-telemetry.py
+++ b/usertools/dpdk-telemetry.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python3
+#! /usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2020 Intel Corporation

View File

@ -1,6 +1,10 @@
%define _install_dir /opt/vpp/external/%(uname -m)
%define _make_args -C ../.. BUILD_DIR=%{_topdir}/tmp INSTALL_DIR=%{buildroot}%{_install_dir}
%{!?__python3: %global __python3 /usr/bin/python3}
%global __python %{__python3}
%global _pylib /usr/lib/python3.6/site-packages
Name: vpp-ext-deps
Version: %{_version}
Release: %{_release}

View File

@ -27,6 +27,8 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
# Generate dynamic content
@python3 ./includes_renderer.py
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
spell:

View File

View File

@ -11,7 +11,7 @@ code that provides tools that are used in a development environment.
This section covers the following:
* Describes how to manually install VPP Binaries on different OS platforms (Ubuntu, Centos, openSUSE) and then how to configure and use VPP.
* Describes how to manually install VPP Binaries on different OS platforms (Ubuntu, Centos) and then how to configure and use VPP.
* Describes the different types of VPP packages, which are used in both basic and developer installs.
* A VPP tutorial which is a great way to learn VPP basics.

View File

@ -10,8 +10,8 @@ Downloading and Installing VPP
If you want to use VPP it can be convenient to install the binaries from
existing packages. This guide describes how to pull, install and run the VPP packages.
This section provides directions on how to Install VPP binaries on Ubuntu, Centos,
and openSUSE platforms.
This section provides directions on how to Install VPP binaries on
Ubuntu, and Centos platforms.
FD.io VPP is installed using Package Cloud. For a complete set of
instructions on how to install VPP with package cloud please refer
@ -36,15 +36,6 @@ The following are instructions on how to install VPP on Centos.
centos
Installing on openSUSE
--------------------------------------
The following are instructions on how to install VPP on openSUSE.
.. toctree::
opensuse
Package Descriptions
----------------------------------

View File

@ -1,57 +0,0 @@
.. _opensuse:
.. toctree::
Installing
==========
To install VPP on openSUSE, first install the following release, and then execute
the associated commands.
openSUSE Tumbleweed (rolling release)
------------------------------------------------------------
.. code-block:: console
sudo zypper install vpp vpp-plugins
openSUSE Leap 42.3
--------------------------------
.. code-block:: console
sudo zypper addrepo --name network https://download.opensuse.org/repositories/network/openSUSE_Leap_42.3/network.repo
sudo zypper install vpp vpp-plugins
Uninstall
=========
To uninstall the vpp plugins, run the following command:
.. code-block:: console
sudo zypper remove -u vpp vpp-plugins
openSUSE Tumbleweed (rolling release)
-------------------------------------
To uninstall the openSUSE Tumbleweed, run the following command:
.. code-block:: console
sudo zypper remove -u vpp vpp-plugins
openSUSE Leap 42.3
------------------
.. code-block:: console
sudo zypper remove -u vpp vpp-plugins
sudo zypper removerepo network
For More Information
====================
For more information on VPP with openSUSE, please look at the following post.
* https://www.suse.com/communities/blog/vector-packet-processing-vpp-opensuse/

View File

@ -35,19 +35,7 @@ vpp-plugins
Vector Packet Processing plugin modules.
* acl
* dpdk
* flowprobe
* gtpu
* ixge
* kubeproxy
* l2e
* lb
* memif
* nat
* pppoe
* sixrd
* stn
.. include:: ../../dynamic_includes/plugin_list.inc
vpp-dbg
-------

View File

@ -1,11 +1,11 @@
.. _ubuntu:
.. toctree::
Ubuntu 18.04 - Setup the FD.io Repository
==========================================
Choose one of the following releases to install.
Ubuntu - Setup the FD.io Repository
===================================
Choose one of the following releases to install.
Update the OS
-----------------------
@ -85,4 +85,4 @@ Uninstall the packages by running the following command:
.. code-block:: console
sudo apt-get remove --purge vpp*
sudo apt-get remove --purge "vpp*"

77
docs/includes_renderer.py Normal file
View File

@ -0,0 +1,77 @@
#!/usr/bin/env python3
# Copyright (c) 2020. Vinci Consulting Corp. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import glob
import inspect
import os.path
import re
class ContentRenderer:
name = ""
curr_path = os.path.abspath(inspect.getsourcefile(lambda: 0))
vpp_root = curr_path.rsplit("/", 2)[0]
output_dir = f"{vpp_root}/docs/dynamic_includes/"
def render(self):
raise NotImplementedError
class PluginRenderer(ContentRenderer):
name = "plugin_list.inc"
plugin_dir = f"{ContentRenderer.vpp_root}/src/plugins"
pattern = r'VLIB_PLUGIN_REGISTER\s?\(\)\s*=\s*{.*\.description\s?=\s?"([^"]*)".*};' # noqa: 501
regex = re.compile(pattern, re.MULTILINE | re.DOTALL)
def render(self):
with open(f"{self.__class__.output_dir}{self.__class__.name}",
"w") as output:
with os.scandir(self.__class__.plugin_dir) as pdir:
for entry in sorted(pdir, key=lambda entry: entry.name):
if not entry.name.startswith('.') and entry.is_dir():
description = "<no-description-found>"
# we use glob because a plugin can (ioam for now)
# define the plugin definition in
# a further subdirectory.
for f in glob.iglob(f'{self.__class__.plugin_dir}/'
f'{entry.name}/**',
recursive=True):
if f.endswith('.c'):
with open(f, "r", encoding="utf-8") \
as src:
for match in self.__class__.regex.finditer(
src.read()):
description = "%s" % (match.group(1))
output.write(f"* {entry.name} - {description}\n")
# if this list grows substantially, we can move the classes to
# a folder and import them.
renderers = [PluginRenderer,
]
def main():
print("rendering dynamic includes...")
for renderer in renderers:
renderer().render()
print("done.")
if __name__ == "__main__":
main()

View File

@ -9,9 +9,6 @@ Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.vm.box_version = "1708.01"
config.ssh.insert_key = false
elsif distro == 'opensuse'
config.vm.box = "opensuse/openSUSE-42.3-x86_64"
config.vm.box_version = "1.0.4.20170726"
else
config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm"
end

View File

@ -34,9 +34,6 @@ Looking at the :ref:`vppVagrantfile`, we can see that the default OS is Ubuntu 1
config.vm.box = "centos/7"
config.vm.box_version = "1708.01"
config.ssh.insert_key = false
elsif distro == 'opensuse'
config.vm.box = "opensuse/openSUSE-42.3-x86_64"
config.vm.box_version = "1.0.4.20170726"
else
config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm"

View File

@ -20,3 +20,4 @@ extensive list, but should give a sampling of the many features contained in FD.
networksim
webapp
container_test
trafficgen

105
docs/usecases/trafficgen.md Normal file
View File

@ -0,0 +1,105 @@
Vpp Stateless Traffic Generation
================================
It's simple to configure vpp as a high-performance stateless traffic
generator. A couple of vpp worker threads running on an older system
can easily generate 20 MPPS' worth of traffic.
In the configurations shown below, we connect a vpp traffic generator
and a vpp UUT using two 40 gigabit ethernet ports on each system:
```
+-------------------+ +-------------------+
| traffic generator | | UUT |
| port 0 | <=======> | port 0 |
| 192.168.40.2/24 | | 192.168.40.1/24 |
+-------------------+ +-------------------+
+-------------------+ +-------------------+
| traffic generator | | UUT |
| port 1 | <=======> | port 1 |
| 192.168.41.2/24 | | 192.168.41.1/24 |
+-------------------+ +-------------------+
```
Traffic Generator Setup Script
------------------------------
```
set int ip address FortyGigabitEthernet2/0/0 192.168.40.2/24
set int ip address FortyGigabitEthernet2/0/1 192.168.41.2/24
set int state FortyGigabitEthernet2/0/0 up
set int state FortyGigabitEthernet2/0/1 up
comment { send traffic to the VPP UUT }
packet-generator new {
name worker0
worker 0
limit 0
rate 1.2e7
size 128-128
tx-interface FortyGigabitEthernet2/0/0
node FortyGigabitEthernet2/0/0-output
data { IP4: 1.2.40 -> 3cfd.fed0.b6c8
UDP: 192.168.40.10 -> 192.168.50.10
UDP: 1234 -> 2345
incrementing 114
}
}
packet-generator new {
name worker1
worker 1
limit 0
rate 1.2e7
size 128-128
tx-interface FortyGigabitEthernet2/0/1
node FortyGigabitEthernet2/0/1-output
data { IP4: 1.2.4 -> 3cfd.fed0.b6c9
UDP: 192.168.41.10 -> 192.168.51.10
UDP: 1234 -> 2345
incrementing 114
}
}
comment { delete return traffic on sight }
ip route add 192.168.50.0/24 via drop
ip route add 192.168.51.0/24 via drop
```
Note 1: the destination MAC addresses shown in the configuration (e.g.
3cfd.fed0.b6c8 and 3cfd.fed0.b6c9) **must** match the vpp UUT port MAC
addresses.
Note 2: this script assumes that /etc/vpp/startup.conf and/or the
command-line in use specifies (at least) two worker threads. Uncomment
"workers 2" in the cpu configuration section of /etc/vpp/startup.conf:
```
## Specify a number of workers to be created
## Workers are pinned to N consecutive CPU cores while skipping "skip-cores" CPU core(s)
## and main thread's CPU core
workers 2
```
Any plausible packet generator script - including one which replays
pcap captures - can be used.
UUT Setup Script
----------------
The vpp UUT uses a couple of static routes to forward traffic back to
the traffic generator:
```
set int ip address FortyGigabitEthernet2/0/0 192.168.40.1/24
set int ip address FortyGigabitEthernet2/0/1 192.168.41.1/24
set int state FortyGigabitEthernet2/0/0 up
set int state FortyGigabitEthernet2/0/1 up
ip route add 192.168.50.10/32 via 192.168.41.2
ip route add 192.168.51.10/32 via 192.168.40.2
```

View File

@ -35,7 +35,6 @@ OS_ID ?= $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
# Package dependencies
DOC_DEB_DEPENDS = doxygen graphviz python3-pyparsing python3-jinja2
DOC_RPM_DEPENDS = doxygen graphviz python3-pyparsing python3-jinja2
DOC_SUSE_RPM_DEPENDS = doxygen graphviz python3-pyparsing python3-Jinja2
DOC_MAC_BIN_DEPENDS = doxygen dot git
DOC_MAC_PY_DEPENDS = pyparsing jinja2
@ -156,8 +155,6 @@ else ifeq ($(OS_ID),darwin)
false; \
); \
done
else ifeq ($(OS_ID),opensuse)
@sudo zypper install $(CONFIRM) $(DOC_SUSE_RPM_DEPENDS)
else
$(error "Building documentation currently works only on Ubuntu, CentOS, MacOS and OpenSUSE systems.")
endif

View File

@ -4,24 +4,22 @@ User Documentation {#user_doc}
Several modules provide operational, dataplane-user focused documentation.
- [GUI guided user demo](https://wiki.fd.io/view/VPP_Sandbox/vpp-userdemo)
- @subpage af_xdp_doc
- @subpage avf_plugin_doc
- @subpage bfd_doc
- @subpage dpdk_crypto_ipsec_doc
- @subpage dhcp6_pd_doc
- @subpage flowprobe_plugin_doc
- @subpage ioam_plugin_doc
- @subpage kp_plugin_doc
- @subpage lacp_plugin_doc
- @subpage lb_plugin_doc
- @subpage lldp_doc
- @subpage map_doc
- @subpage marvel_plugin_doc
- @subpage srv6_mobile_plugin
- @subpage mtu_doc
- @subpage nat64_doc
- @subpage nat_ha_doc
- @subpage qos_doc
- @subpage quic_doc
- @subpage rdma_doc
- @subpage selinux_doc
- @subpage span_doc
@ -29,3 +27,4 @@ Several modules provide operational, dataplane-user focused documentation.
- @subpage srv6_doc
- @subpage vcl_ldpreload_doc
- @subpage vmxnet3_doc
- @subpage wireguard_plugin_doc

View File

@ -26,18 +26,7 @@ PC=%
all: RPM
# SUSE rolling-release (a.k.a. Tumbleweed)
ifeq ($(filter opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
SPEC_FILE='vpp-suse.spec'
# SUSE osleap15
else ifeq ($(filter opensuse-leap,$(OS_ID)),$(OS_ID))
SPEC_FILE='vpp-suse.spec'
# SUSE leap42.x
else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
SPEC_FILE='vpp-suse.spec'
else
SPEC_FILE='vpp.spec'
endif
spec:
@echo $(TARBALL)

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,6 @@ BuildRequires: python3, python36-devel, python3-virtualenv
BuildRequires: cmake
%else
%if 0%{rhel} >= 7
Requires: epel-release
Requires: vpp-lib = %{_version}-%{_release}, vpp-selinux-policy = %{_version}-%{_release}, net-tools, pciutils, python36
Requires: boost-filesystem mbedtls libffi-devel
BuildRequires: epel-release
@ -150,7 +149,7 @@ This package contains the python bindings for the vpp api
Summary: VPP api python3 bindings
Group: Development/Libraries
Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}, libffi-devel
Requires: python-setuptools
Requires: python3-setuptools
%description api-python3
This package contains the python3 bindings for the vpp api
@ -169,7 +168,10 @@ Requires(post): python3-policycoreutils
This package contains a tailored VPP SELinux policy
%prep
%setup -q -n %{name}-%{_version}
%setup -q -c -T -n %{name}-%{_version}
cd ..
unxz --stdout ./SOURCES/%{name}-%{_version}-%{_release}.tar.xz | tar --extract --touch
cd -
%pre
# Add the vpp group
@ -180,7 +182,7 @@ groupadd -f -r vpp
. /opt/rh/devtoolset-9/enable
%endif
%if %{with aesni}
make bootstrap
make install-dep
make -C build-root PLATFORM=vpp TAG=%{_vpp_tag} install-packages
%else
make bootstrap AESNI=n

View File

@ -96,19 +96,34 @@ def filelist_from_patchset():
return set(filelist)
def is_deprecated(d, k):
if 'options' in d[k] and 'deprecated' in d[k]['options']:
return True
if 'options' in d[k]:
if 'deprecated' in d[k]['options']:
return True
# recognize the deprecated format
if 'status' in d[k]['options'] and d[k]['options']['status'] == 'deprecated':
print("WARNING: please use 'option deprecated;'")
return True
return False
def is_in_progress(d, k):
try:
if d[k]['options']['status'] == 'in_progress':
if 'options' in d[k]:
if 'in_progress' in d[k]['options']:
return True
except:
return False
# recognize the deprecated format
if 'status' in d[k]['options'] and d[k]['options']['status'] == 'in_progress':
print("WARNING: please use 'option in_progress;'")
return True
return False
def report(old, new, added, removed, modified, same):
def report(new, old):
added, removed, modified, same = dict_compare(new, old)
backwards_incompatible = 0
# print the full list of in-progress messages
# they should eventually either disappear of become supported
for k in new.keys():
newversion = int(new[k]['version'])
if newversion == 0 or is_in_progress(new, k):
print(f'in-progress: {k}')
for k in added:
print(f'added: {k}')
for k in removed:
@ -126,6 +141,17 @@ def report(old, new, added, removed, modified, same):
print(f'modified: ** {k}')
else:
print(f'modified: {k}')
# check which messages are still there but were marked for deprecation
for k in new.keys():
newversion = int(new[k]['version'])
if newversion > 0 and is_deprecated(new, k):
if k in old:
if not is_deprecated(old, k):
print(f'deprecated: {k}')
else:
print(f'added+deprecated: {k}')
return backwards_incompatible
@ -150,8 +176,7 @@ def main():
if args.diff:
oldcrcs = crc_from_apigen(None, args.diff[0])
newcrcs = crc_from_apigen(None, args.diff[1])
added, removed, modified, same = dict_compare(newcrcs, oldcrcs)
backwards_incompatible = report(oldcrcs, newcrcs, added, removed, modified, same)
backwards_incompatible = report(newcrcs, oldcrcs)
sys.exit(0)
# Dump CRC for messages in given files / revision
@ -186,8 +211,7 @@ def main():
newcrcs.update(crc_from_apigen(None, f))
oldcrcs.update(crc_from_apigen(revision, f))
added, removed, modified, same = dict_compare(newcrcs, oldcrcs)
backwards_incompatible = report(oldcrcs, newcrcs, added, removed, modified, same)
backwards_incompatible = report(newcrcs, oldcrcs)
if args.check_patchset:
if backwards_incompatible:

View File

@ -77,6 +77,29 @@ git add crccheck.api
git commit -m "deprecated api";
extras/scripts/crcchecker.py --check-patchset
echo "TEST 7.1: Verify we can delete deprecated message (old/confused style)"
cat >crccheck_dep.api <<EOL
option version="1.0.0";
autoreply define crccheck
{
option status="deprecated";
bool foo;
};
EOL
git add crccheck_dep.api
git commit -m "deprecated api";
# delete API
cat >crccheck_dep.api <<EOL
option version="1.0.0";
autoreply define crccheck_2
{
bool foo;
};
EOL
git add crccheck_dep.api
git commit -m "deprecated api";
extras/scripts/crcchecker.py --check-patchset
echo "TEST 8: Verify that we can not rename a non-deprecated message"
sed -i -e 's/crccheck_2/crccheck_3/g' crccheck.api
git add crccheck.api
@ -107,6 +130,13 @@ git add crccheck.api
git commit -m "renamed in-progress api";
extras/scripts/crcchecker.py --check-patchset
echo "TEST11.1: Switch to new designation of in-progress API"
sed -i -e 's/status="in_progress"/in_progress/g' crccheck.api
git add crccheck.api
git commit -m "new designation of in-progress api";
extras/scripts/crcchecker.py --check-patchset
echo "TEST12: Verify we can add a field to an in-progress API"
sed -i -e 's/foobar;/foobar; bool new_baz;/g' crccheck.api
git add crccheck.api

Some files were not shown because too many files have changed in this diff Show More