Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2016 14:34:36 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300615 - head/sys/dev/iscsi
Message-ID:  <201605241434.u4OEYaZv013698@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Tue May 24 14:34:36 2016
New Revision: 300615
URL: https://svnweb.freebsd.org/changeset/base/300615

Log:
  Add kern.icl.iser_offloads sysctl.
  
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/iscsi/icl.c

Modified: head/sys/dev/iscsi/icl.c
==============================================================================
--- head/sys/dev/iscsi/icl.c	Tue May 24 13:59:13 2016	(r300614)
+++ head/sys/dev/iscsi/icl.c	Tue May 24 14:34:36 2016	(r300615)
@@ -79,20 +79,27 @@ SYSCTL_INT(_kern_icl, OID_AUTO, debug, C
     &icl_debug, 0, "Enable debug messages");
 SYSCTL_PROC(_kern_icl, OID_AUTO, offloads,
     CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
-    NULL, 0, sysctl_kern_icl_offloads, "A",
+    NULL, false, sysctl_kern_icl_offloads, "A",
     "List of ICL modules");
+SYSCTL_PROC(_kern_icl, OID_AUTO, iser_offloads,
+    CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+    NULL, true, sysctl_kern_icl_offloads, "A",
+    "List of iSER ICL modules");
 
 static int
 sysctl_kern_icl_offloads(SYSCTL_HANDLER_ARGS)
 {
 	const struct icl_module *im;
 	struct sbuf sb;
+	bool iser = arg2;
 	int error;
 
 	sbuf_new(&sb, NULL, 256, SBUF_AUTOEXTEND | SBUF_INCLUDENUL);
 
 	sx_slock(&sc->sc_lock);
 	TAILQ_FOREACH(im, &sc->sc_modules, im_next) {
+		if (im->im_iser != iser)
+			continue;
 		if (im != TAILQ_FIRST(&sc->sc_modules))
 			sbuf_putc(&sb, ' ');
 		sbuf_printf(&sb, "%s", im->im_name);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605241434.u4OEYaZv013698>