Page MenuHomeFreeBSD

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

Authored by mjg on Jun 26 2021, 5:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 4:03 AM
Unknown Object (File)
Wed, Oct 23, 7:16 AM
Unknown Object (File)
Oct 4 2024, 7:30 PM
Unknown Object (File)
Oct 4 2024, 11:42 AM
Unknown Object (File)
Oct 3 2024, 3:57 PM
Unknown Object (File)
Oct 3 2024, 1:01 PM
Unknown Object (File)
Oct 3 2024, 10:27 AM
Unknown Object (File)
Oct 3 2024, 10:10 AM
Subscribers

Details

Summary

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
counter_u64_alloc.

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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
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