Closed defect closed 4 months ago
Would be nice if we could make the parsing for /proc/net/xfrm_stats more generic and re-use that here, but I think it's fine either way
Yeah, i was thinking about refactoring that out but didn't really find a clean way to do it. Maybe using annotated structs a la json
and yaml
and friends? But that feels a bit overkill, at least for now.
@defect Fair enough, that might be better be part of a bigger refactoring
Since Linux kernel 4.17 (I believe) there is support to move some TLS operations to kernel space, enabling things like TLS
sendfile
to improve performance. Statistics for this feature is exposed under/proc/net/tls_stats
. This PR adds support to read these statistics. It is very much based on the support for/proc/net/xfrm_stats
innet_xfrm.go
as they both share the same format.For more info on Linux kTLS see https://docs.kernel.org/networking/tls.html.