From nobody@FreeBSD.org  Tue May 31 04:59:32 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4BDFB1065673
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 31 May 2011 04:59:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 3C49B8FC1F
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 31 May 2011 04:59:32 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p4V4xWJB000380
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 31 May 2011 04:59:32 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p4V4xV3Y000379;
	Tue, 31 May 2011 04:59:31 GMT
	(envelope-from nobody)
Message-Id: <201105310459.p4V4xV3Y000379@red.freebsd.org>
Date: Tue, 31 May 2011 04:59:31 GMT
From: Ben Kaduk <kaduk@mit.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Document 16-fib cap in setfib.2
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         157453
>Category:       docs
>Synopsis:       [patch] document 16-fib cap in setfib.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bjk
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 31 05:00:22 UTC 2011
>Closed-Date:    Tue Apr 24 03:33:25 UTC 2012
>Last-Modified:  Tue Apr 24 03:40:07 UTC 2012
>Originator:     Ben Kaduk
>Release:        9-current
>Organization:
MIT SIPB
>Environment:
n/a
>Description:
ipfw.8 currently references setfib.1 (though see docs/157452 which changes this to setfib.2) for explaining why the maximum fib value is 15.  But the setfib manual page does not describe this at all.  The attached patch provides the requisite documentation, per sys/net/route.h:96.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- setfib.2.orig	2011-05-31 00:48:50.000000000 -0400
+++ setfib.2	2011-05-31 00:54:57.000000000 -0400
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/sys/setfib.2,v 1.6 2009/09/18 14:17:00 brueffer Exp $
 .\"
-.Dd August 8, 2008
+.Dd May 31, 2011
 .Dt SETFIB 2
 .Os
 .Sh NAME
@@ -49,6 +49,10 @@
 may be retrieved by the 
 .Va net.fibs
 sysctl.
+The system maximum is set in the kernel configuration file with
+.Pq Cd "options	ROUTETABLES=N" .
+However, this maximum is capped at 15 due to the implementation storing
+the fib number in a 4-bit field in mbuf flags.
 The default fib of the process will be applied to all protocol families 
 that support multiple fibs, and ignored by those that do not.
 The default fib for a process may be overridden for a socket with the use


>Release-Note:
>Audit-Trail:

From: Benjamin Kaduk <kaduk@MIT.EDU>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: docs/157453: Fwd: Re: [maybe spam] Re: svn commit: r222702 -
 head/sys/sys
Date: Tue, 7 Jun 2011 23:18:33 -0400 (EDT)

 ---------- Forwarded message ----------
 Date: Tue, 07 Jun 2011 15:55:44 -0700
 From: Julian Elischer <julian@freebsd.org>
 To: Benjamin Kaduk <kaduk@mit.edu>
 Subject: Re: [maybe spam] Re: svn commit: r222702 - head/sys/sys
 
 On 6/6/11 10:52 AM, Benjamin Kaduk wrote:
 >> On 6/5/11 4:20 AM, Julian Elischer wrote:
 >> 
 >> hmm note that my stealing of 4 bits for FIB was supposed to go away
 >> for 8 and beyond.
 > 
 > Hmm, perhaps my patch to setfib.2 in 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=docs/157453 is not quite right, 
 > then.  Do you have any comments on it?
 
 looks good.. may add "this restriction will eventually be lifted"
 
 > 
 > Thanks,
 > 
 > Ben Kaduk
 > 
 >> We need to do an mbuf redesign.. at this stage, I guess it's a project for 
 >> 10.
 >
 
Responsible-Changed-From-To: freebsd-doc->bjk 
Responsible-Changed-By: bjk 
Responsible-Changed-When: Thu Mar 15 20:08:34 UTC 2012 
Responsible-Changed-Why:  
This one has come full-circle. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157453 
State-Changed-From-To: open->patched 
State-Changed-By: bjk 
State-Changed-When: Mon Mar 19 04:49:23 UTC 2012 
State-Changed-Why:  
r233160 in HEAD; MFC in one week 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157453 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/157453: commit references a PR
Date: Mon, 19 Mar 2012 04:46:21 +0000 (UTC)

 Author: bjk (doc committer)
 Date: Mon Mar 19 04:46:11 2012
 New Revision: 233160
 URL: http://svn.freebsd.org/changeset/base/233160
 
 Log:
   Expound a bit more about the system maximum number of FIBs,
   how it may be set, and current limitations on the value.
   
   Approved by:	hrs (mentor)
   PR:		docs/157453
   MFC after:	1 week
 
 Modified:
   head/lib/libc/sys/setfib.2
 
 Modified: head/lib/libc/sys/setfib.2
 ==============================================================================
 --- head/lib/libc/sys/setfib.2	Mon Mar 19 03:27:08 2012	(r233159)
 +++ head/lib/libc/sys/setfib.2	Mon Mar 19 04:46:11 2012	(r233160)
 @@ -24,7 +24,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd August 8, 2008
 +.Dd March 19, 2012
  .Dt SETFIB 2
  .Os
  .Sh NAME
 @@ -45,10 +45,28 @@ subsequent to the call, to be that of th
  The
  .Fa fib
  argument
 -may be between 0 and the current system maximum which 
 +must be greater than or equal to 0
 +and less than the current system maximum which
  may be retrieved by the 
  .Va net.fibs
  sysctl.
 +The system maximum is set in the kernel configuration file with
 +.Pp
 +.Dl options	ROUTETABLES= Ns Em N
 +.Pp
 +or in
 +.Pa /boot/loader.conf
 +with
 +.Pp
 +.Dl net.fibs= Ns Qq Em N
 +.Pp
 +where
 +.Em N
 +is an integer.
 +However, this maximum is capped at 16 due to the implementation storing
 +the fib number in a 4-bit field in
 +.Xr mbuf 9
 +flags.
  The default fib of the process will be applied to all protocol families 
  that support multiple fibs, and ignored by those that do not.
  The default fib for a process may be overridden for a socket with the use
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/157453: commit references a PR
Date: Tue, 24 Apr 2012 03:29:26 +0000 (UTC)

 Author: bjk (doc committer)
 Date: Tue Apr 24 03:27:27 2012
 New Revision: 234628
 URL: http://svn.freebsd.org/changeset/base/234628
 
 Log:
   MFC r233160:
       Expound a bit more about the system maximum number of FIBs,
       how it may be set, and current limitations on the value.
   
   PR:		docs/157453
   Approved by:	hrs (mentor)
 
 Modified:
   stable/9/lib/libc/sys/setfib.2
 Directory Properties:
   stable/9/lib/libc/   (props changed)
   stable/9/lib/libc/sys/   (props changed)
 
 Modified: stable/9/lib/libc/sys/setfib.2
 ==============================================================================
 --- stable/9/lib/libc/sys/setfib.2	Tue Apr 24 01:12:43 2012	(r234627)
 +++ stable/9/lib/libc/sys/setfib.2	Tue Apr 24 03:27:27 2012	(r234628)
 @@ -24,7 +24,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd August 8, 2008
 +.Dd March 19, 2012
  .Dt SETFIB 2
  .Os
  .Sh NAME
 @@ -45,10 +45,28 @@ subsequent to the call, to be that of th
  The
  .Fa fib
  argument
 -may be between 0 and the current system maximum which 
 +must be greater than or equal to 0
 +and less than the current system maximum which
  may be retrieved by the 
  .Va net.fibs
  sysctl.
 +The system maximum is set in the kernel configuration file with
 +.Pp
 +.Dl options	ROUTETABLES= Ns Em N
 +.Pp
 +or in
 +.Pa /boot/loader.conf
 +with
 +.Pp
 +.Dl net.fibs= Ns Qq Em N
 +.Pp
 +where
 +.Em N
 +is an integer.
 +However, this maximum is capped at 16 due to the implementation storing
 +the fib number in a 4-bit field in
 +.Xr mbuf 9
 +flags.
  The default fib of the process will be applied to all protocol families 
  that support multiple fibs, and ignored by those that do not.
  The default fib for a process may be overridden for a socket with the use
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: bjk 
State-Changed-When: Tue Apr 24 03:33:02 UTC 2012 
State-Changed-Why:  
Merged to 7, 8, and 9. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157453 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/157453: commit references a PR
Date: Tue, 24 Apr 2012 03:30:14 +0000 (UTC)

 Author: bjk (doc committer)
 Date: Tue Apr 24 03:29:10 2012
 New Revision: 234629
 URL: http://svn.freebsd.org/changeset/base/234629
 
 Log:
   MFC r233160:
       Expound a bit more about the system maximum number of FIBs,
       how it may be set, and current limitations on the value.
   
   PR:		docs/157453
   Approved by:	hrs (mentor)
 
 Modified:
   stable/8/lib/libc/sys/setfib.2
 Directory Properties:
   stable/8/lib/libc/   (props changed)
   stable/8/lib/libc/sys/   (props changed)
 
 Modified: stable/8/lib/libc/sys/setfib.2
 ==============================================================================
 --- stable/8/lib/libc/sys/setfib.2	Tue Apr 24 03:27:27 2012	(r234628)
 +++ stable/8/lib/libc/sys/setfib.2	Tue Apr 24 03:29:10 2012	(r234629)
 @@ -24,7 +24,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd August 8, 2008
 +.Dd March 19, 2012
  .Dt SETFIB 2
  .Os
  .Sh NAME
 @@ -45,10 +45,28 @@ subsequent to the call, to be that of th
  The
  .Fa fib
  argument
 -may be between 0 and the current system maximum which 
 +must be greater than or equal to 0
 +and less than the current system maximum which
  may be retrieved by the 
  .Va net.fibs
  sysctl.
 +The system maximum is set in the kernel configuration file with
 +.Pp
 +.Dl options	ROUTETABLES= Ns Em N
 +.Pp
 +or in
 +.Pa /boot/loader.conf
 +with
 +.Pp
 +.Dl net.fibs= Ns Qq Em N
 +.Pp
 +where
 +.Em N
 +is an integer.
 +However, this maximum is capped at 16 due to the implementation storing
 +the fib number in a 4-bit field in
 +.Xr mbuf 9
 +flags.
  The default fib of the process will be applied to all protocol families 
  that support multiple fibs, and ignored by those that do not.
  The default fib for a process may be overridden for a socket with the use
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/157453: commit references a PR
Date: Tue, 24 Apr 2012 03:32:19 +0000 (UTC)

 Author: bjk (doc committer)
 Date: Tue Apr 24 03:30:26 2012
 New Revision: 234630
 URL: http://svn.freebsd.org/changeset/base/234630
 
 Log:
   MFC r233160:
       Expound a bit more about the system maximum number of FIBs,
       how it may be set, and current limitations on the value.
   
   PR:		docs/157453
   Approved by:	hrs (mentor)
 
 Modified:
   stable/7/lib/libc/sys/setfib.2
 Directory Properties:
   stable/7/lib/libc/   (props changed)
 
 Modified: stable/7/lib/libc/sys/setfib.2
 ==============================================================================
 --- stable/7/lib/libc/sys/setfib.2	Tue Apr 24 03:29:10 2012	(r234629)
 +++ stable/7/lib/libc/sys/setfib.2	Tue Apr 24 03:30:26 2012	(r234630)
 @@ -24,7 +24,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd May 9, 2008
 +.Dd March 19, 2012
  .Dt SETFIB 2
  .Os
  .Sh NAME
 @@ -44,10 +44,28 @@ subsequent to the call, to be that of th
  The
  .Fa fib
  argument
 -may be between 0 and the current system maximum which 
 +must be greater than or equal to 0
 +and less than the current system maximum which
  may be retrieved by the 
  .Em net.fibs
  sysctl.
 +The system maximum is set in the kernel configuration file with
 +.Pp
 +.Dl options	ROUTETABLES= Ns Em N
 +.Pp
 +or in
 +.Pa /boot/loader.conf
 +with
 +.Pp
 +.Dl net.fibs= Ns Qq Em N
 +.Pp
 +where
 +.Em N
 +is an integer.
 +However, this maximum is capped at 16 due to the implementation storing
 +the fib number in a 4-bit field in
 +.Xr mbuf 9
 +flags.
  The default fib of the process will be applied to all protocol families 
  that support multiple fibs, and ignored by those that do not.
  The default fib for a process may be overidden for a socket with the use
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
