7390 Commits

Author SHA1 Message Date
Benoît Ganne
8a7109cc6e rdma: fix crash when failing to read pci addr on create
Type: fix

Change-Id: I543e2e5976cb384b81278a7ec98a0a6ab1612438
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 0dd97d473bc0c958d9fcea508e1f5122a137b23f)
2019-10-15 10:46:04 +00:00
Benoît Ganne
8413f48d6e rdma: fix crash when failing to detect numa node on create
Type: fix

Change-Id: Ibb8e7c1c13869c1dce2385f58bd7260fcf776c5a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 90ea5dc1bd7adcedd0d5765c3ee04c98c4853337)
2019-10-15 10:45:50 +00:00
Benoît Ganne
a086e304e4 vlib: pci: set pci driver name to none when no driver is loaded
If no Linux PCI driver module is loaded, then the driver_name in the PCI
info struct is NULL. This can triggers crash when checking driver name
eg. in vlib_pci_device_open().
Default to "<NONE>" as driver name, which should never match.

Type: fix

Change-Id: I9e69889a7566467bd8220b92bbbaa72ada957257
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 0eae2bb1f1199f7dcb6a8c62b1ea612ed9ee4ae1)
2019-10-15 10:45:30 +00:00
Benoît Ganne
b022d3195a ip: fix use-after-free in IPv6 SLAAC expiration
Type: fix

Change-Id: I46b166b3a10c4543eafa4422531dd3c725db45f1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 79c9d3650357fa675df2998e362e9881cff17a34)
2019-10-15 10:45:12 +00:00
Benoît Ganne
7efa9c5342 nat: fix use-after-free
Type: fix

Change-Id: Iac91c086c4e975f0bada058f40b7b7d4475377f8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 7233846ce93fddef495a1029ca211f42afe046f2)
2019-10-15 10:44:53 +00:00
Steven Luong
d294b98c1d devices: vhost not reading packets from vring
In a rare event, after the vhost protocol message exchange has finished and
the interface had been brought up successfully, the driver MAY still change
its mind about the memory regions by sending new memory maps via
SET_MEM_TABLE. Upon processing SET_MEM_TABLE, VPP invalidates the old memory
regions and the descriptor tables. But it does not re-compute the new
descriptor tables based on the new memory maps. Since VPP does not have the
descriptor tables, it does not read the packets from the vring.

In the normal working case, after SET_MEM_TABLE, the driver follows up with
SET_VRING_ADDRESS which VPP computes the descriptor tables.

The fix is to stash away the descriptor table addresses from
SET_VRING_ADDRESS. Re-compute the new descriptor tables when processing
SET_MEM_TABLE if descriptor table addresses are known.

Type: fix
Ticket: VPP-1784

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I3361f14c3a0372b8d07943eb6aa4b3a3f10708f9
(cherry picked from commit 61b8ba69f7a9540ed00576504528ce439f0286f5)
2019-10-14 11:12:37 +00:00
Neale Ranns
d557b187f7 ip: MFIB CLI fix for parsing path flags
Type: fix

Change-Id: I7ed9726d8c5ca26715a84b004a18fd7f93142486
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 46023762d1da674ff73954f0d1523d450bfcf03c)
2019-10-14 07:51:42 +00:00
Dave Barach
47a2a705d0 lisp: fix dangling references to bihash tables
gid_ip4_table_t's and gid_ip6_table_t's are allocated from pools. They
MUST NOT be listed on the clib_all_bihash list to avoid dangling
references.

Switch to the clib_bihash_init2 API, which has the required knob.

Type: fix
Ticket: VPP-1788

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I49a17e937922c3af2e1c46b24e20883af51584a8
2019-10-11 15:45:39 +00:00
Benoît Ganne
23afd57095 tcp: unittest: do not access non-existent samples
There is no bt->samples for this test, do not use it.

Type: fix

Change-Id: I2090290887bc5c0b5cdb0561cf2bf72a87781089
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit b0a7c484eec9a813751e6e3fa71a9955ad5f0f74)
2019-10-11 14:41:20 +00:00
Andrew Yourtchenko
d5b7840245 acl: fix intermittent test failure
ACL tests use random port number in the tests.
A port number 6081 causes the decode in scapy
to consume some of the Raw payload into GENEVE
encoding, which breaks the test.

Solution: bring up the lower range of random
port to 16384, so that it does not touch any
of the well known ports.

Type: test
Change-Id: I022660d8ec147857924b436f1871b0b5ddcf4c47
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit ec574ff9129a7cc4282916d2a989e88d78aaff60)
2019-10-11 14:41:02 +00:00
MathiasRaoul
2f9ec50016 quic: Create custom event logger
Type: feature

Change-Id: I20acfe6a53cf9f15e3e4b8847b6f76757962f1c7
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
(cherry picked from commit dd4d8ac29202fe54e74a13ce86d1ba3f79d1555f)
2019-10-11 14:40:48 +00:00
Benoît Ganne
291cd93ee0 api: fix non-null-terminated C-string
Type: fix

Change-Id: I132112bf77e1fad7fc0227a96e6b0cee590295e8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit fb0bb3a732cd46848e26fcc6a17d9fdf99727af3)
2019-10-11 11:51:09 +00:00
Christian E. Hopps
c1ee34f8d1 ipsec: initialize msgid and allow no dh in child sa
- set msgid to 0 not random.
- allow for no DH in ESP child SA

Ticket: VPP-1781
Type: fix
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: Ibe26009d38f444eeaec5b042097f145d161c7672
(cherry picked from commit 0e182c5b1d27139764dca7059c9c91be8387977a)
2019-10-11 11:50:52 +00:00
MathiasRaoul
3a61a40dd4 quic: Add Tx, Rx and packet drop counters
Type: feature

Change-Id: I25aeeed49fc569315296a73c5595c2e2e302434f
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
(cherry picked from commit ff1f6faaa90cd446545a8d0c0b0baa85d69efa35)
2019-10-11 11:47:27 +00:00
Benoît Ganne
4adcdcd197 session: fix use-after-free
Make sure to reinitialize data before free-ing it.

Type: fix

Change-Id: I45727c456d0345204d4825ecdd9690c5ebeb5e94
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit d4aeb84c3f066b755b723163da292eab95bd1ef9)
2019-10-11 11:46:42 +00:00
MathiasRaoul
88af6c3f4a quic: add cli command for stats
add command to display stats from quicly (rtt, packet loss)

Type: feature

Change-Id: Iaa18bc78fbf80a9367ef150a8cf4997a456c6b39
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
(cherry picked from commit 922f0b211c160b4f1d05b87ad0103581d17efb8b)
2019-10-11 11:46:14 +00:00
Burt Silverman
63f2b46a8c build: build-root/Makefile rm of install tree
Type: fix

The scenario is touch of a dpdk source file in places like
<TOP>/build-root/build-vpp-native/external/dpdk-19.08/.  The subsequent
build will trigger an rm -rf $(PACKAGE_INSTALL_DIR) by
build-root/Makefile at around line 709.  Because the package in
question, "external", consists of various "sub" packages, all of which
are controlled with files like .quicly.install.ok located in
build-root/build-vpp[_debug]-native/external, we end up not handling the
.*.install.ok files to reflect the removal of that PACKAGE_INSTALL_DIR.
This fix will correct that, at least for the case of touching/changing
dpdk files. A better long term solution would be to change the "sub"
packages to be full fledged build system packages, as Dave Barach points
out.

Signed-off-by: Burt Silverman <burtms@gmail.com>
Change-Id: Ia94ccaa2795cbf354b5921c3001a7141313b66be
(cherry picked from commit 839a7bce3872f992f4807ee6d6a76f9b361151dc)
2019-10-11 11:45:49 +00:00
Nathan Skrzypczak
340a3b1e49 hsa: fix vpp_echo mq locking
Type: fix

Change-Id: I18d2cde0baaed4134e8378c09aaa88693fb997f8
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 46b91ebb5c350ceeccec97d8e09524f708512342)
2019-10-11 11:45:25 +00:00
jaszha03
a3c45242b1 vppinfra: implement CLIB_PAUSE () for aarch64 platforms
Define CLIB_PAUSE () to generate the "yield" instruction. No significant
performance changes were observed for clib_spinlock_t and clib_rwlock_t.

Type: feature

Change-Id: I59eb996e61c7a16007517e57e6996567302c1657
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
(cherry picked from commit 18512b002da5da312aa2638b67a8ec4bb2c10236)
2019-10-11 11:44:48 +00:00
Srikanth A
3642782a27 tcp: custom checksum calculations for Ipv4/Ipv6
Type: feature

Based on the configuration, we can disable checksum offload capability
and calculate checksum while pushing the TCP & IP header.
This saves some cycles when VPP stack is used in legacy hardware devices.

Signed-off-by: Srikanth A <srakula@cisco.com>
Change-Id: Ic1b3fcf3040917e47ee65263694ebf7437ac5668
2019-10-10 15:46:18 +00:00
Benoît Ganne
43b36af1fc rdma: prevent loopback of broadcast packets
TX queues must be created before RX queues on Mellanox cards in order to
not receive our own broadcast packets.

Type: fix

Change-Id: I32ae25a47d819f715feda621a5ecddcf4efd71ba
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit df213385d391f21d99eaeaf066f0130a20f7ccde)
2019-10-09 12:38:39 +00:00
Benoît Ganne
4787d18b19 rdma: make sure pci subsystem is initialized
The rdma driver use the pci subsystem, make sure the dependency is
recorded.

Type: fix

Change-Id: Ibd613f623d355612881acc31b9423f2de13793a3
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 4a98388daec998a56cb150e2acb8a26ae51c0c28)
2019-10-09 11:11:46 +00:00
Benoît Ganne
9f1cea03c8 dns: fix non-NULL terminated C-string
Type: fix

Change-Id: Ib030e6ac3386528901e0805d1ffe2eec033d819f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 328c08d603bb0a9956b82553f1691fd8a5a5de7d)
2019-10-08 06:39:56 +00:00
Benoît Ganne
11eb8e03ae vlib: fix old nodes vector overflow in refork
Type: fix

Change-Id: I81c4cf0ce87288bb2d3c7b9f31e9419290d588b4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 5517bd34535e4ffffb838a835bb95ddcb77e2bba)
2019-10-08 06:39:27 +00:00
Benoît Ganne
07228c09a6 ipsec: fix use-after-free
When deleting interface from the API, 'hi' gets removed before
'h->sw_if_index' is copied.

Type: fix

Change-Id: I8e10108e9bdf95ab2fe002790d98262d583ca58c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 8133c780a22480496c74a4ead321e8350d5beeb4)
2019-10-07 13:14:02 +00:00
Benoît Ganne
c385270341 bonding: fix non-null-terminated C-string
Type: fix

Change-Id: Ibb7ba878b049b8b18e890c43fdd6324cb88d63b8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 5c828bc1f24fb5222d6bb634d8e5228ed8b138f0)
2019-10-07 13:13:41 +00:00
Benoît Ganne
c8f447e71e api: fix use-after-free
Type: fix

Change-Id: I2a599c22d5770587fdd419e5d212c8527054d2e9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit f26b2511cf661d4ebef32c19f944041637ec5907)
2019-10-07 13:10:10 +00:00
Steven Luong
8f4fccab9f bonding: traffic traversing the wrong interface
Missing an increment in the while loop. Hashes not stored in the array.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I603027f5a7305478f48a102ac8035ffde9102c53
(cherry picked from commit 0471cdbd3fe04a88a8b70b5f0eff0c378e19abf7)
2019-10-05 16:45:03 +00:00
Benoît Ganne
ba55df18b5 hsa: fix non-NULL terminated C-string use in echo
Use '%v' format for non-NULL terminated vectors instead of '%s'.

Type: fix

Change-Id: Id83de52486ad8dad3cdf3f32dad63a223fc1fdf7
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit bb5ff4e4bb6dbf679a49fc9786718ad6fe229e84)
2019-10-04 14:23:29 +00:00
Nathan Skrzypczak
f42f1d5db7 session: Fix missing elt regrab
Type: fix

Change-Id: Ie756c5477d989702e633aa0d42ca154ff32b4c9a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 19e52c96dcd5f523c2b97aee56cb2e7751d4690a)
2019-10-04 14:23:07 +00:00
Neale Ranns
2e6d739344 ipsec: support 4o6 and 6o4 for tunnel protect
Type: feature

Change-Id: Ib2352ca4c7abf4645f21fa16aaaf27408890a2bf
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit b325983a4461dd806e86a31abc47533b09482157)
2019-10-04 14:22:12 +00:00
Dave Barach
24f486cb56 misc: add vnet classify filter set support
Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I79b216d2499df143f53977e5b70382f6f887e0bc
(cherry picked from commit f5667c3055dbd6755277f085c6778c2b1104aa6e)
2019-10-04 14:21:39 +00:00
Dave Barach
cefa74829a vlib: improve summary vector-rate statistics
Type: refactor

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I4b77879b0a84fdec3c1518a972cf003d5135222d
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit a8df85ce1fe957efa8301bd5b5ac3c03737d31f1)
2019-10-04 12:49:16 +00:00
Benoît Ganne
b7c4a5c76f stats: fix per-worker stat vector length
Type: fix

Change-Id: I198a2312f5fc6e922c8a6c51ba7248ce6e236f81
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit dba00cad1a2e41b4974911793cc76eab81a6e30e)
2019-10-04 12:01:05 +00:00
Florin Coras
6af2886a08 session: allow transport cleanup in any state
Type: fix

Third time's a charm

Change-Id: I31555a35d2b51f49a93a2a213c28896b0cad4c09
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit b5a2f7056967630c2834b0b4bf03520d96806c3e)
2019-10-03 16:21:12 +00:00
Benoît Ganne
f13634f1ab rdma: fix non-NULL terminated C-string overflow
Type: fix

Change-Id: I584777825636347c116bd084e348858bcb1b7d75
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 7ff07354c3a6969e306f75bf28502a46697abcda)
2019-10-03 16:20:03 +00:00
Nathan Skrzypczak
513a74b855 session: fix io_evt mq locking
Type: fix

Change-Id: Iaa8045bba19cc305c84074668a20e1468d431b10
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 35174b428b99978503332107a9f330d8b3478bd5)
2019-10-03 16:16:17 +00:00
Dave Wallace
c00898c485 tests: add quic plugin qclose/sclose tests
Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I3122b038f7d77c7e5e8ee7c24046da6c94ca2d2c
(cherry picked from commit 83c1e9a35b41c3bc871a2508f847e64528efccac)
2019-10-03 16:15:45 +00:00
Benoît Ganne
f2c754caa9 ip: fix use-after-free in reassembly
- ip{4,6}_reass_finalize() frees the reassembly context: do not access
it after the call.
 - traces access reassembly context: free it after and not before
tracing.

Type: fix

Change-Id: Ia3aaea9c7b74932e249e013be04b9bd7298fd187
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 2d0ebd7ebc555565868038a09d80a61f5de29430)
2019-10-03 16:14:36 +00:00
Damjan Marion
bebbd7f62d classify: use vector code even when data is not aligned
Type: feature

Change-Id: I8f5f4841965beb13ebc8c2a37ce0dc331c920109
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 8304933922620cef005b788a36a4d3f2eab45bb5)
2019-10-03 16:12:23 +00:00
Klement Sekera
35a265ceae ip: respect buffer boundary when searching for ipv6 headers
Type: fix

Change-Id: I5a5461652f8115fa1270e20f748178fb5f5450f2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 769145cdbc28324bd0b6304951199ec3d6e0e883)
2019-10-03 16:11:41 +00:00
Florin Coras
09c91fe627 session: fix unbind coverity warning
Type:fix

Change-Id: If4fce6bd9b06ed545d72df847afd6a74cdefe042
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit eef61bb81a22f4c61c01e5afc8bd3b8612a71534)
2019-10-03 15:11:24 +00:00
Christian E. Hopps
591aa64e81 ipsec: add insecure option for format of SA
If specified, shows keys, otherwise redacts. This change sets this flag
in the existing CLI code (thus maintaining the old behavior). The use
case for not specifying the insecure flag (and thus redacting the keys
from the show output) is for log messages.

Type: feature
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I8c0ab6a9a8aba7c687a2559fa1a23fac9d0aa111
(cherry picked from commit 01d61e7881432a2c508fecbbab804d9c776abe1a)
2019-10-03 10:09:14 +00:00
Florin Coras
2d986799b5 vcl: initialize ctrl_mq in workers
Type: fix

Change-Id: I1b9c8b0f9292f039b941e18d8aca5d734d5f1e77
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 22ba3303d8e1ead33a4d032a532e38d255461c8a)
2019-10-03 10:08:53 +00:00
Christian E. Hopps
432fe38b61 ipsec: allow null cipher with dpdk esp
The NULL cipher is a (valid) non-AEAD choice for ESP encrypt path.
Allow it.

Type: fix
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I6d8b66223a0ffb0952c2dd6fa898a8a2289fef7a
(cherry picked from commit 5a2426386d31c90e833c639332a80a8b60bfed2f)
2019-10-03 10:07:17 +00:00
Christian E. Hopps
41e96bbc64 ipsec: fix memleaks in ikev2 openssl code
- Need to always free created contexts
- Always pair init with cleanup for older openssl API.

Type: fix
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: Ie8840403bcac500c20085d57240401ad39d119f8
(cherry picked from commit 9a5aab34f51bc1e5458456888ba142ee1055e1f4)
2019-10-03 10:06:58 +00:00
Aloys Augustin
cb671c3e13 udp: do not send received packets to error-drop
This tends to pollute the error counter.

Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Change-Id: Idb628e767b074a5ee7e00d001bc88c378d7b8d0b
(cherry picked from commit 8fadb658a1b91a92f174fcf29a3620b644d8fe21)
2019-10-03 08:44:50 +00:00
Florin Coras
1e937f8a88 session: fix cleanup in closing states
Type: fix

Change-Id: Iccc283bb98d3bb459a711ec2b74d6a32ad12903b
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 54c93cfc2556d9c6d2cf472f51d4c2866a556ef6)
2019-10-03 08:44:24 +00:00
Lijian.Zhang
e8bcb944c5 fib: fix some typos in fib/mtrie
Type: fix

Change-Id: I1af0e4a9bc23a3b6b6d3a74df093801ab6cae1f8
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
(cherry picked from commit 33af8c1ed89f15cf0601ee891e9603bef16f2c93)
2019-10-03 08:43:47 +00:00
Klement Sekera
d46055e868 ip: refactor reassembly
this is a preparation step for introducing other reassembly types

Type: refactor

Change-Id: I197e299dbd729b00eead31667913b8ceff915d63
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 896c896a3c4ed563a270281ff8b50fd253f4833f)
2019-10-03 08:43:03 +00:00