svn commit: r353792 - head/sys/netinet6

Bjoern A. Zeeb bz at FreeBSD.org
Mon Oct 21 08:36:16 UTC 2019


Author: bz
Date: Mon Oct 21 08:36:15 2019
New Revision: 353792
URL: https://svnweb.freebsd.org/changeset/base/353792

Log:
  frag6: add read-only sysctl for nfrags.
  
  Add a read-only sysctl exporting the global number of fragments
  (base system and all vnets).  This is helpful to (a) know how many
  fragments are currently being processed, (b) if there are possible
  leaks, (c) if vnet teardown is not working correctly, and lastly
  (d) it can be used as part of test-suits to ensure (a) to (c).
  
  MFC after:	3 weeks
  Sponsored by:	Netflix

Modified:
  head/sys/netinet6/frag6.c

Modified: head/sys/netinet6/frag6.c
==============================================================================
--- head/sys/netinet6/frag6.c	Mon Oct 21 03:01:05 2019	(r353791)
+++ head/sys/netinet6/frag6.c	Mon Oct 21 08:36:15 2019	(r353792)
@@ -150,6 +150,10 @@ VNET_DEFINE_STATIC(uint32_t,		ip6qb_hashseed);
  */
 SYSCTL_DECL(_net_inet6_ip6);
 
+SYSCTL_UINT(_net_inet6_ip6, OID_AUTO, frag6_nfrags,
+	CTLFLAG_RD, __DEVOLATILE(u_int *, &frag6_nfrags), 0,
+	"Global number of IPv6 fragments across all reassembly queues.");
+
 static void
 frag6_set_bucketsize(void)
 {


More information about the svn-src-head mailing list