9524 Commits

Author SHA1 Message Date
d1cc38d5ad vcl svm: segments improvements
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I717c64666972bb4e440cb3d1180a5cb26ee25577
2020-10-12 15:03:01 +00:00
355791c13f tcp: fix connection reuse with no listener
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I674872f68406ac778779a68d3ad991f41765d4e2
2020-10-12 15:02:41 +00:00
d3252adce2 nat: set fib index for bypass session
Bihash key already contains rx_fib_index for lookup
but fib value for session itself is set to 0.

In the result bihash is allocated with key with fib index
set, but free function is looking for key with fib index set
to zero. It leads to use-after-free because session itself is
removed from pool but bihash is not because of key mismatch.

Type: fix

Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I8ac5a41b0a5a32b1baab9e9d757141d5b24b7798
2020-10-12 15:00:04 +00:00
41bda04487 lldp: fix typo in mac address constant
Type: fix
Fixes: 149fd3fbd069a5f7be86e68472578ee7af229cb6
Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
Change-Id: I06956f3ed3689172c3682d6b707991613255cabd
2020-10-12 14:32:17 +00:00
decf51a86a lldp: fix memory leakage
1. Typo in usage of vnet_hw_interface_add_del_mac_address(),
   which returns 0 when it succeeds instead non zero value.

2. Generated error doesn't clean allocated resources for
   an interface.

3. Returned value from vnet_hw_interface_add_del_mac_address()
   should be erased or reported.

Type: fix
Fixes: 149fd3fbd069a5f7be86e68472578ee7af229cb6

Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
Change-Id: Ia6b28ae70fea127d15eb0102223ff972358766bc
Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
2020-10-12 14:04:34 +03:00
6b410e6d7c session: app_name should format with %v
Type: fix
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Ib096ad14e6ddbaff52429a416ea4d245703a368d
2020-10-10 18:36:58 +00:00
c9e9b976d4 misc: clib_unix_warning usage error
Type: fix
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Ibc4e961388d0976b55b9b936d6a37d36cddab5fe
2020-10-10 17:32:11 +08:00
1ab533cba2 avf: add add_del_mac_address handler
Type: improvement
Change-Id: I4d0b1cd87cf2f58a653f40a300da4b7a43348a06
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-09 19:27:24 +00:00
952056ce74 acl: move nonip nodes to separate file
Type: refactor
Change-Id: Idcef8effa86d6421e4b3e5f747695ddb2982e78f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-09 17:45:18 +00:00
6754a16ca3 wireguard: park the timer process
Until the feature is configured. It would make sense to push more of
the feature init code into the newly-added wg_feature_init()
function. This patch fixes a severe hemorrhoid.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I87095575363baa41407dd52492159a7b8c2899e7
2020-10-09 17:20:28 +00:00
695eb9353d vlib: save signal handler data to global vbls
Turns out that clang is a bit too enthusiastic about mapping static
variables to registers, which makes it hard to extract (especially)
the faulting VA from an optimized core file.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I836e5d9695aeb4c5ee4a27f9565acf08ee4eaac0
2020-10-09 16:52:13 +00:00
dd9eae5c29 nat: ipfix logging separation & refactor
Type: refactor

Change-Id: I8785e4987e4f60361072440d0c3c6954c9c12394
Signed-off-by: Filip Varga <fivarga@cisco.com>
2020-10-09 10:20:21 +00:00
aa04395573 tcp: treat pending timers as active
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic63af51fab8dbefe79439554ea563f20e3788afa
2020-10-08 22:13:36 +00:00
49036a5e82 tcp: custom geometry for timer wheel
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I04f992e5d91d21f1e5bbafef070478cfe268d94a
2020-10-08 22:13:20 +00:00
1046b1a631 vppinfra: memory leak be gone
Type: fix
Fixes: ab1a50cf7407e31097b550226c2b6954d6371bea / gerrit 29272

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ic8146a66b54bb9ac6223cf984d4566554b73276d
2020-10-08 16:05:01 -04:00
0e12131f8b pg: Choose the input interface from the stream's rx
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I656918a417d33ec6bea30054805e03ae19c38f2d
2020-10-08 14:02:35 +00:00
533bf08cf4 gre: MPLS over GRE does not select correct fixup function
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I9eff41407b0f172f2b567e6a4ea1c48be8df883a
2020-10-08 13:06:01 +00:00
0c25492eb4 l2: Fix compile error on unused next_index
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ifc6b4c15f6055df4f403e9cd633e31f061a6d2da
2020-10-08 10:39:07 +00:00
eabd424982 interface: shorten vnet_hw_if_rx_mode
This is part of bigger refactor.

Type: refactor
Change-Id: I6fc2c0a1e2d217a70952901bcf775b8485bd3c20
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-08 10:21:54 +00:00
9c9490cee8 pci: add vlib_pci_get_msix_file_index
Type: improvement
Change-Id: Ibc15aa6f75e989b2b7caa9a57e3665b1ffc7cc18
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-08 10:21:44 +00:00
22eefd79a1 ip-neighbor: Grat ARPs from different subnet are dropped
Type: test

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Id07e8981a903f11f50fb494a93d01815382025e4
2020-10-08 09:04:05 +00:00
47a3d9975f l2: input performance
Type: improvement

- cache the values form the BD on the input config to avoid loading
- avoid the short write long read on the sequence number
- use vlib_buffer_enqueue_to_next

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I33442b9104b457e4c638d26e9ad3bc965687a0bc
2020-10-08 08:51:59 +00:00
83143710e8 virtio: fix the trace
Type: fix

This patch fixes the commit e347acbc31111504c015531e8ad764a86d489309

Change-Id: Icee7a6e250c94ae93e606d7869acc55c7a5806b1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-10-08 06:23:58 +00:00
adb10ad775 nat: use proper type for counters
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I330822c5d675cdfa57ab75ceb0223f11e0ebb7d2
2020-10-08 06:21:41 +00:00
970187bd96 ipsec: Allow SAs with NULL auth &crypto on IPSec interface
Type: improvement

on the dedicated IPSec interface, the SA describes the peer, so it is
not possible to forward to a peer for which there is no SA. Therefore if
an SA is added with NULL auth and integ then this explicitly states that
this is what the peer desires.
on the contrary on the IP-IP/GRE interface, in the absence of protection
and an SA, then the traffic is sent in the clear. So adding NULL
auth/crypto iSA is a means to describe that the peer should not be sent
traffic.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I7ad2d466cc74eb7ff8c4c84e0d7897d06e2fcf86
2020-10-08 06:20:47 +00:00
21fb4f71ee fib: Register multicast MAC with interface for accepting interfaces
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ic6c76b65e2dcc08916373153944507a297c962c0
2020-10-08 06:11:07 +00:00
27c35e3056 vppinfra: fix coverity warnings
Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I654747d618cc4fe99b7774827303769fe43392ed
2020-10-08 06:10:16 +00:00
6e366be38f misc: Purge unused pg includes
Type: style

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I26a19e42076e031ec5399d5ca05cb49fd6fbe1cd
2020-10-07 16:05:16 +00:00
65fa036ec7 api: add heap alloc to vpp stats
The Python VPP Stats module also used the VPP heap.
Fix so it now explicitly allocates a heap.

Fixes: f68fccfe7e188fec2c9f91da38ca9acf6f67d811
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I0bd4ae64d6c89cdf634d8d9a91c23ab38017c5cc
Signed-off-by: Ole Troan <ot@cisco.com>
2020-10-07 12:46:08 +02:00
1f36023d29 nat: move nat64 to a subfeature
Type: refactor

Change-Id: I3b9e17164647d2019b1f40cffeed63393345219e
Signed-off-by: Filip Varga <fivarga@cisco.com>
2020-10-07 09:05:50 +00:00
d1762e614d nat: det44 plugin fix style and api cleanup
Type: refactor

Change-Id: I3c5ca31de8046b82fb3d3f364ba88370fe51ef02
Signed-off-by: Filip Varga <fivarga@cisco.com>
2020-10-07 09:05:22 +00:00
bfa75d6b92 vppinfra: add heap header in front of dlmalloc space
This patch adds smal header in front of dlmalloc space, and it stores
some additional information about the heap.

Immediate benefit of this patch is that we know the underlying page size
si we can display heap page statistics / real memory usage.

Type: improvement
Change-Id: Ibd6989cc2f2f64630ab08734c9552e15029c5f3f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-06 23:47:33 +02:00
ab1a50cf74 misc: add xxx_not_inline
vlib_main_t *vlib_get_main_not_inline(void)
vlib_thread_main_t *vlib_get_thread_main_not_inline(void)
elog_main_t *vlib_get_elog_main_not_inline()

Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I6de306d567283ad28ef34c9be0cf27452aecbf6c
2020-10-06 15:22:48 -04:00
c0b195450b feature: Add packet trace API
Also spiffed up the vpp_api_test plugin loader so it executes
VLIB_INIT_FUNCTIONs and VLIB_API_INIT_FUNCTIONs.

Type: feature

Change-Id: Id9a4f455d73738c41bcfea220df2112bb9679681
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2020-10-06 10:49:27 +00:00
d20bc1d30a vppinfra: address sanitizer: do not instrument dlmalloc internals
Type: fix

Change-Id: I8b50777b6ce7df461e5256921591a58e52877628
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-10-05 16:27:36 +00:00
84962d19ba ikev2: support ipv6 traffic selectors & overlay
Ticket: VPP-1917
Type: feature

Change-Id: Ie9f22e7336aa7807b1967c48de9843df10fb575c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-10-05 13:28:09 +00:00
7b4e52f88f ipsec: Use bihash for tunnel lookup
Type: improvement

Change-Id: I0c82722dfce990345fe6eeecdb335678543367e0
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-10-05 09:06:36 +00:00
149fd3fbd0 lldp: set interface MAC address when enabled
Type: improvement
Change-Id: I4f2dc4e4c1c467fb9acd0fed231c56fcd54c8da9
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2020-10-02 22:20:59 +00:00
1c556d19d0 vlib: always replace bootstrap vlib_mains
Fixes an obscure issue when spinning up pure pthreads which don't have
vlib_main_t clones.

VLIB_REGISTER_THREAD () = {
  <snip>
  .use_pthreads = 1,
  .no_data_structure_clone = 1,
}

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ifae5a2a35865de057eea7782ee71b1011a21c88e
2020-10-02 21:08:47 +00:00
2bc1af5578 vppinfra: use clib_mem_create_heap() to create numa heap(s)
Type: improvement
Change-Id: Ie04302c576869bc7bfaa9f13ed2ea8a403a393d4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-02 15:04:17 +02:00
eb530a24b4 memif: map shared memory with clib_mem_vm_map_shared(...)
Type: improvement
Change-Id: I91031d56aae884a0a42fca343a2fc24c442b1da8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-02 14:53:53 +02:00
e2042e6b7b nat: add dummy nat_ha_resync() to avoid missing symbol errors
Type: fix
Change-Id: I288e93da192cf48b3d774e36584d471d4daa2727
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-02 12:28:36 +00:00
c71b56dd5c ip: Fix unformat_ip_prefix
Type: fix

Change-Id: I73629ccf7d5a49da3858899dc727cc180fb53003
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-10-02 11:27:39 +00:00
6614df5350 ikev2: fix leaking pending INIT requests
.. when associated profile is deleted.

Type: fix

Change-Id: Ib05831d79b3b58664ee0a930960513fd465373bf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-10-02 10:46:12 +00:00
eb69648bf8 vppinfra: Function to check if a bihash has been initialised
Type: improvement

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ic31f7721f326ca9d78d645abcea63ce58df5bd5b
2020-10-02 10:43:14 +00:00
9a59785c91 dpdk: split PCI blacklist rte_eal args from startup.conf
Type: fix
Fixes: ed04407829728c5d258b6600155edabd5198d971

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: I5aebcba7b97db758310042fd446328ee8f691641
2020-10-02 10:35:51 +00:00
1f6a6b8b2b ikev2: fix cli memory leak
Type: fix

Change-Id: Ibdd83fa336427ec0c66224ecebb1b6bd36d1d1ba
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-10-02 10:34:35 +00:00
2b92c70579 vppinfra: fix legacy huge pages creation for default size
Type: fix

Change-Id: I941b92ebec66ccd9c9e9a12d485844313c9f117b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-10-02 08:51:47 +00:00
f30e07e3b5 build: fix build for debian testing
1. add libelf-dev to default deb deps
2. Also use libffi7 instead of libffi6 for debian-testing

Type: fix

Signed-off-by: Chuan Han <chuan.han.comm@gmail.com>
Change-Id: I9f13955812877422ecb8aac3dd34c5828b9c4607
2020-10-02 06:59:36 +00:00
67ec752917 misc: allow disabling of ipfix exporter via api
Zero collector address indicates that the IPFIX exporter is disabled.
You can zero the collector address via vppctl but you can't do it via
the API because the handler returns an error if the address is zero.

With this change, do not return an error in the handler when the
collector address is zero thus allowing the IPFIX exporter be
disabled.

Type: fix
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I1335c0d06af81f11d743c395399a360c612c0c21
2020-10-01 21:23:53 +00:00