8967 Commits

Author SHA1 Message Date
Chinmaya Agarwal
bc69426737 sr: fix for SID index across segment lists within a sr policy
Type: fix
Signed-off-by: Chinmaya Agarwal <chinmaya.agarwal@hsc.com>
Change-Id: I9aa5456bf94356e8702fbfd39b14db4c2e74d3e6
(cherry picked from commit edc2ea435b5c407a78f4fcb42d750338d6cdd6d5)
2020-07-14 19:32:27 +00:00
Mohsin Kazmi
82103e9fe1 tap: fix dump for TUN interfaces
Type: fix

Change-Id: I3bcc8ff1cf0a828ce3ba112694d38e3287d38d8d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 86f281a841b5ec67c6a440dfc691e4c42b883df9)
2020-07-14 19:25:51 +00:00
Mohsin Kazmi
5ac8c6f1f3 tap: fix the tun sndbuf value for kernel 4.20 and later
Type: fix

From kernel 4.20, xdp support has been added in tun_sendmsg.
If sndbuf == INT_MAX, kernel executes xdp data path
for tun driver which assumes packets are ethernet frames.
This patch is avoiding the xdp data path in kernel by setting
the sendbuf value < INT_MAX.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ia4aa54b177b96d56a2d513d18d26ca01d5b88929
(cherry picked from commit 4834a66b7b3ef73e486c40ea9d8e36cc2e09c473)
2020-07-08 08:44:44 +00:00
Mohsin Kazmi
d4b5fdde42 tap: remove the bridge configurations for TUN interface
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ifeae641ec0aa7de74e33e582234505bf6e28ca87
(cherry picked from commit add4a412d1f5271be21f99fe15a93cb73c38b833)
2020-07-01 10:06:30 +00:00
Mohsin Kazmi
6d52257a2d gso: fix the l2 path
Type: fix

Change-Id: I4f91175444dec9800d651aa5a5e0472359de63d1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit ec1d61efe6d01a1a687f39e57a601ac693833b07)
2020-06-29 10:43:35 +00:00
Aloys Augustin
42382f5427 tests: fix deps pinning / patching
This ensures we don't recompute the requirements-{2,3}.txt on each make
test run, and skips patching scapy if it is already patched instead of
failing.

Change-Id: I3da57182ae49f3dd04db139d96734a5d145fedff
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
(cherry picked from commit 8eca60df745b7656b96db16e75b0deda66bfc515)
2020-06-29 08:21:57 +00:00
John Lo
93dd1da259 l2: L2/L3 mode swicth cleanup and l2-patch fix
Cleanup L2/L3 mode switch to not redirect to/from ethernet-input node
as it is no longer necessary.
L2 patch should use sw_if_index for device feature enable/disable.

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I0f24161d027b07c188fd1e05276146f94c075710
(cherry picked from commit f415a3b53a51b261d08cc3312c25f250d6bc1bd6)
2020-06-11 14:44:11 +00:00
Dave Barach
a37c63c6d8 vppinfra: refactor mpcap.h
vppinfra source files MUST NOT #include <vlib/vlib.h>, <vnet/vnet.h>
or similar. Move mpcap_add_packet(...), mpcap_add_buffer(...) to a new
file: src/vnet/mpcap.h.

Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id517aef6fe49b618f853ce32940b91ba45a1e60d
(cherry picked from commit 2a41919e39d4672f76a654f30be9c2093cef4fad)
2020-06-11 14:42:33 +00:00
Dave Barach
ecbca13d7e nat: update ip4-udp src port for checksum == 0 pkts
Otherwise, the out2in path will discard return-path traffic with
probability 1.0.

Type: fix
Fixes: gerrit 23963 / f126e746fc01c75bc99329d10ce9127b26b23814

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I621ed99329c04ef358035747dde599c0016b58f5
(cherry picked from commit 63c672c440d92cc570c587254afb4167617ec0b7)
2020-06-11 14:41:44 +00:00
Florin Coras
7037fde018 vcl: support connected udp listens
Request connected udp listener behavior by setting
VPPCOM_ATTR_SET_CONNECTED attribute with vppcom_session_attr

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iba95155c0f41cea8c6e1a4263946270d49c213ac
(cherry picked from commit 1e96617d952e2d5d8cc367a226702f8f825ed039)
2020-06-04 20:47:53 +00:00
Paul Vinciguerra
53b5233057 lisp: fix api_format reference
Type: fix
Ticket: VPP-1885

Change-Id: I474fffd4d36f439a19d475a8cb20171ca88274ec
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 353535bb4856d8ee6d818a3c75b8b576b9967ee4)
2020-06-03 18:20:02 +00:00
Mohsin Kazmi
369dc2c67a gso: fix flag for inner header
Type: fix

Change-Id: Ic3fc488521636f7f7c9402a20db45fdb599adaae
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit be03b5c15598131355da91967d05321c15fa1f24)
2020-06-03 17:56:56 +00:00
Florin Coras
e0db09034a lisp: fix api_format
Type: fix
Ticket: VPP-1885
Fixes: 58db6e1

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6431e49b315e09490fed8fd70ac53872836c6a09
(cherry picked from commit f3c1e4b61269cd93302073a631a2549f1aeb24d9)
2020-06-03 17:56:09 +00:00
Florin Coras
201c8e4d2a vcl: fix udp connected check
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I83dafe10cdc78fbb9a751f32155cd84d281b12d9
(cherry picked from commit a4dac8af0eb4271db0c528a00beca58f41b51c95)
2020-06-03 17:55:37 +00:00
Florin Coras
4ee279b03e lisp: fix custom dump
Type: fix
Ticket: VPP-1886
Fixes: 58db6e1

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic40018a756e57bfec05ffbc5e30d18f4feb315db
(cherry picked from commit 9b72b153d85d0e3e0ca218bcf1564805424b64b9)
2020-06-03 17:55:24 +00:00
Neale Ranns
4e4d3fd016 fib: Safe adj walk
Type: fix

the hash walk does not give the same guarantees as the bihash so
walk in a safe manner.

Change-Id: Idfe48c3a84ab3a341d887f7d196bc81ba34ae8b0
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 22391fa92b95ee0376eb372450d6315523c8a9ae)
2020-06-03 17:52:01 +00:00
John Lo
5e69119cdd ethernet: fix DMAC check and skip unnecessary ones (VPP-1868)
Fix and optimize DMAC check in ethernet-input node to utilize NIC or
driver which support L3 DMAC-filtering mode so that DMAC check can be
bypassed safely for interfaces/sub-interfaces in L3 mode.
Checking of interface in L3-DMAC-filtering state to avoid DMAC check
require the following:
a) Fix interface driver init sequence for devices which supports L3
   DMAC-filtering to indicate its capability and initialize interface
   to L3 DMAC-filtering state.
b) Fix ethernet_set_flags() function and its associated callback
   flags_change() functions registered by various drivers in interface
   infra to provide proper L3 DMAC filtering status.
Maintain interface/sub-interface L3 config count so DMAC checks can be
bypassed if L3 forwarding is not setup on any main/sub-interfaces.

Type: fix
Ticket: VPP-1868

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I204d90459c13e9e486cfcba4e64e3d479bc9f2ae
(cherry picked from commit 4a302ee7c75f3d4fd1a73a9d1f6c34b3bde8d620)
2020-06-01 21:16:37 +00:00
Andrew Yourtchenko
ab572152d9 misc: 20.05 Release Notes
Change-Id: If68e419b00f8961c814727713f989fd0d72f6f1b
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
v20.05
2020-05-27 18:02:25 +00:00
Damjan Marion
550da2b75a vppinfra: fix SIGBUS in bihash init when running unpriviledged, take two
Looks like MAP_LOCK is not enough, so call mlock(...) instead....

Type: fix
Change-Id: I1bc668a2bf3c861ca1c2d376c0fb6bfea87d4f48
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-27 17:11:25 +00:00
Neale Ranns
aecb10b97f fib: IPv6 lookup data structure MP safe when prefixes change (VPP-1881)
Type: fix

adding routes should be MP safe. When new prefixes with differrent
prefix lengths are added, adjust the sorted list in an MP safe way.

Change-Id: Ib73a3c84d01eb86d17f8e79ea2bd2505dd9afb3d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-05-27 16:26:34 +00:00
Neale Ranns
af3022f0e8 ipsec: Add/Del IPSec SA is not MP safe
Type: fix

we can probably do better, but for now this is needed

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I07161f5ac07a70a0e6db6608ba31659d9bc2c9ed
2020-05-27 15:19:05 +00:00
Florin Coras
449f34e2f3 vcl: fix ldp fcntl64
Type: fix
Ticket: VPP-1882

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I342d8f928fcc7de74f9bd288c1a5d63ea1f90020
(cherry picked from commit 0ab36f55753d3d1417c41f8a3aec5e79a882555c)
2020-05-27 11:23:34 +00:00
Andrew Yourtchenko
e2e3c38be6 misc: Avoid sample.md from in the VPP docs, clean up the extraneous copy
I had cleaned up the sample.md previously for 20.01, but when later
that was merged to master, the file was renamed. So, fix this issue.

Change-Id: I6347685af216901fbfdd445606735b9bf79f8fe5
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-05-27 11:22:59 +00:00
Neale Ranns
77d12df8eb fib: Fix interpose source reactivate
Type: fix

when the interpose is on an adj-fib and the cover is removed the adj
source will not install. this lead to no path list being found for the
interpose source and a crash. pick a drop path list in this case.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ied217da043926c913657080f5ffb151201225d23
2020-05-26 16:48:15 +00:00
Neale Ranns
bc69eca2ab fib: Use basic hash for adjacency neighbour table (VPP-1877)
Type: improvement

a bihash per-interface used too much memory.

Change-Id: I447bb66c0907e1632fa5d886a3600e518663c39e
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 20aec3db441074ee5a861a40d6e02fad2f3dcb37)
2020-05-26 14:55:13 +00:00
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