From 5f46783c017ef6a934fc8cfa6d1a2206db21401b Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 26 Jan 2022 12:55:27 +0100 Subject: [PATCH] Add missing godoc comments for xfrm stats (#433) Add missing godoc comments matching the kernel documentation, see https://www.kernel.org/doc/html/latest/networking/xfrm_proc.html Also rename the `xfrm*.go` files to have a `net_` prefix, as the respective file is found in the `net/` sub-directory and this matches filenames for other network-related stats. Signed-off-by: Tobias Klauser --- xfrm.go => net_xfrm.go | 9 ++++++--- xfrm_test.go => net_xfrm_test.go | 0 2 files changed, 6 insertions(+), 3 deletions(-) rename xfrm.go => net_xfrm.go (96%) rename xfrm_test.go => net_xfrm_test.go (100%) diff --git a/xfrm.go b/net_xfrm.go similarity index 96% rename from xfrm.go rename to net_xfrm.go index eed07c7d7..f9d9d243d 100644 --- a/xfrm.go +++ b/net_xfrm.go @@ -79,10 +79,13 @@ type XfrmStat struct { // Policy is dead XfrmOutPolDead int // Policy Error - XfrmOutPolError int - XfrmFwdHdrError int + XfrmOutPolError int + // Forward routing of a packet is not allowed + XfrmFwdHdrError int + // State is invalid, perhaps expired XfrmOutStateInvalid int - XfrmAcquireError int + // State hasn’t been fully acquired before use + XfrmAcquireError int } // NewXfrmStat reads the xfrm_stat statistics. diff --git a/xfrm_test.go b/net_xfrm_test.go similarity index 100% rename from xfrm_test.go rename to net_xfrm_test.go