diff options
author | Florin Coras <fcoras@cisco.com> | 2022-11-18 18:29:23 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2022-11-28 19:31:59 +0000 |
commit | 797562c86066411c29116cc099864f12c98561d9 (patch) | |
tree | 828516d730a39080d37a9a62ba6e782ea28af695 /.gitignore | |
parent | 7943c90b2e341e6e064538f31746e326cd7c4e42 (diff) |
udp: preallocate ports sparse vec map
Not ideal. The sparse vector used to map ports to next nodes assumes
only a few ports are ever used. When udp transport is enabled this does
not hold and, to make matters worse, ports are consumed in a random
order.
This can lead to a lot of slow updates to internal data structures
which in turn can slow udp connection allocations until all ports are
eventually consumed.
Consequently, reallocate sparse vector, preallocate all ports and have
them point to UDP_NO_NODE_SET. We could consider switching the sparse
vector to a preallocated vector but that would increase memory
consumption for vpp deployments that do not rely on host stack.
For reference, populating one of the v4 or v6 sparse vectors in reverse
order takes about 9.8s on a skylake cpu.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id795e1805d0d3ba54f56a152a9506a7a2a06ecbc
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions