vpp.git
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>
4 years agoikev2: add support for custom ipsec-over-udp port 73/25573/4
Filip Tehlar [Mon, 2 Mar 2020 15:17:37 +0000 (15:17 +0000)]
ikev2: add support for custom ipsec-over-udp port

Type: feature

Change-Id: Ifee2b3dca85ea915067b9285e3636802bf0c19a8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agovirtio: fix the out of order descriptors in tx 94/25494/10
Mohsin Kazmi [Thu, 27 Feb 2020 10:49:21 +0000 (11:49 +0100)]
virtio: fix the out of order descriptors in tx

Type: fix

Some vhost-backends give used descriptors back in
out-of-order. This patch fixes the native virtio to
handle out-of-order descriptors.

Change-Id: I57323303349f6a385e412ee22772ab979ae8edbf
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agovlib: fix error when creating avf interface on SMP system 96/25896/2
Jieqiang Wang [Mon, 13 Jan 2020 09:15:13 +0000 (17:15 +0800)]
vlib: fix error when creating avf interface on SMP system

On SMP architecture, '/sys/bus/pci/devices/<devices id>/numa_node' file
will return -1 as a valid value if it does not have any NUMA node information.
Using -1 as a valid node id to access data structures will cause memory issue.
Fix the error by setting the value of numa_node to 0 if '/sys/bus/pci/devices/
<devices id>/numa_node' returns -1 and it is a SMP system.

Type: fix

Change-Id: Ib60e79c3656fe5b17e08fd9011122683e8b08b6f
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
4 years agotcp: avoid spurious retransmit attempt 57/26057/1
Florin Coras [Fri, 20 Mar 2020 20:25:37 +0000 (20:25 +0000)]
tcp: avoid spurious retransmit attempt

Type: improvement

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

4 years agordma: ring db only once per vector on tx 47/26047/2
Benoît Ganne [Thu, 19 Mar 2020 10:41:07 +0000 (11:41 +0100)]
rdma: ring db only once per vector on tx

Type: improvement

Change-Id: I09b017d60bc38ff8a4a7a73aff42b27611bd8955
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosession: export session_alloc_for_connection 39/26039/2
Andreas Schultz [Fri, 20 Mar 2020 08:39:59 +0000 (09:39 +0100)]
session: export session_alloc_for_connection

Type: refactor

Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: I45c6f434065ab0ad8ada3184b5a875a32a1b3faa

4 years agoip: provide extern declaration for ip punt nodes 22/26022/2
Jawahar Santosh Gundapaneni [Thu, 19 Mar 2020 20:42:28 +0000 (16:42 -0400)]
ip: provide extern declaration for ip punt nodes

Type: fix

Signed-off-by: Jawahar Santosh Gundapaneni <jgundapa@cisco.com>
Change-Id: Ife0f7749a72cc834a3d811f8cf6b5a0840157014

4 years agoip: ip API types coverity fix 46/26046/1
Jakub Grajciar [Fri, 20 Mar 2020 12:48:50 +0000 (13:48 +0100)]
ip: ip API types coverity fix

Type: fix

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

4 years agotcp: move accept init to separate reusable function 61/25961/4
Florin Coras [Tue, 17 Mar 2020 17:09:12 +0000 (17:09 +0000)]
tcp: move accept init to separate reusable function

Type: refactor

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

4 years agotcp: force deschedule if no send space available 81/25881/12
Florin Coras [Fri, 13 Mar 2020 20:39:43 +0000 (20:39 +0000)]
tcp: force deschedule if no send space available

Type: improvement

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

4 years agosession tcp udp: consolidate transport snd apis 72/25872/8
Florin Coras [Fri, 13 Mar 2020 17:54:42 +0000 (17:54 +0000)]
session tcp udp: consolidate transport snd apis

Type: improvement

Use only one api to retrieve transport send parameters. Additionally,
allow transports to request postponing and descheduling of events.

With this, tcp now requests descheduling of sessions when the
connections are stuck probing for zero snd_wnd

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

4 years agotcp: count dupacks with no sacks 33/25833/6
Florin Coras [Thu, 12 Mar 2020 15:50:57 +0000 (15:50 +0000)]
tcp: count dupacks with no sacks

Type: fix

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

4 years agoip: change ip API enums address_family and ip_proto size to u8 05/26005/6
Jakub Grajciar [Thu, 19 Mar 2020 07:03:55 +0000 (08:03 +0100)]
ip: change ip API enums address_family and ip_proto size to u8

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I73d27520726543d6375caad76a841339f68c3533
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agofib: format functions for path 54/25954/3
Neale Ranns [Tue, 17 Mar 2020 14:24:09 +0000 (14:24 +0000)]
fib: format functions for path

Type: improvement

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

4 years agobuild: add snap packaging (experimental) 93/25993/2
Dave Barach [Wed, 18 Mar 2020 14:14:40 +0000 (10:14 -0400)]
build: add snap packaging (experimental)

Type: feature

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

4 years agoethernet: Copy only 6 bytes of mac address into a u64 51/25751/6
Jon Loeliger [Mon, 9 Mar 2020 18:13:35 +0000 (13:13 -0500)]
ethernet: Copy only 6 bytes of mac address into a u64

Rather than leaving 2 bytes of junk in the upper word
of a mac address represented as a u64, zero them out.
That way later compairsons stand a chance of matching
when deleting a bridge's arp termination entries.

The volatile qualifier shouldn't be needed here, but
without it the compiler removes the clib_memcpy() at -O2.
Bad compiler.  No biscuit.

Type: fix
commit: faf22cb303b65e2a6bf8dad959d7f5ee6d031c4f

Change-Id: Iebcf35fdd421293dccbcaefadef767f7e139438e
Signed-off-by: Jon Loeliger <jdl@netgate.com>
4 years agopg: update packet generator test scripts 85/25985/2
ShivaShankarK [Wed, 18 Mar 2020 10:04:11 +0000 (15:34 +0530)]
pg: update packet generator test scripts

update packet generator test scripts to reflect latest code changes

Type: fix

Signed-off-by: ShivaShankarK <shivaashankar1204@gmail.com>
Change-Id: I048a5e8b9b0506dcb0b664e5549d13f51b2e2ea6

4 years agofib: Always install all routers mcast addresses 55/25955/5
Neale Ranns [Tue, 17 Mar 2020 14:25:10 +0000 (14:25 +0000)]
fib: Always install all routers mcast addresses

Type: improvement

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

4 years agosvm: fifo test 31/25931/3
Ryujiro Shibuya [Tue, 17 Mar 2020 02:04:28 +0000 (02:04 +0000)]
svm: fifo test

Type: feature

Adding a very simple test case just to confirm that setting fifo size
same as the current in-use size would result no space to enqueue, which
is zero-window in the TCP.

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

4 years agoip: ip_address_t uses ip46_address_t 91/25391/8
Neale Ranns [Mon, 24 Feb 2020 13:32:30 +0000 (13:32 +0000)]
ip: ip_address_t uses ip46_address_t

Type: improvement

type re-use.

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

4 years agoipsec: initialize algs to none in 'create ipsec tunnel' cli 30/25930/2
Damjan Marion [Mon, 16 Mar 2020 16:53:38 +0000 (17:53 +0100)]
ipsec: initialize algs to none in 'create ipsec tunnel' cli

Type: fix
Change-Id: I901c9384710eee5847b3fbce060c78e115ba4169
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agoapi: API cleanup 67/25567/2
Jakub Grajciar [Mon, 2 Mar 2020 12:23:21 +0000 (13:23 +0100)]
api: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ic108311e09c56cc2b3db63d5850598b6896a7897
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoarp: Restore CLI for setting ARP proxy entries 25/25925/2
Neale Ranns [Mon, 16 Mar 2020 18:16:34 +0000 (18:16 +0000)]
arp: Restore CLI for setting ARP proxy entries

Type: fix

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

4 years agordma: optimize tx wqe_init 15/25915/7
Damjan Marion [Mon, 16 Mar 2020 13:44:10 +0000 (14:44 +0100)]
rdma: optimize tx wqe_init

Type: improvement
Change-Id: I7f28a3f03ab1ea8461c52743c61dc23a57965237
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agordma: introduce direct verb for Cx4/5 tx 40/24240/14
Benoît Ganne [Mon, 16 Dec 2019 09:42:25 +0000 (10:42 +0100)]
rdma: introduce direct verb for Cx4/5 tx

Direct Verb allows for direct access to NIC HW rx/tx rings. This patch
introduce TX direct verb support for Mellanox ConnectX-4/5 adapters.
'dv' mode must be explicitely selected at interface creation to benefit
from this.

Type: feature

Change-Id: If830ba9f33db73299acdbddc68b5c09eaf6add98
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agordma: add Mellanox mlx5 Direct Verbs receive support 72/25572/13
Damjan Marion [Thu, 12 Mar 2020 10:56:00 +0000 (11:56 +0100)]
rdma: add Mellanox mlx5 Direct Verbs receive support

Type: feature
Change-Id: I3f287ab536a482c366ad7df47e1c04e640992ebc
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agosvm: chunk alloc stats 82/25882/3
Ryujiro Shibuya [Fri, 13 Mar 2020 12:45:06 +0000 (12:45 +0000)]
svm: chunk alloc stats

Type: feature

Showing number of allocated chunks by size, in addition to the freelist chunks by size.

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

4 years agotls: refactor Picotls ctx_read function to reduce one time memory copy 95/25895/8
Simon Zhang [Fri, 13 Mar 2020 09:03:53 +0000 (17:03 +0800)]
tls: refactor Picotls ctx_read function to reduce one time memory copy

Type: refactor

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: I7a952fd95e49468a0d1c763b3e289648c93539da

4 years agovxlan: vxlan/vxlan.api API cleanup 69/25569/5
Jakub Grajciar [Mon, 2 Mar 2020 12:55:31 +0000 (13:55 +0100)]
vxlan: vxlan/vxlan.api API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I7f6f37ec6eed780322e2488d6eb0f5681945ba09
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agomap: fix translation of icmp4 error messages 45/25845/3
Alexander Chernavin [Thu, 12 Mar 2020 12:42:12 +0000 (08:42 -0400)]
map: fix translation of icmp4 error messages

ICMP error messages are translated to ICMPv6 error messages with
erroneous destination address in the outer IPv6 header because sender
port is used instead of receiver port.

Both source and destination addresses in the inner IPv6 header are
translated erroneously because source and destination addresses of the
inner IPv4 header are getting zeroed during the translation.

With this commit, use receiver port for translation and save addresses
of the inner IPv4 header before translation of the inner header.

Type: fix

Change-Id: I1e93d54c1bbc154b401adcbb0fb661299655d01a
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
4 years agonat: test cleanup 26/25826/5
Klement Sekera [Thu, 12 Mar 2020 13:39:24 +0000 (14:39 +0100)]
nat: test cleanup

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

4 years agotls: small refactor for Picotls engine ctx_write function 14/25814/3
Simon Zhang [Wed, 11 Mar 2020 19:37:55 +0000 (03:37 +0800)]
tls: small refactor for Picotls engine ctx_write function

Type: refactor

Change-Id: I761fc764e6771dc95eb64614479c27fd44016690
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
4 years agonat: in2out/out2in handoff node index bugfix 56/25856/2
Elias Rudberg [Fri, 13 Mar 2020 13:26:50 +0000 (14:26 +0100)]
nat: in2out/out2in handoff node index bugfix

This fixes a bug in the initialization of handoff_out2in_index and
handoff_in2out_index where the node index for out2in was set to the
in2out node, and vice versa.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I983ddd3b3cec06f4cb3fb95b2a9cda4ab6d1270f

4 years agovlib: add verbose sh node option 38/25838/5
Florin Coras [Thu, 12 Mar 2020 23:26:11 +0000 (23:26 +0000)]
vlib: add verbose sh node option

Type: improvement

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