8851 Commits

Author SHA1 Message Date
ShivaShankarK
35acaac184 fib: fix accessing empty dpo pool elements
Type: fix

Signed-off-by: ShivaShankarK <shivaashankar1204@gmail.com>
Change-Id: Iee88a2101ce42d7f1cdb65df532c349d14829e4c
2020-04-11 17:07:43 +00:00
Florin Coras
256779c857 udp: remove connected udp transport proto
Type: refactor

To reproduce functionality, use udp in combination with
TRANSPORT_CFG_F_CONNECTED transport flag set in connect and listen
parameters.

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id88470c38326f8168b9646b0de49a674e0f4266f
2020-04-10 19:52:04 +00:00
Aloys Augustin
92e131468b quic: fix clean stream close
Properly close the stream sending side instead of resetting the entire
stream.

Change-Id: I2daca7e507daa7bf9cd6a27fa8828a9ea7d175f9
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-04-10 17:04:46 +00:00
Florin Coras
bc1a1a7347 udp: fix local node no port error counter
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie0c5a86aedfa38fdcbb835aee7c9e91d59b222d6
2020-04-10 15:23:02 +00:00
Mohsin Kazmi
f50ef40acb virtio: fix gso and csum offload errors handling
GSO and CSUM offloaded packets are transmitted
even itf doesn't support GSO/CSUM. This patch
fixes it by logging the respective errors and
dropping the packets.

Type: fix

Change-Id: I5ab19d15ce6aa9fda515313c313a5a56c0b96837
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-10 12:22:29 +00:00
Neale Ranns
91fd910d7d geneve: Fix the byte swapping for the VNI
Type: fix

- swipe away the vomit indent left last time.
- add tests for VNIs > 16bit

Change-Id: I2d1f591bfb9d7a18996c38969365a509168d4193
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-04-10 12:21:30 +00:00
ShivaShankarK
ae9c45938b fib: fix adjacency cli command issue
Type: fix

Signed-off-by: ShivaShankarK <shivaashankar1204@gmail.com>
Change-Id: I193023705003e664c50487fdfaa42b813604a078
2020-04-10 07:30:21 +00:00
Florin Coras
12813d5e4a session: fix leak on accept fifo alloc failure
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia928d6ea05ff7cb9a15e1ddc58234d000ebfd7fb
2020-04-09 22:47:02 +00:00
Florin Coras
573f44c2f5 tcp: avoid regrabing error node in input and output
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2dd0187d069783ac8bc445a70f99934d91ae0e63
2020-04-09 21:21:57 +00:00
Simon Zhang
6fe7b75f35 tls: adopt picotls engine to new session scheduling mechanism
Type: fix

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: I58fea0474e293d5e6a029e0dccd4a24b07b76a90
2020-04-09 20:15:08 +00:00
Florin Coras
6d7552ca88 session: update fifo slice on session migration
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic5fb0f95c58ad70925a365004fe911ac8f2d2382
2020-04-09 19:36:28 +00:00
John DeNisco
98c2348b5c docs: Fix the Use Cases Index
Signed-off-by: John DeNisco <jdenisco@cisco.com>
Change-Id: If4d5ef8ab93c905493af074fb4c2096f1ab222d4
2020-04-09 14:23:35 -04:00
neale ranns
81767d71a9 vom: Fixes for g++-9
Type: improvement

Signed-off-by: neale ranns <nranns@cisco.com>
Change-Id: I356251b750fcab05ff91e0295e96a8451e8b2f88
2020-04-09 16:26:32 +00:00
Andrew Yourtchenko
f8f88eff66 misc: add a nerd knob to skip a sysctl during the .deb installation
In some cases, e.g. in the container installs, it's beneficial to skip
the sysctl portion of the installation.

This commit allows to do that by setting the environment variable
VPP_INSTALL_SKIP_SYSCTL.

Change-Id: If88468c5c45bf122e927f09e08560e25b73bf1f9
Type: feature
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-04-09 15:47:27 +00:00
Florin Coras
92bbfc297c udp: fix coverity warning
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I8efde7a4be9b04eae7e30b153de5edab7854496b
2020-04-09 15:15:10 +00:00
Dave Barach
ca57852168 bfd: always start timers with non-zero tick counts
Otherwise the tw_timer_template code ASSERTs...

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I85e00a3e3486e3b238254ac4116d684a32984434
2020-04-09 14:31:16 +00:00
Florin Coras
7a90e500ba svm: use active fifo count in fifo test
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id6c9dbf65523274768173e288431d7dbac55676d
2020-04-09 14:26:13 +00:00
Dave Barach
9cbfb4c513 mpls: fix typo in error path
if ip4_frag_do_fragment(...) returns an error due to buffer allocation
failure, we end up trying to increment a nonexistent counter, which
causes an ASSERT failure.

The second argument to vlib_error_count is a node index, not a
next index...

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib0733b0d35bcb9d3ca6bd789e0c5ddc1561ce724
2020-04-09 11:45:05 +00:00
Dave Barach
1adc7e78ad misc: fix error handling in punt_replicate
If vlib_buffer_clone (...) fails due to a buffer allocation error, update
*n_dispatched with the actual number of clones, not the requested
number of clones.

Punt_replicate(...) should not set *to_next[0] = bi0. The original
buffer is enqueued separately in punt_dispatch_node(...)

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I774ad8f8c1a0633de4cf8ae5530629201c229347
2020-04-09 06:50:11 +00:00
Florin Coras
e759bb543c udp: cleanup input node
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ida9daefc20a161b36d6f36c56267123c7f2efc01
2020-04-08 22:24:41 +00:00
Dave Barach
8324c55f95 ping: fix buffer allocator error handling
The code sets f->n_vectors = n_to_send, but it can bail out of the
loop if vlib_buffer_copy(...) returns 0.

Need to fix f->n_vectors in the error return path, or we enqueue some
number of 0xfefefefe buffer indices in a debug image or worse in a
production image.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I2d886266006c6c1c2f9ef8e3b95eb46ac6c0b3df
2020-04-08 17:22:21 +00:00
Dave Barach
954c707972 misc: check return values from vlib_buffer_copy(...)
vlib_buffer_copy(...) returns NULL if the system is temporarily out of
buffers.

This is NOT correct. Please don't be this person:

   c0 = vlib_buffer_copy (vm, p0);
   ci0 = vlib_get_buffer_index (vm, c0);

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ic25ef58965871ea5d2b40904df9506803f69e47e
2020-04-08 16:29:44 +00:00
Neale Ranns
8d0d8d2fcc gbp: More reliable unit-tests
Type: fix

the GBP unit tests would peridocially fail. The reason being that there
is dynamic state whose presence nneds to be created, tested and then
timeed out. The failures occurded when the timeout occured before the
state could be tested. the previous timeout was 2 seconds, this has been
doubled, as a result i saw no faliures running continuously for ~16
hours.
bumping the timer increasing the test run time from ~40 to ~53 seconds,
a small price to pay.

in test cases where the state is not timed out i bumped the timer to 60
seconds.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I11b0970570caa8eebf486fe8cd8e44a4b2b1fc36
2020-04-08 15:26:33 +00:00
Klement Sekera
61717cc38f nat: use correct data types for memory sizes
Type: fix

Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Id2d181385f109163d4c806eecda166c2087c4b92
2020-04-08 14:54:23 +00:00
Mohsin Kazmi
7d69718543 virtio: fix the tcp/udp checksum offloads
Some vhost-backend calculates the wrong checksum in
case of tcp/udp offload when driver resets tcp/udp
checksum field to '0'.

Type: fix

Change-Id: I1d2a9b95b3d5cc1decac38027104a04df2af4680
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-08 14:40:33 +00:00
Neale Ranns
88cecfad98 ip: do not clear the locally-originated flag
Type: fix

 - doing so in MTU dec, means mtu_inc is broken
 - there's no need to. if a packet encounters ipX-rewrite a second time then it went through a tunnel the first time and is still locally originated.

Change-Id: I0f279c2837b608c1677485fe93f63398ab2737b3
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-04-08 08:28:06 -04:00
Neale Ranns
f18f09b16b acl: fix unresolved symbol for format_fib_prefix in vat plugin
Type: fix

Change-Id: I5bf8d6043a49985b9241df8ff24774892678b557
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-04-08 12:51:11 +00:00
Klement Sekera
ba5f9bc753 nat: ED: global session LRU list
Maintain a global session LRU allowing reuse of expired session instead
of relying on a scavenging mechanism to periodically walk sessions.
Whenever a new session is being allocated in slow path, also attempt to
free an expired session from global LRU list.

Type: improvement

Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I9edde9ec138de67c9a4888e915b0490ec16415fa
2020-04-08 11:07:49 +02:00
Klement Sekera
248ce43c6d nat: preallocate pools
Type: improvement

Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I1be559a98f74c28a9c83fe320c8ce02459793e66
2020-04-08 11:07:49 +02:00
Tetsuya Murakami
6e8e10f79f sr: Fix the coverity issue
Fix the coverity issue on srv/vnet/srv6/sr_localsid.c

Type: fix

Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: I4aeef31cfd67cc1801ab57b94bf4f5ff3d13fd49
2020-04-08 07:59:25 +00:00
Simon Zhang
ae16a98199 session: alloc exact number of bufs for multi-seg deqs
Type: refactor

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I11cf806e22158e021a9a405eb4487a9ed6fdbccf
2020-04-08 00:01:05 +00:00
Florin Coras
a8c3b86ebe session: add more session errors
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9b246eb8a99020de9e5859147c456096fe2e3389
2020-04-07 22:48:23 +00:00
Dave Barach
95e1925332 l2: handle complete clone fail in l2_flood
vlib_buffer_clone(...) may not manage to produce any buffer clones at
all.

vlib_buffer_clone_256 should not smash the original buffer reference
count if no clones are produced.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I14d9d53637a220485c7a0036cfc75a4149b264ea
2020-04-07 22:14:26 +00:00
Klement Sekera
85bee7548b nat: ED: port re-use algorithm
Type: fix

Change-Id: I11440c855eb35d2a6095dfe135e4ab5090f11ff3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2020-04-07 22:11:07 +00:00
Ray Kinsella
b1bb513792 vat: fix vat strncpy stringop-overflow
Fix GCC 9.0 barf on vat strncpy.

Type: fix

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I5e41225d6ac9673a9d953046720df55e7b69c479
Signed-off-by: Dave Barach <dave@barachs.net>
2020-04-07 21:05:53 +00:00
Klement Sekera
26c9d4b0cd nat: don't drop packet for expired session
If session is expired, the packet which we just received might be a one,
which legitimely creates a new session, process it in slow path instead
to decide the outcome.

Type: fix

Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I45628f52d37ae9dee5e8aa58171ff0b86f91f5dd
2020-04-07 19:27:11 +00:00
Florin Coras
c98ef752a2 udp: move cli to separate file
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2057ebb4b6a4af3ef8fd9b73aadfa00d63bae618
2020-04-07 17:37:34 +00:00
Aloys Augustin
1f2e146bd3 tests: pin sphinx and sphinx-rtd-theme
Add these two packages to requirements.txt so that their version and
the version of their dependencies are pinned to limit the risk of
unexpected breakage.

Change-Id: If330404f2e840af3d2628f997ce406cd14e7e128
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-04-07 17:19:42 +00:00
Florin Coras
e10d167bfe tcp: fix conf mtu parsing
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4f0628b0484e32facbeb163993cc25d637167936
2020-04-07 14:47:13 +00:00
Florin Coras
ab57edb8d2 udp session: allow dgram ip fragmentation
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ida8f9e759b4990ea6e34e71dc45bdb3b5eabc27f
2020-04-07 14:46:47 +00:00
Florin Coras
ba78e2380e udp session: jumbo frames and configurable mtu
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6b750bef5df0f8544e05177ccd480f87a020832d
2020-04-07 14:46:47 +00:00
Filip Tehlar
59fea5a6a3 ikev2: make liveness params configurable
Introduce new cli for setting liveness check period and max retries for
a peer to consider its partner dead.

  ikev2 set liveness <period-in-seconds> <max-retires>

Type: improvement

Change-Id: Iadae1de245d34fe3ee85e09b570f9df8c401772b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-04-07 12:29:09 +00:00
Ignas Bacius
483a3d819a sr: fix byte-order in steering API
Type: fix
Change-Id: Ib25e5324e4ba360cd91b92abc78c994f86148148
Signed-off-by: Ignas Bacius <ignas@noia.network>
2020-04-07 10:43:00 +00:00
Tetsuya Murakami
ec9cb96687 sr: Support uSID function.
1. Add uSID function in VNET SRv6
2. Add test case for uSID

Type: feature

Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: I354fc687192ed713ceb81fccc9f7b69b6777f6f6
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
2020-04-07 08:21:43 +00:00
Dave Barach
032a5e3da0 vat: fix static analysis warning
Type: fix
Ticket: VPP-1837

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ia46f865082dcf0cf06af99a7c958c4a5b02193ce
2020-04-06 17:26:05 +00:00
Florin Coras
7a2abce4c9 vcl session: enforce full dgram reads/writes
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4a3861e31ca42faf0b59f8f09393fb10413bf3af
2020-04-06 14:53:31 +00:00
Florin Coras
57660d9df6 session udp: shared local endpoints
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie7102355b95eefb233ec7d146e61819051a7bf07
2020-04-06 14:53:17 +00:00
Andrew Yourtchenko
a2ffc6c2fe docs: pin down sphinx to avoid crash with Sphinx 3.0.0
The vpp-make-test-docs-verify jobs started to fail. The last successful run of it shows:

reating file /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/api/vpp_vxlan_gbp_tunnel.rst.
Creating file /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/api/vpp_vxlan_tunnel.rst.
Creating file /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/api/vrf.rst.
Creating file /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/api/modules.rst.
sphinx-build -b html -d /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/.sphinx-cache  /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/api -c /w/workspace/vpp-make-test-docs-verify-master/test/doc /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/html
Running Sphinx v2.4.4
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 161 source files that are out of date
updating environment: [new config] 161 added, 0 changed, 0 removed
reading sources... [  0%] bfd
reading sources... [  1%] debug
reading sources... [  1%] debug_internal
reading sources... [  2%] discover_tests

The failing jobs show:

Creating file /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/api/vpp_vxlan_tunnel.rst.
Creating file /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/api/vrf.rst.
Creating file /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/api/modules.rst.
sphinx-build -b html -d /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/.sphinx-cache  /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/api -c /w/workspace/vpp-make-test-docs-verify-master/test/doc /w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc/html
Running Sphinx v3.0.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 161 source files that are out of date
updating environment: [new config] 161 added, 0 changed, 0 removed
reading sources... [  0%] bfd

Exception occurred:
  File "/usr/lib/python3.6/inspect.py", line 516, in unwrap
    raise ValueError('wrapper loop when unwrapping {!r}'.format(f))
ValueError: wrapper loop when unwrapping scapy.fields.BitEnumField
The full traceback has been saved in /tmp/sphinx-err-n84dadfq.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Makefile:39: recipe for target 'html' failed
make[2]: *** [html] Error 2
make[2]: Leaving directory '/w/workspace/vpp-make-test-docs-verify-master/test/doc'
Makefile:274: recipe for target '/w/workspace/vpp-make-test-docs-verify-master/build-root/build-test/doc' failed

Type: fix

Change-Id: Id98c0f94104e455ea819aacec62f605e53db13ce
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-04-06 13:44:00 +00:00
Steven Luong
2e1fa54b7e bonding: Add GSO support
Add GSO support, configurable from the CLI.

Type: feature
Ticket: VPP-1820

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I65885a071b24c74437e6cfe5eff237b01bc1744b
(cherry picked from commit a06f68556e506a6ff7f31a617a036614c84f71c0)
2020-04-06 12:12:58 +00:00
Paul Vinciguerra
582eac5c30 misc: fix python sonarcloud BLOCKER level issues
Fix of the top 11 python issues flagged as BLOCKER.

Ticket: VPP-1856
Type: fix

Change-Id: Icf4691e62f4a69d6ee196b6d6e2ab52d961b5c76
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-06 11:30:05 +00:00