freebsd-dev/sys/contrib
Mariusz Zaborski 89d5cbb822 libnv: optimize nvlist size calculation
If we had a multiple nvlist, during nvlist_pack, we calculated the size
of every nvlist separately. For example, if we had a nvlist with three
nodes each containing another (A contains B, and B contains C), we first
calculated the size of nvlist A (which contains B, C), then we calculate
the size of B (which contains C, notice that we already did the
calculation of B, when we calculate A), and finally C. This means that
this calculation was O(N!). This was done because each time we pack
nvlist, we have to put its size in the header
(the separate header for A, B, and C).

To not break the ABI and to reduce the complexity of nvlist_size,
instead of calculating the nvlist size when requested,
we track the size of each nvlist.

Reported by:	pjd, kp
Tested by:	kp
2021-06-11 17:51:29 +02:00
..
alpine-hal
ck Remove FreeBSD/armv4 specific bits from CK. 2020-04-13 23:16:32 +00:00
cloudabi
dev Import ACPICA 20210604 2021-06-05 01:58:00 -04:00
device-tree Update DTS files from Linux v5.10 2021-03-23 15:00:35 +01:00
dpdk_rte_lpm Fix dpdk/ldradix fib lookup algorithm preference calculation. 2021-03-07 22:17:53 +00:00
edk2 Document upgrade procedure in FREEBSD-upgrade 2020-06-04 20:48:57 +00:00
ena-com Adjust ENA driver files to latest ena-com changes 2020-11-18 14:59:22 +00:00
ipfilter/netinet ipfilter: Fix ip_nat memory leak and use-after-free 2021-05-25 11:58:14 -07:00
libb2
libfdt
libnv libnv: optimize nvlist size calculation 2021-06-11 17:51:29 +02:00
libsodium Add chacha20poly1305 support to crypto build 2020-02-16 00:03:09 +00:00
ncsw [PowerPC] [Book-E] Remove obsolete interrupt binding workaround 2020-02-25 22:03:30 +00:00
ngatm ngatm: Handle errors from uni_msg_extend() 2021-06-06 16:44:47 -04:00
octeon-sdk mips/octeon SDK: Fix __cvmx_cmd_queue_lock asm for clang 11 2021-04-18 12:05:55 -05:00
openzfs zfs: merge openzfs/zfs@75b4cbf62 (master) into main 2021-06-08 16:52:44 +02:00
pcg-c/include pcg-c: Add 'static' to inline function definitions 2020-08-15 18:46:26 +00:00
rdma/krping Fix memory leaks in error paths in krping. 2021-01-08 12:35:55 +01:00
v4l
vchiq/interface vchiq: Rename timer func so they do not conflict with linuxkpi 2020-11-17 14:41:23 +00:00
x86emu
xz-embedded
zlib MFV r351500: Fix CLEAR_HASH macro to be usable as a single statement. 2019-08-26 00:46:39 +00:00
zstd sys/*/conf/*, docs: fix links to handbook 2021-05-20 09:27:10 +01:00