Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2012 21:56:53 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r232080 - in head: share/man/man4 sys/net
Message-ID:  <201202232156.q1NLurPU025054@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thompsa
Date: Thu Feb 23 21:56:53 2012
New Revision: 232080
URL: http://svn.freebsd.org/changeset/base/232080

Log:
  Add a sysctl/tunable default value for the use_flowid sysctl in r232008.

Modified:
  head/share/man/man4/lagg.4
  head/sys/net/if_lagg.c

Modified: head/share/man/man4/lagg.4
==============================================================================
--- head/share/man/man4/lagg.4	Thu Feb 23 21:54:04 2012	(r232079)
+++ head/share/man/man4/lagg.4	Thu Feb 23 21:56:53 2012	(r232080)
@@ -142,10 +142,12 @@ and
 modes will use the RSS hash from the network card if available to avoid
 computing one, this may give poor traffic distribution if the hash is invalid
 or uses less of the protocol header information.
-Local hash computation can be forced by setting the
+Local hash computation can be forced per interface by setting the
 .Va net.link.lagg.X.use_flowid
 .Xr sysctl 8
-variable to zero where X is the interface number.
+variable to zero where X is the interface number, the default for
+new interfaces is set via
+.Va net.link.lagg.default_use_flowid .
 .Sh EXAMPLES
 Create a 802.3ad link aggregation using LACP with two
 .Xr bge 4

Modified: head/sys/net/if_lagg.c
==============================================================================
--- head/sys/net/if_lagg.c	Thu Feb 23 21:54:04 2012	(r232079)
+++ head/sys/net/if_lagg.c	Thu Feb 23 21:56:53 2012	(r232080)
@@ -172,6 +172,11 @@ static int lagg_failover_rx_all = 0; /* 
 SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW,
     &lagg_failover_rx_all, 0,
     "Accept input from any interface in a failover lagg");
+static int def_use_flowid = 1; /* Default value for using M_FLOWID */
+TUNABLE_INT("net.link.lagg.default_use_flowid", &def_use_flowid);
+SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RW,
+    &def_use_flowid, 0,
+    "Default setting for using flow id for load sharing");
 
 static int
 lagg_modevent(module_t mod, int type, void *data)
@@ -274,7 +279,7 @@ lagg_clone_create(struct if_clone *ifc, 
 
 	sysctl_ctx_init(&sc->ctx);
 	snprintf(num, sizeof(num), "%u", unit);
-	sc->use_flowid = 1;
+	sc->use_flowid = def_use_flowid;
 	oid = SYSCTL_ADD_NODE(&sc->ctx, &SYSCTL_NODE_CHILDREN(_net_link, lagg),
 		OID_AUTO, num, CTLFLAG_RD, NULL, "");
 	SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO,



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