[JNPR] Network stack as a module (RFC)

Adrian Chadd adrian at freebsd.org
Sat Nov 16 02:03:08 UTC 2013


Hi,

We can't commit it with 'netstack' against all of the drivers.

I think the default should be "assume freebsd's networking stack" and
if someone disables that option, the drivers just won't link. Thus,
someone compiling FreeBSD without netstack shouldn't be compiling
GENERIC - they would be compiling a custom kernel with their own
device stuff.



-adrian


On 15 November 2013 13:52, Steve Kiernan <stevek at juniper.net> wrote:
> This is a follow up to the request sent back in January titled "Proposal for changes to network device drivers and network stack".
>
> In order to make it easier to review, we will be submitting pieces to be contributed in logical blocks.
>
> Please review the following patch and provide feedback:
> http://people.freebsd.org/~marcel/Juniper/201311/netstack-option.diff
>
> The details of this patch are as follows (and what is suggested for the commit log):
>
> Add a NETSTACK option to facilitate separating network stack pieces from the
> rest of the OS core. This is the first step towards having the network stack
> as a module.
>
> In order to be able to build without the NETSTACK option enabled, the following
> changes are also required and included with this commit:
>
> * Add 'optional netstack' to source files that should be considered part of the
>   network stack, including drivers
> * Dynamically register the setfib syscall
>   - this eliminates the need of an #Ifdef NETSTACK in kern/syscalls.master and
>     will be necessary when the network stack is a module
> * Add #ifdef NETSTACK for the following sections of kernel:
>   In linprocfs - the proc/net nodes
>   In the Linuxulator - linux_ioctl_socket and callers
>   In SVR4 compat layer - STREAMS support, socket ioctls, and networking related
>       system calls (getmsg, putmsg, recv, send, sendto)
>   In kern/sys_socket.c - interface/routing/protocol specific ioctls are no
>       longer called in the default case when NETSTACK is not defined, return
>       ENXIO in that case
>   In kern/uipc_socket.c - SO_SETFIB socket option
>   In kern/vfs_init.c - vfs_checkexp should not be set to vfs_stdcheckexp when
>       NETSTACK is not defined
>   In kern/vfs_mount.c - all export-related code
>   In usb device driver - USB_HAVE_PF needs to be defined to 0 in the case of
>       no NETSTACK option
>
> Please note that these NETSTACK checks above will end up being removed as
> pieces of the network stack as a module functionality are added.
>
> To verify building without the NETSTACK option, the LINT-NONETSTACK kernel
> has been added to makeLINT.mk
>
> --
> Stephen J. Kiernan
> Juniper Networks, Inc.
> stevek_at_juniper.net
>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-net mailing list