From owner-freebsd-net@FreeBSD.ORG Sat Nov 16 02:03:08 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A40D351E; Sat, 16 Nov 2013 02:03:08 +0000 (UTC) Received: from mail-qe0-x232.google.com (mail-qe0-x232.google.com [IPv6:2607:f8b0:400d:c02::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 336A9240A; Sat, 16 Nov 2013 02:03:08 +0000 (UTC) Received: by mail-qe0-f50.google.com with SMTP id 1so2741059qee.23 for ; Fri, 15 Nov 2013 18:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=SoLwvC0tvcjuQSnHjiKd3hKBNAVe5LFJgZSb3/WbaQ8=; b=W+WkGgLhpAb85HOokDDAvy/lJC9f80JGAwswtzqes4mTWJ0EiBguNIJxOrivDF9NQb iNiwNLfwcKqRDkQXoq2LnitV2L3HCZwTd5m6tTtHHEJvYXw/L2N3nPqDlTdfpbdifX/W 2PbRCr2aJfzbCGmuzKIbjdfMmxb0LkkxQRDhjikQ5drczSR+zoT2AH+wx4+iVdPH27Ix vOugB1pAmBN7CLDp0RRPkKsy+1xvR39nTvQjjo1wtYELehaqtGNcnlBY78eUGELgCsQ+ dSFTePYFG3sxeub26jGjhGioiD6Xw1gZ3ppiyFA8+0YDbPuYxBi4DwH+LU15+XM7OFmj 6BoA== MIME-Version: 1.0 X-Received: by 10.224.98.200 with SMTP id r8mr15648044qan.26.1384567387455; Fri, 15 Nov 2013 18:03:07 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Fri, 15 Nov 2013 18:03:07 -0800 (PST) In-Reply-To: <20131115165210.23f82578@stevek-ubuntu> References: <50F868FF.5060506@networx.ch> <20131115165210.23f82578@stevek-ubuntu> Date: Fri, 15 Nov 2013 18:03:07 -0800 X-Google-Sender-Auth: Upr2vxI-SB2JeNFowegOQb3sQ9Q Message-ID: Subject: Re: [JNPR] Network stack as a module (RFC) From: Adrian Chadd To: Steve Kiernan Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Net , Luigi Rizzo , Marcel Moolenaar , zec@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 02:03:08 -0000 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 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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"