From owner-cvs-src-old@FreeBSD.ORG Fri May 22 22:09:27 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D4EA1065670 for ; Fri, 22 May 2009 22:09:27 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 59E908FC12 for ; Fri, 22 May 2009 22:09:27 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n4MM9RDl096012 for ; Fri, 22 May 2009 22:09:27 GMT (envelope-from zec@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n4MM9RHk096011 for cvs-src-old@freebsd.org; Fri, 22 May 2009 22:09:27 GMT (envelope-from zec@repoman.freebsd.org) Message-Id: <200905222209.n4MM9RHk096011@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to zec@repoman.freebsd.org using -f From: Marko Zec Date: Fri, 22 May 2009 22:09:00 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_vimage.c src/sys/net if.c if_var.h src/sys/sys vimage.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2009 22:09:27 -0000 zec 2009-05-22 22:09:00 UTC FreeBSD src repository Modified files: sys/kern kern_vimage.c sys/net if.c if_var.h sys/sys vimage.h Log: SVN rev 192605 on 2009-05-22 22:09:00Z by zec Introduce the if_vmove() function, which will be used in the future for reassigning ifnets from one vnet to another. if_vmove() works by calling a restricted subset of actions normally executed by if_detach() on an ifnet in the current vnet, and then switches to the target vnet and executes an appropriate subset of if_attach() actions there. if_attach() and if_detach() have become wrapper functions around if_attach_internal() and if_detach_internal(), where the later variants have an additional argument, a flag indicating whether a full attach or detach sequence is to be executed, or only a restricted subset suitable for moving an ifnet from one vnet to another. Hence, if_vmove() will not call if_detach() and if_attach() directly, but will call the if_detach_internal() and if_attach_internal() variants instead, with the vmove flag set. While here, staticize ifnet_setbyindex() since it is not referenced from outside of sys/net/if.c. Also rename ifccnt field in struct vimage to ifcnt, and do some minor whitespace garbage collection where appropriate. This change should have no functional impact on nooptions VIMAGE kernel builds. Reviewed by: bz, rwatson, brooks? Approved by: julian (mentor) Revision Changes Path 1.7 +1 -1 src/sys/kern/kern_vimage.c 1.329 +177 -82 src/sys/net/if.c 1.140 +1 -1 src/sys/net/if_var.h 1.24 +1 -1 src/sys/sys/vimage.h