HomeFreeBSD

netlink: use custom uma zone for the mbuf storage.

Description

netlink: use custom uma zone for the mbuf storage.

Netlink communicates with userland via sockets, utilising
MCLBYTES-sized mbufs to append data to the socket buffers.
These mbufs are never transmitted via logical or physical network.

It may be possible that the 2k mbuf zone is temporary exhausted
due to the DDoS-style traffic, leading to Netlink failure to
respond to the requests.

To address it, this change introduces a custom Netlink-specific
zone for the mbuf storage. It has the following benefits:

  • no precious memory from UMA_ZONE_CONTIG zones is utilized for Netlink
  • Netlink becomes (more) independent from the traffic spikes and other related network "corner" conditions.
  • Netlink allocations are now isolated within a specific zone, making it easier to track Netlink mbuf usage and attribute mbufs.

Reviewed by: gallatin, adrian
Differential Revision: https://reviews.freebsd.org/D40356
MFC after: 2 weeks

Details

Provenance
melifaroAuthored on May 31 2023, 6:02 PM
Reviewer
gallatin
Differential Revision
D40356: netlink: use custom uma zone for the mbuf storage
Parents
rG4f2cc73f34eb: tcp: Refactor tcp_get_srtt()
Branches
Unknown
Tags
Unknown