8756 Commits

Author SHA1 Message Date
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
Filip Tehlar
c17d6cfaf4 ikev2: fix wrong index computation
Type: fix

Change-Id: Ia7b07b4ec9e5681946f3f5c01c230c1f814e2cf6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-04-06 09:09:14 +00:00
Klement Sekera
1766ddca44 ip: reassembly: don't set error if no error
Type: fix

Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I9d25129fbf1ea880121b281f41750155286fb489
2020-04-06 08:59:20 +00:00
Dave Barach
0250090fc0 misc: strcpy be gone
Causes static analysis "vulnerability" warnings

Type: fix
Ticket: VPP-1837

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I272fa69251d70f62178e6dff0423c16f99937af1
2020-04-04 18:37:01 -04:00
Florin Coras
9f86d225ab session tls: support tls descheduling
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ieb8bb9c6deb92479fdd3e045778fe5ae4782d1ea
2020-04-04 17:34:13 +00:00
Florin Coras
ed8db52539 session tls: improve app transports tx scheduling
Type: improvement

- allow apps to request rescheduling of tx events via
SESSION_F_CUSTOM_TX flag
- limit max burst per session custom tx dispatch

In tls
- use the new infra to reschedule tx events
- use max burst bytes as upper limit to number of bytes to be encrypted

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I544a5a3337af7ebdff3406b776adf30cf96ebf3c
2020-04-04 17:34:13 +00:00
Dave Barach
3e07a4a1e8 misc: sprintf be gone
Along with related static analysis warnings...

Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I2c6949c7a2250b8f76a63508c7c210daecfe0f91
2020-04-04 10:14:06 -04:00
Dave Wallace
3102c382f0 vcl: fix vcl_test.py sonarcloud issue
- Updated comment to indicate the original
  intermittent test failure still occurs when
  running make test with TEST_JOBS > 1.
- The original workaround has been retained
  until the root cause can be determined to
  avoid test failures in the LF CI infra
  with patches containing non-vcl code changes.

Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I2645acd4bf2b16fbb2b0e297c8c2919fc6199c13
2020-04-04 12:04:15 +00:00
Florin Coras
00e01d3e87 session: improve error reporting
Type: improvement

Change-Id: I9dd850a1ce85b0adb5136233f176117e0ee38817
Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-04-03 22:10:22 +00:00
Dave Wallace
39aa7a5202 misc: fix sonarcloud html issue
Type: fix

Change-Id: I3691c310fa6336bf2c103c42bccd94c27aab4878
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-04-03 19:52:31 +00:00
Florin Coras
e33c0021c3 session: init port_proto_type asap
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idc9b1423846edb46755a255ecc14070e9250d192
2020-04-03 17:27:33 +00:00
Florin Coras
d85666fdfd session udp: fix transport flags and migration
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I840d43e79b1f826380bd56485441510e45bdfc7f
2020-04-03 14:57:12 +00:00
Florin Coras
888d9f05ef session: remove obsolete apis
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia14800710aca7c1bc315b6da3c69d623f79a5b63
2020-04-03 14:56:27 +00:00
Paul Vinciguerra
ea7ac91da3 docs: 80-vpp.conf fix transposition error in comments
Type: docs

Change-Id: I0d75c7673d85c5bd8ae10f48e7189ee28a31240e
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-03 12:48:49 +00:00
Jakub Grajciar
4fce36b8f9 ip: remove vl_api_address_family_t byte order swap
Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I8074db3623ee4b37ac70ce8ea0d1912b97e5c059
2020-04-03 11:26:28 +00:00
Steven Luong
b32436aab9 dpdk: VM VHOST tests with rxq>1 failing
DPDK recently added a check in the virtio driver to make sure that
rxmode->mq_mode == ETH_MQ_RX_NONE. We were passing ETH_MQ_RX_RSS
and the device initialization was not accepted.

The reason for the change in DPDK was that there is no controls
(algorithm, redirection table, hash function). So they thought ETH_MQ_RX_NONE
was the best choice for the value of mq_mode.

Type: fix
Ticket: VPP-1853

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ifa0fc4206cedc56a851f94f6434a2a7500bbd419
2020-04-02 20:58:54 +00:00
Florin Coras
0765d97abe tcp: explicit use of timer wheel in timer apis
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I06120d43c15b2fa3f437ef235bf5f83ec2beb45e
2020-04-02 19:17:11 +00:00
Matthew Smith
48d32b43c5 ipsec: provide stat index in sa details
Type: improvement

When IPsec SAs are dumped, include the index that can be used to
find byte & packet counters for the SA in the stat segment.

Removed the field total_data_size from the details since it was not
being populated and put the stat index field in its place.

Change-Id: If73efc230542a11944551b6e710b57b575450da3
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2020-04-02 17:28:24 +00:00
Dave Barach
c35f3e835b misc: fix static analysis warnings
One actual bugfix.

Type: fix
Ticket: VPP-1837

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Icef25167f97a70cc795c0a481174de319ed79ad5
2020-04-02 16:08:13 +00:00
Florin Coras
999840cf80 tcp: move features to separate files
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia477b8dba9266f47907967e363c11048e5cd95ab
2020-04-02 15:10:26 +00:00
Paul Vinciguerra
a26f54421a docs: Fix venv under python3
See ticket for output under containers for each distro.

Ticket: VPP-1851
Type: docs

Change-Id: I0d80dabeb30d92d09edffa503b05d5eef08313dc
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-02 13:29:28 +00:00
Florin Coras
57a5a2df59 udp session vcl: add udp iperf test
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib4bc2ce781887a84055a4d5cdb7f453fc7d52c79
2020-04-02 11:28:01 +00:00
Florin Coras
dfd980fcff tcp: count zero wnd enqueue attempts
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If22bad96a9102bc4058d52fc8565bd6a14c3c66c
2020-04-02 11:27:33 +00:00
Dave Barach
883bf3d1a3 docs: add a timebase precision section
Type: docs
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I47434cb305f291a6221780ff4ee9a2c1bb041286
2020-04-02 01:24:28 +00:00
Dave Barach
d7b828f0cf vppinfra: fix vppinfra test code build
Type: fix
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I921adae4ad797bf80cfcdb05d2a89ace9183a89a
2020-04-01 22:47:07 +00:00
Florin Coras
0a1e183e5a session udp: support connect on listeners
Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6aaaec20a2b6d4c6ddfbe659d9402acc1be2f7e2
2020-04-01 20:24:38 +00:00
Dave Barach
9076789779 vppinfra: add tw_timer_2t_2w_512sl variant
Type: feature
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I72cacfb5696dca74335f31415c0df795467615a5
2020-04-01 19:49:02 +00:00
Florin Coras
5da10c4c55 vcl: support sendto for dgrams
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2a0fdced6a3ae262b30cda6a51f1fa96c1d44665
2020-04-01 19:21:45 +00:00
Florin Coras
805d58c2f6 session: allow rx events independnt of state
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ica1d4e149f4750517e0bd3ccf2572f6f15f63622
2020-04-01 19:21:25 +00:00
Florin Coras
9c4ec6fc2c udp: improvements to cli
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2180e8d5cae6f94a256f3b62950cf66b6ee0e59a
2020-04-01 19:20:55 +00:00
Florin Coras
a039620c2e udp: track connection port sharing
Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I822ed0596944a554595eb62a45841d216d1ab611
2020-04-01 19:20:55 +00:00
Aloys Augustin
6eef40bce3 session: fix fifos display
This prevents a crash with quic listeners, and enables the display
of udp fifo status.

Change-Id: Ib9f48818ee3e51a3fa43ad8ab175e8aa7750df8f
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-04-01 19:52:22 +02:00
Neale Ranns
164c44f0b8 ip: Fix the AH/ESP protocol numbers on the API
Type: fix

this is mainly cosmetic, assuming users use the symbolic names,
since VPP's API types encode/decode functions corrected the values

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Iecbb8102aee64b2565a3fc89a30cad73a935269d
2020-04-01 12:27:03 +00:00
Florin Coras
936197467a udp: validate input data length
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3f34011ca61ded310d0411e7b50548982bd164ac
2020-03-31 20:24:40 +00:00
Alexander Chernavin
8c18f85d32 nat: fix unknown proto translation out2in_ed
An unknown proto packet can be processed as UDP with destination port
rewriting which breaks the original packet.

With this commit, stop processing unknown proto packets after
nat44_ed_out2in_unknown_proto() execution.

Type: fix

Change-Id: Iea93faf3c282f542d5ee7120c15e1027c1e4abc9
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2020-03-31 19:57:54 +00:00
Matthew Smith
5cee0bca5d ipsec: use id in ipsec_tunnel_protect_details
Type: fix

The data populated into an ipsec_tunnel_protect_details message includes
an outbound SA and a list of inbound SAs for a tunnel interface. These
are populated with SA indices. The values used by an API client
to refer to an SA in other messages is the SA id rather than the index.
Use the SA id instead of the index.

Change-Id: Ifaad32801092a7f87bd0dcf19de418d36613f8dd
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2020-03-31 17:02:39 +00:00
Filip Tehlar
967e9afa65 ikev2: fix crash during peer live check
Fix crash when peer tries to build INFO req before key exchange which
results using NULL key pointers for crypto operations.

Type: fix

Change-Id: I20aaf1ce769e4bfb45235047c2dd38307b4e0b59
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-03-31 15:09:54 +00:00
Filip Tehlar
e4e8c6b082 ipsec: fix chained ESP
This fixes a special case when buffer chain enters decrypt node
and becomes a single buffer after decryption.

Type: fix

Change-Id: Id5da9e8a074f83ec3561949631ce613f35528312
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-03-31 10:14:30 +00:00
Jakub Grajciar
53f06a0148 vlib: move pci api types from vnet/pci to vlib/pci
Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I1a60809a8bbbbb8ac8b65ab990d51aae1229647f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-31 10:09:19 +00:00
Damjan Marion
e6b4a5ac14 rdma: print device info from PCI VPD in 'show hardware' output
Type: improvement
Change-Id: I275bbca17c5a0263b3e017b48aa6ccd8f59bc7c3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-03-31 10:07:15 +00:00
Alexander Chernavin
b0d2eda75a ipsec: fix udp-encap in transport mode
Now UDP enacapsulation doesn't work in transport mode with crypto
algorithms that have iv_sz=8 like AES GCM or 3DES CBC. That happens
because the inserted UDP header overlaps with the old IP header and
gets filled before the information from the old IP header can be
copied to a new IP header. The result is a broken packet:

00:03:39:620863: esp4-encrypt-tun
  esp: sa-index 3 spi 3464048590 (0xce792fce) seq 31 sa-seq-hi 0
    crypto aes-gcm-128 integrity none udp-encap-enabled
00:03:39:620867: adj-midchain-tx
  ...
00:03:39:620868: ip4-rewrite
  ...
00:03:39:620869: GigabitEthernet0/8/0-output
  GigabitEthernet0/8/0
  IP4: 08:00:27:a9:6b:d6 -> 08:00:27:5a:dd:0c
  UDP: 10.255.0.10 -> 10.255.0.20
    version 0, header length 0
    tos 0x80, ttl 63, length 0, checksum 0x653e (should be 0xffff)
      dscp CS4 ecn NON_ECN
    fragment id 0x0000
  UDP: 128 -> 0
    length 0, checksum 0x0000
00:03:39:620870: GigabitEthernet0/8/0-tx
  GigabitEthernet0/8/0 tx queue 0
  ...
  IP4: 08:00:27:a9:6b:d6 -> 08:00:27:5a:dd:0c
  UDP: 10.255.0.10 -> 10.255.0.20
    version 0, header length 0
    tos 0x80, ttl 63, length 0, checksum 0x653e (should be 0xffff)
      dscp CS4 ecn NON_ECN
    fragment id 0x0000
  UDP: 128 -> 0
    length 0, checksum 0x0000

With this commit, fill UDP header after copying the IP headers in
transport mode.

Type: fix

Change-Id: Ie9a6e562aa05a8378114329d6a9ff395189fa6a8
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2020-03-31 09:06:43 +00:00
Florin Coras
5484daa001 tcp: reuse session infra for syns and resets
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I71df27049ef0193578f0c42f8f8bbd5c54e4d53e
2020-03-30 20:34:48 +00:00
Florin Coras
87b7e3df2b session udp: flag for connected udp
Type: improvement

This can be used as alternative to udpc

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic3f7efe6728b25d4a8a0b61ddb36de66b4672c4f
2020-03-30 20:34:30 +00:00
Zhiyong Yang
102dd1cfa7 vxlan: leverage vlib_get_buffers in vxlan_encap_inline
vlib_get_buffers can save about 1.2 clocks per packet for vxlan encap
graph node on Skylake.

Type: improvement

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Change-Id: I9cad3211883de117c1b84324e8dfad38879de2d2
2020-03-30 12:59:09 +00:00
Zhiyong Yang
0c7aa7ab54 vppinfra: add support for avx512 alignment version of load and store
Type: improvement

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Change-Id: Idfec9cb9370a8cf4966d3fdfa440496f21e17005
2020-03-30 12:57:32 +00:00
Mohsin Kazmi
0937fdfa86 gso: fix the header parser to read only
Previously, header parser sets the tcp/udp checksum to 0.
It should be read only function for vlib_buffer_t.

Type: fix

Change-Id: I9c3398372f22998da3df188f0b7db13748303068
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-03-30 11:39:22 +00:00