Commit Graph

6778 Commits

Author SHA1 Message Date
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: f68fccfe7e
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: ed04407829

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
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
Florin Coras d68faf8559 vcl svm: provide apps access to fifo chunks
Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2191b8594b1e87ecc00f237316457db249f73603
2020-09-29 09:02:48 +00:00
Artem Glazychev a880b276d9 wireguard: fix license headers
Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: If5cc8894e0d1785dd04ab1e460e017580c9b41ce
2020-09-29 09:02:02 +00:00
Artem Glazychev 8bac1e8c86 wireguard: fix indents
Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I84cd7b08eac62160cf407409d32dd40cec7ae9d6
2020-09-29 09:01:40 +00:00
Artem Glazychev 6bdfcd429f wireguard: readme fix
Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I0080a158fc3e17dfdd360f6ba164e3bfa3d585a6
2020-09-29 09:01:20 +00:00
Fan Zhang 1152e60ebe dpdk: fix compile
Type: fix

Since DPDK is now compiled by meson but some compiles in VPP is
missing. This patch fixes that.

- Fixes QAT PMD not compiled. QAT meson compile, even for sym
crypto PMD, is happened in drive/compress/qat. Originally all
PMDs in compressdev is disabled by default. This patch fixes
that.

- Fixes DPDK plugin version detection. DPDK meson build
generates rte_build_config.h, which containing all version
information in build-dpdk instead of rte_config.h in make.
This patch uses the file to detect version data.

- Removed SW crypto PMD auto-creation in cryptodev engine. In
case the AESNI-MB PMD required shared library is missing.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I7cd91abb5de303ff5e4c55cd05e011b57f883524
2020-09-29 09:00:40 +00:00
Steven Luong 8b388e35b2 avf: validate queue size config
Check CLI queue size is within the range of 64 and 4096
Enhance show hardware to display queue size and number of queues.

Type: improvement

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I360e3cdb2e69e4ea7380ed924e71a5ae84ed4b64
2020-09-29 09:00:26 +00:00
Damjan Marion 4537c30925 vppinfra: don't call dlmalloc API directly from the code
- it is confusing from end consumer perspective that some thing
   is somewhere called heap and somewhere mspace

 - this is base for additional work where heap pointer is not the same
   thing like mspace

Type: improvement
Change-Id: I644d5a0de17690d65d164d8cec3c5654571629ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-28 20:34:07 +02:00
Benoît Ganne a8af7cf253 ikev2: fix memory leaks
Type: fix

Change-Id: I5be19a4923b37e2636621d36155178ac348ee41c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-09-28 17:08:47 +00:00
Mohsin Kazmi e347acbc31 virtio: add packet buffering on tx
Type: feature

This patch adds packet buffering on tx for
slow backend which have some jitter/delays
in freeing the vrings.

There are some limitations to the current design:
1) It only works in poll mode.
2) Atleast 1 rx queue of an interface (with buffering
   enabled) should be placed on each worker and main thread.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ib93c350298b228e80426e58ac77f3bbc93b8be27
2020-09-28 16:47:30 +00:00
Ray Kinsella 7741afaf5c classify: use clib_crc32c on supporting uarch
Use clib_crc32c in place of clib_xxhash on supporting uarch.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Icdfb4ffa92c2c9e7aebc3ec99f20e91392a103ab
2020-09-28 16:40:56 +00:00