7412 Commits

Author SHA1 Message Date
Benoît Ganne
0e520fdfd4 gbp: use correct dst mac for RD-UU forward
Type: fix

Change-Id: Ifdd193fab24796346b11a5df81740880f9a50ee8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit db056acca08900d05ef806a6bab74ea30b262f0f)
2019-10-22 11:23:46 +00:00
Steven Luong
eb0cea6919 bonding: feature arc may not be enabled for the slave interface
vnet_feature_enable_disable takes sw_if_index, not hw_if_index. If there
is a subinterface created prior to the slave interface is created,
sw_if_index and hw_if_index start to diverge and the problem will happen.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I11e1f099378832f83b748526c6cbeb56960fad3c
(cherry picked from commit 1a41a35b27da6921d6d86a9f1ad5f1b46e1185f7)
2019-10-22 11:21:05 +00:00
Benoît Ganne
e36e5cbac4 ip: fix clang debug compilation
The non-extern declaration confuses clang linker in debug mode.
The function is defined as inline above anyway.

Type: fix
Fixes: c6215d902f

Change-Id: Ic7e4477631cf0bcfb31ab3f81effe3642dd4223e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 5b1379be3e25df096d97dcd217965169fc6bb1b2)
2019-10-22 11:18:38 +00:00
Simon Zhang
4ac265adc6 tcp: fix tso not work in single buffer issue
Type: fix

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: Iddb6fd41812e8c97af58859ef43279cfc0f9d1df
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
(cherry picked from commit 8a047ed741072bdb8d93b0841473eae06ae3c9d0)
2019-10-22 11:18:01 +00:00
Rajesh Goel
be2d536f87 mpls: support fragmentation of mpls output packet
Type: fix

Signed-off-by: Rajesh Goel <rajegoel@cisco.com>
Change-Id: Ie4372c5cf58ab215cdec5ce56f8a994daaba2844
(cherry picked from commit d6f1c9c5141c177a14d011a514e392a9357398fb)
2019-10-22 11:15:17 +00:00
Neale Ranns
d3b170254b ip: only install IPv6 prefixes in FIB when the interface is up
otherwise they get installed twice and the reference counting means they are not removed.
This is the same behaviour as IPv4.

Type: fix

Change-Id: I9266e04ccff6ff06a577e85973a2ddbeb9dfc52b
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 1ff3c15b3c7607c9b590ad44d18dea5eb1cb8c4e)
2019-10-22 11:14:47 +00:00
Neale Ranns
15800e9442 fib: P2P interfaces do not need specific multicast adjacencies
they can use the 'auto' adj for all traffic

Type: fix

Change-Id: Id2b9557683252a94badc8f9dfab5f7b2ae26f1ee
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit da0e7497ca972f3219352d884b5c51e455503dbb)
2019-10-22 11:13:06 +00:00
Klement Sekera
3bc9d5551a tests: handle unicode charactes in cli output
Type: fix

Change-Id: Ic4fb53e6d10a1de155a3088be81d53d9efeb0c0f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 6be55648334308d4eaa4a02143b968720bb62078)
2019-10-22 11:11:45 +00:00
Nathan Skrzypczak
116e05f57f build: add env variable to pass extra cmake args
If VPP_EXTRA_CMAKE_ARGS is set, its content will be
appended to the vpp cmake command cli

Type: feature

Change-Id: I825d4239e62b0a2fb70a652f0671f6c559630aad
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 29736540335fb983f472457883e9fefde61bd913)
2019-10-22 11:02:29 +00:00
Florin Coras
fea0713f66 tcp: rate sample for persist segments
Type: fix

Change-Id: I7c38d2ad6364f098529f51c15b533eb234b82716
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit dd60b1b128d8d6c07dc8b8bcbf932b808cedbaab)
2019-10-18 14:44:01 +00:00
Christian E. Hopps
c518bd63c3 vlib: move thread barrier around mod of global node next data
The old code modified the node next array prior to obtaining the thread
barrier. Then it updated the runtime node data, and upon barrier release
caused reforking of each worker thread. The reforking clones the main
thread nodes and reconstructs the runtime node structure. This cloning
is not 100% "deep" in the sense that the node next array is
shared (i.e., only the pointer is copied). So prior to the barrier being
obtained the node's next array is being changed while workers are
actively using it (bad). Treating the node next array as read-only in
the workers and sharing it is a decent optimization so instead of trying
to fix that just move the barrier a little earlier in the process to
protect the node next array as well.

This was tripping an assert in next frame ownership change by way of the
ip4-arp node. The assert verifies that the node's next array length is
equal to the runtime next node count. The race above was lost and the
node next array data was updated in the main thread while the arp code
was still executing in a worker.

This was being hit when many arp requests were being sent from both ends
of a tunnel during which the add next node function was called, which
often led to an assert b/c the next node array was out of sync with the
runtime next node count.

- PS#2 update - move barrier sync to just above code that modifies state.

Ticket: VPP-1783
Type: fix

Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I868784e28f994ee0922aaaae11c4894a3f4f1fe7
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
(cherry picked from commit d3122ef4ecfa9a515cc39c1632d29e43fa771b2a)
2019-10-18 14:39:40 +00:00
Neale Ranns
b8f61f4863 dhcp: API return code fix
Type: fix

Change-Id: Ifcbfeecd6ca1215ec473eec4cce736ab4eacde80
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit d751746af9ca1130202d19bddd96a5f6af2ecc5c)
2019-10-18 14:39:18 +00:00
Neale Ranns
a61ba6d1f9 ip: Fix IP unnumbered dump of one interface
Type: fix

Change-Id: I35fb6fdfba50c4a59cf1ffb94cb51487bcf5afc9
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit ac3e72cb9765f78f1cf03ff5d5ccd9ff944668b6)
2019-10-18 14:38:34 +00:00
Dave Barach
95c5e32b16 misc: add "show run summary"
Prints the interior node vector rate, rx / tx / drop rates

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I57130db0f99e852a8498aa90d01e52f7ac33dcc9
(cherry picked from commit ac78f8a902fc61465edf657f7c7da7ff575210c8)
2019-10-18 14:37:53 +00:00
MathiasRaoul
47c6f36be7 hsa: make APP_OPTIONS_PREALLOC_FIFO_PAIRS configurable
-add prealloc_fifo_pairs  member in echo_main_t
-new cli parameter in vpp_echo

Type: feature

Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
Change-Id: I6bb1214ee93e06421cd0a3721420278c51cd59c4
(cherry picked from commit 7028a0157e28066696fba7d9978f7ab474f4d4f8)
2019-10-18 14:37:29 +00:00
MathiasRaoul
7fc3d97b82 quic: make quic fifo size configurable via cli
Type: feature

Depends-On: I8d71078a9ed42326e19453ea10008c6bb6992c52
Change-Id: I6d6ac649094ef4bee2aed311915dd58f11972e79
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
(cherry picked from commit 00078b991365db97edf919567ca8b169ffd9b3e4)
2019-10-18 14:36:57 +00:00
Benoît Ganne
f864498309 fib: fix use-after-free for interface adj removal
Type: fix

Change-Id: I82308e368d14d84f5970dad229bdcf2de7d1839d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 7391156ce68a81f258d65f498ec6161d694fae47)
2019-10-17 20:25:54 +00:00
Steven Luong
8b7faa7270 bonding: graph node running after bond-input in feature arc may crash
In bond RX quad loop, when all packets within the frame have the same incoming
interface, we cannot skip calling bond_update_next because that function calls
vnet_feature_next() to update the b->current_config_index. The next node needs
the correct b->current_config_index to work with.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I3d8b3d4e0f95490f406fae7638f0c43c301ce664
(cherry picked from commit 71e5b4710258376873c62428cb4a81b2a650fc26)
2019-10-17 12:55:31 +00:00
Neale Ranns
2279e44bf0 ip: RD-CP API incorrect reply code
Type: fix

Change-Id: Ie436d51999dc1384a0db492f28a7e66620e14551
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit be01e635bcc942395c581eeb5a108edaaa82e36f)
2019-10-17 12:25:52 +00:00
Neale Ranns
cbdff7518b fib: recursive calculation leads to delegate pool realloc
Type: fix

Change-Id: Ib7ac53d1b59b641ccd3b1d733107d7f1ba174314
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit a66020becd7d01eefea55244cbcf5df9679a9443)
2019-10-17 12:25:39 +00:00
MathiasRaoul
cb19100c18 vppinfra: create unformat function for data size parsing
Type: feature

Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
Change-Id: I8d71078a9ed42326e19453ea10008c6bb6992c52
(cherry picked from commit 579b165069e7c14392cded3a76e5cc1964ad13a9)
2019-10-16 12:40:33 +00:00
Christian E. Hopps
fb76b4549f misc: add "maxframe" and "rate" to packet-generator cli.
Allow for setting the maximum number of generated packets to be included
in the frame passed to next nodes. This is very important for testing
code which may be susceptible to multi-frame vs single-frame bugs (e.g.,
code that is doing re-ordering where packets may be buffered between
frames).

Update:
- remove redundant packet "rate" option.
- reduce n_max_frame to u32 as that's what pulled from the CLI.

Type: feature
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: Ie362bbb110b2cf01d9f65c559bbe9101e17b7fdc
Signed-off-by: Christian Hopps <chopps@labn.net>
(cherry picked from commit 87d7bac5cf2ebdc7820e1edaadc2cc3b6d111cf2)
2019-10-16 12:40:14 +00:00
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