vpp.git
4 years agosession tls: support tls descheduling 83/26083/9
Florin Coras [Mon, 23 Mar 2020 15:34:22 +0000 (15:34 +0000)]
session tls: support tls descheduling

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ieb8bb9c6deb92479fdd3e045778fe5ae4782d1ea

4 years agosession tls: improve app transports tx scheduling 85/25485/8
Florin Coras [Thu, 27 Feb 2020 04:32:51 +0000 (04:32 +0000)]
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

4 years agomisc: sprintf be gone 57/26357/1
Dave Barach [Sat, 4 Apr 2020 14:05:48 +0000 (10:05 -0400)]
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

4 years agovcl: fix vcl_test.py sonarcloud issue 56/26356/3
Dave Wallace [Fri, 3 Apr 2020 23:48:48 +0000 (19:48 -0400)]
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

4 years agosession: improve error reporting 95/22895/18
Florin Coras [Mon, 21 Oct 2019 23:07:46 +0000 (16:07 -0700)]
session: improve error reporting

Type: improvement

Change-Id: I9dd850a1ce85b0adb5136233f176117e0ee38817
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agomisc: fix sonarcloud html issue 55/26355/2
Dave Wallace [Fri, 3 Apr 2020 17:50:57 +0000 (17:50 +0000)]
misc: fix sonarcloud html issue

Type: fix

Change-Id: I3691c310fa6336bf2c103c42bccd94c27aab4878
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agosession: init port_proto_type asap 54/26354/2
Florin Coras [Fri, 3 Apr 2020 17:23:42 +0000 (17:23 +0000)]
session: init port_proto_type asap

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idc9b1423846edb46755a255ecc14070e9250d192

4 years agosession udp: fix transport flags and migration 28/26328/2
Florin Coras [Fri, 3 Apr 2020 00:58:48 +0000 (00:58 +0000)]
session udp: fix transport flags and migration

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I840d43e79b1f826380bd56485441510e45bdfc7f

4 years agosession: remove obsolete apis 27/26327/7
Florin Coras [Thu, 2 Apr 2020 23:00:13 +0000 (23:00 +0000)]
session: remove obsolete apis

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia14800710aca7c1bc315b6da3c69d623f79a5b63

4 years agodocs: 80-vpp.conf fix transposition error in comments 31/26331/2
Paul Vinciguerra [Fri, 3 Apr 2020 05:30:15 +0000 (01:30 -0400)]
docs: 80-vpp.conf fix transposition error in comments

Type: docs

Change-Id: I0d75c7673d85c5bd8ae10f48e7189ee28a31240e
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoip: remove vl_api_address_family_t byte order swap 77/26277/3
Jakub Grajciar [Wed, 1 Apr 2020 13:42:06 +0000 (15:42 +0200)]
ip: remove vl_api_address_family_t byte order swap

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I8074db3623ee4b37ac70ce8ea0d1912b97e5c059

4 years agodpdk: VM VHOST tests with rxq>1 failing 01/26301/3
Steven Luong [Thu, 2 Apr 2020 04:50:10 +0000 (21:50 -0700)]
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

4 years agotcp: explicit use of timer wheel in timer apis 99/25999/16
Florin Coras [Wed, 18 Mar 2020 21:26:41 +0000 (21:26 +0000)]
tcp: explicit use of timer wheel in timer apis

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I06120d43c15b2fa3f437ef235bf5f83ec2beb45e

4 years agoipsec: provide stat index in sa details 24/26324/2
Matthew Smith [Thu, 2 Apr 2020 12:45:49 +0000 (07:45 -0500)]
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>
4 years agomisc: fix static analysis warnings 21/26321/3
Dave Barach [Thu, 2 Apr 2020 14:44:09 +0000 (10:44 -0400)]
misc: fix static analysis warnings

One actual bugfix.

Type: fix
Ticket: VPP-1837

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Icef25167f97a70cc795c0a481174de319ed79ad5

4 years agotcp: move features to separate files 98/25998/16
Florin Coras [Wed, 18 Mar 2020 20:31:34 +0000 (20:31 +0000)]
tcp: move features to separate files

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia477b8dba9266f47907967e363c11048e5cd95ab

4 years agodocs: Fix venv under python3 09/25809/5
Paul Vinciguerra [Wed, 11 Mar 2020 17:28:27 +0000 (13:28 -0400)]
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>
4 years agoudp session vcl: add udp iperf test 95/26295/8
Florin Coras [Wed, 1 Apr 2020 23:16:11 +0000 (23:16 +0000)]
udp session vcl: add udp iperf test

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib4bc2ce781887a84055a4d5cdb7f453fc7d52c79

4 years agotcp: count zero wnd enqueue attempts 55/26155/4
Florin Coras [Thu, 26 Mar 2020 02:45:39 +0000 (02:45 +0000)]
tcp: count zero wnd enqueue attempts

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If22bad96a9102bc4058d52fc8565bd6a14c3c66c

4 years agodocs: add a timebase precision section 94/26294/2
Dave Barach [Wed, 1 Apr 2020 22:04:32 +0000 (18:04 -0400)]
docs: add a timebase precision section

Type: docs
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I47434cb305f291a6221780ff4ee9a2c1bb041286

4 years agovppinfra: fix vppinfra test code build 93/26293/2
Dave Barach [Wed, 1 Apr 2020 20:54:00 +0000 (16:54 -0400)]
vppinfra: fix vppinfra test code build

Type: fix
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I921adae4ad797bf80cfcdb05d2a89ace9183a89a

4 years agosession udp: support connect on listeners 27/26227/18
Florin Coras [Sun, 29 Mar 2020 18:54:04 +0000 (18:54 +0000)]
session udp: support connect on listeners

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6aaaec20a2b6d4c6ddfbe659d9402acc1be2f7e2

4 years agovppinfra: add tw_timer_2t_2w_512sl variant 89/26289/2
Dave Barach [Wed, 1 Apr 2020 18:34:39 +0000 (14:34 -0400)]
vppinfra: add tw_timer_2t_2w_512sl variant

Type: feature
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I72cacfb5696dca74335f31415c0df795467615a5

4 years agovcl: support sendto for dgrams 71/26271/4
Florin Coras [Wed, 1 Apr 2020 04:31:21 +0000 (04:31 +0000)]
vcl: support sendto for dgrams

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2a0fdced6a3ae262b30cda6a51f1fa96c1d44665

4 years agosession: allow rx events independnt of state 70/26270/2
Florin Coras [Wed, 1 Apr 2020 04:05:41 +0000 (04:05 +0000)]
session: allow rx events independnt of state

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ica1d4e149f4750517e0bd3ccf2572f6f15f63622

4 years agoudp: improvements to cli 69/26269/2
Florin Coras [Wed, 1 Apr 2020 02:50:13 +0000 (02:50 +0000)]
udp: improvements to cli

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2180e8d5cae6f94a256f3b62950cf66b6ee0e59a

4 years agoudp: track connection port sharing 68/26268/6
Florin Coras [Wed, 1 Apr 2020 00:11:16 +0000 (00:11 +0000)]
udp: track connection port sharing

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I822ed0596944a554595eb62a45841d216d1ab611

4 years agosession: fix fifos display 88/26288/1
Aloys Augustin [Wed, 1 Apr 2020 17:50:17 +0000 (19:50 +0200)]
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>
4 years agoip: Fix the AH/ESP protocol numbers on the API 57/26257/2
Neale Ranns [Tue, 31 Mar 2020 08:25:07 +0000 (08:25 +0000)]
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

4 years agoudp: validate input data length 54/26254/3
Florin Coras [Tue, 31 Mar 2020 01:49:40 +0000 (01:49 +0000)]
udp: validate input data length

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3f34011ca61ded310d0411e7b50548982bd164ac

4 years agonat: fix unknown proto translation out2in_ed 18/26018/4
Alexander Chernavin [Thu, 19 Mar 2020 15:17:52 +0000 (11:17 -0400)]
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>
4 years agoipsec: use id in ipsec_tunnel_protect_details 66/26266/2
Matthew Smith [Tue, 31 Mar 2020 14:52:17 +0000 (09:52 -0500)]
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>
4 years agoikev2: fix crash during peer live check 63/26263/3
Filip Tehlar [Tue, 31 Mar 2020 05:07:48 +0000 (05:07 +0000)]
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>
4 years agoipsec: fix chained ESP 13/26113/3
Filip Tehlar [Thu, 13 Feb 2020 07:49:30 +0000 (07:49 +0000)]
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>
4 years agovlib: move pci api types from vnet/pci to vlib/pci 32/26232/6
Jakub Grajciar [Mon, 30 Mar 2020 06:12:57 +0000 (08:12 +0200)]
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>
4 years agordma: print device info from PCI VPD in 'show hardware' output 43/26243/2
Damjan Marion [Mon, 30 Mar 2020 14:16:06 +0000 (16:16 +0200)]
rdma: print device info from PCI VPD in 'show hardware' output

Type: improvement
Change-Id: I275bbca17c5a0263b3e017b48aa6ccd8f59bc7c3
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agoipsec: fix udp-encap in transport mode 49/26149/3
Alexander Chernavin [Wed, 25 Mar 2020 14:56:52 +0000 (10:56 -0400)]
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>
4 years agotcp: reuse session infra for syns and resets 22/26222/4
Florin Coras [Fri, 27 Mar 2020 23:55:06 +0000 (23:55 +0000)]
tcp: reuse session infra for syns and resets

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I71df27049ef0193578f0c42f8f8bbd5c54e4d53e

4 years agosession udp: flag for connected udp 15/26215/6
Florin Coras [Fri, 27 Mar 2020 15:06:07 +0000 (15:06 +0000)]
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

4 years agovxlan: leverage vlib_get_buffers in vxlan_encap_inline 85/26185/3
Zhiyong Yang [Fri, 27 Mar 2020 13:04:38 +0000 (13:04 +0000)]
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

4 years agovppinfra: add support for avx512 alignment version of load and store 23/26223/2
Zhiyong Yang [Sat, 28 Mar 2020 08:40:25 +0000 (08:40 +0000)]
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

4 years agogso: fix the header parser to read only 53/26153/2
Mohsin Kazmi [Wed, 25 Mar 2020 20:37:16 +0000 (20:37 +0000)]
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>
4 years agointerface: remove mtu clib_warning message from api handler 79/26179/3
Paul Vinciguerra [Fri, 27 Mar 2020 03:40:18 +0000 (23:40 -0400)]
interface: remove mtu clib_warning message from api handler

Type: fix

Change-Id: I85000cce698d44a96adcab7ff6aa37e7dcca51f7
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agovcl: support for uword segments 20/26220/3
Florin Coras [Fri, 27 Mar 2020 18:41:54 +0000 (18:41 +0000)]
vcl: support for uword segments

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibfe203fda5a0c88b26eb50bee8a430dd2cfb7dca

4 years agoquic: Check quicly version tag at compile time 72/24872/14
MathiasRaoul [Fri, 7 Feb 2020 16:29:05 +0000 (16:29 +0000)]
quic: Check quicly version tag at compile time

- updates the quicly version to 0.1.0-vpp
- adds workaround for quicly_send()/assert_consistency() failure
Type: feature

Change-Id: I4c7e0ffc720ad9a685b89046a83646d59febd6cd
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agovppinfra: add clib_bihash_get_bucket 17/26217/2
Damjan Marion [Fri, 27 Mar 2020 15:57:28 +0000 (16:57 +0100)]
vppinfra: add clib_bihash_get_bucket

Type: improvement
Change-Id: I073bb7bea2a55eabbb6c253b003966f0a821e4a3
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agodocs ethernet: add docs for ethernet Section 83/25583/2
Paul Vinciguerra [Mon, 2 Mar 2020 21:10:54 +0000 (16:10 -0500)]
docs ethernet:  add docs for ethernet Section

Type: docs

Change-Id: I6ad92b35df3e0fecb1334511625eacf3e3d8925f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agodocs: minor typos in configuring/startup.rst 59/25559/2
Paul Vinciguerra [Sun, 1 Mar 2020 06:37:37 +0000 (01:37 -0500)]
docs: minor typos in configuring/startup.rst

Change-Id: I8a6596d7cfa84cb2c5ee2d847395e9cea69c5349
Type: docs
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agobuild tests: fix 'test-wipe-papi' target 77/26177/2
Paul Vinciguerra [Fri, 27 Mar 2020 03:11:50 +0000 (23:11 -0400)]
build tests: fix 'test-wipe-papi' target

  Fix transposed terms.

Type: fix

Change-Id: Ibc3f5d5d9dbd81c9edf09ae5024c3ac4b1939d03
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoacl: API cleanup 84/26184/4
Jakub Grajciar [Fri, 27 Mar 2020 05:55:06 +0000 (06:55 +0100)]
acl: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I09fa6c1b6917936351bd376b56c414ce24488095
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agodocs: document lxd container bootstrap procedure 10/26110/4
Dave Barach [Tue, 24 Mar 2020 13:33:23 +0000 (09:33 -0400)]
docs: document lxd container bootstrap procedure

Type: docs

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I9cfa52637e813f2b990688b35634e3af10c58f6a

4 years agodpdk: enable DPDK iAVF PMD 66/25666/2
Chenmin Sun [Wed, 4 Mar 2020 16:46:57 +0000 (00:46 +0800)]
dpdk: enable DPDK iAVF PMD

This patch adds support for the DPDK iAVF PMD

Type: feature

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I7bb0f621774e4c55b9b7309462e6591ce1b88fb6

4 years agoacl: revert acl: api cleanup 72/26172/5
Ole Trøan [Thu, 26 Mar 2020 18:08:35 +0000 (18:08 +0000)]
acl: revert acl: api cleanup

This reverts commit aad1ee149403994194cf37cef4530b042ba7df3a.

Reason for revert: Verify failure. Doesn't build.

Type: fix
Change-Id: I91b1b26ac43edde4853e4561a0083d0b3a06efee
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoacl: API cleanup 87/25787/16
Jakub Grajciar [Wed, 11 Mar 2020 11:47:32 +0000 (12:47 +0100)]
acl: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: If90d753f129312400c4c3669bb86289d0c3e0d99
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agosession: fix coverity warning 69/26169/2
Dave Barach [Thu, 26 Mar 2020 14:56:13 +0000 (10:56 -0400)]
session: fix coverity warning

Type: fix
Ticket: VPP-1837

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib5da600b7a40f775de7dc5b9aaa8d967e49e8632

4 years agonat: transitory timeout for TCP CLOSED state 62/25762/12
Klement Sekera [Tue, 10 Mar 2020 11:32:54 +0000 (12:32 +0100)]
nat: transitory timeout for TCP CLOSED state

Wait transitory timeout seconds before moving internal state of TCP
session to CLOSED state per RFC 7857. This patch implements this
functionality for endpoint-dependent NAT.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I4491d831cd9edf63fae520a516cdbe590bac85db

4 years agosvm: correct format_fifo_segment 58/26158/2
Ryujiro Shibuya [Thu, 26 Mar 2020 07:29:09 +0000 (07:29 +0000)]
svm: correct format_fifo_segment

Type: improvement

Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Change-Id: Ia8aef3695f12e09b087be79ebe40e758fb8105ad

4 years agobuild: use gcc-8 as default on ubuntu 18.04 27/26127/2
Damjan Marion [Tue, 24 Mar 2020 23:33:56 +0000 (00:33 +0100)]
build: use gcc-8 as default on ubuntu 18.04

Type: improvement
Change-Id: I34c9e95ad9160436cb62dec7a1a2d0ce94602ab7
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agotests: speed up ipsec unit tests execution 51/26151/3
Filip Tehlar [Wed, 25 Mar 2020 04:08:55 +0000 (04:08 +0000)]
tests: speed up ipsec unit tests execution

... by removing duplicit test cacses.
There is little value in testing ESN flag when no integ algo
is used. This patch removes such test cases.

Type: improvement

Change-Id: Iae5baa1d39ac32a65d1d28ad57771a87962d8bb3
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agoikev2: fix wrong usage of BN_bn2bin() 48/26148/5
Filip Tehlar [Wed, 25 Mar 2020 02:46:28 +0000 (02:46 +0000)]
ikev2: fix wrong usage of BN_bn2bin()

This patch fixes 2 different crashes:

1) BN_bn2bin() returns bytes written, not actual key length. Use
  BN_bn2binpad() instead which adds padding.
2) Initiator may receive multiple sa-init responses for the same ispi
  which may result in crash. Remember first response and ignore any
  subsequent ones.

Type: fix

Change-Id: Ia1eac9167e3100a6894c0563ee70bab04f6a5f4f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agoikev2: dead peer detection 78/26078/4
Filip Tehlar [Sat, 7 Mar 2020 20:49:01 +0000 (20:49 +0000)]
ikev2: dead peer detection

Type: feature

Change-Id: Ibc65d739583dc11735f993f4c7e7ee6d3c8f5b0a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agoikev2: fix gcm in ike protocol 63/26163/1
Filip Tehlar [Wed, 25 Mar 2020 09:36:32 +0000 (09:36 +0000)]
ikev2: fix gcm in ike protocol

Type: fix

Change-Id: I746b94f494d059d2db5f47638c9f4e6bc4eb4045
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agosession: api to add new transport types 40/25840/12
Florin Coras [Fri, 13 Mar 2020 04:44:51 +0000 (04:44 +0000)]
session: api to add new transport types

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If4dee6dba1ea942daa921d566b35cdecdda680ee

4 years agotcp: avoid updating rcv wnd in resets 92/26092/3
Florin Coras [Mon, 23 Mar 2020 23:24:19 +0000 (23:24 +0000)]
tcp: avoid updating rcv wnd in resets

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0884bf63db57b4b4dbccf41ab64c030b3fe4dde2

4 years agosr: Change the CLI keyword from address to prefix. 25/26125/5
Tetsuya Murakami [Tue, 24 Mar 2020 20:12:13 +0000 (13:12 -0700)]
sr: Change the CLI keyword from address to prefix.

Change the CLI keyword from address to prefix in sr localsid command.

Type: feature

Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: Icc3072404a106ab40e829d2d291e5c179a4443a8
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
4 years agoip: Adding IP tables is no MP safe 34/26134/2
Neale Ranns [Wed, 25 Mar 2020 07:21:09 +0000 (03:21 -0400)]
ip: Adding IP tables is no MP safe

Type: fix

it was marked MP safe in the CLI (which it shouldn't be) but
it it not marked MP safe on the API.

Change-Id: I4bdea498a510a8b406d13d62a899b6d03656f7e8
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoacl: Add CLI additions 15/26115/4
Neale Ranns [Tue, 24 Mar 2020 15:09:41 +0000 (15:09 +0000)]
acl: Add CLI additions

Type: improvement

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I172d3d907f324d8cb21e73aa08ef66da029ed365

4 years agoavf: fix rx queue refill on buffer alloc failure 44/26144/2
Damjan Marion [Wed, 25 Mar 2020 10:44:41 +0000 (11:44 +0100)]
avf: fix rx queue refill on buffer alloc failure

If buffer alloc fails, it may happend that rx queue will be stuck
as old code only refills if at least one packet is received.

Type: fix
Change-Id: I388c4f8a9fb2c208bdc222e31b443cbe6b94af82
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agonat: fix error counters 01/26101/2
Klement Sekera [Tue, 24 Mar 2020 11:20:46 +0000 (12:20 +0100)]
nat: fix error counters

Type: fix

Change-Id: I021b1427362f4bdba1c0ebc9863c9143dd6b3cb7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agomap: fix hop limit expiration at br 91/25991/4
Vladimir Ratnikov [Wed, 18 Mar 2020 12:20:08 +0000 (08:20 -0400)]
map: fix hop limit expiration at br

Before this patch, packet was dropped in ip4-input,
but ip4-map-t node dropped response due to
'security check failed'
This patch checkes if hop_limit==1 and sets error
and next frame and sends icmp6 response correctly

Type: fix

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: I85a6af58205b05754ef8c45a94817bb84f915c85

4 years agoquic: disable vnet_crypto and batching if no crypto engines are loaded 98/26098/4
MathiasRaoul [Tue, 24 Mar 2020 09:45:55 +0000 (09:45 +0000)]
quic: disable vnet_crypto and batching if no crypto engines are loaded

Type: fix

Change-Id: I95d3f8431b468cefc8777526dd3b988a299f0687
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
4 years agovcl: fix ldp recv return on error 14/26114/2
Florin Coras [Tue, 24 Mar 2020 15:24:29 +0000 (15:24 +0000)]
vcl: fix ldp recv return on error

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0875705d3a0c95f2781b0595ef27a30486438aae

4 years agovcl: fix ldp writev 0 vecs 85/26085/3
Florin Coras [Mon, 23 Mar 2020 16:00:35 +0000 (16:00 +0000)]
vcl: fix ldp writev 0 vecs

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iec5db8dcf3a019b731e15fd79d0208d6eb10943b

4 years agomap: fix translation of icmp6 error messages 14/25714/5
Alexander Chernavin [Fri, 6 Mar 2020 11:11:07 +0000 (06:11 -0500)]
map: fix translation of icmp6 error messages

Translation of ICMPv6 error messages to ICMP error messages fails
because the sender port is not set that leads to securtiy check
failure.

With this commit, during ICMPv6 error messages translation, get the
sender port value from the inner packet.

Type: fix

Change-Id: I1ee295a3685fab4837172edfb629a699f49afbee
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
4 years agoavf: proper promisc handling 06/26106/1
Damjan Marion [Tue, 24 Mar 2020 12:51:13 +0000 (13:51 +0100)]
avf: proper promisc handling

Type: fix
Change-Id: Id20a0fe77372602fd211156ccee01c18d829d8df
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agotcp: add lost and in flight to byte tracker 11/25811/8
Florin Coras [Wed, 11 Mar 2020 18:30:48 +0000 (18:30 +0000)]
tcp: add lost and in flight to byte tracker

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3b0041d72d835cbb11e803cc56ac4c68a68238a0

4 years agoikev2: fix typo in .api description 76/26076/2
Vratko Polak [Mon, 23 Mar 2020 12:01:54 +0000 (13:01 +0100)]
ikev2: fix typo in .api description

Type: style

Change-Id: Ie81eb7e3d872923daaa8ae8dad060a4da85349c5
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agoipsec: Revert "ipsec: fix chained ESP" 89/26089/4
Florin Coras [Mon, 23 Mar 2020 18:13:32 +0000 (18:13 +0000)]
ipsec: Revert "ipsec: fix chained ESP"

This reverts commit c2c1bfd9b72aec88526c06479b128725eb525866.

Reason for revert: Seems it's breaking ipsec esp tests

Type: fix

Change-Id: Iac590eee23cbf92a10c62dafa789aa9c3b2284dd
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agodocs: add container functional test writeup 44/26044/5
Dave Barach [Fri, 20 Mar 2020 12:06:04 +0000 (08:06 -0400)]
docs: add container functional test writeup

Fix global copyright date

Type: docs
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I7f010d63ec010982f2c8c8388f14214fa6ced0a7

4 years agosrv6-mobile: Fix the coverity issues 62/26062/3
Tetsuya Murakami [Sun, 22 Mar 2020 20:19:43 +0000 (13:19 -0700)]
srv6-mobile: Fix the coverity issues

Fix for the coverity issues.

Type: fix

Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: I6bf8a874a9a94b9b7d62da047a401eda8a448567
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
4 years agosr: srv6 API cleanup 47/25647/4
Jakub Grajciar [Wed, 4 Mar 2020 12:08:27 +0000 (13:08 +0100)]
sr: srv6 API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I3c348ad2fca8bb3d9a246af7a2aa9dc9c33f57c3
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoipsec: fix chained ESP 07/25207/2
Filip Tehlar [Thu, 13 Feb 2020 07:49:30 +0000 (07:49 +0000)]
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: I1d4da029b952baa97400adb7173aa63fd97d916b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agoipsec: increment no-tunnel counter in ipsec-tun-input 51/26051/3
Alexander Chernavin [Fri, 20 Mar 2020 14:36:43 +0000 (10:36 -0400)]
ipsec: increment no-tunnel counter in ipsec-tun-input

If "no-tunnel" error erises, you will not see it in the "show errors"
output because the packet will be punted. That fact complicates
troubleshooting.

Type: improvement

Change-Id: Ic08347f81131a4a73a05b66acbfb02797373f5ab
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
4 years agovirtio: vhost gso checksum error when both indirect and mrg_rxbuf are off 59/25959/2
Steven Luong [Tue, 17 Mar 2020 16:01:30 +0000 (09:01 -0700)]
virtio: vhost gso checksum error when both indirect and mrg_rxbuf are off

Turn on gso, turn off both indirect and mrg_rxbuf caused traffic received
and sent with checksum error. The problem is we are not mapping the hdr
correctly in the shared memory address.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I7ef3bc2755544167b0e624365988111b17399e89

4 years agotap: fix the numa/queue for buffers 90/25990/4
Mohsin Kazmi [Wed, 18 Mar 2020 12:17:00 +0000 (13:17 +0100)]
tap: fix the numa/queue for buffers

Type: fix

Change-Id: Ib320171708bebde6d1dae0b2c665f9bcfc9102db
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agovirtio: improve error handling 79/25679/5
Mohsin Kazmi [Thu, 5 Mar 2020 12:22:41 +0000 (12:22 +0000)]
virtio: improve error handling

Type: improvement

Change-Id: I134465760272ceb29f85486cba838d8687696bbf
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agodocs: Fix build on fresh ubuntu 18.04 50/26050/5
John DeNisco [Fri, 20 Mar 2020 14:03:47 +0000 (10:03 -0400)]
docs: Fix build on fresh ubuntu 18.04

Type: docs
Signed-off-by: John DeNisco <jdenisco@cisco.com>
Change-Id: If842c92183a9cf4b5a9773dced3298005b327e1a

4 years agodpdk: false link down issue with ixgbe NIC 23/26023/3
Lijian.Zhang [Thu, 19 Mar 2020 02:22:52 +0000 (10:22 +0800)]
dpdk: false link down issue with ixgbe NIC

This issue is observed with X520-2 NICs on FD.io lab Taishan server.
After VPP booting up and bringing up  the interfaces with command "set
interface state <interface> up", it still shows link down status from
the command "show hardware-interfaces". However, the hardware link
status is actually up. dpdk_process() cannot get the hardware link
status correctly via rte_eth_link_get_nowait().

In ixgbe_dev_link_update_share(), if the media type is fiber and the
link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback to
ixgbe_dev_setup_link_alarm_handler() is scheduled trying to set up the
link and clear the flag afterwards.

If the device is started or stopped before the flag is cleared, the
scheduled callback is canceled. This causes the flag to remain set and
subsequent calls to ixgbe_dev_link_update_share() return without trying
to retrieve the link state because the flag is set.

When the callback is canceled by either interface start or stop
operation, in ixgbe_dev_cancel_link_thread(), after cancelling the
callback/thread, unset the flag on the device to avoid this condition.

Type: fix

Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com>
Change-Id: I04de377dc048307a78a5b7109ebdfaf376d5e029

4 years agovppinfra: fix typo in dlmalloc.c 58/26058/2
Dave Barach [Sat, 21 Mar 2020 15:15:48 +0000 (11:15 -0400)]
vppinfra: fix typo in dlmalloc.c

Fix libffi package name for Ubuntu 20.04

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Idc567717494b4c40c307f20a40d5e10cd26b0a46

4 years agosrv6-mobile: Fix the localsid length issue on vnet/srv6 59/26059/1
Tetsuya Murakami [Sat, 21 Mar 2020 21:47:02 +0000 (14:47 -0700)]
srv6-mobile: Fix the localsid length issue on vnet/srv6

Fix the following issue.

1. The localsid length was not stored in sr localsid structure.
2. SRv6 mobile test cases were modified based on the new sr localsid CLI syntax.

Type: fix

Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: Ieb7620c35439e90a599802a7e0dba61a39707349

4 years agosrv6-mobile: Support GTP4/6.DT and User Plane message mapping 64/25664/3
Tetsuya Murakami [Thu, 5 Mar 2020 00:27:14 +0000 (16:27 -0800)]
srv6-mobile: Support GTP4/6.DT and User Plane message mapping

Support the following new features in srv6-mobile.

1. GTP4.DT
2. GTP6.DT
3. User Plane Message encoding based on draft-murakami-dmm-user-plane-message-encoding-01
4. Add SRv6 mobile test cases

Type: feature

Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: I890e5171bf03513d54b4830f01b9dc7f47fe7c48
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
4 years agoipsec: efficient layout of ESP per thread data 33/25933/8
Rajesh Goel [Tue, 17 Mar 2020 09:13:09 +0000 (14:43 +0530)]
ipsec: efficient layout of ESP per thread data

Type: fix
Change-Id: I1ba921503a41ca37ce5c920682893617740571a9
Signed-off-by: Rajesh Goel <rajegoel@cisco.com>
4 years agovppinfra: fix minor cuckoo bugs and add cuckoo_16_8 11/25311/5
Klement Sekera [Thu, 20 Feb 2020 11:39:58 +0000 (11:39 +0000)]
vppinfra: fix minor cuckoo bugs and add cuckoo_16_8

Type: improvement

Change-Id: If1164d2eb81e9d4748436cb1bb8b164857d70565
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agogtpu: encap-vrf-id in show gtpu tunnels command 13/25713/3
Nick Zavaritsky [Thu, 5 Mar 2020 17:24:37 +0000 (17:24 +0000)]
gtpu: encap-vrf-id in show gtpu tunnels command

Show encap-vrf-id instead of fib-idx.  When a tunnel is created, you
specify encap-vrf-id, hence it makes sense for the show command to
present it the same way.  Fib index, on the other hand, is the internal
artifact of how IP tables are managed; showing it isn't helpful.

Type: improvement
Change-Id: I8d1713d6727dd8685d6c10c07f421c18edafa6e0
Signed-off-by: Nick Zavaritsky <nick.zavaritsky@emnify.com>
4 years agolibmemif: don't consume rx queue interrupt, if memif_rx_burst fails 38/25638/3
Jan Cavojsky [Tue, 3 Mar 2020 15:25:58 +0000 (16:25 +0100)]
libmemif: don't consume rx queue interrupt, if memif_rx_burst fails

Type: fix

Signed-off-by: Jan Cavojsky <jan.cavojsky@pantheon.tech>
Change-Id: Ic6c15c88c80c4045c290cd78533be6f070c7470a

4 years agovlib: leave SIGPROF signal with its default handler 06/25906/2
Jieqiang Wang [Mon, 20 Jan 2020 05:43:38 +0000 (13:43 +0800)]
vlib: leave SIGPROF signal with its default handler

When profiling VPP with MAP (a software profile suite on Arm CPUs, see details in
https://www.arm.com/products/development-tools/server-and-hpc/forge/map) on Arm
servers, VPP will receive SIGPROF signal because MAP uses SIGPROF signal to drive
its sampler to do profiling on VPP. However, the default action of SIGPROF signal
handler in VPP such as unix_signal_handler() is process termination. To profile
VPP with MAP, the SIGPROF handler should be left as default, and MAP sampler will
overwrite it with its own implementation.

Type: feature

Change-Id: Ie14e513d35ec27a66e95067689408bad8ed1ad6b
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
4 years agovlib: allow using core 0 as a last resort 45/25945/2
Vladimir Isaev [Tue, 17 Mar 2020 09:56:31 +0000 (12:56 +0300)]
vlib: allow using core 0 as a last resort

Right now even following configuration fails:
cpu {
    corelist-workers 0
}
I think we should allow user to use CPU 0 if he explicitly
configured it or as the last automatically assigned core.

Type: improvement
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I041c30349bace558c673475e9a0cffccae5821f7

4 years agovlib: complain if workers are configured twice 44/25944/2
Vladimir Isaev [Tue, 17 Mar 2020 09:30:11 +0000 (12:30 +0300)]
vlib: complain if workers are configured twice

Right now following configuration leads to crash:
cpu {
    corelist-workers 2
    workers 2
}

because threads count will be set to 2, but we have only
one core in coremask.

Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: Ia93b892733971e7c8ddfceaaec5f4eb8bf9063ac

4 years agoikev2: fix l2 interface 56/25956/3
Filip Tehlar [Tue, 17 Mar 2020 15:26:06 +0000 (15:26 +0000)]
ikev2: fix l2 interface

Type: fix

Change-Id: Ic6457da31846721e334f144f15d404575eeb73e5
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agovirtio: fix link up/down flag 15/26015/2
Mohsin Kazmi [Thu, 19 Mar 2020 13:03:31 +0000 (14:03 +0100)]
virtio: fix link up/down flag

Type: fix

"set int state <interface> down" puts the virtio device link
down. It will not put the link in "UP" state, when
"set int state <interface up>" will be used again to change
the interface admin up. This patch fixes it.

To test:
create tap
set int state tap0 up
set int state tap0 down
sh hardware
sh int
set int state tap0 up
sh int
sh hardware

Change-Id: I3c0e31539f8a2a1e40220e7fb57eedecf408f067
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>