PF and Custom Kernel

Hello,

I recompiled a custom kernel with PF ALTQ support. And added the following to my KERNCONF:

Code:
device pf
device pflog
device pfsync

options         ALTQ
options         ALTQ_CBQ        # Class Bases Queuing (CBQ)
options         ALTQ_RED        # Random Early Detection (RED)
options         ALTQ_RIO        # RED In/Out
options         ALTQ_HFSC       # Hierarchical Packet Scheduler (HFSC)
options         ALTQ_PRIQ       # Priority Queuing (PRIQ)
options         ALTQ_NOPCC      # Required for SMP build

The server booted just fine but when I tried to start PF I get this message:

Code:
Enabling pfpfctl: DIOCADDRULE: Operation not supported by device

The log files are clean; there is no output or errors related to PF. Would someone kindly provide some pointers or clues on where to start in my quest to fix this problem? I know this post is lacking some details but I'm will to provide more info as needed.

Thanks,

CJ
 
What version of FreeBSD are you using? Post the output of [cmd=]uname -a[/cmd]
 
# uname -a

Code:
FreeBSD 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Wed Jun 20 13:42:08 EDT 2012 /usr/obj/usr/src/sys/ISECUSTKERN  amd64
 
Why are you running -CURRENT? And, as suntzu noted, is your kernel in sync with your world?
 
The tone of your reply gave me the answers I needed to resolved this issue. I re-installed FreeBSD 9.0 and of course installed the sources from the image. I then made the changes to my kernel and added options and devices and commented out the unnecessary. Compiled the custom kernel with the ALTQ options and it works!

# uname -a

Code:
FreeBSD 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Fri Jun 22 19:43:43 EDT 2012/usr/obj/usr/src/sys/ISEKERN01  amd64

Thanks,

CJ
 
There is no such thing as 9.0-CURRENT at the moment. How did you end up with that? FreeBSD 9 has a -RELEASE and a -STABLE tree. The -CURRENT tree is always the latest bleeding edge, i.e. FreeBSD 10. Did you pick up an old snapshot or source tree from before 9.0-RELEASE?
 
I did exactly as I described above. I used the Freebsd FreeBSD 9.0-RELEASE DVD image and installed the OS with the sources included on the disk only. When it finished I updated the ports tree, and then cd'ed into the /usr/src directory. I created a symlink to my custom kernel into the amd64/conf folder. I added some things and took away others and compiled the kernel. And that is the version it ended as. The first time with FreeBSD 10 I updated the sources.
 
One final note, even though the issue is resolved. The
Code:
options         ALTQ_NOPCC      # Required for SMP build
is actually only "required if the TSC is unusable."

Yes, previous versions of FreeBSD (e.g. 6.0-RELEASE) simply stated that it was "required for SMP builds." However, if you look at the man pages for more current releases you'll see they've updated the explanation to what I posted above. I've omitted that option on several SMP systems (all with working TSCs), and have had altq work on them without issues.
 
Back
Top