Bug 157453 - [patch] document 16-fib cap in setfib.2
Summary: [patch] document 16-fib cap in setfib.2
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Benjamin Kaduk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 06:00 UTC by Ben Kaduk
Modified: 2012-04-24 04:40 UTC (History)
0 users

See Also:


Attachments
file.diff (779 bytes, patch)
2011-05-31 06:00 UTC, Ben Kaduk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kaduk 2011-05-31 06:00:22 UTC
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.

Fix: Patch attached with submission follows:
Comment 1 Ben Kaduk 2011-06-08 04:18:33 UTC
---------- 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.
>
Comment 2 Benjamin Kaduk freebsd_committer freebsd_triage 2012-03-15 20:08:34 UTC
Responsible Changed
From-To: freebsd-doc->bjk

This one has come full-circle.
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-03-19 04:46:21 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"
Comment 4 Benjamin Kaduk freebsd_committer freebsd_triage 2012-03-19 04:49:23 UTC
State Changed
From-To: open->patched

r233160 in HEAD; MFC in one week
Comment 5 dfilter service freebsd_committer freebsd_triage 2012-04-24 04:29:26 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"
Comment 6 dfilter service freebsd_committer freebsd_triage 2012-04-24 04:30:14 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"
Comment 7 dfilter service freebsd_committer freebsd_triage 2012-04-24 04:32:19 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"
Comment 8 Benjamin Kaduk freebsd_committer freebsd_triage 2012-04-24 04:33:02 UTC
State Changed
From-To: patched->closed

Merged to 7, 8, and 9.