PERFORCE change 80626 for review
Robert Watson
rwatson at FreeBSD.org
Wed Jul 20 20:12:09 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=80626
Change 80626 by rwatson at rwatson_zoo on 2005/07/20 20:11:23
NFS client lockage.
UMA stats fixage.
Affected files ...
.. //depot/projects/netsmp/src/sys/contrib/pf/net/pf.c#2 integrate
.. //depot/projects/netsmp/src/sys/contrib/pf/net/pf_norm.c#2 integrate
.. //depot/projects/netsmp/src/sys/contrib/pf/net/pfvar.h#2 integrate
.. //depot/projects/netsmp/src/sys/dev/ep/if_ep.c#2 integrate
.. //depot/projects/netsmp/src/sys/dev/ep/if_epvar.h#2 integrate
.. //depot/projects/netsmp/src/sys/fs/devfs/devfs_vnops.c#2 integrate
.. //depot/projects/netsmp/src/sys/geom/bde/g_bde_crypt.c#2 integrate
.. //depot/projects/netsmp/src/sys/i386/conf/NOTES#2 integrate
.. //depot/projects/netsmp/src/sys/kern/vfs_aio.c#2 integrate
.. //depot/projects/netsmp/src/sys/kern/vfs_bio.c#2 integrate
.. //depot/projects/netsmp/src/sys/kern/vfs_subr.c#2 integrate
.. //depot/projects/netsmp/src/sys/net/if_bridge.c#2 integrate
.. //depot/projects/netsmp/src/sys/netinet/icmp6.h#2 integrate
.. //depot/projects/netsmp/src/sys/netinet/ip6.h#2 integrate
.. //depot/projects/netsmp/src/sys/netinet6/in6.h#2 integrate
.. //depot/projects/netsmp/src/sys/netinet6/ip6_input.c#2 integrate
.. //depot/projects/netsmp/src/sys/netinet6/ip6_mroute.h#2 integrate
.. //depot/projects/netsmp/src/sys/netinet6/ip6_output.c#2 integrate
.. //depot/projects/netsmp/src/sys/netinet6/nd6.c#2 integrate
.. //depot/projects/netsmp/src/sys/nfsclient/nfs.h#2 integrate
.. //depot/projects/netsmp/src/sys/nfsclient/nfs_socket.c#2 integrate
.. //depot/projects/netsmp/src/sys/nfsclient/nfs_subs.c#2 integrate
.. //depot/projects/netsmp/src/sys/ufs/ffs/ffs_vfsops.c#2 integrate
.. //depot/projects/netsmp/src/sys/vm/swap_pager.c#2 integrate
.. //depot/projects/netsmp/src/sys/vm/uma_core.c#2 integrate
.. //depot/projects/netsmp/src/sys/vm/vm_map.c#2 integrate
Differences ...
==== //depot/projects/netsmp/src/sys/contrib/pf/net/pf.c#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.34 2005/05/04 19:51:06 mlaier Exp $ */
+/* $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.35 2005/07/20 18:58:27 mlaier Exp $ */
/* $OpenBSD: pf.c,v 1.483 2005/03/15 17:38:43 dhartmei Exp $ */
/*
@@ -1085,6 +1085,11 @@
void
pf_purge_expired_state(struct pf_state *cur)
{
+#ifdef __FreeBSD__
+ if (cur->sync_flags & PFSTATE_EXPIRING)
+ return;
+ cur->sync_flags |= PFSTATE_EXPIRING;
+#endif
if (cur->src.state == PF_TCPS_PROXY_DST)
pf_send_tcp(cur->rule.ptr, cur->af,
&cur->ext.addr, &cur->lan.addr,
==== //depot/projects/netsmp/src/sys/contrib/pf/net/pf_norm.c#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/contrib/pf/net/pf_norm.c,v 1.11 2005/05/03 16:43:32 mlaier Exp $ */
+/* $FreeBSD: src/sys/contrib/pf/net/pf_norm.c,v 1.12 2005/07/20 10:30:52 ume Exp $ */
/* $OpenBSD: pf_norm.c,v 1.97 2004/09/21 16:59:12 aaron Exp $ */
/*
@@ -70,48 +70,6 @@
#include <net/pfvar.h>
-#if defined(__FreeBSD__) && defined(INET6)
-/*
- * XXX: This should go to netinet/ip6.h (KAME)
- */
-/* IPv6 options: common part */
-struct ip6_opt {
- u_int8_t ip6o_type;
- u_int8_t ip6o_len;
-} __packed;
-
-/* Jumbo Payload Option */
-struct ip6_opt_jumbo {
- u_int8_t ip6oj_type;
- u_int8_t ip6oj_len;
- u_int8_t ip6oj_jumbo_len[4];
-} __packed;
-
-/* NSAP Address Option */
-struct ip6_opt_nsap {
- u_int8_t ip6on_type;
- u_int8_t ip6on_len;
- u_int8_t ip6on_src_nsap_len;
- u_int8_t ip6on_dst_nsap_len;
- /* followed by source NSAP */
- /* followed by destination NSAP */
-} __packed;
-
-/* Tunnel Limit Option */
-struct ip6_opt_tunnel {
- u_int8_t ip6ot_type;
- u_int8_t ip6ot_len;
- u_int8_t ip6ot_encap_limit;
-} __packed;
-
-/* Router Alert Option */
-struct ip6_opt_router {
- u_int8_t ip6or_type;
- u_int8_t ip6or_len;
- u_int8_t ip6or_value[2];
-} __packed;
-#endif /* __FreeBSD__ && INET6 */
-
#ifndef __FreeBSD__
struct pf_frent {
LIST_ENTRY(pf_frent) fr_next;
==== //depot/projects/netsmp/src/sys/contrib/pf/net/pfvar.h#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/contrib/pf/net/pfvar.h,v 1.11 2005/05/03 16:43:32 mlaier Exp $ */
+/* $FreeBSD: src/sys/contrib/pf/net/pfvar.h,v 1.12 2005/07/20 18:58:27 mlaier Exp $ */
/* $OpenBSD: pfvar.h,v 1.213 2005/03/03 07:13:39 dhartmei Exp $ */
/*
@@ -790,6 +790,9 @@
#define PFSTATE_NOSYNC 0x01
#define PFSTATE_FROMSYNC 0x02
#define PFSTATE_STALE 0x04
+#ifdef __FreeBSD__
+#define PFSTATE_EXPIRING 0x10
+#endif
u_int8_t pad;
};
==== //depot/projects/netsmp/src/sys/dev/ep/if_ep.c#2 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ep/if_ep.c,v 1.140 2005/07/01 05:31:23 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ep/if_ep.c,v 1.141 2005/07/19 22:26:44 imp Exp $");
/*
* Modified from the FreeBSD 1.1.5.1 version by:
@@ -281,7 +281,7 @@
error = ep_get_macaddr(sc, sc->eaddr);
if (error) {
device_printf(sc->dev, "Unable to get MAC address!\n");
- EP_LOCK_DESTORY(sc);
+ EP_LOCK_DESTROY(sc);
return (ENXIO);
}
}
@@ -289,7 +289,7 @@
ifp = sc->ifp = if_alloc(IFT_ETHER);
if (ifp == NULL) {
device_printf(sc->dev, "if_alloc() failed\n");
- EP_LOCK_DESTORY(sc);
+ EP_LOCK_DESTROY(sc);
return (ENOSPC);
}
@@ -361,7 +361,7 @@
sc->gone = 1;
ep_free(dev);
- EP_LOCK_DESTORY(sc);
+ EP_LOCK_DESTROY(sc);
return (0);
}
==== //depot/projects/netsmp/src/sys/dev/ep/if_epvar.h#2 (text+ko) ====
@@ -19,7 +19,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/ep/if_epvar.h,v 1.19 2005/07/13 14:54:40 imp Exp $
+ * $FreeBSD: src/sys/dev/ep/if_epvar.h,v 1.20 2005/07/19 22:26:44 imp Exp $
*/
struct ep_board {
@@ -103,6 +103,6 @@
#define EP_LOCK_INIT(_sc) \
mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \
MTX_NETWORK_LOCK, MTX_DEF)
-#define EP_LOCK_DESTORY(_sc) mtx_destroy(&_sc->sc_mtx);
+#define EP_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx);
#define EP_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED);
#define EP_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED);
==== //depot/projects/netsmp/src/sys/fs/devfs/devfs_vnops.c#2 (text+ko) ====
@@ -31,7 +31,7 @@
* @(#)kernfs_vnops.c 8.15 (Berkeley) 5/21/95
* From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vnops.c 1.43
*
- * $FreeBSD: src/sys/fs/devfs/devfs_vnops.c,v 1.115 2005/07/14 10:22:09 rwatson Exp $
+ * $FreeBSD: src/sys/fs/devfs/devfs_vnops.c,v 1.116 2005/07/20 13:34:16 simon Exp $
*/
/*
@@ -788,6 +788,12 @@
struct devfs_mount *dmp;
int error;
+ /*
+ * The only type of node we should be creating here is a
+ * character device, for anything else return EOPNOTSUPP.
+ */
+ if (ap->a_vap->va_type != VCHR)
+ return (EOPNOTSUPP);
dvp = ap->a_dvp;
dmp = VFSTODEVFS(dvp->v_mount);
lockmgr(&dmp->dm_lock, LK_EXCLUSIVE, 0, curthread);
==== //depot/projects/netsmp/src/sys/geom/bde/g_bde_crypt.c#2 (text+ko) ====
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/geom/bde/g_bde_crypt.c,v 1.22 2005/03/11 15:42:51 ume Exp $
+ * $FreeBSD: src/sys/geom/bde/g_bde_crypt.c,v 1.23 2005/07/20 18:08:16 phk Exp $
*/
/* This source file contains the functions responsible for the crypto, keying
* and mapping operations on the I/O requests.
@@ -64,7 +64,7 @@
* from the comparatively small key material in our mkey, in such a way that
* if one, more or even many of the kkeys are compromised, this does not
* significantly help an attack on other kkeys and in particular does not
- * weaken or compromised the mkey.
+ * weaken or compromise the mkey.
*
* First we MD5 hash the sectornumber with the salt from the lock sector.
* The salt prevents the precalculation and statistical analysis of the MD5
==== //depot/projects/netsmp/src/sys/i386/conf/NOTES#2 (text+ko) ====
@@ -4,7 +4,7 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
#
-# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1202 2005/07/02 20:06:42 delphij Exp $
+# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1203 2005/07/20 16:57:53 mdodd Exp $
#
#
@@ -637,6 +637,9 @@
#
# apm: Laptop Advanced Power Management (experimental)
# pmtimer: Timer device driver for power management events (APM or ACPI)
+# smapi: System Management Application Program Interface driver
+# smbios: DMI/SMBIOS entry point
+# vpd: Vital Product Data kernel interface
# cy: Cyclades serial driver
# digi: Digiboard driver
# spic: Sony Programmable I/O controller (VAIO notebooks)
@@ -665,6 +668,9 @@
device apm
hint.apm.0.flags="0x20"
+device smapi
+device smbios
+device vpd
device pmtimer # Adjust system timer at wakeup time
device cy
options CY_PCI_FASTINTR # Use with cy_pci unless irq is shared
==== //depot/projects/netsmp/src/sys/kern/vfs_aio.c#2 (text+ko) ====
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_aio.c,v 1.195 2005/07/01 16:28:30 ssouhlal Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_aio.c,v 1.196 2005/07/20 19:06:06 alc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2107,6 +2107,7 @@
struct aio_liojob *lj;
mtx_lock(&Giant);
+ bp->b_flags |= B_DONE;
wakeup(bp);
aiocbe = (struct aiocblist *)bp->b_caller1;
==== //depot/projects/netsmp/src/sys/kern/vfs_bio.c#2 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_bio.c,v 1.491 2005/06/14 20:32:27 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_bio.c,v 1.492 2005/07/20 19:06:06 alc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -3046,7 +3046,6 @@
if (bp->b_iodone != NULL) {
biodone = bp->b_iodone;
bp->b_iodone = NULL;
- bp->b_flags |= B_DONE;
(*biodone) (bp);
if (dropobj)
bufobj_wdrop(dropobj);
==== //depot/projects/netsmp/src/sys/kern/vfs_subr.c#2 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.635 2005/07/05 15:57:55 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.636 2005/07/20 01:43:27 jeff Exp $");
#include "opt_ddb.h"
#include "opt_mac.h"
@@ -582,7 +582,7 @@
}
MNT_IUNLOCK(mp);
vholdl(vp);
- if (VOP_LOCK(vp, LK_INTERLOCK|LK_EXCLUSIVE|LK_NOWAIT, td)) {
+ if (VOP_LOCK(vp, LK_INTERLOCK|LK_EXCLUSIVE, td)) {
vdrop(vp);
MNT_ILOCK(mp);
continue;
@@ -680,11 +680,19 @@
done = 0;
mtx_lock(&mountlist_mtx);
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
+ int vfsunlocked;
if (vfs_busy(mp, LK_NOWAIT, &mountlist_mtx, td)) {
nmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
+ if (!VFS_NEEDSGIANT(mp)) {
+ mtx_unlock(&Giant);
+ vfsunlocked = 1;
+ } else
+ vfsunlocked = 0;
done += vlrureclaim(mp);
+ if (vfsunlocked)
+ mtx_lock(&Giant);
mtx_lock(&mountlist_mtx);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, td);
@@ -700,7 +708,8 @@
#endif
vnlru_nowhere++;
tsleep(vnlruproc, PPAUSE, "vlrup", hz * 3);
- }
+ } else
+ uio_yield();
}
}
==== //depot/projects/netsmp/src/sys/net/if_bridge.c#2 (text+ko) ====
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net/if_bridge.c,v 1.12 2005/07/13 20:40:18 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/net/if_bridge.c,v 1.13 2005/07/20 19:42:51 thompsa Exp $");
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -676,6 +676,7 @@
switch (ifs->if_type) {
case IFT_ETHER:
+ case IFT_L2VLAN:
/*
* Take the interface out of promiscuous mode.
*/
==== //depot/projects/netsmp/src/sys/netinet/icmp6.h#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet/icmp6.h,v 1.16 2005/01/07 01:45:44 imp Exp $ */
+/* $FreeBSD: src/sys/netinet/icmp6.h,v 1.18 2005/07/20 09:17:41 ume Exp $ */
/* $KAME: icmp6.h,v 1.46 2001/04/27 15:09:48 itojun Exp $ */
/*-
@@ -97,6 +97,7 @@
#define MLD_LISTENER_QUERY 130 /* multicast listener query */
#define MLD_LISTENER_REPORT 131 /* multicast listener report */
#define MLD_LISTENER_DONE 132 /* multicast listener done */
+#define MLD_LISTENER_REDUCTION MLD_LISTENER_DONE /* RFC3542 definition */
/* RFC2292 decls */
#define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */
@@ -111,9 +112,9 @@
#endif
#define ND_ROUTER_SOLICIT 133 /* router solicitation */
-#define ND_ROUTER_ADVERT 134 /* router advertisment */
+#define ND_ROUTER_ADVERT 134 /* router advertisement */
#define ND_NEIGHBOR_SOLICIT 135 /* neighbor solicitation */
-#define ND_NEIGHBOR_ADVERT 136 /* neighbor advertisment */
+#define ND_NEIGHBOR_ADVERT 136 /* neighbor advertisement */
#define ND_REDIRECT 137 /* redirect */
#define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */
==== //depot/projects/netsmp/src/sys/netinet/ip6.h#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet/ip6.h,v 1.13 2005/01/07 01:45:44 imp Exp $ */
+/* $FreeBSD: src/sys/netinet/ip6.h,v 1.15 2005/07/20 10:30:52 ume Exp $ */
/* $KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $ */
/*-
@@ -142,7 +142,7 @@
#ifndef _KERNEL
#define IP6OPT_RTALERT 0x05 /* 00 0 00101 (KAME definition) */
#endif
-#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 (2292bis, recommended) */
+#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 (RFC3542, recommended) */
#define IP6OPT_RTALERT_LEN 4
#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */
@@ -160,8 +160,56 @@
#define IP6OPT_MUTABLE 0x20
+/* IPv6 options: common part */
+struct ip6_opt {
+ u_int8_t ip6o_type;
+ u_int8_t ip6o_len;
+} __packed;
+
+/* Jumbo Payload Option */
+struct ip6_opt_jumbo {
+ u_int8_t ip6oj_type;
+ u_int8_t ip6oj_len;
+ u_int8_t ip6oj_jumbo_len[4];
+} __packed;
#define IP6OPT_JUMBO_LEN 6
+/* NSAP Address Option */
+struct ip6_opt_nsap {
+ u_int8_t ip6on_type;
+ u_int8_t ip6on_len;
+ u_int8_t ip6on_src_nsap_len;
+ u_int8_t ip6on_dst_nsap_len;
+ /* followed by source NSAP */
+ /* followed by destination NSAP */
+} __packed;
+
+/* Tunnel Limit Option */
+struct ip6_opt_tunnel {
+ u_int8_t ip6ot_type;
+ u_int8_t ip6ot_len;
+ u_int8_t ip6ot_encap_limit;
+} __packed;
+
+/* Router Alert Option */
+struct ip6_opt_router {
+ u_int8_t ip6or_type;
+ u_int8_t ip6or_len;
+ u_int8_t ip6or_value[2];
+} __packed;
+/* Router alert values (in network byte order) */
+#if BYTE_ORDER == BIG_ENDIAN
+#define IP6_ALERT_MLD 0x0000
+#define IP6_ALERT_RSVP 0x0001
+#define IP6_ALERT_AN 0x0002
+#else
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define IP6_ALERT_MLD 0x0000
+#define IP6_ALERT_RSVP 0x0100
+#define IP6_ALERT_AN 0x0200
+#endif /* LITTLE_ENDIAN */
+#endif
+
/* Routing header */
struct ip6_rthdr {
u_int8_t ip6r_nxt; /* next header */
@@ -202,10 +250,10 @@
/*
* Internet implementation parameters.
*/
-#define IPV6_MAXHLIM 255 /* maximun hoplimit */
+#define IPV6_MAXHLIM 255 /* maximum hoplimit */
#define IPV6_DEFHLIM 64 /* default hlim */
#define IPV6_FRAGTTL 120 /* ttl for fragment packets, in slowtimo tick */
-#define IPV6_HLIMDEC 1 /* subtracted when forwaeding */
+#define IPV6_HLIMDEC 1 /* subtracted when forwarding */
#define IPV6_MMTU 1280 /* minimal MTU and reassembly. 1024 + 256 */
#define IPV6_MAXPACKET 65535 /* ip6 max packet size without Jumbo payload*/
==== //depot/projects/netsmp/src/sys/netinet6/in6.h#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet6/in6.h,v 1.36 2005/01/07 02:30:34 imp Exp $ */
+/* $FreeBSD: src/sys/netinet6/in6.h,v 1.37 2005/07/20 08:59:44 ume Exp $ */
/* $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ */
/*-
@@ -450,7 +450,7 @@
#define IPV6_FW_GET 34 /* get entire firewall rule chain */
#endif
-/* new socket options introduced in RFC2292bis */
+/* new socket options introduced in RFC3542 */
#define IPV6_RTHDRDSTOPTS 35 /* ip6_dest; send dst option before rthdr */
#define IPV6_RECVPKTINFO 36 /* bool; recv if, dst addr */
@@ -472,7 +472,7 @@
(cmsg only/not in of RFC3542) */
#endif
-/* more new socket options introduced in RFC2292bis */
+/* more new socket options introduced in RFC3542 */
#define IPV6_PKTINFO 46 /* in6_pktinfo; send if, src addr */
#define IPV6_HOPLIMIT 47 /* int; send hop limit */
#define IPV6_NEXTHOP 48 /* sockaddr; next hop addr */
@@ -481,7 +481,7 @@
#define IPV6_RTHDR 51 /* ip6_rthdr; send routing header */
#if 0
#define IPV6_PKTOPTIONS 52 /* buf/cmsghdr; set/get IPv6 options */
- /* obsoleted by 2292bis */
+ /* obsoleted by RFC3542 */
#endif
#define IPV6_RECVTCLASS 57 /* bool; recv traffic class values */
==== //depot/projects/netsmp/src/sys/netinet6/ip6_input.c#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet6/ip6_input.c,v 1.81 2005/03/16 05:11:11 sam Exp $ */
+/* $FreeBSD: src/sys/netinet6/ip6_input.c,v 1.82 2005/07/20 08:59:44 ume Exp $ */
/* $KAME: ip6_input.c,v 1.259 2002/01/21 04:58:09 jinmei Exp $ */
/*-
@@ -1213,7 +1213,7 @@
* jumbo payload option is included, the option which
* is to be removed before returning according to
* RFC2292.
- * Note: this constraint is removed in 2292bis.
+ * Note: this constraint is removed in RFC3542
*/
*mp = sbcreatecontrol((caddr_t)hbh, hbhlen,
IS2292(IPV6_2292HOPOPTS, IPV6_HOPOPTS),
==== //depot/projects/netsmp/src/sys/netinet6/ip6_mroute.h#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet6/ip6_mroute.h,v 1.6 2005/01/07 02:30:34 imp Exp $ */
+/* $FreeBSD: src/sys/netinet6/ip6_mroute.h,v 1.7 2005/07/20 08:59:45 ume Exp $ */
/* $KAME: ip6_mroute.h,v 1.19 2001/06/14 06:12:55 suz Exp $ */
/*-
@@ -166,7 +166,7 @@
* like igmpmsg{} used for IPv4 implementation). This is because this
* structure will be passed via an IPv6 raw socket, on which an application
* will only receive the payload i.e. the data after the IPv6 header and all
- * the extension headers. (see Section 3 of draft-ietf-ipngwg-2292bis-01)
+ * the extension headers. (see Section 3 of RFC3542)
*/
struct mrt6msg {
#define MRT6MSG_NOCACHE 1
==== //depot/projects/netsmp/src/sys/netinet6/ip6_output.c#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet6/ip6_output.c,v 1.90 2005/06/10 16:49:22 brooks Exp $ */
+/* $FreeBSD: src/sys/netinet6/ip6_output.c,v 1.91 2005/07/20 08:59:45 ume Exp $ */
/* $KAME: ip6_output.c,v 1.279 2002/01/26 06:12:30 jinmei Exp $ */
/*-
@@ -1701,7 +1701,7 @@
/*
* We ignore this option for TCP
* sockets.
- * (rfc2292bis leaves this case
+ * (RFC3542 leaves this case
* unspecified.)
*/
if (uproto != IPPROTO_TCP)
@@ -1810,7 +1810,7 @@
case IPV6_RTHDRDSTOPTS:
case IPV6_NEXTHOP:
{
- /* new advanced API (2292bis) */
+ /* new advanced API (RFC3542) */
u_char *optbuf;
int optlen;
struct ip6_pktopts **optp;
@@ -2269,9 +2269,9 @@
* For ICMPv6 sockets, no modification allowed for checksum
* offset, permit "no change" values to help existing apps.
*
- * XXX 2292bis says: "An attempt to set IPV6_CHECKSUM
+ * RFC3542 says: "An attempt to set IPV6_CHECKSUM
* for an ICMPv6 socket will fail."
- * The current behavior does not meet 2292bis.
+ * The current behavior does not meet RFC3542.
*/
switch (op) {
case SOPT_SET:
@@ -3060,8 +3060,8 @@
* item. "len" can be 0 only when it's a sticky option.
* We have 4 cases of combination of "sticky" and "cmsg":
* "sticky=0, cmsg=0": impossible
- * "sticky=0, cmsg=1": RFC2292 or rfc2292bis ancillary data
- * "sticky=1, cmsg=0": rfc2292bis socket option
+ * "sticky=0, cmsg=1": RFC2292 or RFC3542 ancillary data
+ * "sticky=1, cmsg=0": RFC3542 socket option
* "sticky=1, cmsg=1": RFC2292 socket option
*/
static int
@@ -3081,8 +3081,8 @@
/*
* IPV6_2292xxx is for backward compatibility to RFC2292, and should
- * not be specified in the context of rfc2292bis. Conversely,
- * rfc2292bis types should not be specified in the context of RFC2292.
+ * not be specified in the context of RFC3542. Conversely,
+ * RFC3542 types should not be specified in the context of RFC2292.
*/
if (!cmsg) {
switch (optname) {
@@ -3108,7 +3108,7 @@
case IPV6_USE_MIN_MTU:
case IPV6_DONTFRAG:
case IPV6_TCLASS:
- case IPV6_PREFER_TEMPADDR: /* XXX: not an rfc2292bis option */
+ case IPV6_PREFER_TEMPADDR: /* XXX: not an RFC3542 option */
return (ENOPROTOOPT);
}
}
@@ -3339,7 +3339,7 @@
* part of the destination options header must appear
* before the routing header in the ancillary data,
* too.
- * RFC2292bis solved the ambiguity by introducing
+ * RFC3542 solved the ambiguity by introducing
* separate ancillary data or option types.
*/
if (opt->ip6po_rthdr == NULL)
@@ -3428,7 +3428,7 @@
if (uproto == IPPROTO_TCP || *(int *)buf == 0) {
/*
* we ignore this option for TCP sockets.
- * (rfc2292bis leaves this case unspecified.)
+ * (RFC3542 leaves this case unspecified.)
*/
opt->ip6po_flags &= ~IP6PO_DONTFRAG;
} else
==== //depot/projects/netsmp/src/sys/netinet6/nd6.c#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet6/nd6.c,v 1.48 2005/02/22 13:04:04 glebius Exp $ */
+/* $FreeBSD: src/sys/netinet6/nd6.c,v 1.49 2005/07/20 20:02:28 ume Exp $ */
/* $KAME: nd6.c,v 1.144 2001/05/24 07:44:00 itojun Exp $ */
/*-
@@ -54,7 +54,6 @@
#include <net/if_arc.h>
#include <net/if_dl.h>
#include <net/if_types.h>
-#include <net/if_atm.h>
#include <net/iso88025.h>
#include <net/fddi.h>
#include <net/route.h>
@@ -203,23 +202,9 @@
case IFT_ARCNET:
ndi->maxmtu = MIN(ARC_PHDS_MAXMTU, ifp->if_mtu); /* RFC2497 */
break;
- case IFT_ETHER:
- ndi->maxmtu = MIN(ETHERMTU, ifp->if_mtu);
- break;
case IFT_FDDI:
ndi->maxmtu = MIN(FDDIIPMTU, ifp->if_mtu); /* RFC2467 */
break;
- case IFT_ATM:
- ndi->maxmtu = MIN(ATMMTU, ifp->if_mtu);
- break;
- case IFT_IEEE1394: /* XXX should be IEEE1394MTU(1500) */
- ndi->maxmtu = MIN(ETHERMTU, ifp->if_mtu);
- break;
-#ifdef IFT_IEEE80211
- case IFT_IEEE80211: /* XXX should be IEEE80211MTU(1500) */
- ndi->maxmtu = MIN(ETHERMTU, ifp->if_mtu);
- break;
-#endif
case IFT_ISO88025:
ndi->maxmtu = MIN(ISO88025_MAX_MTU, ifp->if_mtu);
break;
==== //depot/projects/netsmp/src/sys/nfsclient/nfs.h#2 (text+ko) ====
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.4 (Berkeley) 5/1/95
- * $FreeBSD: src/sys/nfsclient/nfs.h,v 1.90 2005/01/24 12:31:06 phk Exp $
+ * $FreeBSD: src/sys/nfsclient/nfs.h,v 1.91 2005/07/19 21:27:25 ps Exp $
*/
#ifndef _NFSCLIENT_NFS_H_
@@ -194,6 +194,7 @@
#define R_TPRINTFMSG 0x20 /* Did a tprintf msg. */
#define R_MUSTRESEND 0x40 /* Must resend request */
#define R_GETONEREP 0x80 /* Probe for one reply only */
+#define R_REXMIT_INPROG 0x100 /* Re-transmit in progress */
/*
* Pointers to ops that differ from v3 to v4
==== //depot/projects/netsmp/src/sys/nfsclient/nfs_socket.c#2 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_socket.c,v 1.127 2005/07/18 02:12:17 ps Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_socket.c,v 1.128 2005/07/19 21:27:25 ps Exp $");
/*
* Socket operations for use by nfs
@@ -1032,6 +1032,17 @@
*/
s = splsoftclock();
mtx_lock(&nfs_reqq_mtx);
+ /*
+ * nfs_timer() may be in the process of re-transmitting this request.
+ * nfs_timer() drops the nfs_reqq_mtx before the pru_send() (to avoid LORs).
+ * Wait till nfs_timer() completes the re-transmission. When the reply
+ * comes back, it will be discarded (since the req struct for it no longer
+ * exists).
+ */
+ while (rep->r_flags & R_REXMIT_INPROG) {
+ msleep((caddr_t)&rep->r_flags, &nfs_reqq_mtx,
+ (PZERO - 1), "nfsrxmt", 0);
+ }
TAILQ_REMOVE(&nfs_reqq, rep, r_chain);
if (TAILQ_EMPTY(&nfs_reqq))
callout_stop(&nfs_callout);
@@ -1152,19 +1163,11 @@
* To avoid retransmission attempts on STREAM sockets (in the future) make
* sure to set the r_retry field to 0 (implies nm_retry == 0).
*
- * XXX -
- * For now, since we don't register MPSAFE callouts for the NFS client -
- * softclock() acquires Giant before calling us. That prevents req entries
- * from being removed from the list (from nfs_request()). But we still
- * acquire the nfs reqq mutex to make sure the state of individual req
- * entries is not modified from RPC reply handling (from socket callback)
- * while nfs_timer is walking the list of reqs.
* The nfs reqq lock cannot be held while we do the pru_send() because of a
* lock ordering violation. The NFS client socket callback acquires
* inp_lock->nfsreq mutex and pru_send acquires inp_lock. So we drop the
- * reqq mutex (and reacquire it after the pru_send()). This won't work
- * when we move to fine grained locking for NFS. When we get to that point,
- * a rewrite of nfs_timer() will be needed.
+ * reqq mutex (and reacquire it after the pru_send()). The req structure
+ * (for the rexmit) is prevented from being removed by the R_REXMIT_INPROG flag.
*/
void
nfs_timer(void *arg)
@@ -1245,7 +1248,12 @@
((nmp->nm_flag & NFSMNT_DUMBTIMR) ||
(rep->r_flags & R_SENT) ||
nmp->nm_sent < nmp->nm_cwnd) &&
- (m = m_copym(rep->r_mreq, 0, M_COPYALL, M_DONTWAIT))){
+ (m = m_copym(rep->r_mreq, 0, M_COPYALL, M_DONTWAIT))) {
+ /*
+ * Mark the request to indicate that a XMIT is in progress
+ * to prevent the req structure being removed in nfs_request().
+ */
+ rep->r_flags |= R_REXMIT_INPROG;
mtx_unlock(&nfs_reqq_mtx);
if ((nmp->nm_flag & NFSMNT_NOCONN) == 0)
error = (*so->so_proto->pr_usrreqs->pru_send)
@@ -1254,6 +1262,8 @@
error = (*so->so_proto->pr_usrreqs->pru_send)
(so, 0, m, nmp->nm_nam, NULL, curthread);
mtx_lock(&nfs_reqq_mtx);
+ rep->r_flags &= ~R_REXMIT_INPROG;
+ wakeup((caddr_t)&rep->r_flags);
if (error) {
if (NFSIGNORE_SOERROR(nmp->nm_soflags, error))
so->so_error = 0;
==== //depot/projects/netsmp/src/sys/nfsclient/nfs_subs.c#2 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_subs.c,v 1.140 2005/03/13 12:14:56 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_subs.c,v 1.141 2005/07/19 21:27:25 ps Exp $");
/*
* These functions support the macros and help fiddle mbuf chains for
@@ -413,7 +413,7 @@
* Initialize reply list and start timer
*/
TAILQ_INIT(&nfs_reqq);
- callout_init(&nfs_callout, 0);
+ callout_init(&nfs_callout, CALLOUT_MPSAFE);
mtx_init(&nfs_reqq_mtx, "NFS reqq lock", NULL, MTX_DEF);
mtx_init(&nfs_reply_mtx, "Synch NFS reply posting", NULL, MTX_DEF);
==== //depot/projects/netsmp/src/sys/ufs/ffs/ffs_vfsops.c#2 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.290 2005/05/30 07:04:15 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.291 2005/07/20 19:06:06 alc Exp $");
#include "opt_mac.h"
#include "opt_quota.h"
@@ -1534,7 +1534,7 @@
* by biodone it will be tossed.
*/
bp->b_flags |= B_NOCACHE;
- bp->b_flags &= ~(B_CACHE | B_DONE);
+ bp->b_flags &= ~B_CACHE;
bufdone(bp);
BO_LOCK(bufobj);
/*
==== //depot/projects/netsmp/src/sys/vm/swap_pager.c#2 (text+ko) ====
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/swap_pager.c,v 1.273 2005/05/20 21:26:05 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/swap_pager.c,v 1.274 2005/07/20 19:06:06 alc Exp $");
#include "opt_mac.h"
#include "opt_swap.h"
@@ -1363,8 +1363,6 @@
int i;
vm_object_t object = NULL;
- bp->b_flags |= B_DONE;
-
/*
* report error
*/
==== //depot/projects/netsmp/src/sys/vm/uma_core.c#2 (text+ko) ====
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/uma_core.c,v 1.127 2005/07/16 11:03:06 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/uma_core.c,v 1.128 2005/07/20 18:47:42 rwatson Exp $");
/* I should really use ktr.. */
/*
@@ -197,6 +197,7 @@
enum zfreeskip { SKIP_NONE, SKIP_DTOR, SKIP_FINI };
#define ZFREE_STATFAIL 0x00000001 /* Update zone failure statistic. */
+#define ZFREE_STATFREE 0x00000002 /* Update zone free statistic. */
/* Prototypes.. */
@@ -349,7 +350,8 @@
struct uma_bucket_zone *ubz;
ubz = bucket_zone_lookup(bucket->ub_entries);
- uma_zfree_internal(ubz->ubz_zone, bucket, NULL, SKIP_NONE, 0);
+ uma_zfree_internal(ubz->ubz_zone, bucket, NULL, SKIP_NONE,
+ ZFREE_STATFREE);
}
static void
@@ -540,7 +542,7 @@
return;
if (hash->uh_hashsize == UMA_HASH_SIZE_INIT)
uma_zfree_internal(hashzone,
- hash->uh_slab_hash, NULL, SKIP_NONE, 0);
+ hash->uh_slab_hash, NULL, SKIP_NONE, ZFREE_STATFREE);
else
free(hash->uh_slab_hash, M_UMAHASH);
}
@@ -756,7 +758,7 @@
}
if (keg->uk_flags & UMA_ZONE_OFFPAGE)
uma_zfree_internal(keg->uk_slabzone, slab, NULL,
- SKIP_NONE, 0);
+ SKIP_NONE, ZFREE_STATFREE);
#ifdef UMA_DEBUG
printf("%s: Returning %d bytes.\n",
zone->uz_name, UMA_SLAB_SIZE * keg->uk_ppera);
@@ -819,7 +821,7 @@
if (mem == NULL) {
if (keg->uk_flags & UMA_ZONE_OFFPAGE)
uma_zfree_internal(keg->uk_slabzone, slab, NULL,
- SKIP_NONE, 0);
+ SKIP_NONE, ZFREE_STATFREE);
ZONE_LOCK(zone);
return (NULL);
}
@@ -876,7 +878,7 @@
}
if (keg->uk_flags & UMA_ZONE_OFFPAGE)
uma_zfree_internal(keg->uk_slabzone, slab,
- NULL, SKIP_NONE, 0);
+ NULL, SKIP_NONE, ZFREE_STATFREE);
keg->uk_freef(mem, UMA_SLAB_SIZE * keg->uk_ppera,
flags);
ZONE_LOCK(zone);
@@ -1467,7 +1469,8 @@
LIST_REMOVE(keg, uk_link);
LIST_REMOVE(zone, uz_link);
mtx_unlock(&uma_mtx);
- uma_zfree_internal(kegs, keg, NULL, SKIP_NONE, 0);
+ uma_zfree_internal(kegs, keg, NULL, SKIP_NONE,
+ ZFREE_STATFREE);
}
zone->uz_keg = NULL;
}
@@ -1771,7 +1774,8 @@
void
uma_zdestroy(uma_zone_t zone)
{
- uma_zfree_internal(zones, zone, NULL, SKIP_NONE, 0);
+
+ uma_zfree_internal(zones, zone, NULL, SKIP_NONE, ZFREE_STATFREE);
}
/* See uma.h */
@@ -1855,7 +1859,8 @@
if (zone->uz_ctor(item, zone->uz_keg->uk_size,
udata, flags) != 0) {
uma_zfree_internal(zone, item, udata,
- SKIP_DTOR, ZFREE_STATFAIL);
+ SKIP_DTOR, ZFREE_STATFAIL |
+ ZFREE_STATFREE);
return (NULL);
}
}
@@ -2235,14 +2240,14 @@
if (zone->uz_init != NULL) {
if (zone->uz_init(item, keg->uk_size, flags) != 0) {
uma_zfree_internal(zone, item, udata, SKIP_FINI,
- ZFREE_STATFAIL);
+ ZFREE_STATFAIL | ZFREE_STATFREE);
return (NULL);
}
}
if (zone->uz_ctor != NULL) {
if (zone->uz_ctor(item, keg->uk_size, udata, flags) != 0) {
uma_zfree_internal(zone, item, udata, SKIP_DTOR,
- ZFREE_STATFAIL);
+ ZFREE_STATFAIL | ZFREE_STATFREE);
return (NULL);
}
}
@@ -2369,6 +2374,12 @@
}
}
+ /* Since we have locked the zone we may as well send back our stats */
+ zone->uz_allocs += cache->uc_allocs;
+ cache->uc_allocs = 0;
+ zone->uz_frees += cache->uc_frees;
+ cache->uc_frees = 0;
+
bucket = cache->uc_freebucket;
cache->uc_freebucket = NULL;
@@ -2415,7 +2426,8 @@
* If nothing else caught this, we'll just do an internal free.
*/
zfree_internal:
- uma_zfree_internal(zone, item, udata, SKIP_DTOR, ZFREE_STATFAIL);
+ uma_zfree_internal(zone, item, udata, SKIP_DTOR, ZFREE_STATFAIL |
+ ZFREE_STATFREE);
return;
}
@@ -2450,6 +2462,8 @@
if (flags & ZFREE_STATFAIL)
zone->uz_fails++;
+ if (flags & ZFREE_STATFREE)
+ zone->uz_frees++;
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list