9556 Commits

Author SHA1 Message Date
Damjan Marion
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
Damjan Marion
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
Neale Ranns
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
Neale Ranns
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
Mohsin Kazmi
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
Klement Sekera
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
Neale Ranns
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
Neale Ranns
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
Dave Barach
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
Neale Ranns
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
Ole Troan
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
Filip Varga
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
Filip Varga
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
Damjan Marion
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
Dave Barach
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
Jon Loeliger
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
Benoît Ganne
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
Filip Tehlar
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
Neale Ranns
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
Klement Sekera
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
Dave Barach
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
Damjan Marion
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
Damjan Marion
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
Damjan Marion
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
Nathan Skrzypczak
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
Filip Tehlar
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
Neale Ranns
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
Vladimir Ratnikov
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
Benoît Ganne
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
Benoît Ganne
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
Chuan Han
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
Alexander Chernavin
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
Benoît Ganne
433a498683 vlib: fix line-mode cli memory leak
Type: fix

Change-Id: Iaf60ec93ee9750074f52ba4dbe955355de5dbccc
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-10-01 20:58:01 +00:00
Jon Loeliger
362c666df0 classify: Fix a couple bugs in 'pcap filter' command.
- Assert a valid set prior to first use.
- Sort tables by mask prior to selecting first table
- Use actual table indices and not loop index when linking tables

Type: fix

Change-Id: I9c61c8b7fe97c38faed8f2fc1792d7232799f580
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2020-10-01 18:06:22 +00:00
Florin Coras
459a0c4e3b svm: simplify memfd client segment mapping
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I33c6a5d1686cc32a6cde149083256d6cf0770fc5
2020-10-01 15:51:37 +00:00
Filip Tehlar
98d6f2971e ikev2: fix issue when decrypting packet with no keys
Type: fix

Change-Id: I0e615d5089587992012a0f280ee902b2906f21c2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-09-30 21:56:01 +00:00
Filip Tehlar
3434cb8fe3 ikev2: refactor ikev2 node
Type: refactor

Change-Id: I65acbd5d9724c500a24699de973df08016d9d8d6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-10-01 07:23:08 +00:00
Florin Coras
a107f4039e session: init size and watermarks on all seg managers
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0cfe04277d80d9c81499651f893fb2d126ac8c85
2020-09-30 22:02:56 +00:00
Florin Coras
5220a26af0 svm: harmonize ssvm names
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I26e4ad6bfd9e0be7745f6ba948bf51550fd4215e
2020-09-30 21:52:42 +00:00
Damjan Marion
f2b4a375d6 vpp: update 'show bihash' command
Type: improvement
Change-Id: I6d00ba840d2168af0658f97c45a42d39be7cbbad
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-30 19:16:52 +00:00
Filip Tehlar
558607dc3a ikev2: better packet parsing functions
Ticket: VPP-1918
Type: improvement

Change-Id: I2bc3e30121697404dcd54f1c2127bd85ccc1029e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-09-30 16:38:59 +00:00
Filip Tehlar
90690f1e8f ikev2: show IKE SA command improvements
Ticket: VPP-1898
Type: improvement

Change-Id: I1c56df331965c733a2d0eae63a12d5a4ee5a2e41
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-09-30 14:21:35 +00:00
Damjan Marion
2454de2d45 vppinfra: use heap to store bihash data
Type: improvement
Change-Id: Ifb0fa114414aa2fdc244f964612ca3ac3e29b5e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-30 11:41:16 +00:00
Florin Coras
2a7c0b6fc0 svm session: use new clib mem apis for segments
"sh memory map" now reports shared memory segments mapped by session
layer for applications.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7debdcd06c7728abfb5cf817a1ccc37de495472c
2020-09-30 10:11:21 +00:00
Steven Luong
5aa34d54de avf: check duplicate pci address upon create interface
Entering duplicate pci address when creating an avf interface causes
crash in register_node

(gdb) f 4
145	    error_exit (1);
(gdb) up
354	      clib_error ("more than one node named `%v'", n->name);
(gdb) p n
$1 = (vlib_node_t *) 0x7fffbbe55de4
(gdb) p n->name
$2 = (u8 *) 0x7fffbc410b10 "avf-0/4/a/0-tx"
(gdb)

The fix is to loop through the pci addresses in the avf interface pool
and to reject the duplicate.

Type: improvement

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I4ed6fb630fb11982d85c5bb325d9f0d6beeaf023
2020-09-30 10:10:57 +00:00
Artem Glazychev
124d5e02b3 wireguard: fix udp-port registration
Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I698ef299316004b797da1e74b64d067caac4bd2d
2020-09-30 00:16:53 +00:00
Florin Coras
e2c9f234e1 svm: fix max fifo size
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I52ac28ed6d420f03852a425b5a16a7eb8e94b628
2020-09-29 20:13:29 +00:00
Florin Coras
e7f70d90fe hsa: fix coverity warning
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I046e5aa90016e45b5cbaec12593ba4ac7a659783
2020-09-29 17:36:59 +00:00
Filip Tehlar
346ec9ac38 ikev2: fix false positive NAT detection
Type: fix

Change-Id: Id7f865f537c55d00a784eec51624ba28e903a083
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-09-29 16:22:06 +00:00
Mohsin Kazmi
162a296756 virtio: fix modern device queue notify
QUEUE_SELECT and QUEUE_NOTIFY_OFF registers are shared between all
workers operating on the same device and operations are not atomic

Type: fix

Change-Id: Ie017b1bfc7e3b6b4e59029f45db78eeffd9f3aeb
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-09-29 13:34:13 +00:00