From owner-svn-src-head@FreeBSD.ORG Sun Apr 1 09:35:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA0FA106564A; Sun, 1 Apr 2012 09:35:23 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5C488FC0A; Sun, 1 Apr 2012 09:35:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q319ZNVM042874; Sun, 1 Apr 2012 09:35:23 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q319ZNtI042872; Sun, 1 Apr 2012 09:35:23 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201204010935.q319ZNtI042872@svn.freebsd.org> From: David Chisnall Date: Sun, 1 Apr 2012 09:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233757 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 01 Apr 2012 09:35:24 -0000 Author: theraven Date: Sun Apr 1 09:35:23 2012 New Revision: 233757 URL: http://svn.freebsd.org/changeset/base/233757 Log: Bump __FreeBSD_version for xlocale cleanup, as requested by ports people. Approved by: dim (mentor) Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Apr 1 08:58:21 2012 (r233756) +++ head/sys/sys/param.h Sun Apr 1 09:35:23 2012 (r233757) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000009 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000010 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Sun Apr 1 09:51:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3B37106566C; Sun, 1 Apr 2012 09:51:40 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward13.mail.yandex.net (forward13.mail.yandex.net [IPv6:2a02:6b8:0:801::3]) by mx1.freebsd.org (Postfix) with ESMTP id 51ACB8FC08; Sun, 1 Apr 2012 09:51:40 +0000 (UTC) Received: from smtp12.mail.yandex.net (smtp12.mail.yandex.net [95.108.131.191]) by forward13.mail.yandex.net (Yandex) with ESMTP id D0448141099; Sun, 1 Apr 2012 13:51:38 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1333273898; bh=Z7+dgNl+X90zjFGJgQAP6AZ8p80WfBlctKKl1O8OSy8=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=UcKJNSrbxqEkKc5T9bqnmw1ri2Ht+YkTVXxUQPCffW9QLldAVX8ptZ5/sASfap30y DanIVEvJxGE8mCgv/lAnLEVR/EtIvX8oZqajAZ8IfmOA3QeSMMpf7xa+dAdLmLMvz+ 6/V7JBgEN+jWAfyaZUkOjM5qeJ9QTzGCHMvrim+8= Received: from smtp12.mail.yandex.net (localhost [127.0.0.1]) by smtp12.mail.yandex.net (Yandex) with ESMTP id 96E9A16A0482; Sun, 1 Apr 2012 13:51:38 +0400 (MSK) Received: from unknown (unknown [213.27.65.65]) by smtp12.mail.yandex.net (nwsmtp/Yandex) with ESMTP id pb1i0KQk-pc1KkcQ7; Sun, 1 Apr 2012 13:51:38 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1333273898; bh=Z7+dgNl+X90zjFGJgQAP6AZ8p80WfBlctKKl1O8OSy8=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=JaLXkMp/0ugWuxFU9bRvgJlXRknxhkaKsYAzFVKoqvN1u/f6+w4hNbys00NdiyA7e WppMhHeK0+Zwn+fDHxGcnkstRkdTEderZFmzGP3CDmUQwx1bioEXt71Uau9OC/3BhG cXmL/yVbU69zudHXzMzHjMx33CAxqw8CMtN6TjO0= Message-ID: <4F782510.2050407@yandex.ru> Date: Sun, 01 Apr 2012 13:51:12 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120314 Thunderbird/10.0.3 MIME-Version: 1.0 To: David Chisnall References: <201204010935.q319ZNtI042872@svn.freebsd.org> In-Reply-To: <201204010935.q319ZNtI042872@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233757 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 01 Apr 2012 09:51:41 -0000 David Chisnall wrote on 01.04.2012 13:35: > Author: theraven > Date: Sun Apr 1 09:35:23 2012 > New Revision: 233757 > URL: http://svn.freebsd.org/changeset/base/233757 > > Log: > Bump __FreeBSD_version for xlocale cleanup, as requested by ports people. > > Approved by: dim (mentor) > > Modified: > head/sys/sys/param.h Thank you! -- Regards, Ruslan Tinderboxing kills... the drives. From owner-svn-src-head@FreeBSD.ORG Sun Apr 1 12:05:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CC7E106566B; Sun, 1 Apr 2012 12:05:01 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 00BB28FC08; Sun, 1 Apr 2012 12:05:00 +0000 (UTC) Received: by iahk25 with SMTP id k25so4017416iah.13 for ; Sun, 01 Apr 2012 05:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0q0YtJYS7pQSM0Mhh+YUK5rplM19yGjfTVbY3QryBA8=; b=y69ucl8hE7fjoEF3H/oUY6qEUBrPpsz6gFrTOPGDNzQfYrY05yHktacx7zBpfoKis8 68Keae4fCKcPYzmkiNL57flnAUqgIbT1QGe2aGnBqbYF3hd3kW9QrHmVIVCUyauhmiYO bUuldCdlRYNoMen60xxcrfkuJeMwvmV422WTwSJ6KMrYbtNvL0E89JLnaQE6VPYqokDW KPblEyU15+57aq/ZYFk5RF51K3kykGxDk67mC5HVr4xUeqttXo9+35Ew9L7IZ2vmfZG1 D2wKbiHakFpv+gK+2j8k37O8xHD9C5huBZP3DjeVNitV/NXloqffBAhiRO3gjrYYAOJ8 JGHQ== MIME-Version: 1.0 Received: by 10.50.160.131 with SMTP id xk3mr3006971igb.19.1333281900463; Sun, 01 Apr 2012 05:05:00 -0700 (PDT) Received: by 10.231.29.150 with HTTP; Sun, 1 Apr 2012 05:05:00 -0700 (PDT) In-Reply-To: <201112292041.pBTKfGkj071711@svn.freebsd.org> References: <201112292041.pBTKfGkj071711@svn.freebsd.org> Date: Sun, 1 Apr 2012 15:05:00 +0300 Message-ID: From: Mikolaj Golub To: John Baldwin Content-Type: multipart/mixed; boundary=14dae934044310060504bc9ce220 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228969 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 01 Apr 2012 12:05:01 -0000 --14dae934044310060504bc9ce220 Content-Type: text/plain; charset=ISO-8859-1 Hi, On 12/29/11, John Baldwin wrote: > Author: jhb > Date: Thu Dec 29 20:41:16 2011 > New Revision: 228969 > URL: http://svn.freebsd.org/changeset/base/228969 > > Log: > Defer the work of freeing IPv4 multicast options from a socket to an > asychronous task. This avoids tearing down multicast state including > sending IGMP leave messages and reprogramming MAC filters while holding > the per-protocol global pcbinfo lock that is used in the receive path of > packet processing. > > Reviewed by: rwatson > MFC after: 1 month > > Modified: > head/sys/netinet/in_mcast.c > head/sys/netinet/ip_var.h > > Modified: head/sys/netinet/in_mcast.c > ============================================================================== > --- head/sys/netinet/in_mcast.c Thu Dec 29 19:01:29 2011 (r228968) > +++ head/sys/netinet/in_mcast.c Thu Dec 29 20:41:16 2011 (r228969) > @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > > #include > @@ -144,6 +145,8 @@ static void inm_purge(struct in_multi *) > static void inm_reap(struct in_multi *); > static struct ip_moptions * > inp_findmoptions(struct inpcb *); > +static void inp_freemoptions_internal(struct ip_moptions *); > +static void inp_gcmoptions(void *, int); > static int inp_get_source_filters(struct inpcb *, struct sockopt *); > static int inp_join_group(struct inpcb *, struct sockopt *); > static int inp_leave_group(struct inpcb *, struct sockopt *); > @@ -179,6 +182,10 @@ static SYSCTL_NODE(_net_inet_ip_mcast, O > CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip_mcast_filters, > "Per-interface stack-wide source filters"); > > +static STAILQ_HEAD(, ip_moptions) imo_gc_list = > + STAILQ_HEAD_INITIALIZER(imo_gc_list); > +static struct task imo_gc_task = TASK_INITIALIZER(0, inp_gcmoptions, NULL); > + > /* > * Inline function which wraps assertions for a valid ifp. > * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp > @@ -1518,17 +1525,29 @@ inp_findmoptions(struct inpcb *inp) > } > > /* > - * Discard the IP multicast options (and source filters). > + * Discard the IP multicast options (and source filters). To minimize > + * the amount of work done while holding locks such as the INP's > + * pcbinfo lock (which is used in the receive path), the free > + * operation is performed asynchronously in a separate task. > * > * SMPng: NOTE: assumes INP write lock is held. > */ > void > inp_freemoptions(struct ip_moptions *imo) > { > - struct in_mfilter *imf; > - size_t idx, nmships; > > KASSERT(imo != NULL, ("%s: ip_moptions is NULL", __func__)); > + IN_MULTI_LOCK(); > + STAILQ_INSERT_TAIL(&imo_gc_list, imo, imo_link); > + IN_MULTI_UNLOCK(); > + taskqueue_enqueue(taskqueue_thread, &imo_gc_task); > +} > + > +static void > +inp_freemoptions_internal(struct ip_moptions *imo) > +{ > + struct in_mfilter *imf; > + size_t idx, nmships; > > nmships = imo->imo_num_memberships; > for (idx = 0; idx < nmships; ++idx) { > @@ -1546,6 +1565,22 @@ inp_freemoptions(struct ip_moptions *imo > free(imo, M_IPMOPTS); > } > > +static void > +inp_gcmoptions(void *context, int pending) > +{ > + struct ip_moptions *imo; > + > + IN_MULTI_LOCK(); > + while (!STAILQ_EMPTY(&imo_gc_list)) { > + imo = STAILQ_FIRST(&imo_gc_list); > + STAILQ_REMOVE_HEAD(&imo_gc_list, imo_link); > + IN_MULTI_UNLOCK(); > + inp_freemoptions_internal(imo); > + IN_MULTI_LOCK(); > + } > + IN_MULTI_UNLOCK(); > +} > + > /* > * Atomically get source filters on a socket for an IPv4 multicast group. > * Called with INP lock held; returns with lock released. > > Modified: head/sys/netinet/ip_var.h > ============================================================================== > --- head/sys/netinet/ip_var.h Thu Dec 29 19:01:29 2011 (r228968) > +++ head/sys/netinet/ip_var.h Thu Dec 29 20:41:16 2011 (r228969) > @@ -93,6 +93,7 @@ struct ip_moptions { > u_short imo_max_memberships; /* max memberships this socket */ > struct in_multi **imo_membership; /* group memberships */ > struct in_mfilter *imo_mfilters; /* source filters */ > + STAILQ_ENTRY(ip_moptions) imo_link; > }; > > struct ipstat { > I have been observing panics like below after recent upgrade on VIMAGE kernel: #0 doadump (textdump=-2022567936) at pcpu.h:244 #1 0x8051b739 in db_fncall (dummy1=1, dummy2=0, dummy3=-2127531040, dummy4=0x872b2920 "") at /home/golub/freebsd/base/head/sys/ddb/db_command.c:573 #2 0x8051bb31 in db_command (last_cmdp=0x8112eefc, cmd_table=0x0, dopager=1) at /home/golub/freebsd/base/head/sys/ddb/db_command.c:449 #3 0x8051bc8a in db_command_loop () at /home/golub/freebsd/base/head/sys/ddb/db_command.c:502 #4 0x8051dc7d in db_trap (type=12, code=0) at /home/golub/freebsd/base/head/sys/ddb/db_main.c:229 #5 0x80a82566 in kdb_trap (type=12, code=0, tf=0x872b2bbc) at /home/golub/freebsd/base/head/sys/kern/subr_kdb.c:629 #6 0x80ddd26f in trap_fatal (frame=0x872b2bbc, eva=24) at /home/golub/freebsd/base/head/sys/i386/i386/trap.c:1014 #7 0x80ddd347 in trap_pfault (frame=0x872b2bbc, usermode=0, eva=24) at /home/golub/freebsd/base/head/sys/i386/i386/trap.c:835 #8 0x80dde411 in trap (frame=0x872b2bbc) at /home/golub/freebsd/base/head/sys/i386/i386/trap.c:547 #9 0x80dc7c6c in calltrap () at /home/golub/freebsd/base/head/sys/i386/i386/exception.s:169 #10 0x80b6f1fd in igmp_change_state (inm=0x8ae70480) at /home/golub/freebsd/base/head/sys/netinet/igmp.c:2595 #11 0x80b76f68 in in_leavegroup_locked (inm=0x8ae70480, imf=0x8a655a00) at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1239 #12 0x80b76fbd in in_leavegroup (inm=0x8ae70480, imf=0x8a655a00) at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1184 #13 0x80b770b4 in inp_gcmoptions (context=0x0, pending=1) at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1554 #14 0x80a8ff2b in taskqueue_run_locked (queue=0x87594880) at /home/golub/freebsd/base/head/sys/kern/subr_taskqueue.c:308 #15 0x80a90987 in taskqueue_thread_loop (arg=0x81186bcc) at /home/golub/freebsd/base/head/sys/kern/subr_taskqueue.c:497 #16 0x80a1b2d8 in fork_exit (callout=0x80a90920 , arg=0x81186bcc, frame=0x872b2d28) at /home/golub/freebsd/base/head/sys/kern/kern_fork.c:992 #17 0x80dc7d14 in fork_trampoline () at /home/golub/freebsd/base/head/sys/i386/i386/exception.s:276 (kgdb) fr 10 #10 0x80b6f1fd in igmp_change_state (inm=0x8ae70480) at /home/golub/freebsd/base/head/sys/netinet/igmp.c:2595 2595 V_state_change_timers_running = 1; (kgdb) l 2590 ("%s: enqueue record = %d", __func__, 2591 retval)); 2592 2593 inm->inm_state = IGMP_LEAVING_MEMBER; 2594 inm->inm_sctimer = 1; 2595 V_state_change_timers_running = 1; 2596 syncstates = 0; 2597 } 2598 break; 2599 } VNET context is not set at that point. The attached patch fixes the issue for me. Not sure about inm->inm_ifp != NULL assumption but I need interface to get vnet :-). BTW, in igmp_change_state() this looks for me a bit strange: if (ifp != NULL) { /* * Sanity check that netinet's notion of ifp is the * same as net's. */ KASSERT(inm->inm_ifp == ifp, ("%s: bad ifp", __func__)); } IGMP_LOCK(); igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; The check ifp != NULL suggests that ifp may be NULL, but then it will panic at the last shown line. -- Mikolaj Golub --14dae934044310060504bc9ce220 Content-Type: application/octet-stream; name="in_mcast.c.inp_gcmoptions.patch" Content-Disposition: attachment; filename="in_mcast.c.inp_gcmoptions.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: file0 SW5kZXg6IHN5cy9uZXRpbmV0L2luX21jYXN0LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL25ldGluZXQv aW5fbWNhc3QuYwkocmV2aXNpb24gMjMzNzM0KQorKysgc3lzL25ldGluZXQvaW5fbWNhc3QuYwko d29ya2luZyBjb3B5KQpAQCAtMTU0Myw2ICsxNTQzLDcgQEAgaW5wX2ZyZWVtb3B0aW9ucyhzdHJ1 Y3QgaXBfbW9wdGlvbnMgKmltbykKIHN0YXRpYyB2b2lkCiBpbnBfZnJlZW1vcHRpb25zX2ludGVy bmFsKHN0cnVjdCBpcF9tb3B0aW9ucyAqaW1vKQogeworCXN0cnVjdCBpbl9tdWx0aQkJKmlubTsK IAlzdHJ1Y3QgaW5fbWZpbHRlcgkqaW1mOwogCXNpemVfdAkJCSBpZHgsIG5tc2hpcHM7CiAKQEAg LTE1NTEsNyArMTU1MiwxMSBAQCBpbnBfZnJlZW1vcHRpb25zX2ludGVybmFsKHN0cnVjdCBpcF9t b3B0aW9ucyAqaW1vKQogCQlpbWYgPSBpbW8tPmltb19tZmlsdGVycyA/ICZpbW8tPmltb19tZmls dGVyc1tpZHhdIDogTlVMTDsKIAkJaWYgKGltZikKIAkJCWltZl9sZWF2ZShpbWYpOwotCQkodm9p ZClpbl9sZWF2ZWdyb3VwKGltby0+aW1vX21lbWJlcnNoaXBbaWR4XSwgaW1mKTsKKwkJaW5tID0g aW1vLT5pbW9fbWVtYmVyc2hpcFtpZHhdOworCQlLQVNTRVJUKGlubS0+aW5tX2lmcCAhPSBOVUxM LCAoIiVzOiBubyBpZnAiLCBfX2Z1bmNfXykpOworCQlDVVJWTkVUX1NFVChpbm0tPmlubV9pZnAt PmlmX3ZuZXQpOworCQkodm9pZClpbl9sZWF2ZWdyb3VwKGlubSwgaW1mKTsKKwkJQ1VSVk5FVF9S RVNUT1JFKCk7CiAJCWlmIChpbWYpCiAJCQlpbWZfcHVyZ2UoaW1mKTsKIAl9Cg== --14dae934044310060504bc9ce220-- From owner-svn-src-head@FreeBSD.ORG Sun Apr 1 18:22:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8CE91065675; Sun, 1 Apr 2012 18:22:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 928E48FC1C; Sun, 1 Apr 2012 18:22:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q31IMnKO060936; Sun, 1 Apr 2012 18:22:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q31IMnVN060925; Sun, 1 Apr 2012 18:22:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204011822.q31IMnVN060925@svn.freebsd.org> From: John Baldwin Date: Sun, 1 Apr 2012 18:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233760 - in head: lib/libprocstat sys/kern sys/sys usr.bin/fstat usr.bin/procstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 01 Apr 2012 18:22:49 -0000 Author: jhb Date: Sun Apr 1 18:22:48 2012 New Revision: 233760 URL: http://svn.freebsd.org/changeset/base/233760 Log: Export some more useful info about shared memory objects to userland via procstat(1) and fstat(1): - Change shm file descriptors to track the pathname they are associated with and add a shm_path() method to copy the path out to a caller-supplied buffer. - Use the fo_stat() method of shared memory objects and shm_path() to export the path, mode, and size of a shared memory object via struct kinfo_file. - Add a struct shmstat to the libprocstat(3) interface along with a procstat_get_shm_info() to export the mode and size of a shared memory object. - Change procstat to always print out the path for a given object if it is valid. - Teach fstat about shared memory objects and to display their path, mode, and size. MFC after: 2 weeks Modified: head/lib/libprocstat/Symbol.map head/lib/libprocstat/Versions.def head/lib/libprocstat/libprocstat.3 head/lib/libprocstat/libprocstat.c head/lib/libprocstat/libprocstat.h head/sys/kern/kern_descrip.c head/sys/kern/uipc_shm.c head/sys/sys/mman.h head/usr.bin/fstat/fstat.c head/usr.bin/procstat/procstat_files.c Modified: head/lib/libprocstat/Symbol.map ============================================================================== --- head/lib/libprocstat/Symbol.map Sun Apr 1 15:05:15 2012 (r233759) +++ head/lib/libprocstat/Symbol.map Sun Apr 1 18:22:48 2012 (r233760) @@ -14,3 +14,7 @@ FBSD_1.2 { procstat_open_kvm; procstat_open_sysctl; }; + +FBSD_1.3 { + procstat_get_shm_info; +}; Modified: head/lib/libprocstat/Versions.def ============================================================================== --- head/lib/libprocstat/Versions.def Sun Apr 1 15:05:15 2012 (r233759) +++ head/lib/libprocstat/Versions.def Sun Apr 1 18:22:48 2012 (r233760) @@ -3,3 +3,8 @@ # This version was first added to 9.0-current. FBSD_1.2 { }; + +# This version was first added to 10.0-current. +FBSD_1.3 { +} FBSD_1.2; + Modified: head/lib/libprocstat/libprocstat.3 ============================================================================== --- head/lib/libprocstat/libprocstat.3 Sun Apr 1 15:05:15 2012 (r233759) +++ head/lib/libprocstat/libprocstat.3 Sun Apr 1 18:22:48 2012 (r233760) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 12, 2011 +.Dd April 1, 2012 .Dt LIBPROCSTAT 3 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nm procstat_freeprocs , .Nm procstat_get_pipe_info , .Nm procstat_get_pts_info , +.Nm procstat_get_shm_info , .Nm procstat_get_socket_info , .Nm procstat_get_vnode_info .Nd library interface for file and process information retrieval @@ -70,6 +71,13 @@ .Fa "char *errbuf" .Fc .Ft int +.Fo procstat_get_shm_info +.Fa "struct procstat *procstat" +.Fa "struct filestat *fst" +.Fa "struct shmstat *shm" +.Fa "char *errbuf" +.Fc +.Ft int .Fo procstat_get_socket_info .Fa "struct procstat *procstat" .Fa "struct filestat *fst" @@ -191,10 +199,12 @@ function call. The .Fn procstat_get_pipe_info , .Fn procstat_get_pts_info , +.Fn procstat_get_shm_info , .Fn procstat_get_socket_info and .Fn procstat_get_vnode_info functions are used to retrive information about pipes, pseudo-terminals, +shared memory objects, sockets, and vnodes, respectively. Each of them have a similar interface API. The @@ -231,11 +241,14 @@ argument indicates an actual error messa .Nm procstat_get_pipe_info .It Li PS_FST_TYPE_PTS .Nm procstat_get_pts_info +.It Li PS_FST_TYPE_SHM +.Nm procstat_get_shm_info .El .Sh SEE ALSO .Xr fstat 1 , .Xr fuser 1 , .Xr pipe 2 , +.Xr shm_open 2 , .Xr socket 2 , .Xr kvm 3 , .Xr queue 3 , Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Sun Apr 1 15:05:15 2012 (r233759) +++ head/lib/libprocstat/libprocstat.c Sun Apr 1 18:22:48 2012 (r233760) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #define _WANT_FILE #include #include +#include #define _KERNEL #include #include @@ -114,6 +115,10 @@ static int procstat_get_pts_info_sysctl( struct ptsstat *pts, char *errbuf); static int procstat_get_pts_info_kvm(kvm_t *kd, struct filestat *fst, struct ptsstat *pts, char *errbuf); +static int procstat_get_shm_info_sysctl(struct filestat *fst, + struct shmstat *shm, char *errbuf); +static int procstat_get_shm_info_kvm(kvm_t *kd, struct filestat *fst, + struct shmstat *shm, char *errbuf); static int procstat_get_socket_info_sysctl(struct filestat *fst, struct sockstat *sock, char *errbuf); static int procstat_get_socket_info_kvm(kvm_t *kd, struct filestat *fst, @@ -469,6 +474,10 @@ procstat_getfiles_kvm(struct procstat *p data = file.f_data; break; #endif + case DTYPE_SHM: + type = PS_FST_TYPE_SHM; + data = file.f_data; + break; default: continue; } @@ -849,6 +858,69 @@ procstat_get_pts_info_sysctl(struct file } int +procstat_get_shm_info(struct procstat *procstat, struct filestat *fst, + struct shmstat *shm, char *errbuf) +{ + + assert(shm); + if (procstat->type == PROCSTAT_KVM) { + return (procstat_get_shm_info_kvm(procstat->kd, fst, shm, + errbuf)); + } else if (procstat->type == PROCSTAT_SYSCTL) { + return (procstat_get_shm_info_sysctl(fst, shm, errbuf)); + } else { + warnx("unknown access method: %d", procstat->type); + snprintf(errbuf, _POSIX2_LINE_MAX, "error"); + return (1); + } +} + +static int +procstat_get_shm_info_kvm(kvm_t *kd, struct filestat *fst, + struct shmstat *shm, char *errbuf) +{ + struct shmfd shmfd; + void *shmfdp; + + assert(kd); + assert(shm); + assert(fst); + bzero(shm, sizeof(*shm)); + shmfdp = fst->fs_typedep; + if (shmfdp == NULL) + goto fail; + if (!kvm_read_all(kd, (unsigned long)shmfdp, &shmfd, + sizeof(struct shmfd))) { + warnx("can't read shmfd at %p", (void *)shmfdp); + goto fail; + } + shm->mode = S_IFREG | shmfd.shm_mode; + shm->size = shmfd.shm_size; + return (0); + +fail: + snprintf(errbuf, _POSIX2_LINE_MAX, "error"); + return (1); +} + +static int +procstat_get_shm_info_sysctl(struct filestat *fst, struct shmstat *shm, + char *errbuf __unused) +{ + struct kinfo_file *kif; + + assert(shm); + assert(fst); + bzero(shm, sizeof(*shm)); + kif = fst->fs_typedep; + if (kif == NULL) + return (0); + shm->size = kif->kf_un.kf_file.kf_file_size; + shm->mode = kif->kf_un.kf_file.kf_file_mode; + return (0); +} + +int procstat_get_vnode_info(struct procstat *procstat, struct filestat *fst, struct vnstat *vn, char *errbuf) { Modified: head/lib/libprocstat/libprocstat.h ============================================================================== --- head/lib/libprocstat/libprocstat.h Sun Apr 1 15:05:15 2012 (r233759) +++ head/lib/libprocstat/libprocstat.h Sun Apr 1 18:22:48 2012 (r233760) @@ -123,6 +123,10 @@ struct pipestat { uint64_t addr; uint64_t peer; }; +struct shmstat { + uint64_t size; + uint16_t mode; +}; struct sockstat { uint64_t inp_ppcb; uint64_t so_addr; @@ -152,6 +156,8 @@ int procstat_get_pipe_info(struct procst struct pipestat *pipe, char *errbuf); int procstat_get_pts_info(struct procstat *procstat, struct filestat *fst, struct ptsstat *pts, char *errbuf); +int procstat_get_shm_info(struct procstat *procstat, struct filestat *fst, + struct shmstat *shm, char *errbuf); int procstat_get_socket_info(struct procstat *procstat, struct filestat *fst, struct sockstat *sock, char *errbuf); int procstat_get_vnode_info(struct procstat *procstat, struct filestat *fst, Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Apr 1 15:05:15 2012 (r233759) +++ head/sys/kern/kern_descrip.c Sun Apr 1 18:22:48 2012 (r233760) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -126,6 +127,7 @@ static int fill_pts_info(struct tty *tp, static int fill_pipe_info(struct pipe *pi, struct kinfo_file *kif); static int fill_procdesc_info(struct procdesc *pdp, struct kinfo_file *kif); +static int fill_shm_info(struct file *fp, struct kinfo_file *kif); /* * A process is initially started out with NDFILE descriptors stored within @@ -2958,6 +2960,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE struct kinfo_ofile *kif; struct filedesc *fdp; int error, i, *name; + struct shmfd *shmfd; struct socket *so; struct vnode *vp; struct file *fp; @@ -2995,6 +2998,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE vp = NULL; so = NULL; tp = NULL; + shmfd = NULL; kif->kf_fd = i; #ifdef CAPABILITIES @@ -3046,6 +3050,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE case DTYPE_SHM: kif->kf_type = KF_TYPE_SHM; + shmfd = fp->f_data; break; case DTYPE_SEM: @@ -3159,6 +3164,8 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE strlcpy(kif->kf_path, tty_devname(tp), sizeof(kif->kf_path)); } + if (shmfd != NULL) + shm_path(shmfd, kif->kf_path, sizeof(kif->kf_path)); error = SYSCTL_OUT(req, kif, sizeof(*kif)); if (error) break; @@ -3229,6 +3236,9 @@ export_fd_for_sysctl(void *data, int typ case KF_TYPE_PROCDESC: error = fill_procdesc_info((struct procdesc *)data, kif); break; + case KF_TYPE_SHM: + error = fill_shm_info((struct file *)data, kif); + break; default: error = 0; } @@ -3398,6 +3408,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER case DTYPE_SHM: type = KF_TYPE_SHM; + data = fp; break; case DTYPE_SEM: @@ -3621,6 +3632,23 @@ fill_procdesc_info(struct procdesc *pdp, return (0); } +static int +fill_shm_info(struct file *fp, struct kinfo_file *kif) +{ + struct thread *td; + struct stat sb; + + td = curthread; + if (fp->f_data == NULL) + return (1); + if (fo_stat(fp, &sb, td->td_ucred, td) != 0) + return (1); + shm_path(fp->f_data, kif->kf_path, sizeof(kif->kf_path)); + kif->kf_un.kf_file.kf_file_mode = sb.st_mode; + kif->kf_un.kf_file.kf_file_size = sb.st_size; + return (0); +} + static SYSCTL_NODE(_kern_proc, KERN_PROC_FILEDESC, filedesc, CTLFLAG_RD, sysctl_kern_proc_filedesc, "Process filedesc entries"); Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Sun Apr 1 15:05:15 2012 (r233759) +++ head/sys/kern/uipc_shm.c Sun Apr 1 18:22:48 2012 (r233760) @@ -468,6 +468,7 @@ shm_insert(char *path, Fnv32_t fnv, stru map->sm_path = path; map->sm_fnv = fnv; map->sm_shmfd = shm_hold(shmfd); + shmfd->shm_path = path; LIST_INSERT_HEAD(SHM_HASH(fnv), map, sm_link); } @@ -490,6 +491,7 @@ shm_remove(char *path, Fnv32_t fnv, stru FREAD | FWRITE); if (error) return (error); + map->sm_shmfd->shm_path = NULL; LIST_REMOVE(map, sm_link); shm_drop(map->sm_shmfd); free(map->sm_path, M_SHMFD); @@ -844,3 +846,15 @@ shm_unmap(struct file *fp, void *mem, si VM_OBJECT_UNLOCK(obj); return (0); } + +void +shm_path(struct shmfd *shmfd, char *path, size_t size) +{ + + if (shmfd->shm_path == NULL) + return; + sx_slock(&shm_dict_lock); + if (shmfd->shm_path != NULL) + strlcpy(path, shmfd->shm_path, size); + sx_sunlock(&shm_dict_lock); +} Modified: head/sys/sys/mman.h ============================================================================== --- head/sys/sys/mman.h Sun Apr 1 15:05:15 2012 (r233759) +++ head/sys/sys/mman.h Sun Apr 1 18:22:48 2012 (r233760) @@ -178,7 +178,7 @@ typedef __size_t size_t; #define _SIZE_T_DECLARED #endif -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_WANT_FILE) #include struct file; @@ -202,12 +202,16 @@ struct shmfd { struct timespec shm_birthtime; struct label *shm_label; /* MAC label */ + const char *shm_path; }; +#endif +#ifdef _KERNEL int shm_mmap(struct shmfd *shmfd, vm_size_t objsize, vm_ooffset_t foff, vm_object_t *obj); int shm_map(struct file *fp, size_t size, off_t offset, void **memp); int shm_unmap(struct file *fp, void *mem, size_t size); +void shm_path(struct shmfd *shmfd, char *path, size_t size); #else /* !_KERNEL */ Modified: head/usr.bin/fstat/fstat.c ============================================================================== --- head/usr.bin/fstat/fstat.c Sun Apr 1 15:05:15 2012 (r233759) +++ head/usr.bin/fstat/fstat.c Sun Apr 1 18:22:48 2012 (r233760) @@ -84,6 +84,8 @@ static void print_pipe_info(struct procs struct filestat *fst); static void print_pts_info(struct procstat *procstat, struct filestat *fst); +static void print_shm_info(struct procstat *procstat, + struct filestat *fst); static void print_socket_info(struct procstat *procstat, struct filestat *fst); static void print_vnode_info(struct procstat *procstat, @@ -289,6 +291,9 @@ print_file_info(struct procstat *procsta case PS_FST_TYPE_PTS: print_pts_info(procstat, fst); break; + case PS_FST_TYPE_SHM: + print_shm_info(procstat, fst); + break; default: if (vflg) fprintf(stderr, @@ -419,6 +424,30 @@ print_pts_info(struct procstat *procstat } static void +print_shm_info(struct procstat *procstat, struct filestat *fst) +{ + struct shmstat shm; + char errbuf[_POSIX2_LINE_MAX]; + char mode[15]; + int error; + + error = procstat_get_shm_info(procstat, fst, &shm, errbuf); + if (error != 0) { + printf("* error"); + return; + } + if (nflg) { + printf(" "); + (void)snprintf(mode, sizeof(mode), "%o", shm.mode); + } else { + printf(" %-15s", fst->fs_path != NULL ? fst->fs_path : "-"); + strmode(shm.mode, mode); + } + printf(" %10s %6ju", mode, shm.size); + print_access_flags(fst->fs_fflags); +} + +static void print_vnode_info(struct procstat *procstat, struct filestat *fst) { struct vnstat vn; Modified: head/usr.bin/procstat/procstat_files.c ============================================================================== --- head/usr.bin/procstat/procstat_files.c Sun Apr 1 15:05:15 2012 (r233759) +++ head/usr.bin/procstat/procstat_files.c Sun Apr 1 18:22:48 2012 (r233760) @@ -440,13 +440,6 @@ procstat_files(struct procstat *procstat printf(" "); } switch (fst->fs_type) { - case PS_FST_TYPE_VNODE: - case PS_FST_TYPE_FIFO: - case PS_FST_TYPE_PTS: - printf("%-3s ", "-"); - printf("%-18s", fst->fs_path != NULL ? fst->fs_path : "-"); - break; - case PS_FST_TYPE_SOCKET: error = procstat_get_socket_info(procstat, fst, &sock, NULL); if (error != 0) @@ -477,7 +470,8 @@ procstat_files(struct procstat *procstat break; default: - printf("%-18s", "-"); + printf("%-3s ", "-"); + printf("%-18s", fst->fs_path != NULL ? fst->fs_path : "-"); } printf("\n"); From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 00:11:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D104C1065672; Mon, 2 Apr 2012 00:11:26 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD4498FC19; Mon, 2 Apr 2012 00:11:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q320BQwp071798; Mon, 2 Apr 2012 00:11:26 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q320BQGR071796; Mon, 2 Apr 2012 00:11:26 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201204020011.q320BQGR071796@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 2 Apr 2012 00:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233767 - head/sys/dev/gpio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 00:11:26 -0000 Author: gonzo Date: Mon Apr 2 00:11:26 2012 New Revision: 233767 URL: http://svn.freebsd.org/changeset/base/233767 Log: Remove extra semicolon which rendered condition useless Submitted by: Stefan Farfelder Modified: head/sys/dev/gpio/gpioc.c Modified: head/sys/dev/gpio/gpioc.c ============================================================================== --- head/sys/dev/gpio/gpioc.c Sun Apr 1 21:35:34 2012 (r233766) +++ head/sys/dev/gpio/gpioc.c Mon Apr 2 00:11:26 2012 (r233767) @@ -102,7 +102,7 @@ gpioc_detach(device_t dev) struct gpioc_softc *sc = device_get_softc(dev); int err; - if (sc->sc_ctl_dev); + if (sc->sc_ctl_dev) destroy_dev(sc->sc_ctl_dev); if ((err = bus_generic_detach(dev)) != 0) From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 01:04:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8599C1065676; Mon, 2 Apr 2012 01:04:01 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id E81E38FC1F; Mon, 2 Apr 2012 01:04:00 +0000 (UTC) Received: by qcsg15 with SMTP id g15so1564953qcs.13 for ; Sun, 01 Apr 2012 18:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=YHeA7xsumOVNthl0/tnOeJufHkuQ/jjipY78ciKGBBg=; b=W0CAlm/foBBGlh1TGaL94qcjGnrwG2LQlrBqZm0QVFKGm6SXwuxvW/2MdwFPa3qR9M Farfunha8rfIsEZYVsFRe4skFsgdYunQoIHRhBPuuVXaspGU8WA30FjWGY8gtfwAMVaa 4rJYvu4XyVSpPdX2x+82V8sIAZYM/D1t6YqSvAvT6S22lylgxEW+UVb9EV3MXdH2LBkv 0w8VD6WsUqDyAL2Z0kY7HjPSG3WLEVJLxB0SrMPKdkKyTdSijEHyePv0kVbaKrc3IcGR tYWlRqBWZwjk5CNkp3MfAHkCdkfQd8K8F5rGNWmueRSZJ9kD1itxAS5G2PVIahvJjXRH ab1g== Received: by 10.224.175.67 with SMTP id w3mr8743586qaz.82.1333328640159; Sun, 01 Apr 2012 18:04:00 -0700 (PDT) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id h16sm16799198qad.5.2012.04.01.18.03.59 (version=SSLv3 cipher=OTHER); Sun, 01 Apr 2012 18:03:59 -0700 (PDT) Date: Sun, 1 Apr 2012 21:03:53 -0400 From: Alexander Kabaev To: David Chisnall Message-ID: <20120401210353.1b74184a@kan.dyndns.org> In-Reply-To: <201203311425.q2VEPCRZ005790@svn.freebsd.org> References: <201203311425.q2VEPCRZ005790@svn.freebsd.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/HT5dfoVitKtIJcsl8Gu8KxM"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233749 - in head/gnu/lib: libstdc++ libsupc++ X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 01:04:01 -0000 --Sig_/HT5dfoVitKtIJcsl8Gu8KxM Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 31 Mar 2012 14:25:12 +0000 (UTC) David Chisnall wrote: > Author: theraven > Date: Sat Mar 31 14:25:12 2012 > New Revision: 233749 > URL: http://svn.freebsd.org/changeset/base/233749 >=20 > Log: > Make libsupc++ build as a shared library and make libstdc++ a > filter library for it. > =20 > This allows people to swap out libsupc++ for libcxxrt easily, so we > can begin the libstdc++ -> libc++ migration. > =20 > Approved by: dim (mentor) >=20 Hi, there are reports of this commit breaking complex C++ binaries such as build as part of KDE4. This is being looked at. --=20 Alexander Kabaev --Sig_/HT5dfoVitKtIJcsl8Gu8KxM Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFPePr9Q6z1jMm+XZYRAgU1AJ404TQ4AC5o5QWb5onjvTqSJvDDmgCfQ86c dBhP8Lpv7ugPVqmH8RIa0jE= =hj/W -----END PGP SIGNATURE----- --Sig_/HT5dfoVitKtIJcsl8Gu8KxM-- From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 02:22:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C672106566B; Mon, 2 Apr 2012 02:22:23 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC2568FC0A; Mon, 2 Apr 2012 02:22:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q322MMxB076399; Mon, 2 Apr 2012 02:22:22 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q322MMJS076397; Mon, 2 Apr 2012 02:22:22 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <201204020222.q322MMJS076397@svn.freebsd.org> From: Doug Ambrisko Date: Mon, 2 Apr 2012 02:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233768 - head/sys/dev/mfi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 02:22:23 -0000 Author: ambrisko Date: Mon Apr 2 02:22:22 2012 New Revision: 233768 URL: http://svn.freebsd.org/changeset/base/233768 Log: Change typedef atomic_t to struct mfi_atomic to avoid name space collision and some couple more style changes. Modified: head/sys/dev/mfi/mfivar.h Modified: head/sys/dev/mfi/mfivar.h ============================================================================== --- head/sys/dev/mfi/mfivar.h Mon Apr 2 00:11:26 2012 (r233767) +++ head/sys/dev/mfi/mfivar.h Mon Apr 2 02:22:22 2012 (r233768) @@ -149,16 +149,16 @@ struct mfi_aen { }; struct mfi_skinny_dma_info { - bus_dma_tag_t dmat[514]; - bus_dmamap_t dmamap[514]; - uint32_t mem[514]; - int noofmaps; + bus_dma_tag_t dmat[514]; + bus_dmamap_t dmamap[514]; + uint32_t mem[514]; + int noofmaps; }; struct mfi_cmd_tbolt; -typedef struct { - volatile unsigned int val; -} atomic_t; +struct mfi_atomic { + volatile unsigned int val; +}; #define atomic_read(v) ((v)->val) #define atomic_set(v,i) ((v)->val - (i)) @@ -240,7 +240,7 @@ struct mfi_softc { struct intr_config_hook mfi_ich; eventhandler_tag eh; /* OCR flags */ - atomic_t fw_reset_no_pci_access; + struct mfi_atomic fw_reset_no_pci_access; uint8_t adpreset; uint8_t issuepend_done; uint8_t disableOnlineCtrlReset; From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 07:42:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FC0C106566C; Mon, 2 Apr 2012 07:42:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AE6A8FC14; Mon, 2 Apr 2012 07:42:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q327gIGW087096; Mon, 2 Apr 2012 07:42:18 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q327gIXH087093; Mon, 2 Apr 2012 07:42:18 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201204020742.q327gIXH087093@svn.freebsd.org> From: Xin LI Date: Mon, 2 Apr 2012 07:42:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233770 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 07:42:18 -0000 Author: delphij Date: Mon Apr 2 07:42:17 2012 New Revision: 233770 URL: http://svn.freebsd.org/changeset/base/233770 Log: Eliminate two cases of unwanted strncpy(). The name is not required by the current code, and the results would get overwritten anyway by subsequent memset(). Reviewed by: ume MFC after: 1 month Modified: head/lib/libc/net/getaddrinfo.c head/lib/libc/net/name6.c Modified: head/lib/libc/net/getaddrinfo.c ============================================================================== --- head/lib/libc/net/getaddrinfo.c Mon Apr 2 07:18:31 2012 (r233769) +++ head/lib/libc/net/getaddrinfo.c Mon Apr 2 07:42:17 2012 (r233770) @@ -847,8 +847,6 @@ set_source(struct ai_order *aio, struct struct in6_ifreq ifr6; u_int32_t flags6; - /* XXX: interface name should not be hardcoded */ - strncpy(ifr6.ifr_name, "lo0", sizeof(ifr6.ifr_name)); memset(&ifr6, 0, sizeof(ifr6)); memcpy(&ifr6.ifr_addr, ai.ai_addr, ai.ai_addrlen); if (_ioctl(s, SIOCGIFAFLAG_IN6, &ifr6) == 0) { Modified: head/lib/libc/net/name6.c ============================================================================== --- head/lib/libc/net/name6.c Mon Apr 2 07:18:31 2012 (r233769) +++ head/lib/libc/net/name6.c Mon Apr 2 07:42:17 2012 (r233770) @@ -884,8 +884,6 @@ set_source(struct hp_order *aio, struct struct in6_ifreq ifr6; u_int32_t flags6; - /* XXX: interface name should not be hardcoded */ - strncpy(ifr6.ifr_name, "lo0", sizeof(ifr6.ifr_name)); memset(&ifr6, 0, sizeof(ifr6)); memcpy(&ifr6.ifr_addr, &ss, ss.ss_len); if (_ioctl(s, SIOCGIFAFLAG_IN6, &ifr6) == 0) { From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 07:51:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABD191065677; Mon, 2 Apr 2012 07:51:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D76A8FC19; Mon, 2 Apr 2012 07:51:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q327pVEU087427; Mon, 2 Apr 2012 07:51:31 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q327pVjl087423; Mon, 2 Apr 2012 07:51:31 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204020751.q327pVjl087423@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 2 Apr 2012 07:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233771 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 07:51:31 -0000 Author: hselasky Date: Mon Apr 2 07:51:30 2012 New Revision: 233771 URL: http://svn.freebsd.org/changeset/base/233771 Log: Add definitions and structures for USB 2.0 Link Power Management, LPM. MFC after: 2 weeks Modified: head/sys/dev/usb/usb.h head/sys/dev/usb/usb_request.c head/sys/dev/usb/usb_request.h Modified: head/sys/dev/usb/usb.h ============================================================================== --- head/sys/dev/usb/usb.h Mon Apr 2 07:42:17 2012 (r233770) +++ head/sys/dev/usb/usb.h Mon Apr 2 07:51:30 2012 (r233771) @@ -225,7 +225,8 @@ typedef struct usb_device_request usb_de #define UR_RESET_TT 0x09 #define UR_GET_TT_STATE 0x0a #define UR_STOP_TT 0x0b -#define UR_SET_HUB_DEPTH 0x0c +#define UR_SET_AND_TEST 0x0c /* USB 2.0 only */ +#define UR_SET_HUB_DEPTH 0x0c /* USB 3.0 only */ #define USB_SS_HUB_DEPTH_MAX 5 #define UR_GET_PORT_ERR_COUNT 0x0d @@ -248,6 +249,7 @@ typedef struct usb_device_request usb_de #define UHF_PORT_LINK_STATE 5 #define UHF_PORT_POWER 8 #define UHF_PORT_LOW_SPEED 9 +#define UHF_PORT_L1 10 #define UHF_C_PORT_CONNECTION 16 #define UHF_C_PORT_ENABLE 17 #define UHF_C_PORT_SUSPEND 18 @@ -255,6 +257,7 @@ typedef struct usb_device_request usb_de #define UHF_C_PORT_RESET 20 #define UHF_PORT_TEST 21 #define UHF_PORT_INDICATOR 22 +#define UHF_C_PORT_L1 23 /* SuperSpeed HUB specific features */ #define UHF_PORT_U1_TIMEOUT 23 @@ -324,7 +327,12 @@ struct usb_devcap_usb2ext_descriptor { uByte bDescriptorType; uByte bDevCapabilityType; uDWord bmAttributes; -#define USB_V2EXT_LPM 0x02 +#define USB_V2EXT_LPM (1U << 1) +#define USB_V2EXT_BESL_SUPPORTED (1U << 2) +#define USB_V2EXT_BESL_BASELINE_VALID (1U << 3) +#define USB_V2EXT_BESL_DEEP_VALID (1U << 4) +#define USB_V2EXT_BESL_BASELINE_GET(x) (((x) >> 8) & 0xF) +#define USB_V2EXT_BESL_DEEP_GET(x) (((x) >> 12) & 0xF) } __packed; typedef struct usb_devcap_usb2ext_descriptor usb_devcap_usb2ext_descriptor_t; @@ -671,6 +679,7 @@ struct usb_port_status { #define UPS_SUSPEND 0x0004 #define UPS_OVERCURRENT_INDICATOR 0x0008 #define UPS_RESET 0x0010 +#define UPS_PORT_L1 0x0020 /* USB 2.0 only */ /* The link-state bits are valid for Super-Speed USB HUBs */ #define UPS_PORT_LINK_STATE_GET(x) (((x) >> 5) & 0xF) #define UPS_PORT_LINK_STATE_SET(x) (((x) & 0xF) << 5) @@ -701,7 +710,8 @@ struct usb_port_status { #define UPS_C_SUSPEND 0x0004 #define UPS_C_OVERCURRENT_INDICATOR 0x0008 #define UPS_C_PORT_RESET 0x0010 -#define UPS_C_BH_PORT_RESET 0x0020 +#define UPS_C_PORT_L1 0x0020 /* USB 2.0 only */ +#define UPS_C_BH_PORT_RESET 0x0020 /* USB 3.0 only */ #define UPS_C_PORT_LINK_STATE 0x0040 #define UPS_C_PORT_CONFIG_ERROR 0x0080 } __packed; Modified: head/sys/dev/usb/usb_request.c ============================================================================== --- head/sys/dev/usb/usb_request.c Mon Apr 2 07:42:17 2012 (r233770) +++ head/sys/dev/usb/usb_request.c Mon Apr 2 07:51:30 2012 (r233771) @@ -2226,3 +2226,57 @@ usbd_req_set_port_link_state(struct usb_ USETW(req.wLength, 0); return (usbd_do_request(udev, mtx, &req, 0)); } + +/*------------------------------------------------------------------------* + * usbd_req_set_lpm_info + * + * USB 2.0 specific request for Link Power Management. + * + * Returns: + * 0: Success + * USB_ERR_PENDING_REQUESTS: NYET + * USB_ERR_TIMEOUT: TIMEOUT + * USB_ERR_STALL: STALL + * Else: Failure + *------------------------------------------------------------------------*/ +usb_error_t +usbd_req_set_lpm_info(struct usb_device *udev, struct mtx *mtx, + uint8_t port, uint8_t besl, uint8_t addr, uint8_t rwe) +{ + struct usb_device_request req; + usb_error_t err; + uint8_t buf[1]; + + req.bmRequestType = UT_WRITE_CLASS_OTHER; + req.bRequest = UR_SET_AND_TEST; + USETW(req.wValue, UHF_PORT_L1); + req.wIndex[0] = (port & 0xF) | ((besl & 0xF) << 4); + req.wIndex[1] = (addr & 0x7F) | (rwe ? 0x80 : 0x00); + USETW(req.wLength, sizeof(buf)); + + /* set default value in case of short transfer */ + buf[0] = 0x00; + + err = usbd_do_request(udev, mtx, &req, buf); + if (err) + return (err); + + switch (buf[0]) { + case 0x00: /* SUCCESS */ + break; + case 0x10: /* NYET */ + err = USB_ERR_PENDING_REQUESTS; + break; + case 0x11: /* TIMEOUT */ + err = USB_ERR_TIMEOUT; + break; + case 0x30: /* STALL */ + err = USB_ERR_STALLED; + break; + default: /* reserved */ + err = USB_ERR_IOERROR; + break; + } + return (err); +} + Modified: head/sys/dev/usb/usb_request.h ============================================================================== --- head/sys/dev/usb/usb_request.h Mon Apr 2 07:42:17 2012 (r233770) +++ head/sys/dev/usb/usb_request.h Mon Apr 2 07:51:30 2012 (r233771) @@ -91,5 +91,7 @@ usb_error_t usbd_req_clear_tt_buffer(str uint8_t port, uint8_t addr, uint8_t type, uint8_t endpoint); usb_error_t usbd_req_set_port_link_state(struct usb_device *udev, struct mtx *mtx, uint8_t port, uint8_t link_state); +usb_error_t usbd_req_set_lpm_info(struct usb_device *udev, struct mtx *mtx, + uint8_t port, uint8_t besl, uint8_t addr, uint8_t rwe); #endif /* _USB_REQUEST_H_ */ From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 08:37:40 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A5B11065688; Mon, 2 Apr 2012 08:37:40 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id 0266D8FC14; Mon, 2 Apr 2012 08:37:39 +0000 (UTC) Received: from [192.168.0.2] (cpc1-cwma8-2-0-cust257.7-3.cable.virginmedia.com [82.20.153.2]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id q328bWXC087368 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 2 Apr 2012 09:37:32 +0100 (BST) (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120401210353.1b74184a@kan.dyndns.org> Date: Mon, 2 Apr 2012 09:37:27 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <55DD81DE-BF98-400A-A88B-E934B9C94EE3@FreeBSD.org> References: <201203311425.q2VEPCRZ005790@svn.freebsd.org> <20120401210353.1b74184a@kan.dyndns.org> To: Alexander Kabaev X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r233749 - in head/gnu/lib: libstdc++ libsupc++ X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 08:37:40 -0000 On 2 Apr 2012, at 02:03, Alexander Kabaev wrote: > there are reports of this commit breaking complex C++ binaries such as > build as part of KDE4. This is being looked at. Do you have any more information about what is broken? (Run-time = failures, linker failures?) David= From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 08:37:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0B6E106568C; Mon, 2 Apr 2012 08:37:58 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2E69C8FC23; Mon, 2 Apr 2012 08:37:57 +0000 (UTC) Received: by vcmm1 with SMTP id m1so2215682vcm.13 for ; Mon, 02 Apr 2012 01:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=DAkWtrk7rwWZhXgDDbY1jfAGj/NxJzUPeGkAPtdQ8Qs=; b=sLJHVdl1cOWh2YpM98/PBZ0r0JcB0TCIay7ZMaVmUfYCPbuhHuIMJ/bBB6qIQJ4tsH I+n+65/2+Nd1sjIXNNBle/VbfpfmZlTNt5HZXnHtfR0HsfWy2TcrVQvOGbXc0AKszke6 9bPGJYwSoAcIgjZc0fdKUp3TnOxVFU7QNYBCb1K+0on/m0hZcNplcPAlmKFKJWUZkJV+ Hd2CquLyux7sd05ixaYLvgUVnhaGCtrkWRUJtjH4Tn5GMg2goqb6oZ5G8NYzca9y6jH+ GiCsYKuRTlA/dPkYiLyrT4W4jHaqvcEIU62/p+OfzS5AtFvvqbZmcxo+YO7n9o4duEik TB+w== MIME-Version: 1.0 Received: by 10.52.178.98 with SMTP id cx2mr2885777vdc.112.1333355877223; Mon, 02 Apr 2012 01:37:57 -0700 (PDT) Received: by 10.220.230.135 with HTTP; Mon, 2 Apr 2012 01:37:57 -0700 (PDT) In-Reply-To: <201204020222.q322MMJS076397@svn.freebsd.org> References: <201204020222.q322MMJS076397@svn.freebsd.org> Date: Mon, 2 Apr 2012 01:37:57 -0700 Message-ID: From: Garrett Cooper To: Doug Ambrisko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233768 - head/sys/dev/mfi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 08:37:58 -0000 On Sun, Apr 1, 2012 at 7:22 PM, Doug Ambrisko wrote: > Author: ambrisko > Date: Mon Apr =A02 02:22:22 2012 > New Revision: 233768 > URL: http://svn.freebsd.org/changeset/base/233768 > > Log: > =A0Change typedef atomic_t to struct mfi_atomic to avoid name space > =A0collision and some couple more style changes. Thanks Doug! From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 10:44:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA213106566C; Mon, 2 Apr 2012 10:44:25 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 958038FC0C; Mon, 2 Apr 2012 10:44:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32AiP0S094513; Mon, 2 Apr 2012 10:44:25 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32AiPng094511; Mon, 2 Apr 2012 10:44:25 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201204021044.q32AiPng094511@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 2 Apr 2012 10:44:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233773 - head/usr.sbin/arp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 10:44:25 -0000 Author: glebius Date: Mon Apr 2 10:44:25 2012 New Revision: 233773 URL: http://svn.freebsd.org/changeset/base/233773 Log: Historically arp(8) did a route lookup for the entry it is about to add, and failed if it exist and had invalid data link type. Later on, in r201282, this check morphed to other code, but message "proxy entry exists for non 802 device" still left, and now it is printed in a case if route prefix found is equal to current address being added. In other words, when we are trying to add ARP entry for a network address. The message is absolutely unrelated and disappointing in this case. I don't see anything bad with setting ARP entries for network addresses. While useless in usual network, in a /31 RFC3021 it may be necessary. This, remove this code. Modified: head/usr.sbin/arp/arp.c Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Mon Apr 2 10:24:50 2012 (r233772) +++ head/usr.sbin/arp/arp.c Mon Apr 2 10:44:25 2012 (r233773) @@ -387,10 +387,6 @@ set(int argc, char **argv) } addr = (struct sockaddr_inarp *)(rtm + 1); sdl = (struct sockaddr_dl *)(SA_SIZE(addr) + (char *)addr); - if (addr->sin_addr.s_addr == dst->sin_addr.s_addr) { - printf("set: proxy entry exists for non 802 device\n"); - return (1); - } if ((sdl->sdl_family != AF_LINK) || (rtm->rtm_flags & RTF_GATEWAY) || From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 10:50:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF158106564A; Mon, 2 Apr 2012 10:50:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5CA68FC0C; Mon, 2 Apr 2012 10:50:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32Aohlk094800; Mon, 2 Apr 2012 10:50:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32AohJf094757; Mon, 2 Apr 2012 10:50:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204021050.q32AohJf094757@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 2 Apr 2012 10:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233774 - in head/sys: dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/misc dev/usb/net dev/usb/serial dev/usb/storage dev/usb/template dev/usb/wlan netgraph/bluetooth/dr... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 10:50:44 -0000 Author: hselasky Date: Mon Apr 2 10:50:42 2012 New Revision: 233774 URL: http://svn.freebsd.org/changeset/base/233774 Log: Fix compiler warnings, mostly signed issues, when USB modules are compiled with WARNS=9. MFC after: 1 weeks Modified: head/sys/dev/sound/usb/uaudio.c head/sys/dev/sound/usb/uaudioreg.h head/sys/dev/usb/controller/at91dci.c head/sys/dev/usb/controller/atmegadci.c head/sys/dev/usb/controller/avr32dci.c head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/musb_otg.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/controller/uss820dci.c head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/input/atp.c head/sys/dev/usb/input/uep.c head/sys/dev/usb/input/uhid.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/input/ums.c head/sys/dev/usb/misc/ufm.c head/sys/dev/usb/net/if_aue.c head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_cue.c head/sys/dev/usb/net/if_ipheth.c head/sys/dev/usb/net/if_kue.c head/sys/dev/usb/net/if_rue.c head/sys/dev/usb/net/if_udav.c head/sys/dev/usb/net/if_usie.c head/sys/dev/usb/net/ruephy.c head/sys/dev/usb/net/uhso.c head/sys/dev/usb/serial/ubsa.c head/sys/dev/usb/serial/uchcom.c head/sys/dev/usb/serial/ucycom.c head/sys/dev/usb/serial/ufoma.c head/sys/dev/usb/serial/ulpt.c head/sys/dev/usb/serial/umodem.c head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/usb_serial.h head/sys/dev/usb/storage/umass.c head/sys/dev/usb/storage/urio.c head/sys/dev/usb/storage/ustorage_fs.c head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/usb_busdma.c head/sys/dev/usb/usb_compat_linux.c head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_handle_request.c head/sys/dev/usb/usb_hid.c head/sys/dev/usb/usb_hub.c head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/usb_request.c head/sys/dev/usb/usb_transfer.c head/sys/dev/usb/usbdi.h head/sys/dev/usb/usbhid.h head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_zyd.c head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/sound/usb/uaudio.c Mon Apr 2 10:50:42 2012 (r233774) @@ -1272,15 +1272,15 @@ uaudio_chan_record_callback(struct usb_x { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint32_t n; - uint32_t m; - uint32_t blockcount; uint32_t offset0; uint32_t offset1; uint32_t mfl; + int m; + int n; int len; int actlen; int nframes; + int blockcount; usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); mfl = usbd_xfer_max_framelen(xfer); @@ -1307,9 +1307,9 @@ uaudio_chan_record_callback(struct usb_x m = (ch->end - ch->cur); - if (m > len) { + if (m > len) m = len; - } + usbd_copy_out(pc, offset1, ch->cur, m); len -= m; @@ -1884,10 +1884,10 @@ uaudio_mixer_add_selector(struct uaudio_ static uint32_t uaudio_mixer_feature_get_bmaControls(const struct usb_audio_feature_unit *d, - uint8_t index) + uint8_t i) { uint32_t temp = 0; - uint32_t offset = (index * d->bControlSize); + uint32_t offset = (i * d->bControlSize); if (d->bControlSize > 0) { temp |= d->bmaControls[offset]; @@ -2636,8 +2636,8 @@ uaudio_mixer_feature_name(const struct u return (uat->feature); } -const static struct uaudio_terminal_node * -uaudio_mixer_get_input(const struct uaudio_terminal_node *iot, uint8_t index) +static const struct uaudio_terminal_node * +uaudio_mixer_get_input(const struct uaudio_terminal_node *iot, uint8_t i) { struct uaudio_terminal_node *root = iot->root; uint8_t n; @@ -2645,17 +2645,16 @@ uaudio_mixer_get_input(const struct uaud n = iot->usr.id_max; do { if (iot->usr.bit_input[n / 8] & (1 << (n % 8))) { - if (!index--) { + if (!i--) return (root + n); - } } } while (n--); return (NULL); } -const static struct uaudio_terminal_node * -uaudio_mixer_get_output(const struct uaudio_terminal_node *iot, uint8_t index) +static const struct uaudio_terminal_node * +uaudio_mixer_get_output(const struct uaudio_terminal_node *iot, uint8_t i) { struct uaudio_terminal_node *root = iot->root; uint8_t n; @@ -2663,9 +2662,8 @@ uaudio_mixer_get_output(const struct uau n = iot->usr.id_max; do { if (iot->usr.bit_output[n / 8] & (1 << (n % 8))) { - if (!index--) { + if (!i--) return (root + n); - } } } while (n--); Modified: head/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- head/sys/dev/sound/usb/uaudioreg.h Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/sound/usb/uaudioreg.h Mon Apr 2 10:50:42 2012 (r233774) @@ -113,9 +113,9 @@ struct usb_audio_streaming_type1_descrip uByte bSamFreqType; #define UA_SAMP_CONTNUOUS 0 uByte tSamFreq[0]; -#define UA_GETSAMP(p, n) (((p)->tSamFreq[((n)*3)+0]) | \ +#define UA_GETSAMP(p, n) ((uint32_t)((((p)->tSamFreq[((n)*3)+0]) | \ ((p)->tSamFreq[((n)*3)+1] << 8) | \ - ((p)->tSamFreq[((n)*3)+2] << 16)) + ((p)->tSamFreq[((n)*3)+2] << 16)))) #define UA_SAMP_LO(p) UA_GETSAMP(p, 0) #define UA_SAMP_HI(p) UA_GETSAMP(p, 1) } __packed; Modified: head/sys/dev/usb/controller/at91dci.c ============================================================================== --- head/sys/dev/usb/controller/at91dci.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/controller/at91dci.c Mon Apr 2 10:50:42 2012 (r233774) @@ -1725,14 +1725,13 @@ static const struct at91dci_config_desc }, }; +#define HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) } + static const struct usb_hub_descriptor_min at91dci_hubd = { .bDescLength = sizeof(at91dci_hubd), .bDescriptorType = UDESC_HUB, .bNbrPorts = 1, - .wHubCharacteristics[0] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) & 0xFF, - .wHubCharacteristics[1] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) >> 8, + HSETW(.wHubCharacteristics, (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL)), .bPwrOn2PwrGood = 50, .bHubContrCurrent = 0, .DeviceRemovable = {0}, /* port is removable */ Modified: head/sys/dev/usb/controller/atmegadci.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/controller/atmegadci.c Mon Apr 2 10:50:42 2012 (r233774) @@ -1548,14 +1548,13 @@ static const struct atmegadci_config_des }, }; +#define HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) } + static const struct usb_hub_descriptor_min atmegadci_hubd = { .bDescLength = sizeof(atmegadci_hubd), .bDescriptorType = UDESC_HUB, .bNbrPorts = 1, - .wHubCharacteristics[0] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) & 0xFF, - .wHubCharacteristics[1] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) >> 8, + HSETW(.wHubCharacteristics, (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL)), .bPwrOn2PwrGood = 50, .bHubContrCurrent = 0, .DeviceRemovable = {0}, /* port is removable */ Modified: head/sys/dev/usb/controller/avr32dci.c ============================================================================== --- head/sys/dev/usb/controller/avr32dci.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/controller/avr32dci.c Mon Apr 2 10:50:42 2012 (r233774) @@ -1489,14 +1489,13 @@ static const struct avr32dci_config_desc }, }; +#define HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) } + static const struct usb_hub_descriptor_min avr32dci_hubd = { .bDescLength = sizeof(avr32dci_hubd), .bDescriptorType = UDESC_HUB, .bNbrPorts = 1, - .wHubCharacteristics[0] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) & 0xFF, - .wHubCharacteristics[1] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) >> 8, + HSETW(.wHubCharacteristics, (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL)), .bPwrOn2PwrGood = 50, .bHubContrCurrent = 0, .DeviceRemovable = {0}, /* port is removable */ Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/controller/dwc_otg.c Mon Apr 2 10:50:42 2012 (r233774) @@ -2057,14 +2057,13 @@ static const struct dwc_otg_config_desc }, }; +#define HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) } + static const struct usb_hub_descriptor_min dwc_otg_hubd = { .bDescLength = sizeof(dwc_otg_hubd), .bDescriptorType = UDESC_HUB, .bNbrPorts = 1, - .wHubCharacteristics[0] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) & 0xFF, - .wHubCharacteristics[1] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) >> 8, + HSETW(.wHubCharacteristics, (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL)), .bPwrOn2PwrGood = 50, .bHubContrCurrent = 0, .DeviceRemovable = {0}, /* port is removable */ Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/controller/ehci.c Mon Apr 2 10:50:42 2012 (r233774) @@ -3011,13 +3011,8 @@ static const struct ehci_config_desc ehc static const struct usb_hub_descriptor ehci_hubd = { - 0, /* dynamic length */ - UDESC_HUB, - 0, - {0, 0}, - 0, - 0, - {0}, + .bDescLength = 0, /* dynamic length */ + .bDescriptorType = UDESC_HUB, }; static void Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/controller/musb_otg.c Mon Apr 2 10:50:42 2012 (r233774) @@ -2192,14 +2192,13 @@ static const struct musbotg_config_desc }, }; +#define HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) } + static const struct usb_hub_descriptor_min musbotg_hubd = { .bDescLength = sizeof(musbotg_hubd), .bDescriptorType = UDESC_HUB, .bNbrPorts = 1, - .wHubCharacteristics[0] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) & 0xFF, - .wHubCharacteristics[1] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) >> 16, + HSETW(.wHubCharacteristics, (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL)), .bPwrOn2PwrGood = 50, .bHubContrCurrent = 0, .DeviceRemovable = {0}, /* port is removable */ Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/controller/ohci.c Mon Apr 2 10:50:42 2012 (r233774) @@ -2080,13 +2080,8 @@ struct ohci_config_desc ohci_confd = static const struct usb_hub_descriptor ohci_hubd = { - 0, /* dynamic length */ - UDESC_HUB, - 0, - {0, 0}, - 0, - 0, - {0}, + .bDescLength = 0, /* dynamic length */ + .bDescriptorType = UDESC_HUB, }; static usb_error_t Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/controller/uhci.c Mon Apr 2 10:50:42 2012 (r233774) @@ -2351,13 +2351,11 @@ static const struct uhci_config_desc uhc static const struct usb_hub_descriptor_min uhci_hubd_piix = { - sizeof(uhci_hubd_piix), - UDESC_HUB, - 2, - {UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL, 0}, - 50, /* power on to power good */ - 0, - {0x00}, /* both ports are removable */ + .bDescLength = sizeof(uhci_hubd_piix), + .bDescriptorType = UDESC_HUB, + .bNbrPorts = 2, + .wHubCharacteristics = {UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL, 0}, + .bPwrOn2PwrGood = 50, }; /* Modified: head/sys/dev/usb/controller/uss820dci.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/controller/uss820dci.c Mon Apr 2 10:50:42 2012 (r233774) @@ -1789,14 +1789,13 @@ static const struct uss820dci_config_des }, }; +#define HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) } + static const struct usb_hub_descriptor_min uss820dci_hubd = { .bDescLength = sizeof(uss820dci_hubd), .bDescriptorType = UDESC_HUB, .bNbrPorts = 1, - .wHubCharacteristics[0] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) & 0xFF, - .wHubCharacteristics[1] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) >> 8, + HSETW(.wHubCharacteristics, (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL)), .bPwrOn2PwrGood = 50, .bHubContrCurrent = 0, .DeviceRemovable = {0}, /* port is removable */ Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/controller/xhci.c Mon Apr 2 10:50:42 2012 (r233774) @@ -821,7 +821,7 @@ xhci_check_transfer(struct xhci_softc *s offset = td_event - td->td_self; if (offset >= 0 && - offset < sizeof(td->td_trb)) { + offset < (int64_t)sizeof(td->td_trb)) { usb_pc_cpu_invalidate(td->page_cache); @@ -2805,7 +2805,7 @@ struct usb_pipe_methods xhci_device_gene * Simulate a hardware HUB by handling all the necessary requests. *------------------------------------------------------------------------*/ -#define HSETW(ptr, val) ptr[0] = (uint8_t)(val), ptr[1] = (uint8_t)((val) >> 8) +#define HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) } static const struct usb_device_descriptor xhci_devd = @@ -2848,8 +2848,7 @@ struct xhci_bos_desc xhci_bosd = { HSETW(.wSpeedsSupported, 0x000C), .bFunctionalitySupport = 8, .bU1DevExitLat = 255, /* dummy - not used */ - .wU2DevExitLat[0] = 0x00, - .wU2DevExitLat[1] = 0x08, + .wU2DevExitLat = { 0x00, 0x08 }, }, .cidd = { .bLength = sizeof(xhci_bosd.cidd), Modified: head/sys/dev/usb/input/atp.c ============================================================================== --- head/sys/dev/usb/input/atp.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/input/atp.c Mon Apr 2 10:50:42 2012 (r233774) @@ -761,7 +761,7 @@ atp_get_pressures(int *p, const int *cur * threshold; this will reduce the contribution from * lower pressure readings. */ - if (p[i] <= atp_sensor_noise_threshold) + if ((u_int)p[i] <= atp_sensor_noise_threshold) p[i] = 0; /* filter away noise */ else p[i] -= atp_sensor_noise_threshold; @@ -887,7 +887,7 @@ atp_match_stroke_component(atp_stroke_co delta_mickeys = pspan->loc - component->loc; - if (abs(delta_mickeys) > atp_max_delta_mickeys) + if ((u_int)abs(delta_mickeys) > atp_max_delta_mickeys) return (FALSE); /* the finger span is too far out; no match */ component->loc = pspan->loc; @@ -1164,9 +1164,10 @@ static void atp_add_new_strokes(struct atp_softc *sc, atp_pspan *pspans_x, u_int n_xpspans, atp_pspan *pspans_y, u_int n_ypspans) { - int i, j; atp_pspan spans[2][ATP_MAX_PSPANS_PER_AXIS]; - u_int nspans[2]; + u_int nspans[2]; + u_int i; + u_int j; /* Copy unmatched pspans into the local arrays. */ for (i = 0, nspans[X] = 0; i < n_xpspans; i++) { @@ -1373,9 +1374,9 @@ atp_terminate_stroke(struct atp_softc *s static __inline boolean_t atp_stroke_has_small_movement(const atp_stroke *stroke) { - return ((abs(stroke->components[X].delta_mickeys) <= + return (((u_int)abs(stroke->components[X].delta_mickeys) <= atp_small_movement_threshold) && - (abs(stroke->components[Y].delta_mickeys) <= + ((u_int)abs(stroke->components[Y].delta_mickeys) <= atp_small_movement_threshold)); } @@ -1388,7 +1389,7 @@ static __inline void atp_update_pending_mickeys(atp_stroke_component *component) { component->pending += component->delta_mickeys; - if (abs(component->pending) <= atp_small_movement_threshold) + if ((u_int)abs(component->pending) <= atp_small_movement_threshold) component->delta_mickeys = 0; else { /* @@ -1690,7 +1691,7 @@ atp_attach(device_t dev) if (usb_fifo_attach(sc->sc_usb_device, sc, &sc->sc_mutex, &atp_fifo_methods, &sc->sc_fifo, - device_get_unit(dev), 0 - 1, uaa->info.bIfaceIndex, + device_get_unit(dev), -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644)) { goto detach; } @@ -1764,13 +1765,13 @@ atp_intr(struct usb_xfer *xfer, usb_erro switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (len > sc->sc_params->data_len) { + if (len > (int)sc->sc_params->data_len) { DPRINTFN(ATP_LLEVEL_ERROR, "truncating large packet from %u to %u bytes\n", len, sc->sc_params->data_len); len = sc->sc_params->data_len; } - if (len < sc->sc_params->data_len) + if (len < (int)sc->sc_params->data_len) goto tr_setup; pc = usbd_xfer_get_frame(xfer, 0); @@ -2213,9 +2214,9 @@ static device_method_t atp_methods[] = { }; static driver_t atp_driver = { - ATP_DRIVER_NAME, - atp_methods, - sizeof(struct atp_softc) + .name = ATP_DRIVER_NAME, + .methods = atp_methods, + .size = sizeof(struct atp_softc) }; static devclass_t atp_devclass; Modified: head/sys/dev/usb/input/uep.c ============================================================================== --- head/sys/dev/usb/input/uep.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/input/uep.c Mon Apr 2 10:50:42 2012 (r233774) @@ -202,7 +202,7 @@ uep_intr_callback(struct usb_xfer *xfer, u_char buf[17], *p; int pkt_len; - if (len > sizeof(buf)) { + if (len > (int)sizeof(buf)) { DPRINTF("bad input length %d\n", len); goto tr_setup; } @@ -329,7 +329,7 @@ uep_attach(device_t dev) } error = usb_fifo_attach(uaa->device, sc, &sc->mtx, &uep_fifo_methods, - &sc->fifo, device_get_unit(dev), 0 - 1, uaa->info.bIfaceIndex, + &sc->fifo, device_get_unit(dev), -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); if (error) { Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/input/uhid.c Mon Apr 2 10:50:42 2012 (r233774) @@ -170,10 +170,10 @@ uhid_intr_callback(struct usb_xfer *xfer * If the ID byte is non zero we allow descriptors * having multiple sizes: */ - if ((actlen >= sc->sc_isize) || + if ((actlen >= (int)sc->sc_isize) || ((actlen > 0) && (sc->sc_iid != 0))) { /* limit report length to the maximum */ - if (actlen > sc->sc_isize) + if (actlen > (int)sc->sc_isize) actlen = sc->sc_isize; usb_fifo_put_data(sc->sc_fifo.fp[USB_FIFO_RX], pc, 0, actlen, 1); @@ -768,7 +768,7 @@ uhid_attach(device_t dev) error = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, &uhid_fifo_methods, &sc->sc_fifo, - unit, 0 - 1, uaa->info.bIfaceIndex, + unit, -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); if (error) { goto detach; Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/input/ukbd.c Mon Apr 2 10:50:42 2012 (r233774) @@ -2047,7 +2047,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int 0x5c, /* Keyboard Intl' 6 (Keypad ,) (For PC-9821 layout) */ }; - if ((code >= 89) && (code < (89 + (sizeof(scan) / sizeof(scan[0]))))) { + if ((code >= 89) && (code < (int)(89 + (sizeof(scan) / sizeof(scan[0]))))) { code = scan[code - 89]; } /* Pause/Break */ Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/input/ums.c Mon Apr 2 10:50:42 2012 (r233774) @@ -201,7 +201,7 @@ ums_intr_callback(struct usb_xfer *xfer, case USB_ST_TRANSFERRED: DPRINTFN(6, "sc=%p actlen=%d\n", sc, len); - if (len > sizeof(sc->sc_temp)) { + if (len > (int)sizeof(sc->sc_temp)) { DPRINTFN(6, "truncating large packet to %zu bytes\n", sizeof(sc->sc_temp)); len = sizeof(sc->sc_temp); @@ -644,7 +644,7 @@ ums_attach(device_t dev) /* Some wheels need the Z axis reversed. */ info->sc_flags |= UMS_FLAG_REVZ; } - if (isize > usbd_xfer_max_framelen(sc->sc_xfer[UMS_INTR_DT])) { + if (isize > (int)usbd_xfer_max_framelen(sc->sc_xfer[UMS_INTR_DT])) { DPRINTF("WARNING: report size, %d bytes, is larger " "than interrupt size, %d bytes!\n", isize, usbd_xfer_max_framelen(sc->sc_xfer[UMS_INTR_DT])); @@ -698,7 +698,7 @@ ums_attach(device_t dev) err = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, &ums_fifo_methods, &sc->sc_fifo, - device_get_unit(dev), 0 - 1, uaa->info.bIfaceIndex, + device_get_unit(dev), -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); if (err) { goto detach; Modified: head/sys/dev/usb/misc/ufm.c ============================================================================== --- head/sys/dev/usb/misc/ufm.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/misc/ufm.c Mon Apr 2 10:50:42 2012 (r233774) @@ -156,7 +156,7 @@ ufm_attach(device_t dev) error = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, &ufm_fifo_methods, &sc->sc_fifo, - device_get_unit(dev), 0 - 1, uaa->info.bIfaceIndex, + device_get_unit(dev), -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); if (error) { goto detach; Modified: head/sys/dev/usb/net/if_aue.c ============================================================================== --- head/sys/dev/usb/net/if_aue.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/if_aue.c Mon Apr 2 10:50:42 2012 (r233774) @@ -740,7 +740,7 @@ aue_intr_callback(struct usb_xfer *xfer, case USB_ST_TRANSFERRED: if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && - actlen >= sizeof(pkt)) { + actlen >= (int)sizeof(pkt)) { pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, &pkt, sizeof(pkt)); @@ -793,7 +793,7 @@ aue_bulk_read_callback(struct usb_xfer * } } else { - if (actlen <= sizeof(stat) + ETHER_CRC_LEN) { + if (actlen <= (int)(sizeof(stat) + ETHER_CRC_LEN)) { ifp->if_ierrors++; goto tr_setup; } Modified: head/sys/dev/usb/net/if_axe.c ============================================================================== --- head/sys/dev/usb/net/if_axe.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/if_axe.c Mon Apr 2 10:50:42 2012 (r233774) @@ -1037,7 +1037,7 @@ axe_rx_frame(struct usb_ether *ue, struc error = 0; if ((sc->sc_flags & AXE_FLAG_STD_FRAME) != 0) { while (pos < actlen) { - if ((pos + sizeof(hdr)) > actlen) { + if ((int)(pos + sizeof(hdr)) > actlen) { /* too little data */ error = EINVAL; break; @@ -1061,7 +1061,7 @@ axe_rx_frame(struct usb_ether *ue, struc } } else if ((sc->sc_flags & AXE_FLAG_CSUM_FRAME) != 0) { while (pos < actlen) { - if ((pos + sizeof(csum_hdr)) > actlen) { + if ((int)(pos + sizeof(csum_hdr)) > actlen) { /* too little data */ error = EINVAL; break; Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/if_cdce.c Mon Apr 2 10:50:42 2012 (r233774) @@ -303,8 +303,8 @@ cdce_ncm_init(struct cdce_softc *sc) int err; ufd = usbd_find_descriptor(sc->sc_ue.ue_udev, NULL, - sc->sc_ifaces_index[1], UDESC_CS_INTERFACE, 0 - 1, - UCDC_NCM_FUNC_DESC_SUBTYPE, 0 - 1); + sc->sc_ifaces_index[1], UDESC_CS_INTERFACE, 0xFF, + UCDC_NCM_FUNC_DESC_SUBTYPE, 0xFF); /* verify length of NCM functional descriptor */ if (ufd != NULL) { @@ -514,7 +514,7 @@ cdce_attach(device_t dev) ud = usbd_find_descriptor (uaa->device, NULL, uaa->info.bIfaceIndex, - UDESC_CS_INTERFACE, 0 - 1, UDESCSUB_CDC_UNION, 0 - 1); + UDESC_CS_INTERFACE, 0xFF, UDESCSUB_CDC_UNION, 0xFF); if ((ud == NULL) || (ud->bLength < sizeof(*ud)) || (sc->sc_flags & CDCE_FLAG_NO_UNION)) { @@ -598,7 +598,7 @@ alloc_transfers: ued = usbd_find_descriptor (uaa->device, NULL, uaa->info.bIfaceIndex, - UDESC_CS_INTERFACE, 0 - 1, UDESCSUB_CDC_ENF, 0 - 1); + UDESC_CS_INTERFACE, 0xFF, UDESCSUB_CDC_ENF, 0xFF); if ((ued == NULL) || (ued->bLength < sizeof(*ued))) { error = USB_ERR_INVAL; @@ -892,7 +892,9 @@ cdce_bulk_read_callback(struct usb_xfer struct cdce_softc *sc = usbd_xfer_softc(xfer); struct mbuf *m; uint8_t x; - int actlen, aframes, len; + int actlen; + int aframes; + int len; usbd_xfer_status(xfer, &actlen, NULL, &aframes, NULL); @@ -911,7 +913,7 @@ cdce_bulk_read_callback(struct usb_xfer if ((sc->sc_flags & CDCE_FLAG_ZAURUS) && len >= 14) len -= 4; - if (len < sizeof(struct ether_header)) { + if (len < (int)sizeof(struct ether_header)) { m_freem(m); continue; } @@ -1096,7 +1098,7 @@ cdce_ncm_fill_tx_frames(struct usb_xfer break; } - if (m->m_pkthdr.len > rem) { + if (m->m_pkthdr.len > (int)rem) { if (n == 0) { /* The frame won't fit in our buffer */ DPRINTFN(1, "Frame too big to be transmitted!\n"); @@ -1278,7 +1280,7 @@ cdce_ncm_bulk_read_callback(struct usb_x DPRINTFN(1, "received %u bytes in %u frames\n", actlen, aframes); - if (actlen < (sizeof(sc->sc_ncm.hdr) + + if (actlen < (int)(sizeof(sc->sc_ncm.hdr) + sizeof(sc->sc_ncm.dpt))) { DPRINTFN(1, "frame too short\n"); goto tr_setup; @@ -1305,7 +1307,7 @@ cdce_ncm_bulk_read_callback(struct usb_x goto tr_stall; } temp = UGETW(sc->sc_ncm.hdr.wDptIndex); - if ((temp + sizeof(sc->sc_ncm.dpt)) > actlen) { + if ((int)(temp + sizeof(sc->sc_ncm.dpt)) > actlen) { DPRINTFN(1, "invalid DPT index: 0x%04x\n", temp); goto tr_stall; } @@ -1354,7 +1356,7 @@ cdce_ncm_bulk_read_callback(struct usb_x temp = UGETW(sc->sc_ncm.dp[x].wFrameLength); if ((offset == 0) || - (temp < sizeof(struct ether_header)) || + (temp < (int)sizeof(struct ether_header)) || (temp > (MCLBYTES - ETHER_ALIGN))) { DPRINTFN(1, "NULL frame detected at %d\n", x); m = NULL; @@ -1366,7 +1368,7 @@ cdce_ncm_bulk_read_callback(struct usb_x m = NULL; /* silently ignore this frame */ continue; - } else if (temp > (MHLEN - ETHER_ALIGN)) { + } else if (temp > (int)(MHLEN - ETHER_ALIGN)) { m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); } else { m = m_gethdr(M_DONTWAIT, MT_DATA); Modified: head/sys/dev/usb/net/if_cue.c ============================================================================== --- head/sys/dev/usb/net/if_cue.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/if_cue.c Mon Apr 2 10:50:42 2012 (r233774) @@ -457,7 +457,7 @@ cue_bulk_read_callback(struct usb_xfer * switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (actlen <= (2 + sizeof(struct ether_header))) { + if (actlen <= (int)(2 + sizeof(struct ether_header))) { ifp->if_ierrors++; goto tr_setup; } Modified: head/sys/dev/usb/net/if_ipheth.c ============================================================================== --- head/sys/dev/usb/net/if_ipheth.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/if_ipheth.c Mon Apr 2 10:50:42 2012 (r233774) @@ -471,7 +471,7 @@ ipheth_bulk_read_callback(struct usb_xfe sc->sc_rx_buf[x] = NULL; len = usbd_xfer_frame_len(xfer, x); - if (len < (sizeof(struct ether_header) + + if (len < (int)(sizeof(struct ether_header) + IPHETH_RX_ADJ)) { m_freem(m); continue; Modified: head/sys/dev/usb/net/if_kue.c ============================================================================== --- head/sys/dev/usb/net/if_kue.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/if_kue.c Mon Apr 2 10:50:42 2012 (r233774) @@ -545,7 +545,7 @@ kue_bulk_read_callback(struct usb_xfer * switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (actlen <= (2 + sizeof(struct ether_header))) { + if (actlen <= (int)(2 + sizeof(struct ether_header))) { ifp->if_ierrors++; goto tr_setup; } Modified: head/sys/dev/usb/net/if_rue.c ============================================================================== --- head/sys/dev/usb/net/if_rue.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/if_rue.c Mon Apr 2 10:50:42 2012 (r233774) @@ -638,7 +638,7 @@ rue_intr_callback(struct usb_xfer *xfer, case USB_ST_TRANSFERRED: if (ifp && (ifp->if_drv_flags & IFF_DRV_RUNNING) && - actlen >= sizeof(pkt)) { + actlen >= (int)sizeof(pkt)) { pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, &pkt, sizeof(pkt)); Modified: head/sys/dev/usb/net/if_udav.c ============================================================================== --- head/sys/dev/usb/net/if_udav.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/if_udav.c Mon Apr 2 10:50:42 2012 (r233774) @@ -642,7 +642,7 @@ udav_bulk_read_callback(struct usb_xfer switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (actlen < sizeof(stat) + ETHER_CRC_LEN) { + if (actlen < (int)(sizeof(stat) + ETHER_CRC_LEN)) { ifp->if_ierrors++; goto tr_setup; } Modified: head/sys/dev/usb/net/if_usie.c ============================================================================== --- head/sys/dev/usb/net/if_usie.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/if_usie.c Mon Apr 2 10:50:42 2012 (r233774) @@ -918,7 +918,7 @@ tr_setup: if (m == NULL) break; - if (m->m_pkthdr.len > (MCLBYTES - ETHER_HDR_LEN + + if (m->m_pkthdr.len > (int)(MCLBYTES - ETHER_HDR_LEN + ETHER_CRC_LEN - sizeof(sc->sc_txd))) { DPRINTF("packet len is too big: %d\n", m->m_pkthdr.len); Modified: head/sys/dev/usb/net/ruephy.c ============================================================================== --- head/sys/dev/usb/net/ruephy.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/ruephy.c Mon Apr 2 10:50:42 2012 (r233774) @@ -67,9 +67,9 @@ static device_method_t ruephy_methods[] static devclass_t ruephy_devclass; static driver_t ruephy_driver = { - "ruephy", - ruephy_methods, - sizeof(struct mii_softc) + .name = "ruephy", + .methods = ruephy_methods, + .size = sizeof(struct mii_softc) }; DRIVER_MODULE(ruephy, miibus, ruephy_driver, ruephy_devclass, 0, 0); Modified: head/sys/dev/usb/net/uhso.c ============================================================================== --- head/sys/dev/usb/net/uhso.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/net/uhso.c Mon Apr 2 10:50:42 2012 (r233774) @@ -482,9 +482,9 @@ static device_method_t uhso_methods[] = }; static driver_t uhso_driver = { - "uhso", - uhso_methods, - sizeof(struct uhso_softc) + .name = "uhso", + .methods = uhso_methods, + .size = sizeof(struct uhso_softc) }; static devclass_t uhso_devclass; @@ -1366,7 +1366,7 @@ uhso_bs_intr_callback(struct usb_xfer *x UHSO_DPRINTF(0, "UCDC notification too short: %d\n", actlen); goto tr_setup; } - else if (actlen > sizeof(struct usb_cdc_notification)) { + else if (actlen > (int)sizeof(struct usb_cdc_notification)) { UHSO_DPRINTF(0, "UCDC notification too large: %d\n", actlen); actlen = sizeof(struct usb_cdc_notification); } Modified: head/sys/dev/usb/serial/ubsa.c ============================================================================== --- head/sys/dev/usb/serial/ubsa.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/serial/ubsa.c Mon Apr 2 10:50:42 2012 (r233774) @@ -627,7 +627,7 @@ ubsa_intr_callback(struct usb_xfer *xfer switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (actlen >= sizeof(buf)) { + if (actlen >= (int)sizeof(buf)) { pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, buf, sizeof(buf)); Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/serial/uchcom.c Mon Apr 2 10:50:42 2012 (r233774) @@ -846,9 +846,9 @@ static device_method_t uchcom_methods[] }; static driver_t uchcom_driver = { - "ucom", - uchcom_methods, - sizeof(struct uchcom_softc) + .name = "ucom", + .methods = uchcom_methods, + .size = sizeof(struct uchcom_softc) }; static devclass_t uchcom_devclass; Modified: head/sys/dev/usb/serial/ucycom.c ============================================================================== --- head/sys/dev/usb/serial/ucycom.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/serial/ucycom.c Mon Apr 2 10:50:42 2012 (r233774) @@ -519,7 +519,7 @@ ucycom_intr_read_callback(struct usb_xfe struct usb_page_cache *pc; uint8_t buf[2]; uint32_t offset; - uint32_t len; + int len; int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); Modified: head/sys/dev/usb/serial/ufoma.c ============================================================================== --- head/sys/dev/usb/serial/ufoma.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/serial/ufoma.c Mon Apr 2 10:50:42 2012 (r233774) @@ -684,7 +684,7 @@ ufoma_intr_callback(struct usb_xfer *xfe DPRINTF("too short message\n"); goto tr_setup; } - if (actlen > sizeof(pkt)) { + if (actlen > (int)sizeof(pkt)) { DPRINTF("truncating message\n"); actlen = sizeof(pkt); } Modified: head/sys/dev/usb/serial/ulpt.c ============================================================================== --- head/sys/dev/usb/serial/ulpt.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/serial/ulpt.c Mon Apr 2 10:50:42 2012 (r233774) @@ -543,7 +543,7 @@ ulpt_attach(device_t dev) /* search through all the descriptors looking for bidir mode */ id = usbd_get_interface_descriptor(uaa->iface); - alt_index = 0 - 1; + alt_index = 0xFF; while (1) { if (id == NULL) { break; @@ -631,14 +631,14 @@ found: error = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, &ulpt_fifo_methods, &sc->sc_fifo, - unit, 0 - 1, uaa->info.bIfaceIndex, + unit, -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); if (error) { goto detach; } error = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, &unlpt_fifo_methods, &sc->sc_fifo_noreset, - unit, 0 - 1, uaa->info.bIfaceIndex, + unit, -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); if (error) { goto detach; Modified: head/sys/dev/usb/serial/umodem.c ============================================================================== --- head/sys/dev/usb/serial/umodem.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/serial/umodem.c Mon Apr 2 10:50:42 2012 (r233774) @@ -317,7 +317,7 @@ umodem_attach(device_t dev) cud = usbd_find_descriptor(uaa->device, NULL, uaa->info.bIfaceIndex, UDESC_CS_INTERFACE, - 0 - 1, UDESCSUB_CDC_UNION, 0 - 1); + 0xFF, UDESCSUB_CDC_UNION, 0xFF); if ((cud == NULL) || (cud->bLength < sizeof(*cud))) { DPRINTF("Missing descriptor. " @@ -702,7 +702,7 @@ umodem_intr_callback(struct usb_xfer *xf "%d bytes\n", actlen); goto tr_setup; } - if (actlen > sizeof(pkt)) { + if (actlen > (int)sizeof(pkt)) { DPRINTF("truncating message\n"); actlen = sizeof(pkt); } @@ -842,7 +842,7 @@ static void * umodem_get_desc(struct usb_attach_arg *uaa, uint8_t type, uint8_t subtype) { return (usbd_find_descriptor(uaa->device, NULL, uaa->info.bIfaceIndex, - type, 0 - 1, subtype, 0 - 1)); + type, 0xFF, subtype, 0xFF)); } static usb_error_t Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/serial/uplcom.c Mon Apr 2 10:50:42 2012 (r233774) @@ -606,7 +606,7 @@ uplcom_cfg_set_break(struct ucom_softc * &req, NULL, 0, 1000); } -static const int32_t uplcom_rates[] = { +static const uint32_t uplcom_rates[] = { 75, 150, 300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 14400, 19200, 28800, 38400, 57600, 115200, /* Modified: head/sys/dev/usb/serial/usb_serial.c ============================================================================== --- head/sys/dev/usb/serial/usb_serial.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/serial/usb_serial.c Mon Apr 2 10:50:42 2012 (r233774) @@ -236,14 +236,14 @@ ucom_unit_free(int unit) */ int ucom_attach(struct ucom_super_softc *ssc, struct ucom_softc *sc, - uint32_t subunits, void *parent, + int subunits, void *parent, const struct ucom_callback *callback, struct mtx *mtx) { - uint32_t subunit; + int subunit; int error = 0; if ((sc == NULL) || - (subunits == 0) || + (subunits <= 0) || (callback == NULL)) { return (EINVAL); } @@ -293,7 +293,7 @@ ucom_attach(struct ucom_super_softc *ssc void ucom_detach(struct ucom_super_softc *ssc, struct ucom_softc *sc) { - uint32_t subunit; + int subunit; if (ssc->sc_subunits == 0) return; /* not initialized */ @@ -1089,11 +1089,6 @@ ucom_param(struct tty *tp, struct termio DPRINTF("sc = %p\n", sc); /* Check requested parameters. */ - if (t->c_ospeed < 0) { - DPRINTF("negative ospeed\n"); - error = EINVAL; - goto done; - } if (t->c_ispeed && (t->c_ispeed != t->c_ospeed)) { DPRINTF("mismatch ispeed and ospeed\n"); error = EINVAL; Modified: head/sys/dev/usb/serial/usb_serial.h ============================================================================== --- head/sys/dev/usb/serial/usb_serial.h Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/serial/usb_serial.h Mon Apr 2 10:50:42 2012 (r233774) @@ -166,7 +166,7 @@ struct ucom_softc { struct tty *sc_tty; struct mtx *sc_mtx; void *sc_parent; - uint32_t sc_subunit; + int sc_subunit; uint16_t sc_portno; uint16_t sc_flag; #define UCOM_FLAG_RTS_IFLOW 0x01 /* use RTS input flow control */ @@ -194,7 +194,7 @@ struct ucom_softc { usbd_do_request_proc(udev,&(com)->sc_super->sc_tq,req,ptr,flags,NULL,timo) int ucom_attach(struct ucom_super_softc *, - struct ucom_softc *, uint32_t, void *, + struct ucom_softc *, int, void *, const struct ucom_callback *callback, struct mtx *); void ucom_detach(struct ucom_super_softc *, struct ucom_softc *); void ucom_set_pnpinfo_usb(struct ucom_super_softc *, device_t); Modified: head/sys/dev/usb/storage/umass.c ============================================================================== --- head/sys/dev/usb/storage/umass.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/storage/umass.c Mon Apr 2 10:50:42 2012 (r233774) @@ -1452,7 +1452,7 @@ umass_t_bbb_status_callback(struct usb_x /* Zero missing parts of the CSW: */ - if (actlen < sizeof(sc->csw)) + if (actlen < (int)sizeof(sc->csw)) memset(&sc->csw, 0, sizeof(sc->csw)); pc = usbd_xfer_get_frame(xfer, 0); @@ -1961,7 +1961,7 @@ umass_t_cbi_status_callback(struct usb_x switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (actlen < sizeof(sc->sbl)) { + if (actlen < (int)sizeof(sc->sbl)) { goto tr_setup; } pc = usbd_xfer_get_frame(xfer, 0); Modified: head/sys/dev/usb/storage/urio.c ============================================================================== --- head/sys/dev/usb/storage/urio.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/storage/urio.c Mon Apr 2 10:50:42 2012 (r233774) @@ -246,7 +246,7 @@ urio_attach(device_t dev) error = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, &urio_fifo_methods, &sc->sc_fifo, - device_get_unit(dev), 0 - 1, uaa->info.bIfaceIndex, + device_get_unit(dev), -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); if (error) { goto detach; Modified: head/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- head/sys/dev/usb/storage/ustorage_fs.c Mon Apr 2 10:44:25 2012 (r233773) +++ head/sys/dev/usb/storage/ustorage_fs.c Mon Apr 2 10:50:42 2012 (r233774) @@ -967,7 +967,7 @@ ustorage_fs_verify(struct ustorage_fs_so } /* XXX TODO: verify that data is readable */ done: - return (ustorage_fs_min_len(sc, 0, 0 - 1)); + return (ustorage_fs_min_len(sc, 0, -1U)); } /*------------------------------------------------------------------------* @@ -989,7 +989,7 @@ ustorage_fs_inquiry(struct ustorage_fs_s memset(buf, 0, 36); buf[0] = 0x7f; /* Unsupported, no device - type */ - return (ustorage_fs_min_len(sc, 36, 0 - 1)); + return (ustorage_fs_min_len(sc, 36, -1U)); } memset(buf, 0, 8); /* Non - removable, direct - access device */ @@ -1008,7 +1008,7 @@ ustorage_fs_inquiry(struct ustorage_fs_s #if (USTORAGE_QDATA_MAX < 36) #error "(USTORAGE_QDATA_MAX < 36)" #endif - return (ustorage_fs_min_len(sc, 36, 0 - 1)); + return (ustorage_fs_min_len(sc, 36, -1U)); } /*------------------------------------------------------------------------* @@ -1077,7 +1077,7 @@ ustorage_fs_request_sense(struct ustorag #if (USTORAGE_QDATA_MAX < 18) #error "(USTORAGE_QDATA_MAX < 18)" #endif - return (ustorage_fs_min_len(sc, 18, 0 - 1)); + return (ustorage_fs_min_len(sc, 18, -1U)); } /*------------------------------------------------------------------------* @@ -1108,7 +1108,7 @@ ustorage_fs_read_capacity(struct ustorag #if (USTORAGE_QDATA_MAX < 8) #error "(USTORAGE_QDATA_MAX < 8)" #endif - return (ustorage_fs_min_len(sc, 8, 0 - 1)); + return (ustorage_fs_min_len(sc, 8, -1U)); } /*------------------------------------------------------------------------* @@ -1215,7 +1215,7 @@ ustorage_fs_mode_sense(struct ustorage_f #if (USTORAGE_QDATA_MAX < 24) #error "(USTORAGE_QDATA_MAX < 24)" #endif - return (ustorage_fs_min_len(sc, len, 0 - 1)); + return (ustorage_fs_min_len(sc, len, -1U)); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 11:41:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD52B1065674; Mon, 2 Apr 2012 11:41:33 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8C508FC1E; Mon, 2 Apr 2012 11:41:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32BfXqC096472; Mon, 2 Apr 2012 11:41:33 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32BfXuC096470; Mon, 2 Apr 2012 11:41:33 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201204021141.q32BfXuC096470@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 2 Apr 2012 11:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233776 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 11:41:34 -0000 Author: jchandra Date: Mon Apr 2 11:41:33 2012 New Revision: 233776 URL: http://svn.freebsd.org/changeset/base/233776 Log: Reinstate the XTLB handler for CPU_NLM and CPU_RMI These platforms set the KX bit even when booted in 32 bit mode. So the XLTB handler is needed even when __mips_n64 is not defined. Modified: head/sys/mips/mips/machdep.c Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Mon Apr 2 11:27:20 2012 (r233775) +++ head/sys/mips/mips/machdep.c Mon Apr 2 11:41:33 2012 (r233776) @@ -346,7 +346,7 @@ mips_vector_init(void) bcopy(MipsTLBMiss, (void *)MIPS_UTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); -#ifdef __mips_n64 +#if defined(__mips_n64) || defined(CPU_RMI) || defined(CPU_NLM) bcopy(MipsTLBMiss, (void *)MIPS_XTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); #endif From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 11:50:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E00A106566C; Mon, 2 Apr 2012 11:50:15 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 166AE8FC14; Mon, 2 Apr 2012 11:50:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32BoEEr096812; Mon, 2 Apr 2012 11:50:14 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32BoEYY096810; Mon, 2 Apr 2012 11:50:14 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201204021150.q32BoEYY096810@svn.freebsd.org> From: Alexander Kabaev Date: Mon, 2 Apr 2012 11:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233777 - head/libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 11:50:15 -0000 Author: kan Date: Mon Apr 2 11:50:14 2012 New Revision: 233777 URL: http://svn.freebsd.org/changeset/base/233777 Log: Do not try to adjust stacks if dlopen_object is called too early. This is a follow-up to r233231, which fixed similar issue with object initialization code. Reviewed by: kib MFC after: 1 week (with 233231) Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Apr 2 11:41:33 2012 (r233776) +++ head/libexec/rtld-elf/rtld.c Mon Apr 2 11:50:14 2012 (r233777) @@ -2585,7 +2585,10 @@ dlopen_object(const char *name, int fd, name); GDB_STATE(RT_CONSISTENT,obj ? &obj->linkmap : NULL); - map_stacks_exec(&lockstate); + + if (!(lo_flags & RTLD_LO_EARLY)) { + map_stacks_exec(&lockstate); + } if (initlist_objects_ifunc(&initlist, (mode & RTLD_MODEMASK) == RTLD_NOW, (lo_flags & RTLD_LO_EARLY) ? SYMLOOK_EARLY : 0, From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 11:59:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0529B106566C; Mon, 2 Apr 2012 11:59:14 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E33588FC12; Mon, 2 Apr 2012 11:59:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32BxDmh097138; Mon, 2 Apr 2012 11:59:13 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32BxDIO097136; Mon, 2 Apr 2012 11:59:13 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201204021159.q32BxDIO097136@svn.freebsd.org> From: Alexander Kabaev Date: Mon, 2 Apr 2012 11:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233778 - head/libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 11:59:14 -0000 Author: kan Date: Mon Apr 2 11:59:13 2012 New Revision: 233778 URL: http://svn.freebsd.org/changeset/base/233778 Log: Remove extra blank line from revious commit. Submitted by: trema Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Apr 2 11:50:14 2012 (r233777) +++ head/libexec/rtld-elf/rtld.c Mon Apr 2 11:59:13 2012 (r233778) @@ -2585,7 +2585,6 @@ dlopen_object(const char *name, int fd, name); GDB_STATE(RT_CONSISTENT,obj ? &obj->linkmap : NULL); - if (!(lo_flags & RTLD_LO_EARLY)) { map_stacks_exec(&lockstate); } From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 14:31:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23EA7106566C; Mon, 2 Apr 2012 14:31:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id EA2AB8FC0C; Mon, 2 Apr 2012 14:31:45 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5C697B91C; Mon, 2 Apr 2012 10:31:45 -0400 (EDT) From: John Baldwin To: Dimitry Andric Date: Mon, 2 Apr 2012 07:52:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203301257.q2UCvE4l042042@svn.freebsd.org> <20120330133045.GD1423@mole.fafoe.narf.at> <4F760E5F.5030300@FreeBSD.org> In-Reply-To: <4F760E5F.5030300@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204020752.52596.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 02 Apr 2012 10:31:45 -0400 (EDT) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Scott Long , Stefan Farfeleder , David Xu , svn-src-head@freebsd.org Subject: Re: svn commit: r233700 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 14:31:46 -0000 On Friday, March 30, 2012 3:49:51 pm Dimitry Andric wrote: > On 2012-03-30 15:30, Stefan Farfeleder wrote: > > here are a few similar cases. > > Hm, what about this one that clang warns about: > > sys/dev/asr/asr.c:2420:57: warning: for loop has empty body [-Wempty- body] > for (ha = &Asr_softc_list; *ha; ha = &((*ha)->ha_next)); > ^ > sys/dev/asr/asr.c:2420:57: note: put the semicolon on a separate line to silence this warning [-Wempty-body] > > I'm not sure about it though, the code looks like this: > > static int > asr_attach(device_t dev) > { > [...] > Asr_softc_t *sc, **ha; > [...] > LIST_INIT(&(sc->ha_ccb)); > /* Link us into the HA list */ > for (ha = &Asr_softc_list; *ha; ha = &((*ha)->ha_next)); > *(ha) = sc; > > It seems the for loop walks the list until the end, then tacks 'sc' onto > it. > > So to 'fix' the warning, and make the meaning more explicit, we should > probably rewrite that fragment as: > > LIST_INIT(&(sc->ha_ccb)); > /* Link us into the HA list */ > for (ha = &Asr_softc_list; *ha; ha = &((*ha)->ha_next)) > ; > *(ha) = sc; > > Is this OK? Can we just make that code use a STAILQ() instead of doing it obscurely by hand? -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 14:31:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 566891065670; Mon, 2 Apr 2012 14:31:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E9EC08FC17; Mon, 2 Apr 2012 14:31:49 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5A742B977; Mon, 2 Apr 2012 10:31:49 -0400 (EDT) From: John Baldwin To: Mikolaj Golub Date: Mon, 2 Apr 2012 08:48:04 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201112292041.pBTKfGkj071711@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201204020848.04775.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 02 Apr 2012 10:31:49 -0400 (EDT) Cc: svn-src-head@freebsd.org, Bjoern Zeeb , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228969 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 14:31:50 -0000 On Sunday, April 01, 2012 8:05:00 am Mikolaj Golub wrote: > Hi, > > On 12/29/11, John Baldwin wrote: > > Author: jhb > > Date: Thu Dec 29 20:41:16 2011 > > New Revision: 228969 > > URL: http://svn.freebsd.org/changeset/base/228969 > > > > Log: > > Defer the work of freeing IPv4 multicast options from a socket to an > > asychronous task. This avoids tearing down multicast state including > > sending IGMP leave messages and reprogramming MAC filters while holding > > the per-protocol global pcbinfo lock that is used in the receive path of > > packet processing. > > > > Reviewed by: rwatson > > MFC after: 1 month > > > > Modified: > > head/sys/netinet/in_mcast.c > > head/sys/netinet/ip_var.h > > > > Modified: head/sys/netinet/in_mcast.c > > ============================================================================== > > --- head/sys/netinet/in_mcast.c Thu Dec 29 19:01:29 2011 (r228968) > > +++ head/sys/netinet/in_mcast.c Thu Dec 29 20:41:16 2011 (r228969) > > @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > #include > > +#include > > #include > > > > #include > > @@ -144,6 +145,8 @@ static void inm_purge(struct in_multi *) > > static void inm_reap(struct in_multi *); > > static struct ip_moptions * > > inp_findmoptions(struct inpcb *); > > +static void inp_freemoptions_internal(struct ip_moptions *); > > +static void inp_gcmoptions(void *, int); > > static int inp_get_source_filters(struct inpcb *, struct sockopt *); > > static int inp_join_group(struct inpcb *, struct sockopt *); > > static int inp_leave_group(struct inpcb *, struct sockopt *); > > @@ -179,6 +182,10 @@ static SYSCTL_NODE(_net_inet_ip_mcast, O > > CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip_mcast_filters, > > "Per-interface stack-wide source filters"); > > > > +static STAILQ_HEAD(, ip_moptions) imo_gc_list = > > + STAILQ_HEAD_INITIALIZER(imo_gc_list); > > +static struct task imo_gc_task = TASK_INITIALIZER(0, inp_gcmoptions, NULL); > > + > > /* > > * Inline function which wraps assertions for a valid ifp. > > * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp > > @@ -1518,17 +1525,29 @@ inp_findmoptions(struct inpcb *inp) > > } > > > > /* > > - * Discard the IP multicast options (and source filters). > > + * Discard the IP multicast options (and source filters). To minimize > > + * the amount of work done while holding locks such as the INP's > > + * pcbinfo lock (which is used in the receive path), the free > > + * operation is performed asynchronously in a separate task. > > * > > * SMPng: NOTE: assumes INP write lock is held. > > */ > > void > > inp_freemoptions(struct ip_moptions *imo) > > { > > - struct in_mfilter *imf; > > - size_t idx, nmships; > > > > KASSERT(imo != NULL, ("%s: ip_moptions is NULL", __func__)); > > + IN_MULTI_LOCK(); > > + STAILQ_INSERT_TAIL(&imo_gc_list, imo, imo_link); > > + IN_MULTI_UNLOCK(); > > + taskqueue_enqueue(taskqueue_thread, &imo_gc_task); > > +} > > + > > +static void > > +inp_freemoptions_internal(struct ip_moptions *imo) > > +{ > > + struct in_mfilter *imf; > > + size_t idx, nmships; > > > > nmships = imo->imo_num_memberships; > > for (idx = 0; idx < nmships; ++idx) { > > @@ -1546,6 +1565,22 @@ inp_freemoptions(struct ip_moptions *imo > > free(imo, M_IPMOPTS); > > } > > > > +static void > > +inp_gcmoptions(void *context, int pending) > > +{ > > + struct ip_moptions *imo; > > + > > + IN_MULTI_LOCK(); > > + while (!STAILQ_EMPTY(&imo_gc_list)) { > > + imo = STAILQ_FIRST(&imo_gc_list); > > + STAILQ_REMOVE_HEAD(&imo_gc_list, imo_link); > > + IN_MULTI_UNLOCK(); > > + inp_freemoptions_internal(imo); > > + IN_MULTI_LOCK(); > > + } > > + IN_MULTI_UNLOCK(); > > +} > > + > > /* > > * Atomically get source filters on a socket for an IPv4 multicast group. > > * Called with INP lock held; returns with lock released. > > > > Modified: head/sys/netinet/ip_var.h > > ============================================================================== > > --- head/sys/netinet/ip_var.h Thu Dec 29 19:01:29 2011 (r228968) > > +++ head/sys/netinet/ip_var.h Thu Dec 29 20:41:16 2011 (r228969) > > @@ -93,6 +93,7 @@ struct ip_moptions { > > u_short imo_max_memberships; /* max memberships this socket */ > > struct in_multi **imo_membership; /* group memberships */ > > struct in_mfilter *imo_mfilters; /* source filters */ > > + STAILQ_ENTRY(ip_moptions) imo_link; > > }; > > > > struct ipstat { > > > > I have been observing panics like below after recent upgrade on VIMAGE kernel: > > #0 doadump (textdump=-2022567936) at pcpu.h:244 > #1 0x8051b739 in db_fncall (dummy1=1, dummy2=0, dummy3=-2127531040, > dummy4=0x872b2920 "") > at /home/golub/freebsd/base/head/sys/ddb/db_command.c:573 > #2 0x8051bb31 in db_command (last_cmdp=0x8112eefc, cmd_table=0x0, dopager=1) > at /home/golub/freebsd/base/head/sys/ddb/db_command.c:449 > #3 0x8051bc8a in db_command_loop () at > /home/golub/freebsd/base/head/sys/ddb/db_command.c:502 > #4 0x8051dc7d in db_trap (type=12, code=0) > at /home/golub/freebsd/base/head/sys/ddb/db_main.c:229 > #5 0x80a82566 in kdb_trap (type=12, code=0, tf=0x872b2bbc) > at /home/golub/freebsd/base/head/sys/kern/subr_kdb.c:629 > #6 0x80ddd26f in trap_fatal (frame=0x872b2bbc, eva=24) > at /home/golub/freebsd/base/head/sys/i386/i386/trap.c:1014 > #7 0x80ddd347 in trap_pfault (frame=0x872b2bbc, usermode=0, eva=24) > at /home/golub/freebsd/base/head/sys/i386/i386/trap.c:835 > #8 0x80dde411 in trap (frame=0x872b2bbc) > at /home/golub/freebsd/base/head/sys/i386/i386/trap.c:547 > #9 0x80dc7c6c in calltrap () at > /home/golub/freebsd/base/head/sys/i386/i386/exception.s:169 > #10 0x80b6f1fd in igmp_change_state (inm=0x8ae70480) > at /home/golub/freebsd/base/head/sys/netinet/igmp.c:2595 > #11 0x80b76f68 in in_leavegroup_locked (inm=0x8ae70480, imf=0x8a655a00) > at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1239 > #12 0x80b76fbd in in_leavegroup (inm=0x8ae70480, imf=0x8a655a00) > at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1184 > #13 0x80b770b4 in inp_gcmoptions (context=0x0, pending=1) > at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1554 > #14 0x80a8ff2b in taskqueue_run_locked (queue=0x87594880) > at /home/golub/freebsd/base/head/sys/kern/subr_taskqueue.c:308 > #15 0x80a90987 in taskqueue_thread_loop (arg=0x81186bcc) > at /home/golub/freebsd/base/head/sys/kern/subr_taskqueue.c:497 > #16 0x80a1b2d8 in fork_exit (callout=0x80a90920 > , arg=0x81186bcc, > frame=0x872b2d28) at /home/golub/freebsd/base/head/sys/kern/kern_fork.c:992 > #17 0x80dc7d14 in fork_trampoline () > at /home/golub/freebsd/base/head/sys/i386/i386/exception.s:276 > (kgdb) fr 10 > #10 0x80b6f1fd in igmp_change_state (inm=0x8ae70480) > at /home/golub/freebsd/base/head/sys/netinet/igmp.c:2595 > 2595 V_state_change_timers_running = 1; > > (kgdb) l > 2590 ("%s: enqueue record = > %d", __func__, > 2591 retval)); > 2592 > 2593 inm->inm_state = IGMP_LEAVING_MEMBER; > 2594 inm->inm_sctimer = 1; > 2595 V_state_change_timers_running = 1; > 2596 syncstates = 0; > 2597 } > 2598 break; > 2599 } > > VNET context is not set at that point. > > The attached patch fixes the issue for me. Not sure about inm->inm_ifp > != NULL assumption but I need interface to get vnet :-). I will to defer to bz@ (cc'd) on how best to fix this. Another option would be to save the current vnet in the 'ip_moptions' struct (would have to add a new field) when queueing this imo to be free'd via the task. You could then do the curvnet set/restore at a higher level without any locks held, etc. > BTW, in igmp_change_state() this looks for me a bit strange: > > if (ifp != NULL) { > /* > * Sanity check that netinet's notion of ifp is the > * same as net's. > */ > KASSERT(inm->inm_ifp == ifp, ("%s: bad ifp", __func__)); > } > > IGMP_LOCK(); > > igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; > > The check ifp != NULL suggests that ifp may be NULL, but then it will > panic at the last shown line. Yes, it seems that the check should be removed and the KASSERT() should just always fire. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 15:07:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2949106564A; Mon, 2 Apr 2012 15:07:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD5F78FC16; Mon, 2 Apr 2012 15:07:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32F7MEJ003086; Mon, 2 Apr 2012 15:07:22 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32F7Maf003081; Mon, 2 Apr 2012 15:07:22 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204021507.q32F7Maf003081@svn.freebsd.org> From: John Baldwin Date: Mon, 2 Apr 2012 15:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233781 - in head/sys: amd64/amd64 i386/i386 x86/include x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 15:07:23 -0000 Author: jhb Date: Mon Apr 2 15:07:22 2012 New Revision: 233781 URL: http://svn.freebsd.org/changeset/base/233781 Log: Make machine check exception logging more readable. On newer Intel systems, an uncorrected ECC error tends to fire on all CPUs in a package simultaneously and the current printf hacks are not sufficient to make the messages legible. Instead, use the existing mca_lock spinlock to serialize calls to mca_log() and change the machine check code to panic directly when an unrecoverable error is encoutered rather than falling back to a trap_fatal() call in trap() (which adds nearly a screen-full of logging messages that aren't useful for machine checks). MFC after: 2 weeks Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c head/sys/x86/include/mca.h head/sys/x86/x86/mca.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Apr 2 14:52:28 2012 (r233780) +++ head/sys/amd64/amd64/trap.c Mon Apr 2 15:07:22 2012 (r233781) @@ -233,8 +233,7 @@ trap(struct trapframe *frame) #endif if (type == T_MCHK) { - if (!mca_intr()) - trap_fatal(frame, 0); + mca_intr(); goto out; } Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Mon Apr 2 14:52:28 2012 (r233780) +++ head/sys/i386/i386/trap.c Mon Apr 2 15:07:22 2012 (r233781) @@ -254,8 +254,7 @@ trap(struct trapframe *frame) #endif if (type == T_MCHK) { - if (!mca_intr()) - trap_fatal(frame, 0); + mca_intr(); goto out; } Modified: head/sys/x86/include/mca.h ============================================================================== --- head/sys/x86/include/mca.h Mon Apr 2 14:52:28 2012 (r233780) +++ head/sys/x86/include/mca.h Mon Apr 2 15:07:22 2012 (r233781) @@ -48,7 +48,7 @@ struct mca_record { void cmc_intr(void); void mca_init(void); -int mca_intr(void); +void mca_intr(void); void mca_resume(void); #endif Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Mon Apr 2 14:52:28 2012 (r233780) +++ head/sys/x86/x86/mca.c Mon Apr 2 15:07:22 2012 (r233781) @@ -457,9 +457,9 @@ mca_record_entry(enum scan_mode mode, co mtx_lock_spin(&mca_lock); rec = STAILQ_FIRST(&mca_freelist); if (rec == NULL) { - mtx_unlock_spin(&mca_lock); printf("MCA: Unable to allocate space for an event.\n"); mca_log(record); + mtx_unlock_spin(&mca_lock); return; } STAILQ_REMOVE_HEAD(&mca_freelist, link); @@ -589,7 +589,9 @@ mca_scan(enum scan_mode mode) count++; if (rec.mr_status & ucmask) { recoverable = 0; + mtx_lock_spin(&mca_lock); mca_log(&rec); + mtx_unlock_spin(&mca_lock); } mca_record_entry(mode, &rec); } @@ -636,9 +638,7 @@ mca_scan_cpus(void *arg) STAILQ_FOREACH(mca, &mca_records, link) { if (!mca->logged) { mca->logged = 1; - mtx_unlock_spin(&mca_lock); mca_log(&mca->rec); - mtx_lock_spin(&mca_lock); } } mtx_unlock_spin(&mca_lock); @@ -924,7 +924,7 @@ mca_init_bsp(void *arg __unused) SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_ANY, mca_init_bsp, NULL); /* Called when a machine check exception fires. */ -int +void mca_intr(void) { uint64_t mcg_status; @@ -938,7 +938,7 @@ mca_intr(void) printf("MC Type: 0x%jx Address: 0x%jx\n", (uintmax_t)rdmsr(MSR_P5_MC_TYPE), (uintmax_t)rdmsr(MSR_P5_MC_ADDR)); - return (0); + panic("Machine check"); } /* Scan the banks and check for any non-recoverable errors. */ @@ -949,7 +949,8 @@ mca_intr(void) /* Clear MCIP. */ wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP); - return (recoverable); + if (!recoverable) + panic("Unrecoverable machine check exception"); } #ifdef DEV_APIC @@ -972,9 +973,7 @@ cmc_intr(void) STAILQ_FOREACH(mca, &mca_records, link) { if (!mca->logged) { mca->logged = 1; - mtx_unlock_spin(&mca_lock); mca_log(&mca->rec); - mtx_lock_spin(&mca_lock); } } mtx_unlock_spin(&mca_lock); From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 16:19:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35539106566C; Mon, 2 Apr 2012 16:19:11 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [70.91.206.90]) by mx1.freebsd.org (Postfix) with ESMTP id F2A4E8FC17; Mon, 2 Apr 2012 16:19:10 +0000 (UTC) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO internal.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 02 Apr 2012 09:19:15 -0700 Received: from ambrisko.com (localhost [127.0.0.1]) by internal.ambrisko.com (8.14.4/8.14.4) with ESMTP id q32GJ8T3002441; Mon, 2 Apr 2012 09:19:08 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.4/8.14.4/Submit) id q32GJ80T002439; Mon, 2 Apr 2012 09:19:08 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <201204021619.q32GJ80T002439@ambrisko.com> In-Reply-To: To: Garrett Cooper Date: Mon, 2 Apr 2012 09:19:08 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL124d (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Cc: svn-src-head@freebsd.org, Doug Ambrisko , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233768 - head/sys/dev/mfi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 16:19:11 -0000 Garrett Cooper writes: | On Sun, Apr 1, 2012 at 7:22 PM, Doug Ambrisko wrote: | > Author: ambrisko | > Date: Mon Apr ?2 02:22:22 2012 | > New Revision: 233768 | > URL: http://svn.freebsd.org/changeset/base/233768 | > | > Log: | > Change typedef atomic_t to struct mfi_atomic to avoid name space | > collision and some couple more style changes. Now, I just have to figure out what the IA64 issue is. Some important clues are missing from the log and doing a test build on a ref machine didn't help. Make universe is going to take some time since I have to wait for my main machine to come back up. Doug A. From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 16:26:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 451B21065673; Mon, 2 Apr 2012 16:26:33 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26EF18FC19; Mon, 2 Apr 2012 16:26:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32GQXk1005681; Mon, 2 Apr 2012 16:26:33 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32GQWU0005679; Mon, 2 Apr 2012 16:26:32 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201204021626.q32GQWU0005679@svn.freebsd.org> From: Andreas Tobler Date: Mon, 2 Apr 2012 16:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233783 - head/usr.sbin/makefs/cd9660 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 16:26:33 -0000 Author: andreast Date: Mon Apr 2 16:26:32 2012 New Revision: 233783 URL: http://svn.freebsd.org/changeset/base/233783 Log: - Write the ISO9660 descriptor after the apm partition entries. - Fill the needed pmPartStatus flags. At least the OpenBIOS implementation relies on these flags. This commit fixes the panic seen on OS-X when inserting a FreeBSD/ppc disc. Additionally OpenBIOS recognizes the partition where the boot code is located. This lets us load a FreeBSD/ppc PowerMac kernel inside qemu. PR: powerpc/162091 MFC after: 1 week Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Mon Apr 2 16:13:54 2012 (r233782) +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Mon Apr 2 16:26:32 2012 (r233783) @@ -538,9 +538,19 @@ cd9660_write_apm_partition_entry(FILE *f off_t sector_start, off_t nsectors, off_t sector_size, const char *part_name, const char *part_type) { - uint32_t apm32; + uint32_t apm32, part_status; uint16_t apm16; + /* See Apple Tech Note 1189 for the details about the pmPartStatus + * flags. + * Below the flags which are default: + * - IsValid 0x01 + * - IsAllocated 0x02 + * - IsReadable 0x10 + * - IsWritable 0x20 + */ + part_status = 0x01 | 0x02 | 0x10 | 0x20; + if (fseeko(fd, (off_t)(idx + 1) * sector_size, SEEK_SET) == -1) err(1, "fseeko"); @@ -562,6 +572,17 @@ cd9660_write_apm_partition_entry(FILE *f fwrite(part_name, strlen(part_name) + 1, 1, fd); fseek(fd, 32 - strlen(part_name) - 1, SEEK_CUR); fwrite(part_type, strlen(part_type) + 1, 1, fd); + fseek(fd, 32 - strlen(part_type) - 1, SEEK_CUR); + + apm32 = 0; + /* pmLgDataStart */ + fwrite(&apm32, sizeof(apm32), 1, fd); + /* pmDataCnt */ + apm32 = htobe32(nsectors); + fwrite(&apm32, sizeof(apm32), 1, fd); + /* pmPartStatus */ + apm32 = htobe32(part_status); + fwrite(&apm32, sizeof(apm32), 1, fd); return 0; } @@ -666,12 +687,6 @@ cd9660_write_boot(FILE *fd) cd9660_write_apm_partition_entry(fd, 0, total_parts, 1, total_parts, 512, "Apple", "Apple_partition_map"); - /* Write ISO9660 descriptor, enclosing the whole disk */ - cd9660_write_apm_partition_entry(fd, 1, total_parts, 0, - diskStructure.totalSectors * - (diskStructure.sectorSize / 512), 512, "ISO9660", - "CD_ROM_Mode_1"); - /* Write all partition entries */ apm_partitions = 0; TAILQ_FOREACH(t, &diskStructure.boot_images, image_list) { @@ -679,11 +694,16 @@ cd9660_write_boot(FILE *fd) continue; cd9660_write_apm_partition_entry(fd, - 2 + apm_partitions++, total_parts, + 1 + apm_partitions++, total_parts, t->sector * (diskStructure.sectorSize / 512), t->num_sectors * (diskStructure.sectorSize / 512), 512, "CD Boot", "Apple_Bootstrap"); } + /* Write ISO9660 descriptor, enclosing the whole disk */ + cd9660_write_apm_partition_entry(fd, 2 + apm_partitions, + total_parts, 0, diskStructure.totalSectors * + (diskStructure.sectorSize / 512), 512, "ISO9660", + "CD_ROM_Mode_1"); } return 0; From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 16:33:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 459AB106579E; Mon, 2 Apr 2012 16:33:22 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 319788FC0A; Mon, 2 Apr 2012 16:33:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32GXMuQ006050; Mon, 2 Apr 2012 16:33:22 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32GXL5C006048; Mon, 2 Apr 2012 16:33:21 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201204021633.q32GXL5C006048@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 2 Apr 2012 16:33:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233787 - head/sys/ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 16:33:22 -0000 Author: jh Date: Mon Apr 2 16:33:21 2012 New Revision: 233787 URL: http://svn.freebsd.org/changeset/base/233787 Log: - Use more natural ip->i_flags instead of vap->va_flags in the final flags check. - Add a comment for the immutable/append check done after handling of the flags. - Style improvements. No functional change intended. Submitted by: bde MFC after: 2 weeks Modified: head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Mon Apr 2 16:33:07 2012 (r233786) +++ head/sys/ufs/ufs/ufs_vnops.c Mon Apr 2 16:33:21 2012 (r233787) @@ -545,8 +545,8 @@ ufs_setattr(ap) * processes. */ if (!priv_check_cred(cred, PRIV_VFS_SYSFLAGS, 0)) { - if (ip->i_flags - & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) { + if (ip->i_flags & + (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) { error = securelevel_gt(cred, 0); if (error) return (error); @@ -560,8 +560,8 @@ ufs_setattr(ap) ip->i_flags = vap->va_flags; DIP_SET(ip, i_flags, vap->va_flags); } else { - if (ip->i_flags - & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND) || + if (ip->i_flags & + (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND) || (vap->va_flags & UF_SETTABLE) != vap->va_flags) return (EPERM); ip->i_flags &= SF_SETTABLE; @@ -570,9 +570,15 @@ ufs_setattr(ap) } ip->i_flag |= IN_CHANGE; error = UFS_UPDATE(vp, 0); - if (vap->va_flags & (IMMUTABLE | APPEND)) + if (ip->i_flags & (IMMUTABLE | APPEND)) return (error); } + /* + * If immutable or append, no one can change any of its attributes + * except the ones already handled (exec atime and, in some cases + * for the superuser, file flags including the immutability flags + * themselves). + */ if (ip->i_flags & (IMMUTABLE | APPEND)) return (EPERM); /* From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 17:16:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B8E8106564A; Mon, 2 Apr 2012 17:16:25 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5763F8FC17; Mon, 2 Apr 2012 17:16:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32HGPgS007612; Mon, 2 Apr 2012 17:16:25 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32HGPKE007610; Mon, 2 Apr 2012 17:16:25 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201204021716.q32HGPKE007610@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 2 Apr 2012 17:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233792 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 17:16:25 -0000 Author: jilles Date: Mon Apr 2 17:16:24 2012 New Revision: 233792 URL: http://svn.freebsd.org/changeset/base/233792 Log: sh: Fix build with -DDEBUG=2. Reported by: Kristof Provost MFC after: 1 week Modified: head/bin/sh/jobs.c Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Mon Apr 2 16:50:48 2012 (r233791) +++ head/bin/sh/jobs.c Mon Apr 2 17:16:24 2012 (r233792) @@ -893,8 +893,8 @@ vforkexecshell(struct job *jp, char **ar struct jmploc jmploc; struct jmploc *savehandler; - TRACE(("vforkexecshell(%%%td, %p, %d) called\n", jp - jobtab, (void *)n, - mode)); + TRACE(("vforkexecshell(%%%td, %s, %p) called\n", jp - jobtab, argv[0], + (void *)pip)); INTOFF; flushall(); savehandler = handler; From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 17:26:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A47EF1065674; Mon, 2 Apr 2012 17:26:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FC2D8FC15; Mon, 2 Apr 2012 17:26:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32HQLvh007990; Mon, 2 Apr 2012 17:26:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32HQLVQ007988; Mon, 2 Apr 2012 17:26:21 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204021726.q32HQLVQ007988@svn.freebsd.org> From: John Baldwin Date: Mon, 2 Apr 2012 17:26:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233793 - head/sys/x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 17:26:21 -0000 Author: jhb Date: Mon Apr 2 17:26:21 2012 New Revision: 233793 URL: http://svn.freebsd.org/changeset/base/233793 Log: Further tweak the changes made in r233709. The kernel doesn't permit sleeping from a swi handler (even though in this case it would be ok), so switch the refill and scanning SWI handlers to being tasks on a fast taskqueue. Also, only schedule the refill task for a CMCI as an MC# can fire at any time, so it should do the minimal amount of work needed and avoid opportunities to deadlock before it panics (such as scheduling a task it won't ever need in practice). To handle the case of an MC# only finding recoverable errors (which should never happen), always try to refill the event free list when the periodic scan executes. MFC after: 2 weeks Modified: head/sys/x86/x86/mca.c Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Mon Apr 2 17:16:24 2012 (r233792) +++ head/sys/x86/x86/mca.c Mon Apr 2 17:26:21 2012 (r233793) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -108,8 +109,9 @@ static int mca_freecount; static STAILQ_HEAD(, mca_internal) mca_records; static struct callout mca_timer; static int mca_ticks = 3600; /* Check hourly by default. */ +static struct taskqueue *mca_tq; +static struct task mca_refill_task, mca_scan_task; static struct mtx mca_lock; -static void *mca_refill_swi, *mca_scan_swi; #ifdef DEV_APIC static struct cmc_state **cmc_state; /* Indexed by cpuid, bank */ @@ -439,7 +441,7 @@ mca_fill_freelist(void) } static void -mca_refill(void *arg) +mca_refill(void *context, int pending) { mca_fill_freelist(); @@ -464,8 +466,6 @@ mca_record_entry(enum scan_mode mode, co } STAILQ_REMOVE_HEAD(&mca_freelist, link); mca_freecount--; - if (mca_refill_swi != NULL) - swi_sched(mca_refill_swi, 0); } rec->rec = *record; @@ -473,6 +473,8 @@ mca_record_entry(enum scan_mode mode, co STAILQ_INSERT_TAIL(&mca_records, rec, link); mca_count++; mtx_unlock_spin(&mca_lock); + if (mode == CMCI) + taskqueue_enqueue_fast(mca_tq, &mca_refill_task); } #ifdef DEV_APIC @@ -616,12 +618,13 @@ mca_scan(enum scan_mode mode) * them to the console. */ static void -mca_scan_cpus(void *arg) +mca_scan_cpus(void *context, int pending) { struct mca_internal *mca; struct thread *td; int count, cpu; + mca_fill_freelist(); td = curthread; count = 0; thread_lock(td); @@ -649,7 +652,7 @@ static void mca_periodic_scan(void *arg) { - swi_sched(mca_scan_swi, 1); + taskqueue_enqueue_fast(mca_tq, &mca_scan_task); callout_reset(&mca_timer, mca_ticks * hz, mca_periodic_scan, NULL); } @@ -663,23 +666,29 @@ sysctl_mca_scan(SYSCTL_HANDLER_ARGS) if (error) return (error); if (i) - swi_sched(mca_scan_swi, 1); + taskqueue_enqueue_fast(mca_tq, &mca_scan_task); return (0); } static void +mca_createtq(void *dummy) +{ + if (mca_banks <= 0) + return; + + mca_tq = taskqueue_create_fast("mca", M_WAITOK, + taskqueue_thread_enqueue, &mca_tq); + taskqueue_start_threads(&mca_tq, 1, PI_SWI(SWI_TQ), "mca taskq"); +} +SYSINIT(mca_createtq, SI_SUB_CONFIGURE, SI_ORDER_ANY, mca_createtq, NULL); + +static void mca_startup(void *dummy) { - struct intr_event *ie; - if (!mca_enabled || !(cpu_feature & CPUID_MCA)) + if (mca_banks <= 0) return; - ie = NULL; - swi_add(&ie, "mca:scan", mca_scan_cpus, NULL, SWI_TQ, INTR_MPSAFE, - &mca_scan_swi); - swi_add(&ie, "mca:refill", mca_refill, NULL, SWI_TQ, INTR_MPSAFE, - &mca_refill_swi); callout_reset(&mca_timer, mca_ticks * hz, mca_periodic_scan, NULL); } SYSINIT(mca_startup, SI_SUB_SMP, SI_ORDER_ANY, mca_startup, NULL); @@ -718,8 +727,10 @@ mca_setup(uint64_t mcg_cap) mca_banks = mcg_cap & MCG_CAP_COUNT; mtx_init(&mca_lock, "mca", NULL, MTX_SPIN); STAILQ_INIT(&mca_records); + TASK_INIT(&mca_scan_task, 0, mca_scan_cpus, NULL); callout_init(&mca_timer, CALLOUT_MPSAFE); STAILQ_INIT(&mca_freelist); + TASK_INIT(&mca_refill_task, 0, mca_refill, NULL); mca_fill_freelist(); SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "count", CTLFLAG_RD, &mca_count, 0, "Record count"); From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 19:13:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 473CC106566C; Mon, 2 Apr 2012 19:13:03 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 198E18FC0C; Mon, 2 Apr 2012 19:13:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32JD2pC012741; Mon, 2 Apr 2012 19:13:02 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32JD2Fm012737; Mon, 2 Apr 2012 19:13:02 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <201204021913.q32JD2Fm012737@svn.freebsd.org> From: Doug Ambrisko Date: Mon, 2 Apr 2012 19:13:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233805 - head/sys/dev/mfi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 19:13:03 -0000 Author: ambrisko Date: Mon Apr 2 19:13:02 2012 New Revision: 233805 URL: http://svn.freebsd.org/changeset/base/233805 Log: Move struct megasas_sge from mfi_ioctl.h to mfivar.h so we can remove including machine/bus.h. Add some more mfi_ prefixes to avoid name space pollution. This should address the last tinderbox issues. Modified: head/sys/dev/mfi/mfi_ioctl.h head/sys/dev/mfi/mfi_tbolt.c head/sys/dev/mfi/mfivar.h Modified: head/sys/dev/mfi/mfi_ioctl.h ============================================================================== --- head/sys/dev/mfi/mfi_ioctl.h Mon Apr 2 19:06:28 2012 (r233804) +++ head/sys/dev/mfi/mfi_ioctl.h Mon Apr 2 19:13:02 2012 (r233805) @@ -28,19 +28,12 @@ __FBSDID("$FreeBSD$"); #include -#include struct iovec32 { u_int32_t iov_base; int iov_len; }; -struct megasas_sge -{ - bus_addr_t phys_addr; - uint32_t length; -}; - #define MFIQ_FREE 0 #define MFIQ_BIO 1 #define MFIQ_READY 2 Modified: head/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- head/sys/dev/mfi/mfi_tbolt.c Mon Apr 2 19:06:28 2012 (r233804) +++ head/sys/dev/mfi/mfi_tbolt.c Mon Apr 2 19:13:02 2012 (r233805) @@ -520,7 +520,7 @@ int mfi_tbolt_reset(struct mfi_softc *sc uint32_t fw_state; mtx_lock(&sc->mfi_io_lock); - if (atomic_read(&sc->fw_reset_no_pci_access)) { + if (mfi_atomic_read(&sc->fw_reset_no_pci_access)) { device_printf(sc->mfi_dev, "NO PCI ACCESS\n"); mtx_unlock(&sc->mfi_io_lock); return 1; Modified: head/sys/dev/mfi/mfivar.h ============================================================================== --- head/sys/dev/mfi/mfivar.h Mon Apr 2 19:06:28 2012 (r233804) +++ head/sys/dev/mfi/mfivar.h Mon Apr 2 19:13:02 2012 (r233805) @@ -155,13 +155,19 @@ struct mfi_skinny_dma_info { int noofmaps; }; +struct megasas_sge +{ + bus_addr_t phys_addr; + uint32_t length; +}; + struct mfi_cmd_tbolt; struct mfi_atomic { volatile unsigned int val; }; -#define atomic_read(v) ((v)->val) -#define atomic_set(v,i) ((v)->val - (i)) +#define mfi_atomic_read(v) ((v)->val) +#define mfi_atomic_set(v,i) ((v)->val - (i)) struct mfi_softc { device_t mfi_dev; @@ -582,7 +588,7 @@ SYSCTL_DECL(_hw_mfi); #define MFI_CMD_TIMEOUT 30 #define MFI_SYS_PD_IO 0 #define MFI_LD_IO 1 -#define SKINNY_MEMORY 0x02000000 +#define MFI_SKINNY_MEMORY 0x02000000 #define MFI_MAXPHYS (128 * 1024) #ifdef MFI_DEBUG From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 19:34:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48F9E1065674; Mon, 2 Apr 2012 19:34:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34E098FC15; Mon, 2 Apr 2012 19:34:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32JYvpv013590; Mon, 2 Apr 2012 19:34:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32JYuFE013588; Mon, 2 Apr 2012 19:34:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204021934.q32JYuFE013588@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 2 Apr 2012 19:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233808 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 19:34:57 -0000 Author: kib Date: Mon Apr 2 19:34:56 2012 New Revision: 233808 URL: http://svn.freebsd.org/changeset/base/233808 Log: Add helper function to remove the process from the orphans list and use it instead of inlined code. Tested by: pho MFC after: 3 days Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Mon Apr 2 19:17:01 2012 (r233807) +++ head/sys/kern/kern_exit.c Mon Apr 2 19:34:56 2012 (r233808) @@ -100,6 +100,18 @@ SDT_PROBE_ARGTYPE(proc, kernel, , exit, /* Hook for NFS teardown procedure. */ void (*nlminfo_release_p)(struct proc *p); +static void +clear_orphan(struct proc *p) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + + if (p->p_flag & P_ORPHAN) { + LIST_REMOVE(p, p_orphan); + p->p_flag &= ~P_ORPHAN; + } +} + /* * exit -- death of process. */ @@ -739,10 +751,7 @@ proc_reap(struct thread *td, struct proc sx_xunlock(&allproc_lock); LIST_REMOVE(p, p_sibling); PROC_LOCK(p); - if (p->p_flag & P_ORPHAN) { - LIST_REMOVE(p, p_orphan); - p->p_flag &= ~P_ORPHAN; - } + clear_orphan(p); PROC_UNLOCK(p); leavepgrp(p); #ifdef PROCDESC @@ -987,10 +996,7 @@ proc_reparent(struct proc *child, struct LIST_REMOVE(child, p_sibling); LIST_INSERT_HEAD(&parent->p_children, child, p_sibling); - if (child->p_flag & P_ORPHAN) { - LIST_REMOVE(child, p_orphan); - child->p_flag &= ~P_ORPHAN; - } + clear_orphan(child); if (child->p_flag & P_TRACED) { LIST_INSERT_HEAD(&child->p_pptr->p_orphans, child, p_orphan); child->p_flag |= P_ORPHAN; From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 19:35:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14F7F1065672; Mon, 2 Apr 2012 19:35:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00B188FC17; Mon, 2 Apr 2012 19:35:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32JZah1013650; Mon, 2 Apr 2012 19:35:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32JZaPI013648; Mon, 2 Apr 2012 19:35:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204021935.q32JZaPI013648@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 2 Apr 2012 19:35:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233809 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 19:35:37 -0000 Author: kib Date: Mon Apr 2 19:35:36 2012 New Revision: 233809 URL: http://svn.freebsd.org/changeset/base/233809 Log: When process exists, not only the children shall be reparented to init, but also the orphans shall be removed from the orphan list, because the list header is destroyed. Reported and tested by: pho MFC after: 3 days Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Mon Apr 2 19:34:56 2012 (r233808) +++ head/sys/kern/kern_exit.c Mon Apr 2 19:35:36 2012 (r233809) @@ -430,6 +430,13 @@ exit1(struct thread *td, int rv) if (q->p_flag & P_TRACED) { struct thread *temp; + /* + * Since q was found on our children list, the + * proc_reparent() call moved q to the orphan + * list due to present P_TRACED flag. Clear + * orphan link for q now while q is locked. + */ + clear_orphan(q); q->p_flag &= ~(P_TRACED | P_STOPPED_TRACE); FOREACH_THREAD_IN_PROC(q, temp) temp->td_dbgflags &= ~TDB_SUSPEND; @@ -438,6 +445,15 @@ exit1(struct thread *td, int rv) PROC_UNLOCK(q); } + /* + * Also get rid of our orphans. + */ + while ((q = LIST_FIRST(&p->p_orphans)) != NULL) { + PROC_LOCK(q); + clear_orphan(q); + PROC_UNLOCK(q); + } + /* Save exit status. */ PROC_LOCK(p); p->p_xthread = td; From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 21:49:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FCFA106566B; Mon, 2 Apr 2012 21:49:45 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 1BFCD8FC08; Mon, 2 Apr 2012 21:49:44 +0000 (UTC) Received: from sa-nc-ipg-172-23-0-161.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q32LncjA067379 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 2 Apr 2012 14:49:44 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <20120329181125.GB2358@deviant.kiev.zoral.com.ua> Date: Mon, 2 Apr 2012 14:49:31 -0700 Content-Transfer-Encoding: 7bit Message-Id: <8F9D3269-F501-4F91-B9D8-334DE25E5314@xcllnt.net> References: <201203291750.q2THo1Pu003875@svn.freebsd.org> <20120329181125.GB2358@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ia64@freebsd.org Subject: Re: svn commit: r233674 - head/libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 21:49:45 -0000 On Mar 29, 2012, at 11:11 AM, Konstantin Belousov wrote: > While this band-aid fixes the build, the change is obviously bad. > The reason to have this #ifdef is that ia64 is the only architecture > that declares __tls_get_addr() as > > void *__tls_get_addr(unsigned long module, unsigned long offset); It should actually be: void *__tls_get_addr(size_t module, size_t offset) But size_t equals unsigned long, so the effect is the same. The prototype if __tls_get_addr() is defined in the PSABI document for Itanium. Intel document 245370-003. FYI, -- Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 21:58:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A456106566B; Mon, 2 Apr 2012 21:58:38 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64C818FC15; Mon, 2 Apr 2012 21:58:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32LwcNS018465; Mon, 2 Apr 2012 21:58:38 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32LwcZx018462; Mon, 2 Apr 2012 21:58:38 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201204022158.q32LwcZx018462@svn.freebsd.org> From: Kirk McKusick Date: Mon, 2 Apr 2012 21:58:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233817 - in head/sys/ufs: ffs ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 21:58:38 -0000 Author: mckusick Date: Mon Apr 2 21:58:37 2012 New Revision: 233817 URL: http://svn.freebsd.org/changeset/base/233817 Log: A file cannot be deallocated until its last name has been removed and it is no longer referenced by a user process. The inode for a file whose name has been removed, but is still referenced at the time of a crash will still be allocated in the filesystem, but will have no references (e.g., they will have no names referencing them from any directory). With traditional soft updates these unreferenced inodes will be found and reclaimed when the background fsck is run. When using journaled soft updates, the kernel must keep track of these inodes so that it can find and reclaim them during the cleanup process. Their existence cannot be stored in the journal as the journal only handles short-term events, and they may persist for days. So, they are tracked by keeping them in a linked list whose head pointer is stored in the superblock. The journal tracks them only until their linked list pointers have been commited to disk. Part of the cleanup process involves traversing the list of unreferenced inodes and reclaiming them. This bug was triggered when confusion arose in the commit steps of keeping the unreferenced-inode linked list coherent on disk. Notably, a race between the link() system call adding a link-count to a file and the unlink() system call removing a link-count to the file. Here if the unlink() ran after link() had looked up the file but before link() had incremented the link-count of the file, the file's link-count would drop to zero before the link() incremented it back up to one. If the file was referenced by a user process, the first transition through zero made it appear that it should be added to the unreferenced-inode list when in fact it should not have been added. If the new name created by link() was deleted within a few seconds (with the file still referenced by a user process) it would legitimately be a candidate for addition to the unreferenced-inode list. The result was that there were two attempts to add the same inode to the unreferenced-inode list which scrambled the unreferenced-inode list's pointers leading to a panic. The fix is to detect and avoid the false attempt at adding it to the unreferenced-inode list by having the link() system call check to see if the link count is zero before it increments it. If it is, the link() fails with ENOENT (showing that it has failed the link()/unlink() race). While tracking down this bug, we have added additional assertions to detect the problem sooner and also simplified some of the code. Reported by: Kirk Russell Fix submitted by: Jeff Roberson Tested by: Peter Holm PR: kern/159971 MFC (to 9 only): 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Apr 2 20:36:35 2012 (r233816) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Apr 2 21:58:37 2012 (r233817) @@ -4323,6 +4323,7 @@ inodedep_lookup_ip(ip) (void) inodedep_lookup(UFSTOVFS(ip->i_ump), ip->i_number, dflags, &inodedep); inodedep->id_nlinkdelta = ip->i_nlink - ip->i_effnlink; + KASSERT((inodedep->id_state & UNLINKED) == 0, ("inode unlinked")); return (inodedep); } @@ -8455,6 +8456,7 @@ softdep_setup_remove(bp, dp, ip, isrmdir if (inodedep_lookup(UFSTOVFS(ip->i_ump), ip->i_number, 0, &inodedep) == 0) panic("softdep_setup_remove: Lost inodedep."); + KASSERT((inodedep->id_state & UNLINKED) == 0, ("inode unlinked")); dirrem->dm_state |= ONDEPLIST; LIST_INSERT_HEAD(&inodedep->id_dirremhd, dirrem, dm_inonext); @@ -8987,6 +8989,7 @@ first_unlinked_inodedep(ump) struct inodedep *inodedep; struct inodedep *idp; + mtx_assert(&lk, MA_OWNED); for (inodedep = TAILQ_LAST(&ump->softdep_unlinked, inodedeplst); inodedep; inodedep = idp) { if ((inodedep->id_state & UNLINKNEXT) == 0) @@ -8995,11 +8998,8 @@ first_unlinked_inodedep(ump) if (idp == NULL || (idp->id_state & UNLINKNEXT) == 0) break; if ((inodedep->id_state & UNLINKPREV) == 0) - panic("first_unlinked_inodedep: prev != next"); + break; } - if (inodedep == NULL) - return (NULL); - return (inodedep); } @@ -9038,8 +9038,12 @@ handle_written_sbdep(sbdep, bp) struct mount *mp; struct fs *fs; + mtx_assert(&lk, MA_OWNED); fs = sbdep->sb_fs; mp = UFSTOVFS(sbdep->sb_ump); + /* + * If the superblock doesn't match the in-memory list start over. + */ inodedep = first_unlinked_inodedep(sbdep->sb_ump); if ((inodedep && fs->fs_sujfree != inodedep->id_ino) || (inodedep == NULL && fs->fs_sujfree != 0)) { @@ -9049,8 +9053,6 @@ handle_written_sbdep(sbdep, bp) WORKITEM_FREE(sbdep, D_SBDEP); if (fs->fs_sujfree == 0) return (0); - if (inodedep_lookup(mp, fs->fs_sujfree, 0, &inodedep) == 0) - panic("handle_written_sbdep: lost inodedep"); /* * Now that we have a record of this inode in stable store allow it * to be written to free up pending work. Inodes may see a lot of @@ -9078,10 +9080,13 @@ unlinked_inodedep(mp, inodedep) { struct ufsmount *ump; + mtx_assert(&lk, MA_OWNED); if (MOUNTEDSUJ(mp) == 0) return; ump = VFSTOUFS(mp); ump->um_fs->fs_fmod = 1; + if (inodedep->id_state & UNLINKED) + panic("unlinked_inodedep: %p already unlinked\n", inodedep); inodedep->id_state |= UNLINKED; TAILQ_INSERT_HEAD(&ump->softdep_unlinked, inodedep, id_unlinked); } @@ -9109,6 +9114,10 @@ clear_unlinked_inodedep(inodedep) ino = inodedep->id_ino; error = 0; for (;;) { + mtx_assert(&lk, MA_OWNED); + KASSERT((inodedep->id_state & UNLINKED) != 0, + ("clear_unlinked_inodedep: inodedep %p not unlinked", + inodedep)); /* * If nothing has yet been written simply remove us from * the in memory list and return. This is the most common @@ -9166,36 +9175,19 @@ clear_unlinked_inodedep(inodedep) ACQUIRE_LOCK(&lk); continue; } + nino = 0; + idn = TAILQ_NEXT(inodedep, id_unlinked); + if (idn) + nino = idn->id_ino; /* * Remove us from the in memory list. After this we cannot * access the inodedep. */ - idn = TAILQ_NEXT(inodedep, id_unlinked); - inodedep->id_state &= ~(UNLINKED | UNLINKLINKS); + KASSERT((inodedep->id_state & UNLINKED) != 0, + ("clear_unlinked_inodedep: inodedep %p not unlinked", + inodedep)); + inodedep->id_state &= ~(UNLINKED | UNLINKLINKS | UNLINKONLIST); TAILQ_REMOVE(&ump->softdep_unlinked, inodedep, id_unlinked); - /* - * Determine the next inode number. - */ - nino = 0; - if (idn) { - /* - * If next isn't on the list we can just clear prev's - * state and schedule it to be fixed later. No need - * to synchronously write if we're not in the real - * list. - */ - if ((idn->id_state & UNLINKPREV) == 0 && pino != 0) { - idp->id_state &= ~UNLINKNEXT; - if ((idp->id_state & ONWORKLIST) == 0) - WORKLIST_INSERT(&bp->b_dep, - &idp->id_list); - FREE_LOCK(&lk); - bawrite(bp); - ACQUIRE_LOCK(&lk); - return; - } - nino = idn->id_ino; - } FREE_LOCK(&lk); /* * The predecessor's next pointer is manually updated here @@ -9234,13 +9226,14 @@ clear_unlinked_inodedep(inodedep) bwrite(bp); ACQUIRE_LOCK(&lk); } + if (fs->fs_sujfree != ino) return; panic("clear_unlinked_inodedep: Failed to clear free head"); } if (inodedep->id_ino == fs->fs_sujfree) panic("clear_unlinked_inodedep: Freeing head of free list"); - inodedep->id_state &= ~(UNLINKED | UNLINKLINKS); + inodedep->id_state &= ~(UNLINKED | UNLINKLINKS | UNLINKONLIST); TAILQ_REMOVE(&ump->softdep_unlinked, inodedep, id_unlinked); return; } @@ -9839,18 +9832,6 @@ initiate_write_inodeblock_ufs2(inodedep, inon = TAILQ_NEXT(inodedep, id_unlinked); dp->di_freelink = inon ? inon->id_ino : 0; } - if ((inodedep->id_state & (UNLINKED | UNLINKNEXT)) == - (UNLINKED | UNLINKNEXT)) { - struct inodedep *inon; - ino_t freelink; - - inon = TAILQ_NEXT(inodedep, id_unlinked); - freelink = inon ? inon->id_ino : 0; - if (freelink != dp->di_freelink) - panic("ino %p(0x%X) %d, %d != %d", - inodedep, inodedep->id_state, inodedep->id_ino, - freelink, dp->di_freelink); - } /* * If the bitmap is not yet written, then the allocated * inode cannot be written to disk. @@ -10849,10 +10830,9 @@ handle_written_inodeblock(inodedep, bp) freelink = dp2->di_freelink; } /* - * If we wrote a valid freelink pointer during the last write - * record it here. + * Leave this inodeblock dirty until it's in the list. */ - if ((inodedep->id_state & (UNLINKED | UNLINKNEXT)) == UNLINKED) { + if ((inodedep->id_state & (UNLINKED | UNLINKONLIST)) == UNLINKED) { struct inodedep *inon; inon = TAILQ_NEXT(inodedep, id_unlinked); @@ -10861,12 +10841,9 @@ handle_written_inodeblock(inodedep, bp) if (inon) inon->id_state |= UNLINKPREV; inodedep->id_state |= UNLINKNEXT; - } else - hadchanges = 1; - } - /* Leave this inodeblock dirty until it's in the list. */ - if ((inodedep->id_state & (UNLINKED | UNLINKONLIST)) == UNLINKED) + } hadchanges = 1; + } /* * If we had to rollback the inode allocation because of * bitmaps being incomplete, then simply restore it. Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Mon Apr 2 20:36:35 2012 (r233816) +++ head/sys/ufs/ufs/ufs_vnops.c Mon Apr 2 21:58:37 2012 (r233817) @@ -1006,6 +1006,14 @@ ufs_link(ap) error = EMLINK; goto out; } + /* + * The file may have been removed after namei droped the original + * lock. + */ + if (ip->i_effnlink == 0) { + error = ENOENT; + goto out; + } if (ip->i_flags & (IMMUTABLE | APPEND)) { error = EPERM; goto out; From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 23:27:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0243D106566C; Mon, 2 Apr 2012 23:27:09 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6EE1A8FC0A; Mon, 2 Apr 2012 23:27:08 +0000 (UTC) Received: by vbmv11 with SMTP id v11so2930466vbm.13 for ; Mon, 02 Apr 2012 16:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=P1VhcDB8hPpVx9N/gze6j9nrNW8Ks//K0ZmWvdnV31c=; b=jEMvGxsM15ftl3WJ1tuCiMOP1I2tWZxI3V7iSc3cVJbVaFbJwskWQllQGPADy2tSsW nY0nFXGXEE34XW3jW2kFKQqja7pULhD8Y3HRFVDj5XRxJtG3F+aKaDHCIfzjgLGJ6GON mdfvRvcWlPB26STEHGDSlqeifZiHBZokSrUlp3qDddidQ+vw70cvyK8hrXjrZPO4NZxW CIz01FqUH/X8N1TVLWOZRq5Nb5UwEOsqt2bGMntpl79KOUSBrKnH0GIiYAe/Q3hw7Ss/ DIp1f5ZujIU+dfjGhpwl7HnxUKGB3CJDNz2nD9J/GNQwUItd6YOxzsurZhtjNWcG2+YH n1uw== MIME-Version: 1.0 Received: by 10.52.178.98 with SMTP id cx2mr4014800vdc.112.1333409227374; Mon, 02 Apr 2012 16:27:07 -0700 (PDT) Received: by 10.220.230.135 with HTTP; Mon, 2 Apr 2012 16:27:07 -0700 (PDT) In-Reply-To: <201204021913.q32JD2Fm012737@svn.freebsd.org> References: <201204021913.q32JD2Fm012737@svn.freebsd.org> Date: Mon, 2 Apr 2012 16:27:07 -0700 Message-ID: From: Garrett Cooper To: Doug Ambrisko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233805 - head/sys/dev/mfi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Apr 2012 23:27:09 -0000 On Mon, Apr 2, 2012 at 12:13 PM, Doug Ambrisko wrote= : > Author: ambrisko > Date: Mon Apr =A02 19:13:02 2012 > New Revision: 233805 > URL: http://svn.freebsd.org/changeset/base/233805 > > Log: > =A0Move struct megasas_sge from mfi_ioctl.h to mfivar.h so we can > =A0remove including machine/bus.h. =A0Add some more mfi_ prefixes to > =A0avoid name space pollution. > > =A0This should address the last tinderbox issues. Yup -- it fixed pc98. Thanks Doug! From owner-svn-src-head@FreeBSD.ORG Tue Apr 3 08:28:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F386A106566C; Tue, 3 Apr 2012 08:28:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF1158FC15; Tue, 3 Apr 2012 08:28:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q338Sh5M039580; Tue, 3 Apr 2012 08:28:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q338Sh4L039578; Tue, 3 Apr 2012 08:28:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204030828.q338Sh4L039578@svn.freebsd.org> From: Marius Strobl Date: Tue, 3 Apr 2012 08:28:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233827 - head/sys/dev/mpt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 03 Apr 2012 08:28:44 -0000 Author: marius Date: Tue Apr 3 08:28:43 2012 New Revision: 233827 URL: http://svn.freebsd.org/changeset/base/233827 Log: Fix probing of SAS1068E with a device ID of 0x0059 after r232411. Reported by: infofarmer MFC after: 3 days Modified: head/sys/dev/mpt/mpt_pci.c Modified: head/sys/dev/mpt/mpt_pci.c ============================================================================== --- head/sys/dev/mpt/mpt_pci.c Tue Apr 3 08:24:32 2012 (r233826) +++ head/sys/dev/mpt/mpt_pci.c Tue Apr 3 08:28:43 2012 (r233827) @@ -141,6 +141,10 @@ __FBSDID("$FreeBSD$"); #define MPI_MANUFACTPAGE_DEVID_SAS1068A_FB 0x0055 #endif +#ifndef MPI_MANUFACTPAGE_DEVID_SAS1068E_FB +#define MPI_MANUFACTPAGE_DEVID_SAS1068E_FB 0x0059 +#endif + #ifndef MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB #define MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB 0x007C #endif @@ -236,6 +240,7 @@ mpt_pci_probe(device_t dev) case MPI_MANUFACTPAGE_DEVID_SAS1068: case MPI_MANUFACTPAGE_DEVID_SAS1068A_FB: case MPI_MANUFACTPAGE_DEVID_SAS1068E: + case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB: case MPI_MANUFACTPAGE_DEVID_SAS1078: case MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB: desc = "LSILogic SAS/SATA Adapter"; @@ -419,6 +424,7 @@ mpt_pci_attach(device_t dev) case MPI_MANUFACTPAGE_DEVID_SAS1068: case MPI_MANUFACTPAGE_DEVID_SAS1068A_FB: case MPI_MANUFACTPAGE_DEVID_SAS1068E: + case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB: mpt->is_sas = 1; break; default: From owner-svn-src-head@FreeBSD.ORG Tue Apr 3 17:48:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 411FC106564A; Tue, 3 Apr 2012 17:48:43 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C74D8FC08; Tue, 3 Apr 2012 17:48:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q33Hmhgd061420; Tue, 3 Apr 2012 17:48:43 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33HmgK9061418; Tue, 3 Apr 2012 17:48:42 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204031748.q33HmgK9061418@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 3 Apr 2012 17:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233845 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 03 Apr 2012 17:48:43 -0000 Author: bschmidt Date: Tue Apr 3 17:48:42 2012 New Revision: 233845 URL: http://svn.freebsd.org/changeset/base/233845 Log: Add basic HT channel setup to ieee80211_init_channels(), this will be used by at least ral(4). Reviewed by: ray Modified: head/sys/net80211/ieee80211_regdomain.c Modified: head/sys/net80211/ieee80211_regdomain.c ============================================================================== --- head/sys/net80211/ieee80211_regdomain.c Tue Apr 3 17:10:19 2012 (r233844) +++ head/sys/net80211/ieee80211_regdomain.c Tue Apr 3 17:48:42 2012 (r233845) @@ -105,7 +105,12 @@ addchan(struct ieee80211com *ic, int iee c->ic_freq = ieee80211_ieee2mhz(ieee, flags); c->ic_ieee = ieee; c->ic_flags = flags; - c->ic_extieee = 0; + if (flags & IEEE80211_CHAN_HT40U) + c->ic_extieee = ieee + 4; + else if (flags & IEEE80211_CHAN_HT40D) + c->ic_extieee = ieee - 4; + else + c->ic_extieee = 0; } /* @@ -123,7 +128,8 @@ ieee80211_init_channels(struct ieee80211 /* XXX just do something for now */ ic->ic_nchans = 0; if (isset(bands, IEEE80211_MODE_11B) || - isset(bands, IEEE80211_MODE_11G)) { + isset(bands, IEEE80211_MODE_11G) || + isset(bands, IEEE80211_MODE_11NG)) { int maxchan = 11; if (rd != NULL && rd->ecm) maxchan = 14; @@ -132,15 +138,67 @@ ieee80211_init_channels(struct ieee80211 addchan(ic, i, IEEE80211_CHAN_B); if (isset(bands, IEEE80211_MODE_11G)) addchan(ic, i, IEEE80211_CHAN_G); + if (isset(bands, IEEE80211_MODE_11NG)) { + addchan(ic, i, + IEEE80211_CHAN_G | IEEE80211_CHAN_HT20); + } + if ((ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) == 0) + continue; + if (i <= 7) { + addchan(ic, i, + IEEE80211_CHAN_G | IEEE80211_CHAN_HT40U); + addchan(ic, i + 4, + IEEE80211_CHAN_G | IEEE80211_CHAN_HT40D); + } } } - if (isset(bands, IEEE80211_MODE_11A)) { - for (i = 36; i <= 64; i += 4) + if (isset(bands, IEEE80211_MODE_11A) || + isset(bands, IEEE80211_MODE_11NA)) { + for (i = 36; i <= 64; i += 4) { addchan(ic, i, IEEE80211_CHAN_A); - for (i = 100; i <= 140; i += 4) + if (isset(bands, IEEE80211_MODE_11NA)) { + addchan(ic, i, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT20); + } + if ((ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) == 0) + continue; + if ((i % 8) == 4) { + addchan(ic, i, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U); + addchan(ic, i + 4, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D); + } + } + for (i = 100; i <= 140; i += 4) { addchan(ic, i, IEEE80211_CHAN_A); - for (i = 149; i <= 161; i += 4) + if (isset(bands, IEEE80211_MODE_11NA)) { + addchan(ic, i, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT20); + } + if ((ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) == 0) + continue; + if ((i % 8) == 4 && i != 140) { + addchan(ic, i, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U); + addchan(ic, i + 4, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D); + } + } + for (i = 149; i <= 161; i += 4) { addchan(ic, i, IEEE80211_CHAN_A); + if (isset(bands, IEEE80211_MODE_11NA)) { + addchan(ic, i, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT20); + } + if ((ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) == 0) + continue; + if ((i % 8) == 5) { + addchan(ic, i, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U); + addchan(ic, i + 4, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D); + } + } } if (rd != NULL) ic->ic_regdomain = *rd; From owner-svn-src-head@FreeBSD.ORG Tue Apr 3 18:09:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9F621065674; Tue, 3 Apr 2012 18:09:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B6EB8FC1D; Tue, 3 Apr 2012 18:09:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q33I9LjN062168; Tue, 3 Apr 2012 18:09:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33I9LLn062165; Tue, 3 Apr 2012 18:09:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201204031809.q33I9LLn062165@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 3 Apr 2012 18:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233846 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 03 Apr 2012 18:09:21 -0000 Author: glebius Date: Tue Apr 3 18:09:20 2012 New Revision: 233846 URL: http://svn.freebsd.org/changeset/base/233846 Log: Since pf 4.5 import pf(4) has a mechanism to defer forwarding a packet, that creates state, until pfsync(4) peer acks state addition (or 10 msec timeout passes). This is needed for active-active CARP configurations, which are poorly supported in FreeBSD and arguably a good idea at all. Unfortunately by the time of import this feature in OpenBSD was turned on, and did not have a switch to turn it off. This leaked to FreeBSD. This change make it possible to turn this feature off via ioctl() and turns it off by default. Obtained from: OpenBSD Modified: head/sys/contrib/pf/net/if_pfsync.c head/sys/contrib/pf/net/if_pfsync.h Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Tue Apr 3 17:48:42 2012 (r233845) +++ head/sys/contrib/pf/net/if_pfsync.c Tue Apr 3 18:09:20 2012 (r233846) @@ -50,6 +50,7 @@ * 1.128 - cleanups * 1.146 - bzero() mbuf before sparsely filling it with data * 1.170 - SIOCSIFMTU checks + * 1.126, 1.142 - deferred packets processing */ #ifdef __FreeBSD__ @@ -262,6 +263,7 @@ struct pfsync_softc { struct pfsync_upd_reqs sc_upd_req_list; + int sc_defer; struct pfsync_deferrals sc_deferrals; u_int sc_deferred; @@ -1805,6 +1807,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cm } pfsyncr.pfsyncr_syncpeer = sc->sc_sync_peer; pfsyncr.pfsyncr_maxupdates = sc->sc_maxupdates; + pfsyncr.pfsyncr_defer = sc->sc_defer; return (copyout(&pfsyncr, ifr->ifr_data, sizeof(pfsyncr))); case SIOCSETPFSYNC: @@ -1840,6 +1843,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cm } #endif sc->sc_maxupdates = pfsyncr.pfsyncr_maxupdates; + sc->sc_defer = pfsyncr.pfsyncr_defer; if (pfsyncr.pfsyncr_syncdev[0] == 0) { sc->sc_sync_if = NULL; @@ -2378,10 +2382,7 @@ pfsync_insert_state(struct pf_state *st) pfsync_q_ins(st, PFSYNC_S_INS); - if (ISSET(st->state_flags, PFSTATE_ACK)) - schednetisr(NETISR_PFSYNC); - else - st->sync_updates = 0; + st->sync_updates = 0; } int defer = 10; @@ -2402,6 +2403,9 @@ pfsync_defer(struct pf_state *st, struct splassert(IPL_SOFTNET); #endif + if (!sc->sc_defer || m->m_flags & (M_BCAST|M_MCAST)) + return (0); + if (sc->sc_deferred >= 128) pfsync_undefer(TAILQ_FIRST(&sc->sc_deferrals), 0); @@ -2430,6 +2434,8 @@ pfsync_defer(struct pf_state *st, struct timeout_add(&pd->pd_tmo, defer); #endif + swi_sched(V_pfsync_swi_cookie, 0); + return (1); } Modified: head/sys/contrib/pf/net/if_pfsync.h ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.h Tue Apr 3 17:48:42 2012 (r233845) +++ head/sys/contrib/pf/net/if_pfsync.h Tue Apr 3 18:09:20 2012 (r233846) @@ -265,7 +265,7 @@ struct pfsyncreq { char pfsyncr_syncdev[IFNAMSIZ]; struct in_addr pfsyncr_syncpeer; int pfsyncr_maxupdates; - int pfsyncr_authlevel; + int pfsyncr_defer; }; #ifdef __FreeBSD__ From owner-svn-src-head@FreeBSD.ORG Tue Apr 3 18:10:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3AD91065670; Tue, 3 Apr 2012 18:10:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B56888FC20; Tue, 3 Apr 2012 18:10:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q33IAmCj062263; Tue, 3 Apr 2012 18:10:48 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33IAmWh062261; Tue, 3 Apr 2012 18:10:48 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201204031810.q33IAmWh062261@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 3 Apr 2012 18:10:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233847 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 03 Apr 2012 18:10:49 -0000 Author: glebius Date: Tue Apr 3 18:10:48 2012 New Revision: 233847 URL: http://svn.freebsd.org/changeset/base/233847 Log: Make it possible to switch pfsync(4) deferral mechanism on/off. Obtained from: OpenBSD Modified: head/sbin/ifconfig/ifpfsync.c Modified: head/sbin/ifconfig/ifpfsync.c ============================================================================== --- head/sbin/ifconfig/ifpfsync.c Tue Apr 3 18:09:20 2012 (r233846) +++ head/sbin/ifconfig/ifpfsync.c Tue Apr 3 18:10:48 2012 (r233847) @@ -52,6 +52,7 @@ void setpfsync_syncpeer(const char *, in void unsetpfsync_syncpeer(const char *, int, int, const struct afswtch *); void setpfsync_syncpeer(const char *, int, int, const struct afswtch *); void setpfsync_maxupd(const char *, int, int, const struct afswtch *); +void setpfsync_defer(const char *, int, int, const struct afswtch *); void pfsync_status(int); void @@ -162,6 +163,23 @@ setpfsync_maxupd(const char *val, int d, err(1, "SIOCSETPFSYNC"); } +/* ARGSUSED */ +void +setpfsync_defer(const char *val, int d, int s, const struct afswtch *rafp) +{ + struct pfsyncreq preq; + + memset((char *)&preq, 0, sizeof(struct pfsyncreq)); + ifr.ifr_data = (caddr_t)&preq; + + if (ioctl(s, SIOCGETPFSYNC, (caddr_t)&ifr) == -1) + err(1, "SIOCGETPFSYNC"); + + preq.pfsyncr_defer = d; + if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1) + err(1, "SIOCSETPFSYNC"); +} + void pfsync_status(int s) { @@ -183,8 +201,10 @@ pfsync_status(int s) printf("syncpeer: %s ", inet_ntoa(preq.pfsyncr_syncpeer)); if (preq.pfsyncr_syncdev[0] != '\0' || - preq.pfsyncr_syncpeer.s_addr != INADDR_PFSYNC_GROUP) - printf("maxupd: %d\n", preq.pfsyncr_maxupdates); + preq.pfsyncr_syncpeer.s_addr != INADDR_PFSYNC_GROUP) { + printf("maxupd: %d ", preq.pfsyncr_maxupdates); + printf("defer: %s\n", preq.pfsyncr_defer ? "on" : "off"); + } } static struct cmd pfsync_cmds[] = { @@ -194,7 +214,9 @@ static struct cmd pfsync_cmds[] = { DEF_CMD("-syncif", 1, unsetpfsync_syncdev), DEF_CMD_ARG("syncpeer", setpfsync_syncpeer), DEF_CMD("-syncpeer", 1, unsetpfsync_syncpeer), - DEF_CMD_ARG("maxupd", setpfsync_maxupd) + DEF_CMD_ARG("maxupd", setpfsync_maxupd), + DEF_CMD("defer", 1, setpfsync_defer), + DEF_CMD("-defer", 0, setpfsync_defer), }; static struct afswtch af_pfsync = { .af_name = "af_pfsync", From owner-svn-src-head@FreeBSD.ORG Tue Apr 3 18:11:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 047391065670; Tue, 3 Apr 2012 18:11:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3E458FC14; Tue, 3 Apr 2012 18:11:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q33IBUj2062338; Tue, 3 Apr 2012 18:11:30 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33IBUbj062335; Tue, 3 Apr 2012 18:11:30 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201204031811.q33IBUbj062335@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 3 Apr 2012 18:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233848 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 03 Apr 2012 18:11:31 -0000 Author: glebius Date: Tue Apr 3 18:11:30 2012 New Revision: 233848 URL: http://svn.freebsd.org/changeset/base/233848 Log: Document syncdev, syncpeer and defer keywords for pfsync(4) interfaces. Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Tue Apr 3 18:10:48 2012 (r233847) +++ head/sbin/ifconfig/ifconfig.8 Tue Apr 3 18:11:30 2012 (r233848) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd March 7, 2012 +.Dd April 3, 2012 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2380,10 +2380,28 @@ The following parameters are specific to .Xr pfsync 4 interfaces: .Bl -tag -width indent +.It Cm syncdev Ar iface +Use the specified interface +to send and receive pfsync state synchronisation messages. +.It Fl syncdev +Stop sending pfsync state synchronisation messages over the network. +.It Cm syncpeer Ar peer_address +Make the pfsync link point-to-point rather than using +multicast to broadcast the state synchronisation messages. +The peer_address is the IP address of the other host taking part in +the pfsync cluster. +.It Fl syncpeer +Broadcast the packets using multicast. .It Cm maxupd Ar n Set the maximum number of updates for a single state which can be collapsed into one. This is an 8-bit number; the default value is 128. +.It Cm defer +Defer transmission of the first packet in a state until a peer has +acknowledged that the associated state has been inserted. +.It Fl defer +Do not defer the first packet in a state. +This is the default. .El .Pp The following parameters are specific to From owner-svn-src-head@FreeBSD.ORG Tue Apr 3 18:12:47 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B8D2106564A; Tue, 3 Apr 2012 18:12:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id B1AAD8FC0A; Tue, 3 Apr 2012 18:12:46 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q33ICjh8085552; Tue, 3 Apr 2012 22:12:45 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q33ICjTJ085551; Tue, 3 Apr 2012 22:12:45 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 3 Apr 2012 22:12:45 +0400 From: Gleb Smirnoff To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Message-ID: <20120403181245.GF13561@FreeBSD.org> References: <201204031809.q33I9LLn062165@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201204031809.q33I9LLn062165@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: svn commit: r233846 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 03 Apr 2012 18:12:47 -0000 On Tue, Apr 03, 2012 at 06:09:21PM +0000, Gleb Smirnoff wrote: T> Author: glebius T> Date: Tue Apr 3 18:09:20 2012 T> New Revision: 233846 T> URL: http://svn.freebsd.org/changeset/base/233846 T> T> Log: T> Since pf 4.5 import pf(4) has a mechanism to defer T> forwarding a packet, that creates state, until T> pfsync(4) peer acks state addition (or 10 msec T> timeout passes). T> T> This is needed for active-active CARP configurations, T> which are poorly supported in FreeBSD and arguably T> a good idea at all. T> T> Unfortunately by the time of import this feature in T> OpenBSD was turned on, and did not have a switch to T> turn it off. This leaked to FreeBSD. T> T> This change make it possible to turn this feature T> off via ioctl() and turns it off by default. Fortunately, we got an unused field in struct pfsyncreq, so this commit doesn't break ioctl() ABI, and this is mergeable. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Apr 3 18:30:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D70D1065673; Tue, 3 Apr 2012 18:30:42 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1A5F08FC17; Tue, 3 Apr 2012 18:30:42 +0000 (UTC) Received: by iahk25 with SMTP id k25so1950iah.13 for ; Tue, 03 Apr 2012 11:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Ebo5V4mle3YduOGyb7uyKVyuPh4ae4PFEGNfyF5q/VU=; b=XUPazGWQu2uaWKgvwgbJGn7LJQXhEuRiwnaWQjE8ssVmxyxkrhXoMKUdUhF7yfVTnV doMV8WTyBF//wOWLOG8o3NShTEnBcgsvhjIU+Eom4TGPY7ScBdayZWHIyr3ZFQ5tPnjs irhFJKsNrF7QMeldBGDu4RukQF+qu8kj0wdyWwaJ7WHfqZckTSPgieBAAi/dMyaPQUTm k2EdAIb/61vIxCJN8JgkCCrVwLNTS7WgEBc3spaMVxzhyjn+KhAGJ4OK7eyttrGD70t/ qypobqI7VJNYBNc0KKbOAU9YlZYjNUvpPr9z5jSYpzmI6t8ZjN6Q2+bEze7gTqlqKCHR UQXA== MIME-Version: 1.0 Received: by 10.42.153.10 with SMTP id k10mr8301562icw.24.1333477841458; Tue, 03 Apr 2012 11:30:41 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.231.204.15 with HTTP; Tue, 3 Apr 2012 11:30:41 -0700 (PDT) In-Reply-To: <20120403181245.GF13561@FreeBSD.org> References: <201204031809.q33I9LLn062165@svn.freebsd.org> <20120403181245.GF13561@FreeBSD.org> Date: Tue, 3 Apr 2012 20:30:41 +0200 X-Google-Sender-Auth: aQnodLV9tHMgWPCaxN7r7mFay1I Message-ID: From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233846 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 03 Apr 2012 18:30:42 -0000 You are sure that the defer feature is linked only to active-active? 2012/4/3 Gleb Smirnoff : > On Tue, Apr 03, 2012 at 06:09:21PM +0000, Gleb Smirnoff wrote: > T> Author: glebius > T> Date: Tue Apr =A03 18:09:20 2012 > T> New Revision: 233846 > T> URL: http://svn.freebsd.org/changeset/base/233846 > T> > T> Log: > T> =A0 Since pf 4.5 import pf(4) has a mechanism to defer > T> =A0 forwarding a packet, that creates state, until > T> =A0 pfsync(4) peer acks state addition (or 10 msec > T> =A0 timeout passes). > T> > T> =A0 This is needed for active-active CARP configurations, > T> =A0 which are poorly supported in FreeBSD and arguably > T> =A0 a good idea at all. > T> > T> =A0 Unfortunately by the time of import this feature in > T> =A0 OpenBSD was turned on, and did not have a switch to > T> =A0 turn it off. This leaked to FreeBSD. > T> > T> =A0 This change make it possible to turn this feature > T> =A0 off via ioctl() and turns it off by default. > > Fortunately, we got an unused field in struct pfsyncreq, > so this commit doesn't break ioctl() ABI, and this is > mergeable. > > -- > Totus tuus, Glebius. --=20 Ermal From owner-svn-src-head@FreeBSD.ORG Tue Apr 3 18:32:27 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F27E1065687; Tue, 3 Apr 2012 18:32:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 893398FC08; Tue, 3 Apr 2012 18:32:26 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q33IWPFj085679; Tue, 3 Apr 2012 22:32:25 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q33IWP8F085678; Tue, 3 Apr 2012 22:32:25 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 3 Apr 2012 22:32:25 +0400 From: Gleb Smirnoff To: Ermal Lu?i Message-ID: <20120403183225.GG13561@FreeBSD.org> References: <201204031809.q33I9LLn062165@svn.freebsd.org> <20120403181245.GF13561@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r233846 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 03 Apr 2012 18:32:27 -0000 Ermal, On Tue, Apr 03, 2012 at 08:30:41PM +0200, Ermal Lu?i wrote: E> You are sure that the defer feature is linked only to active-active? I don't see any sane reason for deferring in normal master/backup configuration. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Apr 3 18:38:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 10E3A1065670; Tue, 3 Apr 2012 18:38:01 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0B108FC12; Tue, 3 Apr 2012 18:38:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q33Ic05w063326; Tue, 3 Apr 2012 18:38:00 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33Ic0DV063324; Tue, 3 Apr 2012 18:38:00 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201204031838.q33Ic0DV063324@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 3 Apr 2012 18:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233850 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 03 Apr 2012 18:38:01 -0000 Author: np Date: Tue Apr 3 18:38:00 2012 New Revision: 233850 URL: http://svn.freebsd.org/changeset/base/233850 Log: - Remove redundant call to pr_ctloutput from code that handles SO_SETFIB. - Add a check for errors during copyin while here. Reviewed by: julian, bz MFC after: 2 weeks Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Apr 3 18:24:57 2012 (r233849) +++ head/sys/kern/uipc_socket.c Tue Apr 3 18:38:00 2012 (r233850) @@ -2504,20 +2504,19 @@ sosetopt(struct socket *so, struct socko case SO_SETFIB: error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); + if (error) + goto bad; + if (optval < 0 || optval >= rt_numfibs) { error = EINVAL; goto bad; } if (((so->so_proto->pr_domain->dom_family == PF_INET) || (so->so_proto->pr_domain->dom_family == PF_INET6) || - (so->so_proto->pr_domain->dom_family == PF_ROUTE))) { + (so->so_proto->pr_domain->dom_family == PF_ROUTE))) so->so_fibnum = optval; - /* Note: ignore error */ - if (so->so_proto->pr_ctloutput) - (*so->so_proto->pr_ctloutput)(so, sopt); - } else { + else so->so_fibnum = 0; - } break; case SO_USER_COOKIE: From owner-svn-src-head@FreeBSD.ORG Tue Apr 3 23:46:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71BFD1065679; Tue, 3 Apr 2012 23:46:26 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 401688FC1C; Tue, 3 Apr 2012 23:46:26 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id q33NkHHR000308 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 3 Apr 2012 16:46:19 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4F7B8BF0.2000906@freebsd.org> Date: Tue, 03 Apr 2012 16:46:56 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: Gleb Smirnoff References: <201203311120.q2VBKmJT099513@svn.freebsd.org> In-Reply-To: <201203311120.q2VBKmJT099513@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233745 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 03 Apr 2012 23:46:26 -0000 On 3/31/12 4:20 AM, Gleb Smirnoff wrote: Many years ago there was the possibility that malloc M_WAITOK could return on shutdown or in some other rare error cases. Are we certain this is no longer true? > Author: glebius > Date: Sat Mar 31 11:20:48 2012 > New Revision: 233745 > URL: http://svn.freebsd.org/changeset/base/233745 > > Log: > Don't check malloc(M_WAITOK) results. > > Modified: > head/sys/netinet/ipfw/ip_fw_sockopt.c > > Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c > ============================================================================== > --- head/sys/netinet/ipfw/ip_fw_sockopt.c Sat Mar 31 10:47:40 2012 (r233744) > +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Sat Mar 31 11:20:48 2012 (r233745) > @@ -163,8 +163,6 @@ ipfw_add_rule(struct ip_fw_chain *chain, > > l = RULESIZE(input_rule); > rule = malloc(l, M_IPFW, M_WAITOK | M_ZERO); > - if (rule == NULL) > - return (ENOSPC); > /* get_map returns with IPFW_UH_WLOCK if successful */ > map = get_map(chain, 1, 0 /* not locked */); > if (map == NULL) { > @@ -1010,8 +1008,6 @@ ipfw_ctl(struct sockopt *sopt) > if (size>= sopt->sopt_valsize) > break; > buf = malloc(size, M_TEMP, M_WAITOK); > - if (buf == NULL) > - break; > IPFW_UH_RLOCK(chain); > /* check again how much space we need */ > want = chain->static_len + ipfw_dyn_len(); > > From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 07:03:15 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64461106566C; Wed, 4 Apr 2012 07:03:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id C694A8FC15; Wed, 4 Apr 2012 07:03:14 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q3473Cxe090018; Wed, 4 Apr 2012 11:03:12 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q3473C9w090017; Wed, 4 Apr 2012 11:03:12 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 4 Apr 2012 11:03:12 +0400 From: Gleb Smirnoff To: Julian Elischer Message-ID: <20120404070312.GI13561@FreeBSD.org> References: <201203311120.q2VBKmJT099513@svn.freebsd.org> <4F7B8BF0.2000906@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4F7B8BF0.2000906@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r233745 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 07:03:15 -0000 Julian, On Tue, Apr 03, 2012 at 04:46:56PM -0700, Julian Elischer wrote: J> Many years ago there was the possibility that malloc M_WAITOK could J> return on shutdown or in some other rare error cases. J> J> Are we certain this is no longer true? At least it is documented so. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 08:30:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26D89106566C; Wed, 4 Apr 2012 08:30:33 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EEB08FC16; Wed, 4 Apr 2012 08:30:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q348UWWe093114; Wed, 4 Apr 2012 08:30:32 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q348UWlj093111; Wed, 4 Apr 2012 08:30:32 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201204040830.q348UWlj093111@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 4 Apr 2012 08:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233863 - head/usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 08:30:33 -0000 Author: glebius Date: Wed Apr 4 08:30:32 2012 New Revision: 233863 URL: http://svn.freebsd.org/changeset/base/233863 Log: With pf 4.5 import the name of pfsync stats sysctl has changed, thus 'netstat -sp pfsync' got broken. Fix this. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Wed Apr 4 08:19:13 2012 (r233862) +++ head/usr.bin/netstat/if.c Wed Apr 4 08:30:32 2012 (r233863) @@ -93,10 +93,10 @@ pfsync_stats(u_long off, const char *nam if (live) { if (zflag) memset(&zerostat, 0, len); - if (sysctlbyname("net.inet.pfsync.stats", &pfsyncstat, &len, + if (sysctlbyname("net.pfsync.stats", &pfsyncstat, &len, zflag ? &zerostat : NULL, zflag ? len : 0) < 0) { if (errno != ENOENT) - warn("sysctl: net.inet.pfsync.stats"); + warn("sysctl: net.pfsync.stats"); return; } } else From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 11:55:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 360E61065670; Wed, 4 Apr 2012 11:55:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 211268FC08; Wed, 4 Apr 2012 11:55:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34BtK0j002175; Wed, 4 Apr 2012 11:55:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34BtKDQ002173; Wed, 4 Apr 2012 11:55:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204041155.q34BtKDQ002173@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Apr 2012 11:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233870 - head/sys/ofed/drivers/infiniband/ulp/ipoib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 11:55:21 -0000 Author: jhb Date: Wed Apr 4 11:55:20 2012 New Revision: 233870 URL: http://svn.freebsd.org/changeset/base/233870 Log: Fix build on i386. Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Apr 4 10:33:54 2012 (r233869) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Apr 4 11:55:20 2012 (r233870) @@ -876,7 +876,7 @@ ipoib_intf_alloc(const char *name) dev->if_output = ipoib_output; dev->if_input = ipoib_input; dev->if_resolvemulti = ipoib_resolvemulti; - dev->if_baudrate = IF_Gbps(10LL); + dev->if_baudrate = IF_Gbps(10UL); dev->if_broadcastaddr = priv->broadcastaddr; dev->if_snd.ifq_maxlen = ipoib_sendq_size * 2; sdl = (struct sockaddr_dl *)dev->if_addr->ifa_addr; From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 12:13:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 26D711065672; Wed, 4 Apr 2012 12:13:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id EEEAF8FC14; Wed, 4 Apr 2012 12:13:47 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5A23EB95F; Wed, 4 Apr 2012 08:13:47 -0400 (EDT) From: John Baldwin To: Julian Elischer Date: Wed, 4 Apr 2012 07:57:42 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203311120.q2VBKmJT099513@svn.freebsd.org> <4F7B8BF0.2000906@freebsd.org> In-Reply-To: <4F7B8BF0.2000906@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204040757.42452.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 04 Apr 2012 08:13:47 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r233745 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 12:13:48 -0000 On Tuesday, April 03, 2012 7:46:56 pm Julian Elischer wrote: > On 3/31/12 4:20 AM, Gleb Smirnoff wrote: > > > Many years ago there was the possibility that malloc M_WAITOK could > return on shutdown or in some other rare error cases. > > Are we certain this is no longer true? That hasn't been true in a long while. In edge cases malloc() with M_WAITOK will just panic rather than return NULL. (e.g. "kmem too small") -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 13:49:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A4D3106564A; Wed, 4 Apr 2012 13:49:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BE918FC1B; Wed, 4 Apr 2012 13:49:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34DnNsi006664; Wed, 4 Apr 2012 13:49:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34DnNNq006661; Wed, 4 Apr 2012 13:49:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204041349.q34DnNNq006661@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Apr 2012 13:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233872 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 13:49:23 -0000 Author: jhb Date: Wed Apr 4 13:49:22 2012 New Revision: 233872 URL: http://svn.freebsd.org/changeset/base/233872 Log: Add descriptions after the 'device' line for several NICs to match the existing style. Modified: head/sys/amd64/conf/NOTES head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Wed Apr 4 13:22:10 2012 (r233871) +++ head/sys/amd64/conf/NOTES Wed Apr 4 13:49:22 2012 (r233872) @@ -298,18 +298,18 @@ options DRM_DEBUG # Include debug print # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module -device ed +device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards options ED_3C503 options ED_HPP options ED_SIC -device ipw -device iwi -device iwn -device mwl -device nfe -device nve +device ipw # Intel 2100 wireless NICs. +device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. +device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device mwl # Marvell 88W8363 802.11n wireless NICs. +device nfe # nVidia nForce MCP on-board Ethernet +device nve # nVidia nForce MCP on-board Ethernet Networking device sfxge -device wpi +device wpi # Intel 3945ABG wireless NICs. # IEEE 802.11 adapter firmware modules Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Wed Apr 4 13:22:10 2012 (r233871) +++ head/sys/i386/conf/NOTES Wed Apr 4 13:49:22 2012 (r233872) @@ -574,7 +574,7 @@ hint.mse.0.irq="5" device ce device cp -device cs +device cs # Crystal Semiconductor CS89x0 NIC hint.cs.0.at="isa" hint.cs.0.port="0x300" device ctau @@ -583,7 +583,7 @@ hint.ctau.0.port="0x240" hint.ctau.0.irq="15" hint.ctau.0.drq="7" #options NETGRAPH_CRONYX # Enable NETGRAPH support for Cronyx adapter(s) -device ed +device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards options ED_3C503 options ED_HPP options ED_SIC @@ -591,21 +591,22 @@ hint.ed.0.at="isa" hint.ed.0.port="0x280" hint.ed.0.irq="5" hint.ed.0.maddr="0xd8000" -device ie # Hints only required for Starlan +device ie # EtherExpress 8/16, 3C507, StarLAN 10 etc. +# Hints only required for Starlan hint.ie.2.at="isa" hint.ie.2.port="0x300" hint.ie.2.irq="5" hint.ie.2.maddr="0xd0000" -device ipw -device iwi -device iwn +device ipw # Intel 2100 wireless NICs. +device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. +device iwn # Intel 4965/1000/5000/6000 wireless NICs. # Hint for the i386-only ISA front-end of le(4). hint.le.0.at="isa" hint.le.0.port="0x280" hint.le.0.irq="10" hint.le.0.drq="0" -device mwl -device nfe # nVidia nForce MCP on-board Ethernet Networking +device mwl # Marvell 88W8363 802.11n wireless NICs. +device nfe # nVidia nForce MCP on-board Ethernet device nve # nVidia nForce MCP on-board Ethernet Networking device sbni hint.sbni.0.at="isa" @@ -617,7 +618,7 @@ hint.wl.0.at="isa" hint.wl.0.port="0x300" options WLCACHE # enables the signal-strength cache options WLDEBUG # enables verbose debugging output -device wpi +device wpi # Intel 3945ABG wireless NICs. # IEEE 802.11 adapter firmware modules From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 14:48:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AF06106564A; Wed, 4 Apr 2012 14:48:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C3E08FC08; Wed, 4 Apr 2012 14:48:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34Em0f1008622; Wed, 4 Apr 2012 14:48:00 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34Em0Bu008620; Wed, 4 Apr 2012 14:48:00 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201204041448.q34Em0Bu008620@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 4 Apr 2012 14:48:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233874 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 14:48:00 -0000 Author: glebius Date: Wed Apr 4 14:47:59 2012 New Revision: 233874 URL: http://svn.freebsd.org/changeset/base/233874 Log: Merge from OpenBSD: revision 1.173 date: 2011/11/09 12:36:03; author: camield; state: Exp; lines: +11 -12 State expire time is a baseline time ("last active") for expiry calculations, and does _not_ denote the time when to expire. So it should never be added to (set into the future). Try to reconstruct it with an educated guess on state import and just set it to the current time on state updates. This fixes a problem on pfsync listeners where the expiry time could be double the expected value and cause a lot more states to linger. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Wed Apr 4 14:31:48 2012 (r233873) +++ head/sys/contrib/pf/net/if_pfsync.c Wed Apr 4 14:47:59 2012 (r233874) @@ -51,6 +51,7 @@ * 1.146 - bzero() mbuf before sparsely filling it with data * 1.170 - SIOCSIFMTU checks * 1.126, 1.142 - deferred packets processing + * 1.173 - correct expire time processing */ #ifdef __FreeBSD__ @@ -789,11 +790,16 @@ pfsync_state_import(struct pfsync_state st->creation = time_uptime - ntohl(sp->creation); st->expire = time_second; if (sp->expire) { - /* XXX No adaptive scaling. */ - st->expire -= r->timeout[sp->timeout] - ntohl(sp->expire); + uint32_t timeout; + + timeout = r->timeout[sp->timeout]; + if (!timeout) + timeout = pf_default_rule.timeout[sp->timeout]; + + /* sp->expire may have been adaptively scaled by export. */ + st->expire -= timeout - ntohl(sp->expire); } - st->expire = ntohl(sp->expire) + time_second; st->direction = sp->direction; st->log = sp->log; st->timeout = sp->timeout; @@ -1291,7 +1297,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, st pfsync_alloc_scrub_memory(&sp->dst, &st->dst); pf_state_peer_ntoh(&sp->src, &st->src); pf_state_peer_ntoh(&sp->dst, &st->dst); - st->expire = ntohl(sp->expire) + time_second; + st->expire = time_second; st->timeout = sp->timeout; st->pfsync_time = time_uptime; } @@ -1397,7 +1403,7 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, pfsync_alloc_scrub_memory(&up->dst, &st->dst); pf_state_peer_ntoh(&up->src, &st->src); pf_state_peer_ntoh(&up->dst, &st->dst); - st->expire = ntohl(up->expire) + time_second; + st->expire = time_second; st->timeout = up->timeout; st->pfsync_time = time_uptime; } @@ -2021,12 +2027,6 @@ pfsync_out_upd_c(struct pf_state *st, st pf_state_peer_hton(&st->src, &up->src); pf_state_peer_hton(&st->dst, &up->dst); up->creatorid = st->creatorid; - - up->expire = pf_state_expires(st); - if (up->expire <= time_second) - up->expire = htonl(0); - else - up->expire = htonl(up->expire - time_second); up->timeout = st->timeout; return (sizeof(*up)); From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 14:50:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5161C106566B; Wed, 4 Apr 2012 14:50:22 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CDC98FC12; Wed, 4 Apr 2012 14:50:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34EoMrL008744; Wed, 4 Apr 2012 14:50:22 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34EoMP7008742; Wed, 4 Apr 2012 14:50:22 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201204041450.q34EoMP7008742@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 4 Apr 2012 14:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233875 - head/sys/ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 14:50:22 -0000 Author: jh Date: Wed Apr 4 14:50:21 2012 New Revision: 233875 URL: http://svn.freebsd.org/changeset/base/233875 Log: Add a check for unsupported file flags to ufs_setattr(). Discussed with: bde MFC after: 2 weeks Modified: head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Wed Apr 4 14:47:59 2012 (r233874) +++ head/sys/ufs/ufs/ufs_vnops.c Wed Apr 4 14:50:21 2012 (r233875) @@ -526,6 +526,10 @@ ufs_setattr(ap) return (EINVAL); } if (vap->va_flags != VNOVAL) { + if ((vap->va_flags & ~(UF_NODUMP | UF_IMMUTABLE | UF_APPEND | + UF_OPAQUE | UF_NOUNLINK | SF_ARCHIVED | SF_IMMUTABLE | + SF_APPEND | SF_NOUNLINK | SF_SNAPSHOT)) != 0) + return (EOPNOTSUPP); if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); /* From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 16:15:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5667E1065674; Wed, 4 Apr 2012 16:15:41 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 415F48FC0C; Wed, 4 Apr 2012 16:15:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34GFfEt013915; Wed, 4 Apr 2012 16:15:41 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34GFfHU013912; Wed, 4 Apr 2012 16:15:41 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204041615.q34GFfHU013912@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 4 Apr 2012 16:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233877 - head/sys/dev/mfi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 16:15:41 -0000 Author: jkim Date: Wed Apr 4 16:15:40 2012 New Revision: 233877 URL: http://svn.freebsd.org/changeset/base/233877 Log: - Do not include machine/atomic.h. It is no longer necessary since r233768. - Remove bogus "atomic" macros and a read-only variable from softc. Reviewed by: ambrisko Modified: head/sys/dev/mfi/mfi_tbolt.c head/sys/dev/mfi/mfivar.h Modified: head/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- head/sys/dev/mfi/mfi_tbolt.c Wed Apr 4 14:51:04 2012 (r233876) +++ head/sys/dev/mfi/mfi_tbolt.c Wed Apr 4 16:15:40 2012 (r233877) @@ -520,12 +520,6 @@ int mfi_tbolt_reset(struct mfi_softc *sc uint32_t fw_state; mtx_lock(&sc->mfi_io_lock); - if (mfi_atomic_read(&sc->fw_reset_no_pci_access)) { - device_printf(sc->mfi_dev, "NO PCI ACCESS\n"); - mtx_unlock(&sc->mfi_io_lock); - return 1; - } - if (sc->hw_crit_error) { device_printf(sc->mfi_dev, "HW CRITICAL ERROR\n"); mtx_unlock(&sc->mfi_io_lock); Modified: head/sys/dev/mfi/mfivar.h ============================================================================== --- head/sys/dev/mfi/mfivar.h Wed Apr 4 14:51:04 2012 (r233876) +++ head/sys/dev/mfi/mfivar.h Wed Apr 4 16:15:40 2012 (r233877) @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include /* * SCSI structures and definitions are used from here, but no linking @@ -162,12 +161,6 @@ struct megasas_sge }; struct mfi_cmd_tbolt; -struct mfi_atomic { - volatile unsigned int val; -}; - -#define mfi_atomic_read(v) ((v)->val) -#define mfi_atomic_set(v,i) ((v)->val - (i)) struct mfi_softc { device_t mfi_dev; @@ -246,7 +239,6 @@ struct mfi_softc { struct intr_config_hook mfi_ich; eventhandler_tag eh; /* OCR flags */ - struct mfi_atomic fw_reset_no_pci_access; uint8_t adpreset; uint8_t issuepend_done; uint8_t disableOnlineCtrlReset; From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 19:31:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B926A106564A; Wed, 4 Apr 2012 19:31:48 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 84D268FC15; Wed, 4 Apr 2012 19:31:48 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id q34JVlLL004643 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 4 Apr 2012 12:31:47 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4F7CA1CA.8070602@freebsd.org> Date: Wed, 04 Apr 2012 12:32:26 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: John Baldwin References: <201203311120.q2VBKmJT099513@svn.freebsd.org> <4F7B8BF0.2000906@freebsd.org> <201204040757.42452.jhb@freebsd.org> In-Reply-To: <201204040757.42452.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r233745 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 19:31:48 -0000 On 4/4/12 4:57 AM, John Baldwin wrote: > On Tuesday, April 03, 2012 7:46:56 pm Julian Elischer wrote: >> On 3/31/12 4:20 AM, Gleb Smirnoff wrote: >> >> >> Many years ago there was the possibility that malloc M_WAITOK could >> return on shutdown or in some other rare error cases. >> >> Are we certain this is no longer true? > That hasn't been true in a long while. In edge cases malloc() with M_WAITOK > will just panic rather than return NULL. (e.g. "kmem too small") > what happens if you call reboot while it is waiting for free space? From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 19:36:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA0B31065675; Wed, 4 Apr 2012 19:36:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id BD8908FC0A; Wed, 4 Apr 2012 19:36:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 39358B95F; Wed, 4 Apr 2012 15:36:17 -0400 (EDT) From: John Baldwin To: Julian Elischer Date: Wed, 4 Apr 2012 15:35:57 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203311120.q2VBKmJT099513@svn.freebsd.org> <201204040757.42452.jhb@freebsd.org> <4F7CA1CA.8070602@freebsd.org> In-Reply-To: <4F7CA1CA.8070602@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204041535.57453.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 04 Apr 2012 15:36:17 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r233745 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 19:36:18 -0000 On Wednesday, April 04, 2012 3:32:26 pm Julian Elischer wrote: > On 4/4/12 4:57 AM, John Baldwin wrote: > > On Tuesday, April 03, 2012 7:46:56 pm Julian Elischer wrote: > >> On 3/31/12 4:20 AM, Gleb Smirnoff wrote: > >> > >> > >> Many years ago there was the possibility that malloc M_WAITOK could > >> return on shutdown or in some other rare error cases. > >> > >> Are we certain this is no longer true? > > That hasn't been true in a long while. In edge cases malloc() with M_WAITOK > > will just panic rather than return NULL. (e.g. "kmem too small") > > > what happens if you call reboot while it is waiting for free space? The same thing that happens to any other thread asleep when we reboot, they eventually die one way or another when the CPU resets. If it happens to be a user thread that doesn't respond to kill then you get a warning about not all processes dying during shutdown, but that's about it. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 20:42:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC54D1065670; Wed, 4 Apr 2012 20:42:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D791A8FC14; Wed, 4 Apr 2012 20:42:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34KgWYV024079; Wed, 4 Apr 2012 20:42:32 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34KgWBJ024077; Wed, 4 Apr 2012 20:42:32 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204042042.q34KgWBJ024077@svn.freebsd.org> From: Adrian Chadd Date: Wed, 4 Apr 2012 20:42:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233885 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 20:42:33 -0000 Author: adrian Date: Wed Apr 4 20:42:32 2012 New Revision: 233885 URL: http://svn.freebsd.org/changeset/base/233885 Log: Disable a specific Merlin hardware workaround which may cause hangs on some PCIe controllers. Obtained from: Atheros / Linux Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Wed Apr 4 19:58:50 2012 (r233884) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Wed Apr 4 20:42:32 2012 (r233885) @@ -212,9 +212,10 @@ #define AR_WA_RESET_EN 0x00040000 /* ena AR_WA_UNTIE_RESET_EN */ #define AR_WA_ANALOG_SHIFT 0x00100000 #define AR_WA_POR_SHORT 0x00200000 /* PCIE phy reset control */ +#define AR_WA_D3_L1_DISABLE 0x00800000 /* bit 23 */ #define AR_WA_DEFAULT 0x0000073f -#define AR9280_WA_DEFAULT 0x0040073f +#define AR9280_WA_DEFAULT 0x0040073b /* disable bit 2, see commit */ #define AR9285_WA_DEFAULT 0x004a05cb #define AR_PCIE_PM_CTRL_ENA 0x00080000 From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 20:42:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 79BAA10657CC; Wed, 4 Apr 2012 20:42:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D6288FC17; Wed, 4 Apr 2012 20:42:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34KgkM8024120; Wed, 4 Apr 2012 20:42:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34KgkR2024118; Wed, 4 Apr 2012 20:42:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204042042.q34KgkR2024118@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Apr 2012 20:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233886 - head/sys/dev/mpt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 20:42:46 -0000 Author: marius Date: Wed Apr 4 20:42:45 2012 New Revision: 233886 URL: http://svn.freebsd.org/changeset/base/233886 Log: Refine r233827; as it turns out, controllers with a device ID of 0x0059 can be upgraded to MegaRAID mode, in which case mfi(4) should attach to these based on the sub-vendor and -device ID instead (not currently done). Therefore, let mpt_pci_probe() return BUS_PROBE_LOW_PRIORITY. While it, let mpt_pci_probe() return BUS_PROBE_DEFAULT instead of 0 in the default case. MFC after: 3 days Modified: head/sys/dev/mpt/mpt_pci.c Modified: head/sys/dev/mpt/mpt_pci.c ============================================================================== --- head/sys/dev/mpt/mpt_pci.c Wed Apr 4 20:42:32 2012 (r233885) +++ head/sys/dev/mpt/mpt_pci.c Wed Apr 4 20:42:45 2012 (r233886) @@ -187,10 +187,12 @@ static int mpt_pci_probe(device_t dev) { const char *desc; + int rval; if (pci_get_vendor(dev) != MPI_MANUFACTPAGE_VENDORID_LSILOGIC) return (ENXIO); + rval = BUS_PROBE_DEFAULT; switch (pci_get_device(dev)) { case MPI_MANUFACTPAGE_DEVICEID_FC909_FB: desc = "LSILogic FC909 FC Adapter"; @@ -232,6 +234,13 @@ mpt_pci_probe(device_t dev) case MPI_MANUFACTPAGE_DEVID_53C1030ZC: desc = "LSILogic 1030 Ultra4 Adapter"; break; + case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB: + /* + * Allow mfi(4) to claim this device in case it's in MegaRAID + * mode. + */ + rval = BUS_PROBE_LOW_PRIORITY; + /* FALLTHROUGH */ case MPI_MANUFACTPAGE_DEVID_SAS1064: case MPI_MANUFACTPAGE_DEVID_SAS1064A: case MPI_MANUFACTPAGE_DEVID_SAS1064E: @@ -240,7 +249,6 @@ mpt_pci_probe(device_t dev) case MPI_MANUFACTPAGE_DEVID_SAS1068: case MPI_MANUFACTPAGE_DEVID_SAS1068A_FB: case MPI_MANUFACTPAGE_DEVID_SAS1068E: - case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB: case MPI_MANUFACTPAGE_DEVID_SAS1078: case MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB: desc = "LSILogic SAS/SATA Adapter"; @@ -250,7 +258,7 @@ mpt_pci_probe(device_t dev) } device_set_desc(dev, desc); - return (0); + return (rval); } #if __FreeBSD_version < 500000 From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 20:46:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BAF9106566B; Wed, 4 Apr 2012 20:46:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CED18FC0C; Wed, 4 Apr 2012 20:46:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34KkKh0024277; Wed, 4 Apr 2012 20:46:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34KkKS6024273; Wed, 4 Apr 2012 20:46:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204042046.q34KkKS6024273@svn.freebsd.org> From: Adrian Chadd Date: Wed, 4 Apr 2012 20:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233887 - in head: sys/dev/ath sys/dev/ath/ath_hal tools/tools/ath/athdecode X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 20:46:21 -0000 Author: adrian Date: Wed Apr 4 20:46:20 2012 New Revision: 233887 URL: http://svn.freebsd.org/changeset/base/233887 Log: Add a threadid to the ah_decode API. This adds the current thread ID to each logged register and mark entry, allowing for easier debugging of concurrent/overlapping NIC operations. Modified: head/sys/dev/ath/ah_osdep.c head/sys/dev/ath/ath_hal/ah_decode.h head/tools/tools/ath/athdecode/main.c Modified: head/sys/dev/ath/ah_osdep.c ============================================================================== --- head/sys/dev/ath/ah_osdep.c Wed Apr 4 20:42:45 2012 (r233886) +++ head/sys/dev/ath/ah_osdep.c Wed Apr 4 20:46:20 2012 (r233887) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -257,6 +258,7 @@ ath_hal_reg_write(struct ath_hal *ah, u_ struct ale *ale = ath_hal_alq_get(ah); if (ale) { struct athregrec *r = (struct athregrec *) ale->ae_data; + r->threadid = curthread->td_tid; r->op = OP_WRITE; r->reg = reg; r->val = val; @@ -296,6 +298,7 @@ ath_hal_reg_read(struct ath_hal *ah, u_i struct ale *ale = ath_hal_alq_get(ah); if (ale) { struct athregrec *r = (struct athregrec *) ale->ae_data; + r->threadid = curthread->td_tid; r->op = OP_READ; r->reg = reg; r->val = val; @@ -312,6 +315,7 @@ OS_MARK(struct ath_hal *ah, u_int id, u_ struct ale *ale = ath_hal_alq_get(ah); if (ale) { struct athregrec *r = (struct athregrec *) ale->ae_data; + r->threadid = curthread->td_tid; r->op = OP_MARK; r->reg = id; r->val = v; Modified: head/sys/dev/ath/ath_hal/ah_decode.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_decode.h Wed Apr 4 20:42:45 2012 (r233886) +++ head/sys/dev/ath/ath_hal/ah_decode.h Wed Apr 4 20:46:20 2012 (r233887) @@ -29,6 +29,7 @@ * existing file. */ struct athregrec { + uint32_t threadid; uint32_t op : 8, reg : 24; uint32_t val; Modified: head/tools/tools/ath/athdecode/main.c ============================================================================== --- head/tools/tools/ath/athdecode/main.c Wed Apr 4 20:42:45 2012 (r233886) +++ head/tools/tools/ath/athdecode/main.c Wed Apr 4 20:46:20 2012 (r233887) @@ -375,7 +375,7 @@ oprw(FILE *fd, int recnum, struct athreg const char* bits; int i; - fprintf(fd, "\n%05d: ", recnum); + fprintf(fd, "\n%05d: [%d] ", recnum, r->threadid); dr = findreg(r->reg); if (dr != NULL && dr->name != NULL) { snprintf(buf, sizeof (buf), "AR_%s (0x%x)", dr->name, r->reg); From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 21:09:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4119106566B; Wed, 4 Apr 2012 21:09:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 760E98FC18; Wed, 4 Apr 2012 21:09:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34L93cU025024; Wed, 4 Apr 2012 21:09:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34L93go025022; Wed, 4 Apr 2012 21:09:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204042109.q34L93go025022@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Apr 2012 21:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233888 - head/sys/dev/ale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 21:09:03 -0000 Author: marius Date: Wed Apr 4 21:09:02 2012 New Revision: 233888 URL: http://svn.freebsd.org/changeset/base/233888 Log: - Const'ify the device lookup-table. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. - Enable support for flow control. Tested by: yongari MFC after: 1 week Modified: head/sys/dev/ale/if_ale.c Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Wed Apr 4 20:46:20 2012 (r233887) +++ head/sys/dev/ale/if_ale.c Wed Apr 4 21:09:02 2012 (r233888) @@ -91,11 +91,11 @@ TUNABLE_INT("hw.ale.msix_disable", &msix /* * Devices supported by this driver. */ -static struct ale_dev { +static const struct ale_dev { uint16_t ale_vendorid; uint16_t ale_deviceid; const char *ale_name; -} ale_devs[] = { +} const ale_devs[] = { { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR81XX, "Atheros AR8121/AR8113/AR8114 PCIe Ethernet" }, }; @@ -163,7 +163,7 @@ static device_method_t ale_methods[] = { DEVMETHOD(miibus_writereg, ale_miibus_writereg), DEVMETHOD(miibus_statchg, ale_miibus_statchg), - { NULL, NULL } + DEVMETHOD_END }; static driver_t ale_driver = { @@ -174,8 +174,8 @@ static driver_t ale_driver = { static devclass_t ale_devclass; -DRIVER_MODULE(ale, pci, ale_driver, ale_devclass, 0, 0); -DRIVER_MODULE(miibus, ale, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE(ale, pci, ale_driver, ale_devclass, NULL, NULL); +DRIVER_MODULE(miibus, ale, miibus_driver, miibus_devclass, NULL, NULL); static struct resource_spec ale_res_spec_mem[] = { { SYS_RES_MEMORY, PCIR_BAR(0), RF_ACTIVE }, @@ -335,7 +335,7 @@ ale_mediachange(struct ifnet *ifp) static int ale_probe(device_t dev) { - struct ale_dev *sp; + const struct ale_dev *sp; int i; uint16_t vendor, devid; @@ -635,7 +635,7 @@ ale_attach(device_t dev) /* Set up MII bus. */ error = mii_attach(dev, &sc->ale_miibus, ifp, ale_mediachange, ale_mediastatus, BMSR_DEFCAPMASK, sc->ale_phyaddr, MII_OFFSET_ANY, - 0); + MIIF_DOPAUSE); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); goto fail; @@ -2101,12 +2101,10 @@ ale_mac_config(struct ale_softc *sc) } if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { reg |= MAC_CFG_FULL_DUPLEX; -#ifdef notyet if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0) reg |= MAC_CFG_TX_FC; if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0) reg |= MAC_CFG_RX_FC; -#endif } CSR_WRITE_4(sc, ALE_MAC_CFG, reg); } @@ -2798,7 +2796,7 @@ ale_init_locked(struct ale_softc *sc) ((rxf_lo << RX_FIFO_PAUSE_THRESH_LO_SHIFT) & RX_FIFO_PAUSE_THRESH_LO_MASK) | ((rxf_hi << RX_FIFO_PAUSE_THRESH_HI_SHIFT) & - RX_FIFO_PAUSE_THRESH_HI_MASK)); + RX_FIFO_PAUSE_THRESH_HI_MASK)); } /* Disable RSS. */ From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 21:19:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 907F61065705; Wed, 4 Apr 2012 21:19:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5C18FC17; Wed, 4 Apr 2012 21:19:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34LJu4D025620; Wed, 4 Apr 2012 21:19:56 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34LJuYN025618; Wed, 4 Apr 2012 21:19:56 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204042119.q34LJuYN025618@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 4 Apr 2012 21:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233892 - head/sys/dev/fb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 21:19:56 -0000 Author: jkim Date: Wed Apr 4 21:19:55 2012 New Revision: 233892 URL: http://svn.freebsd.org/changeset/base/233892 Log: Remove a useless warning. The mode information is unused for very long time and this function may be used with VESA mode since r232069. Modified: head/sys/dev/fb/vga.c Modified: head/sys/dev/fb/vga.c ============================================================================== --- head/sys/dev/fb/vga.c Wed Apr 4 21:19:27 2012 (r233891) +++ head/sys/dev/fb/vga.c Wed Apr 4 21:19:55 2012 (r233892) @@ -2160,10 +2160,6 @@ vga_save_state(video_adapter_t *adp, voi buf[1] = info.vi_height - 1; /* ROWS */ } buf[2] = info.vi_cheight; /* POINTS */ - } else { - /* XXX: shouldn't be happening... */ - printf("vga%d: %s: failed to obtain mode info. (vga_save_state())\n", - adp->va_unit, adp->va_name); } #else buf[0] = readb(BIOS_PADDRTOVADDR(0x44a)); /* COLS */ From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 21:31:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D759106564A; Wed, 4 Apr 2012 21:31:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 295C08FC0C; Wed, 4 Apr 2012 21:31:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34LVLUI026009; Wed, 4 Apr 2012 21:31:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34LVKdZ026007; Wed, 4 Apr 2012 21:31:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204042131.q34LVKdZ026007@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Apr 2012 21:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233893 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 21:31:21 -0000 Author: jhb Date: Wed Apr 4 21:31:20 2012 New Revision: 233893 URL: http://svn.freebsd.org/changeset/base/233893 Log: Disable INET6 support in modules when building the LINT-NOINET6 kernel. Reviewed by: bz MFC after: 1 week Modified: head/sys/conf/makeLINT.mk Modified: head/sys/conf/makeLINT.mk ============================================================================== --- head/sys/conf/makeLINT.mk Wed Apr 4 21:19:55 2012 (r233892) +++ head/sys/conf/makeLINT.mk Wed Apr 4 21:31:20 2012 (r233893) @@ -23,6 +23,7 @@ LINT: ${NOTES} ../../conf/makeLINT.sed echo "nodevice gre" >> ${.TARGET}-NOINET echo "include ${.TARGET}" > ${.TARGET}-NOINET6 echo "ident ${.TARGET}-NOINET6" >> ${.TARGET}-NOINET6 + echo 'makeoptions MKMODULESENV+="WITHOUT_INET6_SUPPORT="' >> ${.TARGET}-NOINET6 echo "nooptions INET6" >> ${.TARGET}-NOINET6 echo "include ${.TARGET}" > ${.TARGET}-NOIP echo "ident ${.TARGET}-NOIP" >> ${.TARGET}-NOIP From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 21:38:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC9F7106564A; Wed, 4 Apr 2012 21:38:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8C478FC1B; Wed, 4 Apr 2012 21:38:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34LcQU6026276; Wed, 4 Apr 2012 21:38:26 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34LcQVR026274; Wed, 4 Apr 2012 21:38:26 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204042138.q34LcQVR026274@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 4 Apr 2012 21:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233894 - head/sys/dev/fb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 21:38:27 -0000 Author: jkim Date: Wed Apr 4 21:38:26 2012 New Revision: 233894 URL: http://svn.freebsd.org/changeset/base/233894 Log: Do not copy VESA state buffer if the VBE call has failed for any reason. Do not unnecessarily clear the state buffer before calling the function. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Apr 4 21:31:20 2012 (r233893) +++ head/sys/dev/fb/vesa.c Wed Apr 4 21:38:26 2012 (r233894) @@ -542,7 +542,8 @@ vesa_bios_save_restore(int code, void *p switch (code) { case STATE_SAVE: x86bios_intr(®s, 0x10); - bcopy(vesa_state_buf, p, vesa_state_buf_size); + if (regs.R_AX == 0x004f) + bcopy(vesa_state_buf, p, vesa_state_buf_size); break; case STATE_LOAD: bcopy(p, vesa_state_buf, vesa_state_buf_size); @@ -1481,7 +1482,6 @@ vesa_save_state(video_adapter_t *adp, vo } else vesa_vmem_buf = NULL; ((adp_state_t *)p)->sig = V_STATE_SIG; - bzero(((adp_state_t *)p)->regs, vesa_state_buf_size); return (vesa_bios_save_restore(STATE_SAVE, ((adp_state_t *)p)->regs)); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 21:49:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65FF5106566B; Wed, 4 Apr 2012 21:49:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 515438FC17; Wed, 4 Apr 2012 21:49:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34LnoYw026654; Wed, 4 Apr 2012 21:49:50 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34LnouF026648; Wed, 4 Apr 2012 21:49:50 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204042149.q34LnouF026648@svn.freebsd.org> From: Adrian Chadd Date: Wed, 4 Apr 2012 21:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233895 - in head/sys/dev/ath: . ath_hal ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 21:49:50 -0000 Author: adrian Date: Wed Apr 4 21:49:49 2012 New Revision: 233895 URL: http://svn.freebsd.org/changeset/base/233895 Log: Correctly handle AR_MoreAggr when assembling multi-descriptor final frames. Linux ath9k doesn't have this issue as it doesn't try queuing multi- descriptor frames to the hardware. Before, I was only setting the first and last descriptor in the final frame correctly - and that was done by accident. The first descriptor in the last sub-frame was being correctly updated by ath_tx_setds_11n(); the last descriptor in the last sub-frame was being correctly updated by ath_buf_set_rate(). But both of those are "incorrect". The correct behaviour is: * AR_IsAggr is set for all descriptors for all subframes in an aggregate. * AR_MoreAggr is set for all descriptors for all non-final sub-frames in an aggregate. Ie, all descriptors in the last sub-frame of an aggregate must have this field set to 0. I still need to do a couple of extra passes to ensure the pad delimiter field is being correctly handled in all descriptors in the last sub-frame. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Wed Apr 4 21:38:26 2012 (r233894) +++ head/sys/dev/ath/ath_hal/ah.h Wed Apr 4 21:49:49 2012 (r233895) @@ -1010,7 +1010,7 @@ struct ath_hal { HAL_BOOL __ahdecl(*ah_chainTxDesc)(struct ath_hal *, struct ath_desc *, u_int, u_int, HAL_PKT_TYPE, u_int, HAL_CIPHER, uint8_t, u_int, HAL_BOOL, - HAL_BOOL); + HAL_BOOL, HAL_BOOL); HAL_BOOL __ahdecl(*ah_setupFirstTxDesc)(struct ath_hal *, struct ath_desc *, u_int, u_int, u_int, u_int, u_int, u_int, u_int, u_int); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Wed Apr 4 21:38:26 2012 (r233894) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Wed Apr 4 21:49:49 2012 (r233895) @@ -336,8 +336,8 @@ extern int ar5416SetupTxQueue(struct ath extern HAL_BOOL ar5416ChainTxDesc(struct ath_hal *ah, struct ath_desc *ds, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int keyIx, - HAL_CIPHER cipher, uint8_t delims, u_int segLen, HAL_BOOL firstSeg, - HAL_BOOL lastSeg); + HAL_CIPHER cipher, uint8_t delims, u_int segLen, + HAL_BOOL firstSeg, HAL_BOOL lastSeg, HAL_BOOL lastAggr); extern HAL_BOOL ar5416SetupFirstTxDesc(struct ath_hal *ah, struct ath_desc *ds, u_int aggrLen, u_int flags, u_int txPower, u_int txRate0, u_int txTries0, u_int antMode, u_int rtsctsRate, u_int rtsctsDuration); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Wed Apr 4 21:38:26 2012 (r233894) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Wed Apr 4 21:49:49 2012 (r233895) @@ -338,13 +338,15 @@ ar5416ChainTxDesc(struct ath_hal *ah, st uint8_t delims, u_int segLen, HAL_BOOL firstSeg, - HAL_BOOL lastSeg) + HAL_BOOL lastSeg, + HAL_BOOL lastAggr) { struct ar5416_desc *ads = AR5416DESC(ds); uint32_t *ds_txstatus = AR5416_DS_TXSTATUS(ah,ads); struct ath_hal_5416 *ahp = AH5416(ah); int isaggr = 0; + uint32_t last_aggr = 0; (void) hdrLen; (void) ah; @@ -355,6 +357,8 @@ ar5416ChainTxDesc(struct ath_hal *ah, st if (type == HAL_PKT_TYPE_AMPDU) { type = HAL_PKT_TYPE_NORMAL; isaggr = 1; + if (lastAggr == AH_FALSE) + last_aggr = AR_MoreAggr; } /* @@ -372,8 +376,19 @@ ar5416ChainTxDesc(struct ath_hal *ah, st * Note: VEOL should only be for the last descriptor in the chain. */ ads->ds_ctl0 = (pktLen & AR_FrameLen); + + /* + * For aggregates: + * + IsAggr must be set for all descriptors of all subframes of + * the aggregate + * + MoreAggr must be set for all descriptors of all subframes + * of the aggregate EXCEPT the last subframe; + * + MoreAggr must be _CLEAR_ for all descrpitors of the last + * subframe of the aggregate. + */ ads->ds_ctl1 = (type << AR_FrameType_S) - | (isaggr ? (AR_IsAggr | AR_MoreAggr) : 0); + | (isaggr ? (AR_IsAggr | last_aggr) : 0); + ads->ds_ctl2 = 0; ads->ds_ctl3 = 0; if (keyIx != HAL_TXKEYIX_INVALID) { @@ -483,7 +498,6 @@ ar5416SetupLastTxDesc(struct ath_hal *ah ads->ds_ctl2 = AR5416DESC_CONST(ds0)->ds_ctl2; ads->ds_ctl3 = AR5416DESC_CONST(ds0)->ds_ctl3; #endif - return AH_TRUE; } Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Wed Apr 4 21:38:26 2012 (r233894) +++ head/sys/dev/ath/if_ath_tx.c Wed Apr 4 21:49:49 2012 (r233895) @@ -363,7 +363,8 @@ ath_tx_chaindesclist_subframe(struct ath bf->bf_state.bfs_ndelim, bf->bf_segs[i].ds_len, /* segment length */ i == 0, /* first segment */ - i == bf->bf_nseg - 1 /* last segment */ + i == bf->bf_nseg - 1, /* last segment */ + bf->bf_next == NULL /* last sub-frame in aggr */ ); DPRINTF(sc, ATH_DEBUG_XMIT, Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Wed Apr 4 21:38:26 2012 (r233894) +++ head/sys/dev/ath/if_athvar.h Wed Apr 4 21:49:49 2012 (r233895) @@ -957,10 +957,10 @@ void ath_intr(void *); ((*(_ah)->ah_setupFirstTxDesc)((_ah), (_ds), (_aggrlen), (_flags), \ (_txpower), (_txr0), (_txtr0), (_antm), (_rcr), (_rcd))) #define ath_hal_chaintxdesc(_ah, _ds, _pktlen, _hdrlen, _type, _keyix, \ - _cipher, _delims, _seglen, _first, _last) \ + _cipher, _delims, _seglen, _first, _last, _lastaggr) \ ((*(_ah)->ah_chainTxDesc)((_ah), (_ds), (_pktlen), (_hdrlen), \ (_type), (_keyix), (_cipher), (_delims), (_seglen), \ - (_first), (_last))) + (_first), (_last), (_lastaggr))) #define ath_hal_setuplasttxdesc(_ah, _ds, _ds0) \ ((*(_ah)->ah_setupLastTxDesc)((_ah), (_ds), (_ds0))) From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 22:02:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CFD01065676; Wed, 4 Apr 2012 22:02:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CEFE8FC19; Wed, 4 Apr 2012 22:02:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34M2sLb027101; Wed, 4 Apr 2012 22:02:54 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34M2sLT027099; Wed, 4 Apr 2012 22:02:54 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204042202.q34M2sLT027099@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 4 Apr 2012 22:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233896 - head/sys/dev/fb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 22:02:55 -0000 Author: jkim Date: Wed Apr 4 22:02:54 2012 New Revision: 233896 URL: http://svn.freebsd.org/changeset/base/233896 Log: Save and restore VGA display memory between suspend and resume. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Apr 4 21:49:49 2012 (r233895) +++ head/sys/dev/fb/vesa.c Wed Apr 4 22:02:54 2012 (r233896) @@ -1465,22 +1465,30 @@ vesa_save_state(video_adapter_t *adp, vo vm_offset_t buf; size_t bsize; - if (adp != vesa_adp || vesa_state_buf_size == 0) + if (adp != vesa_adp || (size == 0 && vesa_state_buf_size == 0)) return ((*prevvidsw->save_state)(adp, p, size)); + bsize = offsetof(adp_state_t, regs) + vesa_state_buf_size; if (size == 0) - return (offsetof(adp_state_t, regs) + vesa_state_buf_size); - if (size < (offsetof(adp_state_t, regs) + vesa_state_buf_size)) + return (bsize); + if (vesa_state_buf_size > 0 && size < bsize) return (EINVAL); - buf = adp->va_buffer; - if (buf != 0) { + if (VESA_MODE(adp->va_mode) && adp->va_buffer != 0) { + buf = adp->va_buffer; bsize = adp->va_buffer_size; + } else { + buf = adp->va_window; + bsize = adp->va_window_size; + } + if (buf != 0) { vesa_vmem_buf = malloc(bsize, M_DEVBUF, M_NOWAIT); if (vesa_vmem_buf != NULL) bcopy((void *)buf, vesa_vmem_buf, bsize); } else vesa_vmem_buf = NULL; + if (vesa_state_buf_size == 0) + return ((*prevvidsw->save_state)(adp, p, size)); ((adp_state_t *)p)->sig = V_STATE_SIG; return (vesa_bios_save_restore(STATE_SAVE, ((adp_state_t *)p)->regs)); } @@ -1490,27 +1498,34 @@ vesa_load_state(video_adapter_t *adp, vo { vm_offset_t buf; size_t bsize; - int mode; + int error, mode; if (adp != vesa_adp) return ((*prevvidsw->load_state)(adp, p)); /* Try BIOS POST to restore a sane state. */ (void)vesa_bios_post(); - bsize = adp->va_buffer_size; mode = adp->va_mode; - (void)vesa_set_mode(adp, adp->va_initial_mode); + error = vesa_set_mode(adp, adp->va_initial_mode); if (mode != adp->va_initial_mode) - (void)vesa_set_mode(adp, mode); + error = vesa_set_mode(adp, mode); - if (((adp_state_t *)p)->sig != V_STATE_SIG) - return ((*prevvidsw->load_state)(adp, p)); if (vesa_vmem_buf != NULL) { - buf = adp->va_buffer; - if (buf != 0) - bcopy(vesa_vmem_buf, (void *)buf, bsize); + if (error == 0) { + if (VESA_MODE(mode) && adp->va_buffer != 0) { + buf = adp->va_buffer; + bsize = adp->va_buffer_size; + } else { + buf = adp->va_window; + bsize = adp->va_window_size; + } + if (buf != 0) + bcopy(vesa_vmem_buf, (void *)buf, bsize); + } free(vesa_vmem_buf, M_DEVBUF); } + if (((adp_state_t *)p)->sig != V_STATE_SIG) + return ((*prevvidsw->load_state)(adp, p)); return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs)); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 22:22:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B67B7106566B; Wed, 4 Apr 2012 22:22:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1D8E8FC08; Wed, 4 Apr 2012 22:22:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34MMob0027819; Wed, 4 Apr 2012 22:22:50 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34MMot2027817; Wed, 4 Apr 2012 22:22:50 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204042222.q34MMot2027817@svn.freebsd.org> From: Adrian Chadd Date: Wed, 4 Apr 2012 22:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233897 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 22:22:50 -0000 Author: adrian Date: Wed Apr 4 22:22:50 2012 New Revision: 233897 URL: http://svn.freebsd.org/changeset/base/233897 Log: Now that I've fixed the BAW TX hangs, disable this verbose debugging again. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Wed Apr 4 22:02:54 2012 (r233896) +++ head/sys/dev/ath/if_ath_tx.c Wed Apr 4 22:22:50 2012 (r233897) @@ -2696,7 +2696,7 @@ ath_tx_tid_drain(struct ath_softc *sc, s mtod(bf->bf_m, const uint8_t *), bf->bf_m->m_len, 0, -1); - //t = 1; + t = 1; } From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 22:24:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFA401065672; Wed, 4 Apr 2012 22:24:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB36E8FC1A; Wed, 4 Apr 2012 22:24:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34MOBGW027898; Wed, 4 Apr 2012 22:24:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34MOBao027896; Wed, 4 Apr 2012 22:24:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204042224.q34MOBao027896@svn.freebsd.org> From: Adrian Chadd Date: Wed, 4 Apr 2012 22:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233898 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 22:24:11 -0000 Author: adrian Date: Wed Apr 4 22:24:11 2012 New Revision: 233898 URL: http://svn.freebsd.org/changeset/base/233898 Log: Disable the HWQ contents upon a TX queue reset, rather than a TX queue flush. This is designed to assist in figuring out what the hardware state is when something like a queue hang has occured. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Wed Apr 4 22:22:50 2012 (r233897) +++ head/sys/dev/ath/if_ath.c Wed Apr 4 22:24:11 2012 (r233898) @@ -4910,6 +4910,10 @@ ath_tx_processq(struct ath_softc *sc, st if (sc->sc_debug & ATH_DEBUG_XMIT_DESC) ath_printtxbuf(sc, bf, txq->axq_qnum, 0, status == HAL_OK); + else if ((sc->sc_debug & ATH_DEBUG_RESET) && (dosched == 0)) { + ath_printtxbuf(sc, bf, txq->axq_qnum, 0, + status == HAL_OK); + } #endif if (status == HAL_EINPROGRESS) { ATH_TXQ_UNLOCK(txq); From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 22:51:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C003106566B; Wed, 4 Apr 2012 22:51:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16BD58FC18; Wed, 4 Apr 2012 22:51:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34Mponx028789; Wed, 4 Apr 2012 22:51:50 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34MpoAw028787; Wed, 4 Apr 2012 22:51:50 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204042251.q34MpoAw028787@svn.freebsd.org> From: Adrian Chadd Date: Wed, 4 Apr 2012 22:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233900 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 22:51:51 -0000 Author: adrian Date: Wed Apr 4 22:51:50 2012 New Revision: 233900 URL: http://svn.freebsd.org/changeset/base/233900 Log: Track and optionally log the actual sync interrupt cause. These are involved in tracking host interface issues (ie, PCI/PCIe/AHB interface.) Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Wed Apr 4 22:40:38 2012 (r233899) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Wed Apr 4 22:51:50 2012 (r233900) @@ -67,7 +67,7 @@ ar5416IsInterruptPending(struct ath_hal HAL_BOOL ar5416GetPendingInterrupts(struct ath_hal *ah, HAL_INT *masked) { - uint32_t isr, isr0, isr1, sync_cause = 0; + uint32_t isr, isr0, isr1, sync_cause = 0, o_sync_cause = 0; HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps; #ifdef AH_INTERRUPT_DEBUGGING @@ -89,7 +89,7 @@ ar5416GetPendingInterrupts(struct ath_ha isr = OS_REG_READ(ah, AR_ISR); else isr = 0; - sync_cause = OS_REG_READ(ah, AR_INTR_SYNC_CAUSE); + o_sync_cause = sync_cause = OS_REG_READ(ah, AR_INTR_SYNC_CAUSE); sync_cause &= AR_INTR_SYNC_DEFAULT; *masked = 0; @@ -221,6 +221,9 @@ ar5416GetPendingInterrupts(struct ath_ha return AH_TRUE; if (sync_cause != 0) { + HALDEBUG(ah, HAL_DEBUG_INTERRUPT, "%s: sync_cause=0x%x\n", + __func__, + o_sync_cause); if (sync_cause & (AR_INTR_SYNC_HOST1_FATAL | AR_INTR_SYNC_HOST1_PERR)) { *masked |= HAL_INT_FATAL; } From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 23:14:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45700106564A; Wed, 4 Apr 2012 23:14:02 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 308DB8FC16; Wed, 4 Apr 2012 23:14:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34NE2WP029674; Wed, 4 Apr 2012 23:14:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34NE1wr029672; Wed, 4 Apr 2012 23:14:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204042314.q34NE1wr029672@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 4 Apr 2012 23:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233904 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 23:14:02 -0000 Author: nwhitehorn Date: Wed Apr 4 23:14:01 2012 New Revision: 233904 URL: http://svn.freebsd.org/changeset/base/233904 Log: Fix typo. Submitted by: pawel dot worach at gmail dot com MFC after: 3 days Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Wed Apr 4 23:11:55 2012 (r233903) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Wed Apr 4 23:14:01 2012 (r233904) @@ -147,7 +147,7 @@ newfs_command(const char *fstype, char * strcat(command, "-F 32 "); else if (strcmp(items[i].name, "FAT16") == 0) strcat(command, "-F 16 "); - else if (strcmp(items[i].name, "SUJ") == 0) + else if (strcmp(items[i].name, "FAT12") == 0) strcat(command, "-F 12 "); } } else { From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 23:45:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 598F6106564A; Wed, 4 Apr 2012 23:45:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43BE38FC18; Wed, 4 Apr 2012 23:45:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34NjG6M030798; Wed, 4 Apr 2012 23:45:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34NjGwW030792; Wed, 4 Apr 2012 23:45:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204042345.q34NjGwW030792@svn.freebsd.org> From: Adrian Chadd Date: Wed, 4 Apr 2012 23:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233908 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 23:45:16 -0000 Author: adrian Date: Wed Apr 4 23:45:15 2012 New Revision: 233908 URL: http://svn.freebsd.org/changeset/base/233908 Log: Implement BAR TX. A BAR frame must be transmitted when an frame in an A-MPDU session fails to transmit - it's retried too often, or it can't be cloned for re-transmission. The BAR frame tells the remote side to advance the left edge of the block-ack window (BAW) to a new value. In order to do this: * TX for that particular node/TID must be paused; * The existing frames in the hardware queue needs to be completed, whether they're TXed successfully or otherwise; * The new left edge of the BAW is then communicated to the remote side via a BAR frame; * Once the BAR frame has been sucessfully TXed, aggregation can resume; * If the BAR frame can't be successfully TXed, the aggregation session is torn down. This is a first pass that implements the above. What needs to be done/ tested: * What happens during say, a channel reset / stuck beacon _and_ BAR TX. It _should_ be correctly buffered and retried once the reset has completed. But if a bgscan occurs (and they shouldn't, grr) the BAR frame will be forcibly failed and the aggregation session will be torn down. Yes, another reason to disable bgscan until I've figured this out. * There's way too much locking going on here. I'm going to do a couple of further passes of sanitising and refactoring so the (re) locking isn't so heavy. Right now I'm going for correctness, not speed. * The BAR TX can fail if the hardware TX queue is full. Since there's no "free" space kept for management frames, a full TX queue (from eg an iperf test) can race with your ability to allocate ath_buf/mbufs and cause issues. I'll knock this on the head with a subsequent commit. * I need to do some _much_ more thorough testing in hostap mode to ensure that many concurrent traffic streams to different end nodes are correctly handled. I'll find and squish whichever bugs show up here. But, this is an important step to being able to flip on 802.11n by default. The last issue (besides bug fixes, of course) is HT frame protection and I'll address that in a subsequent commit. Modified: head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Wed Apr 4 23:40:29 2012 (r233907) +++ head/sys/dev/ath/if_ath_tx.c Wed Apr 4 23:45:15 2012 (r233908) @@ -2598,11 +2598,11 @@ ath_tx_tid_init(struct ath_softc *sc, st static void ath_tx_tid_pause(struct ath_softc *sc, struct ath_tid *tid) { - ATH_TXQ_LOCK(sc->sc_ac2q[tid->ac]); + + ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[tid->ac]); tid->paused++; DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: paused = %d\n", __func__, tid->paused); - ATH_TXQ_UNLOCK(sc->sc_ac2q[tid->ac]); } /* @@ -2629,6 +2629,158 @@ ath_tx_tid_resume(struct ath_softc *sc, } /* + * Suspend the queue because we need to TX a BAR. + */ +static void +ath_tx_tid_bar_suspend(struct ath_softc *sc, struct ath_tid *tid) +{ + ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[tid->ac]); + + DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + "%s: tid=%p, called\n", + __func__, + tid); + + /* We shouldn't be called when bar_tx is 1 */ + if (tid->bar_tx) { + device_printf(sc->sc_dev, "%s: bar_tx is 1?!\n", + __func__); + } + + /* If we've already been called, just be patient. */ + if (tid->bar_wait) + return; + + /* Wait! */ + tid->bar_wait = 1; + + /* Only one pause, no matter how many frames fail */ + ath_tx_tid_pause(sc, tid); +} + +/* + * We've finished with BAR handling - either we succeeded or + * failed. Either way, unsuspend TX. + */ +static void +ath_tx_tid_bar_unsuspend(struct ath_softc *sc, struct ath_tid *tid) +{ + ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[tid->ac]); + + DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + "%s: tid=%p, called\n", + __func__, + tid); + + if (tid->bar_tx == 0 || tid->bar_wait == 0) { + device_printf(sc->sc_dev, "%s: bar_tx=%d, bar_wait=%d: ?\n", + __func__, tid->bar_tx, tid->bar_wait); + } + + tid->bar_tx = tid->bar_wait = 0; + ath_tx_tid_resume(sc, tid); +} + +/* + * Return whether we're ready to TX a BAR frame. + * + * Requires the TID lock be held. + */ +static int +ath_tx_tid_bar_tx_ready(struct ath_softc *sc, struct ath_tid *tid) +{ + + ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[tid->ac]); + + if (tid->bar_wait == 0 || tid->hwq_depth > 0) + return (0); + + return (1); +} + +/* + * Check whether the current TID is ready to have a BAR + * TXed and if so, do the TX. + * + * Since the TID/TXQ lock can't be held during a call to + * ieee80211_send_bar(), we have to do the dirty thing of unlocking it, + * sending the BAR and locking it again. + * + * Eventually, the code to send the BAR should be broken out + * from this routine so the lock doesn't have to be reacquired + * just to be immediately dropped by the caller. + */ +static void +ath_tx_tid_bar_tx(struct ath_softc *sc, struct ath_tid *tid) +{ + struct ieee80211_tx_ampdu *tap; + + ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[tid->ac]); + + DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + "%s: tid=%p, called\n", + __func__, + tid); + + tap = ath_tx_get_tx_tid(tid->an, tid->tid); + + /* + * This is an error condition! + */ + if (tid->bar_wait == 0 || tid->bar_tx == 1) { + device_printf(sc->sc_dev, + "%s: tid=%p, bar_tx=%d, bar_wait=%d: ?\n", + __func__, + tid, + tid->bar_tx, + tid->bar_wait); + return; + } + + /* Don't do anything if we still have pending frames */ + if (tid->hwq_depth > 0) { + DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + "%s: tid=%p, hwq_depth=%d, waiting\n", + __func__, + tid, + tid->hwq_depth); + return; + } + + /* We're now about to TX */ + tid->bar_tx = 1; + + /* + * Calculate new BAW left edge, now that all frames have either + * succeeded or failed. + * + * XXX verify this is _actually_ the valid value to begin at! + */ + DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + "%s: tid=%p, new BAW left edge=%d\n", + __func__, + tid, + tap->txa_start); + + /* Try sending the BAR frame */ + /* We can't hold the lock here! */ + + ATH_TXQ_UNLOCK(sc->sc_ac2q[tid->ac]); + if (ieee80211_send_bar(&tid->an->an_node, tap, tap->txa_start) == 0) { + /* Success? Now we wait for notification that it's done */ + ATH_TXQ_LOCK(sc->sc_ac2q[tid->ac]); + return; + } + + /* Failure? For now, warn loudly and continue */ + ATH_TXQ_LOCK(sc->sc_ac2q[tid->ac]); + device_printf(sc->sc_dev, "%s: tid=%p, failed to TX BAR, continue!\n", + __func__, tid); + ath_tx_tid_bar_unsuspend(sc, tid); +} + + +/* * Free any packets currently pending in the software TX queue. * * This will be called when a node is being deleted. @@ -3077,7 +3229,6 @@ ath_tx_aggr_retry_unaggr(struct ath_soft int tid = bf->bf_state.bfs_tid; struct ath_tid *atid = &an->an_tid[tid]; struct ieee80211_tx_ampdu *tap; - int txseq; ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); @@ -3118,18 +3269,14 @@ ath_tx_aggr_retry_unaggr(struct ath_soft } bf->bf_state.bfs_dobaw = 0; - /* Send BAR frame */ - /* - * This'll end up going into net80211 and back out - * again, via ic->ic_raw_xmit(). - */ - txseq = tap->txa_start; - ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); + /* Suspend the TX queue and get ready to send the BAR */ + ath_tx_tid_bar_suspend(sc, atid); - device_printf(sc->sc_dev, - "%s: TID %d: send BAR; seq %d\n", __func__, tid, txseq); + /* Send the BAR if there are no other frames waiting */ + if (ath_tx_tid_bar_tx_ready(sc, atid)) + ath_tx_tid_bar_tx(sc, atid); - /* XXX TODO: send BAR */ + ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); /* Free buffer, bf is free after this call */ ath_tx_default_comp(sc, bf, 0); @@ -3149,6 +3296,9 @@ ath_tx_aggr_retry_unaggr(struct ath_soft */ ATH_TXQ_INSERT_HEAD(atid, bf, bf_list); ath_tx_tid_sched(sc, atid); + /* Send the BAR if there are no other frames waiting */ + if (ath_tx_tid_bar_tx_ready(sc, atid)) + ath_tx_tid_bar_tx(sc, atid); ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); } @@ -3278,17 +3428,20 @@ ath_tx_comp_aggr_error(struct ath_softc * in the ifnet TX context or raw TX context.) */ if (drops) { - int txseq = tap->txa_start; - ATH_TXQ_UNLOCK(sc->sc_ac2q[tid->ac]); - device_printf(sc->sc_dev, - "%s: TID %d: send BAR; seq %d\n", - __func__, tid->tid, txseq); - - /* XXX TODO: send BAR */ - } else { - ATH_TXQ_UNLOCK(sc->sc_ac2q[tid->ac]); + /* Suspend the TX queue and get ready to send the BAR */ + ath_tx_tid_bar_suspend(sc, tid); } + ATH_TXQ_UNLOCK(sc->sc_ac2q[tid->ac]); + + /* + * Send BAR if required + */ + ATH_TXQ_LOCK(sc->sc_ac2q[tid->ac]); + if (ath_tx_tid_bar_tx_ready(sc, tid)) + ath_tx_tid_bar_tx(sc, tid); + ATH_TXQ_UNLOCK(sc->sc_ac2q[tid->ac]); + /* Complete frames which errored out */ while ((bf = TAILQ_FIRST(&bf_cq)) != NULL) { TAILQ_REMOVE(&bf_cq, bf, bf_list); @@ -3328,6 +3481,10 @@ ath_tx_comp_cleanup_aggr(struct ath_soft atid->cleanup_inprogress = 0; ath_tx_tid_resume(sc, atid); } + + /* Send BAR if required */ + if (ath_tx_tid_bar_tx_ready(sc, atid)) + ath_tx_tid_bar_tx(sc, atid); ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); /* Handle frame completion */ @@ -3542,9 +3699,10 @@ ath_tx_aggr_comp_aggr(struct ath_softc * * send bar if we dropped any frames */ if (drops) { - device_printf(sc->sc_dev, - "%s: TID %d: send BAR; seq %d\n", __func__, tid, txseq); - /* XXX TODO: send BAR */ + /* Suspend the TX queue and get ready to send the BAR */ + ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); + ath_tx_tid_bar_suspend(sc, atid); + ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); } /* Prepend all frames to the beginning of the queue */ @@ -3559,6 +3717,14 @@ ath_tx_aggr_comp_aggr(struct ath_softc * DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: txa_start now %d\n", __func__, tap->txa_start); + /* + * Send BAR if required + */ + ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); + if (ath_tx_tid_bar_tx_ready(sc, atid)) + ath_tx_tid_bar_tx(sc, atid); + ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); + /* Do deferred completion */ while ((bf = TAILQ_FIRST(&bf_cq)) != NULL) { TAILQ_REMOVE(&bf_cq, bf, bf_list); @@ -3652,6 +3818,12 @@ ath_tx_aggr_comp_unaggr(struct ath_softc __func__, SEQNO(bf->bf_state.bfs_seqno)); } + /* + * Send BAR if required + */ + if (ath_tx_tid_bar_tx_ready(sc, atid)) + ath_tx_tid_bar_tx(sc, atid); + ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); ath_tx_default_comp(sc, bf, fail); @@ -4080,7 +4252,9 @@ ath_addba_request(struct ieee80211_node * it'll be "after" the left edge of the BAW and thus it'll * fall within it. */ + ATH_TXQ_LOCK(sc->sc_ac2q[atid->tid]); ath_tx_tid_pause(sc, atid); + ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->tid]); DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: called; dialogtoken=%d, baparamset=%d, batimeout=%d\n", @@ -4166,7 +4340,9 @@ ath_addba_stop(struct ieee80211_node *ni DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: called\n", __func__); /* Pause TID traffic early, so there aren't any races */ + ATH_TXQ_LOCK(sc->sc_ac2q[atid->tid]); ath_tx_tid_pause(sc, atid); + ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->tid]); /* There's no need to hold the TXQ lock here */ sc->sc_addba_stop(ni, tap); @@ -4213,7 +4389,7 @@ ath_bar_response(struct ieee80211_node * */ if (status == 0 || attempts == 50) { ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); - ath_tx_tid_resume(sc, atid); + ath_tx_tid_bar_unsuspend(sc, atid); ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); } } Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Wed Apr 4 23:40:29 2012 (r233907) +++ head/sys/dev/ath/if_athvar.h Wed Apr 4 23:45:15 2012 (r233908) @@ -106,6 +106,8 @@ struct ath_tid { TAILQ_ENTRY(ath_tid) axq_qelem; int sched; int paused; /* >0 if the TID has been paused */ + int bar_wait; /* waiting for BAR */ + int bar_tx; /* BAR TXed */ /* * Is the TID being cleaned up after a transition From owner-svn-src-head@FreeBSD.ORG Wed Apr 4 23:58:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBE44106566C; Wed, 4 Apr 2012 23:58:41 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B78D78FC0C; Wed, 4 Apr 2012 23:58:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34Nwf97031231; Wed, 4 Apr 2012 23:58:41 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34Nwfdp031229; Wed, 4 Apr 2012 23:58:41 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201204042358.q34Nwfdp031229@svn.freebsd.org> From: Doug Barton Date: Wed, 4 Apr 2012 23:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233909 - head/share/doc/bind9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 Apr 2012 23:58:41 -0000 Author: dougb Date: Wed Apr 4 23:58:41 2012 New Revision: 233909 URL: http://svn.freebsd.org/changeset/base/233909 Log: Add Bv9ARM.pdf to the list of docs to install. Modified: head/share/doc/bind9/Makefile Modified: head/share/doc/bind9/Makefile ============================================================================== --- head/share/doc/bind9/Makefile Wed Apr 4 23:45:15 2012 (r233908) +++ head/share/doc/bind9/Makefile Wed Apr 4 23:58:41 2012 (r233909) @@ -15,7 +15,7 @@ TOPDIR= ${DOCDIR}/bind9 ARM= Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html \ Bv9ARM.ch04.html Bv9ARM.ch05.html Bv9ARM.ch06.html \ Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html \ - Bv9ARM.ch10.html Bv9ARM.html \ + Bv9ARM.ch10.html Bv9ARM.html Bv9ARM.pdf \ man.arpaname.html man.ddns-confgen.html man.dig.html \ man.dnssec-dsfromkey.html man.dnssec-keyfromlabel.html \ man.dnssec-keygen.html man.dnssec-revoke.html \ From owner-svn-src-head@FreeBSD.ORG Thu Apr 5 02:24:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50F2A106566C; Thu, 5 Apr 2012 02:24:09 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B3E98FC08; Thu, 5 Apr 2012 02:24:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q352O94C035772; Thu, 5 Apr 2012 02:24:09 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q352O8ol035767; Thu, 5 Apr 2012 02:24:08 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201204050224.q352O8ol035767@svn.freebsd.org> From: David Xu Date: Thu, 5 Apr 2012 02:24:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233912 - in head: lib/libthr/thread sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Apr 2012 02:24:09 -0000 Author: davidxu Date: Thu Apr 5 02:24:08 2012 New Revision: 233912 URL: http://svn.freebsd.org/changeset/base/233912 Log: umtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses a mutex after a thread has unlocked it, it event writes data to the mutex memory to clear contention bit, there is a race that other threads can lock it and unlock it, then destroy it, so it should not write data to the mutex memory if there isn't any waiter. The new operation UMTX_OP_MUTEX_WAKE2 try to fix the problem. It requires thread library to clear the lock word entirely, then call the WAKE2 operation to check if there is any waiter in kernel, and try to wake up a thread, if necessary, the contention bit is set again by the operation. This also mitgates the chance that other threads find the contention bit and try to enter kernel to compete with each other to wake up sleeping thread, this is unnecessary. With this change, the mutex owner is no longer holding the mutex until it reaches a point where kernel umtx queue is locked, it releases the mutex as soon as possible. Performance is improved when the mutex is contensted heavily. On Intel i3-2310M, the runtime of a benchmark program is reduced from 26.87 seconds to 2.39 seconds, it even is better than UMTX_OP_MUTEX_WAKE which is deprecated now. http://people.freebsd.org/~davidxu/bench/mutex_perf.c Modified: head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_umtx.h head/sys/kern/kern_umtx.c head/sys/sys/umtx.h Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Thu Apr 5 00:53:21 2012 (r233911) +++ head/lib/libthr/thread/thr_private.h Thu Apr 5 02:24:08 2012 (r233912) @@ -834,8 +834,6 @@ ssize_t __sys_write(int, const void *, s void __sys_exit(int); #endif -int _umtx_op_err(void *, int op, u_long, void *, void *) __hidden; - static inline int _thr_isthreaded(void) { Modified: head/lib/libthr/thread/thr_umtx.h ============================================================================== --- head/lib/libthr/thread/thr_umtx.h Thu Apr 5 00:53:21 2012 (r233911) +++ head/lib/libthr/thread/thr_umtx.h Thu Apr 5 02:24:08 2012 (r233912) @@ -35,6 +35,7 @@ #define DEFAULT_UMUTEX {0,0,{0,0},{0,0,0,0}} #define DEFAULT_URWLOCK {0,0,0,0,{0,0,0,0}} +int _umtx_op_err(void *, int op, u_long, void *, void *) __hidden; int __thr_umutex_lock(struct umutex *mtx, uint32_t id) __hidden; int __thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) __hidden; int __thr_umutex_timedlock(struct umutex *mtx, uint32_t id, @@ -121,9 +122,23 @@ _thr_umutex_timedlock(struct umutex *mtx static inline int _thr_umutex_unlock(struct umutex *mtx, uint32_t id) { - if (atomic_cmpset_rel_32(&mtx->m_owner, id, UMUTEX_UNOWNED)) - return (0); - return (__thr_umutex_unlock(mtx, id)); + uint32_t flags = mtx->m_flags; + + if ((flags & (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT)) == 0) { + uint32_t owner; + do { + owner = mtx->m_owner; + if (__predict_false((owner & ~UMUTEX_CONTESTED) != id)) + return (EPERM); + } while (__predict_false(!atomic_cmpset_rel_32(&mtx->m_owner, + owner, UMUTEX_UNOWNED))); + if ((owner & UMUTEX_CONTESTED)) + (void)_umtx_op_err(mtx, UMTX_OP_MUTEX_WAKE2, flags, 0, 0); + return (0); + } + if (atomic_cmpset_rel_32(&mtx->m_owner, id, UMUTEX_UNOWNED)) + return (0); + return (__thr_umutex_unlock(mtx, id)); } static inline int Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Thu Apr 5 00:53:21 2012 (r233911) +++ head/sys/kern/kern_umtx.c Thu Apr 5 02:24:08 2012 (r233912) @@ -1319,6 +1319,78 @@ do_wake_umutex(struct thread *td, struct return (0); } +/* + * Check if the mutex has waiters and tries to fix contention bit. + */ +static int +do_wake2_umutex(struct thread *td, struct umutex *m, uint32_t flags) +{ + struct umtx_key key; + uint32_t owner, old; + int type; + int error; + int count; + + switch(flags & (UMUTEX_PRIO_INHERIT | UMUTEX_PRIO_PROTECT)) { + case 0: + type = TYPE_NORMAL_UMUTEX; + break; + case UMUTEX_PRIO_INHERIT: + type = TYPE_PI_UMUTEX; + break; + case UMUTEX_PRIO_PROTECT: + type = TYPE_PP_UMUTEX; + break; + default: + return (EINVAL); + } + if ((error = umtx_key_get(m, type, GET_SHARE(flags), + &key)) != 0) + return (error); + + owner = 0; + umtxq_lock(&key); + umtxq_busy(&key); + count = umtxq_count(&key); + umtxq_unlock(&key); + /* + * Only repair contention bit if there is a waiter, this means the mutex + * is still being referenced by userland code, otherwise don't update + * any memory. + */ + if (count > 1) { + owner = fuword32(__DEVOLATILE(uint32_t *, &m->m_owner)); + while ((owner & UMUTEX_CONTESTED) ==0) { + old = casuword32(&m->m_owner, owner, + owner|UMUTEX_CONTESTED); + if (old == owner) + break; + owner = old; + } + } else if (count == 1) { + owner = fuword32(__DEVOLATILE(uint32_t *, &m->m_owner)); + while ((owner & ~UMUTEX_CONTESTED) != 0 && + (owner & UMUTEX_CONTESTED) == 0) { + old = casuword32(&m->m_owner, owner, + owner|UMUTEX_CONTESTED); + if (old == owner) + break; + owner = old; + } + } + umtxq_lock(&key); + if (owner == -1) { + error = EFAULT; + umtxq_signal(&key, INT_MAX); + } + else if (count != 0 && (owner & ~UMUTEX_CONTESTED) == 0) + umtxq_signal(&key, 1); + umtxq_unbusy(&key); + umtxq_unlock(&key); + umtx_key_release(&key); + return (error); +} + static inline struct umtx_pi * umtx_pi_alloc(int flags) { @@ -3152,6 +3224,12 @@ __umtx_op_sem_wake(struct thread *td, st return do_sem_wake(td, uap->obj); } +static int +__umtx_op_wake2_umutex(struct thread *td, struct _umtx_op_args *uap) +{ + return do_wake2_umutex(td, uap->obj, uap->val); +} + typedef int (*_umtx_op_func)(struct thread *td, struct _umtx_op_args *uap); static _umtx_op_func op_table[] = { @@ -3176,7 +3254,8 @@ static _umtx_op_func op_table[] = { __umtx_op_wake_umutex, /* UMTX_OP_UMUTEX_WAKE */ __umtx_op_sem_wait, /* UMTX_OP_SEM_WAIT */ __umtx_op_sem_wake, /* UMTX_OP_SEM_WAKE */ - __umtx_op_nwake_private /* UMTX_OP_NWAKE_PRIVATE */ + __umtx_op_nwake_private, /* UMTX_OP_NWAKE_PRIVATE */ + __umtx_op_wake2_umutex /* UMTX_OP_UMUTEX_WAKE2 */ }; int @@ -3478,7 +3557,8 @@ static _umtx_op_func op_table_compat32[] __umtx_op_wake_umutex, /* UMTX_OP_UMUTEX_WAKE */ __umtx_op_sem_wait_compat32, /* UMTX_OP_SEM_WAIT */ __umtx_op_sem_wake, /* UMTX_OP_SEM_WAKE */ - __umtx_op_nwake_private32 /* UMTX_OP_NWAKE_PRIVATE */ + __umtx_op_nwake_private32, /* UMTX_OP_NWAKE_PRIVATE */ + __umtx_op_wake2_umutex /* UMTX_OP_UMUTEX_WAKE2 */ }; int Modified: head/sys/sys/umtx.h ============================================================================== --- head/sys/sys/umtx.h Thu Apr 5 00:53:21 2012 (r233911) +++ head/sys/sys/umtx.h Thu Apr 5 02:24:08 2012 (r233912) @@ -76,11 +76,12 @@ #define UMTX_OP_WAIT_UINT_PRIVATE 15 #define UMTX_OP_WAKE_PRIVATE 16 #define UMTX_OP_MUTEX_WAIT 17 -#define UMTX_OP_MUTEX_WAKE 18 +#define UMTX_OP_MUTEX_WAKE 18 /* deprecated */ #define UMTX_OP_SEM_WAIT 19 #define UMTX_OP_SEM_WAKE 20 #define UMTX_OP_NWAKE_PRIVATE 21 -#define UMTX_OP_MAX 22 +#define UMTX_OP_MUTEX_WAKE2 22 +#define UMTX_OP_MAX 23 /* Flags for UMTX_OP_CV_WAIT */ #define CVWAIT_CHECK_UNPARKING 0x01 From owner-svn-src-head@FreeBSD.ORG Thu Apr 5 03:05:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60C0F106566B; Thu, 5 Apr 2012 03:05:03 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 472748FC12; Thu, 5 Apr 2012 03:05:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q35353I6037185; Thu, 5 Apr 2012 03:05:03 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35352O4037183; Thu, 5 Apr 2012 03:05:02 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201204050305.q35352O4037183@svn.freebsd.org> From: David Xu Date: Thu, 5 Apr 2012 03:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233913 - in head: lib/libc/gen sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Apr 2012 03:05:03 -0000 Author: davidxu Date: Thu Apr 5 03:05:02 2012 New Revision: 233913 URL: http://svn.freebsd.org/changeset/base/233913 Log: In sem_post, the field _has_waiters is no longer used, because some application destroys semaphore after sem_wait returns. Just enter kernel to wake up sleeping threads, only update _has_waiters if it is safe. While here, check if the value exceed SEM_VALUE_MAX and return EOVERFLOW if this is true. Modified: head/lib/libc/gen/sem_new.c head/sys/kern/kern_umtx.c Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Thu Apr 5 02:24:08 2012 (r233912) +++ head/lib/libc/gen/sem_new.c Thu Apr 5 03:05:02 2012 (r233913) @@ -332,9 +332,6 @@ _sem_getvalue(sem_t * __restrict sem, in static __inline int usem_wake(struct _usem *sem) { - rmb(); - if (!sem->_has_waiters) - return (0); return _umtx_op(sem, UMTX_OP_SEM_WAKE, 0, NULL, NULL); } @@ -374,17 +371,6 @@ _sem_trywait(sem_t *sem) return (-1); } -#define TIMESPEC_SUB(dst, src, val) \ - do { \ - (dst)->tv_sec = (src)->tv_sec - (val)->tv_sec; \ - (dst)->tv_nsec = (src)->tv_nsec - (val)->tv_nsec; \ - if ((dst)->tv_nsec < 0) { \ - (dst)->tv_sec--; \ - (dst)->tv_nsec += 1000000000; \ - } \ - } while (0) - - int _sem_timedwait(sem_t * __restrict sem, const struct timespec * __restrict abstime) @@ -438,10 +424,16 @@ _sem_wait(sem_t *sem) int _sem_post(sem_t *sem) { + unsigned int count; if (sem_check_validity(sem) != 0) return (-1); - atomic_add_rel_int(&sem->_kern._count, 1); - return usem_wake(&sem->_kern); + do { + count = sem->_kern._count; + if (count + 1 > SEM_VALUE_MAX) + return (EOVERFLOW); + } while(!atomic_cmpset_rel_int(&sem->_kern._count, count, count+1)); + (void)usem_wake(&sem->_kern); + return (0); } Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Thu Apr 5 02:24:08 2012 (r233912) +++ head/sys/kern/kern_umtx.c Thu Apr 5 03:05:02 2012 (r233913) @@ -2840,9 +2840,7 @@ do_sem_wait(struct thread *td, struct _u umtxq_busy(&uq->uq_key); umtxq_insert(uq); umtxq_unlock(&uq->uq_key); - casuword32(__DEVOLATILE(uint32_t *, &sem->_has_waiters), 0, 1); - rmb(); count = fuword32(__DEVOLATILE(uint32_t *, &sem->_count)); if (count != 0) { umtxq_lock(&uq->uq_key); @@ -2876,7 +2874,7 @@ static int do_sem_wake(struct thread *td, struct _usem *sem) { struct umtx_key key; - int error, cnt, nwake; + int error, cnt; uint32_t flags; flags = fuword32(&sem->_flags); @@ -2885,12 +2883,19 @@ do_sem_wake(struct thread *td, struct _u umtxq_lock(&key); umtxq_busy(&key); cnt = umtxq_count(&key); - nwake = umtxq_signal(&key, 1); - if (cnt <= nwake) { - umtxq_unlock(&key); - error = suword32( - __DEVOLATILE(uint32_t *, &sem->_has_waiters), 0); - umtxq_lock(&key); + if (cnt > 0) { + umtxq_signal(&key, 1); + /* + * Check if count is greater than 0, this means the memory is + * still being referenced by user code, so we can safely + * update _has_waiters flag. + */ + if (cnt == 1) { + umtxq_unlock(&key); + error = suword32( + __DEVOLATILE(uint32_t *, &sem->_has_waiters), 0); + umtxq_lock(&key); + } } umtxq_unbusy(&key); umtxq_unlock(&key); From owner-svn-src-head@FreeBSD.ORG Thu Apr 5 04:29:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31F061065675; Thu, 5 Apr 2012 04:29:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17CCB8FC08; Thu, 5 Apr 2012 04:29:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q354Tcqb039993; Thu, 5 Apr 2012 04:29:38 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q354Tblk039964; Thu, 5 Apr 2012 04:29:37 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201204050429.q354Tblk039964@svn.freebsd.org> From: Doug Barton Date: Thu, 5 Apr 2012 04:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233914 - in head: contrib/bind9 contrib/bind9/bin contrib/bind9/bin/check contrib/bind9/bin/confgen contrib/bind9/bin/confgen/include/confgen contrib/bind9/bin/confgen/unix contrib/bin... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Apr 2012 04:29:38 -0000 Author: dougb Date: Thu Apr 5 04:29:35 2012 New Revision: 233914 URL: http://svn.freebsd.org/changeset/base/233914 Log: Update to version 9.8.2, the latest from ISC, which contains numerous bug fixes. Deleted: head/contrib/bind9/bin/rndc/unix/ Modified: head/contrib/bind9/CHANGES head/contrib/bind9/COPYRIGHT head/contrib/bind9/FAQ.xml head/contrib/bind9/Makefile.in head/contrib/bind9/README head/contrib/bind9/acconfig.h head/contrib/bind9/bin/Makefile.in head/contrib/bind9/bin/check/Makefile.in head/contrib/bind9/bin/check/check-tool.c head/contrib/bind9/bin/check/check-tool.h head/contrib/bind9/bin/check/named-checkconf.8 head/contrib/bind9/bin/check/named-checkconf.c head/contrib/bind9/bin/check/named-checkconf.docbook head/contrib/bind9/bin/check/named-checkconf.html head/contrib/bind9/bin/check/named-checkzone.8 head/contrib/bind9/bin/check/named-checkzone.c head/contrib/bind9/bin/check/named-checkzone.docbook head/contrib/bind9/bin/check/named-checkzone.html head/contrib/bind9/bin/confgen/Makefile.in head/contrib/bind9/bin/confgen/ddns-confgen.8 head/contrib/bind9/bin/confgen/ddns-confgen.c head/contrib/bind9/bin/confgen/ddns-confgen.docbook head/contrib/bind9/bin/confgen/ddns-confgen.html head/contrib/bind9/bin/confgen/include/confgen/os.h head/contrib/bind9/bin/confgen/keygen.c head/contrib/bind9/bin/confgen/keygen.h head/contrib/bind9/bin/confgen/rndc-confgen.8 head/contrib/bind9/bin/confgen/rndc-confgen.c head/contrib/bind9/bin/confgen/rndc-confgen.docbook head/contrib/bind9/bin/confgen/rndc-confgen.html head/contrib/bind9/bin/confgen/unix/Makefile.in head/contrib/bind9/bin/confgen/unix/os.c head/contrib/bind9/bin/confgen/util.c head/contrib/bind9/bin/confgen/util.h head/contrib/bind9/bin/dig/Makefile.in head/contrib/bind9/bin/dig/dig.1 head/contrib/bind9/bin/dig/dig.c head/contrib/bind9/bin/dig/dig.docbook head/contrib/bind9/bin/dig/dig.html head/contrib/bind9/bin/dig/dighost.c head/contrib/bind9/bin/dig/host.1 head/contrib/bind9/bin/dig/host.c head/contrib/bind9/bin/dig/host.docbook head/contrib/bind9/bin/dig/host.html head/contrib/bind9/bin/dig/include/dig/dig.h head/contrib/bind9/bin/dig/nslookup.1 head/contrib/bind9/bin/dig/nslookup.c head/contrib/bind9/bin/dig/nslookup.docbook head/contrib/bind9/bin/dig/nslookup.html head/contrib/bind9/bin/dnssec/Makefile.in head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.8 head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.html head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html head/contrib/bind9/bin/dnssec/dnssec-keygen.8 head/contrib/bind9/bin/dnssec/dnssec-keygen.c head/contrib/bind9/bin/dnssec/dnssec-keygen.docbook head/contrib/bind9/bin/dnssec/dnssec-keygen.html head/contrib/bind9/bin/dnssec/dnssec-revoke.8 head/contrib/bind9/bin/dnssec/dnssec-revoke.c head/contrib/bind9/bin/dnssec/dnssec-revoke.docbook head/contrib/bind9/bin/dnssec/dnssec-revoke.html head/contrib/bind9/bin/dnssec/dnssec-settime.8 head/contrib/bind9/bin/dnssec/dnssec-settime.c head/contrib/bind9/bin/dnssec/dnssec-settime.docbook head/contrib/bind9/bin/dnssec/dnssec-settime.html head/contrib/bind9/bin/dnssec/dnssec-signzone.8 head/contrib/bind9/bin/dnssec/dnssec-signzone.c head/contrib/bind9/bin/dnssec/dnssec-signzone.docbook head/contrib/bind9/bin/dnssec/dnssec-signzone.html head/contrib/bind9/bin/dnssec/dnssectool.c head/contrib/bind9/bin/dnssec/dnssectool.h head/contrib/bind9/bin/named/Makefile.in head/contrib/bind9/bin/named/bind.keys.h head/contrib/bind9/bin/named/bind9.xsl head/contrib/bind9/bin/named/bind9.xsl.h head/contrib/bind9/bin/named/builtin.c head/contrib/bind9/bin/named/client.c head/contrib/bind9/bin/named/config.c head/contrib/bind9/bin/named/control.c head/contrib/bind9/bin/named/controlconf.c head/contrib/bind9/bin/named/convertxsl.pl head/contrib/bind9/bin/named/include/dlz/dlz_dlopen_driver.h head/contrib/bind9/bin/named/include/named/builtin.h head/contrib/bind9/bin/named/include/named/client.h head/contrib/bind9/bin/named/include/named/config.h head/contrib/bind9/bin/named/include/named/control.h head/contrib/bind9/bin/named/include/named/globals.h head/contrib/bind9/bin/named/include/named/interfacemgr.h head/contrib/bind9/bin/named/include/named/listenlist.h head/contrib/bind9/bin/named/include/named/log.h head/contrib/bind9/bin/named/include/named/logconf.h head/contrib/bind9/bin/named/include/named/lwaddr.h head/contrib/bind9/bin/named/include/named/lwdclient.h head/contrib/bind9/bin/named/include/named/lwresd.h head/contrib/bind9/bin/named/include/named/lwsearch.h head/contrib/bind9/bin/named/include/named/main.h head/contrib/bind9/bin/named/include/named/notify.h head/contrib/bind9/bin/named/include/named/ns_smf_globals.h head/contrib/bind9/bin/named/include/named/query.h head/contrib/bind9/bin/named/include/named/server.h head/contrib/bind9/bin/named/include/named/sortlist.h head/contrib/bind9/bin/named/include/named/statschannel.h head/contrib/bind9/bin/named/include/named/tkeyconf.h head/contrib/bind9/bin/named/include/named/tsigconf.h head/contrib/bind9/bin/named/include/named/types.h head/contrib/bind9/bin/named/include/named/update.h head/contrib/bind9/bin/named/include/named/xfrout.h head/contrib/bind9/bin/named/include/named/zoneconf.h head/contrib/bind9/bin/named/interfacemgr.c head/contrib/bind9/bin/named/listenlist.c head/contrib/bind9/bin/named/log.c head/contrib/bind9/bin/named/logconf.c head/contrib/bind9/bin/named/lwaddr.c head/contrib/bind9/bin/named/lwdclient.c head/contrib/bind9/bin/named/lwderror.c head/contrib/bind9/bin/named/lwdgabn.c head/contrib/bind9/bin/named/lwdgnba.c head/contrib/bind9/bin/named/lwdgrbn.c head/contrib/bind9/bin/named/lwdnoop.c head/contrib/bind9/bin/named/lwresd.8 head/contrib/bind9/bin/named/lwresd.c head/contrib/bind9/bin/named/lwresd.docbook head/contrib/bind9/bin/named/lwresd.html head/contrib/bind9/bin/named/lwsearch.c head/contrib/bind9/bin/named/main.c head/contrib/bind9/bin/named/named.8 head/contrib/bind9/bin/named/named.conf.5 head/contrib/bind9/bin/named/named.conf.docbook head/contrib/bind9/bin/named/named.conf.html head/contrib/bind9/bin/named/named.docbook head/contrib/bind9/bin/named/named.html head/contrib/bind9/bin/named/notify.c head/contrib/bind9/bin/named/query.c head/contrib/bind9/bin/named/server.c head/contrib/bind9/bin/named/sortlist.c head/contrib/bind9/bin/named/statschannel.c head/contrib/bind9/bin/named/tkeyconf.c head/contrib/bind9/bin/named/tsigconf.c head/contrib/bind9/bin/named/unix/Makefile.in head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c head/contrib/bind9/bin/named/unix/include/named/os.h head/contrib/bind9/bin/named/unix/os.c head/contrib/bind9/bin/named/update.c head/contrib/bind9/bin/named/xfrout.c head/contrib/bind9/bin/named/zoneconf.c head/contrib/bind9/bin/nsupdate/Makefile.in head/contrib/bind9/bin/nsupdate/nsupdate.1 head/contrib/bind9/bin/nsupdate/nsupdate.c head/contrib/bind9/bin/nsupdate/nsupdate.docbook head/contrib/bind9/bin/nsupdate/nsupdate.html head/contrib/bind9/bin/rndc/Makefile.in head/contrib/bind9/bin/rndc/include/rndc/os.h head/contrib/bind9/bin/rndc/rndc.8 head/contrib/bind9/bin/rndc/rndc.c head/contrib/bind9/bin/rndc/rndc.conf head/contrib/bind9/bin/rndc/rndc.conf.5 head/contrib/bind9/bin/rndc/rndc.conf.docbook head/contrib/bind9/bin/rndc/rndc.conf.html head/contrib/bind9/bin/rndc/rndc.docbook head/contrib/bind9/bin/rndc/rndc.html head/contrib/bind9/bin/rndc/util.c head/contrib/bind9/bin/rndc/util.h head/contrib/bind9/bin/tools/Makefile.in head/contrib/bind9/bin/tools/arpaname.1 head/contrib/bind9/bin/tools/arpaname.c head/contrib/bind9/bin/tools/arpaname.docbook head/contrib/bind9/bin/tools/arpaname.html head/contrib/bind9/bin/tools/genrandom.8 head/contrib/bind9/bin/tools/genrandom.c head/contrib/bind9/bin/tools/genrandom.docbook head/contrib/bind9/bin/tools/genrandom.html head/contrib/bind9/bin/tools/isc-hmac-fixup.8 head/contrib/bind9/bin/tools/isc-hmac-fixup.c head/contrib/bind9/bin/tools/isc-hmac-fixup.docbook head/contrib/bind9/bin/tools/isc-hmac-fixup.html head/contrib/bind9/bin/tools/named-journalprint.8 head/contrib/bind9/bin/tools/named-journalprint.c head/contrib/bind9/bin/tools/named-journalprint.docbook head/contrib/bind9/bin/tools/named-journalprint.html head/contrib/bind9/bin/tools/nsec3hash.8 head/contrib/bind9/bin/tools/nsec3hash.c head/contrib/bind9/bin/tools/nsec3hash.docbook head/contrib/bind9/bin/tools/nsec3hash.html head/contrib/bind9/config.h.in head/contrib/bind9/config.threads.in head/contrib/bind9/configure.in head/contrib/bind9/doc/Makefile.in head/contrib/bind9/doc/arm/Bv9ARM-book.xml head/contrib/bind9/doc/arm/Bv9ARM.ch01.html head/contrib/bind9/doc/arm/Bv9ARM.ch02.html head/contrib/bind9/doc/arm/Bv9ARM.ch03.html head/contrib/bind9/doc/arm/Bv9ARM.ch04.html head/contrib/bind9/doc/arm/Bv9ARM.ch05.html head/contrib/bind9/doc/arm/Bv9ARM.ch06.html head/contrib/bind9/doc/arm/Bv9ARM.ch07.html head/contrib/bind9/doc/arm/Bv9ARM.ch08.html head/contrib/bind9/doc/arm/Bv9ARM.ch09.html head/contrib/bind9/doc/arm/Bv9ARM.ch10.html head/contrib/bind9/doc/arm/Bv9ARM.html head/contrib/bind9/doc/arm/Bv9ARM.pdf head/contrib/bind9/doc/arm/Makefile.in head/contrib/bind9/doc/arm/README-SGML head/contrib/bind9/doc/arm/dnssec.xml head/contrib/bind9/doc/arm/libdns.xml head/contrib/bind9/doc/arm/man.arpaname.html head/contrib/bind9/doc/arm/man.ddns-confgen.html head/contrib/bind9/doc/arm/man.dig.html head/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html head/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html head/contrib/bind9/doc/arm/man.dnssec-keygen.html head/contrib/bind9/doc/arm/man.dnssec-revoke.html head/contrib/bind9/doc/arm/man.dnssec-settime.html head/contrib/bind9/doc/arm/man.dnssec-signzone.html head/contrib/bind9/doc/arm/man.genrandom.html head/contrib/bind9/doc/arm/man.host.html head/contrib/bind9/doc/arm/man.isc-hmac-fixup.html head/contrib/bind9/doc/arm/man.named-checkconf.html head/contrib/bind9/doc/arm/man.named-checkzone.html head/contrib/bind9/doc/arm/man.named-journalprint.html head/contrib/bind9/doc/arm/man.named.html head/contrib/bind9/doc/arm/man.nsec3hash.html head/contrib/bind9/doc/arm/man.nsupdate.html head/contrib/bind9/doc/arm/man.rndc-confgen.html head/contrib/bind9/doc/arm/man.rndc.conf.html head/contrib/bind9/doc/arm/man.rndc.html head/contrib/bind9/doc/arm/managed-keys.xml head/contrib/bind9/doc/arm/pkcs11.xml head/contrib/bind9/doc/misc/Makefile.in head/contrib/bind9/doc/misc/dnssec head/contrib/bind9/doc/misc/format-options.pl head/contrib/bind9/doc/misc/ipv6 head/contrib/bind9/doc/misc/migration head/contrib/bind9/doc/misc/migration-4to9 head/contrib/bind9/doc/misc/options head/contrib/bind9/doc/misc/rfc-compliance head/contrib/bind9/doc/misc/roadmap head/contrib/bind9/doc/misc/sdb head/contrib/bind9/doc/misc/sort-options.pl head/contrib/bind9/isc-config.sh.in head/contrib/bind9/lib/Makefile.in head/contrib/bind9/lib/bind9/Makefile.in head/contrib/bind9/lib/bind9/api head/contrib/bind9/lib/bind9/check.c head/contrib/bind9/lib/bind9/getaddresses.c head/contrib/bind9/lib/bind9/include/Makefile.in head/contrib/bind9/lib/bind9/include/bind9/Makefile.in head/contrib/bind9/lib/bind9/include/bind9/check.h head/contrib/bind9/lib/bind9/include/bind9/getaddresses.h head/contrib/bind9/lib/bind9/include/bind9/version.h head/contrib/bind9/lib/bind9/version.c head/contrib/bind9/lib/dns/Makefile.in head/contrib/bind9/lib/dns/acache.c head/contrib/bind9/lib/dns/acl.c head/contrib/bind9/lib/dns/adb.c head/contrib/bind9/lib/dns/api head/contrib/bind9/lib/dns/byaddr.c head/contrib/bind9/lib/dns/cache.c head/contrib/bind9/lib/dns/callbacks.c head/contrib/bind9/lib/dns/client.c head/contrib/bind9/lib/dns/compress.c head/contrib/bind9/lib/dns/db.c head/contrib/bind9/lib/dns/dbiterator.c head/contrib/bind9/lib/dns/dbtable.c head/contrib/bind9/lib/dns/diff.c head/contrib/bind9/lib/dns/dispatch.c head/contrib/bind9/lib/dns/dlz.c head/contrib/bind9/lib/dns/dns64.c head/contrib/bind9/lib/dns/dnssec.c head/contrib/bind9/lib/dns/ds.c head/contrib/bind9/lib/dns/dst_api.c head/contrib/bind9/lib/dns/dst_internal.h head/contrib/bind9/lib/dns/dst_lib.c head/contrib/bind9/lib/dns/dst_openssl.h head/contrib/bind9/lib/dns/dst_parse.c head/contrib/bind9/lib/dns/dst_parse.h head/contrib/bind9/lib/dns/dst_result.c head/contrib/bind9/lib/dns/ecdb.c head/contrib/bind9/lib/dns/forward.c head/contrib/bind9/lib/dns/gen-unix.h head/contrib/bind9/lib/dns/gen.c head/contrib/bind9/lib/dns/gssapi_link.c head/contrib/bind9/lib/dns/gssapictx.c head/contrib/bind9/lib/dns/hmac_link.c head/contrib/bind9/lib/dns/include/Makefile.in head/contrib/bind9/lib/dns/include/dns/Makefile.in head/contrib/bind9/lib/dns/include/dns/acache.h head/contrib/bind9/lib/dns/include/dns/acl.h head/contrib/bind9/lib/dns/include/dns/adb.h head/contrib/bind9/lib/dns/include/dns/bit.h head/contrib/bind9/lib/dns/include/dns/byaddr.h head/contrib/bind9/lib/dns/include/dns/cache.h head/contrib/bind9/lib/dns/include/dns/callbacks.h head/contrib/bind9/lib/dns/include/dns/cert.h head/contrib/bind9/lib/dns/include/dns/client.h head/contrib/bind9/lib/dns/include/dns/compress.h head/contrib/bind9/lib/dns/include/dns/db.h head/contrib/bind9/lib/dns/include/dns/dbiterator.h head/contrib/bind9/lib/dns/include/dns/dbtable.h head/contrib/bind9/lib/dns/include/dns/diff.h head/contrib/bind9/lib/dns/include/dns/dispatch.h head/contrib/bind9/lib/dns/include/dns/dlz.h head/contrib/bind9/lib/dns/include/dns/dlz_dlopen.h head/contrib/bind9/lib/dns/include/dns/dns64.h head/contrib/bind9/lib/dns/include/dns/dnssec.h head/contrib/bind9/lib/dns/include/dns/ds.h head/contrib/bind9/lib/dns/include/dns/ecdb.h head/contrib/bind9/lib/dns/include/dns/events.h head/contrib/bind9/lib/dns/include/dns/fixedname.h head/contrib/bind9/lib/dns/include/dns/forward.h head/contrib/bind9/lib/dns/include/dns/iptable.h head/contrib/bind9/lib/dns/include/dns/journal.h head/contrib/bind9/lib/dns/include/dns/keydata.h head/contrib/bind9/lib/dns/include/dns/keyflags.h head/contrib/bind9/lib/dns/include/dns/keytable.h head/contrib/bind9/lib/dns/include/dns/keyvalues.h head/contrib/bind9/lib/dns/include/dns/lib.h head/contrib/bind9/lib/dns/include/dns/log.h head/contrib/bind9/lib/dns/include/dns/lookup.h head/contrib/bind9/lib/dns/include/dns/master.h head/contrib/bind9/lib/dns/include/dns/masterdump.h head/contrib/bind9/lib/dns/include/dns/message.h head/contrib/bind9/lib/dns/include/dns/name.h head/contrib/bind9/lib/dns/include/dns/ncache.h head/contrib/bind9/lib/dns/include/dns/nsec.h head/contrib/bind9/lib/dns/include/dns/nsec3.h head/contrib/bind9/lib/dns/include/dns/opcode.h head/contrib/bind9/lib/dns/include/dns/order.h head/contrib/bind9/lib/dns/include/dns/peer.h head/contrib/bind9/lib/dns/include/dns/portlist.h head/contrib/bind9/lib/dns/include/dns/private.h head/contrib/bind9/lib/dns/include/dns/rbt.h head/contrib/bind9/lib/dns/include/dns/rcode.h head/contrib/bind9/lib/dns/include/dns/rdata.h head/contrib/bind9/lib/dns/include/dns/rdataclass.h head/contrib/bind9/lib/dns/include/dns/rdatalist.h head/contrib/bind9/lib/dns/include/dns/rdataset.h head/contrib/bind9/lib/dns/include/dns/rdatasetiter.h head/contrib/bind9/lib/dns/include/dns/rdataslab.h head/contrib/bind9/lib/dns/include/dns/rdatatype.h head/contrib/bind9/lib/dns/include/dns/request.h head/contrib/bind9/lib/dns/include/dns/resolver.h head/contrib/bind9/lib/dns/include/dns/result.h head/contrib/bind9/lib/dns/include/dns/rootns.h head/contrib/bind9/lib/dns/include/dns/rpz.h head/contrib/bind9/lib/dns/include/dns/rriterator.h head/contrib/bind9/lib/dns/include/dns/sdb.h head/contrib/bind9/lib/dns/include/dns/sdlz.h head/contrib/bind9/lib/dns/include/dns/secalg.h head/contrib/bind9/lib/dns/include/dns/secproto.h head/contrib/bind9/lib/dns/include/dns/soa.h head/contrib/bind9/lib/dns/include/dns/ssu.h head/contrib/bind9/lib/dns/include/dns/stats.h head/contrib/bind9/lib/dns/include/dns/tcpmsg.h head/contrib/bind9/lib/dns/include/dns/time.h head/contrib/bind9/lib/dns/include/dns/timer.h head/contrib/bind9/lib/dns/include/dns/tkey.h head/contrib/bind9/lib/dns/include/dns/tsec.h head/contrib/bind9/lib/dns/include/dns/tsig.h head/contrib/bind9/lib/dns/include/dns/ttl.h head/contrib/bind9/lib/dns/include/dns/types.h head/contrib/bind9/lib/dns/include/dns/validator.h head/contrib/bind9/lib/dns/include/dns/version.h head/contrib/bind9/lib/dns/include/dns/view.h head/contrib/bind9/lib/dns/include/dns/xfrin.h head/contrib/bind9/lib/dns/include/dns/zone.h head/contrib/bind9/lib/dns/include/dns/zonekey.h head/contrib/bind9/lib/dns/include/dns/zt.h head/contrib/bind9/lib/dns/include/dst/Makefile.in head/contrib/bind9/lib/dns/include/dst/dst.h head/contrib/bind9/lib/dns/include/dst/gssapi.h head/contrib/bind9/lib/dns/include/dst/lib.h head/contrib/bind9/lib/dns/include/dst/result.h head/contrib/bind9/lib/dns/iptable.c head/contrib/bind9/lib/dns/journal.c head/contrib/bind9/lib/dns/key.c head/contrib/bind9/lib/dns/keydata.c head/contrib/bind9/lib/dns/keytable.c head/contrib/bind9/lib/dns/lib.c head/contrib/bind9/lib/dns/log.c head/contrib/bind9/lib/dns/lookup.c head/contrib/bind9/lib/dns/master.c head/contrib/bind9/lib/dns/masterdump.c head/contrib/bind9/lib/dns/message.c head/contrib/bind9/lib/dns/name.c head/contrib/bind9/lib/dns/ncache.c head/contrib/bind9/lib/dns/nsec.c head/contrib/bind9/lib/dns/nsec3.c head/contrib/bind9/lib/dns/openssl_link.c head/contrib/bind9/lib/dns/openssldh_link.c head/contrib/bind9/lib/dns/openssldsa_link.c head/contrib/bind9/lib/dns/opensslgost_link.c head/contrib/bind9/lib/dns/opensslrsa_link.c head/contrib/bind9/lib/dns/order.c head/contrib/bind9/lib/dns/peer.c head/contrib/bind9/lib/dns/portlist.c head/contrib/bind9/lib/dns/private.c head/contrib/bind9/lib/dns/rbt.c head/contrib/bind9/lib/dns/rbtdb.c head/contrib/bind9/lib/dns/rbtdb.h head/contrib/bind9/lib/dns/rbtdb64.c head/contrib/bind9/lib/dns/rbtdb64.h head/contrib/bind9/lib/dns/rcode.c head/contrib/bind9/lib/dns/rdata.c head/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c head/contrib/bind9/lib/dns/rdata/any_255/tsig_250.h head/contrib/bind9/lib/dns/rdata/ch_3/a_1.c head/contrib/bind9/lib/dns/rdata/ch_3/a_1.h head/contrib/bind9/lib/dns/rdata/generic/afsdb_18.c head/contrib/bind9/lib/dns/rdata/generic/afsdb_18.h head/contrib/bind9/lib/dns/rdata/generic/cert_37.c head/contrib/bind9/lib/dns/rdata/generic/cert_37.h head/contrib/bind9/lib/dns/rdata/generic/cname_5.c head/contrib/bind9/lib/dns/rdata/generic/cname_5.h head/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c head/contrib/bind9/lib/dns/rdata/generic/dlv_32769.h head/contrib/bind9/lib/dns/rdata/generic/dname_39.c head/contrib/bind9/lib/dns/rdata/generic/dname_39.h head/contrib/bind9/lib/dns/rdata/generic/dnskey_48.c head/contrib/bind9/lib/dns/rdata/generic/dnskey_48.h head/contrib/bind9/lib/dns/rdata/generic/ds_43.c head/contrib/bind9/lib/dns/rdata/generic/ds_43.h head/contrib/bind9/lib/dns/rdata/generic/gpos_27.c head/contrib/bind9/lib/dns/rdata/generic/gpos_27.h head/contrib/bind9/lib/dns/rdata/generic/hinfo_13.c head/contrib/bind9/lib/dns/rdata/generic/hinfo_13.h head/contrib/bind9/lib/dns/rdata/generic/hip_55.c head/contrib/bind9/lib/dns/rdata/generic/hip_55.h head/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.c head/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.h head/contrib/bind9/lib/dns/rdata/generic/isdn_20.c head/contrib/bind9/lib/dns/rdata/generic/isdn_20.h head/contrib/bind9/lib/dns/rdata/generic/key_25.c head/contrib/bind9/lib/dns/rdata/generic/key_25.h head/contrib/bind9/lib/dns/rdata/generic/keydata_65533.c head/contrib/bind9/lib/dns/rdata/generic/keydata_65533.h head/contrib/bind9/lib/dns/rdata/generic/loc_29.c head/contrib/bind9/lib/dns/rdata/generic/loc_29.h head/contrib/bind9/lib/dns/rdata/generic/mb_7.c head/contrib/bind9/lib/dns/rdata/generic/mb_7.h head/contrib/bind9/lib/dns/rdata/generic/md_3.c head/contrib/bind9/lib/dns/rdata/generic/md_3.h head/contrib/bind9/lib/dns/rdata/generic/mf_4.c head/contrib/bind9/lib/dns/rdata/generic/mf_4.h head/contrib/bind9/lib/dns/rdata/generic/mg_8.c head/contrib/bind9/lib/dns/rdata/generic/mg_8.h head/contrib/bind9/lib/dns/rdata/generic/minfo_14.c head/contrib/bind9/lib/dns/rdata/generic/minfo_14.h head/contrib/bind9/lib/dns/rdata/generic/mr_9.c head/contrib/bind9/lib/dns/rdata/generic/mr_9.h head/contrib/bind9/lib/dns/rdata/generic/mx_15.c head/contrib/bind9/lib/dns/rdata/generic/mx_15.h head/contrib/bind9/lib/dns/rdata/generic/ns_2.c head/contrib/bind9/lib/dns/rdata/generic/ns_2.h head/contrib/bind9/lib/dns/rdata/generic/nsec3_50.c head/contrib/bind9/lib/dns/rdata/generic/nsec3_50.h head/contrib/bind9/lib/dns/rdata/generic/nsec3param_51.c head/contrib/bind9/lib/dns/rdata/generic/nsec3param_51.h head/contrib/bind9/lib/dns/rdata/generic/nsec_47.c head/contrib/bind9/lib/dns/rdata/generic/nsec_47.h head/contrib/bind9/lib/dns/rdata/generic/null_10.c head/contrib/bind9/lib/dns/rdata/generic/null_10.h head/contrib/bind9/lib/dns/rdata/generic/nxt_30.c head/contrib/bind9/lib/dns/rdata/generic/nxt_30.h head/contrib/bind9/lib/dns/rdata/generic/opt_41.c head/contrib/bind9/lib/dns/rdata/generic/opt_41.h head/contrib/bind9/lib/dns/rdata/generic/proforma.c head/contrib/bind9/lib/dns/rdata/generic/proforma.h head/contrib/bind9/lib/dns/rdata/generic/ptr_12.c head/contrib/bind9/lib/dns/rdata/generic/ptr_12.h head/contrib/bind9/lib/dns/rdata/generic/rp_17.c head/contrib/bind9/lib/dns/rdata/generic/rp_17.h head/contrib/bind9/lib/dns/rdata/generic/rrsig_46.c head/contrib/bind9/lib/dns/rdata/generic/rrsig_46.h head/contrib/bind9/lib/dns/rdata/generic/rt_21.c head/contrib/bind9/lib/dns/rdata/generic/rt_21.h head/contrib/bind9/lib/dns/rdata/generic/sig_24.c head/contrib/bind9/lib/dns/rdata/generic/sig_24.h head/contrib/bind9/lib/dns/rdata/generic/soa_6.c head/contrib/bind9/lib/dns/rdata/generic/soa_6.h head/contrib/bind9/lib/dns/rdata/generic/spf_99.c head/contrib/bind9/lib/dns/rdata/generic/spf_99.h head/contrib/bind9/lib/dns/rdata/generic/sshfp_44.c head/contrib/bind9/lib/dns/rdata/generic/sshfp_44.h head/contrib/bind9/lib/dns/rdata/generic/tkey_249.c head/contrib/bind9/lib/dns/rdata/generic/tkey_249.h head/contrib/bind9/lib/dns/rdata/generic/txt_16.c head/contrib/bind9/lib/dns/rdata/generic/txt_16.h head/contrib/bind9/lib/dns/rdata/generic/unspec_103.c head/contrib/bind9/lib/dns/rdata/generic/unspec_103.h head/contrib/bind9/lib/dns/rdata/generic/x25_19.c head/contrib/bind9/lib/dns/rdata/generic/x25_19.h head/contrib/bind9/lib/dns/rdata/hs_4/a_1.c head/contrib/bind9/lib/dns/rdata/hs_4/a_1.h head/contrib/bind9/lib/dns/rdata/in_1/a6_38.c head/contrib/bind9/lib/dns/rdata/in_1/a6_38.h head/contrib/bind9/lib/dns/rdata/in_1/a_1.c head/contrib/bind9/lib/dns/rdata/in_1/a_1.h head/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.c head/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.h head/contrib/bind9/lib/dns/rdata/in_1/apl_42.c head/contrib/bind9/lib/dns/rdata/in_1/apl_42.h head/contrib/bind9/lib/dns/rdata/in_1/dhcid_49.c head/contrib/bind9/lib/dns/rdata/in_1/dhcid_49.h head/contrib/bind9/lib/dns/rdata/in_1/kx_36.c head/contrib/bind9/lib/dns/rdata/in_1/kx_36.h head/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c head/contrib/bind9/lib/dns/rdata/in_1/naptr_35.h head/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.c head/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.h head/contrib/bind9/lib/dns/rdata/in_1/nsap_22.c head/contrib/bind9/lib/dns/rdata/in_1/nsap_22.h head/contrib/bind9/lib/dns/rdata/in_1/px_26.c head/contrib/bind9/lib/dns/rdata/in_1/px_26.h head/contrib/bind9/lib/dns/rdata/in_1/srv_33.c head/contrib/bind9/lib/dns/rdata/in_1/srv_33.h head/contrib/bind9/lib/dns/rdata/in_1/wks_11.c head/contrib/bind9/lib/dns/rdata/in_1/wks_11.h head/contrib/bind9/lib/dns/rdata/rdatastructpre.h head/contrib/bind9/lib/dns/rdata/rdatastructsuf.h head/contrib/bind9/lib/dns/rdatalist.c head/contrib/bind9/lib/dns/rdatalist_p.h head/contrib/bind9/lib/dns/rdataset.c head/contrib/bind9/lib/dns/rdatasetiter.c head/contrib/bind9/lib/dns/rdataslab.c head/contrib/bind9/lib/dns/request.c head/contrib/bind9/lib/dns/resolver.c head/contrib/bind9/lib/dns/result.c head/contrib/bind9/lib/dns/rootns.c head/contrib/bind9/lib/dns/rpz.c head/contrib/bind9/lib/dns/rriterator.c head/contrib/bind9/lib/dns/sdb.c head/contrib/bind9/lib/dns/sdlz.c head/contrib/bind9/lib/dns/soa.c head/contrib/bind9/lib/dns/spnego.asn1 head/contrib/bind9/lib/dns/spnego.c head/contrib/bind9/lib/dns/spnego.h head/contrib/bind9/lib/dns/spnego_asn1.c head/contrib/bind9/lib/dns/spnego_asn1.pl head/contrib/bind9/lib/dns/ssu.c head/contrib/bind9/lib/dns/ssu_external.c head/contrib/bind9/lib/dns/stats.c head/contrib/bind9/lib/dns/tcpmsg.c head/contrib/bind9/lib/dns/time.c head/contrib/bind9/lib/dns/timer.c head/contrib/bind9/lib/dns/tkey.c head/contrib/bind9/lib/dns/tsec.c head/contrib/bind9/lib/dns/tsig.c head/contrib/bind9/lib/dns/ttl.c head/contrib/bind9/lib/dns/validator.c head/contrib/bind9/lib/dns/version.c head/contrib/bind9/lib/dns/view.c head/contrib/bind9/lib/dns/xfrin.c head/contrib/bind9/lib/dns/zone.c head/contrib/bind9/lib/dns/zonekey.c head/contrib/bind9/lib/dns/zt.c head/contrib/bind9/lib/export/Makefile.in head/contrib/bind9/lib/export/dns/Makefile.in head/contrib/bind9/lib/export/dns/include/Makefile.in head/contrib/bind9/lib/export/dns/include/dns/Makefile.in head/contrib/bind9/lib/export/dns/include/dst/Makefile.in head/contrib/bind9/lib/export/irs/Makefile.in head/contrib/bind9/lib/export/irs/include/Makefile.in head/contrib/bind9/lib/export/irs/include/irs/Makefile.in head/contrib/bind9/lib/export/isc/Makefile.in head/contrib/bind9/lib/export/isc/include/Makefile.in head/contrib/bind9/lib/export/isc/include/isc/Makefile.in head/contrib/bind9/lib/export/isc/include/isc/bind9.h head/contrib/bind9/lib/export/isc/nls/Makefile.in head/contrib/bind9/lib/export/isc/nothreads/Makefile.in head/contrib/bind9/lib/export/isc/nothreads/include/Makefile.in head/contrib/bind9/lib/export/isc/nothreads/include/isc/Makefile.in head/contrib/bind9/lib/export/isc/pthreads/Makefile.in head/contrib/bind9/lib/export/isc/pthreads/include/Makefile.in head/contrib/bind9/lib/export/isc/pthreads/include/isc/Makefile.in head/contrib/bind9/lib/export/isc/unix/Makefile.in head/contrib/bind9/lib/export/isc/unix/include/Makefile.in head/contrib/bind9/lib/export/isc/unix/include/isc/Makefile.in head/contrib/bind9/lib/export/isccfg/Makefile.in head/contrib/bind9/lib/export/isccfg/include/Makefile.in head/contrib/bind9/lib/export/isccfg/include/isccfg/Makefile.in head/contrib/bind9/lib/export/samples/Makefile-postinstall.in head/contrib/bind9/lib/export/samples/Makefile.in head/contrib/bind9/lib/export/samples/nsprobe.c head/contrib/bind9/lib/export/samples/sample-async.c head/contrib/bind9/lib/export/samples/sample-gai.c head/contrib/bind9/lib/export/samples/sample-request.c head/contrib/bind9/lib/export/samples/sample-update.c head/contrib/bind9/lib/export/samples/sample.c head/contrib/bind9/lib/irs/Makefile.in head/contrib/bind9/lib/irs/api head/contrib/bind9/lib/irs/context.c head/contrib/bind9/lib/irs/dnsconf.c head/contrib/bind9/lib/irs/gai_strerror.c head/contrib/bind9/lib/irs/getaddrinfo.c head/contrib/bind9/lib/irs/getnameinfo.c head/contrib/bind9/lib/irs/include/Makefile.in head/contrib/bind9/lib/irs/include/irs/Makefile.in head/contrib/bind9/lib/irs/include/irs/context.h head/contrib/bind9/lib/irs/include/irs/dnsconf.h head/contrib/bind9/lib/irs/include/irs/netdb.h.in head/contrib/bind9/lib/irs/include/irs/platform.h.in head/contrib/bind9/lib/irs/include/irs/resconf.h head/contrib/bind9/lib/irs/include/irs/types.h head/contrib/bind9/lib/irs/include/irs/version.h head/contrib/bind9/lib/irs/resconf.c head/contrib/bind9/lib/irs/version.c head/contrib/bind9/lib/isc/Makefile.in head/contrib/bind9/lib/isc/alpha/Makefile.in head/contrib/bind9/lib/isc/alpha/include/Makefile.in head/contrib/bind9/lib/isc/alpha/include/isc/Makefile.in head/contrib/bind9/lib/isc/alpha/include/isc/atomic.h head/contrib/bind9/lib/isc/api head/contrib/bind9/lib/isc/app_api.c head/contrib/bind9/lib/isc/assertions.c head/contrib/bind9/lib/isc/backtrace-emptytbl.c head/contrib/bind9/lib/isc/backtrace.c head/contrib/bind9/lib/isc/base32.c head/contrib/bind9/lib/isc/base64.c head/contrib/bind9/lib/isc/bitstring.c head/contrib/bind9/lib/isc/buffer.c head/contrib/bind9/lib/isc/bufferlist.c head/contrib/bind9/lib/isc/commandline.c head/contrib/bind9/lib/isc/entropy.c head/contrib/bind9/lib/isc/error.c head/contrib/bind9/lib/isc/event.c head/contrib/bind9/lib/isc/fsaccess.c head/contrib/bind9/lib/isc/hash.c head/contrib/bind9/lib/isc/heap.c head/contrib/bind9/lib/isc/hex.c head/contrib/bind9/lib/isc/hmacmd5.c head/contrib/bind9/lib/isc/hmacsha.c head/contrib/bind9/lib/isc/httpd.c head/contrib/bind9/lib/isc/ia64/Makefile.in head/contrib/bind9/lib/isc/ia64/include/Makefile.in head/contrib/bind9/lib/isc/ia64/include/isc/Makefile.in head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h head/contrib/bind9/lib/isc/include/Makefile.in head/contrib/bind9/lib/isc/include/isc/Makefile.in head/contrib/bind9/lib/isc/include/isc/app.h head/contrib/bind9/lib/isc/include/isc/assertions.h head/contrib/bind9/lib/isc/include/isc/backtrace.h head/contrib/bind9/lib/isc/include/isc/base32.h head/contrib/bind9/lib/isc/include/isc/base64.h head/contrib/bind9/lib/isc/include/isc/bind9.h head/contrib/bind9/lib/isc/include/isc/bitstring.h head/contrib/bind9/lib/isc/include/isc/boolean.h head/contrib/bind9/lib/isc/include/isc/buffer.h head/contrib/bind9/lib/isc/include/isc/bufferlist.h head/contrib/bind9/lib/isc/include/isc/commandline.h head/contrib/bind9/lib/isc/include/isc/entropy.h head/contrib/bind9/lib/isc/include/isc/error.h head/contrib/bind9/lib/isc/include/isc/event.h head/contrib/bind9/lib/isc/include/isc/eventclass.h head/contrib/bind9/lib/isc/include/isc/file.h head/contrib/bind9/lib/isc/include/isc/formatcheck.h head/contrib/bind9/lib/isc/include/isc/fsaccess.h head/contrib/bind9/lib/isc/include/isc/hash.h head/contrib/bind9/lib/isc/include/isc/heap.h head/contrib/bind9/lib/isc/include/isc/hex.h head/contrib/bind9/lib/isc/include/isc/hmacmd5.h head/contrib/bind9/lib/isc/include/isc/hmacsha.h head/contrib/bind9/lib/isc/include/isc/httpd.h head/contrib/bind9/lib/isc/include/isc/interfaceiter.h head/contrib/bind9/lib/isc/include/isc/ipv6.h head/contrib/bind9/lib/isc/include/isc/iterated_hash.h head/contrib/bind9/lib/isc/include/isc/lang.h head/contrib/bind9/lib/isc/include/isc/lex.h head/contrib/bind9/lib/isc/include/isc/lfsr.h head/contrib/bind9/lib/isc/include/isc/lib.h head/contrib/bind9/lib/isc/include/isc/list.h head/contrib/bind9/lib/isc/include/isc/log.h head/contrib/bind9/lib/isc/include/isc/magic.h head/contrib/bind9/lib/isc/include/isc/md5.h head/contrib/bind9/lib/isc/include/isc/mem.h head/contrib/bind9/lib/isc/include/isc/msgcat.h head/contrib/bind9/lib/isc/include/isc/msgs.h head/contrib/bind9/lib/isc/include/isc/mutexblock.h head/contrib/bind9/lib/isc/include/isc/namespace.h head/contrib/bind9/lib/isc/include/isc/netaddr.h head/contrib/bind9/lib/isc/include/isc/netscope.h head/contrib/bind9/lib/isc/include/isc/ondestroy.h head/contrib/bind9/lib/isc/include/isc/os.h head/contrib/bind9/lib/isc/include/isc/parseint.h head/contrib/bind9/lib/isc/include/isc/platform.h.in head/contrib/bind9/lib/isc/include/isc/portset.h head/contrib/bind9/lib/isc/include/isc/print.h head/contrib/bind9/lib/isc/include/isc/quota.h head/contrib/bind9/lib/isc/include/isc/radix.h head/contrib/bind9/lib/isc/include/isc/random.h head/contrib/bind9/lib/isc/include/isc/ratelimiter.h head/contrib/bind9/lib/isc/include/isc/refcount.h head/contrib/bind9/lib/isc/include/isc/region.h head/contrib/bind9/lib/isc/include/isc/resource.h head/contrib/bind9/lib/isc/include/isc/result.h head/contrib/bind9/lib/isc/include/isc/resultclass.h head/contrib/bind9/lib/isc/include/isc/rwlock.h head/contrib/bind9/lib/isc/include/isc/serial.h head/contrib/bind9/lib/isc/include/isc/sha1.h head/contrib/bind9/lib/isc/include/isc/sha2.h head/contrib/bind9/lib/isc/include/isc/sockaddr.h head/contrib/bind9/lib/isc/include/isc/socket.h head/contrib/bind9/lib/isc/include/isc/stats.h head/contrib/bind9/lib/isc/include/isc/stdio.h head/contrib/bind9/lib/isc/include/isc/stdlib.h head/contrib/bind9/lib/isc/include/isc/string.h head/contrib/bind9/lib/isc/include/isc/symtab.h head/contrib/bind9/lib/isc/include/isc/task.h head/contrib/bind9/lib/isc/include/isc/taskpool.h head/contrib/bind9/lib/isc/include/isc/timer.h head/contrib/bind9/lib/isc/include/isc/types.h head/contrib/bind9/lib/isc/include/isc/util.h head/contrib/bind9/lib/isc/include/isc/version.h head/contrib/bind9/lib/isc/include/isc/xml.h head/contrib/bind9/lib/isc/inet_aton.c head/contrib/bind9/lib/isc/inet_ntop.c head/contrib/bind9/lib/isc/inet_pton.c head/contrib/bind9/lib/isc/iterated_hash.c head/contrib/bind9/lib/isc/lex.c head/contrib/bind9/lib/isc/lfsr.c head/contrib/bind9/lib/isc/lib.c head/contrib/bind9/lib/isc/log.c head/contrib/bind9/lib/isc/md5.c head/contrib/bind9/lib/isc/mem.c head/contrib/bind9/lib/isc/mem_api.c head/contrib/bind9/lib/isc/mips/Makefile.in head/contrib/bind9/lib/isc/mips/include/Makefile.in head/contrib/bind9/lib/isc/mips/include/isc/Makefile.in head/contrib/bind9/lib/isc/mips/include/isc/atomic.h head/contrib/bind9/lib/isc/mutexblock.c head/contrib/bind9/lib/isc/netaddr.c head/contrib/bind9/lib/isc/netscope.c head/contrib/bind9/lib/isc/nls/Makefile.in head/contrib/bind9/lib/isc/nls/msgcat.c head/contrib/bind9/lib/isc/noatomic/Makefile.in head/contrib/bind9/lib/isc/noatomic/include/Makefile.in head/contrib/bind9/lib/isc/noatomic/include/isc/Makefile.in head/contrib/bind9/lib/isc/noatomic/include/isc/atomic.h head/contrib/bind9/lib/isc/nothreads/Makefile.in head/contrib/bind9/lib/isc/nothreads/condition.c head/contrib/bind9/lib/isc/nothreads/include/Makefile.in head/contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in head/contrib/bind9/lib/isc/nothreads/include/isc/condition.h head/contrib/bind9/lib/isc/nothreads/include/isc/mutex.h head/contrib/bind9/lib/isc/nothreads/include/isc/once.h head/contrib/bind9/lib/isc/nothreads/include/isc/thread.h head/contrib/bind9/lib/isc/nothreads/mutex.c head/contrib/bind9/lib/isc/nothreads/thread.c head/contrib/bind9/lib/isc/ondestroy.c head/contrib/bind9/lib/isc/parseint.c head/contrib/bind9/lib/isc/portset.c head/contrib/bind9/lib/isc/powerpc/Makefile.in head/contrib/bind9/lib/isc/powerpc/include/Makefile.in head/contrib/bind9/lib/isc/powerpc/include/isc/Makefile.in head/contrib/bind9/lib/isc/powerpc/include/isc/atomic.h head/contrib/bind9/lib/isc/print.c head/contrib/bind9/lib/isc/pthreads/Makefile.in head/contrib/bind9/lib/isc/pthreads/condition.c head/contrib/bind9/lib/isc/pthreads/include/Makefile.in head/contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in head/contrib/bind9/lib/isc/pthreads/include/isc/condition.h head/contrib/bind9/lib/isc/pthreads/include/isc/mutex.h head/contrib/bind9/lib/isc/pthreads/include/isc/once.h head/contrib/bind9/lib/isc/pthreads/include/isc/thread.h head/contrib/bind9/lib/isc/pthreads/mutex.c head/contrib/bind9/lib/isc/pthreads/thread.c head/contrib/bind9/lib/isc/quota.c head/contrib/bind9/lib/isc/radix.c head/contrib/bind9/lib/isc/random.c head/contrib/bind9/lib/isc/ratelimiter.c head/contrib/bind9/lib/isc/refcount.c head/contrib/bind9/lib/isc/region.c head/contrib/bind9/lib/isc/result.c head/contrib/bind9/lib/isc/rwlock.c head/contrib/bind9/lib/isc/serial.c head/contrib/bind9/lib/isc/sha1.c head/contrib/bind9/lib/isc/sha2.c head/contrib/bind9/lib/isc/sockaddr.c head/contrib/bind9/lib/isc/socket_api.c head/contrib/bind9/lib/isc/sparc64/Makefile.in head/contrib/bind9/lib/isc/sparc64/include/Makefile.in head/contrib/bind9/lib/isc/sparc64/include/isc/Makefile.in head/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h head/contrib/bind9/lib/isc/stats.c head/contrib/bind9/lib/isc/string.c head/contrib/bind9/lib/isc/strtoul.c head/contrib/bind9/lib/isc/symtab.c head/contrib/bind9/lib/isc/task.c head/contrib/bind9/lib/isc/task_api.c head/contrib/bind9/lib/isc/task_p.h head/contrib/bind9/lib/isc/taskpool.c head/contrib/bind9/lib/isc/timer.c head/contrib/bind9/lib/isc/timer_api.c head/contrib/bind9/lib/isc/timer_p.h head/contrib/bind9/lib/isc/unix/Makefile.in head/contrib/bind9/lib/isc/unix/app.c head/contrib/bind9/lib/isc/unix/dir.c head/contrib/bind9/lib/isc/unix/entropy.c head/contrib/bind9/lib/isc/unix/errno2result.c head/contrib/bind9/lib/isc/unix/errno2result.h head/contrib/bind9/lib/isc/unix/file.c head/contrib/bind9/lib/isc/unix/fsaccess.c head/contrib/bind9/lib/isc/unix/ifiter_getifaddrs.c head/contrib/bind9/lib/isc/unix/ifiter_ioctl.c head/contrib/bind9/lib/isc/unix/ifiter_sysctl.c head/contrib/bind9/lib/isc/unix/include/Makefile.in head/contrib/bind9/lib/isc/unix/include/isc/Makefile.in head/contrib/bind9/lib/isc/unix/include/isc/dir.h head/contrib/bind9/lib/isc/unix/include/isc/int.h head/contrib/bind9/lib/isc/unix/include/isc/keyboard.h head/contrib/bind9/lib/isc/unix/include/isc/net.h head/contrib/bind9/lib/isc/unix/include/isc/netdb.h head/contrib/bind9/lib/isc/unix/include/isc/offset.h head/contrib/bind9/lib/isc/unix/include/isc/stat.h head/contrib/bind9/lib/isc/unix/include/isc/stdtime.h head/contrib/bind9/lib/isc/unix/include/isc/strerror.h head/contrib/bind9/lib/isc/unix/include/isc/syslog.h head/contrib/bind9/lib/isc/unix/include/isc/time.h head/contrib/bind9/lib/isc/unix/interfaceiter.c head/contrib/bind9/lib/isc/unix/ipv6.c head/contrib/bind9/lib/isc/unix/keyboard.c head/contrib/bind9/lib/isc/unix/net.c head/contrib/bind9/lib/isc/unix/os.c head/contrib/bind9/lib/isc/unix/resource.c head/contrib/bind9/lib/isc/unix/socket.c head/contrib/bind9/lib/isc/unix/socket_p.h head/contrib/bind9/lib/isc/unix/stdio.c head/contrib/bind9/lib/isc/unix/stdtime.c head/contrib/bind9/lib/isc/unix/strerror.c head/contrib/bind9/lib/isc/unix/syslog.c head/contrib/bind9/lib/isc/unix/time.c head/contrib/bind9/lib/isc/version.c head/contrib/bind9/lib/isc/x86_32/Makefile.in head/contrib/bind9/lib/isc/x86_32/include/Makefile.in head/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in head/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h head/contrib/bind9/lib/isc/x86_64/Makefile.in head/contrib/bind9/lib/isc/x86_64/include/Makefile.in head/contrib/bind9/lib/isc/x86_64/include/isc/Makefile.in head/contrib/bind9/lib/isc/x86_64/include/isc/atomic.h head/contrib/bind9/lib/isccc/Makefile.in head/contrib/bind9/lib/isccc/alist.c head/contrib/bind9/lib/isccc/api head/contrib/bind9/lib/isccc/base64.c head/contrib/bind9/lib/isccc/cc.c head/contrib/bind9/lib/isccc/ccmsg.c head/contrib/bind9/lib/isccc/include/Makefile.in head/contrib/bind9/lib/isccc/include/isccc/Makefile.in head/contrib/bind9/lib/isccc/include/isccc/alist.h head/contrib/bind9/lib/isccc/include/isccc/base64.h head/contrib/bind9/lib/isccc/include/isccc/cc.h head/contrib/bind9/lib/isccc/include/isccc/ccmsg.h head/contrib/bind9/lib/isccc/include/isccc/events.h head/contrib/bind9/lib/isccc/include/isccc/lib.h head/contrib/bind9/lib/isccc/include/isccc/result.h head/contrib/bind9/lib/isccc/include/isccc/sexpr.h head/contrib/bind9/lib/isccc/include/isccc/symtab.h head/contrib/bind9/lib/isccc/include/isccc/symtype.h head/contrib/bind9/lib/isccc/include/isccc/types.h head/contrib/bind9/lib/isccc/include/isccc/util.h head/contrib/bind9/lib/isccc/include/isccc/version.h head/contrib/bind9/lib/isccc/lib.c head/contrib/bind9/lib/isccc/result.c head/contrib/bind9/lib/isccc/sexpr.c head/contrib/bind9/lib/isccc/symtab.c head/contrib/bind9/lib/isccc/version.c head/contrib/bind9/lib/isccfg/Makefile.in head/contrib/bind9/lib/isccfg/aclconf.c head/contrib/bind9/lib/isccfg/api head/contrib/bind9/lib/isccfg/dnsconf.c head/contrib/bind9/lib/isccfg/include/Makefile.in head/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in head/contrib/bind9/lib/isccfg/include/isccfg/aclconf.h head/contrib/bind9/lib/isccfg/include/isccfg/cfg.h head/contrib/bind9/lib/isccfg/include/isccfg/dnsconf.h head/contrib/bind9/lib/isccfg/include/isccfg/grammar.h head/contrib/bind9/lib/isccfg/include/isccfg/log.h head/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h head/contrib/bind9/lib/isccfg/include/isccfg/version.h head/contrib/bind9/lib/isccfg/log.c head/contrib/bind9/lib/isccfg/namedconf.c head/contrib/bind9/lib/isccfg/parser.c head/contrib/bind9/lib/isccfg/version.c head/contrib/bind9/lib/lwres/Makefile.in head/contrib/bind9/lib/lwres/api head/contrib/bind9/lib/lwres/assert_p.h head/contrib/bind9/lib/lwres/context.c head/contrib/bind9/lib/lwres/context_p.h head/contrib/bind9/lib/lwres/gai_strerror.c head/contrib/bind9/lib/lwres/getaddrinfo.c head/contrib/bind9/lib/lwres/gethost.c head/contrib/bind9/lib/lwres/getipnode.c head/contrib/bind9/lib/lwres/getnameinfo.c head/contrib/bind9/lib/lwres/getrrset.c head/contrib/bind9/lib/lwres/herror.c head/contrib/bind9/lib/lwres/include/Makefile.in head/contrib/bind9/lib/lwres/include/lwres/Makefile.in head/contrib/bind9/lib/lwres/include/lwres/context.h head/contrib/bind9/lib/lwres/include/lwres/int.h head/contrib/bind9/lib/lwres/include/lwres/ipv6.h head/contrib/bind9/lib/lwres/include/lwres/lang.h head/contrib/bind9/lib/lwres/include/lwres/list.h head/contrib/bind9/lib/lwres/include/lwres/lwbuffer.h head/contrib/bind9/lib/lwres/include/lwres/lwpacket.h head/contrib/bind9/lib/lwres/include/lwres/lwres.h head/contrib/bind9/lib/lwres/include/lwres/netdb.h.in head/contrib/bind9/lib/lwres/include/lwres/platform.h.in head/contrib/bind9/lib/lwres/include/lwres/result.h head/contrib/bind9/lib/lwres/include/lwres/stdlib.h head/contrib/bind9/lib/lwres/include/lwres/version.h head/contrib/bind9/lib/lwres/lwbuffer.c head/contrib/bind9/lib/lwres/lwconfig.c head/contrib/bind9/lib/lwres/lwinetaton.c head/contrib/bind9/lib/lwres/lwinetntop.c head/contrib/bind9/lib/lwres/lwinetpton.c head/contrib/bind9/lib/lwres/lwpacket.c head/contrib/bind9/lib/lwres/lwres_gabn.c head/contrib/bind9/lib/lwres/lwres_gnba.c head/contrib/bind9/lib/lwres/lwres_grbn.c head/contrib/bind9/lib/lwres/lwres_noop.c head/contrib/bind9/lib/lwres/lwresutil.c head/contrib/bind9/lib/lwres/man/Makefile.in head/contrib/bind9/lib/lwres/man/lwres.3 head/contrib/bind9/lib/lwres/man/lwres.docbook head/contrib/bind9/lib/lwres/man/lwres.html head/contrib/bind9/lib/lwres/man/lwres_buffer.3 head/contrib/bind9/lib/lwres/man/lwres_buffer.docbook head/contrib/bind9/lib/lwres/man/lwres_buffer.html head/contrib/bind9/lib/lwres/man/lwres_config.3 head/contrib/bind9/lib/lwres/man/lwres_config.docbook head/contrib/bind9/lib/lwres/man/lwres_config.html head/contrib/bind9/lib/lwres/man/lwres_context.3 head/contrib/bind9/lib/lwres/man/lwres_context.docbook head/contrib/bind9/lib/lwres/man/lwres_context.html head/contrib/bind9/lib/lwres/man/lwres_gabn.3 head/contrib/bind9/lib/lwres/man/lwres_gabn.docbook head/contrib/bind9/lib/lwres/man/lwres_gabn.html head/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3 head/contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook head/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html head/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3 head/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook head/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html head/contrib/bind9/lib/lwres/man/lwres_gethostent.3 head/contrib/bind9/lib/lwres/man/lwres_gethostent.docbook head/contrib/bind9/lib/lwres/man/lwres_gethostent.html head/contrib/bind9/lib/lwres/man/lwres_getipnode.3 head/contrib/bind9/lib/lwres/man/lwres_getipnode.docbook head/contrib/bind9/lib/lwres/man/lwres_getipnode.html head/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3 head/contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook head/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html head/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3 head/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook head/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html head/contrib/bind9/lib/lwres/man/lwres_gnba.3 head/contrib/bind9/lib/lwres/man/lwres_gnba.docbook head/contrib/bind9/lib/lwres/man/lwres_gnba.html head/contrib/bind9/lib/lwres/man/lwres_hstrerror.3 head/contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook head/contrib/bind9/lib/lwres/man/lwres_hstrerror.html head/contrib/bind9/lib/lwres/man/lwres_inetntop.3 head/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook head/contrib/bind9/lib/lwres/man/lwres_inetntop.html head/contrib/bind9/lib/lwres/man/lwres_noop.3 head/contrib/bind9/lib/lwres/man/lwres_noop.docbook head/contrib/bind9/lib/lwres/man/lwres_noop.html head/contrib/bind9/lib/lwres/man/lwres_packet.3 head/contrib/bind9/lib/lwres/man/lwres_packet.docbook head/contrib/bind9/lib/lwres/man/lwres_packet.html head/contrib/bind9/lib/lwres/man/lwres_resutil.3 head/contrib/bind9/lib/lwres/man/lwres_resutil.docbook head/contrib/bind9/lib/lwres/man/lwres_resutil.html head/contrib/bind9/lib/lwres/print.c head/contrib/bind9/lib/lwres/print_p.h head/contrib/bind9/lib/lwres/strtoul.c head/contrib/bind9/lib/lwres/unix/Makefile.in head/contrib/bind9/lib/lwres/unix/include/Makefile.in head/contrib/bind9/lib/lwres/unix/include/lwres/Makefile.in head/contrib/bind9/lib/lwres/unix/include/lwres/net.h head/contrib/bind9/lib/lwres/version.c head/contrib/bind9/make/Makefile.in head/contrib/bind9/make/includes.in head/contrib/bind9/make/mkdep.in head/contrib/bind9/make/rules.in head/contrib/bind9/mkinstalldirs head/contrib/bind9/release-notes.css head/contrib/bind9/version head/lib/bind/config.h head/lib/bind/dns/code.h head/lib/bind/dns/dns/enumclass.h head/lib/bind/dns/dns/enumtype.h head/lib/bind/dns/dns/rdatastruct.h head/lib/bind/lwres/lwres/netdb.h head/lib/bind/lwres/lwres/platform.h Directory Properties: head/contrib/bind9/ (props changed) Modified: head/contrib/bind9/CHANGES ============================================================================== --- head/contrib/bind9/CHANGES Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/CHANGES Thu Apr 5 04:29:35 2012 (r233914) @@ -1,9 +1,309 @@ - --- 9.8.1-P1 released --- + --- 9.8.2 released --- + +3298. [bug] Named could dereference a NULL pointer in + zmgr_start_xfrin_ifquota if the zone was being removed. + [RT #28419] + +3297. [bug] Named could die on a malformed master file. [RT #28467] + +3295. [bug] Adjust isc_time_secondsastimet range check to be more + portable. [RT # 26542] + +3294. [bug] isccc/cc.c:table_fromwire failed to free alist on + error. [RT #28265] + +3291. [port] Fixed a build error on systems without ENOTSUP. + [RT #28200] + +3290. [bug] was not being installed. [RT #28169] + +3288. [bug] dlz_destroy() function wasn't correctly registered + by the DLZ dlopen driver. [RT #28056] + +3287. [port] Update ans.pl to work with Net::DNS 0.68. [RT #28028] + +3286. [bug] Managed key maintenance timer could fail to start + after 'rndc reconfig'. [RT #26786] + + --- 9.8.2rc2 released --- + +3285. [bug] val-frdataset was incorrectly disassociated in + proveunsecure after calling startfinddlvsep. + [RT #27928] + +3284. [bug] Address race conditions with the handling of + rbtnode.deadlink. [RT #27738] + +3283. [bug] Raw zones with with more than 512 records in a RRset + failed to load. [RT #27863] + +3282. [bug] Restrict the TTL of NS RRset to no more than that + of the old NS RRset when replacing it. + [RT #27792] [RT #27884] + +3281. [bug] SOA refresh queries could be treated as cancelled + despite succeeding over the loopback interface. + [RT #27782] + +3280. [bug] Potential double free of a rdataset on out of memory + with DNS64. [RT #27762] + +3278. [bug] Make sure automatic key maintenance is started + when "auto-dnssec maintain" is turned on during + "rndc reconfig". [RT #26805] + +3276. [bug] win32: ns_os_openfile failed to return NULL on + safe_open failure. [RT #27696] + +3274. [bug] Log when a zone is not reusable. Only set loadtime + on successful loads. [RT #27650] + +3273. [bug] AAAA responses could be returned in the additional + section even when filter-aaaa-on-v4 was in use. + [RT #27292] + +3271. [port] darwin: mksymtbl is not always stable, loop several + times before giving up. mksymtbl was using non + portable perl to covert 64 bit hex strings. [RT #27653] + +3268. [bug] Convert RRSIG expiry times to 64 timestamps to work + out the earliest expiry time. [RT #23311] + +3267. [bug] Memory allocation failures could be mis-reported as + unexpected error. New ISC_R_UNSET result code. + [RT #27336] + +3266. [bug] The maximum number of NSEC3 iterations for a + DNSKEY RRset was not being properly computed. + [RT #26543] + +3262. [bug] Signed responses were handled incorrectly by RPZ. + [RT #27316] + + --- 9.8.2rc1 released --- + +3260. [bug] "rrset-order cyclic" could appear not to rotate + for some query patterns. [RT #27170/27185] + +3259. [bug] named-compilezone: Suppress "dump zone to " + message when writing to stdout. [RT #27109] + +3258. [test] Add "forcing full sign with unreadable keys" test. + [RT #27153] + +3257. [bug] Do not generate a error message when calling fsync() + in a pipe or socket. [RT #27109] + +3256. [bug] Disable empty zones for lwresd -C. [RT #27139] + +3254. [bug] Set isc_socket_ipv6only() on the IPv6 control channels. + [RT #22249] + +3253. [bug] Return DNS_R_SYNTAX when the input to a text field is + too long. [RT #26956] + +3251. [bug] Enforce a upper bound (65535 bytes) on the amount of + memory dns_sdlz_putrr() can allocate per record to + prevent run away memory consumption on ISC_R_NOSPACE. + [RT #26956] + +3250. [func] 'configure --enable-developer'; turn on various + configure options, normally off by default, that + we want developers to build and test with. [RT #27103] + +3249. [bug] Update log message when saving slave zones files for + analysis after load failures. [RT #27087] + +3248. [bug] Configure options --enable-fixed-rrset and + --enable-exportlib were incompatible with each + other. [RT #27087] + +3247. [bug] 'raw' format zones failed to preserve load order + breaking 'fixed' sort order. [RT #27087] + +3243. [port] netbsd,bsdi: the thread defaults were not being + properly set. + +3241. [bug] Address race conditions in the resolver code. + [RT #26889] + +3240. [bug] DNSKEY state change events could be missed. [RT #26874] + +3239. [bug] dns_dnssec_findmatchingkeys needs to use a consistent + timestamp. [RT #26883] + +3238. [bug] keyrdata was not being reinitialized in + lib/dns/rbtdb.c:iszonesecure. [RT#26913] + +3237. [bug] dig -6 didn't work with +trace. [RT #26906] + + --- 9.8.2b1 released --- + +3234. [bug] 'make depend' produced invalid makefiles. [RT #26830] + +3231. [bug] named could fail to send a uncompressable zone. + [RT #26796] + +3230. [bug] 'dig axfr' failed to properly handle a multi-message + axfr with a serial of 0. [RT #26796] + +3229. [bug] Fix local variable to struct var assignment + found by CLANG warning. + +3228. [tuning] Dynamically grow symbol table to improve zone + loading performance. [RT #26523] + +3227. [bug] Interim fix to make WKS's use of getprotobyname() + and getservbyname() self thread safe. [RT #26232] + +3226. [bug] Address minor resource leakages. [RT #26624] + +3221. [bug] Fixed a potential coredump on shutdown due to + referencing fetch context after it's been freed. + [RT #26720] + +3220. [bug] Change #3186 was incomplete; dns_db_rpz_findips() + could fail to set the database version correctly, + causing an assertion failure. [RT #26180] 3218. [security] Cache lookup could return RRSIG data associated with nonexistent records, leading to an assertion failure. [RT #26590] +3217. [cleanup] Fix build problem with --disable-static. [RT #26476] + +3216. [bug] resolver.c:validated() was not thread-safe. [RT #26478] + +3213. [doc] Clarify ixfr-from-differences behavior. [RT #25188] + +3212. [bug] rbtdb.c: failed to remove a node from the deadnodes + list prior to adding a reference to it leading a + possible assertion failure. [RT #23219] + +3209. [func] Add "dnssec-lookaside 'no'". [RT #24858] + +3208. [bug] 'dig -y' handle unknown tsig alorithm better. + [RT #25522] + +3207. [contrib] Fixed build error in Berkeley DB DLZ module. [RT #26444] + +3206. [cleanup] Add ISC information to log at start time. [RT #25484] + +3204. [bug] When a master server that has been marked as + unreachable sends a NOTIFY, mark it reachable + again. [RT #25960] + +3203. [bug] Increase log level to 'info' for validation failures + from expired or not-yet-valid RRSIGs. [RT #21796] + +3200. [doc] Some rndc functions were undocumented or were + missing from 'rndc -h' output. [RT #25555] + +3198. [doc] Clarified that dnssec-settime can alter keyfile + permissions. [RT #24866] + +3196. [bug] nsupdate: return nonzero exit code when target zone + doesn't exist. [RT #25783] + +3195. [cleanup] Silence "file not found" warnings when loading + managed-keys zone. [RT #26340] + +3194. [doc] Updated RFC references in the 'empty-zones-enable' + documentation. [RT #25203] + +3193. [cleanup] Changed MAXZONEKEYS to DNS_MAXZONEKEYS, moved to + dnssec.h. [RT #26415] + +3192. [bug] A query structure could be used after being freed. + [RT #22208] + +3191. [bug] Print NULL records using "unknown" format. [RT #26392] + +3190. [bug] Underflow in error handling in isc_mutexblock_init. + [RT #26397] + +3189. [test] Added a summary report after system tests. [RT #25517] + +3188. [bug] zone.c:zone_refreshkeys() could fail to detach + references correctly when errors occurred, causing + a hang on shutdown. [RT #26372] + +3187. [port] win32: support for Visual Studio 2008. [RT #26356] + +3186. [bug] Version/db mis-match in rpz code. [RT #26180] + +3179. [port] kfreebsd: build issues. [RT #26273] + +3175. [bug] Fix how DNSSEC positive wildcard responses from a + NSEC3 signed zone are validated. Stop sending a + unnecessary NSEC3 record when generating such + responses. [RT #26200] + +3174. [bug] Always compute to revoked key tag from scratch. + [RT #26186] + +3173. [port] Correctly validate root DS responses. [RT #25726] + +3171. [bug] Exclusively lock the task when adding a zone using + 'rndc addzone'. [RT #25600] + +3170. [func] RPZ update: + - fix precedence among competing rules + - improve ARM text including documenting rule precedence + - try to rewrite CNAME chains until first hit + - new "rpz" logging channel + - RDATA for CNAME rules can include wildcards + - replace "NO-OP" named.conf policy override with + "PASSTHRU" and add "DISABLED" override ("NO-OP" + is still recognized) + [RT #25172] + +3169. [func] Catch db/version mis-matches when calling dns_db_*(). + [RT #26017] + +3167. [bug] Negative answers from forwarders were not being + correctly tagged making them appear to not be cached. + [RT #25380] + +3162. [test] start.pl: modified to allow for "named.args" in + ns*/ subdirectory to override stock arguments to + named. Largely from RT#26044, but no separate ticket. + +3161. [bug] zone.c:del_sigs failed to always reset rdata leading + assertion failures. [RT #25880] + +3157. [tuning] Reduce the time spent in "rndc reconfig" by parsing + the config file before pausing the server. [RT #21373] + +3155. [bug] Fixed a build failure when using contrib DLZ + drivers (e.g., mysql, postgresql, etc). [RT #25710] + +3154. [bug] Attempting to print an empty rdataset could trigger + an assert. [RT #25452] + +3152. [cleanup] Some versions of gcc and clang failed due to + incorrect use of __builtin_expect. [RT #25183] + +3151. [bug] Queries for type RRSIG or SIG could be handled + incorrectly. [RT #21050] + +3148. [bug] Processing of normal queries could be stalled when + forwarding a UPDATE message. [RT #24711] + +3146. [test] Fixed gcc4.6.0 errors in ATF. [RT #25598] + +3145. [test] Capture output of ATF unit tests in "./atf.out" if + there were any errors while running them. [RT #25527] + +3144. [bug] dns_dbiterator_seek() could trigger an assert when + used with a nonexistent database node. [RT #25358] + +3143. [bug] Silence clang compiler warnings. [RT #25174] + +3139. [test] Added tests from RFC 6234, RFC 2202, and RFC 1321 + for the hashing algorithms (md5, sha1 - sha512, and + their hmac counterparts). [RT #25067] + --- 9.8.1 released --- --- 9.8.1rc1 released --- @@ -14,7 +314,7 @@ 3138. [bug] Address memory leaks and out-of-order operations when shutting named down. [RT #25210] -3136. [func] Add RFC 1918 reverse zones to the list of built-in +3136. [func] Add RFC 1918 reverse zones to the list of built-in empty zones switched on by the 'empty-zones-enable' option. [RT #24990] @@ -34,9 +334,9 @@ 3133. [bug] Change #3114 was incomplete. [RT #24577] -3131. [tuning] Improve scalability by allocating one zone task - per 100 zones at startup time, rather than using a - fixed-size task table. [RT #24406] +3131. [tuning] Improve scalability by allocating one zone task + per 100 zones at startup time, rather than using a + fixed-size task table. [RT #24406] 3129. [bug] Named could crash on 'rndc reconfig' when allow-new-zones was set to yes and named ACLs @@ -62,10 +362,10 @@ 3122. [cleanup] dnssec-settime: corrected usage message. [RT #24664] -3121. [security] An authoritative name server sending a negative - response containing a very large RRset could - trigger an off-by-one error in the ncache code - and crash named. [RT #24650] +3121. [security] An authoritative name server sending a negative + response containing a very large RRset could + trigger an off-by-one error in the ncache code + and crash named. [RT #24650] 3120. [bug] Named could fail to validate zones listed in a DLV that validated insecure without using DLV and had @@ -99,9 +399,9 @@ "krb5-subdomain", which allow machines to update their own records, to the BIND 9 ARM. -3111. [bug] Improved consistency checks for dnssec-enable and - dnssec-validation, added test cases to the - checkconf system test. [RT #24398] +3111. [bug] Improved consistency checks for dnssec-enable and + dnssec-validation, added test cases to the + checkconf system test. [RT #24398] 3110. [bug] dnssec-signzone: Wrong error message could appear when attempting to sign with no KSK. [RT #24369] @@ -109,10 +409,10 @@ 3107. [bug] dnssec-signzone: Report the correct number of ZSKs when using -x. [RT #20852] -3105. [bug] GOST support can be suppressed by "configure - --without-gost" [RT #24367] +3105. [bug] GOST support can be suppressed by "configure + --without-gost" [RT #24367] -3104. [bug] Better support for cross-compiling. [RT #24367] +3104. [bug] Better support for cross-compiling. [RT #24367] 3103. [bug] Configuring 'dnssec-validation auto' in a view instead of in the options statement could trigger @@ -142,7 +442,7 @@ 3094. [doc] Expand dns64 documentation. -3093. [bug] Fix gssapi/kerberos dependencies [RT #23836] +3093. [bug] Fix gssapi/kerberos dependencies [RT #23836] 3092. [bug] Signatures for records at the zone apex could go stale due to an incorrect timer setting. [RT #23769] @@ -151,7 +451,7 @@ and then subsequently activated could fail to trigger automatic signing. [RT #22911] -3090. [func] Make --with-gssapi default [RT #23738] +3090. [func] Make --with-gssapi default [RT #23738] 3088. [bug] Remove bin/tests/system/logfileconfig/ns1/named.conf and add setup.sh in order to resolve changing @@ -269,9 +569,9 @@ 3043. [test] Merged in the NetBSD ATF test framework (currently version 0.12) for development of future unit tests. - Use configure --with-atf to build ATF internally - or configure --with-atf=prefix to use an external - copy. [RT #23209] + Use configure --with-atf to build ATF internally + or configure --with-atf=prefix to use an external + copy. [RT #23209] 3042. [bug] dig +trace could fail attempting to use IPv6 addresses on systems with only IPv4 connectivity. @@ -706,7 +1006,7 @@ 2929. [bug] Improved handling of GSS security contexts: - added LRU expiration for generated TSIGs - added the ability to use a non-default realm - - added new "realm" keyword in nsupdate + - added new "realm" keyword in nsupdate - limited lifetime of generated keys to 1 hour or the lifetime of the context (whichever is smaller) @@ -1535,7 +1835,7 @@ --with-export-includedir. [RT #20252] 2675. [bug] dnssec-signzone could crash if the key directory - did not exist. [RT #20232] + did not exist. [RT #20232] --- 9.7.0a3 released --- @@ -1626,7 +1926,7 @@ 64-bit systems. [RT #20076] 2650. [bug] Assertion failure in dnssec-signzone when trying - to read keyset-* files. [RT #20075] + to read keyset-* files. [RT #20075] 2649. [bug] Set the domain for forward only zones. [RT #19944] @@ -1698,7 +1998,7 @@ 2630. [func] Improved syntax for DDNS autoconfiguration: use "update-policy local;" to switch on local DDNS in a zone. (The "ddns-autoconf" option has been removed.) - [RT #19875] + [RT #19875] 2629. [port] Check for seteuid()/setegid(), use setresuid()/ setresgid() if not present. [RT #19932] @@ -2383,10 +2683,10 @@ time. [RT #18277] 2423. [security] Randomize server selection on queries, so as to - make forgery a little more difficult. Instead of - always preferring the server with the lowest RTT, - pick a server with RTT within the same 128 - millisecond band. [RT #18441] + make forgery a little more difficult. Instead of + always preferring the server with the lowest RTT, + pick a server with RTT within the same 128 + millisecond band. [RT #18441] 2422. [bug] Handle the special return value of a empty node as if it was a NXRRSET in the validator. [RT #18447] @@ -2467,7 +2767,7 @@ 2399. [placeholder] -2398. [bug] Improve file descriptor management. New, +2398. [bug] Improve file descriptor management. New, temporary, named.conf option reserved-sockets, default 512. [RT #18344] Modified: head/contrib/bind9/COPYRIGHT ============================================================================== --- head/contrib/bind9/COPYRIGHT Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/COPYRIGHT Thu Apr 5 04:29:35 2012 (r233914) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -$Id: COPYRIGHT,v 1.17.14.1 2011-02-22 06:34:47 marka Exp $ +$Id: COPYRIGHT,v 1.17.14.2 2012/01/04 23:46:18 tbox Exp $ Portions of this code release fall under one or more of the following Copyright notices. Please see individual source Modified: head/contrib/bind9/FAQ.xml ============================================================================== --- head/contrib/bind9/FAQ.xml Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/FAQ.xml Thu Apr 5 04:29:35 2012 (r233914) @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - +
Frequently Asked Questions about BIND 9 Modified: head/contrib/bind9/Makefile.in ============================================================================== --- head/contrib/bind9/Makefile.in Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/Makefile.in Thu Apr 5 04:29:35 2012 (r233914) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.58.250.2 2011-02-28 01:19:57 tbox Exp $ +# $Id: Makefile.in,v 1.58.250.4 2011/09/06 04:06:11 marka Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -64,8 +64,10 @@ tags: check: test test: - (cd bin/tests && ${MAKE} ${MAKEDEFS} test) - (test -f unit/unittest.sh && $(SHELL) unit/unittest.sh) + status=0; \ + (cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \ + (test -f unit/unittest.sh && $(SHELL) unit/unittest.sh) || status=1; \ + exit $$status FAQ: FAQ.xml ${XSLTPROC} doc/xsl/isc-docbook-text.xsl FAQ.xml | \ Modified: head/contrib/bind9/README ============================================================================== --- head/contrib/bind9/README Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/README Thu Apr 5 04:29:35 2012 (r233914) @@ -48,6 +48,14 @@ BIND 9 For a detailed list of user-visible changes from previous releases, see the CHANGES file. + For up-to-date release notes and errata, see + http://www.isc.org/software/bind9/releasenotes + +BIND 9.8.2 + + BIND 9.8.2 includes a number of bug fixes and prevents a security + problem described in CVE-2011-4313 + BIND 9.8.1 BIND 9.8.1 includes a number of bug fixes and enhancements from @@ -314,6 +322,7 @@ Building libraries. sh-utils-1.16 provides a "printf" which compiles on SunOS 4. + Documentation The BIND 9 Administrator Reference Manual is included with the @@ -336,6 +345,48 @@ Documentation in the other README files. +Change Log + + A detailed list of all changes to BIND 9 is included in the + file CHANGES, with the most recent changes listed first. + Change notes include tags indicating the category of the + change that was made; these categories are: + + [func] New feature + + [bug] General bug fix + + [security] Fix for a significant security flaw + + [experimental] Used for new features when the syntax + or other aspects of the design are still + in flux and may change + + [port] Portability enhancement + + [maint] Updates to built-in data such as root + server addresses and keys + + [tuning] Changes to built-in configuration defaults + and constants to improve performanceo + + [protocol] Updates to the DNS protocol such as new + RR types + + [test] Changes to the automatic tests, not + affecting server functionality + + [cleanup] Minor corrections and refactoring + + [doc] Documentation + + In general, [func] and [experimental] tags will only appear + in new-feature releases (i.e., those with version numbers + ending in zero). Some new functionality may be backported to + older releases on a case-by-case basis. All other change + types may be applied to all currently-supported releases. + + Bug Reports and Mailing Lists Bugs reports should be sent to Modified: head/contrib/bind9/acconfig.h ============================================================================== --- head/contrib/bind9/acconfig.h Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/acconfig.h Thu Apr 5 04:29:35 2012 (r233914) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: acconfig.h,v 1.53 2008-12-01 23:47:44 tbox Exp $ */ +/* $Id: acconfig.h,v 1.53 2008/12/01 23:47:44 tbox Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/Makefile.in ============================================================================== --- head/contrib/bind9/bin/Makefile.in Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/Makefile.in Thu Apr 5 04:29:35 2012 (r233914) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.29 2009-10-05 12:07:08 fdupont Exp $ +# $Id: Makefile.in,v 1.29 2009/10/05 12:07:08 fdupont Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: head/contrib/bind9/bin/check/Makefile.in ============================================================================== --- head/contrib/bind9/bin/check/Makefile.in Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/Makefile.in Thu Apr 5 04:29:35 2012 (r233914) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.36 2009-12-05 23:31:40 each Exp $ +# $Id: Makefile.in,v 1.36 2009/12/05 23:31:40 each Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: head/contrib/bind9/bin/check/check-tool.c ============================================================================== --- head/contrib/bind9/bin/check/check-tool.c Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/check-tool.c Thu Apr 5 04:29:35 2012 (r233914) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check-tool.c,v 1.41 2010-09-07 23:46:59 tbox Exp $ */ +/* $Id: check-tool.c,v 1.41 2010/09/07 23:46:59 tbox Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/check/check-tool.h ============================================================================== --- head/contrib/bind9/bin/check/check-tool.h Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/check-tool.h Thu Apr 5 04:29:35 2012 (r233914) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check-tool.h,v 1.16 2010-09-07 23:46:59 tbox Exp $ */ +/* $Id: check-tool.h,v 1.16 2010/09/07 23:46:59 tbox Exp $ */ #ifndef CHECK_TOOL_H #define CHECK_TOOL_H Modified: head/contrib/bind9/bin/check/named-checkconf.8 ============================================================================== --- head/contrib/bind9/bin/check/named-checkconf.8 Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/named-checkconf.8 Thu Apr 5 04:29:35 2012 (r233914) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkconf.8,v 1.33 2009-12-29 01:14:03 tbox Exp $ +.\" $Id$ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/check/named-checkconf.c ============================================================================== --- head/contrib/bind9/bin/check/named-checkconf.c Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/named-checkconf.c Thu Apr 5 04:29:35 2012 (r233914) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkconf.c,v 1.54.62.2 2011-03-12 04:59:13 tbox Exp $ */ +/* $Id: named-checkconf.c,v 1.54.62.2 2011/03/12 04:59:13 tbox Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/check/named-checkconf.docbook ============================================================================== --- head/contrib/bind9/bin/check/named-checkconf.docbook Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/named-checkconf.docbook Thu Apr 5 04:29:35 2012 (r233914) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + June 14, 2000 Modified: head/contrib/bind9/bin/check/named-checkconf.html ============================================================================== --- head/contrib/bind9/bin/check/named-checkconf.html Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/named-checkconf.html Thu Apr 5 04:29:35 2012 (r233914) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -32,7 +32,7 @@

named-checkconf [-h] [-v] [-j] [-t directory] {filename} [-p] [-z]

-

DESCRIPTION

+

DESCRIPTION

named-checkconf checks the syntax, but not the semantics, of a named configuration file. The file is parsed @@ -52,7 +52,7 @@

-

OPTIONS

+

OPTIONS

-h

@@ -91,21 +91,21 @@

-

RETURN VALUES

+

RETURN VALUES

named-checkconf returns an exit status of 1 if errors were detected and 0 otherwise.

-

SEE ALSO

+

SEE ALSO

named(8), named-checkzone(8), BIND 9 Administrator Reference Manual.

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: head/contrib/bind9/bin/check/named-checkzone.8 ============================================================================== --- head/contrib/bind9/bin/check/named-checkzone.8 Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/named-checkzone.8 Thu Apr 5 04:29:35 2012 (r233914) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkzone.8,v 1.47 2010-01-17 01:14:02 tbox Exp $ +.\" $Id$ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/check/named-checkzone.c ============================================================================== --- head/contrib/bind9/bin/check/named-checkzone.c Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/named-checkzone.c Thu Apr 5 04:29:35 2012 (r233914) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkzone.c,v 1.61 2010-09-07 23:46:59 tbox Exp $ */ +/* $Id: named-checkzone.c,v 1.61.62.2 2011/12/22 23:45:54 tbox Exp $ */ /*! \file */ @@ -112,6 +112,7 @@ main(int argc, char **argv) { const char *outputformatstr = NULL; dns_masterformat_t inputformat = dns_masterformat_text; dns_masterformat_t outputformat = dns_masterformat_text; + isc_boolean_t logdump = ISC_FALSE; FILE *errout = stdout; outputstyle = &dns_master_style_full; @@ -418,6 +419,7 @@ main(int argc, char **argv) { if (progmode == progmode_compile) { dumpzone = 1; /* always dump */ + logdump = !quiet; if (output_filename == NULL) { fprintf(stderr, "output file required, but not specified\n"); @@ -436,8 +438,10 @@ main(int argc, char **argv) { (output_filename == NULL || strcmp(output_filename, "-") == 0 || strcmp(output_filename, "/dev/fd/1") == 0 || - strcmp(output_filename, "/dev/stdout") == 0)) + strcmp(output_filename, "/dev/stdout") == 0)) { errout = stderr; + logdump = ISC_FALSE; + } if (isc_commandline_index + 2 != argc) usage(); @@ -462,13 +466,13 @@ main(int argc, char **argv) { &zone); if (result == ISC_R_SUCCESS && dumpzone) { - if (!quiet && progmode == progmode_compile) { + if (logdump) { fprintf(errout, "dump zone to %s...", output_filename); fflush(errout); } result = dump_zone(origin, zone, output_filename, outputformat, outputstyle); - if (!quiet && progmode == progmode_compile) + if (logdump) fprintf(errout, "done\n"); } Modified: head/contrib/bind9/bin/check/named-checkzone.docbook ============================================================================== --- head/contrib/bind9/bin/check/named-checkzone.docbook Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/named-checkzone.docbook Thu Apr 5 04:29:35 2012 (r233914) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + June 13, 2000 Modified: head/contrib/bind9/bin/check/named-checkzone.html ============================================================================== --- head/contrib/bind9/bin/check/named-checkzone.html Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/check/named-checkzone.html Thu Apr 5 04:29:35 2012 (r233914) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -33,7 +33,7 @@

named-compilezone [-d] [-j] [-q] [-v] [-c class] [-C mode] [-f format] [-F format] [-i mode] [-k mode] [-m mode] [-n mode] [-r mode] [-s style] [-t directory] [-w directory] [-D] [-W mode] {-o filename} {zonename} {filename}

-

DESCRIPTION

+

DESCRIPTION

named-checkzone checks the syntax and integrity of a zone file. It performs the same checks as named does when loading a @@ -53,7 +53,7 @@

-

OPTIONS

+

OPTIONS

-d

@@ -247,14 +247,14 @@

-

RETURN VALUES

+

RETURN VALUES

named-checkzone returns an exit status of 1 if errors were detected and 0 otherwise.

-

SEE ALSO

+

SEE ALSO

named(8), named-checkconf(8), RFC 1035, @@ -262,7 +262,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: head/contrib/bind9/bin/confgen/Makefile.in ============================================================================== --- head/contrib/bind9/bin/confgen/Makefile.in Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/confgen/Makefile.in Thu Apr 5 04:29:35 2012 (r233914) @@ -12,7 +12,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.8 2009-12-05 23:31:40 each Exp $ +# $Id: Makefile.in,v 1.8 2009/12/05 23:31:40 each Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: head/contrib/bind9/bin/confgen/ddns-confgen.8 ============================================================================== --- head/contrib/bind9/bin/confgen/ddns-confgen.8 Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/confgen/ddns-confgen.8 Thu Apr 5 04:29:35 2012 (r233914) @@ -12,7 +12,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: ddns-confgen.8,v 1.10 2009-09-19 01:14:52 tbox Exp $ +.\" $Id$ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/confgen/ddns-confgen.c ============================================================================== --- head/contrib/bind9/bin/confgen/ddns-confgen.c Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/confgen/ddns-confgen.c Thu Apr 5 04:29:35 2012 (r233914) @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ddns-confgen.c,v 1.9.308.2 2011-03-12 04:59:13 tbox Exp $ */ +/* $Id: ddns-confgen.c,v 1.9.308.2 2011/03/12 04:59:13 tbox Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/confgen/ddns-confgen.docbook ============================================================================== --- head/contrib/bind9/bin/confgen/ddns-confgen.docbook Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/confgen/ddns-confgen.docbook Thu Apr 5 04:29:35 2012 (r233914) @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + Jan 29, 2009 Modified: head/contrib/bind9/bin/confgen/ddns-confgen.html ============================================================================== --- head/contrib/bind9/bin/confgen/ddns-confgen.html Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/confgen/ddns-confgen.html Thu Apr 5 04:29:35 2012 (r233914) @@ -13,7 +13,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -31,7 +31,7 @@

ddns-confgen [-a algorithm] [-h] [-k keyname] [-r randomfile] [ -s name | -z zone ] [-q] [name]

-

DESCRIPTION

+

DESCRIPTION

ddns-confgen generates a key for use by nsupdate and named. It simplifies configuration @@ -58,7 +58,7 @@

-

OPTIONS

+

OPTIONS

-a algorithm

@@ -125,7 +125,7 @@

-

SEE ALSO

+

SEE ALSO

nsupdate(1), named.conf(5), named(8), @@ -133,7 +133,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: head/contrib/bind9/bin/confgen/include/confgen/os.h ============================================================================== --- head/contrib/bind9/bin/confgen/include/confgen/os.h Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/confgen/include/confgen/os.h Thu Apr 5 04:29:35 2012 (r233914) @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: os.h,v 1.3 2009-06-11 23:47:55 tbox Exp $ */ +/* $Id: os.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/confgen/keygen.c ============================================================================== --- head/contrib/bind9/bin/confgen/keygen.c Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/confgen/keygen.c Thu Apr 5 04:29:35 2012 (r233914) @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: keygen.c,v 1.4 2009-11-12 14:02:38 marka Exp $ */ +/* $Id: keygen.c,v 1.4 2009/11/12 14:02:38 marka Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/confgen/keygen.h ============================================================================== --- head/contrib/bind9/bin/confgen/keygen.h Thu Apr 5 03:05:02 2012 (r233913) +++ head/contrib/bind9/bin/confgen/keygen.h Thu Apr 5 04:29:35 2012 (r233914) @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: keygen.h,v 1.3 2009-06-11 23:47:55 tbox Exp $ */ +/* $Id: keygen.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */ #ifndef RNDC_KEYGEN_H #define RNDC_KEYGEN_H 1 Modified: head/contrib/bind9/bin/confgen/rndc-confgen.8 ============================================================================== --- head/contrib/bind9/bin/confgen/rndc-confgen.8 Thu Apr 5 03:05:02 2012 (r233913) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Apr 5 04:41:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C9F31065672; Thu, 5 Apr 2012 04:41:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3860D8FC08; Thu, 5 Apr 2012 04:41:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q354f7Gx040466; Thu, 5 Apr 2012 04:41:07 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q354f62M040464; Thu, 5 Apr 2012 04:41:06 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201204050441.q354f62M040464@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 5 Apr 2012 04:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233917 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Apr 2012 04:41:07 -0000 Author: ae Date: Thu Apr 5 04:41:06 2012 New Revision: 233917 URL: http://svn.freebsd.org/changeset/base/233917 Log: Fix VIMAGE build. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Thu Apr 5 04:32:57 2012 (r233916) +++ head/sys/contrib/pf/net/if_pfsync.c Thu Apr 5 04:41:06 2012 (r233917) @@ -794,7 +794,11 @@ pfsync_state_import(struct pfsync_state timeout = r->timeout[sp->timeout]; if (!timeout) +#ifdef __FreeBSD__ + timeout = V_pf_default_rule.timeout[sp->timeout]; +#else timeout = pf_default_rule.timeout[sp->timeout]; +#endif /* sp->expire may have been adaptively scaled by export. */ st->expire -= timeout - ntohl(sp->expire); From owner-svn-src-head@FreeBSD.ORG Thu Apr 5 08:00:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DEA21065672; Thu, 5 Apr 2012 08:00:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECB918FC0A; Thu, 5 Apr 2012 07:59:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q357xxgU048655; Thu, 5 Apr 2012 07:59:59 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q357xxpn048653; Thu, 5 Apr 2012 07:59:59 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201204050759.q357xxpn048653@svn.freebsd.org> From: Andriy Gapon Date: Thu, 5 Apr 2012 07:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233918 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Apr 2012 08:00:00 -0000 Author: avg Date: Thu Apr 5 07:59:59 2012 New Revision: 233918 URL: http://svn.freebsd.org/changeset/base/233918 Log: zfs_ioctl: no need for ddi_copyin/out here because sys_ioctl handles that On FreeBSD the direct ioctl argument is automatically copied in/out as necesary by the kernel ioctl entry point. PR: kern/164445 Submitted by: Luis Garces-Erice Tested by: Attila Nagy MFC after: 5 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Apr 5 04:41:06 2012 (r233917) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Apr 5 07:59:59 2012 (r233918) @@ -293,9 +293,12 @@ zfs_ioctl(vnode_t *vp, u_long com, intpt case _FIO_SEEK_DATA: case _FIO_SEEK_HOLE: +#ifdef sun if (ddi_copyin((void *)data, &off, sizeof (off), flag)) return (EFAULT); - +#else + off = *(offset_t *)data; +#endif zp = VTOZ(vp); zfsvfs = zp->z_zfsvfs; ZFS_ENTER(zfsvfs); @@ -306,8 +309,12 @@ zfs_ioctl(vnode_t *vp, u_long com, intpt ZFS_EXIT(zfsvfs); if (error) return (error); +#ifdef sun if (ddi_copyout(&off, (void *)data, sizeof (off), flag)) return (EFAULT); +#else + *(offset_t *)data = off; +#endif return (0); } return (ENOTTY); From owner-svn-src-head@FreeBSD.ORG Thu Apr 5 15:16:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E692B106566B; Thu, 5 Apr 2012 15:16:51 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D17E68FC16; Thu, 5 Apr 2012 15:16:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q35FGpkU063906; Thu, 5 Apr 2012 15:16:51 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35FGp3H063903; Thu, 5 Apr 2012 15:16:51 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201204051516.q35FGp3H063903@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 5 Apr 2012 15:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233923 - head/contrib/gcc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Apr 2012 15:16:52 -0000 Author: pfg Date: Thu Apr 5 15:16:51 2012 New Revision: 233923 URL: http://svn.freebsd.org/changeset/base/233923 Log: Fix a typo in GCC affecting calculations with -ffast-math. The fix is similar to the one applied in GCC-4.3 in GCCSVN-r117929 under the GPLv2. Submitted by: Andrey Simonenko Reviewed by: mm Approved by: jhb (mentor) MFC after: 3 days Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/builtins.c Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Thu Apr 5 10:38:07 2012 (r233922) +++ head/contrib/gcc/ChangeLog.gcc43 Thu Apr 5 15:16:51 2012 (r233923) @@ -169,3 +169,8 @@ * doc/extend.texi: Document SSSE3 built-in functions. * doc/invoke.texi: Document -mssse3/-mno-ssse3 switches. + +2006-10-21 Richard Guenther + + * builtins.c (fold_builtin_classify): Fix typo. + Modified: head/contrib/gcc/builtins.c ============================================================================== --- head/contrib/gcc/builtins.c Thu Apr 5 10:38:07 2012 (r233922) +++ head/contrib/gcc/builtins.c Thu Apr 5 15:16:51 2012 (r233923) @@ -8738,7 +8738,7 @@ fold_builtin_classify (tree fndecl, tree case BUILT_IN_FINITE: if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg))) && !HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg)))) - return omit_one_operand (type, integer_zero_node, arg); + return omit_one_operand (type, integer_one_node, arg); if (TREE_CODE (arg) == REAL_CST) { From owner-svn-src-head@FreeBSD.ORG Thu Apr 5 17:13:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0BB491065674; Thu, 5 Apr 2012 17:13:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E926D8FC18; Thu, 5 Apr 2012 17:13:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q35HDEO5067745; Thu, 5 Apr 2012 17:13:14 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35HDE3d067735; Thu, 5 Apr 2012 17:13:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204051713.q35HDE3d067735@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Apr 2012 17:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233925 - in head: sys/kern sys/sys sys/vm usr.bin/kdump usr.bin/ktrace X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Apr 2012 17:13:15 -0000 Author: jhb Date: Thu Apr 5 17:13:14 2012 New Revision: 233925 URL: http://svn.freebsd.org/changeset/base/233925 Log: Add new ktrace records for the start and end of VM faults. This gives a pair of records similar to syscall entry and return that a user can use to determine how long page faults take. The new ktrace records are enabled via the 'p' trace type, and are enabled in the default set of trace points. Reviewed by: kib MFC after: 2 weeks Modified: head/sys/kern/kern_ktrace.c head/sys/sys/ktrace.h head/sys/vm/vm_fault.c head/usr.bin/kdump/kdump.1 head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr head/usr.bin/ktrace/ktrace.1 head/usr.bin/ktrace/ktrace.h head/usr.bin/ktrace/subr.c Modified: head/sys/kern/kern_ktrace.c ============================================================================== --- head/sys/kern/kern_ktrace.c Thu Apr 5 16:05:35 2012 (r233924) +++ head/sys/kern/kern_ktrace.c Thu Apr 5 17:13:14 2012 (r233925) @@ -101,6 +101,8 @@ struct ktr_request { struct ktr_genio ktr_genio; struct ktr_psig ktr_psig; struct ktr_csw ktr_csw; + struct ktr_fault ktr_fault; + struct ktr_faultend ktr_faultend; } ktr_data; STAILQ_ENTRY(ktr_request) ktr_list; }; @@ -119,6 +121,8 @@ static int data_lengths[] = { sizeof(struct ktr_proc_ctor), /* KTR_PROCCTOR */ 0, /* KTR_PROCDTOR */ sizeof(struct ktr_cap_fail), /* KTR_CAPFAIL */ + sizeof(struct ktr_fault), /* KTR_FAULT */ + sizeof(struct ktr_faultend), /* KTR_FAULTEND */ }; static STAILQ_HEAD(, ktr_request) ktr_free; @@ -791,6 +795,42 @@ ktrcapfail(type, needed, held) ktr_enqueuerequest(td, req); ktrace_exit(td); } + +void +ktrfault(vaddr, type) + vm_offset_t vaddr; + int type; +{ + struct thread *td = curthread; + struct ktr_request *req; + struct ktr_fault *kf; + + req = ktr_getrequest(KTR_FAULT); + if (req == NULL) + return; + kf = &req->ktr_data.ktr_fault; + kf->vaddr = vaddr; + kf->type = type; + ktr_enqueuerequest(td, req); + ktrace_exit(td); +} + +void +ktrfaultend(result) + int result; +{ + struct thread *td = curthread; + struct ktr_request *req; + struct ktr_faultend *kf; + + req = ktr_getrequest(KTR_FAULTEND); + if (req == NULL) + return; + kf = &req->ktr_data.ktr_faultend; + kf->result = result; + ktr_enqueuerequest(td, req); + ktrace_exit(td); +} #endif /* KTRACE */ /* Interface and common routines */ Modified: head/sys/sys/ktrace.h ============================================================================== --- head/sys/sys/ktrace.h Thu Apr 5 16:05:35 2012 (r233924) +++ head/sys/sys/ktrace.h Thu Apr 5 17:13:14 2012 (r233925) @@ -194,6 +194,23 @@ struct ktr_cap_fail { }; /* + * KTR_FAULT - page fault record + */ +#define KTR_FAULT 13 +struct ktr_fault { + vm_offset_t vaddr; + int type; +}; + +/* + * KTR_FAULTEND - end of page fault record + */ +#define KTR_FAULTEND 14 +struct ktr_faultend { + int result; +}; + +/* * KTR_DROP - If this bit is set in ktr_type, then at least one event * between the previous record and this record was dropped. */ @@ -215,6 +232,8 @@ struct ktr_cap_fail { #define KTRFAC_PROCCTOR (1< __FBSDID("$FreeBSD$"); +#include "opt_ktrace.h" #include "opt_vm.h" #include @@ -86,6 +87,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef KTRACE +#include +#endif #include #include @@ -208,10 +212,23 @@ int vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags) { + struct thread *td; + int result; - if ((curthread->td_pflags & TDP_NOFAULTING) != 0) + td = curthread; + if ((td->td_pflags & TDP_NOFAULTING) != 0) return (KERN_PROTECTION_FAILURE); - return (vm_fault_hold(map, vaddr, fault_type, fault_flags, NULL)); +#ifdef KTRACE + if (map != kernel_map && KTRPOINT(td, KTR_FAULT)) + ktrfault(vaddr, fault_type); +#endif + result = vm_fault_hold(map, trunc_page(vaddr), fault_type, fault_flags, + NULL); +#ifdef KTRACE + if (map != kernel_map && KTRPOINT(td, KTR_FAULTEND)) + ktrfaultend(result); +#endif + return (result); } int Modified: head/usr.bin/kdump/kdump.1 ============================================================================== --- head/usr.bin/kdump/kdump.1 Thu Apr 5 16:05:35 2012 (r233924) +++ head/usr.bin/kdump/kdump.1 Thu Apr 5 17:13:14 2012 (r233925) @@ -28,7 +28,7 @@ .\" @(#)kdump.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd February 23, 2008 +.Dd April 5, 2012 .Dt KDUMP 1 .Os .Sh NAME @@ -171,6 +171,8 @@ The possible operations are: .It Li USER Ta data from user process Ta the data .It Li STRU Ta various syscalls Ta structure .It Li SCTL Ta Xr sysctl 3 requests Ta MIB name +.It Li PFLT Ta enter page fault Ta fault address and type +.It Li PRET Ta return from page fault Ta fault result .El .Sh SEE ALSO .Xr ktrace 1 Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Thu Apr 5 16:05:35 2012 (r233924) +++ head/usr.bin/kdump/kdump.c Thu Apr 5 17:13:14 2012 (r233925) @@ -102,6 +102,8 @@ void ktrsockaddr(struct sockaddr *); void ktrstat(struct stat *); void ktrstruct(char *, size_t); void ktrcapfail(struct ktr_cap_fail *); +void ktrfault(struct ktr_fault *); +void ktrfaultend(struct ktr_faultend *); void usage(void); void ioctlname(unsigned long, int); @@ -306,6 +308,13 @@ main(int argc, char *argv[]) break; case KTR_CAPFAIL: ktrcapfail((struct ktr_cap_fail *)m); + break; + case KTR_FAULT: + ktrfault((struct ktr_fault *)m); + break; + case KTR_FAULTEND: + ktrfaultend((struct ktr_faultend *)m); + break; default: printf("\n"); break; @@ -448,6 +457,12 @@ dumpheader(struct ktr_header *kth) case KTR_CAPFAIL: type = "CAP "; break; + case KTR_FAULT: + type = "PFLT"; + break; + case KTR_FAULTEND: + type = "PRET"; + break; default: sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type); type = unknown; @@ -1631,6 +1646,24 @@ ktrcapfail(struct ktr_cap_fail *ktr) capname((intmax_t)ktr->cap_held); break; } + printf("\n"); +} + +void +ktrfault(struct ktr_fault *ktr) +{ + + printf("0x%jx ", ktr->vaddr); + vmprotname(ktr->type); + printf("\n"); +} + +void +ktrfaultend(struct ktr_faultend *ktr) +{ + + vmresultname(ktr->result); + printf("\n"); } #if defined(__amd64__) || defined(__i386__) Modified: head/usr.bin/kdump/mksubr ============================================================================== --- head/usr.bin/kdump/mksubr Thu Apr 5 16:05:35 2012 (r233924) +++ head/usr.bin/kdump/mksubr Thu Apr 5 17:13:14 2012 (r233925) @@ -187,6 +187,8 @@ cat <<_EOF_ #include #include #include +#include +#include #include "kdump_subr.h" @@ -334,6 +336,26 @@ sockoptlevelname(int level, int decimal) } } +/* + * MANUAL + * + * Used for page fault type. Cannot use auto_or_type since the macro + * values contain a cast. Also, VM_PROT_NONE has to be handled specially. + */ +void +vmprotname (int type) +{ + int or = 0; + + if (type == VM_PROT_NONE) { + (void)printf("VM_PROT_NONE"); + return; + } + if_print_or(type, VM_PROT_READ, or); + if_print_or(type, VM_PROT_WRITE, or); + if_print_or(type, VM_PROT_EXECUTE, or); + if_print_or(type, VM_PROT_COPY, or); +} _EOF_ auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h" @@ -373,6 +395,7 @@ auto_if_type "sockipprotoname" " auto_switch_type "sockoptname" "SO_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h" auto_switch_type "socktypename" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h" auto_or_type "thrcreateflagsname" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" +auto_switch_type "vmresultname" "KERN_[A-Z]+[[:space:]]+[0-9]+" "vm/vm_param.h" auto_or_type "wait4optname" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" auto_switch_type "whencename" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h" Modified: head/usr.bin/ktrace/ktrace.1 ============================================================================== --- head/usr.bin/ktrace/ktrace.1 Thu Apr 5 16:05:35 2012 (r233924) +++ head/usr.bin/ktrace/ktrace.1 Thu Apr 5 17:13:14 2012 (r233925) @@ -28,7 +28,7 @@ .\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd October 10, 2011 +.Dd April 5, 2012 .Dt KTRACE 1 .Os .Sh NAME @@ -108,6 +108,8 @@ The following table equates the letters .Bl -tag -width flag -compact .It Cm c trace system calls +.It Cm f +trace page faults .It Cm i trace .Tn I/O @@ -129,7 +131,7 @@ trace requests .It Cm + trace the default set of trace points - -.Cm c , i , n , p , s , t , u , y +.Cm c , f , i , n , p , s , t , u , y .El .It Ar command Execute Modified: head/usr.bin/ktrace/ktrace.h ============================================================================== --- head/usr.bin/ktrace/ktrace.h Thu Apr 5 16:05:35 2012 (r233924) +++ head/usr.bin/ktrace/ktrace.h Thu Apr 5 17:13:14 2012 (r233925) @@ -32,7 +32,8 @@ #define DEF_POINTS (KTRFAC_SYSCALL | KTRFAC_SYSRET | KTRFAC_NAMEI | \ KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_USER | \ - KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_CAPFAIL) + KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_CAPFAIL | \ + KTRFAC_FAULT | KTRFAC_FAULTEND) #define PROC_ABI_POINTS (KTRFAC_PROCCTOR | KTRFAC_PROCDTOR) Modified: head/usr.bin/ktrace/subr.c ============================================================================== --- head/usr.bin/ktrace/subr.c Thu Apr 5 16:05:35 2012 (r233924) +++ head/usr.bin/ktrace/subr.c Thu Apr 5 17:13:14 2012 (r233925) @@ -64,6 +64,9 @@ getpoints(char *s) case 'i': facs |= KTRFAC_GENIO; break; + case 'f': + facs |= KTRFAC_FAULT | KTRFAC_FAULTEND; + break; case 'n': facs |= KTRFAC_NAMEI; break; From owner-svn-src-head@FreeBSD.ORG Thu Apr 5 18:47:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EE591065677; Thu, 5 Apr 2012 18:47:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59C258FC18; Thu, 5 Apr 2012 18:47:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q35IltLW072252; Thu, 5 Apr 2012 18:47:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35Iltbe072250; Thu, 5 Apr 2012 18:47:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204051847.q35Iltbe072250@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Apr 2012 18:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233927 - head/libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Apr 2012 18:47:55 -0000 Author: kib Date: Thu Apr 5 18:47:54 2012 New Revision: 233927 URL: http://svn.freebsd.org/changeset/base/233927 Log: Properly handle absent AT_CANARY aux entry. Submitted by: Andrey Zonov MFC after: 3 days Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Apr 5 18:43:27 2012 (r233926) +++ head/libexec/rtld-elf/rtld.c Thu Apr 5 18:47:54 2012 (r233927) @@ -351,7 +351,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ main_argc = argc; main_argv = argv; - if (aux_info[AT_CANARY]->a_un.a_ptr != NULL) { + if (aux_info[AT_CANARY] != NULL && + aux_info[AT_CANARY]->a_un.a_ptr != NULL) { i = aux_info[AT_CANARYLEN]->a_un.a_val; if (i > sizeof(__stack_chk_guard)) i = sizeof(__stack_chk_guard); From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 00:03:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8138D106566C; Fri, 6 Apr 2012 00:03:46 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A1C88FC1A; Fri, 6 Apr 2012 00:03:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3603k3A082817; Fri, 6 Apr 2012 00:03:46 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3603kqF082814; Fri, 6 Apr 2012 00:03:46 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201204060003.q3603kqF082814@svn.freebsd.org> From: Stanislav Sedov Date: Fri, 6 Apr 2012 00:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233932 - in head: contrib/telnet/libtelnet lib/libtelnet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 00:03:46 -0000 Author: stas Date: Fri Apr 6 00:03:45 2012 New Revision: 233932 URL: http://svn.freebsd.org/changeset/base/233932 Log: - Do not use deprecated krb5 error message reporting functions in libtelnet. Modified: head/contrib/telnet/libtelnet/kerberos5.c head/lib/libtelnet/Makefile Modified: head/contrib/telnet/libtelnet/kerberos5.c ============================================================================== --- head/contrib/telnet/libtelnet/kerberos5.c Thu Apr 5 22:40:31 2012 (r233931) +++ head/contrib/telnet/libtelnet/kerberos5.c Fri Apr 6 00:03:45 2012 (r233932) @@ -100,6 +100,16 @@ static krb5_ticket *ticket; static krb5_context context; static krb5_auth_context auth_context; +static void +print_krb5_error(krb5_context context, krb5_error_code code, const char *msg) +{ + const char *error_message; + + error_message = krb5_get_error_message(context, code); + printf(msg, error_message); + krb5_free_error_message(context, error_message); +} + static int Data(Authenticator *ap, int type, const char *d, int c) { @@ -182,8 +192,7 @@ kerberos5_send(const char *name, Authent ret = krb5_cc_default(context, &ccache); if (ret) { if (auth_debug_mode) { - printf("Kerberos V5: could not get default ccache: %s\r\n", - krb5_get_err_text (context, ret)); + print_krb5_error(context, ret, "Kerberos V5: could not get default ccache: %s\r\n"); } return 0; } @@ -197,8 +206,7 @@ kerberos5_send(const char *name, Authent ret = krb5_auth_con_init (context, &auth_context); if (ret) { if (auth_debug_mode) { - printf("Kerberos V5: krb5_auth_con_init failed (%s)\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5: krb5_auth_con_init failed (%s)\r\n"); } return(0); } @@ -208,9 +216,8 @@ kerberos5_send(const char *name, Authent &net); if (ret) { if (auth_debug_mode) { - printf ("Kerberos V5:" - " krb5_auth_con_setaddrs_from_fd failed (%s)\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5:" + " krb5_auth_con_setaddrs_from_fd failed (%s)\r\n"); } return(0); } @@ -236,18 +243,21 @@ kerberos5_send(const char *name, Authent &service); if(ret) { if (auth_debug_mode) { - printf ("Kerberos V5:" + const char *err_str; + + err_str = krb5_get_error_message(context, ret); + printf("Kerberosr V5:" " krb5_sname_to_principal(%s) failed (%s)\r\n", - RemoteHostName, krb5_get_err_text(context, ret)); + RemoteHostName, err_str); + krb5_free_error_message(context, err_str); } return 0; } ret = krb5_unparse_name_fixed(context, service, sname, sizeof(sname)); if(ret) { if (auth_debug_mode) { - printf ("Kerberos V5:" - " krb5_unparse_name_fixed failed (%s)\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5:" + " krb5_unparse_name_fixed failed (%s)\r\n"); } return 0; } @@ -260,8 +270,7 @@ kerberos5_send(const char *name, Authent } if (ret) { if (1 || auth_debug_mode) { - printf("Kerberos V5: mk_req failed (%s)\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5: mk_req failed (%s)\r\n"); } return(0); } @@ -319,8 +328,7 @@ kerberos5_is(Authenticator *ap, unsigned Data(ap, KRB_REJECT, "krb5_auth_con_init failed", -1); auth_finished(ap, AUTH_REJECT); if (auth_debug_mode) - printf("Kerberos V5: krb5_auth_con_init failed (%s)\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5: krb5_auth_con_init failed (%s)\r\n"); return; } @@ -331,9 +339,8 @@ kerberos5_is(Authenticator *ap, unsigned Data(ap, KRB_REJECT, "krb5_auth_con_setaddrs_from_fd failed", -1); auth_finished(ap, AUTH_REJECT); if (auth_debug_mode) - printf("Kerberos V5: " - "krb5_auth_con_setaddrs_from_fd failed (%s)\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5: " + "krb5_auth_con_setaddrs_from_fd failed (%s)\r\n"); return; } @@ -346,9 +353,8 @@ kerberos5_is(Authenticator *ap, unsigned Data(ap, KRB_REJECT, "krb5_sock_to_principal failed", -1); auth_finished(ap, AUTH_REJECT); if (auth_debug_mode) - printf("Kerberos V5: " - "krb5_sock_to_principal failed (%s)\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5: " + "krb5_sock_to_principal failed (%s)\r\n"); return; } @@ -363,10 +369,12 @@ kerberos5_is(Authenticator *ap, unsigned krb5_free_principal (context, server); if (ret) { char *errbuf; + const char *err_str; + err_str = krb5_get_error_message(context, ret); asprintf(&errbuf, - "Read req failed: %s", - krb5_get_err_text(context, ret)); + "Read req failed: %s", err_str); + krb5_free_error_message(context, err_str); Data(ap, KRB_REJECT, errbuf, -1); if (auth_debug_mode) printf("%s\r\n", errbuf); @@ -387,8 +395,11 @@ kerberos5_is(Authenticator *ap, unsigned if (ret) { char *errbuf; - asprintf(&errbuf, "Bad checksum: %s", - krb5_get_err_text(context, ret)); + const char *err_str; + + err_str = krb5_get_error_message(context, ret); + asprintf(&errbuf, "Bad checksum: %s", err_str); + krb5_free_error_message(context, err_str); Data(ap, KRB_REJECT, errbuf, -1); if (auth_debug_mode) printf ("%s\r\n", errbuf); @@ -404,9 +415,8 @@ kerberos5_is(Authenticator *ap, unsigned Data(ap, KRB_REJECT, "krb5_auth_con_getremotesubkey failed", -1); auth_finished(ap, AUTH_REJECT); if (auth_debug_mode) - printf("Kerberos V5: " - "krb5_auth_con_getremotesubkey failed (%s)\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5: " + "krb5_auth_con_getremotesubkey failed (%s)\r\n"); return; } @@ -419,9 +429,8 @@ kerberos5_is(Authenticator *ap, unsigned Data(ap, KRB_REJECT, "krb5_auth_con_getkey failed", -1); auth_finished(ap, AUTH_REJECT); if (auth_debug_mode) - printf("Kerberos V5: " - "krb5_auth_con_getkey failed (%s)\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5: " + "krb5_auth_con_getkey failed (%s)\r\n"); return; } if (key_block == NULL) { @@ -440,9 +449,8 @@ kerberos5_is(Authenticator *ap, unsigned "krb5_mk_rep failed", -1); auth_finished(ap, AUTH_REJECT); if (auth_debug_mode) - printf("Kerberos V5: " - "krb5_mk_rep failed (%s)\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5: " + "krb5_mk_rep failed (%s)\r\n"); return; } Data(ap, KRB_RESPONSE, outbuf.data, outbuf.length); @@ -509,8 +517,7 @@ kerberos5_is(Authenticator *ap, unsigned ret = krb5_cc_resolve (context, ccname, &ccache); if (ret) { if (auth_debug_mode) - printf ("Kerberos V5: could not get ccache: %s\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5: could not get ccache: %s\r\n"); break; } @@ -519,8 +526,7 @@ kerberos5_is(Authenticator *ap, unsigned ticket->client); if (ret) { if (auth_debug_mode) - printf ("Kerberos V5: could not init ccache: %s\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "Kerberos V5: could not init ccache: %s\r\n"); break; } @@ -533,10 +539,12 @@ kerberos5_is(Authenticator *ap, unsigned &inbuf); if(ret) { char *errbuf; + const char *err_str; + err_str = krb5_get_error_message(context, ret); asprintf (&errbuf, - "Read forwarded creds failed: %s", - krb5_get_err_text (context, ret)); + "Read forwarded creds failed: %s", err_str); + krb5_free_error_message(context, err_str); if(errbuf == NULL) Data(ap, KRB_FORWARD_REJECT, NULL, 0); else @@ -604,8 +612,7 @@ kerberos5_reply(Authenticator *ap, unsig auth_context, &keyblock); if(ret) { - printf("[ krb5_auth_con_getkey: %s ]\r\n", - krb5_get_err_text(context, ret)); + print_krb5_error(context, ret, "[ krb5_auth_con_getkey: %s ]\r\n"); auth_send_retry(); return; } @@ -632,8 +639,7 @@ kerberos5_reply(Authenticator *ap, unsig ret = krb5_rd_rep(context, auth_context, &inbuf, &reply); if (ret) { - printf("[ Mutual authentication failed: %s ]\r\n", - krb5_get_err_text (context, ret)); + print_krb5_error(context, ret, "[ Mutual authentication failed: %s ]\r\n"); auth_send_retry(); return; } @@ -748,16 +754,14 @@ kerberos5_forward(Authenticator *ap) ret = krb5_cc_default (context, &ccache); if (ret) { if (auth_debug_mode) - printf ("KerberosV5: could not get default ccache: %s\r\n", - krb5_get_err_text (context, ret)); + print_krb5_error(context, ret, "KerberosV5: could not get default ccache: %s\r\n"); return; } ret = krb5_cc_get_principal (context, ccache, &principal); if (ret) { if (auth_debug_mode) - printf ("KerberosV5: could not get principal: %s\r\n", - krb5_get_err_text (context, ret)); + print_krb5_error(context, ret, "KerberosV5: could not get principal: %s\r\n"); return; } @@ -775,8 +779,7 @@ kerberos5_forward(Authenticator *ap) if (ret) { if (auth_debug_mode) - printf ("KerberosV5: could not get principal: %s\r\n", - krb5_get_err_text (context, ret)); + print_krb5_error(context, ret, "KerberosV5: could not get principal: %s\r\n"); return; } @@ -796,8 +799,7 @@ kerberos5_forward(Authenticator *ap) &out_data); if (ret) { if (auth_debug_mode) - printf ("Kerberos V5: error getting forwarded creds: %s\r\n", - krb5_get_err_text (context, ret)); + print_krb5_error(context, ret, "Kerberos V5: error getting forwarded creds: %s\r\n"); return; } Modified: head/lib/libtelnet/Makefile ============================================================================== --- head/lib/libtelnet/Makefile Thu Apr 5 22:40:31 2012 (r233931) +++ head/lib/libtelnet/Makefile Fri Apr 6 00:03:45 2012 (r233932) @@ -14,7 +14,6 @@ SRCS= genget.c getent.c misc.c CFLAGS+= -I${TELNETDIR} WARNS?= 2 -NO_WERROR= yes .if !defined(RELEASE_CRUNCH) .if ${MK_OPENSSL} != "no" From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 06:53:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0033A106564A; Fri, 6 Apr 2012 06:53:58 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE8EF8FC12; Fri, 6 Apr 2012 06:53:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q366rw17096190; Fri, 6 Apr 2012 06:53:58 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q366rwLa096182; Fri, 6 Apr 2012 06:53:58 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204060653.q366rwLa096182@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Fri, 6 Apr 2012 06:53:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233937 - in head/sys: kern net security/mac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 06:53:59 -0000 Author: melifaro Date: Fri Apr 6 06:53:58 2012 New Revision: 233937 URL: http://svn.freebsd.org/changeset/base/233937 Log: - Improve BPF locking model. Interface locks and descriptor locks are converted from mutex(9) to rwlock(9). This greately improves performance: in most common case we need to acquire 1 reader lock instead of 2 mutexes. - Remove filter(descriptor) (reader) lock in bpf_mtap[2] This was suggested by glebius@. We protect filter by requesting interface writer lock on filter change. - Cover struct bpf_if under BPF_INTERNAL define. This permits including bpf.h without including rwlock stuff. However, this is is temporary solution, struct bpf_if should be made opaque for any external caller. Found by: Dmitrij Tejblum Sponsored by: Yandex LLC Reviewed by: glebius (previous version) Reviewed by: silence on -net@ Approved by: (mentor) MFC after: 3 weeks Modified: head/sys/kern/subr_witness.c head/sys/net/bpf.c head/sys/net/bpf.h head/sys/net/bpf_buffer.c head/sys/net/bpf_zerocopy.c head/sys/net/bpfdesc.h head/sys/security/mac/mac_net.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Fri Apr 6 06:40:17 2012 (r233936) +++ head/sys/kern/subr_witness.c Fri Apr 6 06:53:58 2012 (r233937) @@ -563,8 +563,8 @@ static struct witness_order_list_entry o * BPF */ { "bpf global lock", &lock_class_mtx_sleep }, - { "bpf interface lock", &lock_class_mtx_sleep }, - { "bpf cdev lock", &lock_class_mtx_sleep }, + { "bpf interface lock", &lock_class_rw }, + { "bpf cdev lock", &lock_class_rw }, { NULL, NULL }, /* * NFS server Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Fri Apr 6 06:40:17 2012 (r233936) +++ head/sys/net/bpf.c Fri Apr 6 06:53:58 2012 (r233937) @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -66,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#define BPF_INTERNAL #include #include #ifdef BPF_JITTER @@ -207,7 +210,7 @@ bpf_append_bytes(struct bpf_d *d, caddr_ u_int len) { - BPFD_LOCK_ASSERT(d); + BPFD_WLOCK_ASSERT(d); switch (d->bd_bufmode) { case BPF_BUFMODE_BUFFER: @@ -227,7 +230,7 @@ bpf_append_mbuf(struct bpf_d *d, caddr_t u_int len) { - BPFD_LOCK_ASSERT(d); + BPFD_WLOCK_ASSERT(d); switch (d->bd_bufmode) { case BPF_BUFMODE_BUFFER: @@ -249,7 +252,7 @@ static void bpf_buf_reclaimed(struct bpf_d *d) { - BPFD_LOCK_ASSERT(d); + BPFD_WLOCK_ASSERT(d); switch (d->bd_bufmode) { case BPF_BUFMODE_BUFFER: @@ -290,7 +293,6 @@ bpf_canfreebuf(struct bpf_d *d) static int bpf_canwritebuf(struct bpf_d *d) { - BPFD_LOCK_ASSERT(d); switch (d->bd_bufmode) { @@ -309,7 +311,7 @@ static void bpf_buffull(struct bpf_d *d) { - BPFD_LOCK_ASSERT(d); + BPFD_WLOCK_ASSERT(d); switch (d->bd_bufmode) { case BPF_BUFMODE_ZBUF: @@ -325,7 +327,7 @@ void bpf_bufheld(struct bpf_d *d) { - BPFD_LOCK_ASSERT(d); + BPFD_WLOCK_ASSERT(d); switch (d->bd_bufmode) { case BPF_BUFMODE_ZBUF: @@ -574,12 +576,12 @@ bpf_attachd(struct bpf_d *d, struct bpf_ * Finally, point the driver's bpf cookie at the interface so * it will divert packets to bpf. */ - BPFIF_LOCK(bp); + BPFIF_WLOCK(bp); d->bd_bif = bp; LIST_INSERT_HEAD(&bp->bif_dlist, d, bd_next); bpf_bpfd_cnt++; - BPFIF_UNLOCK(bp); + BPFIF_WUNLOCK(bp); EVENTHANDLER_INVOKE(bpf_track, bp->bif_ifp, bp->bif_dlt, 1); } @@ -594,20 +596,24 @@ bpf_detachd(struct bpf_d *d) struct bpf_if *bp; struct ifnet *ifp; + BPF_LOCK_ASSERT(); + bp = d->bd_bif; - BPFIF_LOCK(bp); - BPFD_LOCK(d); - ifp = d->bd_bif->bif_ifp; + BPFIF_WLOCK(bp); + BPFD_WLOCK(d); /* * Remove d from the interface's descriptor list. */ LIST_REMOVE(d, bd_next); - bpf_bpfd_cnt--; + ifp = bp->bif_ifp; d->bd_bif = NULL; - BPFD_UNLOCK(d); - BPFIF_UNLOCK(bp); + BPFD_WUNLOCK(d); + BPFIF_WUNLOCK(bp); + + /* We're already protected by global lock. */ + bpf_bpfd_cnt--; EVENTHANDLER_INVOKE(bpf_track, ifp, bp->bif_dlt, 0); @@ -642,16 +648,16 @@ bpf_dtor(void *data) { struct bpf_d *d = data; - BPFD_LOCK(d); + BPFD_WLOCK(d); if (d->bd_state == BPF_WAITING) callout_stop(&d->bd_callout); d->bd_state = BPF_IDLE; - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); funsetown(&d->bd_sigio); - mtx_lock(&bpf_mtx); + BPF_LOCK(); if (d->bd_bif) bpf_detachd(d); - mtx_unlock(&bpf_mtx); + BPF_UNLOCK(); #ifdef MAC mac_bpfdesc_destroy(d); #endif /* MAC */ @@ -689,14 +695,14 @@ bpfopen(struct cdev *dev, int flags, int d->bd_bufmode = BPF_BUFMODE_BUFFER; d->bd_sig = SIGIO; d->bd_direction = BPF_D_INOUT; - d->bd_pid = td->td_proc->p_pid; + BPF_PID_REFRESH(d, td); #ifdef MAC mac_bpfdesc_init(d); mac_bpfdesc_create(td->td_ucred, d); #endif - mtx_init(&d->bd_mtx, devtoname(dev), "bpf cdev lock", MTX_DEF); - callout_init_mtx(&d->bd_callout, &d->bd_mtx, 0); - knlist_init_mtx(&d->bd_sel.si_note, &d->bd_mtx); + rw_init(&d->bd_lock, "bpf cdev lock"); + callout_init_rw(&d->bd_callout, &d->bd_lock, 0); + knlist_init_rw_reader(&d->bd_sel.si_note, &d->bd_lock); return (0); } @@ -725,10 +731,10 @@ bpfread(struct cdev *dev, struct uio *ui non_block = ((ioflag & O_NONBLOCK) != 0); - BPFD_LOCK(d); - d->bd_pid = curthread->td_proc->p_pid; + BPFD_WLOCK(d); + BPF_PID_REFRESH_CUR(d); if (d->bd_bufmode != BPF_BUFMODE_BUFFER) { - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (EOPNOTSUPP); } if (d->bd_state == BPF_WAITING) @@ -764,18 +770,18 @@ bpfread(struct cdev *dev, struct uio *ui * it before using it again. */ if (d->bd_bif == NULL) { - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (ENXIO); } if (non_block) { - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (EWOULDBLOCK); } - error = msleep(d, &d->bd_mtx, PRINET|PCATCH, + error = rw_sleep(d, &d->bd_lock, PRINET|PCATCH, "bpf", d->bd_rtout); if (error == EINTR || error == ERESTART) { - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (error); } if (error == EWOULDBLOCK) { @@ -793,7 +799,7 @@ bpfread(struct cdev *dev, struct uio *ui break; if (d->bd_slen == 0) { - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (0); } ROTATE_BUFFERS(d); @@ -803,7 +809,7 @@ bpfread(struct cdev *dev, struct uio *ui /* * At this point, we know we have something in the hold slot. */ - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); /* * Move data from hold buffer into user space. @@ -816,12 +822,12 @@ bpfread(struct cdev *dev, struct uio *ui */ error = bpf_uiomove(d, d->bd_hbuf, d->bd_hlen, uio); - BPFD_LOCK(d); + BPFD_WLOCK(d); d->bd_fbuf = d->bd_hbuf; d->bd_hbuf = NULL; d->bd_hlen = 0; bpf_buf_reclaimed(d); - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (error); } @@ -833,7 +839,7 @@ static __inline void bpf_wakeup(struct bpf_d *d) { - BPFD_LOCK_ASSERT(d); + BPFD_WLOCK_ASSERT(d); if (d->bd_state == BPF_WAITING) { callout_stop(&d->bd_callout); d->bd_state = BPF_IDLE; @@ -851,7 +857,7 @@ bpf_timed_out(void *arg) { struct bpf_d *d = (struct bpf_d *)arg; - BPFD_LOCK_ASSERT(d); + BPFD_WLOCK_ASSERT(d); if (callout_pending(&d->bd_callout) || !callout_active(&d->bd_callout)) return; @@ -866,7 +872,7 @@ static int bpf_ready(struct bpf_d *d) { - BPFD_LOCK_ASSERT(d); + BPFD_WLOCK_ASSERT(d); if (!bpf_canfreebuf(d) && d->bd_hlen != 0) return (1); @@ -889,7 +895,7 @@ bpfwrite(struct cdev *dev, struct uio *u if (error != 0) return (error); - d->bd_pid = curthread->td_proc->p_pid; + BPF_PID_REFRESH_CUR(d); d->bd_wcount++; if (d->bd_bif == NULL) { d->bd_wdcount++; @@ -937,11 +943,11 @@ bpfwrite(struct cdev *dev, struct uio *u CURVNET_SET(ifp->if_vnet); #ifdef MAC - BPFD_LOCK(d); + BPFD_WLOCK(d); mac_bpfdesc_create_mbuf(d, m); if (mc != NULL) mac_bpfdesc_create_mbuf(d, mc); - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); #endif error = (*ifp->if_output)(ifp, m, &dst, NULL); @@ -970,7 +976,7 @@ static void reset_d(struct bpf_d *d) { - mtx_assert(&d->bd_mtx, MA_OWNED); + BPFD_WLOCK_ASSERT(d); if ((d->bd_hbuf != NULL) && (d->bd_bufmode != BPF_BUFMODE_ZBUF || bpf_canfreebuf(d))) { @@ -1037,12 +1043,12 @@ bpfioctl(struct cdev *dev, u_long cmd, c /* * Refresh PID associated with this descriptor. */ - BPFD_LOCK(d); - d->bd_pid = td->td_proc->p_pid; + BPFD_WLOCK(d); + BPF_PID_REFRESH(d, td); if (d->bd_state == BPF_WAITING) callout_stop(&d->bd_callout); d->bd_state = BPF_IDLE; - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); if (d->bd_locked == 1) { switch (cmd) { @@ -1108,11 +1114,11 @@ bpfioctl(struct cdev *dev, u_long cmd, c { int n; - BPFD_LOCK(d); + BPFD_WLOCK(d); n = d->bd_slen; if (d->bd_hbuf) n += d->bd_hlen; - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); *(int *)addr = n; break; @@ -1163,9 +1169,9 @@ bpfioctl(struct cdev *dev, u_long cmd, c * Flush read packet buffer. */ case BIOCFLUSH: - BPFD_LOCK(d); + BPFD_WLOCK(d); reset_d(d); - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); break; /* @@ -1488,15 +1494,15 @@ bpfioctl(struct cdev *dev, u_long cmd, c return (EINVAL); } - BPFD_LOCK(d); + BPFD_WLOCK(d); if (d->bd_sbuf != NULL || d->bd_hbuf != NULL || d->bd_fbuf != NULL || d->bd_bif != NULL) { - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); CURVNET_RESTORE(); return (EBUSY); } d->bd_bufmode = *(u_int *)addr; - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); break; case BIOCGETZMAX: @@ -1556,7 +1562,12 @@ bpf_setf(struct bpf_d *d, struct bpf_pro if (fp->bf_insns == NULL) { if (fp->bf_len != 0) return (EINVAL); - BPFD_LOCK(d); + /* + * Protect filter change by interface lock, too. + * The same lock order is used by bpf_detachd(). + */ + BPFIF_WLOCK(d->bd_bif); + BPFD_WLOCK(d); if (wfilter) d->bd_wfilter = NULL; else { @@ -1567,7 +1578,8 @@ bpf_setf(struct bpf_d *d, struct bpf_pro if (cmd == BIOCSETF) reset_d(d); } - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); + BPFIF_WUNLOCK(d->bd_bif); if (old != NULL) free((caddr_t)old, M_BPF); #ifdef BPF_JITTER @@ -1584,7 +1596,12 @@ bpf_setf(struct bpf_d *d, struct bpf_pro fcode = (struct bpf_insn *)malloc(size, M_BPF, M_WAITOK); if (copyin((caddr_t)fp->bf_insns, (caddr_t)fcode, size) == 0 && bpf_validate(fcode, (int)flen)) { - BPFD_LOCK(d); + /* + * Protect filter change by interface lock, too + * The same lock order is used by bpf_detachd(). + */ + BPFIF_WLOCK(d->bd_bif); + BPFD_WLOCK(d); if (wfilter) d->bd_wfilter = fcode; else { @@ -1595,7 +1612,8 @@ bpf_setf(struct bpf_d *d, struct bpf_pro if (cmd == BIOCSETF) reset_d(d); } - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); + BPFIF_WUNLOCK(d->bd_bif); if (old != NULL) free((caddr_t)old, M_BPF); #ifdef BPF_JITTER @@ -1659,9 +1677,9 @@ bpf_setif(struct bpf_d *d, struct ifreq bpf_attachd(d, bp); } - BPFD_LOCK(d); + BPFD_WLOCK(d); reset_d(d); - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (0); } @@ -1685,8 +1703,8 @@ bpfpoll(struct cdev *dev, int events, st * Refresh PID associated with this descriptor. */ revents = events & (POLLOUT | POLLWRNORM); - BPFD_LOCK(d); - d->bd_pid = td->td_proc->p_pid; + BPFD_WLOCK(d); + BPF_PID_REFRESH(d, td); if (events & (POLLIN | POLLRDNORM)) { if (bpf_ready(d)) revents |= events & (POLLIN | POLLRDNORM); @@ -1700,7 +1718,7 @@ bpfpoll(struct cdev *dev, int events, st } } } - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (revents); } @@ -1720,12 +1738,12 @@ bpfkqfilter(struct cdev *dev, struct kno /* * Refresh PID associated with this descriptor. */ - BPFD_LOCK(d); - d->bd_pid = curthread->td_proc->p_pid; + BPFD_WLOCK(d); + BPF_PID_REFRESH_CUR(d); kn->kn_fop = &bpfread_filtops; kn->kn_hook = d; knlist_add(&d->bd_sel.si_note, kn, 1); - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (0); } @@ -1744,7 +1762,7 @@ filt_bpfread(struct knote *kn, long hint struct bpf_d *d = (struct bpf_d *)kn->kn_hook; int ready; - BPFD_LOCK_ASSERT(d); + BPFD_WLOCK_ASSERT(d); ready = bpf_ready(d); if (ready) { kn->kn_data = d->bd_slen; @@ -1819,9 +1837,19 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, int gottime; gottime = BPF_TSTAMP_NONE; - BPFIF_LOCK(bp); + + BPFIF_RLOCK(bp); + LIST_FOREACH(d, &bp->bif_dlist, bd_next) { - BPFD_LOCK(d); + /* + * We are not using any locks for d here because: + * 1) any filter change is protected by interface + * write lock + * 2) destroying/detaching d is protected by interface + * write lock, too + */ + + /* XXX: Do not protect counter for the sake of performance. */ ++d->bd_rcount; /* * NB: We dont call BPF_CHECK_DIRECTION() here since there is no @@ -1837,6 +1865,11 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, #endif slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen); if (slen != 0) { + /* + * Filter matches. Let's to acquire write lock. + */ + BPFD_WLOCK(d); + d->bd_fcount++; if (gottime < bpf_ts_quality(d->bd_tstamp)) gottime = bpf_gettime(&bt, d->bd_tstamp, NULL); @@ -1845,10 +1878,10 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, #endif catchpacket(d, pkt, pktlen, slen, bpf_append_bytes, &bt); + BPFD_WUNLOCK(d); } - BPFD_UNLOCK(d); } - BPFIF_UNLOCK(bp); + BPFIF_RUNLOCK(bp); } #define BPF_CHECK_DIRECTION(d, r, i) \ @@ -1857,6 +1890,7 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, /* * Incoming linkage from device drivers, when packet is in an mbuf chain. + * Locking model is explained in bpf_tap(). */ void bpf_mtap(struct bpf_if *bp, struct mbuf *m) @@ -1876,13 +1910,13 @@ bpf_mtap(struct bpf_if *bp, struct mbuf } pktlen = m_length(m, NULL); - gottime = BPF_TSTAMP_NONE; - BPFIF_LOCK(bp); + + BPFIF_RLOCK(bp); + LIST_FOREACH(d, &bp->bif_dlist, bd_next) { if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp)) continue; - BPFD_LOCK(d); ++d->bd_rcount; #ifdef BPF_JITTER bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; @@ -1893,6 +1927,8 @@ bpf_mtap(struct bpf_if *bp, struct mbuf #endif slen = bpf_filter(d->bd_rfilter, (u_char *)m, pktlen, 0); if (slen != 0) { + BPFD_WLOCK(d); + d->bd_fcount++; if (gottime < bpf_ts_quality(d->bd_tstamp)) gottime = bpf_gettime(&bt, d->bd_tstamp, m); @@ -1901,10 +1937,10 @@ bpf_mtap(struct bpf_if *bp, struct mbuf #endif catchpacket(d, (u_char *)m, pktlen, slen, bpf_append_mbuf, &bt); + BPFD_WUNLOCK(d); } - BPFD_UNLOCK(d); } - BPFIF_UNLOCK(bp); + BPFIF_RUNLOCK(bp); } /* @@ -1938,14 +1974,17 @@ bpf_mtap2(struct bpf_if *bp, void *data, pktlen += dlen; gottime = BPF_TSTAMP_NONE; - BPFIF_LOCK(bp); + + BPFIF_RLOCK(bp); + LIST_FOREACH(d, &bp->bif_dlist, bd_next) { if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp)) continue; - BPFD_LOCK(d); ++d->bd_rcount; slen = bpf_filter(d->bd_rfilter, (u_char *)&mb, pktlen, 0); if (slen != 0) { + BPFD_WLOCK(d); + d->bd_fcount++; if (gottime < bpf_ts_quality(d->bd_tstamp)) gottime = bpf_gettime(&bt, d->bd_tstamp, m); @@ -1954,10 +1993,10 @@ bpf_mtap2(struct bpf_if *bp, void *data, #endif catchpacket(d, (u_char *)&mb, pktlen, slen, bpf_append_mbuf, &bt); + BPFD_WUNLOCK(d); } - BPFD_UNLOCK(d); } - BPFIF_UNLOCK(bp); + BPFIF_RUNLOCK(bp); } #undef BPF_CHECK_DIRECTION @@ -2049,7 +2088,7 @@ catchpacket(struct bpf_d *d, u_char *pkt int do_timestamp; int tstype; - BPFD_LOCK_ASSERT(d); + BPFD_WLOCK_ASSERT(d); /* * Detect whether user space has released a buffer back to us, and if @@ -2196,7 +2235,7 @@ bpf_freed(struct bpf_d *d) } if (d->bd_wfilter != NULL) free((caddr_t)d->bd_wfilter, M_BPF); - mtx_destroy(&d->bd_mtx); + rw_destroy(&d->bd_lock); } /* @@ -2228,13 +2267,13 @@ bpfattach2(struct ifnet *ifp, u_int dlt, LIST_INIT(&bp->bif_dlist); bp->bif_ifp = ifp; bp->bif_dlt = dlt; - mtx_init(&bp->bif_mtx, "bpf interface lock", NULL, MTX_DEF); + rw_init(&bp->bif_lock, "bpf interface lock"); KASSERT(*driverp == NULL, ("bpfattach2: driverp already initialized")); *driverp = bp; - mtx_lock(&bpf_mtx); + BPF_LOCK(); LIST_INSERT_HEAD(&bpf_iflist, bp, bif_next); - mtx_unlock(&bpf_mtx); + BPF_UNLOCK(); bp->bif_hdrlen = hdrlen; @@ -2261,14 +2300,14 @@ bpfdetach(struct ifnet *ifp) /* Find all bpf_if struct's which reference ifp and detach them. */ do { - mtx_lock(&bpf_mtx); + BPF_LOCK(); LIST_FOREACH(bp, &bpf_iflist, bif_next) { if (ifp == bp->bif_ifp) break; } if (bp != NULL) LIST_REMOVE(bp, bif_next); - mtx_unlock(&bpf_mtx); + BPF_UNLOCK(); if (bp != NULL) { #ifdef INVARIANTS @@ -2276,11 +2315,11 @@ bpfdetach(struct ifnet *ifp) #endif while ((d = LIST_FIRST(&bp->bif_dlist)) != NULL) { bpf_detachd(d); - BPFD_LOCK(d); + BPFD_WLOCK(d); bpf_wakeup(d); - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); } - mtx_destroy(&bp->bif_mtx); + rw_destroy(&bp->bif_lock); free(bp, M_BPF); } } while (bp != NULL); @@ -2304,13 +2343,13 @@ bpf_getdltlist(struct bpf_d *d, struct b ifp = d->bd_bif->bif_ifp; n = 0; error = 0; - mtx_lock(&bpf_mtx); + BPF_LOCK(); LIST_FOREACH(bp, &bpf_iflist, bif_next) { if (bp->bif_ifp != ifp) continue; if (bfl->bfl_list != NULL) { if (n >= bfl->bfl_len) { - mtx_unlock(&bpf_mtx); + BPF_UNLOCK(); return (ENOMEM); } error = copyout(&bp->bif_dlt, @@ -2318,7 +2357,7 @@ bpf_getdltlist(struct bpf_d *d, struct b } n++; } - mtx_unlock(&bpf_mtx); + BPF_UNLOCK(); bfl->bfl_len = n; return (error); } @@ -2336,19 +2375,19 @@ bpf_setdlt(struct bpf_d *d, u_int dlt) if (d->bd_bif->bif_dlt == dlt) return (0); ifp = d->bd_bif->bif_ifp; - mtx_lock(&bpf_mtx); + BPF_LOCK(); LIST_FOREACH(bp, &bpf_iflist, bif_next) { if (bp->bif_ifp == ifp && bp->bif_dlt == dlt) break; } - mtx_unlock(&bpf_mtx); + BPF_UNLOCK(); if (bp != NULL) { opromisc = d->bd_promisc; bpf_detachd(d); bpf_attachd(d, bp); - BPFD_LOCK(d); + BPFD_WLOCK(d); reset_d(d); - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); if (opromisc) { error = ifpromisc(bp->bif_ifp, 1); if (error) @@ -2386,22 +2425,22 @@ bpf_zero_counters(void) struct bpf_if *bp; struct bpf_d *bd; - mtx_lock(&bpf_mtx); + BPF_LOCK(); LIST_FOREACH(bp, &bpf_iflist, bif_next) { - BPFIF_LOCK(bp); + BPFIF_RLOCK(bp); LIST_FOREACH(bd, &bp->bif_dlist, bd_next) { - BPFD_LOCK(bd); + BPFD_WLOCK(bd); bd->bd_rcount = 0; bd->bd_dcount = 0; bd->bd_fcount = 0; bd->bd_wcount = 0; bd->bd_wfcount = 0; bd->bd_zcopy = 0; - BPFD_UNLOCK(bd); + BPFD_WUNLOCK(bd); } - BPFIF_UNLOCK(bp); + BPFIF_RUNLOCK(bp); } - mtx_unlock(&bpf_mtx); + BPF_UNLOCK(); } static void @@ -2472,24 +2511,24 @@ bpf_stats_sysctl(SYSCTL_HANDLER_ARGS) if (bpf_bpfd_cnt == 0) return (SYSCTL_OUT(req, 0, 0)); xbdbuf = malloc(req->oldlen, M_BPF, M_WAITOK); - mtx_lock(&bpf_mtx); + BPF_LOCK(); if (req->oldlen < (bpf_bpfd_cnt * sizeof(*xbd))) { - mtx_unlock(&bpf_mtx); + BPF_UNLOCK(); free(xbdbuf, M_BPF); return (ENOMEM); } index = 0; LIST_FOREACH(bp, &bpf_iflist, bif_next) { - BPFIF_LOCK(bp); + BPFIF_RLOCK(bp); LIST_FOREACH(bd, &bp->bif_dlist, bd_next) { xbd = &xbdbuf[index++]; - BPFD_LOCK(bd); + BPFD_RLOCK(bd); bpfstats_fill_xbpf(xbd, bd); - BPFD_UNLOCK(bd); + BPFD_RUNLOCK(bd); } - BPFIF_UNLOCK(bp); + BPFIF_RUNLOCK(bp); } - mtx_unlock(&bpf_mtx); + BPF_UNLOCK(); error = SYSCTL_OUT(req, xbdbuf, index * sizeof(*xbd)); free(xbdbuf, M_BPF); return (error); Modified: head/sys/net/bpf.h ============================================================================== --- head/sys/net/bpf.h Fri Apr 6 06:40:17 2012 (r233936) +++ head/sys/net/bpf.h Fri Apr 6 06:53:58 2012 (r233937) @@ -1092,14 +1092,19 @@ SYSCTL_DECL(_net_bpf); /* * Descriptor associated with each attached hardware interface. + * FIXME: this structure is exposed to external callers to speed up + * bpf_peers_present() call. However we cover all fields not needed by + * this function via BPF_INTERNAL define */ struct bpf_if { LIST_ENTRY(bpf_if) bif_next; /* list of all interfaces */ LIST_HEAD(, bpf_d) bif_dlist; /* descriptor list */ +#ifdef BPF_INTERNAL u_int bif_dlt; /* link layer type */ u_int bif_hdrlen; /* length of link header */ struct ifnet *bif_ifp; /* corresponding interface */ - struct mtx bif_mtx; /* mutex for interface */ + struct rwlock bif_lock; /* interface lock */ +#endif }; void bpf_bufheld(struct bpf_d *d); Modified: head/sys/net/bpf_buffer.c ============================================================================== --- head/sys/net/bpf_buffer.c Fri Apr 6 06:40:17 2012 (r233936) +++ head/sys/net/bpf_buffer.c Fri Apr 6 06:53:58 2012 (r233937) @@ -184,9 +184,9 @@ bpf_buffer_ioctl_sblen(struct bpf_d *d, { u_int size; - BPFD_LOCK(d); + BPFD_WLOCK(d); if (d->bd_bif != NULL) { - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (EINVAL); } size = *i; @@ -195,7 +195,7 @@ bpf_buffer_ioctl_sblen(struct bpf_d *d, else if (size < BPF_MINBUFSIZE) *i = size = BPF_MINBUFSIZE; d->bd_bufsize = size; - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (0); } Modified: head/sys/net/bpf_zerocopy.c ============================================================================== --- head/sys/net/bpf_zerocopy.c Fri Apr 6 06:40:17 2012 (r233936) +++ head/sys/net/bpf_zerocopy.c Fri Apr 6 06:53:58 2012 (r233937) @@ -515,14 +515,14 @@ bpf_zerocopy_ioctl_rotzbuf(struct thread struct zbuf *bzh; bzero(bz, sizeof(*bz)); - BPFD_LOCK(d); + BPFD_WLOCK(d); if (d->bd_hbuf == NULL && d->bd_slen != 0) { ROTATE_BUFFERS(d); bzh = (struct zbuf *)d->bd_hbuf; bz->bz_bufa = (void *)bzh->zb_uaddr; bz->bz_buflen = d->bd_hlen; } - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (0); } @@ -570,10 +570,10 @@ bpf_zerocopy_ioctl_setzbuf(struct thread * We only allow buffers to be installed once, so atomically check * that no buffers are currently installed and install new buffers. */ - BPFD_LOCK(d); + BPFD_WLOCK(d); if (d->bd_hbuf != NULL || d->bd_sbuf != NULL || d->bd_fbuf != NULL || d->bd_bif != NULL) { - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); zbuf_free(zba); zbuf_free(zbb); return (EINVAL); @@ -593,6 +593,6 @@ bpf_zerocopy_ioctl_setzbuf(struct thread * shared management region. */ d->bd_bufsize = bz->bz_buflen - sizeof(struct bpf_zbuf_header); - BPFD_UNLOCK(d); + BPFD_WUNLOCK(d); return (0); } Modified: head/sys/net/bpfdesc.h ============================================================================== --- head/sys/net/bpfdesc.h Fri Apr 6 06:40:17 2012 (r233936) +++ head/sys/net/bpfdesc.h Fri Apr 6 06:53:58 2012 (r233937) @@ -87,7 +87,7 @@ struct bpf_d { int bd_sig; /* signal to send upon packet reception */ struct sigio * bd_sigio; /* information for async I/O */ struct selinfo bd_sel; /* bsd select info */ - struct mtx bd_mtx; /* mutex for this descriptor */ + struct rwlock bd_lock; /* per-descriptor lock */ struct callout bd_callout; /* for BPF timeouts with select */ struct label *bd_label; /* MAC label for descriptor */ u_int64_t bd_fcount; /* number of packets which matched filter */ @@ -106,10 +106,19 @@ struct bpf_d { #define BPF_WAITING 1 /* waiting for read timeout in select */ #define BPF_TIMED_OUT 2 /* read timeout has expired in select */ -#define BPFD_LOCK(bd) mtx_lock(&(bd)->bd_mtx) -#define BPFD_UNLOCK(bd) mtx_unlock(&(bd)->bd_mtx) -#define BPFD_LOCK_ASSERT(bd) mtx_assert(&(bd)->bd_mtx, MA_OWNED) +#define BPFD_RLOCK(bd) rw_rlock(&(bd)->bd_lock) +#define BPFD_RUNLOCK(bd) rw_runlock(&(bd)->bd_lock) +#define BPFD_WLOCK(bd) rw_wlock(&(bd)->bd_lock) +#define BPFD_WUNLOCK(bd) rw_wunlock(&(bd)->bd_lock) +#define BPFD_WLOCK_ASSERT(bd) rw_assert(&(bd)->bd_lock, RA_WLOCKED) +#define BPFD_LOCK_ASSERT(bd) rw_assert(&(bd)->bd_lock, RA_LOCKED) +#define BPF_PID_REFRESH(bd, td) (bd)->bd_pid = (td)->td_proc->p_pid +#define BPF_PID_REFRESH_CUR(bd) (bd)->bd_pid = curthread->td_proc->p_pid + +#define BPF_LOCK() mtx_lock(&bpf_mtx) +#define BPF_UNLOCK() mtx_unlock(&bpf_mtx) +#define BPF_LOCK_ASSERT() mtx_assert(&bpf_mtx, MA_OWNED) /* * External representation of the bpf descriptor */ @@ -144,7 +153,9 @@ struct xbpf_d { u_int64_t bd_spare[4]; }; -#define BPFIF_LOCK(bif) mtx_lock(&(bif)->bif_mtx) -#define BPFIF_UNLOCK(bif) mtx_unlock(&(bif)->bif_mtx) +#define BPFIF_RLOCK(bif) rw_rlock(&(bif)->bif_lock) +#define BPFIF_RUNLOCK(bif) rw_runlock(&(bif)->bif_lock) +#define BPFIF_WLOCK(bif) rw_wlock(&(bif)->bif_lock) +#define BPFIF_WUNLOCK(bif) rw_wunlock(&(bif)->bif_lock) #endif Modified: head/sys/security/mac/mac_net.c ============================================================================== --- head/sys/security/mac/mac_net.c Fri Apr 6 06:40:17 2012 (r233936) +++ head/sys/security/mac/mac_net.c Fri Apr 6 06:53:58 2012 (r233937) @@ -319,6 +319,7 @@ mac_bpfdesc_create_mbuf(struct bpf_d *d, { struct label *label; + /* Assume reader lock is enough. */ BPFD_LOCK_ASSERT(d); if (mac_policy_count == 0) @@ -354,6 +355,7 @@ mac_bpfdesc_check_receive(struct bpf_d * { int error; + /* Assume reader lock is enough. */ BPFD_LOCK_ASSERT(d); if (mac_policy_count == 0) From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 06:55:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 569141065670; Fri, 6 Apr 2012 06:55:22 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4085A8FC18; Fri, 6 Apr 2012 06:55:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q366tMOh096285; Fri, 6 Apr 2012 06:55:22 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q366tM7t096280; Fri, 6 Apr 2012 06:55:22 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204060655.q366tM7t096280@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Fri, 6 Apr 2012 06:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233938 - in head: share/man/man4 sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 06:55:22 -0000 Author: melifaro Date: Fri Apr 6 06:55:21 2012 New Revision: 233938 URL: http://svn.freebsd.org/changeset/base/233938 Log: - Improve performace for writer-only BPF users. Linux and Solaris (at least OpenSolaris) has PF_PACKET socket families to send raw ethernet frames. The only FreeBSD interface that can be used to send raw frames is BPF. As a result, many programs like cdpd, lldpd, various dhcp stuff uses BPF only to send data. This leads us to the situation when software like cdpd, being run on high-traffic-volume interface significantly reduces overall performance since we have to acquire additional locks for every packet. Here we add sysctl that changes BPF behavior in the following way: If program came and opens BPF socket without explicitly specifyin read filter we assume it to be write-only and add it to special writer-only per-interface list. This makes bpf_peers_present() return 0, so no additional overhead is introduced. After filter is supplied, descriptor is added to original per-interface list permitting packets to be captured. Unfortunately, pcap_open_live() sets catch-all filter itself for the purpose of setting snap length. Fortunately, most programs explicitly sets (event catch-all) filter after that. tcpdump(1) is a good example. So a bit hackis approach is taken: we upgrade description only after second BIOCSETF is received. Sysctl is named net.bpf.optimize_writers and is turned off by default. - While here, document all sysctl variables in bpf.4 Sponsored by Yandex LLC Reviewed by: glebius (previous version) Reviewed by: silence on -net@ Approved by: (mentor) MFC after: 4 weeks Modified: head/share/man/man4/bpf.4 head/sys/net/bpf.c head/sys/net/bpf.h head/sys/net/bpfdesc.h Modified: head/share/man/man4/bpf.4 ============================================================================== --- head/share/man/man4/bpf.4 Fri Apr 6 06:53:58 2012 (r233937) +++ head/share/man/man4/bpf.4 Fri Apr 6 06:55:21 2012 (r233938) @@ -952,10 +952,33 @@ array initializers: .Fn BPF_STMT opcode operand and .Fn BPF_JUMP opcode operand true_offset false_offset . -.Sh FILES -.Bl -tag -compact -width /dev/bpf -.It Pa /dev/bpf -the packet filter device +.Sh SYSCTL VARIABLES +A set of +.Xr sysctl 8 +variables controls the behaviour of the +.Nm +subsystem +.Bl -tag -width indent +.It Va net.bpf.optimize_writers: No 0 +Various programs use BPF to send (but not receive) raw packets +(cdpd, lldpd, dhcpd, dhcp relays, etc. are good examples of such programs). +They do not need incoming packets to be send to them. Turning this option on +makes new BPF users to be attached to write-only interface list until program +explicitly specifies read filter via +.Cm pcap_set_filter() . +This removes any performance degradation for high-speed interfaces. +.It Va net.bpf.stats: +Binary interface for retrieving general statistics. +.It Va net.bpf.zerocopy_enable: No 0 +Permits zero-copy to be used with net BPF readers. Use with caution. +.It Va net.bpf.maxinsns: No 512 +Maximum number of instructions that BPF program can contain. Use +.Xr tcpdump 1 +-d option to determine approximate number of instruction for any filter. +.It Va net.bpf.maxbufsize: No 524288 +Maximum buffer size to allocate for packets buffer. +.It Va net.bpf.bufsize: No 4096 +Default buffer size to allocate for packets buffer. .El .Sh EXAMPLES The following filter is taken from the Reverse ARP Daemon. Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Fri Apr 6 06:53:58 2012 (r233937) +++ head/sys/net/bpf.c Fri Apr 6 06:55:21 2012 (r233938) @@ -176,6 +176,12 @@ SYSCTL_INT(_net_bpf, OID_AUTO, zerocopy_ static SYSCTL_NODE(_net_bpf, OID_AUTO, stats, CTLFLAG_MPSAFE | CTLFLAG_RW, bpf_stats_sysctl, "bpf statistics portal"); +static VNET_DEFINE(int, bpf_optimize_writers) = 0; +#define V_bpf_optimize_writers VNET(bpf_optimize_writers) +SYSCTL_VNET_INT(_net_bpf, OID_AUTO, optimize_writers, + CTLFLAG_RW, &VNET_NAME(bpf_optimize_writers), 0, + "Do not send packets until BPF program is set"); + static d_open_t bpfopen; static d_read_t bpfread; static d_write_t bpfwrite; @@ -572,17 +578,66 @@ static void bpf_attachd(struct bpf_d *d, struct bpf_if *bp) { /* - * Point d at bp, and add d to the interface's list of listeners. - * Finally, point the driver's bpf cookie at the interface so - * it will divert packets to bpf. + * Point d at bp, and add d to the interface's list. + * Since there are many applicaiotns using BPF for + * sending raw packets only (dhcpd, cdpd are good examples) + * we can delay adding d to the list of active listeners until + * some filter is configured. */ - BPFIF_WLOCK(bp); d->bd_bif = bp; - LIST_INSERT_HEAD(&bp->bif_dlist, d, bd_next); + BPFIF_WLOCK(bp); + + if (V_bpf_optimize_writers != 0) { + /* Add to writers-only list */ + LIST_INSERT_HEAD(&bp->bif_wlist, d, bd_next); + /* + * We decrement bd_writer on every filter set operation. + * First BIOCSETF is done by pcap_open_live() to set up + * snap length. After that appliation usually sets its own filter + */ + d->bd_writer = 2; + } else + LIST_INSERT_HEAD(&bp->bif_dlist, d, bd_next); + + BPFIF_WUNLOCK(bp); + + BPF_LOCK(); bpf_bpfd_cnt++; + BPF_UNLOCK(); + + CTR3(KTR_NET, "%s: bpf_attach called by pid %d, adding to %s list", + __func__, d->bd_pid, d->bd_writer ? "writer" : "active"); + + if (V_bpf_optimize_writers == 0) + EVENTHANDLER_INVOKE(bpf_track, bp->bif_ifp, bp->bif_dlt, 1); +} + +/* + * Add d to the list of active bp filters. + * Reuqires bpf_attachd() to be called before + */ +static void +bpf_upgraded(struct bpf_d *d) +{ + struct bpf_if *bp; + + bp = d->bd_bif; + + BPFIF_WLOCK(bp); + BPFD_WLOCK(d); + + /* Remove from writers-only list */ + LIST_REMOVE(d, bd_next); + LIST_INSERT_HEAD(&bp->bif_dlist, d, bd_next); + /* Mark d as reader */ + d->bd_writer = 0; + + BPFD_WUNLOCK(d); BPFIF_WUNLOCK(bp); + CTR2(KTR_NET, "%s: upgrade required by pid %d", __func__, d->bd_pid); + EVENTHANDLER_INVOKE(bpf_track, bp->bif_ifp, bp->bif_dlt, 1); } @@ -596,12 +651,17 @@ bpf_detachd(struct bpf_d *d) struct bpf_if *bp; struct ifnet *ifp; + CTR2(KTR_NET, "%s: detach required by pid %d", __func__, d->bd_pid); + BPF_LOCK_ASSERT(); bp = d->bd_bif; BPFIF_WLOCK(bp); BPFD_WLOCK(d); + /* Save bd_writer value */ + error = d->bd_writer; + /* * Remove d from the interface's descriptor list. */ @@ -615,7 +675,9 @@ bpf_detachd(struct bpf_d *d) /* We're already protected by global lock. */ bpf_bpfd_cnt--; - EVENTHANDLER_INVOKE(bpf_track, ifp, bp->bif_dlt, 0); + /* Call event handler iff d is attached */ + if (error == 0) + EVENTHANDLER_INVOKE(bpf_track, ifp, bp->bif_dlt, 0); /* * Check if this descriptor had requested promiscuous mode. @@ -1536,6 +1598,7 @@ bpf_setf(struct bpf_d *d, struct bpf_pro #ifdef COMPAT_FREEBSD32 struct bpf_program32 *fp32; struct bpf_program fp_swab; + int need_upgrade = 0; if (cmd == BIOCSETWF32 || cmd == BIOCSETF32 || cmd == BIOCSETFNR32) { fp32 = (struct bpf_program32 *)fp; @@ -1611,6 +1674,16 @@ bpf_setf(struct bpf_d *d, struct bpf_pro #endif if (cmd == BIOCSETF) reset_d(d); + + /* + * Do not require upgrade by first BIOCSETF + * (used to set snaplen) by pcap_open_live() + */ + if ((d->bd_writer != 0) && (--d->bd_writer == 0)) + need_upgrade = 1; + CTR4(KTR_NET, "%s: filter function set by pid %d, " + "bd_writer counter %d, need_upgrade %d", + __func__, d->bd_pid, d->bd_writer, need_upgrade); } BPFD_WUNLOCK(d); BPFIF_WUNLOCK(d->bd_bif); @@ -1621,6 +1694,10 @@ bpf_setf(struct bpf_d *d, struct bpf_pro bpf_destroy_jit_filter(ofunc); #endif + /* Move d to active readers list */ + if (need_upgrade != 0) + bpf_upgraded(d); + return (0); } free((caddr_t)fcode, M_BPF); @@ -2265,6 +2342,7 @@ bpfattach2(struct ifnet *ifp, u_int dlt, panic("bpfattach"); LIST_INIT(&bp->bif_dlist); + LIST_INIT(&bp->bif_wlist); bp->bif_ifp = ifp; bp->bif_dlt = dlt; rw_init(&bp->bif_lock, "bpf interface lock"); @@ -2520,6 +2598,13 @@ bpf_stats_sysctl(SYSCTL_HANDLER_ARGS) index = 0; LIST_FOREACH(bp, &bpf_iflist, bif_next) { BPFIF_RLOCK(bp); + /* Send writers-only first */ + LIST_FOREACH(bd, &bp->bif_wlist, bd_next) { + xbd = &xbdbuf[index++]; + BPFD_RLOCK(bd); + bpfstats_fill_xbpf(xbd, bd); + BPFD_RUNLOCK(bd); + } LIST_FOREACH(bd, &bp->bif_dlist, bd_next) { xbd = &xbdbuf[index++]; BPFD_RLOCK(bd); Modified: head/sys/net/bpf.h ============================================================================== --- head/sys/net/bpf.h Fri Apr 6 06:53:58 2012 (r233937) +++ head/sys/net/bpf.h Fri Apr 6 06:55:21 2012 (r233938) @@ -1104,6 +1104,7 @@ struct bpf_if { u_int bif_hdrlen; /* length of link header */ struct ifnet *bif_ifp; /* corresponding interface */ struct rwlock bif_lock; /* interface lock */ + LIST_HEAD(, bpf_d) bif_wlist; /* writer-only list */ #endif }; Modified: head/sys/net/bpfdesc.h ============================================================================== --- head/sys/net/bpfdesc.h Fri Apr 6 06:53:58 2012 (r233937) +++ head/sys/net/bpfdesc.h Fri Apr 6 06:55:21 2012 (r233938) @@ -79,6 +79,7 @@ struct bpf_d { u_char bd_promisc; /* true if listening promiscuously */ u_char bd_state; /* idle, waiting, or timed out */ u_char bd_immediate; /* true to return on packet arrival */ + u_char bd_writer; /* non-zero if d is writer-only */ int bd_hdrcmplt; /* false to fill in src lladdr automatically */ int bd_direction; /* select packet direction */ int bd_tstamp; /* select time stamping function */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 06:58:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8263D106564A; Fri, 6 Apr 2012 06:58:23 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 42EBB8FC0A; Fri, 6 Apr 2012 06:58:23 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1SG37t-000Awk-98; Fri, 06 Apr 2012 10:58:29 +0400 Message-ID: <4F7E9413.20602@FreeBSD.org> Date: Fri, 06 Apr 2012 10:58:27 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120121 Thunderbird/9.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201204060653.q366rwLa096182@svn.freebsd.org> In-Reply-To: <201204060653.q366rwLa096182@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r233937 - in head/sys: kern net security/mac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 06:58:23 -0000 On 06.04.2012 10:53, Alexander V. Chernikov wrote: > Author: melifaro > Date: Fri Apr 6 06:53:58 2012 > New Revision: 233937 > URL: http://svn.freebsd.org/changeset/base/233937 > Reviewed by: glebius (previous version) > Reviewed by: silence on -net@ > Approved by: (mentor) s/\(mentor\)/ae (mentor)/ From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 06:59:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A2721065700; Fri, 6 Apr 2012 06:59:07 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4A3AA8FC0A; Fri, 6 Apr 2012 06:59:07 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1SG38b-000AxD-AZ; Fri, 06 Apr 2012 10:59:13 +0400 Message-ID: <4F7E943F.6080808@FreeBSD.org> Date: Fri, 06 Apr 2012 10:59:11 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120121 Thunderbird/9.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201204060655.q366tM7t096280@svn.freebsd.org> In-Reply-To: <201204060655.q366tM7t096280@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r233938 - in head: share/man/man4 sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 06:59:07 -0000 On 06.04.2012 10:55, Alexander V. Chernikov wrote: > Author: melifaro > Date: Fri Apr 6 06:55:21 2012 > New Revision: 233938 > URL: http://svn.freebsd.org/changeset/base/233938 > Reviewed by: glebius (previous version) > Reviewed by: silence on -net@ > Approved by: (mentor) s/\(mentor\)/ae (mentor)/ From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 08:13:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CA23106566C; Fri, 6 Apr 2012 08:13:30 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4724B8FC0A; Fri, 6 Apr 2012 08:13:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q368DUZD098865; Fri, 6 Apr 2012 08:13:30 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q368DUrQ098863; Fri, 6 Apr 2012 08:13:30 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201204060813.q368DUrQ098863@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 6 Apr 2012 08:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233939 - head/sys/dev/xen/balloon X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 08:13:30 -0000 Author: pluknet Date: Fri Apr 6 08:13:29 2012 New Revision: 233939 URL: http://svn.freebsd.org/changeset/base/233939 Log: Free ballooned pages with the corresponding malloc type. MFC after: 1 week Modified: head/sys/dev/xen/balloon/balloon.c Modified: head/sys/dev/xen/balloon/balloon.c ============================================================================== --- head/sys/dev/xen/balloon/balloon.c Fri Apr 6 06:55:21 2012 (r233938) +++ head/sys/dev/xen/balloon/balloon.c Fri Apr 6 08:13:29 2012 (r233939) @@ -140,7 +140,7 @@ balloon_retrieve(void) STAILQ_REMOVE_HEAD(&ballooned_pages, list); page = entry->page; - free(entry, M_DEVBUF); + free(entry, M_BALLOON); bs.balloon_low--; From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 09:03:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C8551065677; Fri, 6 Apr 2012 09:03:03 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 687338FC16; Fri, 6 Apr 2012 09:03:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q369330s000508; Fri, 6 Apr 2012 09:03:03 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36933o3000506; Fri, 6 Apr 2012 09:03:03 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204060903.q36933o3000506@svn.freebsd.org> From: Michael Tuexen Date: Fri, 6 Apr 2012 09:03:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233940 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 09:03:03 -0000 Author: tuexen Date: Fri Apr 6 09:03:02 2012 New Revision: 233940 URL: http://svn.freebsd.org/changeset/base/233940 Log: Remove duplicate condition in if statement. Obtained from: brucec@ MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Fri Apr 6 08:13:29 2012 (r233939) +++ head/sys/netinet/sctp_usrreq.c Fri Apr 6 09:03:02 2012 (r233940) @@ -3581,7 +3581,6 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(av, optval, struct sctp_assoc_value, optsize); if ((av->assoc_value != SCTP_SS_DEFAULT) && - (av->assoc_value != SCTP_SS_DEFAULT) && (av->assoc_value != SCTP_SS_ROUND_ROBIN) && (av->assoc_value != SCTP_SS_ROUND_ROBIN_PACKET) && (av->assoc_value != SCTP_SS_PRIORITY) && From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 09:36:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEFFE106564A; Fri, 6 Apr 2012 09:36:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8174B8FC16; Fri, 6 Apr 2012 09:36:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q369aN3D001605; Fri, 6 Apr 2012 09:36:23 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q369aNCH001603; Fri, 6 Apr 2012 09:36:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201204060936.q369aNCH001603@svn.freebsd.org> From: Andriy Gapon Date: Fri, 6 Apr 2012 09:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233941 - head/sys/boot/forth X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 09:36:23 -0000 Author: avg Date: Fri Apr 6 09:36:22 2012 New Revision: 233941 URL: http://svn.freebsd.org/changeset/base/233941 Log: retrofit Safe Mode loader menu item actions The menu item is now made completely independent with the ACPI item - most modern systems seem to require ACPI and become even more "unsafe" without it. Safe Mode no longer disables APIC for the same reason. kbdmux is not disabled as this feature has proven itself stable. New actions: - SMP is disabled in the Safe Mode now - eventtimers are forced to periodic mode (some real and virtual systems seem to have problems otherwise) - geom extra vigorous integrity checking is disabled, this is to facilitate migration from previous versions Possible short term to do: - make SMP switch a separate menu item - restore APIC switch as a separate menu item Longer term to do: - turn various tweaks into separate menu items in a Safe Mode sub-menu Please consider adding a safety tweak to Safe Mode when introducing new major features or changes that may cause instabilities. Discussed with: jhb, scottl, Devin Teske MFC after: 3 weeks (stable/9 only) Modified: head/sys/boot/forth/menu-commands.4th Modified: head/sys/boot/forth/menu-commands.4th ============================================================================== --- head/sys/boot/forth/menu-commands.4th Fri Apr 6 09:03:02 2012 (r233940) +++ head/sys/boot/forth/menu-commands.4th Fri Apr 6 09:36:22 2012 (r233941) @@ -62,30 +62,21 @@ marker task-menu-commands.4th -rot 2dup 12 + c! rot \ replace 'N' with ASCII numeral evaluate 0= if - s" hint.apic.0.disabled" unsetenv + s" kern.smp.disabled" unsetenv s" hw.ata.ata_dma" unsetenv s" hw.ata.atapi_dma" unsetenv s" hw.ata.wc" unsetenv s" hw.eisa_slots" unsetenv - s" hint.kbdmux.0.disabled" unsetenv + s" kern.eventtimer.periodic" unsetenv + s" kern.geom.part.check_integrity" unsetenv else - \ - \ Toggle ACPI elements if necessary - \ - acpipresent? if acpienabled? if - menuacpi @ dup 0<> if - toggle_menuitem ( N -- N ) - then - drop - acpi_disable - then then - - s" set hint.apic.0.disabled=1" evaluate + s" set kern.smp.disabled=1" evaluate s" set hw.ata.ata_dma=0" evaluate s" set hw.ata.atapi_dma=0" evaluate s" set hw.ata.wc=0" evaluate s" set hw.eisa_slots=0" evaluate - s" set hint.kbdmux.0.disabled=1" evaluate + s" set kern.eventtimer.periodic=1" evaluate + s" set kern.geom.part.check_integrity=0" evaluate then menu-redraw From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 13:06:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1226E1065675; Fri, 6 Apr 2012 13:06:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F14D48FC0A; Fri, 6 Apr 2012 13:06:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36D61cG009784; Fri, 6 Apr 2012 13:06:01 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36D611i009782; Fri, 6 Apr 2012 13:06:01 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201204061306.q36D611i009782@svn.freebsd.org> From: Ed Schouten Date: Fri, 6 Apr 2012 13:06:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233945 - head/sbin/init X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 13:06:02 -0000 Author: ed Date: Fri Apr 6 13:06:01 2012 New Revision: 233945 URL: http://svn.freebsd.org/changeset/base/233945 Log: Properly clear the O_NONBLOCK flag after opening the TTY. Though we should open the TTY with O_NONBLOCK to prevent rc(8) execution from potentially stalling, we must not forget to clear the flag later on, to prevent read(2) calls from failing later on. This prevented the shell pathname prompt from working properly. Reported by: kib Modified: head/sbin/init/init.c Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Fri Apr 6 11:09:49 2012 (r233944) +++ head/sbin/init/init.c Fri Apr 6 13:06:01 2012 (r233945) @@ -572,9 +572,13 @@ open_console(void) { int fd; - /* Try to open /dev/console. */ + /* + * Try to open /dev/console. Open the device with O_NONBLOCK to + * prevent potential blocking on a carrier. + */ revoke(_PATH_CONSOLE); if ((fd = open(_PATH_CONSOLE, O_RDWR | O_NONBLOCK)) != -1) { + (void)fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_NONBLOCK); if (login_tty(fd) == 0) return; close(fd); From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 13:34:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3774F1065670; Fri, 6 Apr 2012 13:34:20 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 223098FC16; Fri, 6 Apr 2012 13:34:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36DYJic010806; Fri, 6 Apr 2012 13:34:19 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36DYJOI010804; Fri, 6 Apr 2012 13:34:19 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204061334.q36DYJOI010804@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Fri, 6 Apr 2012 13:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233946 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 13:34:20 -0000 Author: melifaro Date: Fri Apr 6 13:34:19 2012 New Revision: 233946 URL: http://svn.freebsd.org/changeset/base/233946 Log: Fix build broken by r233938. Pointed by: David Wolfskill Approved by: kib (mentor) Pointy hat to: melifaro Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Fri Apr 6 13:06:01 2012 (r233945) +++ head/sys/net/bpf.c Fri Apr 6 13:34:19 2012 (r233946) @@ -1595,10 +1595,10 @@ bpf_setf(struct bpf_d *d, struct bpf_pro #ifdef BPF_JITTER bpf_jit_filter *ofunc; #endif + int need_upgrade; #ifdef COMPAT_FREEBSD32 struct bpf_program32 *fp32; struct bpf_program fp_swab; - int need_upgrade = 0; if (cmd == BIOCSETWF32 || cmd == BIOCSETF32 || cmd == BIOCSETFNR32) { fp32 = (struct bpf_program32 *)fp; @@ -1655,6 +1655,7 @@ bpf_setf(struct bpf_d *d, struct bpf_pro if (flen > bpf_maxinsns) return (EINVAL); + need_upgrade = 0; size = flen * sizeof(*fp->bf_insns); fcode = (struct bpf_insn *)malloc(size, M_BPF, M_WAITOK); if (copyin((caddr_t)fp->bf_insns, (caddr_t)fcode, size) == 0 && From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 14:26:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35C611065673; Fri, 6 Apr 2012 14:26:06 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20D968FC16; Fri, 6 Apr 2012 14:26:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36EQ5Ow012593; Fri, 6 Apr 2012 14:26:05 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36EQ5Ni012591; Fri, 6 Apr 2012 14:26:05 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201204061426.q36EQ5Ni012591@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 6 Apr 2012 14:26:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233947 - head/tools/tools/netmap X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 14:26:06 -0000 Author: luigi Date: Fri Apr 6 14:26:05 2012 New Revision: 233947 URL: http://svn.freebsd.org/changeset/base/233947 Log: we need to specify a NETMAP_API version or the ioctl() will fail. Modified: head/tools/tools/netmap/pcap.c Modified: head/tools/tools/netmap/pcap.c ============================================================================== --- head/tools/tools/netmap/pcap.c Fri Apr 6 13:34:19 2012 (r233946) +++ head/tools/tools/netmap/pcap.c Fri Apr 6 14:26:05 2012 (r233947) @@ -232,6 +232,7 @@ netmap_open(struct my_ring *me, int ring bzero(&req, sizeof(req)); strncpy(req.nr_name, me->nmr.nr_name, sizeof(req.nr_name)); req.nr_ringid = ringid; + req.nr_version = NETMAP_API; err = ioctl(fd, NIOCGINFO, &req); if (err) { D("cannot get info on %s", me->nmr.nr_name); From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 16:00:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 01C391065673; Fri, 6 Apr 2012 16:00:38 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E02F28FC08; Fri, 6 Apr 2012 16:00:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36G0bn0015876; Fri, 6 Apr 2012 16:00:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36G0b9Q015874; Fri, 6 Apr 2012 16:00:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204061600.q36G0b9Q015874@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 6 Apr 2012 16:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233948 - head/sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 16:00:38 -0000 Author: nwhitehorn Date: Fri Apr 6 16:00:37 2012 New Revision: 233948 URL: http://svn.freebsd.org/changeset/base/233948 Log: Give the kernel pmap lock a different name than user pmap locks. It has (slightly) different semantics and renaming it prevents a (harmless) WITNESS warning during bootup for 32-bit kernels on 64-bit CPUs. MFC after: 5 days Modified: head/sys/powerpc/include/pmap.h Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Fri Apr 6 14:26:05 2012 (r233947) +++ head/sys/powerpc/include/pmap.h Fri Apr 6 16:00:37 2012 (r233948) @@ -212,8 +212,9 @@ extern struct pmap kernel_pmap_store; #define PMAP_LOCK_ASSERT(pmap, type) \ mtx_assert(&(pmap)->pm_mtx, (type)) #define PMAP_LOCK_DESTROY(pmap) mtx_destroy(&(pmap)->pm_mtx) -#define PMAP_LOCK_INIT(pmap) mtx_init(&(pmap)->pm_mtx, "pmap", \ - NULL, MTX_DEF) +#define PMAP_LOCK_INIT(pmap) mtx_init(&(pmap)->pm_mtx, \ + (pmap == kernel_pmap) ? "kernelpmap" : \ + "pmap", NULL, MTX_DEF) #define PMAP_LOCKED(pmap) mtx_owned(&(pmap)->pm_mtx) #define PMAP_MTX(pmap) (&(pmap)->pm_mtx) #define PMAP_TRYLOCK(pmap) mtx_trylock(&(pmap)->pm_mtx) From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 16:03:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12A11106564A; Fri, 6 Apr 2012 16:03:39 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F027C8FC08; Fri, 6 Apr 2012 16:03:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36G3cdA016021; Fri, 6 Apr 2012 16:03:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36G3caW016016; Fri, 6 Apr 2012 16:03:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204061603.q36G3caW016016@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 6 Apr 2012 16:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233949 - in head/sys: powerpc/aim vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 16:03:39 -0000 Author: nwhitehorn Date: Fri Apr 6 16:03:38 2012 New Revision: 233949 URL: http://svn.freebsd.org/changeset/base/233949 Log: Reduce the frequency that the PowerPC/AIM pmaps invalidate instruction caches, by invalidating kernel icaches only when needed and not flushing user caches for shared pages. Suggested by: kib MFC after: 2 weeks Modified: head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/vm/vm_page.h Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Fri Apr 6 16:00:37 2012 (r233948) +++ head/sys/powerpc/aim/machdep.c Fri Apr 6 16:03:38 2012 (r233949) @@ -405,6 +405,9 @@ powerpc_init(vm_offset_t startkernel, vm cacheline_size = 32; } + /* Make sure the kernel icache is valid before we go too much further */ + __syncicache((caddr_t)startkernel, endkernel - startkernel); + #ifndef __powerpc64__ /* * Figure out whether we need to use the 64 bit PMAP. This works by Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Fri Apr 6 16:00:37 2012 (r233948) +++ head/sys/powerpc/aim/mmu_oea.c Fri Apr 6 16:03:38 2012 (r233949) @@ -1087,7 +1087,7 @@ moea_enter_locked(pmap_t pmap, vm_offset struct pvo_head *pvo_head; uma_zone_t zone; vm_page_t pg; - u_int pte_lo, pvo_flags, was_exec; + u_int pte_lo, pvo_flags; int error; if (!moea_initialized) { @@ -1095,13 +1095,11 @@ moea_enter_locked(pmap_t pmap, vm_offset zone = moea_upvo_zone; pvo_flags = 0; pg = NULL; - was_exec = PTE_EXEC; } else { pvo_head = vm_page_to_pvoh(m); pg = m; zone = moea_mpvo_zone; pvo_flags = PVO_MANAGED; - was_exec = 0; } if (pmap_bootstrapped) mtx_assert(&vm_page_queue_mtx, MA_OWNED); @@ -1117,18 +1115,6 @@ moea_enter_locked(pmap_t pmap, vm_offset zone = moea_upvo_zone; } - /* - * If this is a managed page, and it's the first reference to the page, - * clear the execness of the page. Otherwise fetch the execness. - */ - if ((pg != NULL) && ((m->oflags & VPO_UNMANAGED) == 0)) { - if (LIST_EMPTY(pvo_head)) { - moea_attr_clear(pg, PTE_EXEC); - } else { - was_exec = moea_attr_fetch(pg) & PTE_EXEC; - } - } - pte_lo = moea_calc_wimg(VM_PAGE_TO_PHYS(m), pmap_page_get_memattr(m)); if (prot & VM_PROT_WRITE) { @@ -1149,22 +1135,12 @@ moea_enter_locked(pmap_t pmap, vm_offset pte_lo, pvo_flags); /* - * Flush the real page from the instruction cache if this page is - * mapped executable and cacheable and was not previously mapped (or - * was not mapped executable). + * Flush the real page from the instruction cache. This has be done + * for all user mappings to prevent information leakage via the + * instruction cache. */ - if (error == 0 && (pvo_flags & PVO_EXECUTABLE) && - (pte_lo & PTE_I) == 0 && was_exec == 0) { - /* - * Flush the real memory from the cache. - */ + if (pmap != kernel_pmap && LIST_EMPTY(vm_page_to_pvoh(m))) moea_syncicache(VM_PAGE_TO_PHYS(m), PAGE_SIZE); - if (pg != NULL) - moea_attr_save(pg, PTE_EXEC); - } - - /* XXX syncicache always until problems are sorted */ - moea_syncicache(VM_PAGE_TO_PHYS(m), PAGE_SIZE); } /* @@ -1486,12 +1462,6 @@ moea_kenter_attr(mmu_t mmu, vm_offset_t panic("moea_kenter: failed to enter va %#x pa %#x: %d", va, pa, error); - /* - * Flush the real memory from the instruction cache. - */ - if ((pte_lo & (PTE_I | PTE_G)) == 0) { - moea_syncicache(pa, PAGE_SIZE); - } PMAP_UNLOCK(kernel_pmap); } Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Fri Apr 6 16:00:37 2012 (r233948) +++ head/sys/powerpc/aim/mmu_oea64.c Fri Apr 6 16:03:38 2012 (r233949) @@ -1246,8 +1246,11 @@ moea64_enter_locked(mmu_t mmu, pmap_t pm * Flush the page from the instruction cache if this page is * mapped executable and cacheable. */ - if ((pte_lo & (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) + if (pmap != kernel_pmap && !(m->aflags & PGA_EXECUTABLE) && + (pte_lo & (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { + vm_page_aflag_set(m, PGA_EXECUTABLE); moea64_syncicache(mmu, pmap, va, VM_PAGE_TO_PHYS(m), PAGE_SIZE); + } } static void @@ -1670,12 +1673,6 @@ moea64_kenter_attr(mmu_t mmu, vm_offset_ if (error != 0 && error != ENOENT) panic("moea64_kenter: failed to enter va %#zx pa %#zx: %d", va, pa, error); - - /* - * Flush the memory from the instruction cache. - */ - if ((pte_lo & (LPTE_I | LPTE_G)) == 0) - __syncicache((void *)va, PAGE_SIZE); } void @@ -1906,6 +1903,7 @@ static void moea64_pvo_protect(mmu_t mmu, pmap_t pm, struct pvo_entry *pvo, vm_prot_t prot) { uintptr_t pt; + struct vm_page *pg; uint64_t oldlo; PMAP_LOCK_ASSERT(pm, MA_OWNED); @@ -1929,17 +1927,21 @@ moea64_pvo_protect(mmu_t mmu, pmap_t pm else pvo->pvo_pte.lpte.pte_lo |= LPTE_BR; + pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); + /* * If the PVO is in the page table, update that pte as well. */ if (pt != -1) { MOEA64_PTE_CHANGE(mmu, pt, &pvo->pvo_pte.lpte, pvo->pvo_vpn); - if ((pvo->pvo_pte.lpte.pte_lo & - (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { + if (pm != kernel_pmap && pg != NULL && + !(pg->aflags & PGA_EXECUTABLE) && + (pvo->pvo_pte.lpte.pte_lo & + (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { + vm_page_aflag_set(pg, PGA_EXECUTABLE); moea64_syncicache(mmu, pm, PVO_VADDR(pvo), - pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN, - PAGE_SIZE); + pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN, PAGE_SIZE); } } @@ -1949,9 +1951,6 @@ moea64_pvo_protect(mmu_t mmu, pmap_t pm */ if ((pvo->pvo_vaddr & PVO_MANAGED) == PVO_MANAGED && (oldlo & LPTE_PP) != LPTE_BR && !(prot && VM_PROT_WRITE)) { - struct vm_page *pg; - - pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); if (pg != NULL) { if (pvo->pvo_pte.lpte.pte_lo & LPTE_CHG) vm_page_dirty(pg); @@ -2134,15 +2133,11 @@ moea64_remove(mmu_t mmu, pmap_t pm, vm_o void moea64_remove_all(mmu_t mmu, vm_page_t m) { - struct pvo_head *pvo_head; struct pvo_entry *pvo, *next_pvo; pmap_t pmap; - pvo_head = vm_page_to_pvoh(m); LOCK_TABLE_WR(); - for (pvo = LIST_FIRST(pvo_head); pvo != NULL; pvo = next_pvo) { - next_pvo = LIST_NEXT(pvo, pvo_vlink); - + LIST_FOREACH_SAFE(pvo, vm_page_to_pvoh(m), pvo_vlink, next_pvo) { pmap = pvo->pvo_pmap; PMAP_LOCK(pmap); moea64_pvo_remove(mmu, pvo); @@ -2152,6 +2147,7 @@ moea64_remove_all(mmu_t mmu, vm_page_t m if ((m->aflags & PGA_WRITEABLE) && moea64_is_modified(mmu, m)) vm_page_dirty(m); vm_page_aflag_clear(m, PGA_WRITEABLE); + vm_page_aflag_clear(m, PGA_EXECUTABLE); } /* @@ -2356,6 +2352,7 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u static void moea64_pvo_remove(mmu_t mmu, struct pvo_entry *pvo) { + struct vm_page *pg; uintptr_t pt; PMAP_LOCK_ASSERT(pvo->pvo_pmap, MA_OWNED); @@ -2395,11 +2392,10 @@ moea64_pvo_remove(mmu_t mmu, struct pvo_ /* * Update vm about the REF/CHG bits if the page is managed. */ + pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); + if ((pvo->pvo_vaddr & PVO_MANAGED) == PVO_MANAGED && (pvo->pvo_pte.lpte.pte_lo & LPTE_PP) != LPTE_BR) { - struct vm_page *pg; - - pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); if (pg != NULL) { if (pvo->pvo_pte.lpte.pte_lo & LPTE_CHG) vm_page_dirty(pg); @@ -2410,6 +2406,9 @@ moea64_pvo_remove(mmu_t mmu, struct pvo_ } } + if (pg != NULL && LIST_EMPTY(vm_page_to_pvoh(pg))) + vm_page_aflag_clear(pg, PGA_EXECUTABLE); + moea64_pvo_entries--; moea64_pvo_remove_calls++; Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri Apr 6 16:00:37 2012 (r233948) +++ head/sys/vm/vm_page.h Fri Apr 6 16:03:38 2012 (r233949) @@ -248,9 +248,13 @@ extern struct vpglocks pa_lock[]; * * PGA_WRITEABLE is set exclusively on managed pages by pmap_enter(). When it * does so, the page must be VPO_BUSY. + * + * PGA_EXECUTABLE may be set by pmap routines, and indicates that a page has + * at least one executable mapping. It is not consumed by the VM layer. */ #define PGA_WRITEABLE 0x01 /* page may be mapped writeable */ #define PGA_REFERENCED 0x02 /* page has been referenced */ +#define PGA_EXECUTABLE 0x04 /* page may be mapped executable */ /* * Page flags. If changed at any other time than page allocation or From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 16:41:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32A4E1065670; Fri, 6 Apr 2012 16:41:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D7418FC14; Fri, 6 Apr 2012 16:41:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36GfJMe017533; Fri, 6 Apr 2012 16:41:19 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36GfJkI017531; Fri, 6 Apr 2012 16:41:19 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201204061641.q36GfJkI017531@svn.freebsd.org> From: Alan Cox Date: Fri, 6 Apr 2012 16:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233954 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 16:41:20 -0000 Author: alc Date: Fri Apr 6 16:41:19 2012 New Revision: 233954 URL: http://svn.freebsd.org/changeset/base/233954 Log: Micro-optimize free_pv_entry() for the expected case. Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Apr 6 16:32:29 2012 (r233953) +++ head/sys/amd64/amd64/pmap.c Fri Apr 6 16:41:19 2012 (r233954) @@ -2095,7 +2095,6 @@ pmap_collect(pmap_t locked_pmap, struct } } - /* * free the pv_entry back to the free list */ @@ -2116,13 +2115,16 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv field = idx / 64; bit = idx % 64; pc->pc_map[field] |= 1ul << bit; - /* move to head of list */ - TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); if (pc->pc_map[0] != PC_FREE0 || pc->pc_map[1] != PC_FREE1 || pc->pc_map[2] != PC_FREE2) { - TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + /* 98% of the time, pc is already at the head of the list. */ + if (__predict_false(pc != TAILQ_FIRST(&pmap->pm_pvchunk))) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + } return; } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 18:18:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A89E71065672; Fri, 6 Apr 2012 18:18:48 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89C0E8FC0A; Fri, 6 Apr 2012 18:18:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36IImYN020739; Fri, 6 Apr 2012 18:18:48 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36IImkw020737; Fri, 6 Apr 2012 18:18:48 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204061818.q36IImkw020737@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 6 Apr 2012 18:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233957 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 18:18:48 -0000 Author: nwhitehorn Date: Fri Apr 6 18:18:48 2012 New Revision: 233957 URL: http://svn.freebsd.org/changeset/base/233957 Log: Substantially reduce the scope of the locks held in pmap_enter(), which improves concurrency slightly. Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Fri Apr 6 17:49:11 2012 (r233956) +++ head/sys/powerpc/aim/mmu_oea64.c Fri Apr 6 18:18:48 2012 (r233957) @@ -284,8 +284,6 @@ static struct pvo_entry *moea64_pvo_find /* * Utility routines. */ -static void moea64_enter_locked(mmu_t, pmap_t, vm_offset_t, - vm_page_t, vm_prot_t, boolean_t); static boolean_t moea64_query_bit(mmu_t, vm_page_t, u_int64_t); static u_int moea64_clear_bit(mmu_t, vm_page_t, u_int64_t); static void moea64_kremove(mmu_t, vm_offset_t); @@ -1168,30 +1166,11 @@ moea64_zero_page_idle(mmu_t mmu, vm_page * target pmap with the protection requested. If specified the page * will be wired down. */ + void moea64_enter(mmu_t mmu, pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, boolean_t wired) { - - LOCK_TABLE_WR(); - PMAP_LOCK(pmap); - moea64_enter_locked(mmu, pmap, va, m, prot, wired); - UNLOCK_TABLE_WR(); - PMAP_UNLOCK(pmap); -} - -/* - * Map the given physical page at the specified virtual address in the - * target pmap with the protection requested. If specified the page - * will be wired down. - * - * The table (write) and pmap must be locked. - */ - -static void -moea64_enter_locked(mmu_t mmu, pmap_t pmap, vm_offset_t va, vm_page_t m, - vm_prot_t prot, boolean_t wired) -{ struct pvo_head *pvo_head; uma_zone_t zone; vm_page_t pg; @@ -1211,10 +1190,9 @@ moea64_enter_locked(mmu_t mmu, pmap_t pm pvo_flags = PVO_MANAGED; } - PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || VM_OBJECT_LOCKED(m->object), - ("moea64_enter_locked: page %p is not busy", m)); + ("moea64_enter: page %p is not busy", m)); /* XXX change the pvo head for fake pages */ if ((m->oflags & VPO_UNMANAGED) != 0) { @@ -1239,8 +1217,12 @@ moea64_enter_locked(mmu_t mmu, pmap_t pm if (wired) pvo_flags |= PVO_WIRED; + LOCK_TABLE_WR(); + PMAP_LOCK(pmap); error = moea64_pvo_enter(mmu, pmap, zone, pvo_head, va, VM_PAGE_TO_PHYS(m), pte_lo, pvo_flags); + PMAP_UNLOCK(pmap); + UNLOCK_TABLE_WR(); /* * Flush the page from the instruction cache if this page is @@ -1311,15 +1293,11 @@ moea64_enter_object(mmu_t mmu, pmap_t pm psize = atop(end - start); m = m_start; - LOCK_TABLE_WR(); - PMAP_LOCK(pm); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { - moea64_enter_locked(mmu, pm, start + ptoa(diff), m, prot & + moea64_enter(mmu, pm, start + ptoa(diff), m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); m = TAILQ_NEXT(m, listq); } - UNLOCK_TABLE_WR(); - PMAP_UNLOCK(pm); } void @@ -1327,12 +1305,8 @@ moea64_enter_quick(mmu_t mmu, pmap_t pm, vm_prot_t prot) { - LOCK_TABLE_WR(); - PMAP_LOCK(pm); - moea64_enter_locked(mmu, pm, va, m, + moea64_enter(mmu, pm, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); - UNLOCK_TABLE_WR(); - PMAP_UNLOCK(pm); } vm_paddr_t From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 20:34:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82152106566B; Fri, 6 Apr 2012 20:34:01 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0D38FC08; Fri, 6 Apr 2012 20:34:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36KY1NP025099; Fri, 6 Apr 2012 20:34:01 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36KY1JE025096; Fri, 6 Apr 2012 20:34:01 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201204062034.q36KY1JE025096@svn.freebsd.org> From: Attilio Rao Date: Fri, 6 Apr 2012 20:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233960 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 20:34:01 -0000 Author: attilio Date: Fri Apr 6 20:34:00 2012 New Revision: 233960 URL: http://svn.freebsd.org/changeset/base/233960 Log: Staticize vm_page_cache_remove(). Reviewed by: alc Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Apr 6 19:59:37 2012 (r233959) +++ head/sys/vm/vm_page.c Fri Apr 6 20:34:00 2012 (r233960) @@ -1181,7 +1181,7 @@ vm_page_cache_lookup(vm_object_t object, * * The free page queue must be locked. */ -void +static void vm_page_cache_remove(vm_page_t m) { vm_object_t object; Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri Apr 6 19:59:37 2012 (r233959) +++ head/sys/vm/vm_page.h Fri Apr 6 20:34:00 2012 (r233960) @@ -384,7 +384,6 @@ vm_page_t vm_page_alloc_freelist(int, in vm_page_t vm_page_grab (vm_object_t, vm_pindex_t, int); void vm_page_cache(vm_page_t); void vm_page_cache_free(vm_object_t, vm_pindex_t, vm_pindex_t); -void vm_page_cache_remove(vm_page_t); void vm_page_cache_transfer(vm_object_t, vm_pindex_t, vm_object_t); int vm_page_try_to_cache (vm_page_t); int vm_page_try_to_free (vm_page_t); From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 21:19:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AA7A106566C; Fri, 6 Apr 2012 21:19:29 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52B968FC17; Fri, 6 Apr 2012 21:19:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36LJThs026565; Fri, 6 Apr 2012 21:19:29 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36LJTKR026564; Fri, 6 Apr 2012 21:19:29 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201204062119.q36LJTKR026564@svn.freebsd.org> From: "Justin T. Gibbs" Date: Fri, 6 Apr 2012 21:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233961 - head/sys/x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 21:19:29 -0000 Author: gibbs Date: Fri Apr 6 21:19:28 2012 New Revision: 233961 URL: http://svn.freebsd.org/changeset/base/233961 Log: Fix interrupt load balancing regression, introduced in revision 222813, that left all un-pinned interrupts assigned to CPU 0. sys/x86/x86/intr_machdep.c: In intr_shuffle_irqs(), remove CPU_SETOF() call that initialized the "intr_cpus" cpuset to only contain CPU0. This initialization is too late and nullifies the results of calls the intr_add_cpu() that occur much earlier in the boot process. Since "intr_cpus" is statically initialized to the empty set, and all processors, including the BSP, already add themselves to "intr_cpus" no special initialization for the BSP is necessary. MFC after: 3 days Modified: head/sys/x86/x86/intr_machdep.c Modified: head/sys/x86/x86/intr_machdep.c ============================================================================== --- head/sys/x86/x86/intr_machdep.c Fri Apr 6 20:34:00 2012 (r233960) +++ head/sys/x86/x86/intr_machdep.c Fri Apr 6 21:19:28 2012 (r233961) @@ -525,9 +525,6 @@ intr_shuffle_irqs(void *arg __unused) return; #endif - /* The BSP is always a valid target. */ - CPU_SETOF(0, &intr_cpus); - /* Don't bother on UP. */ if (mp_ncpus == 1) return; From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 21:21:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAD611065670; Fri, 6 Apr 2012 21:21:29 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id A50B48FC19; Fri, 6 Apr 2012 21:21:28 +0000 (UTC) Received: by lbok6 with SMTP id k6so1211867lbo.13 for ; Fri, 06 Apr 2012 14:21:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=iNxEiF8Q57++hoMj0Xors1t8qgRVrKf5NKDTDEtTszM=; b=NJWwZpKAy+mWs0LdxhmnalG4x0JBKN78/yXSSLwPy4i4KGj39YTPwOlI+RQDu0aDeC paoDo7l7lXTctY63dq7jFzaE0zkR4amPZ/1yPE1z5uJ9bMsVW3EkX/mBgVpwo9cTxKU1 wz2ZoXKxj4v4mXjc+I9vbB4rnM2PuIIc+uZA0QOZdHVj5hR+G7yQh8xXwI98z0yTgqMP 7RDHMCuyjKV9uKUbmdycCYrgCOwtVafaL2TT+FsPeI+2NgyqVe9Q1C3miaU6LytkY75L OxqTfoX/P2jG7v9xGHmv3Mc0fQYhqTwJDKI8XIXzBkOOiZJhX9uyPyE+Pzmz4U40ZNZe z8Bw== MIME-Version: 1.0 Received: by 10.152.105.211 with SMTP id go19mr10479628lab.51.1333747287387; Fri, 06 Apr 2012 14:21:27 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.93.138 with HTTP; Fri, 6 Apr 2012 14:21:27 -0700 (PDT) In-Reply-To: <201204062119.q36LJTKR026564@svn.freebsd.org> References: <201204062119.q36LJTKR026564@svn.freebsd.org> Date: Fri, 6 Apr 2012 22:21:27 +0100 X-Google-Sender-Auth: OlN9Z-mELb7lKlauMfWP4w7uXhg Message-ID: From: Attilio Rao To: "Justin T. Gibbs" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233961 - head/sys/x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 21:21:29 -0000 Il 06 aprile 2012 22:19, Justin T. Gibbs ha scritto: > Author: gibbs > Date: Fri Apr =C2=A06 21:19:28 2012 > New Revision: 233961 > URL: http://svn.freebsd.org/changeset/base/233961 > > Log: > =C2=A0Fix interrupt load balancing regression, introduced in revision > =C2=A0222813, that left all un-pinned interrupts assigned to CPU 0. > > =C2=A0sys/x86/x86/intr_machdep.c: > =C2=A0 =C2=A0 =C2=A0 =C2=A0In intr_shuffle_irqs(), remove CPU_SETOF() cal= l that initialized > =C2=A0 =C2=A0 =C2=A0 =C2=A0the "intr_cpus" cpuset to only contain CPU0. > > =C2=A0 =C2=A0 =C2=A0 =C2=A0This initialization is too late and nullifies = the results of calls > =C2=A0 =C2=A0 =C2=A0 =C2=A0the intr_add_cpu() that occur much earlier in = the boot process. > =C2=A0 =C2=A0 =C2=A0 =C2=A0Since "intr_cpus" is statically initialized to= the empty set, and > =C2=A0 =C2=A0 =C2=A0 =C2=A0all processors, including the BSP, already add= themselves to > =C2=A0 =C2=A0 =C2=A0 =C2=A0"intr_cpus" no special initialization for the = BSP is necessary. For instance, the SETOF is not necessary here because set_interrupt_apic_ids() already does intr_add_cpu() for BSP too. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 22:23:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD6AE1065677; Fri, 6 Apr 2012 22:23:14 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A85BC8FC15; Fri, 6 Apr 2012 22:23:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36MNEWv028965; Fri, 6 Apr 2012 22:23:14 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36MNE5J028957; Fri, 6 Apr 2012 22:23:14 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201204062223.q36MNE5J028957@svn.freebsd.org> From: "Kenneth D. Merry" Date: Fri, 6 Apr 2012 22:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233963 - head/sys/cam/ctl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 22:23:14 -0000 Author: ken Date: Fri Apr 6 22:23:13 2012 New Revision: 233963 URL: http://svn.freebsd.org/changeset/base/233963 Log: Change the SCSI INQUIRY peripheral qualifier that CTL reports for LUNs that don't exist. Anecdotal evidence indicates that it is better to return 011b (bad LUN) than 001b (LUN offline). However, this change also gives the user a sysctl/tunable, kern.cam.ctl.inquiry_pq_no_lun, to override the change and return to the previous behavior. (The previous behavior was to return 001b, or LUN offline.) ctl.c: Change the default inquiry peripheral qualifier to 011b, and add a sysctl and tunable to allow the user to change it back to 001b if needed. Don't insert a Copan copyright statement in the inquiry data. The copyright statements on the files are sufficient. ctl_private.h: Add sysctl variable context to the CTL softc. ctl_cmd_table.c, ctl_frontend_internal.c, ctl_frontend.c, ctl_backend.c, ctl_error.c: Include sys/sysctl.h. MFC after: 3 days Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend.c head/sys/cam/ctl/ctl_cmd_table.c head/sys/cam/ctl/ctl_error.c head/sys/cam/ctl/ctl_frontend.c head/sys/cam/ctl/ctl_frontend_internal.c head/sys/cam/ctl/ctl_private.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Fri Apr 6 21:40:27 2012 (r233962) +++ head/sys/cam/ctl/ctl.c Fri Apr 6 22:23:13 2012 (r233963) @@ -959,6 +959,33 @@ ctl_init(void) softc->dev->si_drv1 = softc; + /* + * By default, return a "bad LUN" peripheral qualifier for unknown + * LUNs. The user can override this default using the tunable or + * sysctl. See the comment in ctl_inquiry_std() for more details. + */ + softc->inquiry_pq_no_lun = 1; + TUNABLE_INT_FETCH("kern.cam.ctl.inquiry_pq_no_lun", + &softc->inquiry_pq_no_lun); + sysctl_ctx_init(&softc->sysctl_ctx); + softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, + SYSCTL_STATIC_CHILDREN(_kern_cam), OID_AUTO, "ctl", + CTLFLAG_RD, 0, "CAM Target Layer"); + + if (softc->sysctl_tree == NULL) { + printf("%s: unable to allocate sysctl tree\n", __func__); + destroy_dev(softc->dev); + free(control_softc, M_DEVBUF); + control_softc = NULL; + return; + } + + SYSCTL_ADD_INT(&softc->sysctl_ctx, + SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, + "inquiry_pq_no_lun", CTLFLAG_RW, + &softc->inquiry_pq_no_lun, 0, + "Report no lun possible for invalid LUNs"); + mtx_init(&softc->ctl_lock, "CTL mutex", NULL, MTX_DEF); softc->open_count = 0; @@ -1150,6 +1177,11 @@ ctl_shutdown(void) destroy_dev(softc->dev); + sysctl_ctx_free(&softc->sysctl_ctx); + + free(control_softc, M_DEVBUF); + control_softc = NULL; + printf("ctl: CAM Target Layer unloaded\n"); } @@ -9369,15 +9401,55 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio memset(inq_ptr, 0, sizeof(*inq_ptr)); /* - * The control device is always connected. The disk device, on the - * other hand, may not be online all the time. If we don't have a - * LUN mapping, we'll just say it's offline. + * If we have a LUN configured, report it as connected. Otherwise, + * report that it is offline or no device is supported, depending + * on the value of inquiry_pq_no_lun. + * + * According to the spec (SPC-4 r34), the peripheral qualifier + * SID_QUAL_LU_OFFLINE (001b) is used in the following scenario: + * + * "A peripheral device having the specified peripheral device type + * is not connected to this logical unit. However, the device + * server is capable of supporting the specified peripheral device + * type on this logical unit." + * + * According to the same spec, the peripheral qualifier + * SID_QUAL_BAD_LU (011b) is used in this scenario: + * + * "The device server is not capable of supporting a peripheral + * device on this logical unit. For this peripheral qualifier the + * peripheral device type shall be set to 1Fh. All other peripheral + * device type values are reserved for this peripheral qualifier." + * + * Given the text, it would seem that we probably want to report that + * the LUN is offline here. There is no LUN connected, but we can + * support a LUN at the given LUN number. + * + * In the real world, though, it sounds like things are a little + * different: + * + * - Linux, when presented with a LUN with the offline peripheral + * qualifier, will create an sg driver instance for it. So when + * you attach it to CTL, you wind up with a ton of sg driver + * instances. (One for every LUN that Linux bothered to probe.) + * Linux does this despite the fact that it issues a REPORT LUNs + * to LUN 0 to get the inventory of supported LUNs. + * + * - There is other anecdotal evidence (from Emulex folks) about + * arrays that use the offline peripheral qualifier for LUNs that + * are on the "passive" path in an active/passive array. + * + * So the solution is provide a hopefully reasonable default + * (return bad/no LUN) and allow the user to change the behavior + * with a tunable/sysctl variable. */ if (lun != NULL) inq_ptr->device = (SID_QUAL_LU_CONNECTED << 5) | lun->be_lun->lun_type; - else + else if (ctl_softc->inquiry_pq_no_lun == 0) inq_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; + else + inq_ptr->device = (SID_QUAL_BAD_LU << 5) | T_NODEVICE; /* RMB in byte 2 is 0 */ inq_ptr->version = SCSI_REV_SPC3; @@ -9491,8 +9563,6 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio break; } } - sprintf((char *)inq_ptr->vendor_specific1, "Copyright (C) 2004, COPAN " - "Systems, Inc. All Rights Reserved."); ctsio->scsi_status = SCSI_STATUS_OK; if (ctsio->kern_data_len > 0) { Modified: head/sys/cam/ctl/ctl_backend.c ============================================================================== --- head/sys/cam/ctl/ctl_backend.c Fri Apr 6 21:40:27 2012 (r233962) +++ head/sys/cam/ctl/ctl_backend.c Fri Apr 6 22:23:13 2012 (r233963) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- head/sys/cam/ctl/ctl_cmd_table.c Fri Apr 6 21:40:27 2012 (r233962) +++ head/sys/cam/ctl/ctl_cmd_table.c Fri Apr 6 22:23:13 2012 (r233963) @@ -44,6 +44,7 @@ #include #include #include +#include #include #include Modified: head/sys/cam/ctl/ctl_error.c ============================================================================== --- head/sys/cam/ctl/ctl_error.c Fri Apr 6 21:40:27 2012 (r233962) +++ head/sys/cam/ctl/ctl_error.c Fri Apr 6 22:23:13 2012 (r233963) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/cam/ctl/ctl_frontend.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend.c Fri Apr 6 21:40:27 2012 (r233962) +++ head/sys/cam/ctl/ctl_frontend.c Fri Apr 6 22:23:13 2012 (r233963) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_internal.c Fri Apr 6 21:40:27 2012 (r233962) +++ head/sys/cam/ctl/ctl_frontend_internal.c Fri Apr 6 22:23:13 2012 (r233963) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Fri Apr 6 21:40:27 2012 (r233962) +++ head/sys/cam/ctl/ctl_private.h Fri Apr 6 22:23:13 2012 (r233963) @@ -421,6 +421,9 @@ struct ctl_softc { int num_luns; ctl_gen_flags flags; ctl_ha_mode ha_mode; + int inquiry_pq_no_lun; + struct sysctl_ctx_list sysctl_ctx; + struct sysctl_oid *sysctl_tree; struct ctl_ioctl_info ioctl_info; struct ctl_lun lun; struct ctl_io_pool *internal_pool; From owner-svn-src-head@FreeBSD.ORG Fri Apr 6 22:33:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22E8E1065673; Fri, 6 Apr 2012 22:33:14 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DF3B8FC12; Fri, 6 Apr 2012 22:33:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36MXDsw029312; Fri, 6 Apr 2012 22:33:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36MXDaF029310; Fri, 6 Apr 2012 22:33:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204062233.q36MXDaF029310@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 6 Apr 2012 22:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233964 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Apr 2012 22:33:14 -0000 Author: nwhitehorn Date: Fri Apr 6 22:33:13 2012 New Revision: 233964 URL: http://svn.freebsd.org/changeset/base/233964 Log: Execute an initial ptesync if and only if the PTE is actually being invalidated, as opposed to a ref/changed bit update. Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Fri Apr 6 22:23:13 2012 (r233963) +++ head/sys/powerpc/aim/moea64_native.c Fri Apr 6 22:33:13 2012 (r233964) @@ -153,13 +153,10 @@ TLBIE(uint64_t vpn) { vpn &= ~(0xffffULL << 48); #ifdef __powerpc64__ - sched_pin(); - __asm __volatile("ptesync"); mtx_lock(&tlbie_mutex); __asm __volatile("tlbie %0" :: "r"(vpn) : "memory"); mtx_unlock(&tlbie_mutex); __asm __volatile("eieio; tlbsync; ptesync"); - sched_unpin(); #else vpn_hi = (uint32_t)(vpn >> 32); vpn_lo = (uint32_t)vpn; @@ -171,7 +168,6 @@ TLBIE(uint64_t vpn) { mr %1, %0; \ insrdi %1,%5,1,0; \ mtmsrd %1; isync; \ - ptesync; \ \ sld %1,%2,%4; \ or %1,%1,%3; \ @@ -265,7 +261,9 @@ moea64_pte_clear_native(mmu_t mmu, uintp * As shown in Section 7.6.3.2.3 */ pt->pte_lo &= ~ptebit; + sched_pin(); TLBIE(vpn); + sched_unpin(); } static void @@ -295,21 +293,16 @@ moea64_pte_unset_native(mmu_t mmu, uintp { struct lpte *pt = (struct lpte *)pt_cookie; - pvo_pt->pte_hi &= ~LPTE_VALID; - - /* Finish all pending operations */ - isync(); - - /* - * Force the reg & chg bits back into the PTEs. - */ - SYNC(); - /* * Invalidate the pte. */ + isync(); + sched_pin(); + pvo_pt->pte_hi &= ~LPTE_VALID; pt->pte_hi &= ~LPTE_VALID; + PTESYNC(); TLBIE(vpn); + sched_unpin(); /* * Save the reg & chg bits. From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 02:01:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD8241065672; Sat, 7 Apr 2012 02:01:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A79728FC08; Sat, 7 Apr 2012 02:01:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3721QRN036221; Sat, 7 Apr 2012 02:01:26 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3721Q3m036215; Sat, 7 Apr 2012 02:01:26 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204070201.q3721Q3m036215@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Apr 2012 02:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233966 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 02:01:26 -0000 Author: adrian Date: Sat Apr 7 02:01:26 2012 New Revision: 233966 URL: http://svn.freebsd.org/changeset/base/233966 Log: Remove duplicate txflags field from ath_buf. rename bf_state.bfs_flags to bf_state.bfs_txflags, as that is what it effectively is. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_debug.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_ath_tx_ht.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Apr 6 22:51:02 2012 (r233965) +++ head/sys/dev/ath/if_ath.c Sat Apr 7 02:01:26 2012 (r233966) @@ -2273,7 +2273,6 @@ ath_buf_clone(struct ath_softc *sc, cons /* Copy basics */ tbf->bf_next = NULL; tbf->bf_nseg = bf->bf_nseg; - tbf->bf_txflags = bf->bf_txflags; tbf->bf_flags = bf->bf_flags & ~ATH_BUF_BUSY; tbf->bf_status = bf->bf_status; tbf->bf_m = bf->bf_m; @@ -4747,7 +4746,7 @@ ath_tx_update_stats(struct ath_softc *sc pri = M_WME_GETAC(bf->bf_m); if (pri >= WME_AC_VO) ic->ic_wme.wme_hipri_traffic++; - if ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0) + if ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0) ni->ni_inact = ni->ni_inact_reload; } else { if (ts->ts_status & HAL_TXERR_XRETRY) @@ -4794,7 +4793,7 @@ ath_tx_default_comp(struct ath_softc *sc if (fail == 1) st = -1; else - st = ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0) ? + st = ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0) ? ts->ts_status : HAL_TXERR_XRETRY; if (bf->bf_state.bfs_dobaw) @@ -4947,7 +4946,7 @@ ath_tx_processq(struct ath_softc *sc, st * workaround phantom bmiss interrupts. */ if (ni != NULL && ts->ts_status == 0 && - ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0)) { + ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0)) { nacked++; sc->sc_stats.ast_tx_rssi = ts->ts_rssi; ATH_RSSI_LPF(sc->sc_halstats.ns_avgtxrssi, @@ -4972,7 +4971,7 @@ ath_tx_processq(struct ath_softc *sc, st */ if (bf->bf_comp == NULL) { if ((ts->ts_status & HAL_TXERR_FILT) == 0 && - (bf->bf_txflags & HAL_TXDESC_NOACK) == 0) { + (bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0) { /* * XXX assume this isn't an aggregate * frame. Modified: head/sys/dev/ath/if_ath_debug.c ============================================================================== --- head/sys/dev/ath/if_ath_debug.c Fri Apr 6 22:51:02 2012 (r233965) +++ head/sys/dev/ath/if_ath_debug.c Sat Apr 7 02:01:26 2012 (r233966) @@ -137,10 +137,9 @@ ath_printtxbuf(struct ath_softc *sc, con for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) { printf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:%04x%s\n", ds, (const struct ath_desc *)bf->bf_daddr + i, - ds->ds_link, ds->ds_data, bf->bf_txflags, + ds->ds_link, ds->ds_data, bf->bf_state.bfs_txflags, !done ? "" : (ts->ts_status == 0) ? " *" : " !"); - printf(" TXF: %04x Seq: %d swtry: %d ADDBAW?: %d DOBAW?: %d\n", - bf->bf_state.bfs_flags, + printf(" Seq: %d swtry: %d ADDBAW?: %d DOBAW?: %d\n", bf->bf_state.bfs_seqno, bf->bf_state.bfs_retries, bf->bf_state.bfs_addedbaw, Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Fri Apr 6 22:51:02 2012 (r233965) +++ head/sys/dev/ath/if_ath_tx.c Sat Apr 7 02:01:26 2012 (r233966) @@ -424,7 +424,7 @@ ath_tx_setds_11n(struct ath_softc *sc, s ath_hal_setupfirsttxdesc(sc->sc_ah, bf_first->bf_desc, bf_first->bf_state.bfs_al, - bf_first->bf_state.bfs_flags | HAL_TXDESC_INTREQ, + bf_first->bf_state.bfs_txflags | HAL_TXDESC_INTREQ, bf_first->bf_state.bfs_txpower, bf_first->bf_state.bfs_txrate0, bf_first->bf_state.bfs_try0, @@ -812,7 +812,7 @@ ath_tx_set_rtscts(struct ath_softc *sc, /* * No RTS/CTS enabled? Don't bother. */ - if ((bf->bf_state.bfs_flags & + if ((bf->bf_state.bfs_txflags & (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) == 0) { /* XXX is this really needed? */ bf->bf_state.bfs_ctsrate = 0; @@ -847,7 +847,7 @@ ath_tx_set_rtscts(struct ath_softc *sc, if (! ath_tx_is_11n(sc)) ctsduration = ath_tx_calc_ctsduration(sc->sc_ah, rix, cix, bf->bf_state.bfs_shpream, bf->bf_state.bfs_pktlen, - rt, bf->bf_state.bfs_flags); + rt, bf->bf_state.bfs_txflags); /* Squirrel away in ath_buf */ bf->bf_state.bfs_ctsrate = ctsrate; @@ -881,7 +881,7 @@ ath_tx_setds(struct ath_softc *sc, struc , bf->bf_state.bfs_try0 /* series 0 rate/tries */ , bf->bf_state.bfs_keyix /* key cache index */ , bf->bf_state.bfs_txantenna /* antenna mode */ - , bf->bf_state.bfs_flags /* flags */ + , bf->bf_state.bfs_txflags /* flags */ , bf->bf_state.bfs_ctsrate /* rts/cts rate */ , bf->bf_state.bfs_ctsduration /* rts/cts duration */ ); @@ -1352,8 +1352,7 @@ ath_tx_normal_setup(struct ath_softc *sc bf->bf_state.bfs_try0 = try0; bf->bf_state.bfs_keyix = keyix; bf->bf_state.bfs_txantenna = sc->sc_txantenna; - bf->bf_state.bfs_flags = flags; - bf->bf_txflags = flags; + bf->bf_state.bfs_txflags = flags; bf->bf_state.bfs_shpream = shortPreamble; /* XXX this should be done in ath_tx_setrate() */ @@ -1698,8 +1697,7 @@ ath_tx_raw_start(struct ath_softc *sc, s bf->bf_state.bfs_try0 = try0; bf->bf_state.bfs_keyix = keyix; bf->bf_state.bfs_txantenna = txantenna; - bf->bf_state.bfs_flags = flags; - bf->bf_txflags = flags; + bf->bf_state.bfs_txflags = flags; bf->bf_state.bfs_shpream = !! (params->ibp_flags & IEEE80211_BPF_SHORTPRE); @@ -2999,7 +2997,7 @@ ath_tx_normal_comp(struct ath_softc *sc, * punt to rate control if we're not being cleaned up * during a hw queue drain and the frame wanted an ACK. */ - if (fail == 0 && ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0)) + if (fail == 0 && ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0)) ath_tx_update_ratectrl(sc, ni, bf->bf_state.bfs_rc, ts, bf->bf_state.bfs_pktlen, 1, (ts->ts_status == 0) ? 0 : 1); @@ -3754,7 +3752,7 @@ ath_tx_aggr_comp_unaggr(struct ath_softc * * Do it outside of the TXQ lock. */ - if (fail == 0 && ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0)) + if (fail == 0 && ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0)) ath_tx_update_ratectrl(sc, ni, bf->bf_state.bfs_rc, &bf->bf_status.ds_txstat, bf->bf_state.bfs_pktlen, Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Fri Apr 6 22:51:02 2012 (r233965) +++ head/sys/dev/ath/if_ath_tx_ht.c Sat Apr 7 02:01:26 2012 (r233966) @@ -245,7 +245,7 @@ ath_tx_rate_fill_rcflags(struct ath_soft */ rc[i].ratecode = rate; - if (bf->bf_state.bfs_flags & + if (bf->bf_state.bfs_txflags & (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) rc[i].flags |= ATH_RC_RTSCTS_FLAG; @@ -445,7 +445,7 @@ ath_rateseries_setup(struct ath_softc *s const HAL_RATE_TABLE *rt = sc->sc_currates; int i; int pktlen; - int flags = bf->bf_state.bfs_flags; + int flags = bf->bf_state.bfs_txflags; struct ath_rc_series *rc = bf->bf_state.bfs_rc; if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && @@ -566,7 +566,7 @@ ath_buf_set_rate(struct ath_softc *sc, s struct ath_hal *ah = sc->sc_ah; int is_pspoll = (bf->bf_state.bfs_atype == HAL_PKT_TYPE_PSPOLL); int ctsrate = bf->bf_state.bfs_ctsrate; - int flags = bf->bf_state.bfs_flags; + int flags = bf->bf_state.bfs_txflags; /* Setup rate scenario */ memset(&series, 0, sizeof(series)); @@ -822,11 +822,11 @@ ath_tx_form_aggr(struct ath_softc *sc, s * XXX enforce ACK for aggregate frames (this needs to be * XXX handled more gracefully? */ - if (bf->bf_state.bfs_flags & HAL_TXDESC_NOACK) { + if (bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) { device_printf(sc->sc_dev, "%s: HAL_TXDESC_NOACK set for an aggregate frame?\n", __func__); - bf->bf_state.bfs_flags &= (~HAL_TXDESC_NOACK); + bf->bf_state.bfs_txflags &= (~HAL_TXDESC_NOACK); } /* Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Fri Apr 6 22:51:02 2012 (r233965) +++ head/sys/dev/ath/if_athvar.h Sat Apr 7 02:01:26 2012 (r233966) @@ -175,7 +175,6 @@ struct ath_buf { TAILQ_ENTRY(ath_buf) bf_list; struct ath_buf * bf_next; /* next buffer in the aggregate */ int bf_nseg; - uint16_t bf_txflags; /* tx descriptor flags */ uint16_t bf_flags; /* status flags (below) */ struct ath_desc *bf_desc; /* virtual addr of desc */ struct ath_desc_status bf_status; /* tx/rx status */ @@ -229,7 +228,7 @@ struct ath_buf { int bfs_pktlen; /* length of this packet */ int bfs_hdrlen; /* length of this packet header */ uint16_t bfs_al; /* length of aggregate */ - int bfs_flags; /* HAL descriptor flags */ + int bfs_txflags; /* HAL (tx) descriptor flags */ int bfs_txrate0; /* first TX rate */ int bfs_try0; /* first try count */ uint8_t bfs_ctsrate0; /* Non-zero - use this as ctsrate */ From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 02:51:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53DCD106564A; Sat, 7 Apr 2012 02:51:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EC008FC08; Sat, 7 Apr 2012 02:51:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q372psu5038014; Sat, 7 Apr 2012 02:51:54 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q372prsQ038011; Sat, 7 Apr 2012 02:51:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204070251.q372prsQ038011@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Apr 2012 02:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233967 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 02:51:54 -0000 Author: adrian Date: Sat Apr 7 02:51:53 2012 New Revision: 233967 URL: http://svn.freebsd.org/changeset/base/233967 Log: Store away the RTS aggregate limit from the HAL. This will be used by some upcoming code to ensure that aggregates are enforced to be a certain size. The AR5416 has a limitation on RTS protected aggregates (8KiB). Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Apr 7 02:01:26 2012 (r233966) +++ head/sys/dev/ath/if_ath.c Sat Apr 7 02:51:53 2012 (r233967) @@ -732,6 +732,13 @@ ath_attach(u_int16_t devid, struct ath_s ic->ic_txstream = txs; ic->ic_rxstream = rxs; + (void) ath_hal_getcapability(ah, HAL_CAP_RTS_AGGR_LIMIT, 1, + &sc->sc_rts_aggr_limit); + if (sc->sc_rts_aggr_limit != (64 * 1024)) + device_printf(sc->sc_dev, + "[HT] RTS aggregates limited to %d KiB\n", + sc->sc_rts_aggr_limit / 1024); + device_printf(sc->sc_dev, "[HT] %d RX streams; %d TX streams\n", rxs, txs); } Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sat Apr 7 02:01:26 2012 (r233966) +++ head/sys/dev/ath/if_athvar.h Sat Apr 7 02:51:53 2012 (r233967) @@ -533,6 +533,7 @@ struct ath_softc { uint16_t *sc_eepromdata; /* Local eeprom data, if AR9100 */ int sc_txchainmask; /* currently configured TX chainmask */ int sc_rxchainmask; /* currently configured RX chainmask */ + int sc_rts_aggr_limit; /* TX limit on RTS aggregates */ /* Queue limits */ From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 03:22:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 01A2C106566C; Sat, 7 Apr 2012 03:22:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C75EF8FC08; Sat, 7 Apr 2012 03:22:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q373MBiE039516; Sat, 7 Apr 2012 03:22:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q373MBH5039514; Sat, 7 Apr 2012 03:22:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204070322.q373MBH5039514@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Apr 2012 03:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233970 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 03:22:12 -0000 Author: adrian Date: Sat Apr 7 03:22:11 2012 New Revision: 233970 URL: http://svn.freebsd.org/changeset/base/233970 Log: Enforce the RTS aggregation limit if RTS/CTS protection is enabled; if any subframes in an aggregate have different protection from the first frame in the formed aggregate, don't add that frame to the aggregate. This is likely a suboptimal method (I think we'll mostly be OK marking frames that have seqno's with the same protection as normal data frames) but I'll just be cautious for now. Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Sat Apr 7 03:20:14 2012 (r233969) +++ head/sys/dev/ath/if_ath_tx_ht.c Sat Apr 7 03:22:11 2012 (r233970) @@ -707,14 +707,6 @@ ath_tx_form_aggr(struct ath_softc *sc, s */ /* - * XXX TODO: AR5416 has an 8K aggregation size limit - * when RTS is enabled, and RTS is required for dual-stream - * rates. - * - * For now, limit all aggregates for the AR5416 to be 8K. - */ - - /* * do not exceed aggregation limit */ al_delta = ATH_AGGR_DELIM_SZ + bf->bf_state.bfs_pktlen; @@ -725,6 +717,20 @@ ath_tx_form_aggr(struct ath_softc *sc, s } /* + * If RTS/CTS is set on the first frame, enforce + * the RTS aggregate limit. + */ + if (bf_first->bf_state.bfs_txflags & + (HAL_TXDESC_CTSENA | HAL_TXDESC_RTSENA)) { + if (nframes && + (sc->sc_rts_aggr_limit < + (al + bpad + al_delta + prev_al))) { + status = ATH_AGGR_8K_LIMITED; + break; + } + } + + /* * Do not exceed subframe limit. */ if ((nframes + prev_frames) >= MIN((h_baw), @@ -734,7 +740,24 @@ ath_tx_form_aggr(struct ath_softc *sc, s } /* - * TODO: If it's _before_ the BAW left edge, complain very loudly. + * If the current frame has an RTS/CTS configuration + * that differs from the first frame, don't include + * this in the aggregate. It's possible that the + * "right" thing to do here is enforce the aggregate + * configuration. + */ + if ((bf_first->bf_state.bfs_txflags & + (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) != + (bf->bf_state.bfs_txflags & + (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA))) { + status = ATH_AGGR_NONAGGR; + break; + } + + /* + * TODO: If it's _before_ the BAW left edge, complain very + * loudly. + * * This means something (else) has slid the left edge along * before we got a chance to be TXed. */ @@ -814,11 +837,6 @@ ath_tx_form_aggr(struct ath_softc *sc, s bf->bf_state.bfs_addedbaw = 1; /* - * XXX TODO: If any frame in the aggregate requires RTS/CTS, - * set the first frame. - */ - - /* * XXX enforce ACK for aggregate frames (this needs to be * XXX handled more gracefully? */ From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 03:59:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BCA3106564A; Sat, 7 Apr 2012 03:59:13 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C81A8FC16; Sat, 7 Apr 2012 03:59:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q373xCMT040918; Sat, 7 Apr 2012 03:59:12 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q373xCF5040914; Sat, 7 Apr 2012 03:59:12 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204070359.q373xCF5040914@svn.freebsd.org> From: David Schultz Date: Sat, 7 Apr 2012 03:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233973 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 03:59:13 -0000 Author: das Date: Sat Apr 7 03:59:12 2012 New Revision: 233973 URL: http://svn.freebsd.org/changeset/base/233973 Log: Fix a bug in remquo{,f,l}, in which the quotient didn't always have the correct sign when the remainder was 0. Fix a separate bug in remquo alone, in which the remainder and quotient were both off by a bit in certain cases involving subnormal remainders. The bugs affected all platforms except amd64 and i386, on which the routines are implemented in assembly. PR: 166463 Submitted by: Ilya Burylov MFC after: 2 weeks Modified: head/lib/msun/src/s_remquo.c head/lib/msun/src/s_remquof.c head/lib/msun/src/s_remquol.c Modified: head/lib/msun/src/s_remquo.c ============================================================================== --- head/lib/msun/src/s_remquo.c Sat Apr 7 03:50:24 2012 (r233972) +++ head/lib/msun/src/s_remquo.c Sat Apr 7 03:59:12 2012 (r233973) @@ -51,7 +51,7 @@ remquo(double x, double y, int *quo) goto fixup; /* |x|<|y| return x or x-y */ } if(lx==ly) { - *quo = 1; + *quo = (sxy ? -1 : 1); return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/ } } @@ -114,6 +114,7 @@ remquo(double x, double y, int *quo) /* convert back to floating value and restore the sign */ if((hx|lx)==0) { /* return sign(x)*0 */ + q &= 0x7fffffff; *quo = (sxy ? -q : q); return Zero[(u_int32_t)sx>>31]; } @@ -129,9 +130,9 @@ remquo(double x, double y, int *quo) lx = (lx>>n)|((u_int32_t)hx<<(32-n)); hx >>= n; } else if (n<=31) { - lx = (hx<<(32-n))|(lx>>n); hx = sx; + lx = (hx<<(32-n))|(lx>>n); hx = 0; } else { - lx = hx>>(n-32); hx = sx; + lx = hx>>(n-32); hx = 0; } } fixup: Modified: head/lib/msun/src/s_remquof.c ============================================================================== --- head/lib/msun/src/s_remquof.c Sat Apr 7 03:50:24 2012 (r233972) +++ head/lib/msun/src/s_remquof.c Sat Apr 7 03:59:12 2012 (r233973) @@ -46,7 +46,7 @@ remquof(float x, float y, int *quo) q = 0; goto fixup; /* |x|<|y| return x or x-y */ } else if(hx==hy) { - *quo = 1; + *quo = (sxy ? -1 : 1); return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/ } @@ -88,6 +88,7 @@ remquof(float x, float y, int *quo) /* convert back to floating value and restore the sign */ if(hx==0) { /* return sign(x)*0 */ + q &= 0x7fffffff; *quo = (sxy ? -q : q); return Zero[(u_int32_t)sx>>31]; } Modified: head/lib/msun/src/s_remquol.c ============================================================================== --- head/lib/msun/src/s_remquol.c Sat Apr 7 03:50:24 2012 (r233972) +++ head/lib/msun/src/s_remquol.c Sat Apr 7 03:59:12 2012 (r233973) @@ -96,7 +96,7 @@ remquol(long double x, long double y, in goto fixup; /* |x|<|y| return x or x-y */ } if(ux.bits.manh==uy.bits.manh && ux.bits.manl==uy.bits.manl) { - *quo = 1; + *quo = (sxy ? -1 : 1); return Zero[sx]; /* |x|=|y| return x*0*/ } } @@ -138,6 +138,7 @@ remquol(long double x, long double y, in /* convert back to floating value and restore the sign */ if((hx|lx)==0) { /* return sign(x)*0 */ + q &= 0x7fffffff; *quo = (sxy ? -q : q); return Zero[sx]; } From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 04:00:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E480E1065673; Sat, 7 Apr 2012 04:00:30 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C62DD8FC1F; Sat, 7 Apr 2012 04:00:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3740U4o041025; Sat, 7 Apr 2012 04:00:30 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3740UCK041023; Sat, 7 Apr 2012 04:00:30 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204070400.q3740UCK041023@svn.freebsd.org> From: David Schultz Date: Sat, 7 Apr 2012 04:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233974 - head/tools/regression/lib/msun X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 04:00:31 -0000 Author: das Date: Sat Apr 7 04:00:30 2012 New Revision: 233974 URL: http://svn.freebsd.org/changeset/base/233974 Log: Add some tests from PR 166463. Also make sure that all of the tests, old and new, check the sign bits of both the remainder and the quotient. Modified: head/tools/regression/lib/msun/test-rem.c Modified: head/tools/regression/lib/msun/test-rem.c ============================================================================== --- head/tools/regression/lib/msun/test-rem.c Sat Apr 7 03:59:12 2012 (r233973) +++ head/tools/regression/lib/msun/test-rem.c Sat Apr 7 04:00:30 2012 (r233974) @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) { - printf("1..2\n"); + printf("1..3\n"); test_invalid(0.0, 0.0); test_invalid(1.0, 0.0); @@ -96,6 +96,14 @@ main(int argc, char *argv[]) printf("ok 2 - rem\n"); + test(0x1.66666cp+120, 0x1p+71, 0.0, 1476395008); + testd(-0x1.0000000000003p+0, 0x1.0000000000003p+0, -0.0, -1); + testl(-0x1.0000000000003p+0, 0x1.0000000000003p+0, -0.0, -1); + testd(-0x1.0000000000001p-749, 0x1.4p-1072, 0x1p-1074, -1288490189); + testl(-0x1.0000000000001p-749, 0x1.4p-1072, 0x1p-1074, -1288490189); + + printf("ok 3 - rem\n"); + return (0); } @@ -136,10 +144,16 @@ static void testl(long double x, long double y, long double expected_rem, int expected_quo) { int q; + long double rem; q = random(); - assert(remainderl(x, y) == expected_rem); - assert(remquol(x, y, &q) == expected_rem); + rem = remainderl(x, y); + assert(rem == expected_rem); + assert(!signbit(rem) == !signbit(expected_rem)); + rem = remquol(x, y, &q); + assert(rem == expected_rem); + assert(!signbit(rem) == !signbit(expected_rem)); + assert((q ^ expected_quo) >= 0); /* sign(q) == sign(expected_quo) */ assert((q & 0x7) == (expected_quo & 0x7)); if (q != 0) { assert((q > 0) ^ !(expected_quo > 0)); @@ -152,10 +166,16 @@ static void testd(double x, double y, double expected_rem, int expected_quo) { int q; + double rem; q = random(); - assert(remainder(x, y) == expected_rem); - assert(remquo(x, y, &q) == expected_rem); + rem = remainder(x, y); + assert(rem == expected_rem); + assert(!signbit(rem) == !signbit(expected_rem)); + rem = remquo(x, y, &q); + assert(rem == expected_rem); + assert(!signbit(rem) == !signbit(expected_rem)); + assert((q ^ expected_quo) >= 0); /* sign(q) == sign(expected_quo) */ assert((q & 0x7) == (expected_quo & 0x7)); if (q != 0) { assert((q > 0) ^ !(expected_quo > 0)); @@ -168,10 +188,16 @@ static void testf(float x, float y, float expected_rem, int expected_quo) { int q; + float rem; q = random(); - assert(remainderf(x, y) == expected_rem); - assert(remquof(x, y, &q) == expected_rem); + rem = remainderf(x, y); + assert(rem == expected_rem); + assert(!signbit(rem) == !signbit(expected_rem)); + rem = remquof(x, y, &q); + assert(rem == expected_rem); + assert(!signbit(rem) == !signbit(expected_rem)); + assert((q ^ expected_quo) >= 0); /* sign(q) == sign(expected_quo) */ assert((q & 0x7) == (expected_quo & 0x7)); if (q != 0) { assert((q > 0) ^ !(expected_quo > 0)); From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 05:46:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 928151065674; Sat, 7 Apr 2012 05:46:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D74A8FC12; Sat, 7 Apr 2012 05:46:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q375k17P045472; Sat, 7 Apr 2012 05:46:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q375k1QK045470; Sat, 7 Apr 2012 05:46:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204070546.q375k1QK045470@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Apr 2012 05:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233988 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 05:46:01 -0000 Author: adrian Date: Sat Apr 7 05:46:00 2012 New Revision: 233988 URL: http://svn.freebsd.org/changeset/base/233988 Log: As I thought, this is a bad idea. When forming aggregates, the RTS/CTS stuff and rate control lookup is only done on the first frame. Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Sat Apr 7 05:43:50 2012 (r233987) +++ head/sys/dev/ath/if_ath_tx_ht.c Sat Apr 7 05:46:00 2012 (r233988) @@ -741,18 +741,14 @@ ath_tx_form_aggr(struct ath_softc *sc, s /* * If the current frame has an RTS/CTS configuration - * that differs from the first frame, don't include - * this in the aggregate. It's possible that the - * "right" thing to do here is enforce the aggregate - * configuration. - */ - if ((bf_first->bf_state.bfs_txflags & - (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) != - (bf->bf_state.bfs_txflags & - (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA))) { - status = ATH_AGGR_NONAGGR; - break; - } + * that differs from the first frame, override the + * subsequent frame with this config. + */ + bf->bf_state.bfs_txflags &= + (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); + bf->bf_state.bfs_txflags |= + bf_first->bf_state.bfs_txflags & + (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); /* * TODO: If it's _before_ the BAW left edge, complain very From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 05:48:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 79829106564A; Sat, 7 Apr 2012 05:48:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63CDC8FC0A; Sat, 7 Apr 2012 05:48:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q375mRU8045595; Sat, 7 Apr 2012 05:48:27 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q375mR8L045591; Sat, 7 Apr 2012 05:48:27 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204070548.q375mR8L045591@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Apr 2012 05:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233989 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 05:48:27 -0000 Author: adrian Date: Sat Apr 7 05:48:26 2012 New Revision: 233989 URL: http://svn.freebsd.org/changeset/base/233989 Log: Break out the legacy duration and protection code into routines, call these after rate control selection is done. The duration/protection code wasn't working - it expected the rix to be valid. Unfortunately after I moved the rate control selection into late in the process, the rix value isn't valid and thus the protection/ duration code would get things wrong. HT frames are now correctly protected with an RTS and for the AR5416, this involves having the aggregate frames be limited to 8K. TODO: * Fix up the DMA sync to occur just before the frame is queued to the hardware. I'm adjusting the duration here but not doing the DMA flush. * Doubly/triply ensure that the aggregate frames are being limited to the correct size, or the AR5416 will get unhappy when TXing RTS-protected aggregates. Modified: head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Sat Apr 7 05:46:00 2012 (r233988) +++ head/sys/dev/ath/if_ath_sysctl.c Sat Apr 7 05:48:26 2012 (r233989) @@ -344,6 +344,8 @@ ath_sysctl_txagg(SYSCTL_HANDLER_ARGS) sc->sc_aggr_stats.aggr_aggr_pkt); printf("aggr single packet low hwq: %d\n", sc->sc_aggr_stats.aggr_low_hwq_single_pkt); + printf("aggr single packet RTS aggr limited: %d\n", + sc->sc_aggr_stats.aggr_rts_aggr_limited); printf("aggr sched, no work: %d\n", sc->sc_aggr_stats.aggr_sched_nopkt); for (i = 0; i < 64; i++) { Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sat Apr 7 05:46:00 2012 (r233988) +++ head/sys/dev/ath/if_ath_tx.c Sat Apr 7 05:48:26 2012 (r233989) @@ -720,6 +720,133 @@ ath_tx_tag_crypto(struct ath_softc *sc, return (1); } +/* + * Calculate whether interoperability protection is required for + * this frame. + * + * This requires the rate control information be filled in, + * as the protection requirement depends upon the current + * operating mode / PHY. + */ +static void +ath_tx_calc_protection(struct ath_softc *sc, struct ath_buf *bf) +{ + struct ieee80211_frame *wh; + uint8_t rix; + uint16_t flags; + int shortPreamble; + const HAL_RATE_TABLE *rt = sc->sc_currates; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + + flags = bf->bf_state.bfs_txflags; + rix = bf->bf_state.bfs_rc[0].rix; + shortPreamble = bf->bf_state.bfs_shpream; + wh = mtod(bf->bf_m, struct ieee80211_frame *); + + /* + * If 802.11g protection is enabled, determine whether + * to use RTS/CTS or just CTS. Note that this is only + * done for OFDM unicast frames. + */ + if ((ic->ic_flags & IEEE80211_F_USEPROT) && + rt->info[rix].phy == IEEE80211_T_OFDM && + (flags & HAL_TXDESC_NOACK) == 0) { + bf->bf_state.bfs_doprot = 1; + /* XXX fragments must use CCK rates w/ protection */ + if (ic->ic_protmode == IEEE80211_PROT_RTSCTS) { + flags |= HAL_TXDESC_RTSENA; + } else if (ic->ic_protmode == IEEE80211_PROT_CTSONLY) { + flags |= HAL_TXDESC_CTSENA; + } + /* + * For frags it would be desirable to use the + * highest CCK rate for RTS/CTS. But stations + * farther away may detect it at a lower CCK rate + * so use the configured protection rate instead + * (for now). + */ + sc->sc_stats.ast_tx_protect++; + } + + /* + * If 11n protection is enabled and it's a HT frame, + * enable RTS. + * + * XXX ic_htprotmode or ic_curhtprotmode? + * XXX should it_htprotmode only matter if ic_curhtprotmode + * XXX indicates it's not a HT pure environment? + */ + if ((ic->ic_htprotmode == IEEE80211_PROT_RTSCTS) && + rt->info[rix].phy == IEEE80211_T_HT && + (flags & HAL_TXDESC_NOACK) == 0) { + flags |= HAL_TXDESC_RTSENA; + sc->sc_stats.ast_tx_htprotect++; + } + bf->bf_state.bfs_txflags = flags; +} + +/* + * Update the frame duration given the currently selected rate. + * + * This also updates the frame duration value, so it will require + * a DMA flush. + */ +static void +ath_tx_calc_duration(struct ath_softc *sc, struct ath_buf *bf) +{ + struct ieee80211_frame *wh; + uint8_t rix; + uint16_t flags; + int shortPreamble; + struct ath_hal *ah = sc->sc_ah; + const HAL_RATE_TABLE *rt = sc->sc_currates; + int isfrag = bf->bf_m->m_flags & M_FRAG; + + flags = bf->bf_state.bfs_txflags; + rix = bf->bf_state.bfs_rc[0].rix; + shortPreamble = bf->bf_state.bfs_shpream; + wh = mtod(bf->bf_m, struct ieee80211_frame *); + + /* + * Calculate duration. This logically belongs in the 802.11 + * layer but it lacks sufficient information to calculate it. + */ + if ((flags & HAL_TXDESC_NOACK) == 0 && + (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_CTL) { + u_int16_t dur; + if (shortPreamble) + dur = rt->info[rix].spAckDuration; + else + dur = rt->info[rix].lpAckDuration; + if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) { + dur += dur; /* additional SIFS+ACK */ + KASSERT(bf->bf_m->m_nextpkt != NULL, ("no fragment")); + /* + * Include the size of next fragment so NAV is + * updated properly. The last fragment uses only + * the ACK duration + */ + dur += ath_hal_computetxtime(ah, rt, + bf->bf_m->m_nextpkt->m_pkthdr.len, + rix, shortPreamble); + } + if (isfrag) { + /* + * Force hardware to use computed duration for next + * fragment by disabling multi-rate retry which updates + * duration based on the multi-rate duration table. + */ + bf->bf_state.bfs_ismrr = 0; + bf->bf_state.bfs_try0 = ATH_TXMGTTRY; + /* XXX update bfs_rc[0].try? */ + } + + /* Update the duration field itself */ + *(u_int16_t *)wh->i_dur = htole16(dur); + } +} + static uint8_t ath_tx_get_rtscts_rate(struct ath_hal *ah, const HAL_RATE_TABLE *rt, int cix, int shortPreamble) @@ -1004,8 +1131,10 @@ ath_tx_xmit_normal(struct ath_softc *sc, /* Setup the descriptor before handoff */ ath_tx_do_ratelookup(sc, bf); - ath_tx_rate_fill_rcflags(sc, bf); + ath_tx_calc_duration(sc, bf); + ath_tx_calc_protection(sc, bf); ath_tx_set_rtscts(sc, bf); + ath_tx_rate_fill_rcflags(sc, bf); ath_tx_setds(sc, bf); ath_tx_set_ratectrl(sc, bf->bf_node, bf); ath_tx_chaindesclist(sc, bf); @@ -1204,84 +1333,6 @@ ath_tx_normal_setup(struct ath_softc *sc #endif /* - * If 802.11g protection is enabled, determine whether - * to use RTS/CTS or just CTS. Note that this is only - * done for OFDM unicast frames. - */ - if ((ic->ic_flags & IEEE80211_F_USEPROT) && - rt->info[rix].phy == IEEE80211_T_OFDM && - (flags & HAL_TXDESC_NOACK) == 0) { - bf->bf_state.bfs_doprot = 1; - /* XXX fragments must use CCK rates w/ protection */ - if (ic->ic_protmode == IEEE80211_PROT_RTSCTS) { - flags |= HAL_TXDESC_RTSENA; - } else if (ic->ic_protmode == IEEE80211_PROT_CTSONLY) { - flags |= HAL_TXDESC_CTSENA; - } - /* - * For frags it would be desirable to use the - * highest CCK rate for RTS/CTS. But stations - * farther away may detect it at a lower CCK rate - * so use the configured protection rate instead - * (for now). - */ - sc->sc_stats.ast_tx_protect++; - } - -#if 0 - /* - * If 11n protection is enabled and it's a HT frame, - * enable RTS. - * - * XXX ic_htprotmode or ic_curhtprotmode? - * XXX should it_htprotmode only matter if ic_curhtprotmode - * XXX indicates it's not a HT pure environment? - */ - if ((ic->ic_htprotmode == IEEE80211_PROT_RTSCTS) && - rt->info[rix].phy == IEEE80211_T_HT && - (flags & HAL_TXDESC_NOACK) == 0) { - cix = rt->info[sc->sc_protrix].controlRate; - flags |= HAL_TXDESC_RTSENA; - sc->sc_stats.ast_tx_htprotect++; - } -#endif - - /* - * Calculate duration. This logically belongs in the 802.11 - * layer but it lacks sufficient information to calculate it. - */ - if ((flags & HAL_TXDESC_NOACK) == 0 && - (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_CTL) { - u_int16_t dur; - if (shortPreamble) - dur = rt->info[rix].spAckDuration; - else - dur = rt->info[rix].lpAckDuration; - if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) { - dur += dur; /* additional SIFS+ACK */ - KASSERT(m0->m_nextpkt != NULL, ("no fragment")); - /* - * Include the size of next fragment so NAV is - * updated properly. The last fragment uses only - * the ACK duration - */ - dur += ath_hal_computetxtime(ah, rt, - m0->m_nextpkt->m_pkthdr.len, - rix, shortPreamble); - } - if (isfrag) { - /* - * Force hardware to use computed duration for next - * fragment by disabling multi-rate retry which updates - * duration based on the multi-rate duration table. - */ - ismrr = 0; - try0 = ATH_TXMGTTRY; /* XXX? */ - } - *(u_int16_t *)wh->i_dur = htole16(dur); - } - - /* * Determine if a tx interrupt should be generated for * this descriptor. We take a tx interrupt to reap * descriptors when the h/w hits an EOL condition or @@ -2441,8 +2492,10 @@ ath_tx_xmit_aggr(struct ath_softc *sc, s /* Direct dispatch to hardware */ ath_tx_do_ratelookup(sc, bf); - ath_tx_rate_fill_rcflags(sc, bf); + ath_tx_calc_duration(sc, bf); + ath_tx_calc_protection(sc, bf); ath_tx_set_rtscts(sc, bf); + ath_tx_rate_fill_rcflags(sc, bf); ath_tx_setds(sc, bf); ath_tx_set_ratectrl(sc, bf->bf_node, bf); ath_tx_chaindesclist(sc, bf); @@ -3892,8 +3945,10 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft ATH_TXQ_REMOVE(tid, bf, bf_list); bf->bf_state.bfs_aggr = 0; ath_tx_do_ratelookup(sc, bf); - ath_tx_rate_fill_rcflags(sc, bf); + ath_tx_calc_duration(sc, bf); + ath_tx_calc_protection(sc, bf); ath_tx_set_rtscts(sc, bf); + ath_tx_rate_fill_rcflags(sc, bf); ath_tx_setds(sc, bf); ath_tx_chaindesclist(sc, bf); ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc); @@ -3918,6 +3973,11 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft ath_tx_do_ratelookup(sc, bf); bf->bf_state.bfs_rc[3].rix = 0; bf->bf_state.bfs_rc[3].tries = 0; + + ath_tx_calc_duration(sc, bf); + ath_tx_calc_protection(sc, bf); + + ath_tx_set_rtscts(sc, bf); ath_tx_rate_fill_rcflags(sc, bf); status = ath_tx_form_aggr(sc, an, tid, &bf_q); @@ -3937,6 +3997,9 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft */ bf = TAILQ_FIRST(&bf_q); + if (status == ATH_AGGR_8K_LIMITED) + sc->sc_aggr_stats.aggr_rts_aggr_limited++; + /* * If it's the only frame send as non-aggregate * assume that ath_tx_form_aggr() has checked @@ -3946,7 +4009,6 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: single-frame aggregate\n", __func__); bf->bf_state.bfs_aggr = 0; - ath_tx_set_rtscts(sc, bf); ath_tx_setds(sc, bf); ath_tx_chaindesclist(sc, bf); ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc); @@ -3966,6 +4028,12 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft sc->sc_aggr_stats.aggr_aggr_pkt++; /* + * Calculate the duration/protection as required. + */ + ath_tx_calc_duration(sc, bf); + ath_tx_calc_protection(sc, bf); + + /* * Update the rate and rtscts information based on the * rate decision made by the rate control code; * the first frame in the aggregate needs it. @@ -4066,8 +4134,10 @@ ath_tx_tid_hw_queue_norm(struct ath_soft /* Program descriptors + rate control */ ath_tx_do_ratelookup(sc, bf); - ath_tx_rate_fill_rcflags(sc, bf); + ath_tx_calc_duration(sc, bf); + ath_tx_calc_protection(sc, bf); ath_tx_set_rtscts(sc, bf); + ath_tx_rate_fill_rcflags(sc, bf); ath_tx_setds(sc, bf); ath_tx_chaindesclist(sc, bf); ath_tx_set_ratectrl(sc, ni, bf); Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Sat Apr 7 05:46:00 2012 (r233988) +++ head/sys/dev/ath/if_athioctl.h Sat Apr 7 05:48:26 2012 (r233989) @@ -43,6 +43,7 @@ struct ath_tx_aggr_stats { u_int32_t aggr_baw_closed_single_pkt; u_int32_t aggr_low_hwq_single_pkt; u_int32_t aggr_sched_nopkt; + u_int32_t aggr_rts_aggr_limited; }; struct ath_stats { From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 05:51:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 789201065670; Sat, 7 Apr 2012 05:51:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 645498FC0A; Sat, 7 Apr 2012 05:51:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q375piqY045746; Sat, 7 Apr 2012 05:51:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q375piQF045744; Sat, 7 Apr 2012 05:51:44 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204070551.q375piQF045744@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Apr 2012 05:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233990 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 05:51:44 -0000 Author: adrian Date: Sat Apr 7 05:51:43 2012 New Revision: 233990 URL: http://svn.freebsd.org/changeset/base/233990 Log: Do a dma sync before the descriptors are chained together. I need to find a better place to do this.. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sat Apr 7 05:48:26 2012 (r233989) +++ head/sys/dev/ath/if_ath_tx.c Sat Apr 7 05:51:43 2012 (r233990) @@ -322,6 +322,7 @@ ath_tx_chaindesclist(struct ath_softc *s ds->ds_ctl0, ds->ds_ctl1, ds->ds_hw[0], ds->ds_hw[1]); bf->bf_lastds = ds; } + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_PREWRITE); } /* @@ -372,6 +373,8 @@ ath_tx_chaindesclist_subframe(struct ath __func__, i, ds->ds_link, ds->ds_data, ds->ds_ctl0, ds->ds_ctl1, ds->ds_hw[0], ds->ds_hw[1]); bf->bf_lastds = ds; + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, + BUS_DMASYNC_PREWRITE); } } From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 06:56:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FC11106566B; Sat, 7 Apr 2012 06:56:39 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BBE28FC0C; Sat, 7 Apr 2012 06:56:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q376udQE048058; Sat, 7 Apr 2012 06:56:39 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q376ucfP048056; Sat, 7 Apr 2012 06:56:38 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201204070656.q376ucfP048056@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 7 Apr 2012 06:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233991 - head/sys/dev/smc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 06:56:39 -0000 Author: stas Date: Sat Apr 7 06:56:38 2012 New Revision: 233991 URL: http://svn.freebsd.org/changeset/base/233991 Log: - Do not reinitialize the card if it is already running. This fixes bootp on if_smc, as bootp code perform SIOCSIFADDR ioctl call immediately after sending the request (which causes if_init being called) which causes the adapter to drop all the packets received in the meantime. Modified: head/sys/dev/smc/if_smc.c Modified: head/sys/dev/smc/if_smc.c ============================================================================== --- head/sys/dev/smc/if_smc.c Sat Apr 7 05:51:43 2012 (r233990) +++ head/sys/dev/smc/if_smc.c Sat Apr 7 06:56:38 2012 (r233991) @@ -1237,9 +1237,10 @@ smc_init_locked(struct smc_softc *sc) { struct ifnet *ifp; - ifp = sc->smc_ifp; - SMC_ASSERT_LOCKED(sc); + ifp = sc->smc_ifp; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; smc_reset(sc); smc_enable(sc); From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 09:05:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8DD9106564A; Sat, 7 Apr 2012 09:05:31 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFEEE8FC0C; Sat, 7 Apr 2012 09:05:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3795VP6052721; Sat, 7 Apr 2012 09:05:31 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3795Vhp052693; Sat, 7 Apr 2012 09:05:31 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201204070905.q3795Vhp052693@svn.freebsd.org> From: Joel Dahl Date: Sat, 7 Apr 2012 09:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233992 - in head: bin/sh bin/stty lib/libc/locale lib/msun/man sbin/sunlabel share/man/man3 share/man/man4 share/man/man4/man4.i386 usr.bin/hexdump usr.sbin/lmcconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 09:05:32 -0000 Author: joel (doc committer) Date: Sat Apr 7 09:05:30 2012 New Revision: 233992 URL: http://svn.freebsd.org/changeset/base/233992 Log: mdoc: fix column names, indentation, column separation within each row, and quotation. Also make sure we have the same amount of columns in each row as the number of columns we specify in the head arguments. Reviewed by: brueffer Modified: head/bin/sh/sh.1 head/bin/stty/stty.1 head/lib/libc/locale/isalnum.3 head/lib/libc/locale/isalpha.3 head/lib/libc/locale/iscntrl.3 head/lib/libc/locale/isdigit.3 head/lib/libc/locale/isgraph.3 head/lib/libc/locale/islower.3 head/lib/libc/locale/isprint.3 head/lib/libc/locale/ispunct.3 head/lib/libc/locale/isspace.3 head/lib/libc/locale/isupper.3 head/lib/libc/locale/isxdigit.3 head/lib/msun/man/csqrt.3 head/sbin/sunlabel/sunlabel.8 head/share/man/man3/tgmath.3 head/share/man/man4/adv.4 head/share/man/man4/bt.4 head/share/man/man4/bwi.4 head/share/man/man4/bwn.4 head/share/man/man4/malo.4 head/share/man/man4/man4.i386/apm.4 head/share/man/man4/uath.4 head/usr.bin/hexdump/hexdump.1 head/usr.bin/hexdump/od.1 head/usr.sbin/lmcconfig/lmcconfig.8 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sat Apr 7 06:56:38 2012 (r233991) +++ head/bin/sh/sh.1 Sat Apr 7 09:05:30 2012 (r233992) @@ -381,7 +381,7 @@ The following is a list of valid operato .It Redirection operators: .Bl -column "XXX" "XXX" "XXX" "XXX" "XXX" -offset center -compact .It Li < Ta Li > Ta Li << Ta Li >> Ta Li <> -.It Li <& Ta Li >& Ta Li <<- Ta Li >| +.It Li <& Ta Li >& Ta Li <<- Ta Li >| Ta \& .El .El .Pp Modified: head/bin/stty/stty.1 ============================================================================== --- head/bin/stty/stty.1 Sat Apr 7 06:56:38 2012 (r233991) +++ head/bin/stty/stty.1 Sat Apr 7 09:05:30 2012 (r233992) @@ -384,7 +384,7 @@ is disabled (i.e., set to Recognized control-characters: .Bd -ragged -offset indent .Bl -column character Subscript -.It control- +.It control- Ta \& Ta \& .It character Ta Subscript Ta Description .It _________ Ta _________ Ta _______________ .It eof Ta Tn VEOF Ta EOF No character Modified: head/lib/libc/locale/isalnum.3 ============================================================================== --- head/lib/libc/locale/isalnum.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/isalnum.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -62,19 +62,19 @@ or the value of In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''" -.It "\&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''" -.It "\&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''" -.It "\&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''" -.It "\&113\ ``K'' \t114\ ``L'' \t115\ ``M'' \t116\ ``N'' \t117\ ``O''" -.It "\&120\ ``P'' \t121\ ``Q'' \t122\ ``R'' \t123\ ``S'' \t124\ ``T''" -.It "\&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''" -.It "\&132\ ``Z'' \t141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d''" -.It "\&145\ ``e'' \t146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i''" -.It "\&152\ ``j'' \t153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n''" -.It "\&157\ ``o'' \t160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s''" -.It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" -.It "\&171\ ``y'' \t172\ ``z''" +.It "\&060\ ``0''" Ta "061\ ``1''" Ta "062\ ``2''" Ta "063\ ``3''" Ta "064\ ``4''" +.It "\&065\ ``5''" Ta "066\ ``6''" Ta "067\ ``7''" Ta "070\ ``8''" Ta "071\ ``9''" +.It "\&101\ ``A''" Ta "102\ ``B''" Ta "103\ ``C''" Ta "104\ ``D''" Ta "105\ ``E''" +.It "\&106\ ``F''" Ta "107\ ``G''" Ta "110\ ``H''" Ta "111\ ``I''" Ta "112\ ``J''" +.It "\&113\ ``K''" Ta "114\ ``L''" Ta "115\ ``M''" Ta "116\ ``N''" Ta "117\ ``O''" +.It "\&120\ ``P''" Ta "121\ ``Q''" Ta "122\ ``R''" Ta "123\ ``S''" Ta "124\ ``T''" +.It "\&125\ ``U''" Ta "126\ ``V''" Ta "127\ ``W''" Ta "130\ ``X''" Ta "131\ ``Y''" +.It "\&132\ ``Z''" Ta "141\ ``a''" Ta "142\ ``b''" Ta "143\ ``c''" Ta "144\ ``d''" +.It "\&145\ ``e''" Ta "146\ ``f''" Ta "147\ ``g''" Ta "150\ ``h''" Ta "151\ ``i''" +.It "\&152\ ``j''" Ta "153\ ``k''" Ta "154\ ``l''" Ta "155\ ``m''" Ta "156\ ``n''" +.It "\&157\ ``o''" Ta "160\ ``p''" Ta "161\ ``q''" Ta "162\ ``r''" Ta "163\ ``s''" +.It "\&164\ ``t''" Ta "165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" +.It "\&171\ ``y''" Ta "172\ ``z''" Ta \& Ta \& Ta \& .El .Pp The Modified: head/lib/libc/locale/isalpha.3 ============================================================================== --- head/lib/libc/locale/isalpha.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/isalpha.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -62,18 +62,19 @@ or the value of In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''" -.It "\&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''" -.It "\&113\ ``K'' \t114\ ``L'' \t115\ ``M'' \t116\ ``N'' \t117\ ``O''" -.It "\&120\ ``P'' \t121\ ``Q'' \t122\ ``R'' \t123\ ``S'' \t124\ ``T''" -.It "\&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''" -.It "\&132\ ``Z'' \t141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d''" -.It "\&145\ ``e'' \t146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i''" -.It "\&152\ ``j'' \t153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n''" -.It "\&157\ ``o'' \t160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s''" -.It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" -.It "\&171\ ``y'' \t172\ ``z''" +.It "\&101\ ``A''" Ta "102\ ``B''" Ta "103\ ``C''" Ta "104\ ``D''" Ta "105\ ``E''" +.It "\&106\ ``F''" Ta "107\ ``G''" Ta "110\ ``H''" Ta "111\ ``I''" Ta "112\ ``J''" +.It "\&113\ ``K''" Ta "114\ ``L''" Ta "115\ ``M''" Ta "116\ ``N''" Ta "117\ ``O''" +.It "\&120\ ``P''" Ta "121\ ``Q''" Ta "122\ ``R''" Ta "123\ ``S''" Ta "124\ ``T''" +.It "\&125\ ``U''" Ta "126\ ``V''" Ta "127\ ``W''" Ta "130\ ``X''" Ta "131\ ``Y''" +.It "\&132\ ``Z''" Ta "141\ ``a''" Ta "142\ ``b''" Ta "143\ ``c''" Ta "144\ ``d''" +.It "\&145\ ``e''" Ta "146\ ``f''" Ta "147\ ``g''" Ta "150\ ``h''" Ta "151\ ``i''" +.It "\&152\ ``j''" Ta "153\ ``k''" Ta "154\ ``l''" Ta "155\ ``m''" Ta "156\ ``n''" +.It "\&157\ ``o''" Ta "160\ ``p''" Ta "161\ ``q''" Ta "162\ ``r''" Ta "163\ ``s''" +.It "\&164\ ``t''" Ta "165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" +.It "\&171\ ``y''" Ta "172\ ``z''" Ta \& Ta \& Ta \& .El +.Pp The .Fn isalpha_l function takes an explicit locale argument, whereas the Modified: head/lib/libc/locale/iscntrl.3 ============================================================================== --- head/lib/libc/locale/iscntrl.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/iscntrl.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -58,13 +58,13 @@ or the value of In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&000\ NUL \t001\ SOH \t002\ STX \t003\ ETX \t004\ EOT" -.It "\&005\ ENQ \t006\ ACK \t007\ BEL \t010\ BS \t011\ HT" -.It "\&012\ NL \t013\ VT \t014\ NP \t015\ CR \t016\ SO" -.It "\&017\ SI \t020\ DLE \t021\ DC1 \t022\ DC2 \t023\ DC3" -.It "\&024\ DC4 \t025\ NAK \t026\ SYN \t027\ ETB \t030\ CAN" -.It "\&031\ EM \t032\ SUB \t033\ ESC \t034\ FS \t035\ GS" -.It "\&036\ RS \t037\ US \t177\ DEL" +.It "\&000\ NUL" Ta "001\ SOH" Ta "002\ STX" Ta "003\ ETX" Ta "004\ EOT" +.It "\&005\ ENQ" Ta "006\ ACK" Ta "007\ BEL" Ta "010\ BS" Ta "011\ HT" +.It "\&012\ NL" Ta "013\ VT" Ta "014\ NP" Ta "015\ CR" Ta "016\ SO" +.It "\&017\ SI" Ta "020\ DLE" Ta "021\ DC1" Ta "022\ DC2" Ta "023\ DC3" +.It "\&024\ DC4" Ta "025\ NAK" Ta "026\ SYN" Ta "027\ ETB" Ta "030\ CAN" +.It "\&031\ EM" Ta "032\ SUB" Ta "033\ ESC" Ta "034\ FS" Ta "035\ GS" +.It "\&036\ RS" Ta "037\ US" Ta "177\ DEL" Ta \& Ta \& .El .Pp The Modified: head/lib/libc/locale/isdigit.3 ============================================================================== --- head/lib/libc/locale/isdigit.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/isdigit.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -56,8 +56,8 @@ The function tests for a decimal digit character. Regardless of locale, this includes the following characters only: .Bl -column \&``0''______ \&``0''______ \&``0''______ \&``0''______ \&``0''______ -.It "\&``0''\t``1''\t``2''\t``3''\t``4''" -.It "\&``5''\t``6''\t``7''\t``8''\t``9''" +.It "\&``0''" Ta "``1''" Ta "``2''" Ta "``3''" Ta "``4''" +.It "\&``5''" Ta "``6''" Ta "``7''" Ta "``8''" Ta "``9''" .El .Pp The Modified: head/lib/libc/locale/isgraph.3 ============================================================================== --- head/lib/libc/locale/isgraph.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/isgraph.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -59,25 +59,25 @@ or the value of In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&041\ ``!'' \t042\ ``""'' \t043\ ``#'' \t044\ ``$'' \t045\ ``%''" -.It "\&046\ ``&'' \t047\ ``''' \t050\ ``('' \t051\ ``)'' \t052\ ``*''" -.It "\&053\ ``+'' \t054\ ``,'' \t055\ ``-'' \t056\ ``.'' \t057\ ``/''" -.It "\&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''" -.It "\&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''" -.It "\&072\ ``:'' \t073\ ``;'' \t074\ ``<'' \t075\ ``='' \t076\ ``>''" -.It "\&077\ ``?'' \t100\ ``@'' \t101\ ``A'' \t102\ ``B'' \t103\ ``C''" -.It "\&104\ ``D'' \t105\ ``E'' \t106\ ``F'' \t107\ ``G'' \t110\ ``H''" -.It "\&111\ ``I'' \t112\ ``J'' \t113\ ``K'' \t114\ ``L'' \t115\ ``M''" -.It "\&116\ ``N'' \t117\ ``O'' \t120\ ``P'' \t121\ ``Q'' \t122\ ``R''" -.It "\&123\ ``S'' \t124\ ``T'' \t125\ ``U'' \t126\ ``V'' \t127\ ``W''" -.It "\&130\ ``X'' \t131\ ``Y'' \t132\ ``Z'' \t133\ ``['' \t134\ ``\e\|''" -.It "\&135\ ``]'' \t136\ ``^'' \t137\ ``_'' \t140\ ```'' \t141\ ``a''" -.It "\&142\ ``b'' \t143\ ``c'' \t144\ ``d'' \t145\ ``e'' \t146\ ``f''" -.It "\&147\ ``g'' \t150\ ``h'' \t151\ ``i'' \t152\ ``j'' \t153\ ``k''" -.It "\&154\ ``l'' \t155\ ``m'' \t156\ ``n'' \t157\ ``o'' \t160\ ``p''" -.It "\&161\ ``q'' \t162\ ``r'' \t163\ ``s'' \t164\ ``t'' \t165\ ``u''" -.It "\&166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y'' \t172\ ``z''" -.It "\&173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''" +.It "\&041\ ``!''" Ta "042\ ``""''" Ta "043\ ``#''" Ta "044\ ``$''" Ta "045\ ``%''" +.It "\&046\ ``&''" Ta "047\ ``'''" Ta "050\ ``(''" Ta "051\ ``)''" Ta "052\ ``*''" +.It "\&053\ ``+''" Ta "054\ ``,''" Ta "055\ ``-''" Ta "056\ ``.''" Ta "057\ ``/''" +.It "\&060\ ``0''" Ta "061\ ``1''" Ta "062\ ``2''" Ta "063\ ``3''" Ta "064\ ``4''" +.It "\&065\ ``5''" Ta "066\ ``6''" Ta "067\ ``7''" Ta "070\ ``8''" Ta "071\ ``9''" +.It "\&072\ ``:''" Ta "073\ ``;''" Ta "074\ ``<''" Ta "075\ ``=''" Ta "076\ ``>''" +.It "\&077\ ``?''" Ta "100\ ``@''" Ta "101\ ``A''" Ta "102\ ``B''" Ta "103\ ``C''" +.It "\&104\ ``D''" Ta "105\ ``E''" Ta "106\ ``F''" Ta "107\ ``G''" Ta "110\ ``H''" +.It "\&111\ ``I''" Ta "112\ ``J''" Ta "113\ ``K''" Ta "114\ ``L''" Ta "115\ ``M''" +.It "\&116\ ``N''" Ta "117\ ``O''" Ta "120\ ``P''" Ta "121\ ``Q''" Ta "122\ ``R''" +.It "\&123\ ``S''" Ta "124\ ``T''" Ta "125\ ``U''" Ta "126\ ``V''" Ta "127\ ``W''" +.It "\&130\ ``X''" Ta "131\ ``Y''" Ta "132\ ``Z''" Ta "133\ ``[''" Ta "134\ ``\e\|''" +.It "\&135\ ``]''" Ta "136\ ``^''" Ta "137\ ``_''" Ta "140\ ```''" Ta "141\ ``a''" +.It "\&142\ ``b''" Ta "143\ ``c''" Ta "144\ ``d''" Ta "145\ ``e''" Ta "146\ ``f''" +.It "\&147\ ``g''" Ta "150\ ``h''" Ta "151\ ``i''" Ta "152\ ``j''" Ta "153\ ``k''" +.It "\&154\ ``l''" Ta "155\ ``m''" Ta "156\ ``n''" Ta "157\ ``o''" Ta "160\ ``p''" +.It "\&161\ ``q''" Ta "162\ ``r''" Ta "163\ ``s''" Ta "164\ ``t''" Ta "165\ ``u''" +.It "\&166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''" Ta "172\ ``z''" +.It "\&173\ ``{''" Ta "174\ ``|''" Ta "175\ ``}''" Ta "176\ ``~''" Ta \& .El .Sh RETURN VALUES The Modified: head/lib/libc/locale/islower.3 ============================================================================== --- head/lib/libc/locale/islower.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/islower.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -56,12 +56,12 @@ or the value of In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d'' \t145\ ``e''" -.It "\&146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i'' \t152\ ``j''" -.It "\&153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n'' \t157\ ``o''" -.It "\&160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s'' \t164\ ``t''" -.It "\&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''" -.It "\&172\ ``z''" +.It "\&141\ ``a''" Ta "142\ ``b''" Ta "143\ ``c''" Ta "144\ ``d''" Ta "145\ ``e''" +.It "\&146\ ``f''" Ta "147\ ``g''" Ta "150\ ``h''" Ta "151\ ``i''" Ta "152\ ``j''" +.It "\&153\ ``k''" Ta "154\ ``l''" Ta "155\ ``m''" Ta "156\ ``n''" Ta "157\ ``o''" +.It "\&160\ ``p''" Ta "161\ ``q''" Ta "162\ ``r''" Ta "163\ ``s''" Ta "164\ ``t''" +.It "\&165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''" +.It "\&172\ ``z''" Ta \& Ta \& Ta \& Ta \& .El .Sh RETURN VALUES The Modified: head/lib/libc/locale/isprint.3 ============================================================================== --- head/lib/libc/locale/isprint.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/isprint.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -57,25 +57,25 @@ or the value of In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&040\ sp \t041\ ``!'' \t042\ ``""'' \t043\ ``#'' \t044\ ``$''" -.It "\&045\ ``%'' \t046\ ``&'' \t047\ ``''' \t050\ ``('' \t051\ ``)''" -.It "\&052\ ``*'' \t053\ ``+'' \t054\ ``,'' \t055\ ``-'' \t056\ ``.''" -.It "\&057\ ``/'' \t060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3''" -.It "\&064\ ``4'' \t065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8''" -.It "\&071\ ``9'' \t072\ ``:'' \t073\ ``;'' \t074\ ``<'' \t075\ ``=''" -.It "\&076\ ``>'' \t077\ ``?'' \t100\ ``@'' \t101\ ``A'' \t102\ ``B''" -.It "\&103\ ``C'' \t104\ ``D'' \t105\ ``E'' \t106\ ``F'' \t107\ ``G''" -.It "\&110\ ``H'' \t111\ ``I'' \t112\ ``J'' \t113\ ``K'' \t114\ ``L''" -.It "\&115\ ``M'' \t116\ ``N'' \t117\ ``O'' \t120\ ``P'' \t121\ ``Q''" -.It "\&122\ ``R'' \t123\ ``S'' \t124\ ``T'' \t125\ ``U'' \t126\ ``V''" -.It "\&127\ ``W'' \t130\ ``X'' \t131\ ``Y'' \t132\ ``Z'' \t133\ ``[''" -.It "\&134\ ``\e\|'' \t135\ ``]'' \t136\ ``^'' \t137\ ``_'' \t140\ ```''" -.It "\&141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d'' \t145\ ``e''" -.It "\&146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i'' \t152\ ``j''" -.It "\&153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n'' \t157\ ``o''" -.It "\&160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s'' \t164\ ``t''" -.It "\&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''" -.It "\&172\ ``z'' \t173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''" +.It "\&040\ sp" Ta "041\ ``!''" Ta "042\ ``""''" Ta "043\ ``#''" Ta "044\ ``$''" +.It "\&045\ ``%''" Ta "046\ ``&''" Ta "047\ ``'''" Ta "050\ ``(''" Ta "051\ ``)''" +.It "\&052\ ``*''" Ta "053\ ``+''" Ta "054\ ``,''" Ta "055\ ``-''" Ta "056\ ``.''" +.It "\&057\ ``/''" Ta "060\ ``0''" Ta "061\ ``1''" Ta "062\ ``2''" Ta "063\ ``3''" +.It "\&064\ ``4''" Ta "065\ ``5''" Ta "066\ ``6''" Ta "067\ ``7''" Ta "070\ ``8''" +.It "\&071\ ``9''" Ta "072\ ``:''" Ta "073\ ``;''" Ta "074\ ``<''" Ta "075\ ``=''" +.It "\&076\ ``>''" Ta "077\ ``?''" Ta "100\ ``@''" Ta "101\ ``A''" Ta "102\ ``B''" +.It "\&103\ ``C''" Ta "104\ ``D''" Ta "105\ ``E''" Ta "106\ ``F''" Ta "107\ ``G''" +.It "\&110\ ``H''" Ta "111\ ``I''" Ta "112\ ``J''" Ta "113\ ``K''" Ta "114\ ``L''" +.It "\&115\ ``M''" Ta "116\ ``N''" Ta "117\ ``O''" Ta "120\ ``P''" Ta "121\ ``Q''" +.It "\&122\ ``R''" Ta "123\ ``S''" Ta "124\ ``T''" Ta "125\ ``U''" Ta "126\ ``V''" +.It "\&127\ ``W''" Ta "130\ ``X''" Ta "131\ ``Y''" Ta "132\ ``Z''" Ta "133\ ``[''" +.It "\&134\ ``\e\|''" Ta "135\ ``]''" Ta "136\ ``^''" Ta "137\ ``_''" Ta "140\ ```''" +.It "\&141\ ``a''" Ta "142\ ``b''" Ta "143\ ``c''" Ta "144\ ``d''" Ta "145\ ``e''" +.It "\&146\ ``f''" Ta "147\ ``g''" Ta "150\ ``h''" Ta "151\ ``i''" Ta "152\ ``j''" +.It "\&153\ ``k''" Ta "154\ ``l''" Ta "155\ ``m''" Ta "156\ ``n''" Ta "157\ ``o''" +.It "\&160\ ``p''" Ta "161\ ``q''" Ta "162\ ``r''" Ta "163\ ``s''" Ta "164\ ``t''" +.It "\&165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''" +.It "\&172\ ``z''" Ta "173\ ``{''" Ta "174\ ``|''" Ta "175\ ``}''" Ta "176\ ``~''" .El .Sh RETURN VALUES The Modified: head/lib/libc/locale/ispunct.3 ============================================================================== --- head/lib/libc/locale/ispunct.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/ispunct.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -61,13 +61,13 @@ or the value of In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&041\ ``!'' \t042\ ``""'' \t043\ ``#'' \t044\ ``$'' \t045\ ``%''" -.It "\&046\ ``&'' \t047\ ``''' \t050\ ``('' \t051\ ``)'' \t052\ ``*''" -.It "\&053\ ``+'' \t054\ ``,'' \t055\ ``-'' \t056\ ``.'' \t057\ ``/''" -.It "\&072\ ``:'' \t073\ ``;'' \t074\ ``<'' \t075\ ``='' \t076\ ``>''" -.It "\&077\ ``?'' \t100\ ``@'' \t133\ ``['' \t134\ ``\e\|'' \t135\ ``]''" -.It "\&136\ ``^'' \t137\ ``_'' \t140\ ```'' \t173\ ``{'' \t174\ ``|''" -.It "\&175\ ``}'' \t176\ ``~''" +.It "\&041\ ``!''" Ta "042\ ``""''" Ta "043\ ``#''" Ta "044\ ``$''" Ta "045\ ``%''" +.It "\&046\ ``&''" Ta "047\ ``'''" Ta "050\ ``(''" Ta "051\ ``)''" Ta "052\ ``*''" +.It "\&053\ ``+''" Ta "054\ ``,''" Ta "055\ ``-''" Ta "056\ ``.''" Ta "057\ ``/''" +.It "\&072\ ``:''" Ta "073\ ``;''" Ta "074\ ``<''" Ta "075\ ``=''" Ta "076\ ``>''" +.It "\&077\ ``?''" Ta "100\ ``@''" Ta "133\ ``[''" Ta "134\ ``\e\|''" Ta "135\ ``]''" +.It "\&136\ ``^''" Ta "137\ ``_''" Ta "140\ ```''" Ta "173\ ``{''" Ta "174\ ``|''" +.It "\&175\ ``}''" Ta "176\ ``~''" Ta \& Ta \& Ta \& .El .Sh RETURN VALUES The Modified: head/lib/libc/locale/isspace.3 ============================================================================== --- head/lib/libc/locale/isspace.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/isspace.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -50,7 +50,7 @@ The function tests for white-space characters. For any locale, this includes the following standard characters: .Bl -column \&`\et''___ \&``\et''___ \&``\et''___ \&``\et''___ \&``\et''___ \&``\et''___ -.It "\&``\et''\t``\en''\t``\ev''\t``\ef''\t``\er''\t`` ''" +.It "\&``\et''" Ta "``\en''" Ta "``\ev''" Ta "``\ef''" Ta "``\er''" Ta "`` ''" .El .Pp In the "C" locale, Modified: head/lib/libc/locale/isupper.3 ============================================================================== --- head/lib/libc/locale/isupper.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/isupper.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -56,12 +56,12 @@ or the value of In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''" -.It "\&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''" -.It "\&113\ ``K'' \t114\ ``L'' \t115\ ``M'' \t116\ ``N'' \t117\ ``O''" -.It "\&120\ ``P'' \t121\ ``Q'' \t122\ ``R'' \t123\ ``S'' \t124\ ``T''" -.It "\&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''" -.It "\&132\ ``Z''" +.It "\&101\ ``A''" Ta "102\ ``B''" Ta "103\ ``C''" Ta "104\ ``D''" Ta "105\ ``E''" +.It "\&106\ ``F''" Ta "107\ ``G''" Ta "110\ ``H''" Ta "111\ ``I''" Ta "112\ ``J''" +.It "\&113\ ``K''" Ta "114\ ``L''" Ta "115\ ``M''" Ta "116\ ``N''" Ta "117\ ``O''" +.It "\&120\ ``P''" Ta "121\ ``Q''" Ta "122\ ``R''" Ta "123\ ``S''" Ta "124\ ``T''" +.It "\&125\ ``U''" Ta "126\ ``V''" Ta "127\ ``W''" Ta "130\ ``X''" Ta "131\ ``Y''" +.It "\&132\ ``Z''" Ta \& Ta \& Ta \& Ta \& .El .Sh RETURN VALUES The Modified: head/lib/libc/locale/isxdigit.3 ============================================================================== --- head/lib/libc/locale/isxdigit.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/libc/locale/isxdigit.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -52,11 +52,11 @@ The function tests for any hexadecimal-digit character. Regardless of locale, this includes the following characters only: .Bl -column \&``0''______ \&``0''______ \&``0''______ \&``0''______ \&``0''______ -.It "\&``0''\t``1''\t``2''\t``3''\t``4''" -.It "\&``5''\t``6''\t``7''\t``8''\t``9''" -.It "\&``A''\t``B''\t``C''\t``D''\t``E''" -.It "\&``F''\t``a''\t``b''\t``c''\t``d''" -.It "\&``e''\t``f''" +.It "\&``0''" Ta "``1''" Ta "``2''" Ta "``3''" Ta "``4''" +.It "\&``5''" Ta "``6''" Ta "``7''" Ta "``8''" Ta "``9''" +.It "\&``A''" Ta "``B''" Ta "``C''" Ta "``D''" Ta "``E''" +.It "\&``F''" Ta "``a''" Ta "``b''" Ta "``c''" Ta "``d''" +.It "\&``e''" Ta "``f''" Ta \& Ta \& Ta \& .El .Pp The Modified: head/lib/msun/man/csqrt.3 ============================================================================== --- head/lib/msun/man/csqrt.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/lib/msun/man/csqrt.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -66,14 +66,14 @@ the same sign. For infinities and \*(Nas, the following rules apply, with the earlier rules having precedence: .Bl -column -offset indent "-\*(If + \*(Na*I" "\*(If \*(Pm \*(If*I " "(for all k)" -.Em Input Result +.Em "Input" Ta Em "Result" Ta \& k + \*(If*I \*(If + \*(If*I (for all k) --\*(If + \*(Na*I \*(Na \*(Pm \*(If*I -\*(If + \*(Na*I \*(If + \*(Na*I -k + \*(Na*I \*(Na + \*(Na*I -\*(Na + k*I \*(Na + \*(Na*I --\*(If + k*I +0 + \*(If*I -\*(If + k*I \*(If + 0*I +-\*(If + \*(Na*I \*(Na \*(Pm \*(If*I \& +\*(If + \*(Na*I \*(If + \*(Na*I \& +k + \*(Na*I \*(Na + \*(Na*I \& +\*(Na + k*I \*(Na + \*(Na*I \& +-\*(If + k*I +0 + \*(If*I \& +\*(If + k*I \*(If + 0*I \& .El .Pp For numbers with negative imaginary parts, the above special cases Modified: head/sbin/sunlabel/sunlabel.8 ============================================================================== --- head/sbin/sunlabel/sunlabel.8 Sat Apr 7 06:56:38 2012 (r233991) +++ head/sbin/sunlabel/sunlabel.8 Sat Apr 7 09:05:30 2012 (r233992) @@ -318,15 +318,15 @@ VTOC tag name, and a flag description. The following VTOC tag names are known: .Bl -column -offset indent ".Li unassigned" ".Sy value" ".Sy comment" .It Sy name Ta Sy value Ta Sy comment -.It Li unassigned Ta No 0x00 -.It Li boot Ta No 0x01 -.It Li root Ta No 0x02 -.It Li swap Ta No 0x03 -.It Li usr Ta No 0x04 +.It Li unassigned Ta No 0x00 Ta \& +.It Li boot Ta No 0x01 Ta \& +.It Li root Ta No 0x02 Ta \& +.It Li swap Ta No 0x03 Ta \& +.It Li usr Ta No 0x04 Ta \& .It Li backup Ta No 0x05 Ta c partition, entire disk -.It Li stand Ta No 0x06 -.It Li var Ta No 0x07 -.It Li home Ta No 0x08 +.It Li stand Ta No 0x06 Ta \& +.It Li var Ta No 0x07 Ta \& +.It Li home Ta No 0x08 Ta \& .It Li altsctr Ta No 0x09 Ta alternate sector partition .It Li cache Ta No 0x0a Ta Solaris cachefs partition .It Li VxVM_pub Ta No 0x0e Ta VxVM public region Modified: head/share/man/man3/tgmath.3 ============================================================================== --- head/share/man/man3/tgmath.3 Sat Apr 7 06:56:38 2012 (r233991) +++ head/share/man/man3/tgmath.3 Sat Apr 7 09:05:30 2012 (r233992) @@ -116,8 +116,8 @@ complex value to a generic argument invo .It Fn erfc Ta Fn hypot Ta Fn lrint Ta Fn scalbln .It Fn exp2 Ta Fn ilogb Ta Fn lround Ta Fn tgamma .It Fn expm1 Ta Fn ldexp Ta Fn nextbyint Ta Fn trunc -.It Fn fdim Ta Fn lgamma Ta Fn nextafter -.It Fn floor Ta Fn llrint Ta Fn nexttoward +.It Fn fdim Ta Fn lgamma Ta Fn nextafter Ta \& +.It Fn floor Ta Fn llrint Ta Fn nexttoward Ta \& .El .Pp The following macros always expand to a complex function: Modified: head/share/man/man4/adv.4 ============================================================================== --- head/share/man/man4/adv.4 Sat Apr 7 06:56:38 2012 (r233991) +++ head/share/man/man4/adv.4 Sat Apr 7 09:05:30 2012 (r233992) @@ -67,24 +67,23 @@ The following tables list the AdvanSys p their bus attachment type, maximum sync rate, and the maximum number of commands that can be handled by the adapter concurrently. .Bd -ragged -offset indent -.Bl -column "ABP510/5150 " "ISA PnP " "Yes " "10MHz " "Commands " Footnotes Connectivity Products: -.Pp -.Em "Adapter Bus Floppy MaxSync Commands Footnotes" -ABP510/5150 ISA No 10MHz 240 1 -ABP5140 ISA PnP No 10MHz 16 1, 3 -ABP5142 ISA PnP Yes 10MHz 16 4 -ABP[3]902 PCI No 10MHz 16 -ABP3905 PCI No 10MHz 16 -ABP915 PCI No 10MHz 16 -ABP920 PCI No 10MHz 16 -ABP3922 PCI No 10MHz 16 -ABP3925 PCI No 10MHz 16 -ABP930 PCI No 10MHz 16 5 -ABP930U PCI No 20MHz 16 -ABP930UA PCI No 20MHz 16 -ABP960 PCI No 10MHz 16 -ABP960U PCI No 20MHz 16 +.Bl -column "ABP510/5150 " "ISA PnP " "Floppy " "MaxSync " "Commands " "Footnotes " +.Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands" Ta Em "Footnotes" +.It "ABP510/5150" Ta "ISA" Ta "\&No" Ta "10MHz" Ta "240" Ta "1" +.It "ABP5140" Ta "ISA PnP" Ta "\&No" Ta "10MHz" Ta "16" Ta "1, 3" +.It "ABP5142" Ta "ISA PnP" Ta "Yes" Ta "10MHz" Ta "16" Ta "4" +.It "ABP[3]902" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" +.It "ABP3905" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" +.It "ABP915" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" +.It "ABP920" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" +.It "ABP3922" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" +.It "ABP3925" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" +.It "ABP930" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "5" +.It "ABP930U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta "" +.It "ABP930UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta "" +.It "ABP960" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "" +.It "ABP960U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta "" .El .Pp Footnotes: @@ -104,32 +103,30 @@ This board has been sold by SIIG as the .El .Ed .Bd -ragged -offset indent -.Bl -column "ABP510/5150 " "ISA PnP " "Yes " "10MHz " Commands Single Channel Products: -.Pp -.Em "Adapter Bus Floppy MaxSync Commands" -ABP542 ISA Yes 10MHz 240 -ABP742 EISA Yes 10MHz 240 -ABP842 VL Yes 10MHz 240 -ABP940 PCI No 10MHz 240 -ABP[3]940UA PCI No 20MHz 240 -ABP940U PCI No 20MHz 240 -ABP3960UA PCI No 20MHz 240 -ABP970 PCI No 10MHz 240 -ABP970U PCI No 20MHz 240 +.Bl -column "ABPX3X940UA " "EISA " "Floppy " "MaxSync " "Commands" +.Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands" +.It "ABP542" Ta "ISA" Ta "Yes" Ta "10MHz" Ta "240" +.It "ABP742" Ta "EISA" Ta "Yes" Ta "10MHz" Ta "240" +.It "ABP842" Ta "VL" Ta "Yes" Ta "10MHz" Ta "240" +.It "ABP940" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240" +.It "ABP[3]940UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" +.It "ABP940U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" +.It "ABP3960UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" +.It "ABP970" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240" +.It "ABP970U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" .El .Ed .Bd -ragged -offset indent -.Bl -column "ABP510/5150 " "ISA PnP " "Yes " "10MHz " "Commands " "Channels " Multi Channel Products (Commands are per-channel): -.Pp -.Em "Adapter Bus Floppy MaxSync Commands Channels" -ABP752 EISA Yes 10MHz 240 2 -ABP852 VL Yes 10MHz 240 2 -ABP950 PCI No 10MHz 240 2 -ABP980 PCI No 10MHz 240 4 -ABP980U PCI No 20MHz 240 4 -ABP[3]980UA PCI No 20MHz 16 4 +.Bl -column "ABPX3X980UA " "EISA " "Floppy " "MaxSync " "Commands " "Channels" +.Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands" Ta Em "Channels" +.It "ABP752" Ta "EISA" Ta "Yes" Ta "10MHz" Ta "240" Ta "2" +.It "ABP852" Ta "VL" Ta "Yes" Ta "10MHz" Ta "240" Ta "2" +.It "ABP950" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240" Ta "2" +.It "ABP980" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240" Ta "4" +.It "ABP980U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" Ta "4" +.It "ABP[3]980UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta "4" .El .Ed .Pp Modified: head/share/man/man4/bt.4 ============================================================================== --- head/share/man/man4/bt.4 Sat Apr 7 06:56:38 2012 (r233991) +++ head/share/man/man4/bt.4 Sat Apr 7 09:05:30 2012 (r233992) @@ -51,48 +51,47 @@ This driver provides access to the .Tn SCSI bus connected to a Buslogic/Mylex MultiMaster or compatible controller: .Bd -ragged -offset indent -.Bl -column "BT-956CD " "ISA " "Commands " Description MultiMaster "W" Series Host Adapters: -.Pp -.Em "Adapter Bus Commands Description" -BT-948 PCI 192 Ultra SCSI-3 -BT-958 PCI 192 Wide Ultra SCSI-3 -BT-958D PCI 192 Wide Differential Ultra SCSI-3 +.Bl -column "BT-956CD " "ISA " "Commands " "Description" +.Em "Adapter" Ta Em "Bus" Ta Em "Commands" Ta Em "Description" +BT-948 PCI 192 Ultra SCSI-3 +BT-958 PCI 192 Wide Ultra SCSI-3 +BT-958D PCI 192 Wide Differential Ultra SCSI-3 .El -.Bl -column "BT-956CD " "ISA " "Commands " Description -MultiMaster "C" Series Host Adapters: .Pp -.Em "Adapter Bus Commands Description" -BT-946C PCI 100 Fast SCSI-2 -BT-956C PCI 100 Wide Fast SCSI-2 -BT-956CD PCI 100 Wide Differential Fast SCSI-2 -BT-445C VLB 100 Fast SCSI-2 -BT-747C EISA 100 Fast SCSI-2 -BT-757C EISA 100 Wide Fast SCSI-2 -BT-757CD EISA 100 Wide Differential Fast SCSI-2 -BT-545C ISA 50 Fast SCSI-2 -BT-540CF ISA 50 Fast SCSI-2 +MultiMaster "C" Series Host Adapters: +.Bl -column "BT-956CD " "ISA " "Commands " "Description" +.Em "Adapter" Ta Em "Bus" Ta Em "Commands" Ta Em "Description" +BT-946C PCI 100 Fast SCSI-2 +BT-956C PCI 100 Wide Fast SCSI-2 +BT-956CD PCI 100 Wide Differential Fast SCSI-2 +BT-445C VLB 100 Fast SCSI-2 +BT-747C EISA 100 Fast SCSI-2 +BT-757C EISA 100 Wide Fast SCSI-2 +BT-757CD EISA 100 Wide Differential Fast SCSI-2 +BT-545C ISA 50 Fast SCSI-2 +BT-540CF ISA 50 Fast SCSI-2 .El -.Bl -column "BT-956CD " "ISA " "Commands " Description -MultiMaster "S" Series Host Adapters: .Pp -.Em "Adapter Bus Commands Description" -BT-445S VLB 30 Fast SCSI-2 -BT-747S EISA 30 Fast SCSI-2 -BT-747D EISA 30 Differential Fast SCSI-2 -BT-757S EISA 30 Wide Fast SCSI-2 -BT-757D EISA 30 Wide Differential Fast SCSI-2 -BT-545S ISA 30 Fast SCSI-2 -BT-542D ISA 30 Differential Fast SCSI-2 -BT-742A EISA 30 SCSI-2 (742A revision H) -BT-542B ISA 30 SCSI-2 (542B revision H) +MultiMaster "S" Series Host Adapters: +.Bl -column "BT-956CD " "ISA " "Commands " "Description" +.Em "Adapter" Ta Em "Bus" Ta Em "Commands" Ta Em "Description" +BT-445S VLB 30 Fast SCSI-2 +BT-747S EISA 30 Fast SCSI-2 +BT-747D EISA 30 Differential Fast SCSI-2 +BT-757S EISA 30 Wide Fast SCSI-2 +BT-757D EISA 30 Wide Differential Fast SCSI-2 +BT-545S ISA 30 Fast SCSI-2 +BT-542D ISA 30 Differential Fast SCSI-2 +BT-742A EISA 30 SCSI-2 (742A revision H) +BT-542B ISA 30 SCSI-2 (542B revision H) .El -.Bl -column "BT-956CD " "ISA " "Commands " Description -MultiMaster "A" Series Host Adapters: .Pp -.Em "Adapter Bus Commands Description" -BT-742A EISA 30 SCSI-2 (742A revisions A - G) -BT-542B ISA 30 SCSI-2 (542B revisions A - G) +MultiMaster "A" Series Host Adapters: +.Bl -column "BT-956CD " "ISA " "Commands " "Description" +.Em "Adapter" Ta Em "Bus" Ta Em "Commands" Ta Em "Description" +BT-742A EISA 30 SCSI-2 (742A revisions A - G) +BT-542B ISA 30 SCSI-2 (542B revisions A - G) .El .Ed .Pp Modified: head/share/man/man4/bwi.4 ============================================================================== --- head/share/man/man4/bwi.4 Sat Apr 7 06:56:38 2012 (r233991) +++ head/share/man/man4/bwi.4 Sat Apr 7 09:05:30 2012 (r233992) @@ -72,16 +72,15 @@ will work. The .Nm driver supports Broadcom BCM43xx based wireless devices, including: -.Pp -.Bl -column -compact "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" -offset 6n -.It Em "Card Chip Bus Standard" +.Bl -column "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" -offset 6n +.It Em "Card" Ta Em "Chip" Ta Em "Bus" Ta Em "Standard" .It "Apple Airport Extreme BCM4306 PCI b/g" .It "Apple Airport Extreme BCM4318 PCI b/g" .It "ASUS WL-138g BCM4318 PCI b/g" .It "Buffalo WLI-CB-G54S BCM4318 CardBus b/g" .It "Buffalo WLI-PCI-G54S BCM4306 PCI b/g" .It "Compaq R4035 onboard BCM4306 PCI b/g" -.It "Dell Wireless 1390 BCM4311 Mini PCI b/g" +.It "Dell Wireless 1390 BCM4311 Mini PCI b/g" .It "Dell Wireless 1470 BCM4318 Mini PCI b/g" .It "Dell Truemobile 1300 r2 BCM4306 Mini PCI b/g" .It "Dell Truemobile 1400 BCM4309 Mini PCI b/g" Modified: head/share/man/man4/bwn.4 ============================================================================== --- head/share/man/man4/bwn.4 Sat Apr 7 06:56:38 2012 (r233991) +++ head/share/man/man4/bwn.4 Sat Apr 7 09:05:30 2012 (r233992) @@ -75,13 +75,12 @@ LP (low power) PHY user please uses bwn_ The .Nm driver supports Broadcom BCM43xx based wireless devices, including: -.Pp -.Bl -column -compact "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" -offset 6n -.It Em "Card Chip Bus Standard" +.Bl -column "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" +.It Em "Card" Ta Em "Chip" Ta Em "Bus" Ta Em "Standard" .It "Apple Airport Extreme BCM4318 PCI b/g" .It "ASUS WL-138g BCM4318 PCI b/g" .It "Buffalo WLI-CB-G54S BCM4318 CardBus b/g" -.It "Dell Wireless 1390 BCM4311 Mini PCI b/g" +.It "Dell Wireless 1390 BCM4311 Mini PCI b/g" .It "Dell Wireless 1470 BCM4318 Mini PCI b/g" .It "Dell Truemobile 1400 BCM4309 Mini PCI b/g" .It "HP Compaq 6715b BCM4312 PCI b/g" Modified: head/share/man/man4/malo.4 ============================================================================== --- head/share/man/man4/malo.4 Sat Apr 7 06:56:38 2012 (r233991) +++ head/share/man/man4/malo.4 Sat Apr 7 09:05:30 2012 (r233992) @@ -88,12 +88,11 @@ directory. The following cards are among those supported by the .Nm driver: -.Pp -.Bl -column -compact "Microcom Travelcard" "MALO111" "CardBus" "a/b/g" -offset 6n -.Em "Card Chip Bus Standard" -Netgear WG311v3 88W8335 PCI b/g -Tenda TWL542P 88W8335 PCI b/g -U-Khan UW-2054i 88W8335 PCI b/g +.Bl -column "Netgear WG311v3" "88W8335" "PCI" "b/g" +.Em "Card" Ta Em "Chip" Ta Em "Bus" Ta Em "Standard" +.It "Netgear WG311v3" Ta "88W8335" Ta "PCI" Ta "b/g" +.It "Tenda TWL542P" Ta "88W8335" Ta "PCI" Ta "b/g" +.It "U-Khan UW-2054i" Ta "88W8335" Ta "PCI" Ta "b/g" .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): Modified: head/share/man/man4/man4.i386/apm.4 ============================================================================== --- head/share/man/man4/man4.i386/apm.4 Sat Apr 7 06:56:38 2012 (r233991) +++ head/share/man/man4/man4.i386/apm.4 Sat Apr 7 09:05:30 2012 (r233992) @@ -104,17 +104,17 @@ These interfaces are used by .It .Nm polls APM events and handles the following events. -.Bl -column PMEV_POWERSTATECHANGEXXX "suspend system xxxxx" -.It Sy "Name " "Action " "Description" -.It Dv "PMEV_STANDBYREQ " No "suspend system " "standby request" -.It Dv "PMEV_SUSPENDREQ " No "suspend system " "suspend request" -.It Dv "PMEV_USERSUSPENDREQ " No "suspend system " "user suspend request" -.It Dv "PMEV_CRITSUSPEND " No "suspend system " "critical suspend request" -.It Dv "PMEV_NORMRESUME " No "resume system " "normal resume" -.It Dv "PMEV_CRITRESUME " No "resume system " "critical resume" -.It Dv "PMEV_STANDBYRESUME " No "resume system " "standby resume" -.It Dv "PMEV_BATTERYLOW " No "notify message " "battery low" -.It Dv "PMEV_UPDATETIME " No "adjust clock " "update time" +.Bl -column "xxxxxxxxxxxxxxxxx" "xxxxxxxxxxxxx" "xxxxxxxx" +.It Sy "Name" Ta Sy "Action" Ta Sy "Description" +.It Dv "PMEV_STANDBYREQ" Ta No "suspend system" Ta "standby request" +.It Dv "PMEV_SUSPENDREQ" Ta No "suspend system" Ta "suspend request" +.It Dv "PMEV_USERSUSPENDREQ" Ta No "suspend system" Ta "user suspend request" +.It Dv "PMEV_CRITSUSPEND" Ta No "suspend system" Ta "critical suspend request" +.It Dv "PMEV_NORMRESUME" Ta No "resume system" Ta "normal resume" +.It Dv "PMEV_CRITRESUME" Ta No "resume system" Ta "critical resume" +.It Dv "PMEV_STANDBYRESUME" Ta No "resume system" Ta "standby resume" +.It Dv "PMEV_BATTERYLOW" Ta No "notify message" Ta "battery low" +.It Dv "PMEV_UPDATETIME" Ta No "adjust clock" Ta "update time" .El .El .Sh SEE ALSO Modified: head/share/man/man4/uath.4 ============================================================================== --- head/share/man/man4/uath.4 Sat Apr 7 06:56:38 2012 (r233991) +++ head/share/man/man4/uath.4 Sat Apr 7 09:05:30 2012 (r233992) @@ -83,9 +83,8 @@ This firmware is licensed for general us The .Nm driver should work with the following adapters: -.Pp -.Bl -column -compact "TRENDware International TEW-444UB" "AR5005UX" -offset 6n -.It Em "Adapter Chipset" +.Bl -column "TRENDware International TEW-444UB" "AR5005UX" +.It Em "Adapter" Ta Em "Chipset" .\".It Belkin F6D3050 AR5005UX .It Li "Compex WLU108AG" Ta AR5005UX .It Li "Compex WLU108G" Ta AR5005UG Modified: head/usr.bin/hexdump/hexdump.1 ============================================================================== --- head/usr.bin/hexdump/hexdump.1 Sat Apr 7 06:56:38 2012 (r233991) +++ head/usr.bin/hexdump/hexdump.1 Sat Apr 7 09:05:30 2012 (r233992) @@ -248,13 +248,13 @@ characters, with the exception that cont displayed using the following, lower-case, names. Characters greater than 0xff, hexadecimal, are displayed as hexadecimal strings. -.Bl -column \&000_nu \&001_so \&002_st \&003_et \&004_eo -.It "\&000\ NUL\t001\ SOH\t002\ STX\t003\ ETX\t004\ EOT\t005\ ENQ" -.It "\&006\ ACK\t007\ BEL\t008\ BS\t009\ HT\t00A\ LF\t00B\ VT" -.It "\&00C\ FF\t00D\ CR\t00E\ SO\t00F\ SI\t010\ DLE\t011\ DC1" -.It "\&012\ DC2\t013\ DC3\t014\ DC4\t015\ NAK\t016\ SYN\t017\ ETB" -.It "\&018\ CAN\t019\ EM\t01A\ SUB\t01B\ ESC\t01C\ FS\t01D\ GS" -.It "\&01E\ RS\t01F\ US\t07F\ DEL" +.Bl -column 000_nu 001_so 002_st 003_et 004_eo +.It "000 NUL" Ta "001 SOH" Ta "002 STX" Ta "003 ETX" Ta "004 EOT" Ta "005 ENQ" +.It "006 ACK" Ta "007 BEL" Ta "008 BS" Ta "009 HT" Ta "00A LF" Ta "00B VT" +.It "00C FF" Ta "00D CR" Ta "00E\ SO" Ta "00F SI" Ta "010 DLE" Ta "011 DC1" +.It "012 DC2" Ta "013 DC3" Ta "014 DC4" Ta "015\ NAK" Ta "016 SYN" Ta "017 ETB" +.It "018 CAN" Ta "019 EM" Ta "01A SUB" Ta "01B ESC" Ta "01C FS" Ta "01D GS" +.It "01E RS" Ta "01F US" Ta "07F DEL" Ta \& Ta \& Ta \& .El .El .Pp Modified: head/usr.bin/hexdump/od.1 ============================================================================== --- head/usr.bin/hexdump/od.1 Sat Apr 7 06:56:38 2012 (r233991) +++ head/usr.bin/hexdump/od.1 Sat Apr 7 09:05:30 2012 (r233992) @@ -151,7 +151,7 @@ Control characters are displayed using t .It "00C FF 00D CR 00E SO 00F SI 010 DLE 011 DC1" .It "012 DC2 013 DC3 014 DC4 015 NAK 016 SYN 017 ETB" .It "018 CAN 019 EM 01A SUB 01B ESC 01C FS 01D GS" -.It "01E RS 01F US 020 SP 07F DEL" +.It "01E RS 01F US 020 SP 07F DEL \& \&" .El .It Cm c Characters in the default character set. Modified: head/usr.sbin/lmcconfig/lmcconfig.8 ============================================================================== --- head/usr.sbin/lmcconfig/lmcconfig.8 Sat Apr 7 06:56:38 2012 (r233991) +++ head/usr.sbin/lmcconfig/lmcconfig.8 Sat Apr 7 09:05:30 2012 (r233992) @@ -186,7 +186,7 @@ Set loopback mode to .Ar number . .Pp .Bl -column "99" "payload" "inward thru drvrs/rcvrsxxx" "HSSI, SSI" -offset 1m -compact -.It "1" Ta "none" Ta "default" +.It "1" Ta "none" Ta "default" Ta \& .It "2" Ta "payload" Ta "outward thru framer" Ta "T1E1. T3" .It "3" Ta "line" Ta "outward thru line if" Ta "T1E1, T3, HSSIc" .It "4" Ta "other" Ta "inward thru line if" Ta "T1E1, T3" @@ -443,7 +443,7 @@ Set transmit line build-out to .It " 16" Ta "7.5 dB" Ta "FCC option B" .It " 32" Ta "15 dB" Ta "FCC option C" .It " 48" Ta "22.5 dB" Ta "final span" -.It "255" Ta "auto-set based on cable length (default)" +.It "255" Ta "auto-set based on cable length (default)" Ta \& .El .Pp This is only applicable if the pulse shape is T1-CSU. From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 09:11:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE516106566B; Sat, 7 Apr 2012 09:11:07 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA6DE8FC0A; Sat, 7 Apr 2012 09:11:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q379B7wP052961; Sat, 7 Apr 2012 09:11:07 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q379B7ek052959; Sat, 7 Apr 2012 09:11:07 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201204070911.q379B7ek052959@svn.freebsd.org> From: Joel Dahl Date: Sat, 7 Apr 2012 09:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233993 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 09:11:08 -0000 Author: joel (doc committer) Date: Sat Apr 7 09:11:07 2012 New Revision: 233993 URL: http://svn.freebsd.org/changeset/base/233993 Log: Remove end of line whitespace introduced in previous commit. Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Sat Apr 7 09:05:30 2012 (r233992) +++ head/sbin/ifconfig/ifconfig.8 Sat Apr 7 09:11:07 2012 (r233993) @@ -2397,7 +2397,7 @@ Set the maximum number of updates for a can be collapsed into one. This is an 8-bit number; the default value is 128. .It Cm defer -Defer transmission of the first packet in a state until a peer has +Defer transmission of the first packet in a state until a peer has acknowledged that the associated state has been inserted. .It Fl defer Do not defer the first packet in a state. From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 09:26:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 863BE1065674; Sat, 7 Apr 2012 09:26:22 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7197F8FC0C; Sat, 7 Apr 2012 09:26:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q379QMrc053514; Sat, 7 Apr 2012 09:26:22 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q379QMS1053512; Sat, 7 Apr 2012 09:26:22 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201204070926.q379QMS1053512@svn.freebsd.org> From: Joel Dahl Date: Sat, 7 Apr 2012 09:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233994 - head/lib/libc/locale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 09:26:22 -0000 Author: joel (doc committer) Date: Sat Apr 7 09:26:21 2012 New Revision: 233994 URL: http://svn.freebsd.org/changeset/base/233994 Log: mdoc: fix function type. Modified: head/lib/libc/locale/newlocale.3 Modified: head/lib/libc/locale/newlocale.3 ============================================================================== --- head/lib/libc/locale/newlocale.3 Sat Apr 7 09:11:07 2012 (r233993) +++ head/lib/libc/locale/newlocale.3 Sat Apr 7 09:26:21 2012 (r233994) @@ -36,7 +36,7 @@ .Lb libc .Sh SYNOPSIS .In xlocale -.Ft +.Ft locale_t .Fn newlocale "int mask" "const char * locale" "locale_t base" .Sh DESCRIPTION Creates a new locale, inheriting some properties from an existing locale. From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 15:23:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 794D5106566C; Sat, 7 Apr 2012 15:23:52 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 638488FC08; Sat, 7 Apr 2012 15:23:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q37FNq2l067633; Sat, 7 Apr 2012 15:23:52 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37FNqxN067629; Sat, 7 Apr 2012 15:23:52 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201204071523.q37FNqxN067629@svn.freebsd.org> From: Gleb Kurtsou Date: Sat, 7 Apr 2012 15:23:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233998 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 15:23:52 -0000 Author: gleb Date: Sat Apr 7 15:23:51 2012 New Revision: 233998 URL: http://svn.freebsd.org/changeset/base/233998 Log: Add reserved memory limit sysctl to tmpfs. Cleanup availble and used memory functions. Check if free pages available before allocating new node. Discussed with: delphij Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Sat Apr 7 12:47:12 2012 (r233997) +++ head/sys/fs/tmpfs/tmpfs.h Sat Apr 7 15:23:51 2012 (r233998) @@ -337,11 +337,10 @@ struct tmpfs_mount { * system, set during mount time. This variable must never be * used directly as it may be bigger than the current amount of * free memory; in the extreme case, it will hold the SIZE_MAX - * value. Instead, use the TMPFS_PAGES_MAX macro. */ + * value. */ size_t tm_pages_max; - /* Number of pages in use by the file system. Cannot be bigger - * than the value returned by TMPFS_PAGES_MAX in any case. */ + /* Number of pages in use by the file system. */ size_t tm_pages_used; /* Pointer to the node representing the root directory of this @@ -486,57 +485,15 @@ int tmpfs_truncate(struct vnode *, off_t * Memory management stuff. */ -/* Amount of memory pages to reserve for the system (e.g., to not use by - * tmpfs). - * XXX: Should this be tunable through sysctl, for instance? */ -#define TMPFS_PAGES_RESERVED (4 * 1024 * 1024 / PAGE_SIZE) - /* - * Returns information about the number of available memory pages, - * including physical and virtual ones. - * - * Remember to remove TMPFS_PAGES_RESERVED from the returned value to avoid - * excessive memory usage. - * + * Amount of memory pages to reserve for the system (e.g., to not use by + * tmpfs). */ -static __inline size_t -tmpfs_mem_info(void) -{ - - return (swap_pager_avail + cnt.v_free_count + cnt.v_cache_count); -} - -/* Returns the maximum size allowed for a tmpfs file system. This macro - * must be used instead of directly retrieving the value from tm_pages_max. - * The reason is that the size of a tmpfs file system is dynamic: it lets - * the user store files as long as there is enough free memory (including - * physical memory and swap space). Therefore, the amount of memory to be - * used is either the limit imposed by the user during mount time or the - * amount of available memory, whichever is lower. To avoid consuming all - * the memory for a given mount point, the system will always reserve a - * minimum of TMPFS_PAGES_RESERVED pages, which is also taken into account - * by this macro (see above). */ -static __inline size_t -TMPFS_PAGES_MAX(struct tmpfs_mount *tmp) -{ - size_t freepages; +#define TMPFS_PAGES_MINRESERVED (4 * 1024 * 1024 / PAGE_SIZE) - freepages = tmpfs_mem_info(); - freepages -= freepages < TMPFS_PAGES_RESERVED ? - freepages : TMPFS_PAGES_RESERVED; - - return MIN(tmp->tm_pages_max, freepages + tmp->tm_pages_used); -} +size_t tmpfs_mem_avail(void); -/* Returns the available space for the given file system. */ -#define TMPFS_META_PAGES(tmp) (howmany((tmp)->tm_nodes_inuse * (sizeof(struct tmpfs_node) \ - + sizeof(struct tmpfs_dirent)), PAGE_SIZE)) -#define TMPFS_FILE_PAGES(tmp) ((tmp)->tm_pages_used) - -#define TMPFS_PAGES_AVAIL(tmp) (TMPFS_PAGES_MAX(tmp) > \ - TMPFS_META_PAGES(tmp)+TMPFS_FILE_PAGES(tmp)? \ - TMPFS_PAGES_MAX(tmp) - TMPFS_META_PAGES(tmp) \ - - TMPFS_FILE_PAGES(tmp):0) +size_t tmpfs_pages_used(struct tmpfs_mount *tmp); #endif Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Sat Apr 7 12:47:12 2012 (r233997) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sat Apr 7 15:23:51 2012 (r233998) @@ -59,6 +59,69 @@ __FBSDID("$FreeBSD$"); SYSCTL_NODE(_vfs, OID_AUTO, tmpfs, CTLFLAG_RW, 0, "tmpfs file system"); +static long tmpfs_pages_reserved = TMPFS_PAGES_MINRESERVED; + +static int +sysctl_mem_reserved(SYSCTL_HANDLER_ARGS) +{ + int error; + long pages, bytes; + + pages = *(long *)arg1; + bytes = pages * PAGE_SIZE; + + error = sysctl_handle_long(oidp, &bytes, 0, req); + if (error || !req->newptr) + return (error); + + pages = bytes / PAGE_SIZE; + if (pages < TMPFS_PAGES_MINRESERVED) + return (EINVAL); + + *(long *)arg1 = pages; + return (0); +} + +SYSCTL_PROC(_vfs_tmpfs, OID_AUTO, memory_reserved, CTLTYPE_LONG|CTLFLAG_RW, + &tmpfs_pages_reserved, 0, sysctl_mem_reserved, "L", "reserved memory"); + +size_t +tmpfs_mem_avail(void) +{ + vm_ooffset_t avail; + + avail = swap_pager_avail + cnt.v_free_count + cnt.v_cache_count - + tmpfs_pages_reserved; + if (__predict_false(avail < 0)) + avail = 0; + return (avail); +} + +size_t +tmpfs_pages_used(struct tmpfs_mount *tmp) +{ + const size_t node_size = sizeof(struct tmpfs_node) + + sizeof(struct tmpfs_dirent); + size_t meta_pages; + + meta_pages = howmany((uintmax_t)tmp->tm_nodes_inuse * node_size, + PAGE_SIZE); + return (meta_pages + tmp->tm_pages_used); +} + +static size_t +tmpfs_pages_check_avail(struct tmpfs_mount *tmp, size_t req_pages) +{ + if (tmpfs_mem_avail() < req_pages) + return (0); + + if (tmp->tm_pages_max != SIZE_MAX && + tmp->tm_pages_max < req_pages + tmpfs_pages_used(tmp)) + return (0); + + return (1); +} + /* --------------------------------------------------------------------- */ /* @@ -99,6 +162,8 @@ tmpfs_alloc_node(struct tmpfs_mount *tmp if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max) return (ENOSPC); + if (tmpfs_pages_check_avail(tmp, 1) == 0) + return (ENOSPC); nnode = (struct tmpfs_node *)uma_zalloc_arg( tmp->tm_node_pool, tmp, M_WAITOK); @@ -917,7 +982,7 @@ tmpfs_reg_resize(struct vnode *vp, off_t MPASS(oldpages == uobj->size); newpages = OFF_TO_IDX(newsize + PAGE_MASK); if (newpages > oldpages && - newpages - oldpages > TMPFS_PAGES_AVAIL(tmp)) + tmpfs_pages_check_avail(tmp, newpages - oldpages) == 0) return (ENOSPC); VM_OBJECT_LOCK(uobj); Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Sat Apr 7 12:47:12 2012 (r233997) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Sat Apr 7 15:23:51 2012 (r233998) @@ -183,7 +183,7 @@ tmpfs_mount(struct mount *mp) /* Do not allow mounts if we do not have enough memory to preserve * the minimum reserved pages. */ - if (tmpfs_mem_info() < TMPFS_PAGES_RESERVED) + if (tmpfs_mem_avail() < TMPFS_PAGES_MINRESERVED) return ENOSPC; /* Get the maximum number of memory pages this file system is @@ -382,22 +382,30 @@ tmpfs_fhtovp(struct mount *mp, struct fi static int tmpfs_statfs(struct mount *mp, struct statfs *sbp) { - fsfilcnt_t freenodes; struct tmpfs_mount *tmp; + size_t used; tmp = VFS_TO_TMPFS(mp); sbp->f_iosize = PAGE_SIZE; sbp->f_bsize = PAGE_SIZE; - sbp->f_blocks = TMPFS_PAGES_MAX(tmp); - sbp->f_bavail = sbp->f_bfree = TMPFS_PAGES_AVAIL(tmp); - - freenodes = MIN(tmp->tm_nodes_max - tmp->tm_nodes_inuse, - TMPFS_PAGES_AVAIL(tmp) * PAGE_SIZE / sizeof(struct tmpfs_node)); - - sbp->f_files = freenodes + tmp->tm_nodes_inuse; - sbp->f_ffree = freenodes; + used = tmpfs_pages_used(tmp); + if (tmp->tm_pages_max != SIZE_MAX) + sbp->f_blocks = tmp->tm_pages_max; + else + sbp->f_blocks = used + tmpfs_mem_avail(); + if (sbp->f_blocks <= used) + sbp->f_bavail = 0; + else + sbp->f_bavail = sbp->f_blocks - used; + sbp->f_bfree = sbp->f_bavail; + used = tmp->tm_nodes_inuse; + sbp->f_files = tmp->tm_nodes_max; + if (sbp->f_files <= used) + sbp->f_ffree = 0; + else + sbp->f_ffree = sbp->f_files - used; /* sbp->f_owner = tmp->tn_uid; */ return 0; From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 15:27:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11E2F106564A; Sat, 7 Apr 2012 15:27:35 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E743F8FC12; Sat, 7 Apr 2012 15:27:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q37FRYCD067803; Sat, 7 Apr 2012 15:27:34 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37FRYJ9067798; Sat, 7 Apr 2012 15:27:34 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201204071527.q37FRYJ9067798@svn.freebsd.org> From: Gleb Kurtsou Date: Sat, 7 Apr 2012 15:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233999 - in head/sys: fs/tmpfs kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 15:27:35 -0000 Author: gleb Date: Sat Apr 7 15:27:34 2012 New Revision: 233999 URL: http://svn.freebsd.org/changeset/base/233999 Log: Add vfs_getopt_size. Support human readable file system options in tmpfs. Increase maximum tmpfs file system size to 4GB*PAGE_SIZE on 32 bit archs. Discussed with: delphij MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/kern/vfs_mount.c head/sys/sys/mount.h Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Sat Apr 7 15:23:51 2012 (r233998) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Sat Apr 7 15:27:34 2012 (r233999) @@ -132,12 +132,10 @@ tmpfs_mount(struct mount *mp) { struct tmpfs_mount *tmp; struct tmpfs_node *root; - size_t pages; - uint32_t nodes; int error; /* Size counters. */ - u_int nodes_max; - u_quad_t size_max, maxfilesize; + u_quad_t pages; + off_t nodes_max, size_max, maxfilesize; /* Root node attributes. */ uid_t root_uid; @@ -173,12 +171,11 @@ tmpfs_mount(struct mount *mp) if (mp->mnt_cred->cr_ruid != 0 || vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) != 1) root_mode = va.va_mode; - if (vfs_scanopt(mp->mnt_optnew, "inodes", "%u", &nodes_max) != 1) + if (vfs_getopt_size(mp->mnt_optnew, "inodes", &nodes_max) != 0) nodes_max = 0; - if (vfs_scanopt(mp->mnt_optnew, "size", "%qu", &size_max) != 1) + if (vfs_getopt_size(mp->mnt_optnew, "size", &size_max) != 0) size_max = 0; - if (vfs_scanopt(mp->mnt_optnew, "maxfilesize", "%qu", - &maxfilesize) != 1) + if (vfs_getopt_size(mp->mnt_optnew, "maxfilesize", &maxfilesize) != 0) maxfilesize = 0; /* Do not allow mounts if we do not have enough memory to preserve @@ -190,7 +187,8 @@ tmpfs_mount(struct mount *mp) * allowed to use, based on the maximum size the user passed in * the mount structure. A value of zero is treated as if the * maximum available space was requested. */ - if (size_max < PAGE_SIZE || size_max > SIZE_MAX - PAGE_SIZE) + if (size_max < PAGE_SIZE || size_max > OFF_MAX - PAGE_SIZE || + (SIZE_MAX < OFF_MAX && size_max / PAGE_SIZE >= SIZE_MAX)) pages = SIZE_MAX; else pages = howmany(size_max, PAGE_SIZE); @@ -198,21 +196,20 @@ tmpfs_mount(struct mount *mp) if (nodes_max <= 3) { if (pages > UINT32_MAX - 3) - nodes = UINT32_MAX; + nodes_max = UINT32_MAX; else - nodes = pages + 3; - } else - nodes = nodes_max; - MPASS(nodes >= 3); + nodes_max = pages + 3; + } + MPASS(nodes_max >= 3); /* Allocate the tmpfs mount structure and fill it. */ tmp = (struct tmpfs_mount *)malloc(sizeof(struct tmpfs_mount), M_TMPFSMNT, M_WAITOK | M_ZERO); mtx_init(&tmp->allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF); - tmp->tm_nodes_max = nodes; + tmp->tm_nodes_max = nodes_max; tmp->tm_nodes_inuse = 0; - tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : UINT64_MAX; + tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : OFF_MAX; LIST_INIT(&tmp->tm_nodes_used); tmp->tm_pages_max = pages; Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Sat Apr 7 15:23:51 2012 (r233998) +++ head/sys/kern/vfs_mount.c Sat Apr 7 15:27:34 2012 (r233999) @@ -1520,6 +1520,48 @@ vfs_getopt_pos(struct vfsoptlist *opts, return (-1); } +int +vfs_getopt_size(struct vfsoptlist *opts, const char *name, off_t *value) +{ + char *opt_value, *vtp; + quad_t iv; + int error, opt_len; + + error = vfs_getopt(opts, name, (void **)&opt_value, &opt_len); + if (error != 0) + return (error); + if (opt_len == 0 || opt_value == NULL) + return (EINVAL); + if (opt_value[0] == '\0' || opt_value[opt_len - 1] != '\0') + return (EINVAL); + iv = strtoq(opt_value, &vtp, 0); + if (vtp == opt_value || (vtp[0] != '\0' && vtp[1] != '\0')) + return (EINVAL); + if (iv < 0) + return (EINVAL); + switch (vtp[0]) { + case 't': + case 'T': + iv *= 1024; + case 'g': + case 'G': + iv *= 1024; + case 'm': + case 'M': + iv *= 1024; + case 'k': + case 'K': + iv *= 1024; + case '\0': + break; + default: + return (EINVAL); + } + *value = iv; + + return (0); +} + char * vfs_getopts(struct vfsoptlist *opts, const char *name, int *error) { Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sat Apr 7 15:23:51 2012 (r233998) +++ head/sys/sys/mount.h Sat Apr 7 15:27:34 2012 (r233999) @@ -718,6 +718,8 @@ int vfs_flagopt(struct vfsoptlist *opts, uint64_t val); int vfs_getopt(struct vfsoptlist *, const char *, void **, int *); int vfs_getopt_pos(struct vfsoptlist *opts, const char *name); +int vfs_getopt_size(struct vfsoptlist *opts, const char *name, + off_t *value); char *vfs_getopts(struct vfsoptlist *, const char *, int *error); int vfs_copyopt(struct vfsoptlist *, const char *, void *, int); int vfs_filteropt(struct vfsoptlist *, const char **legal); From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 15:30:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2EA891065679; Sat, 7 Apr 2012 15:30:47 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1EC8FC19; Sat, 7 Apr 2012 15:30:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q37FUkGT067950; Sat, 7 Apr 2012 15:30:46 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37FUkqi067948; Sat, 7 Apr 2012 15:30:46 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201204071530.q37FUkqi067948@svn.freebsd.org> From: Gleb Kurtsou Date: Sat, 7 Apr 2012 15:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234000 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 15:30:47 -0000 Author: gleb Date: Sat Apr 7 15:30:46 2012 New Revision: 234000 URL: http://svn.freebsd.org/changeset/base/234000 Log: tmpfs supports only INT_MAX nodes due to limitations of unit number allocator. Replace UINT32_MAX checks with INT_MAX. Keeping more than 2^31 nodes in memory is not likely to become possible in foreseeable feature and would require new unit number allocator. Discussed with: delphij MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Sat Apr 7 15:27:34 2012 (r233999) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Sat Apr 7 15:30:46 2012 (r234000) @@ -130,6 +130,8 @@ tmpfs_node_fini(void *mem, int size) static int tmpfs_mount(struct mount *mp) { + const size_t nodes_per_page = howmany(PAGE_SIZE, + sizeof(struct tmpfs_dirent) + sizeof(struct tmpfs_node)); struct tmpfs_mount *tmp; struct tmpfs_node *root; int error; @@ -195,11 +197,13 @@ tmpfs_mount(struct mount *mp) MPASS(pages > 0); if (nodes_max <= 3) { - if (pages > UINT32_MAX - 3) - nodes_max = UINT32_MAX; + if (pages < INT_MAX / nodes_per_page) + nodes_max = pages * nodes_per_page; else - nodes_max = pages + 3; + nodes_max = INT_MAX; } + if (nodes_max > INT_MAX) + nodes_max = INT_MAX; MPASS(nodes_max >= 3); /* Allocate the tmpfs mount structure and fill it. */ From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 16:57:34 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 373481065672; Sat, 7 Apr 2012 16:57:34 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id D3D488FC0C; Sat, 7 Apr 2012 16:57:30 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id q37GvU2A002961; Sat, 7 Apr 2012 12:57:30 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id q37GvTTm002960; Sat, 7 Apr 2012 12:57:29 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 7 Apr 2012 12:57:29 -0400 From: David Schultz To: Tijl Coosemans Message-ID: <20120407165729.GA2737@zim.MIT.EDU> Mail-Followup-To: Tijl Coosemans , Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201202282217.q1SMHrIk094780@svn.freebsd.org> <201203012347.32984.tijl@freebsd.org> <20120302132403.P929@besplex.bde.org> <201203022231.43186.tijl@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201203022231.43186.tijl@freebsd.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Bruce Evans Subject: Re: svn commit: r232275 - in head/sys: amd64/include i386/include pc98/include x86/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 16:57:34 -0000 On Fri, Mar 02, 2012, Tijl Coosemans wrote: > Thanks, that was quite informative. C11 does say something about the > FP env and signals now though: > > ``When the processing of the abstract machine is interrupted by receipt > of a signal, the values of objects that are neither lock-free atomic > objects nor of type volatile sig_atomic_t are unspecified, as is the > state of the floating-point environment. The value of any object > modified by the handler that is neither a lock-free atomic object nor > of type volatile sig_atomic_t becomes indeterminate when the handler > exits, as does the state of the floating-point environment if it is > modified by the handler and not restored to its original state.'' > > This means a signal handler must not rely on the state of the FP env. > It may install its own FP env if needed (e.g. FE_DFL_ENV), but then it > must restore the original before returning. This allows for the > rounding mode to be silently modified for integer conversions for > instance. > > If longjmp is not supposed to change the FP env then, when called from > a signal handler, either the signal handler must install a proper FP > env before calling longjmp or a proper FP env must be installed after > the target setjmp call. Otherwise the FP env is unspecified. There are two reasonable ways to handle the floating point control word. FreeBSD treats it as a register, resetting it on signal handler entry and restoring it on longjmp or signal handler return. Virtually every other OS (e.g., Linux, NetBSD, Solaris) treats it as global state, leaving it up to the signal handler to preserve it as needed. Both approaches have their merits. FreeBSD's approach provides better semantics. Library functions, round-to-integer on most CPUs, and other things may temporarily change the rounding mode. Most programmers don't think about that, but on Linux, if an async signal were delivered at the wrong time and did a longjmp, the rounding mode would be in an unexpected state. Most programmers don't think about that; even a program that never changes the rounding mode explicitly could wind up in round-to-zero mode after jumping out of a signal handler. The main advantage of the alternative approach is that it avoids the overhead of saving and restoring the floating point control word. Many programs don't even use floating point, and the efficiency is important for programs that use longjmp frequently, e.g., to implement exceptions. Either way, note the importance of being consistent: If the FP env gets clobbered automatically on entry to a signal handler, then longjmp must restore what the application had before. Personally, I'm not opposed to changing both signal handlers and longjmp to match what the rest of the world does, but this isn't just about the mxcsr, as suggested previously. By the way, this commit is a good example of how getting rid of duplication can actually make things more confusing. The code is the same on both amd64 and i386 now, but it means different things. Furthermore, each platform has a different setjmp implementation, so if someone has to change jmpbuf on one of them in the future, they have to worry about breaking the other as well. This is illustrated by the fact that this very commit silently changed the i386 ABI by increasing the size of struct jmpbuf. From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 17:10:29 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1886E1065670; Sat, 7 Apr 2012 17:10:29 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id A7E9C8FC0C; Sat, 7 Apr 2012 17:10:22 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id q37HAMHK003022; Sat, 7 Apr 2012 13:10:22 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id q37HAMPT003021; Sat, 7 Apr 2012 13:10:22 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 7 Apr 2012 13:10:22 -0400 From: David Schultz To: David Chisnall Message-ID: <20120407171022.GB2737@zim.MIT.EDU> Mail-Followup-To: David Chisnall , Konstantin Belousov , Kirk McKusick , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201203011845.q21IjQqt091350@svn.freebsd.org> <20120302125334.GH75778@deviant.kiev.zoral.com.ua> <0F23DDD1-1CAC-4E72-A3CB-56B81F0C0790@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0F23DDD1-1CAC-4E72-A3CB-56B81F0C0790@FreeBSD.org> Cc: Konstantin Belousov , svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Kirk McKusick Subject: Re: svn commit: r232351 - in head/sys: kern sys ufs/ffs ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 17:10:29 -0000 On Fri, Mar 02, 2012, David Chisnall wrote: > On 2 Mar 2012, at 12:53, Konstantin Belousov wrote: > > > This part of the change breaks KBI. I suggest that for merge to stable/9 > > you would leave the bread and breadn as functions. > > Can we not do this for the general case? Provide them as inline > extern functions in the header, and implement them elsewhere, so > the compiler will inline them in recompiled code but not break > code that isn't? The biggest hinderance to using extern inline is that gcc and C99 disagree about what it means, unless you use a reasonably recent compiler in C99 mode. I first tried to use extern inline in the tree several years after I backported gcc's C99 inline support, and it still turned out to be a headache. Of course, the kernel is easier because we can insist on a recent compiler in C99 mode, but perhaps there's still some lingering confusion. I've been meaning to write up a wiki page about how to use the different types of inlines, and when they'd be appropriate...but I have very limited time for the next few months. From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 17:20:07 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F266B1065672; Sat, 7 Apr 2012 17:20:06 +0000 (UTC) (envelope-from theraven@FreeBSD.ORG) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id 7E0F98FC15; Sat, 7 Apr 2012 17:20:06 +0000 (UTC) Received: from [192.168.0.2] (cpc1-cwma8-2-0-cust257.7-3.cable.virginmedia.com [82.20.153.2]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id q37HJwtS013489 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sat, 7 Apr 2012 18:19:58 +0100 (BST) (envelope-from theraven@FreeBSD.ORG) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120407171022.GB2737@zim.MIT.EDU> Date: Sat, 7 Apr 2012 18:19:53 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <44678A07-0CDB-40E5-A149-DFE55FB96611@FreeBSD.ORG> References: <201203011845.q21IjQqt091350@svn.freebsd.org> <20120302125334.GH75778@deviant.kiev.zoral.com.ua> <0F23DDD1-1CAC-4E72-A3CB-56B81F0C0790@FreeBSD.org> <20120407171022.GB2737@zim.MIT.EDU> To: David Schultz X-Mailer: Apple Mail (2.1257) Cc: Konstantin Belousov , svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Kirk McKusick Subject: Re: svn commit: r232351 - in head/sys: kern sys ufs/ffs ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 17:20:07 -0000 On 7 Apr 2012, at 18:10, David Schultz wrote: > The biggest hinderance to using extern inline is that gcc and C99 > disagree about what it means, unless you use a reasonably recent > compiler in C99 mode. I first tried to use extern inline in the > tree several years after I backported gcc's C99 inline support, > and it still turned out to be a headache. You can detect which inlining mode is going to happen by checking the = value of __STDC_VERSION__ and the value of __GNUC_GNU_INLINE__. If = __STDC_VERSION__ is >=3D 199901L and __GNUC_GNU_INLINE__ is not defined = then you're in C99 inlining mode, otherwise you're in GNU inlining mode. = =20 On some projects with headers that need to work in both modes, we've = written some INLINE_EXTERN macros that do the right thing in whichever = mode we find ourselves compiling. It might be worth putting these in = cdefs.h if they're generally useful. David= From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 22:28:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AECCF1065679; Sat, 7 Apr 2012 22:28:50 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A1598FC1B; Sat, 7 Apr 2012 22:28:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q37MSo7B081082; Sat, 7 Apr 2012 22:28:50 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37MSoXJ081080; Sat, 7 Apr 2012 22:28:50 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204072228.q37MSoXJ081080@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 7 Apr 2012 22:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234003 - head/lib/libc/powerpc64/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 22:28:50 -0000 Author: nwhitehorn Date: Sat Apr 7 22:28:50 2012 New Revision: 234003 URL: http://svn.freebsd.org/changeset/base/234003 Log: Properly resolve the _ctx_start function descriptor (the symbol _ctx_start is a descriptor, not a code address), which prevents crashes when starting a context. This fixes QEMU on powerpc64. MFC after: 3 days Modified: head/lib/libc/powerpc64/gen/makecontext.c Modified: head/lib/libc/powerpc64/gen/makecontext.c ============================================================================== --- head/lib/libc/powerpc64/gen/makecontext.c Sat Apr 7 20:56:29 2012 (r234002) +++ head/lib/libc/powerpc64/gen/makecontext.c Sat Apr 7 22:28:50 2012 (r234003) @@ -111,7 +111,7 @@ __makecontext(ucontext_t *ucp, void (*st * Use caller-saved regs 14/15 to hold params that _ctx_start * will use to invoke the user-supplied func */ - mc->mc_srr0 = (uintptr_t) _ctx_start; + mc->mc_srr0 = *(uintptr_t *)_ctx_start; mc->mc_gpr[1] = (uintptr_t) sp; /* new stack pointer */ mc->mc_gpr[14] = (uintptr_t) start; /* r14 <- start */ mc->mc_gpr[15] = (uintptr_t) ucp; /* r15 <- ucp */ From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 23:47:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16296106566C; Sat, 7 Apr 2012 23:47:09 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC17C8FC16; Sat, 7 Apr 2012 23:47:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q37Nl8LI083547; Sat, 7 Apr 2012 23:47:08 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37Nl80r083544; Sat, 7 Apr 2012 23:47:08 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201204072347.q37Nl80r083544@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 7 Apr 2012 23:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234004 - in head/sys: arm/xscale/pxa conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 23:47:09 -0000 Author: stas Date: Sat Apr 7 23:47:08 2012 New Revision: 234004 URL: http://svn.freebsd.org/changeset/base/234004 Log: - Add new ARM kernel option QEMU_WORKAROUNDS which can be used in the code which needs to implement some specific behaviour when being run under QEMU. - Make PXA UART probe code to work under QEMU gumstix, which doesn't emulate all the ports properly. Modified: head/sys/arm/xscale/pxa/uart_bus_pxa.c head/sys/conf/options.arm Modified: head/sys/arm/xscale/pxa/uart_bus_pxa.c ============================================================================== --- head/sys/arm/xscale/pxa/uart_bus_pxa.c Sat Apr 7 22:28:50 2012 (r234003) +++ head/sys/arm/xscale/pxa/uart_bus_pxa.c Sat Apr 7 23:47:08 2012 (r234004) @@ -72,12 +72,28 @@ uart_pxa_probe(device_t dev) bus_space_handle_t base; struct uart_softc *sc; - /* Check to see if the enable bit's on. */ base = (bus_space_handle_t)pxa_get_base(dev); +#ifdef QEMU_WORKAROUNDS + /* + * QEMU really exposes only the first uart unless + * you specify several of them in the configuration. + * Otherwise all the rest of UARTs stay unconnected, + * which causes problems in the ns16550 attach routine. + * Unfortunately, even if you provide qemu with 4 uarts + * on the command line, it has a bug where it segfaults + * trying to enable bluetooth on the HWUART. So we just + * allow the FFUART to be attached. + * Also, don't check the UUE (UART Unit Enable) bit, as + * the gumstix bootloader doesn't set it. + */ + if (base != PXA2X0_FFUART_BASE) + return (ENXIO); +#else + /* Check to see if the enable bit's on. */ if ((bus_space_read_4(obio_tag, base, (REG_IER << 2)) & PXA_UART_UUE) == 0) return (ENXIO); - +#endif sc = device_get_softc(dev); sc->sc_class = &uart_ns8250_class; Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Sat Apr 7 22:28:50 2012 (r234003) +++ head/sys/conf/options.arm Sat Apr 7 23:47:08 2012 (r234004) @@ -23,6 +23,7 @@ KERNPHYSADDR opt_global.h KERNVIRTADDR opt_global.h LOADERRAMADDR opt_global.h PHYSADDR opt_global.h +QEMU_WORKAROUNDS opt_global.h SKYEYE_WORKAROUNDS opt_global.h SOC_MV_DISCOVERY opt_global.h SOC_MV_KIRKWOOD opt_global.h From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 23:48:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBAD81065672; Sat, 7 Apr 2012 23:48:51 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC97A8FC12; Sat, 7 Apr 2012 23:48:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q37Nmp81083647; Sat, 7 Apr 2012 23:48:51 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37NmpVh083643; Sat, 7 Apr 2012 23:48:51 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201204072348.q37NmpVh083643@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 7 Apr 2012 23:48:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234005 - in head: lib/libc/arm/gen sys/arm/conf sys/arm/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 23:48:51 -0000 Author: stas Date: Sat Apr 7 23:48:51 2012 New Revision: 234005 URL: http://svn.freebsd.org/changeset/base/234005 Log: - Add kernel config file for QEMU-emulated gumstix board. Added: head/sys/arm/conf/GUMSTIX-QEMU (contents, props changed) Modified: head/lib/libc/arm/gen/Makefile.inc head/sys/arm/include/armreg.h Modified: head/lib/libc/arm/gen/Makefile.inc ============================================================================== --- head/lib/libc/arm/gen/Makefile.inc Sat Apr 7 23:47:08 2012 (r234004) +++ head/lib/libc/arm/gen/Makefile.inc Sat Apr 7 23:48:51 2012 (r234005) @@ -3,4 +3,4 @@ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \ getcontextx.c infinity.c ldexp.c makecontext.c \ - __aeabi_read_tp.c setjmp.S signalcontext.c sigsetjmp.S divsi3.S flt_rounds.c + __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S divsi3.S flt_rounds.c Added: head/sys/arm/conf/GUMSTIX-QEMU ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/GUMSTIX-QEMU Sat Apr 7 23:48:51 2012 (r234005) @@ -0,0 +1,92 @@ +# GUMSTIX-QEMU -- Custom configuration for the QEMU emulated Gumstix target +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident GUMSTIX-QEMU +cpu CPU_XSCALE_PXA2X0 + +# This probably wants to move somewhere else. Maybe we can create a basic +# PXA2X0 config, then make a GUMSTIX config that includes the basic one, +# adds the smc and smcphy devices and pulls in this hints file. +hints "GUMSTIX.hints" + +options PHYSADDR=0xa0000000 +options KERNPHYSADDR=0xa0200000 +options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm + +options STARTUP_PAGETABLE_ADDR=0xa0000000 +include "../xscale/pxa/std.pxa" +makeoptions MODULES_OVERRIDE="" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options HZ=100 +#options DEVICE_POLLING + +options QEMU_WORKAROUNDS +nooptions ARM_CACHE_LOCK_ENABLE # QEMU does not implement this + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options NFSCL #New Network Filesystem Client +#options NFSD #New Network Filesystem Server +options NFS_ROOT #NFS usable as /, requires NFSCL +#options MSDOSFS #MSDOS Filesystem +#options CD9660 #ISO 9660 Filesystem +#options PROCFS #Process filesystem (requires PSEUDOFS) +options PSEUDOFS #Pseudo-filesystem framework +options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options KTRACE #ktrace(1) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options BOOTP +options BOOTP_NFSROOT +options BOOTP_WIRED_TO=smc0 +options BOOTP_COMPAT +options BOOTP_NFSV3 +options BOOTP_BLOCKSIZE=4096 +options PREEMPTION +device loop +device ether +device mii +device mii_bitbang +device smc +device smcphy +device uart +device uart_ns8250 + +# Debugging for use in -current +options KDB +options DDB #Enable the kernel debugger +#options DEADLKRES #Enable the deadlock resolver +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +device md +device random # Entropy device Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Sat Apr 7 23:47:08 2012 (r234004) +++ head/sys/arm/include/armreg.h Sat Apr 7 23:48:51 2012 (r234005) @@ -317,7 +317,7 @@ * Address of the vector page, low and high versions. */ #define ARM_VECTORS_LOW 0x00000000U -#define ARM_VECTORS_HIGH 0xffff0000U +#define ARM_VECTORS_HIGH 0xffff0000 /* * ARM Instructions From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 23:51:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E51E2106566B; Sat, 7 Apr 2012 23:51:16 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D04B98FC0A; Sat, 7 Apr 2012 23:51:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q37NpGks083798; Sat, 7 Apr 2012 23:51:16 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37NpGP9083795; Sat, 7 Apr 2012 23:51:16 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201204072351.q37NpGP9083795@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 7 Apr 2012 23:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234006 - in head: lib/libc/arm/gen sys/arm/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Apr 2012 23:51:17 -0000 Author: stas Date: Sat Apr 7 23:51:16 2012 New Revision: 234006 URL: http://svn.freebsd.org/changeset/base/234006 Log: - Revert part of r234005, which I did not intend to commit. Sorry! :( Modified: head/lib/libc/arm/gen/Makefile.inc head/sys/arm/include/armreg.h Modified: head/lib/libc/arm/gen/Makefile.inc ============================================================================== --- head/lib/libc/arm/gen/Makefile.inc Sat Apr 7 23:48:51 2012 (r234005) +++ head/lib/libc/arm/gen/Makefile.inc Sat Apr 7 23:51:16 2012 (r234006) @@ -3,4 +3,4 @@ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \ getcontextx.c infinity.c ldexp.c makecontext.c \ - __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S divsi3.S flt_rounds.c + __aeabi_read_tp.c setjmp.S signalcontext.c sigsetjmp.S divsi3.S flt_rounds.c Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Sat Apr 7 23:48:51 2012 (r234005) +++ head/sys/arm/include/armreg.h Sat Apr 7 23:51:16 2012 (r234006) @@ -317,7 +317,7 @@ * Address of the vector page, low and high versions. */ #define ARM_VECTORS_LOW 0x00000000U -#define ARM_VECTORS_HIGH 0xffff0000 +#define ARM_VECTORS_HIGH 0xffff0000U /* * ARM Instructions