From owner-svn-src-head@freebsd.org Thu May 10 19:13:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48679FD3C89; Thu, 10 May 2018 19:13:02 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F094E86EC5; Thu, 10 May 2018 19:13:01 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D11DE24967; Thu, 10 May 2018 19:13:01 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4AJD1WT069112; Thu, 10 May 2018 19:13:01 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4AJD1vO069109; Thu, 10 May 2018 19:13:01 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805101913.w4AJD1vO069109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 10 May 2018 19:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333469 - in head/sys: conf net X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: conf net X-SVN-Commit-Revision: 333469 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 19:13:02 -0000 Author: mmacy Date: Thu May 10 19:13:00 2018 New Revision: 333469 URL: https://svnweb.freebsd.org/changeset/base/333469 Log: Allocate epoch for networking at startup Additionally add CK to include paths for modules Approved by: sbruno@ Modified: head/sys/conf/kmod.mk head/sys/net/if.c head/sys/net/if_var.h Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu May 10 18:53:39 2018 (r333468) +++ head/sys/conf/kmod.mk Thu May 10 19:13:00 2018 (r333469) @@ -122,7 +122,7 @@ CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNB # Add -I paths for system headers. Individual module makefiles don't # need any -I paths for this. Similar defaults for .PATH can't be # set because there are no standard paths for non-headers. -CFLAGS+= -I. -I${SYSDIR} +CFLAGS+= -I. -I${SYSDIR} -I${SYSDIR}/contrib/ck/include CFLAGS.gcc+= -finline-limit=${INLINE_LIMIT} CFLAGS.gcc+= -fms-extensions Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Thu May 10 18:53:39 2018 (r333468) +++ head/sys/net/if.c Thu May 10 19:13:00 2018 (r333469) @@ -104,6 +104,7 @@ _Static_assert(sizeof(((struct ifreq *)0)->ifr_name) == offsetof(struct ifreq, ifr_ifru), "gap between ifr_name and ifr_ifru"); +epoch_t net_epoch; #ifdef COMPAT_FREEBSD32 #include #include @@ -903,6 +904,7 @@ if_attachdomain(void *dummy) { struct ifnet *ifp; + net_epoch = epoch_alloc(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) if_attachdomain1(ifp); } Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu May 10 18:53:39 2018 (r333468) +++ head/sys/net/if_var.h Thu May 10 19:13:00 2018 (r333469) @@ -76,6 +76,8 @@ struct netdump_methods; #include /* ifqueue only? */ #include #include +#include +#include #endif /* _KERNEL */ #include #include /* XXX */ @@ -104,6 +106,7 @@ VNET_DECLARE(struct hhook_head *, ipsec_hhh_in[HHOOK_I VNET_DECLARE(struct hhook_head *, ipsec_hhh_out[HHOOK_IPSEC_COUNT]); #define V_ipsec_hhh_in VNET(ipsec_hhh_in) #define V_ipsec_hhh_out VNET(ipsec_hhh_out) +extern epoch_t net_epoch; #endif /* _KERNEL */ typedef enum {