8942 Commits

Author SHA1 Message Date
Rajesh Goel
61f368a80f ipsec: DES/3DES fixing the iv_len for openssl crypto
Type: fix

Signed-off-by: Rajesh Goel <rajegoel@cisco.com>
Change-Id: I8d128598b4c872f19b64c779c19b5908ba2f2c08
(cherry picked from commit d1d90f5951df93625594f1904cddd95880838ff0)
2020-05-26 11:30:18 +00:00
Florin Coras
0f878da203 vcl: do not propagate epoll events if session closed
Type: fix
Ticket: VPP-1880

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1e9652b476bbc07852b4e701a948c36a0d8c67fa
2020-05-26 11:28:49 +00:00
Florin Coras
89c12dbe23 tcp: fix sack block validation on wrap
Type: fix
Fixes: 487507f
Ticket: VPP-1879

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia9813ae09d14111dc8edac0fa6ab082e13ab6e2e
(cherry picked from commit 3b9540966f877ae67d374cab334c31bd6e3f8c8b)
2020-05-25 20:34:17 +00:00
Damjan Marion
11974e5f5a vppinfra: fix SIGBUS in bihash init when running unpriviledged
Obserbed when VPP is running in k8s container

Type: fix
Change-Id: Ibbff9c3921bd7f4f97d47cb6f10eed8ed5efe269
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-25 16:02:14 +00:00
PiotrX Kleski
8b4221ee8f ipsec: fixed chaining ops after add footer and icv
In case there is no free space in first buffer for ICV and footer,
additional buffer will be added, but esp_encrypt will stay in single
buffer mode.
The issue happens for the following payload sizes:
 - TCP packets with payload 1992
 - ICMP packets with payload 2004

This fix moves the single/chained buffer ops selection to after
esp_add_footer_and_icv call.

Type: fix

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Change-Id: Ic5ceba418f738933f96edb3e489ca2d149033b79
(cherry picked from commit fdca4dd1a1a817e65bf44e435261d893fc0c51d6)
2020-05-25 16:01:25 +00:00
Satoru Matsushima
04d4d92f96 srv6-mobile: Update the doc of 20.05 for gtp4.dt and gtp6.dt funcitons.
Document update to reflect merged SRv6 functions into 20.05 of lookup and forwarding for inner IP packet encapsulated with outer IP and GTP-U headers.

Type: docs

Signed-off-by: Satoru Matsushima <satoru.matsushima@gmail.com>
Change-Id: I85c9ddf6bf9fa63f2b8b6e03eff3ecec1e7615ab
2020-05-25 15:59:41 +00:00
Neale Ranns
be955ef316 ip: Dual loop error in midchain chksum
Type: fix

Change-Id: Idf7c80b7d81f796bd0512bca4276bcfcf2af241a
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit fc74697ed3b45499027b272332af786e8e7917bb)
2020-05-21 07:09:46 +00:00
Alexander Chernavin
63f9e7cc0e nat: fix segv if out of ports in ed mode
Type: fix
Ticket: VPP-1870
Change-Id: Ife726d2f6baaa3516c209011183f39670cf6a55d
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 88120824acc299a0aec17ce4c208dbc8be394779)
v20.05-rc2
2020-05-20 16:35:42 +00:00
yedg
d3088e94ec ip: fix interface ip address del sw_if_index check
Type: fix

Signed-off-by: Ye donggang <yedg@wangsu.com>
Change-Id: Ia9f72ff2be455ecd4ff3d16e884c5a50f9df69fe
(cherry picked from commit dbd366b239c0506b0d9984e7481967e038f10a23)
2020-05-20 16:34:42 +00:00
Benoît Ganne
d657203443 docs: asan: update doc to match current status
Type: docs

Change-Id: I45265876c9c778f6b91d39f30eb6035f14d166ec
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit ca86c95a3413214110a03b001d45d018385b92dc)
2020-05-20 16:01:56 +00:00
Benoît Ganne
00b060a778 dpdk: fix pktmbuf pool private data init
Type: fix

Change-Id: I7349840af48eec209532dab43a8ad0bd68993268
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit c32a84c70efb45081568fc8aa5fa1884d74865fe)
2020-05-20 07:10:35 +00:00
Onong Tayeng
a3674c0e18 lisp: API doc/comments cleanup
Removing the comments around eid_type which seem to have been overlooked
by the original patch https://gerrit.fd.io/r/c/vpp/+/24663.

NOTE: This patch is a doc-only change. It does two things:
    1. Remove comments around obsolete eid_type type
    2. Update the comments to reflect the new vl_api_eid_t type

This is to ensure correct documentation is displayed to user/reader of
VPP docs in 20.05.

Type: fix

Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: I48e1993cf8869cb32e159d1956f3ec1e5943e33f
(cherry picked from commit 4ab5190eb4167ac4c06cd649ec8a860784ab1d41)
2020-05-19 10:35:53 +00:00
Jakub Grajciar
06107a7243 interface: fix interface rx mode config API
Swap byte order for fields of type vl_api_rx_mode_t.

Ticket: VPP-1871
Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ia1745257b57209d41661d38067e0dd7618f9a9b9
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
(cherry picked from commit aefcd1a3579ec2c93f606b151d563d87ea211387)
2020-05-19 07:23:20 +00:00
Florin Coras
0762fbc46e vcl: remove udpc transport
Type: refactor
Ticket: VPP-1875

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I145ff3301f168973c4f7f32c337bbcac47900705
(cherry picked from commit 3ca663e743dda703e76d8493a0c5cf13d7004c63)
2020-05-18 16:44:16 +00:00
Florin Coras
b5898d2f77 tcp: fix bogus time update due to missing cast
Type: fix
Ticket: VPP-1874

Seems clang needs explicit casting to u64 of u64 and f64 multiplication
before truncating to u32

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib0d7a33d4c5e68577e401e854fc3e55e0723da93
(cherry picked from commit 17b5c3d6ab83a597e7c79613041f2fd7470825bd)
2020-05-18 16:43:50 +00:00
hanlin
8337806b5f vcl svm: fix rx event loss
When vcl_epoll_wait_handle_mq handles rx events exceeding maxevents, VPP will not signal because cursize > 0, and the remaining rx events cannot be triggered because the eventfd event has been read. Therefore, we should dequeue all events until cursize = 0. And then handle msg up to maxevents with vcl_epoll_wait_handle_mq_event and those beyond with vcl_handle_mq_event.

Type: fix
Ticket: VPP-1873
Signed-off-by: hanlin <hanlin_wang@163.com>
Change-Id: I8a0c87cb41c837deb8284b40f668cc3c7d9d6e56
Signed-off-by: hanlin <hanlin_wang@163.com>
(cherry picked from commit d0e646f6892e9c85278c9538760a8940c86dcdbb)
2020-05-16 22:09:05 +00:00
Andrew Yourtchenko
765ef37670 docs: Add link to 20.05 test framework docs
Change-Id: I429a29a5cb1f311bec4361c758b14b51b0afc8aa
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-05-13 22:59:30 +00:00
Andrew Yourtchenko
b8e9009400 docs: Initial changes for stable/2005 branch
This patch adds an entry for the defaultbranch
    in .gitreview

Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I6f78398d6c7779b52d64ad65285c0194f0849996
v20.05-rc1
2020-05-13 19:14:40 +00:00
John Lo
5b960c60f6 sr: fix srv6/srv6-ad/srv6-as promisc mode switch
Calling ethernet_set_flags() to switch interface to/from promiscuous
mode must use use hw_if_index instead of sw_if_index.

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I72da286b913893227e32193ee11fbbc56e04804d
2020-05-13 19:02:46 +00:00
Neale Ranns
83d1298375 gso: remove ordering dependency on esp-encrypt-tun
Type: fix

... it's not a feature anymore

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ifbcaf7d832aa76336feb0556d0dc7d2002f19c35
2020-05-13 17:26:31 +00:00
Klement Sekera
a9f7bf8b0d nat: fix broken build
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I2a70db3a25450e014adaed84989f4da9bb77b14d
2020-05-13 12:34:21 +00:00
Klement Sekera
a3a830484f nat: fix LRU blocked by inactive session
This fixes a situation where long-lived inactive session blocks LRU
list. Solution is to have multiple LRU lists based on session type.
This helps because session timeout is same for all sessions of same
type.

Type: fix

Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I5e54b2aab73b23911d6518d42e8c3f166c69a38c
2020-05-13 11:39:30 +00:00
Klement Sekera
bc752e432f nat: perf improvement - replace branchy code
Use a lookup table instead.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ia8461099828bb8824bf016201f135e6b69c444d1
2020-05-13 11:36:42 +00:00
Chenmin Sun
1d61c2194d dpdk: DPDK 20.05 iavf fdir bug-fix patch cherry pick
After VF reset, FDIR rule still takes effect. To solve the issue,
this patch adds to flush all flows before flow uninit. VIRTCHNL
sends message to PF by Admin Queue, so flow flush should be implemented
before Admin Queue shut down.

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I8ba0db7cd7646eaabd5745f74952016b0b968bbb
2020-05-13 11:33:52 +00:00
Mohsin Kazmi
a9a9d8255b interface: fix the checksum offload in quad loop
Type: fix

In quad loop, checksum will be calculated for all four packets,
if one packet needs checksum computation, without respecting their
respective flags. This patch fixes it.

Change-Id: I479b420ba0dcbd178ea4180bf05a0e55a6b13843
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-05-13 11:31:11 +00:00
Neale Ranns
5d0136f099 feature: Config end nodes are user specific
Type: fix

it is possible for a user to change the end node of a feature arc, but
this change should only apply to that 'instnace' of the arc, not all
arcs. for example, if a tunnel has its ipx-output end node changed to
adj-midchain-tx, this shouldn't affect all ipx-output arcs. obviously...

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I41daea7ba6907963e42140307d065c8bcfdcb585
2020-05-13 11:30:34 +00:00
Mohsin Kazmi
689666ca5d bonding: fix the GSO flags
Type: fix

Only add GSO and Checksum offload flags when gso is
enabled.

Change-Id: I58945a4ffbb9a0e6a8640fc01424c63feef16306
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-05-13 11:23:49 +00:00
Neale Ranns
b1fd80f099 ipsec: Support 4o6 and 6o4 for SPD tunnel mode SAs
Type: feature

the es4-encrypt and esp6-encrypt nodes need to be siblings so they both have the same edges for the DPO on which the tunnel mode SA stacks.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I2126589135a1df6c95ee14503dfde9ff406df60a
2020-05-13 11:15:57 +00:00
Filip Varga
103d355db5 nat: handoff next node feature fix
Type: fix

Change-Id: I14e323e7bb1db7a3d40668212535c07504374e59
Signed-off-by: Filip Varga <fivarga@cisco.com>
2020-05-13 11:15:42 +00:00
Filip Tehlar
85af76af5c ikev2: fix removing of expired SAs
Type: fix

Change-Id: Idf9b0ffb4e3a0113bece80d1195192bdf46feb89
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-05-13 06:50:18 +00:00
Dave Barach
9a099b6e50 misc: remove useless assignment
Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I7708587804bc979fa9c46fb11f96d264821e2357
2020-05-12 16:43:41 -04:00
Florin Coras
68f58d7401 api: use malloc for rx thread arg instead of heap
Type: fix

Avoids issues if thread with non-zero __os_thread_index attaches to
binary api.

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib981f12c867fdee7590391ec43128145bb1abce6
2020-05-12 14:16:57 +00:00
Florin Coras
69d97256d5 vcl: de-init vcl on destroy
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If3372e3edd403240c2c9da746246170549a3e644
2020-05-12 14:07:15 +00:00
Florin Coras
f2fe353cc8 tcp: avoid rcv wnd less than mss
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I84ec1c91a3a7b2195aad58923fa6f17f551444cb
2020-05-12 14:06:42 +00:00
Steven Luong
9a244b0a29 lacp: missing endian conversions for trace packet format
Fix a couple endian conversions for displaying Marker Protocol packet
in the trace

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I746a67fb6143b5ad52bc4af9604ff8760dbdec9b
2020-05-12 12:34:02 +00:00
Damjan Marion
73a60b2da4 crypto-native: properly deal with broken or outdated toolchains
Avoids crash due to missing symbol, when build system detects toolchain
which is not able to produce binaries for all targets we need....

Type: fix

Change-Id: I77ee63cb8dca3c9e4e83a6235c60f1439a472444
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-11 21:09:04 +02:00
Florin Coras
1ae16c8f3b vlib: fix u64 error counter cli printing
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie35dc623394cfb6c358740361fd85aa0924ab187
2020-05-11 15:29:21 +00:00
Michael Yu
bedf48a17c ip-neighbor: fix show ip neighbor issue
Fix the issue that vppctl show ip4{6} neighbor [interface] command can't
show entries correctly, example: both ip4 and ip6 entries can be shown
with command:
vppctl show ip4 neighbor.

Type: fix

Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com>
Change-Id: I229368b71cd285adce994c8290cc9d7e4c4f5aa6
Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com>
2020-05-10 08:09:56 +00:00
Zhiyong Yang
cbe36e47b5 ethernet: fix dmac stride error
Type: fix

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Change-Id: I617fb365def22a28d48f75013dea38f8e1703a44
2020-05-10 00:14:40 +00:00
Ole Troan
5c318c70d0 vppapigen: api crc checker
crcchecker is a tool for enforcement of the binary API.

1. Production APIs should never change.
2. An API can be deprecated across three release cycles.
   Release 1: API is marked as deprecated.
   option deprecated="vyy.mm";
   option replaced_by="new_api_2";
   Release 2: both old and new APIs are supported
   Release 3: the deprecated API is deleted.
3. APIs that are experimental / not released are not checked.
   An API message can be individually marked as in progress, by:
   option status="in_progress";
   In the API definition.

The definition of a "production API" is if the major version in the API file is > 0.

extras/scripts/crcchecker.py --check-patchset # returns -1 if backwards incompatible
extras/scripts/crcchecker.py --dump-manifest
extras/scripts/crcchecker.py --git-revision v20.01 <files>
extras/scripts/crcchecker.py -- diff <oldfile> <newfile>

This patch integrates the tool in "make checkstyle-api".
A future patch is required to integrate the tool in the verify job.
I.e. this patch does not enable enforcement through Jenkins.

Change-Id: I5f13c0976d8a12a58131b3e270f2dc9c00dc7d8c
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
2020-05-09 11:35:58 +00:00
Chenmin Sun
aa55a926fe gtpu: fix coverity issue
Fix coverity issue #210194 in gtpu-decap

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I5b172c8494527e7117c4e7e7083a8473165aa40f
2020-05-09 01:02:22 +00:00
Dave Barach
119286ee52 build: reject merge conflict checkin attempts
Although attempts to build code containing merge conflict markers
USUALLY results in compile errors, this patch adds an explicit check
for the conflict end marker.

If for some unknown reason it's necessary to check in the text
'>>>>>>>', construct it by concatenation: ">>>"">>>>"
or '>>>' + '>>>>' depending on the language involved.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Iaad2aa8b87a71137a3bb9a09f7f4159909bf79ab
2020-05-09 00:27:35 +00:00
Dave Wallace
9921091690 docs: fix merge damage in nat.h
Type: fix
Fixes: b5a575b09

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I22d35159a923075243df9760f1a74e2ca74e30e1
2020-05-08 17:58:30 +00:00
Steven Luong
a5436ae251 vppinfra: set explicit found in search_free_list loop
While https://gerrit.fd.io/r/c/vpp/+/26948 fixed avoid using -1 to
index into h->free_lists[b][l] by changing the loop counter, the
check for the value of the loop counter (l < 0) cannot be trusted
to decide whether we've found a large enough object within the bin
or not. When the loop is terminated, the value of the variable l
could be ambiguous if it equals to 0 and it is never less than 0,
ie, when we bail out of the loop, we don't know if it was due to the
breaking out of the condition in
  if ((s = f_size - size) >= 0)
     break;
or
  while (l > 0);

The fix is to explicitly set a variable when we have found a large enough
object inside the loop to be used to test whether the loop was prematurely
terminated (found == 1) or the loop just ran exhausted (found == 0)

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I0161813fbd44dcba8982a767eac2e0930e9d77e3
2020-05-08 17:56:51 +00:00
Damjan Marion
13bcb92e64 misc: add knob to generate compile_commands.json
Used for lanuguage servers like clangd and ccls

Type: improvement
Change-Id: I68d534dfa7b8ba3459fbd919d5ffccaa1fa1171e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-08 17:54:26 +00:00
Damjan Marion
599efc67e8 build: various improvements
- add option to install only host tools
- add option to specify lib and runtime dir

Type: improvement

Change-Id: I6356b52df459120fc9b0127948bae7679fb10e52
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-08 17:01:32 +00:00
Dave Barach
13f64ce227 ethernet: fix coverity warning
Type: fix
Ticket: VPP-1837

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I20daa023eed50f8b42e8dc2d17e47a54aa16ae31
2020-05-08 14:35:33 +00:00
Ole Troan
c5c788bfa1 papi: use python3 for papi install
Breaks on Ubuntu 20.04 otherwise.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I407215a03948d6e49152ee97099539bb625c12ef
2020-05-08 12:47:55 +00:00
Ole Troan
71f62a52a2 nat: fix per thread data vlib_main_t usage take 2
The original fix access vlib_main before these was initialized.
Removed cached vlib_mains structure.

Type: fix
Fixes: 9bb09afb56b1aa787ca574cc732085272059fd5f
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I686bab9220e27891f66bf60489c1602855786aa8
Signed-off-by: Ole Troan <ot@cisco.com>
2020-05-08 11:23:18 +00:00
Lijian.Zhang
88d6ce2bee dpdk: fix compiling issue with clang
When building vpp image with below command, clang reports warnings/errors
on the unused option '-L', as it's not linking stage, and does not require
linking libraries.

In dpdk.mk, the linking library path should be attached to
DPDK_EXTRA_LDFLAGS, instead of DPDK_EXTRA_CFLAGS

$ make build-release CC=clang V=1

clang -Wp,-MD,./.ark_ddm.o.d.tmp  -fPIE -fPIC -pthread -I/root/origin/build-root/build-vpp-native/external/dpdk-20.02/lib/librte_eal/linux/eal/include  -march=armv8-a+crc -DRTE_MACHINE_CPUFLAG_NEON -DRTE_MACHINE_CPUFLAG_CRC32  -I/root/origin/build-root/build-vpp-native/external/dpdk-20.02/arm64-armv8a-linuxapp-clang/include -DRTE_USE_FUNCTION_VERSIONING -include /root/origin/build-root/build-vpp-native/external/dpdk-20.02/arm64-armv8a-linuxapp-clang/include/rte_config.h
-D_GNU_SOURCE -O3 -I./ -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated -Wno-missing-field-initializers -Wno-address-of-packed-member -Werror   -g -mtune=generic -L/root/origin/build-root/install-vpp-native/external/lib -I/root/origin/build-root/install-vpp-native/external/include -o ark_ddm.o -c
/root/origin/build-root/build-vpp-native/external/dpdk-20.02/drivers/net/ark/ark_ddm.c
== Build drivers/vdpa/ifc
clang: warning: argument unused during compilation: '-L/root/origin/build-root/install-vpp-native/external/lib' [-Wunused-command-line-argument]
clang: error: argument unused during compilation: '-L/root/origin/build-root/install-vpp-native/external/lib' [-Werror,-Wunused-command-line-argument]

Type: fix

Change-Id: If8fd9b19d0aff9d3c27d77e78cd3064bb1ad6565
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com>
Reviewed-by: Govindarajan Mohandoss <Govindarajan.Mohandoss@arm.com>
2020-05-08 07:21:30 +00:00