From owner-p4-projects@FreeBSD.ORG Tue Jun 9 08:25:03 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2CEFD1065672; Tue, 9 Jun 2009 08:25:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0840106566B for ; Tue, 9 Jun 2009 08:25:02 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CF2628FC0C for ; Tue, 9 Jun 2009 08:25:02 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n598P2SO030615 for ; Tue, 9 Jun 2009 08:25:02 GMT (envelope-from zec@fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n598P20t030613 for perforce@freebsd.org; Tue, 9 Jun 2009 08:25:02 GMT (envelope-from zec@fer.hr) Date: Tue, 9 Jun 2009 08:25:02 GMT Message-Id: <200906090825.n598P20t030613@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 163869 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 08:25:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=163869 Change 163869 by zec@zec_amdx4 on 2009/06/09 08:24:24 Fix misintegrations, reduce WS diff against head, and back out M_REMOTE_VNET mbuf flag, to be replaced RSN by thread tagging for preventing netisr direct dispatch being called from outbound call path of the network stack. Affected files ... .. //depot/projects/vimage/src/sys/kern/uipc_domain.c#22 edit .. //depot/projects/vimage/src/sys/netgraph/ng_base.c#60 edit .. //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#27 edit .. //depot/projects/vimage/src/sys/netgraph/ng_iface.c#26 edit .. //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#40 edit .. //depot/projects/vimage/src/sys/netipsec/key.c#43 edit .. //depot/projects/vimage/src/sys/sys/mbuf.h#19 edit Differences ... ==== //depot/projects/vimage/src/sys/kern/uipc_domain.c#22 (text+ko) ==== @@ -172,7 +172,9 @@ } /* - * Initialize a domain instance. + * Add a new protocol domain to the list of supported domains + * Note: you cant unload it again because a socket may be using it. + * XXX can't fail at this time. */ static int net_init_domain(const void *arg) ==== //depot/projects/vimage/src/sys/netgraph/ng_base.c#60 (text+ko) ==== @@ -3096,7 +3096,7 @@ V_nextID = 1; - return 0; + return (0); } #ifdef VIMAGE ==== //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#27 (text+ko) ==== @@ -261,14 +261,6 @@ * Send packet; if hook is not connected, mbuf will get * freed. */ -#ifdef VIMAGE - if (ifp->if_vnet != node->nd_vnet) { - m->m_flags |= M_REMOTE_VNET; - CURVNET_SET_QUIET(node->nd_vnet); - NG_SEND_DATA_ONLY(error, priv->ether, m); - CURVNET_RESTORE(); - } else -#endif NG_SEND_DATA_ONLY(error, priv->ether, m); /* Update stats */ @@ -556,12 +548,6 @@ /* Update interface stats */ ifp->if_ipackets++; -#ifdef VIMAGE - /* Mark up the mbuf if crossing vnet boundary */ - if (ifp->if_vnet != NG_HOOK_NODE(hook)->nd_vnet) - m->m_flags |= M_REMOTE_VNET; -#endif - (*ifp->if_input)(ifp, m); /* Done */ ==== //depot/projects/vimage/src/sys/netgraph/ng_iface.c#26 (text+ko) ==== @@ -484,14 +484,6 @@ /* Send packet. If hook is not connected, mbuf will get freed. */ -#ifdef VIMAGE - if (ifp->if_vnet != priv->node->nd_vnet) { - m->m_flags |= M_REMOTE_VNET; - CURVNET_SET_QUIET(priv->node->nd_vnet); - NG_SEND_DATA_ONLY(error, *get_hook_from_iffam(priv, iffam), m); - CURVNET_RESTORE(); - } else -#endif NG_SEND_DATA_ONLY(error, *get_hook_from_iffam(priv, iffam), m); /* Update stats. */ @@ -766,12 +758,6 @@ ifp->if_ipackets++; ifp->if_ibytes += m->m_pkthdr.len; -#ifdef VIMAGE - /* Mark up the mbuf if crossing vnet boundary */ - if (ifp->if_vnet != NG_HOOK_NODE(hook)->nd_vnet) - m->m_flags |= M_REMOTE_VNET; -#endif - /* Note receiving interface */ m->m_pkthdr.rcvif = ifp; ==== //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#40 (text+ko) ==== @@ -675,6 +675,5 @@ callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz, tcp_hc_purge, arg); - CURVNET_RESTORE(); } ==== //depot/projects/vimage/src/sys/netipsec/key.c#43 (text+ko) ==== @@ -7271,18 +7271,6 @@ } REGTREE_UNLOCK(); - REGTREE_LOCK(); - for (i = 0; i <= SADB_SATYPE_MAX; i++) { - LIST_FOREACH(reg, &V_regtree[i], chain) { - if (__LIST_CHAINED(reg)) { - LIST_REMOVE(reg, chain); - free(reg, M_IPSEC_SAR); - break; - } - } - } - REGTREE_UNLOCK(); - ACQ_LOCK(); for (acq = LIST_FIRST(&V_spacqtree); acq != NULL; acq = nextacq) { nextacq = LIST_NEXT(acq, chain); ==== //depot/projects/vimage/src/sys/sys/mbuf.h#19 (text+ko) ==== @@ -200,7 +200,6 @@ #define M_PROTO7 0x00100000 /* protocol-specific */ #define M_PROTO8 0x00200000 /* protocol-specific */ #define M_FLOWID 0x00400000 /* flowid is valid */ -#define M_REMOTE_VNET 0x00800000 /* mbuf crossed boundary between two vnets */ /* * For RELENG_{6,7} steal these flags for limited multiple routing table * support. In RELENG_8 and beyond, use just one flag and a tag.