Page MenuHomeFreeBSD

ipsec: globalize lft zone and zero out buffers at allocation time

Authored by mjg on Jun 26 2021, 5:24 PM.
Referenced Files
Unknown Object (File)
Oct 30 2023, 8:58 PM
Unknown Object (File)
Oct 30 2023, 11:59 AM
Unknown Object (File)
Oct 27 2023, 9:26 PM
Unknown Object (File)
Oct 19 2023, 8:15 AM
Unknown Object (File)
Sep 21 2023, 10:44 PM
Unknown Object (File)
Sep 12 2023, 8:25 AM
Unknown Object (File)
Sep 2 2023, 1:37 PM
Unknown Object (File)
Jul 20 2023, 11:34 AM



Creation of a zone is expensive and there is no need to have one for
every vnet. Moreover, this wastes memory as these separate zones
cannot use the same per-cpu caches. Finally, this is a step towards
replacing the custom zone with pcpu-16.

Two counter_u64_zero calls induce back-to-back IPIs to zero everything
out. Instead, pass the M_ZERO flag to let uma just iterate all buffers.
The counter(9) API abstraction is already violated by not using

Sponsored by: Rubicon Communications, LLC ("Netgate")

Test Plan

sys/netipsec/tunnel/aes_cbc_128_hmac_sha1:v4 -> passed [0.209s]
sys/netipsec/tunnel/aes_cbc_128_hmac_sha1:v6 -> passed [0.224s]
sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256:v4 -> passed [0.194s]
sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256:v6 -> passed [0.183s]
sys/netipsec/tunnel/aes_gcm_128:v4 -> passed [0.206s]
sys/netipsec/tunnel/aes_gcm_128:v6 -> passed [0.195s]
sys/netipsec/tunnel/aes_gcm_256:v4 -> passed [0.191s]
sys/netipsec/tunnel/aes_gcm_256:v6 -> passed [0.174s]
sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1:v4 -> passed [0.194s]
sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1:v6 -> passed [0.211s]
sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256:v4 -> passed [0.176s]
sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256:v6 -> passed [0.196s]
sys/netipsec/tunnel/aesni_aes_gcm_128:v4 -> passed [0.177s]
sys/netipsec/tunnel/aesni_aes_gcm_128:v6 -> passed [0.180s]
sys/netipsec/tunnel/aesni_aes_gcm_256:v4 -> passed [0.184s]
sys/netipsec/tunnel/aesni_aes_gcm_256:v6 -> passed [0.176s]
sys/netipsec/tunnel/empty:v4 -> passed [0.188s]
sys/netipsec/tunnel/empty:v6 -> passed [0.196s]

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

mjg requested review of this revision.Jun 26 2021, 5:24 PM
mjg edited the summary of this revision. (Show Details)
mjg edited the summary of this revision. (Show Details)

I have no objection.

This revision is now accepted and ready to land.Jun 28 2021, 6:29 AM