From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 02:42:37 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6394EA5; Sun, 12 Oct 2014 02:42:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A29A5887; Sun, 12 Oct 2014 02:42:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9C2gbUj048815; Sun, 12 Oct 2014 02:42:37 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9C2gbUp048814; Sun, 12 Oct 2014 02:42:37 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410120242.s9C2gbUp048814@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sun, 12 Oct 2014 02:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272976 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 02:42:37 -0000 Author: hrs Date: Sun Oct 12 02:42:36 2014 New Revision: 272976 URL: https://svnweb.freebsd.org/changeset/base/272976 Log: Add env and prepend to _rc_namevarlist. Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sun Oct 12 00:34:18 2014 (r272975) +++ head/etc/rc.subr Sun Oct 12 02:42:36 2014 (r272976) @@ -2050,7 +2050,7 @@ check_kern_features() # check_namevarlist var # Return "0" if ${name}_var is reserved in rc.subr. -_rc_namevarlist="program chroot chdir flags fib nice user group groups" +_rc_namevarlist="program chroot chdir env flags fib nice user group groups prepend" check_namevarlist() { local _v From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 06:55:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A338AEF; Sun, 12 Oct 2014 06:55:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84FE5E54; Sun, 12 Oct 2014 06:55:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9C6tZxo065983; Sun, 12 Oct 2014 06:55:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9C6tYGE065980; Sun, 12 Oct 2014 06:55:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410120655.s9C6tYGE065980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 12 Oct 2014 06:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272978 - in head: sys/cam/ctl usr.sbin/ctladm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 06:55:35 -0000 Author: mav Date: Sun Oct 12 06:55:34 2014 New Revision: 272978 URL: https://svnweb.freebsd.org/changeset/base/272978 Log: Improve and document `ctladm portlist` subcommand. Make this subcommand less FC-specific, reporting target and port addresses in more generic way. Also make it report list of connected initiators in unified way, working for both FC and iSCSI, and potentially others. MFC after: 1 week Modified: head/sys/cam/ctl/ctl.c head/usr.sbin/ctladm/ctladm.8 head/usr.sbin/ctladm/ctladm.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Oct 12 06:14:50 2014 (r272977) +++ head/sys/cam/ctl/ctl.c Sun Oct 12 06:55:34 2014 (r272978) @@ -2237,6 +2237,43 @@ ctl_sbuf_printf_esc(struct sbuf *sb, cha return (retval); } +static void +ctl_id_sbuf(struct ctl_devid *id, struct sbuf *sb) +{ + struct scsi_vpd_id_descriptor *desc; + int i; + + if (id == NULL || id->len < 4) + return; + desc = (struct scsi_vpd_id_descriptor *)id->data; + switch (desc->id_type & SVPD_ID_TYPE_MASK) { + case SVPD_ID_TYPE_T10: + sbuf_printf(sb, "t10."); + break; + case SVPD_ID_TYPE_EUI64: + sbuf_printf(sb, "eui."); + break; + case SVPD_ID_TYPE_NAA: + sbuf_printf(sb, "naa."); + break; + case SVPD_ID_TYPE_SCSI_NAME: + break; + } + switch (desc->proto_codeset & SVPD_ID_CODESET_MASK) { + case SVPD_ID_CODESET_BINARY: + for (i = 0; i < desc->length; i++) + sbuf_printf(sb, "%02x", desc->identifier[i]); + break; + case SVPD_ID_CODESET_ASCII: + sbuf_printf(sb, "%.*s", (int)desc->length, + (char *)desc->identifier); + break; + case SVPD_ID_CODESET_UTF8: + sbuf_printf(sb, "%s", (char *)desc->identifier); + break; + } +} + static int ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) @@ -3288,6 +3325,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, struct ctl_port *port; struct ctl_lun_list *list; struct ctl_option *opt; + int j; list = (struct ctl_lun_list *)addr; @@ -3344,15 +3382,17 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (retval != 0) break; - retval = sbuf_printf(sb, "\t%#jx\n", - (uintmax_t)port->wwnn); - if (retval != 0) - break; + if (port->target_devid != NULL) { + sbuf_printf(sb, "\t"); + ctl_id_sbuf(port->target_devid, sb); + sbuf_printf(sb, "\n"); + } - retval = sbuf_printf(sb, "\t%#jx\n", - (uintmax_t)port->wwpn); - if (retval != 0) - break; + if (port->port_devid != NULL) { + sbuf_printf(sb, "\t"); + ctl_id_sbuf(port->port_devid, sb); + sbuf_printf(sb, "\n"); + } if (port->port_info != NULL) { retval = port->port_info(port->onoff_arg, sb); @@ -3366,6 +3406,26 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } + for (j = 0; j < CTL_MAX_INIT_PER_PORT; j++) { + if (port->wwpn_iid[j].in_use == 0 || + (port->wwpn_iid[j].wwpn == 0 && + port->wwpn_iid[j].name == NULL)) + continue; + + if (port->wwpn_iid[j].name != NULL) + retval = sbuf_printf(sb, + "\t%u %s\n", + j, port->wwpn_iid[j].name); + else + retval = sbuf_printf(sb, + "\t%u naa.%08jx\n", + j, port->wwpn_iid[j].wwpn); + if (retval != 0) + break; + } + if (retval != 0) + break; + retval = sbuf_printf(sb, "\n"); if (retval != 0) break; Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Sun Oct 12 06:14:50 2014 (r272977) +++ head/usr.sbin/ctladm/ctladm.8 Sun Oct 12 06:55:34 2014 (r272978) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd October 8, 2014 +.Dd October 12, 2014 .Dt CTLADM 8 .Os .Sh NAME @@ -193,6 +193,14 @@ .Op Fl q .Op Fl x .Nm +.Ic portlist +.Op Fl f Ar frontend +.Op Fl i +.Op Fl p Ar targ_port +.Op Fl q +.Op Fl v +.Op Fl x +.Nm .Ic dumpooa .Nm .Ic dumpstructs @@ -768,6 +776,22 @@ As a general rule, the WWPN must be diff .It Fl x Output the port list in XML format. .El +.It Ic portlist +List CTL frontend ports. +.Bl -tag -width 12n +.It Fl f Ar frontend +Specify the frontend type. +.It Fl i +Report target and connected initiators addresses +.It Fl p Ar targ_port +Specify the frontend port number. +.It Fl q +Omit the header in the port list output. +.It Fl v +Enable verbose output (report all port options). +.It Fl x +Output the port list in XML format. +.El .It Ic dumpooa Dump the OOA (Order Of Arrival) queue for each LUN registered with CTL. .It Ic dumpstructs Modified: head/usr.sbin/ctladm/ctladm.c ============================================================================== --- head/usr.sbin/ctladm/ctladm.c Sun Oct 12 06:14:50 2014 (r272977) +++ head/usr.sbin/ctladm/ctladm.c Sun Oct 12 06:55:34 2014 (r272978) @@ -191,7 +191,7 @@ static struct ctladm_opts option_table[] {"modesense", CTLADM_CMD_MODESENSE, CTLADM_ARG_NEED_TL, "P:S:dlm:c:"}, {"modify", CTLADM_CMD_MODIFY, CTLADM_ARG_NONE, "b:l:s:"}, {"port", CTLADM_CMD_PORT, CTLADM_ARG_NONE, "lo:p:qt:w:W:x"}, - {"portlist", CTLADM_CMD_PORTLIST, CTLADM_ARG_NONE, "f:vx"}, + {"portlist", CTLADM_CMD_PORTLIST, CTLADM_ARG_NONE, "f:ip:qvx"}, {"prin", CTLADM_CMD_PRES_IN, CTLADM_ARG_NEED_TL, "a:"}, {"prout", CTLADM_CMD_PRES_OUT, CTLADM_ARG_NEED_TL, "a:k:r:s:"}, {"read", CTLADM_CMD_READ, CTLADM_ARG_NEED_TL, rw_opts}, @@ -4100,7 +4100,8 @@ struct cctl_port { char *frontend_type; char *name; int pp, vp; - char *wwnn, *wwpn; + char *target, *port; + STAILQ_HEAD(,cctl_lun_nv) init_list; STAILQ_HEAD(,cctl_lun_nv) attr_list; STAILQ_ENTRY(cctl_port) links; }; @@ -4144,6 +4145,7 @@ cctl_start_pelement(void *user_data, con portlist->num_ports++; portlist->cur_port = cur_port; + STAILQ_INIT(&cur_port->init_list); STAILQ_INIT(&cur_port->attr_list); STAILQ_INSERT_TAIL(&portlist->port_list, cur_port, links); @@ -4205,11 +4207,11 @@ cctl_end_pelement(void *user_data, const cur_port->pp = strtoull(str, NULL, 0); } else if (strcmp(name, "virtual_port") == 0) { cur_port->vp = strtoull(str, NULL, 0); - } else if (strcmp(name, "wwnn") == 0) { - cur_port->wwnn = str; + } else if (strcmp(name, "target") == 0) { + cur_port->target = str; str = NULL; - } else if (strcmp(name, "wwpn") == 0) { - cur_port->wwpn = str; + } else if (strcmp(name, "port") == 0) { + cur_port->port = str; str = NULL; } else if (strcmp(name, "targ_port") == 0) { portlist->cur_port = NULL; @@ -4230,7 +4232,10 @@ cctl_end_pelement(void *user_data, const nv->value = str; str = NULL; - STAILQ_INSERT_TAIL(&cur_port->attr_list, nv, links); + if (strcmp(name, "initiator") == 0) + STAILQ_INSERT_TAIL(&cur_port->init_list, nv, links); + else + STAILQ_INSERT_TAIL(&cur_port->attr_list, nv, links); } free(str); @@ -4258,7 +4263,8 @@ cctl_portlist(int fd, int argc, char **a int dump_xml = 0; int retval, c; char *frontend = NULL; - int verbose = 0; + uint64_t portarg = UINT64_MAX; + int verbose = 0, init = 0, quiet = 0; retval = 0; port_len = 4096; @@ -4271,6 +4277,15 @@ cctl_portlist(int fd, int argc, char **a case 'f': frontend = strdup(optarg); break; + case 'i': + init++; + break; + case 'p': + portarg = strtoll(optarg, NULL, 0); + break; + case 'q': + quiet++; + break; case 'v': verbose++; break; @@ -4327,8 +4342,8 @@ retry: goto bailout; } - printf("Port Online Frontend %-12s pp vp %-18s %-18s\n", - "Name", "WWNN", "WWPN"); + if (quiet == 0) + printf("Port Online Frontend Name pp vp\n"); STAILQ_FOREACH(port, &portlist.port_list, links) { struct cctl_lun_nv *nv; @@ -4336,16 +4351,26 @@ retry: && (strcmp(port->frontend_type, frontend) != 0)) continue; - printf("%-4ju %-6s %-8s %-12s %-2d %-2d %-18s %-18s\n", + if ((portarg != UINT64_MAX) && (portarg != port->port_id)) + continue; + + printf("%-4ju %-6s %-8s %-8s %-2d %-2d %s\n", (uintmax_t)port->port_id, port->online, port->frontend_type, port->name, port->pp, port->vp, - port->wwnn, port->wwpn); + port->port ? port->port : ""); - if (verbose == 0) - continue; + if (init || verbose) { + if (port->target) + printf(" Target: %s\n", port->target); + STAILQ_FOREACH(nv, &port->init_list, links) { + printf(" Initiator: %s\n", nv->value); + } + } - STAILQ_FOREACH(nv, &port->attr_list, links) { - printf(" %s=%s\n", nv->name, nv->value); + if (verbose) { + STAILQ_FOREACH(nv, &port->attr_list, links) { + printf(" %s=%s\n", nv->name, nv->value); + } } } bailout: @@ -4401,7 +4426,7 @@ usage(int error) " [-s len fmt [args]] [-c] [-d delete_id]\n" " ctladm port <-l | -o | [-w wwnn][-W wwpn]>\n" " [-p targ_port] [-t port_type] [-q] [-x]\n" -" ctladm portlist [-f frontend] [-v] [-x]\n" +" ctladm portlist [-f frontend] [-i] [-p targ_port] [-q] [-v] [-x]\n" " ctladm islist [-v | -x]\n" " ctladm islogout <-a | -c connection-id | -i name | -p portal>\n" " ctladm isterminate <-a | -c connection-id | -i name | -p portal>\n" @@ -4487,6 +4512,13 @@ usage(int error) "-p targ_port : specify target port number\n" "-q : omit header in list output\n" "-x : output port list in XML format\n" +"portlist options:\n" +"-f fronetnd : specify frontend type\n" +"-i : report target and initiators addresses\n" +"-p targ_port : specify target port number\n" +"-q : omit header in list output\n" +"-v : verbose output (report all port options)\n" +"-x : output port list in XML format\n" "bbrread options:\n" "-l lba : starting LBA\n" "-d datalen : length, in bytes, to read\n", From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 10:05:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A35B78AD; Sun, 12 Oct 2014 10:05:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ED8311F; Sun, 12 Oct 2014 10:05:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CA51QG055398; Sun, 12 Oct 2014 10:05:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CA50pD055376; Sun, 12 Oct 2014 10:05:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410121005.s9CA50pD055376@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 12 Oct 2014 10:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272979 - in head/contrib/netbsd-tests/lib/libc: tls tls/dso tls_dso X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 10:05:01 -0000 Author: ngie Date: Sun Oct 12 10:04:59 2014 New Revision: 272979 URL: https://svnweb.freebsd.org/changeset/base/272979 Log: Only #include on NetBSD Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c head/contrib/netbsd-tests/lib/libc/tls/t_tls_static.c head/contrib/netbsd-tests/lib/libc/tls/t_tls_static_helper.c head/contrib/netbsd-tests/lib/libc/tls_dso/h_tls_dynamic.c Modified: head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c Sun Oct 12 06:55:34 2014 (r272978) +++ head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c Sun Oct 12 10:04:59 2014 (r272979) @@ -36,7 +36,9 @@ __RCSID("$NetBSD: h_tls_dlopen.c,v 1.5 2 #include #include +#if defined(__NetBSD__) #include +#endif #ifdef __HAVE_NO___THREAD #define __thread Modified: head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c Sun Oct 12 06:55:34 2014 (r272978) +++ head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c Sun Oct 12 10:04:59 2014 (r272979) @@ -39,7 +39,9 @@ __RCSID("$NetBSD: t_tls_dlopen.c,v 1.3 2 #include #include +#if defined(__NetBSD__) #include +#endif #ifdef __HAVE_NO___THREAD #define __thread Modified: head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c Sun Oct 12 06:55:34 2014 (r272978) +++ head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c Sun Oct 12 10:04:59 2014 (r272979) @@ -38,7 +38,9 @@ __RCSID("$NetBSD: t_tls_dynamic.c,v 1.3 #include #include +#if defined(__NetBSD__) #include +#endif #ifdef __HAVE_NO___THREAD #define __thread Modified: head/contrib/netbsd-tests/lib/libc/tls/t_tls_static.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/tls/t_tls_static.c Sun Oct 12 06:55:34 2014 (r272978) +++ head/contrib/netbsd-tests/lib/libc/tls/t_tls_static.c Sun Oct 12 10:04:59 2014 (r272979) @@ -37,7 +37,9 @@ __RCSID("$NetBSD: t_tls_static.c,v 1.2 2 #include #include +#if defined(__NetBSD__) #include +#endif #ifdef __HAVE_NO___THREAD #define __thread Modified: head/contrib/netbsd-tests/lib/libc/tls/t_tls_static_helper.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/tls/t_tls_static_helper.c Sun Oct 12 06:55:34 2014 (r272978) +++ head/contrib/netbsd-tests/lib/libc/tls/t_tls_static_helper.c Sun Oct 12 10:04:59 2014 (r272979) @@ -34,7 +34,9 @@ #include __RCSID("$NetBSD: t_tls_static_helper.c,v 1.2 2012/01/17 20:34:57 joerg Exp $"); +#if defined(__NetBSD__) #include +#endif #ifdef __HAVE_NO___THREAD #define __thread Modified: head/contrib/netbsd-tests/lib/libc/tls_dso/h_tls_dynamic.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/tls_dso/h_tls_dynamic.c Sun Oct 12 06:55:34 2014 (r272978) +++ head/contrib/netbsd-tests/lib/libc/tls_dso/h_tls_dynamic.c Sun Oct 12 10:04:59 2014 (r272979) @@ -35,7 +35,9 @@ __RCSID("$NetBSD: h_tls_dynamic.c,v 1.5 2013/10/21 19:11:17 joerg Exp $"); #include +#if defined(__NetBSD__) #include +#endif #ifdef __HAVE_NO___THREAD #define __thread From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 10:07:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B60EA04; Sun, 12 Oct 2014 10:07:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB9E2134; Sun, 12 Oct 2014 10:07:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CA7QaF055727; Sun, 12 Oct 2014 10:07:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CA7Qve055726; Sun, 12 Oct 2014 10:07:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410121007.s9CA7Qve055726@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 12 Oct 2014 10:07:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272980 - head/contrib/netbsd-tests/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 10:07:27 -0000 Author: ngie Date: Sun Oct 12 10:07:26 2014 New Revision: 272980 URL: https://svnweb.freebsd.org/changeset/base/272980 Log: #include libutil.h for fparseln on FreeBSD Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c Modified: head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c Sun Oct 12 10:04:59 2014 (r272979) +++ head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c Sun Oct 12 10:07:26 2014 (r272980) @@ -36,6 +36,9 @@ #include #include #include +#if defined(__FreeBSD__) +#include +#endif #define SKIPWS(p) while (isspace((int)(*p))) p++ #define WS "\t\n " From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 13:12:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0DC38EA; Sun, 12 Oct 2014 13:12:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92F2C7B2; Sun, 12 Oct 2014 13:12:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CDC7co044634; Sun, 12 Oct 2014 13:12:07 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CDC6V9044630; Sun, 12 Oct 2014 13:12:06 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201410121312.s9CDC6V9044630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 12 Oct 2014 13:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272983 - in head/bin/sh: . tests/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 13:12:07 -0000 Author: jilles Date: Sun Oct 12 13:12:06 2014 New Revision: 272983 URL: https://svnweb.freebsd.org/changeset/base/272983 Log: sh: Fix break/continue/return in multiline eval. Example: eval $'return\necho bad' Added: head/bin/sh/tests/builtins/eval7.0 (contents, props changed) head/bin/sh/tests/builtins/eval8.7 (contents, props changed) Modified: head/bin/sh/eval.c head/bin/sh/tests/builtins/Makefile Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sun Oct 12 11:22:25 2014 (r272982) +++ head/bin/sh/eval.c Sun Oct 12 13:12:06 2014 (r272983) @@ -168,6 +168,8 @@ evalstring(char *s, int flags) else evaltree(n, flags); any = 1; + if (evalskip) + break; } popstackmark(&smark); setstackmark(&smark); Modified: head/bin/sh/tests/builtins/Makefile ============================================================================== --- head/bin/sh/tests/builtins/Makefile Sun Oct 12 11:22:25 2014 (r272982) +++ head/bin/sh/tests/builtins/Makefile Sun Oct 12 13:12:06 2014 (r272983) @@ -72,6 +72,8 @@ FILES+= eval3.0 FILES+= eval4.0 FILES+= eval5.0 FILES+= eval6.0 +FILES+= eval7.0 +FILES+= eval8.7 FILES+= exec1.0 FILES+= exec2.0 FILES+= exit1.0 Added: head/bin/sh/tests/builtins/eval7.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/eval7.0 Sun Oct 12 13:12:06 2014 (r272983) @@ -0,0 +1,9 @@ +# $FreeBSD$ +# Assumes that break can break out of a loop outside eval. + +while :; do + eval "break +echo bad1" + echo bad2 + exit 3 +done Added: head/bin/sh/tests/builtins/eval8.7 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/eval8.7 Sun Oct 12 13:12:06 2014 (r272983) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +f() { + eval "return 7 +echo bad2" +} +f From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 13:40:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29228E46; Sun, 12 Oct 2014 13:40:04 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id E00B897B; Sun, 12 Oct 2014 13:40:03 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 4062B780D56; Mon, 13 Oct 2014 00:39:55 +1100 (AEDT) Date: Mon, 13 Oct 2014 00:39:54 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r272952 - in head/sys: fs/ext2fs fs/msdosfs ufs/ffs In-Reply-To: <201410111909.s9BJ9ueU031008@svn.freebsd.org> Message-ID: <20141013003313.G932@besplex.bde.org> References: <201410111909.s9BJ9ueU031008@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=DsP2KuutBJYMnt7tX9YA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 13:40:04 -0000 On Sat, 11 Oct 2014, Konstantin Belousov wrote: > Log: > Do not set IN_ACCESS flag for read-only mounts. The IN_ACCESS > survives remount in rw, also it is set for vnodes on rootfs before > noatime can be set or clock is adjusted. All conditions result in > wrong atime for accessed vnodes. > > Submitted by: bde > MFC after: 1 week Thanks. > ... > Modified: head/sys/ufs/ffs/ffs_vnops.c > ============================================================================== > --- head/sys/ufs/ffs/ffs_vnops.c Sat Oct 11 18:58:58 2014 (r272951) > +++ head/sys/ufs/ffs/ffs_vnops.c Sat Oct 11 19:09:56 2014 (r272952) > @@ -627,7 +627,7 @@ ffs_read(ap) > } > > if ((error == 0 || uio->uio_resid != orig_resid) && > - (vp->v_mount->mnt_flag & MNT_NOATIME) == 0 && > + (vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0 && > (ip->i_flag & IN_ACCESS) == 0) { > VI_LOCK(vp); > ip->i_flag |= IN_ACCESS; > Is it correct for only ffs to acquire the vnode interlock? I think it is, but don't remember which ffs-only feature requires it. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 14:20:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EF493A7; Sun, 12 Oct 2014 14:20:23 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6AA5CC0; Sun, 12 Oct 2014 14:20:22 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s9CEKGpR029888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Oct 2014 17:20:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s9CEKGpR029888 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s9CEKGqF029887; Sun, 12 Oct 2014 17:20:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 12 Oct 2014 17:20:16 +0300 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r272952 - in head/sys: fs/ext2fs fs/msdosfs ufs/ffs Message-ID: <20141012142016.GI2153@kib.kiev.ua> References: <201410111909.s9BJ9ueU031008@svn.freebsd.org> <20141013003313.G932@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141013003313.G932@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 14:20:23 -0000 On Mon, Oct 13, 2014 at 12:39:54AM +1100, Bruce Evans wrote: > > @@ -627,7 +627,7 @@ ffs_read(ap) > > } > > > > if ((error == 0 || uio->uio_resid != orig_resid) && > > - (vp->v_mount->mnt_flag & MNT_NOATIME) == 0 && > > + (vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0 && > > (ip->i_flag & IN_ACCESS) == 0) { > > VI_LOCK(vp); > > ip->i_flag |= IN_ACCESS; > > > > Is it correct for only ffs to acquire the vnode interlock? I think it > is, but don't remember which ffs-only feature requires it. We either hold the vnode lock exclusive, or shared + own the vnode interlock, for i_flag modifications. Since this is ffs_read(), which is entered with the vnode shared locked, the interlock must be acquired. Both msdosfs and ext2fs do not enable the shared locking mode for the lockmgr locks serving as the vnodes locks, so msdosfs_read() and ext2_read() are executed with vnode locked exclusively. From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 15:49:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F3D9EFF; Sun, 12 Oct 2014 15:49:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AA09751; Sun, 12 Oct 2014 15:49:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CFnsXA020168; Sun, 12 Oct 2014 15:49:54 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CFnqwg020160; Sun, 12 Oct 2014 15:49:52 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201410121549.s9CFnqwg020160@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Sun, 12 Oct 2014 15:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272984 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 15:49:54 -0000 Author: rwatson Date: Sun Oct 12 15:49:52 2014 New Revision: 272984 URL: https://svnweb.freebsd.org/changeset/base/272984 Log: When deciding whether to call m_pullup() even though there is adequate data in an mbuf, use M_WRITABLE() instead of a direct test of M_EXT; the latter both unnecessarily exposes mbuf-allocator internals in the protocol stack and is also insufficient to catch all cases of non-writability. (NB: m_pullup() does not actually guarantee that a writable mbuf is returned, so further refinement of all of these code paths continues to be required.) Reviewed by: bz MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D900 Modified: head/sys/netinet/igmp.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_output.c head/sys/netinet6/icmp6.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/ip6_output.c Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Sun Oct 12 13:12:06 2014 (r272983) +++ head/sys/netinet/igmp.c Sun Oct 12 15:49:52 2014 (r272984) @@ -1466,7 +1466,7 @@ igmp_input(struct mbuf **mp, int *offp, minlen += IGMP_V3_QUERY_MINLEN; else minlen += IGMP_MINLEN; - if ((m->m_flags & M_EXT || m->m_len < minlen) && + if ((!M_WRITABLE(m) || m->m_len < minlen) && (m = m_pullup(m, minlen)) == 0) { IGMPSTAT_INC(igps_rcv_tooshort); return (IPPROTO_DONE); @@ -1557,7 +1557,7 @@ igmp_input(struct mbuf **mp, int *offp, */ igmpv3len = iphlen + IGMP_V3_QUERY_MINLEN + srclen; - if ((m->m_flags & M_EXT || + if ((!M_WRITABLE(m) || m->m_len < igmpv3len) && (m = m_pullup(m, igmpv3len)) == NULL) { IGMPSTAT_INC(igps_rcv_tooshort); Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Sun Oct 12 13:12:06 2014 (r272983) +++ head/sys/netinet/ip_mroute.c Sun Oct 12 15:49:52 2014 (r272984) @@ -121,7 +121,6 @@ __FBSDID("$FreeBSD$"); #endif #define VIFI_INVALID ((vifi_t) -1) -#define M_HASCL(m) ((m)->m_flags & M_EXT) static VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed this */ #define V_last_tv_sec VNET(last_tv_sec) @@ -1304,7 +1303,7 @@ X_ip_mforward(struct ip *ip, struct ifne } mb0 = m_copypacket(m, M_NOWAIT); - if (mb0 && (M_HASCL(mb0) || mb0->m_len < hlen)) + if (mb0 && (!M_WRITABLE(mb0) || mb0->m_len < hlen)) mb0 = m_pullup(mb0, hlen); if (mb0 == NULL) { free(rte, M_MRTABLE); @@ -1544,7 +1543,7 @@ ip_mdq(struct mbuf *m, struct ifnet *ifp int hlen = ip->ip_hl << 2; struct mbuf *mm = m_copy(m, 0, hlen); - if (mm && (M_HASCL(mm) || mm->m_len < hlen)) + if (mm && (!M_WRITABLE(mm) || mm->m_len < hlen)) mm = m_pullup(mm, hlen); if (mm == NULL) return ENOBUFS; @@ -1665,7 +1664,7 @@ phyint_send(struct ip *ip, struct vif *v * so that ip_output() only scribbles on the copy. */ mb_copy = m_copypacket(m, M_NOWAIT); - if (mb_copy && (M_HASCL(mb_copy) || mb_copy->m_len < hlen)) + if (mb_copy && (!M_WRITABLE(mb_copy) || mb_copy->m_len < hlen)) mb_copy = m_pullup(mb_copy, hlen); if (mb_copy == NULL) return; Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Sun Oct 12 13:12:06 2014 (r272983) +++ head/sys/netinet/ip_output.c Sun Oct 12 15:49:52 2014 (r272984) @@ -1365,7 +1365,7 @@ ip_mloopback(struct ifnet *ifp, struct m * modify the pack in order to generate checksums. */ copym = m_dup(m, M_NOWAIT); - if (copym != NULL && (copym->m_flags & M_EXT || copym->m_len < hlen)) + if (copym != NULL && (!M_WRITABLE(copym) || copym->m_len < hlen)) copym = m_pullup(copym, hlen); if (copym != NULL) { /* If needed, compute the checksum and mark it as valid. */ Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Sun Oct 12 13:12:06 2014 (r272983) +++ head/sys/netinet6/icmp6.c Sun Oct 12 15:49:52 2014 (r272984) @@ -63,6 +63,8 @@ #include __FBSDID("$FreeBSD$"); +#define MBUF_PRIVATE /* XXXRW: Optimisation tries to avoid M_EXT mbufs */ + #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" @@ -581,7 +583,7 @@ icmp6_input(struct mbuf **mp, int *offp, /* Give up remote */ break; } - if ((n->m_flags & M_EXT) != 0 + if (!M_WRITABLE(n) || n->m_len < off + sizeof(struct icmp6_hdr)) { struct mbuf *n0 = n; int n0len; Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Sun Oct 12 13:12:06 2014 (r272983) +++ head/sys/netinet6/ip6_mroute.c Sun Oct 12 15:49:52 2014 (r272984) @@ -126,9 +126,6 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_MRTABLE6, "mf6c", "multicast forwarding cache entry"); -/* XXX: this is a very common idiom; move to ? */ -#define M_HASCL(m) ((m)->m_flags & M_EXT) - static int ip6_mdq(struct mbuf *, struct ifnet *, struct mf6c *); static void phyint_send(struct ip6_hdr *, struct mif6 *, struct mbuf *); static int register_send(struct ip6_hdr *, struct mif6 *, struct mbuf *); @@ -1128,7 +1125,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, stru * Pullup packet header if needed before storing it, * as other references may modify it in the meantime. */ - if (mb0 && (M_HASCL(mb0) || mb0->m_len < sizeof(struct ip6_hdr))) + if (mb0 && (!M_WRITABLE(mb0) || mb0->m_len < sizeof(struct ip6_hdr))) mb0 = m_pullup(mb0, sizeof(struct ip6_hdr)); if (mb0 == NULL) { free(rte, M_MRTABLE6); @@ -1397,7 +1394,7 @@ ip6_mdq(struct mbuf *m, struct ifnet *if mm = m_copy(m, 0, sizeof(struct ip6_hdr)); if (mm && - (M_HASCL(mm) || + (!M_WRITABLE(mm) || mm->m_len < sizeof(struct ip6_hdr))) mm = m_pullup(mm, sizeof(struct ip6_hdr)); if (mm == NULL) @@ -1527,7 +1524,7 @@ phyint_send(struct ip6_hdr *ip6, struct */ mb_copy = m_copy(m, 0, M_COPYALL); if (mb_copy && - (M_HASCL(mb_copy) || mb_copy->m_len < sizeof(struct ip6_hdr))) + (!M_WRITABLE(mb_copy) || mb_copy->m_len < sizeof(struct ip6_hdr))) mb_copy = m_pullup(mb_copy, sizeof(struct ip6_hdr)); if (mb_copy == NULL) { return; Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Sun Oct 12 13:12:06 2014 (r272983) +++ head/sys/netinet6/ip6_output.c Sun Oct 12 15:49:52 2014 (r272984) @@ -1196,7 +1196,7 @@ ip6_insertfraghdr(struct mbuf *m0, struc for (mlast = n; mlast->m_next; mlast = mlast->m_next) ; - if ((mlast->m_flags & M_EXT) == 0 && + if (M_WRITABLE(mlast) && M_TRAILINGSPACE(mlast) >= sizeof(struct ip6_frag)) { /* use the trailing space of the last mbuf for the fragment hdr */ *frghdrp = (struct ip6_frag *)(mtod(mlast, caddr_t) + @@ -2918,7 +2918,7 @@ ip6_mloopback(struct ifnet *ifp, struct * is in an mbuf cluster, so that we can safely override the IPv6 * header portion later. */ - if ((copym->m_flags & M_EXT) != 0 || + if (!M_WRITABLE(copym) || copym->m_len < sizeof(struct ip6_hdr)) { copym = m_pullup(copym, sizeof(struct ip6_hdr)); if (copym == NULL) From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 17:50:26 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E6BEB13; Sun, 12 Oct 2014 17:50:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09E97272; Sun, 12 Oct 2014 17:50:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CHoPkF079116; Sun, 12 Oct 2014 17:50:25 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CHoPUm079115; Sun, 12 Oct 2014 17:50:25 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201410121750.s9CHoPUm079115@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 12 Oct 2014 17:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273003 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 17:50:26 -0000 Author: nwhitehorn Date: Sun Oct 12 17:50:25 2014 New Revision: 273003 URL: https://svnweb.freebsd.org/changeset/base/273003 Log: Centralize determination of boot firmware (UEFI vs. BIOS/CSM) into a function x86_bootmethod() and fix deviations from style(9). Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_x86.c Sun Oct 12 17:45:22 2014 (r273002) +++ head/usr.sbin/bsdinstall/partedit/partedit_x86.c Sun Oct 12 17:50:25 2014 (r273003) @@ -32,8 +32,21 @@ #include "partedit.h" -static char platform[255] = ""; -static const char *platform_sysctl = "machdep.bootmethod"; +static const char * +x86_bootmethod(void) +{ + static char fw[255] = ""; + size_t len = sizeof(fw); + int error; + + if (strlen(fw) == 0) { + error = sysctlbyname("machdep.bootmethod", fw, &len, NULL, -1); + if (error != 0) + return ("BIOS"); + } + + return (fw); +} const char * default_scheme(void) { @@ -41,14 +54,12 @@ default_scheme(void) { } int -is_scheme_bootable(const char *part_type) { - size_t platlen = sizeof(platform); - if (strlen(platform) == 0) - sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); +is_scheme_bootable(const char *part_type) +{ if (strcmp(part_type, "GPT") == 0) return (1); - if (strcmp(platform, "BIOS") == 0) { + if (strcmp(x86_bootmethod(), "BIOS") == 0) { if (strcmp(part_type, "BSD") == 0) return (1); if (strcmp(part_type, "MBR") == 0) @@ -59,31 +70,28 @@ is_scheme_bootable(const char *part_type } int -is_fs_bootable(const char *part_type, const char *fs) { - size_t platlen = sizeof(platform); - if (strlen(platform) == 0) - sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); +is_fs_bootable(const char *part_type, const char *fs) +{ if (strcmp(fs, "freebsd-ufs") == 0) return (1); - if (strcmp(fs, "freebsd-zfs") == 0 && strcmp(platform, "BIOS") == 0) + if (strcmp(fs, "freebsd-zfs") == 0 && + strcmp(x86_bootmethod(), "BIOS") == 0) return (1); return (0); } size_t -bootpart_size(const char *scheme) { - size_t platlen = sizeof(platform); - if (strlen(platform) == 0) - sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); +bootpart_size(const char *scheme) +{ /* No partcode except for GPT */ if (strcmp(scheme, "GPT") != 0) return (0); - if (strcmp(platform, "BIOS") == 0) + if (strcmp(x86_bootmethod(), "BIOS") == 0) return (512*1024); else return (800*1024); @@ -92,23 +100,20 @@ bootpart_size(const char *scheme) { } const char * -bootpart_type(const char *scheme) { - size_t platlen = sizeof(platform); - if (strlen(platform) == 0) - sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); +bootpart_type(const char *scheme) +{ - if (strcmp(platform, "UEFI") == 0) + if (strcmp(x86_bootmethod(), "UEFI") == 0) return ("efi"); return ("freebsd-boot"); } const char * -bootcode_path(const char *part_type) { - size_t platlen = sizeof(platform); - if (strlen(platform) == 0) - sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); - if (strcmp(platform, "UEFI") == 0) +bootcode_path(const char *part_type) +{ + + if (strcmp(x86_bootmethod(), "UEFI") == 0) return (NULL); if (strcmp(part_type, "GPT") == 0) @@ -122,13 +127,11 @@ bootcode_path(const char *part_type) { } const char * -partcode_path(const char *part_type, const char *fs_type) { - size_t platlen = sizeof(platform); - if (strlen(platform) == 0) - sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); +partcode_path(const char *part_type, const char *fs_type) +{ if (strcmp(part_type, "GPT") == 0) { - if (strcmp(platform, "UEFI") == 0) + if (strcmp(x86_bootmethod(), "UEFI") == 0) return ("/boot/boot1.efifat"); else if (strcmp(fs_type, "zfs") == 0) return ("/boot/gptzfsboot"); From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 17:56:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 859C8CA4; Sun, 12 Oct 2014 17:56:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71BC0351; Sun, 12 Oct 2014 17:56:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CHu3Vc082787; Sun, 12 Oct 2014 17:56:03 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CHu3Hp082786; Sun, 12 Oct 2014 17:56:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201410121756.s9CHu3Hp082786@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 12 Oct 2014 17:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273004 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 17:56:03 -0000 Author: ian Date: Sun Oct 12 17:56:02 2014 New Revision: 273004 URL: https://svnweb.freebsd.org/changeset/base/273004 Log: Use the FIFOs in the imx5/imx6 uart hardware instead of interrupting on each byte sent or received. Modified: head/sys/dev/uart/uart_dev_imx.c Modified: head/sys/dev/uart/uart_dev_imx.c ============================================================================== --- head/sys/dev/uart/uart_dev_imx.c Sun Oct 12 17:50:25 2014 (r273003) +++ head/sys/dev/uart/uart_dev_imx.c Sun Oct 12 17:56:02 2014 (r273004) @@ -49,6 +49,17 @@ __FBSDID("$FreeBSD$"); #include /* + * The hardare FIFOs are 32 bytes. We want an interrupt when there are 24 bytes + * available to read or space for 24 more bytes to write. While 8 bytes of + * slack before over/underrun might seem excessive, the hardware can run at + * 5mbps, which means 2uS per char, so at full speed 8 bytes provides only 16uS + * to get into the interrupt handler and service the fifo. + */ +#define IMX_FIFOSZ 32 +#define IMX_RXFIFO_LEVEL 24 +#define IMX_TXFIFO_LEVEL 24 + +/* * Low-level UART interface. */ static int imx_uart_probe(struct uart_bas *bas); @@ -187,6 +198,17 @@ imx_uart_init(struct uart_bas *bas, int SETREG(bas, REG(UBIR), 15); SETREG(bas, REG(UBMR), (baseclk / baudrate) - 1); } + + /* + * Program the tx lowater and rx hiwater levels at which fifo-service + * interrupts are signaled. The tx value is interpetted as "when there + * are only this many bytes remaining" (not "this many free"). + */ + reg = GETREG(bas, REG(UFCR)); + reg &= ~(IMXUART_UFCR_TXTL_MASK | IMXUART_UFCR_RXTL_MASK); + reg |= (IMX_FIFOSZ - IMX_TXFIFO_LEVEL) << IMXUART_UFCR_TXTL_SHIFT; + reg |= IMX_RXFIFO_LEVEL << IMXUART_UFCR_RXTL_SHIFT; + SETREG(bas, REG(UFCR), reg); } static void @@ -199,7 +221,7 @@ static void imx_uart_putc(struct uart_bas *bas, int c) { - while (!(IS(bas, USR2, TXFE))) + while (!(IS(bas, USR1, TRDY))) ; SETREG(bas, REG(UTXD), c); } @@ -302,11 +324,15 @@ imx_uart_bus_attach(struct uart_softc *s (void)imx_uart_bus_getsig(sc); - ENA(bas, UCR4, DREN); - DIS(bas, UCR1, RRDYEN); + /* Clear all pending interrupts. */ + SETREG(bas, REG(USR1), 0xffff); + SETREG(bas, REG(USR2), 0xffff); + + DIS(bas, UCR4, DREN); + ENA(bas, UCR1, RRDYEN); DIS(bas, UCR1, IDEN); DIS(bas, UCR3, RXDSEN); - DIS(bas, UCR2, ATEN); + ENA(bas, UCR2, ATEN); DIS(bas, UCR1, TXMPTYEN); DIS(bas, UCR1, TRDYEN); DIS(bas, UCR4, TCEN); @@ -330,9 +356,6 @@ imx_uart_bus_attach(struct uart_softc *s ENA(bas, UCR2, IRTS); ENA(bas, UCR3, RXDMUXSEL); - /* ACK all interrupts */ - SETREG(bas, REG(USR1), 0xffff); - SETREG(bas, REG(USR2), 0xffff); return (0); } @@ -404,7 +427,7 @@ imx_uart_bus_ipend(struct uart_softc *sc struct uart_bas *bas; int ipend; uint32_t usr1, usr2; - uint32_t ucr1, ucr4; + uint32_t ucr1, ucr2, ucr4; bas = &sc->sc_bas; ipend = 0; @@ -419,18 +442,28 @@ imx_uart_bus_ipend(struct uart_softc *sc SETREG(bas, REG(USR2), usr2); ucr1 = GETREG(bas, REG(UCR1)); + ucr2 = GETREG(bas, REG(UCR2)); ucr4 = GETREG(bas, REG(UCR4)); - if ((usr2 & FLD(USR2, TXFE)) && (ucr1 & FLD(UCR1, TXMPTYEN))) { - DIS(bas, UCR1, TXMPTYEN); - /* Continue TXing */ + /* If we have reached tx low-water, we can tx some more now. */ + if ((usr1 & FLD(USR1, TRDY)) && (ucr1 & FLD(UCR1, TRDYEN))) { + DIS(bas, UCR1, TRDYEN); ipend |= SER_INT_TXIDLE; } - if ((usr2 & FLD(USR2, RDR)) && (ucr4 & FLD(UCR4, DREN))) { - DIS(bas, UCR4, DREN); - /* Wow, new char on input */ + + /* + * If we have reached the rx high-water, or if there are bytes in the rx + * fifo and no new data has arrived for 8 character periods (aging + * timer), we have input data to process. + */ + if (((usr1 & FLD(USR1, RRDY)) && (ucr1 & FLD(UCR1, RRDYEN))) || + ((usr1 & FLD(USR1, AGTIM)) && (ucr2 & FLD(UCR2, ATEN)))) { + DIS(bas, UCR1, RRDYEN); + DIS(bas, UCR2, ATEN); ipend |= SER_INT_RXREADY; } + + /* A break can come in at any time, it never gets disabled. */ if ((usr2 & FLD(USR2, BRCD)) && (ucr4 & FLD(UCR4, BKEN))) ipend |= SER_INT_BREAK; @@ -459,8 +492,14 @@ imx_uart_bus_probe(struct uart_softc *sc if (error) return (error); - sc->sc_rxfifosz = 1; - sc->sc_txfifosz = 1; + /* + * On input we can read up to the full fifo size at once. On output, we + * want to write only as much as the programmed tx low water level, + * because that's all we can be certain we have room for in the fifo + * when we get a tx-ready interrupt. + */ + sc->sc_rxfifosz = IMX_FIFOSZ; + sc->sc_txfifosz = IMX_TXFIFO_LEVEL; device_set_desc(sc->sc_dev, "Freescale i.MX UART"); return (0); @@ -475,20 +514,20 @@ imx_uart_bus_receive(struct uart_softc * bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - /* Read while we have anything in FIFO */ + /* + * Empty the rx fifo. We get the RRDY interrupt when IMX_RXFIFO_LEVEL + * (the rx high-water level) is reached, but we set sc_rxfifosz to the + * full hardware fifo size, so we can safely process however much is + * there, not just the highwater size. + */ while (IS(bas, USR2, RDR)) { if (uart_rx_full(sc)) { /* No space left in input buffer */ sc->sc_rxbuf[sc->sc_rxput] = UART_STAT_OVERRUN; break; } - out = 0; xc = GETREG(bas, REG(URXD)); - - /* We have valid char */ - if (xc & FLD(URXD, CHARRDY)) - out = xc & 0x000000ff; - + out = xc & 0x000000ff; if (xc & FLD(URXD, FRMERR)) out |= UART_STAT_FRAMERR; if (xc & FLD(URXD, PRERR)) @@ -500,8 +539,8 @@ imx_uart_bus_receive(struct uart_softc * uart_rx_put(sc, out); } - /* Reenable Data Ready interrupt */ - ENA(bas, UCR4, DREN); + ENA(bas, UCR1, RRDYEN); + ENA(bas, UCR2, ATEN); uart_unlock(sc->sc_hwmtx); return (0); @@ -523,14 +562,17 @@ imx_uart_bus_transmit(struct uart_softc bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - /* Fill TX FIFO */ + /* + * Fill the tx fifo. The uart core puts at most IMX_TXFIFO_LEVEL bytes + * into the txbuf (because that's what sc_txfifosz is set to), and + * because we got the TRDY (low-water reached) interrupt we know at + * least that much space is available in the fifo. + */ for (i = 0; i < sc->sc_txdatasz; i++) { SETREG(bas, REG(UTXD), sc->sc_txbuf[i] & 0xff); } - sc->sc_txbusy = 1; - /* Call me when ready */ - ENA(bas, UCR1, TXMPTYEN); + ENA(bas, UCR1, TRDYEN); uart_unlock(sc->sc_hwmtx); @@ -544,7 +586,8 @@ imx_uart_bus_grab(struct uart_softc *sc) bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - DIS(bas, UCR4, DREN); + DIS(bas, UCR1, RRDYEN); + DIS(bas, UCR2, ATEN); uart_unlock(sc->sc_hwmtx); } @@ -555,6 +598,7 @@ imx_uart_bus_ungrab(struct uart_softc *s bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - ENA(bas, UCR4, DREN); + ENA(bas, UCR1, RRDYEN); + ENA(bas, UCR2, ATEN); uart_unlock(sc->sc_hwmtx); } From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 17:59:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE97EE1E; Sun, 12 Oct 2014 17:59:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D52C736E; Sun, 12 Oct 2014 17:59:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CHxVB4083218; Sun, 12 Oct 2014 17:59:31 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CHxVY4083217; Sun, 12 Oct 2014 17:59:31 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201410121759.s9CHxVY4083217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 12 Oct 2014 17:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273005 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 17:59:32 -0000 Author: nwhitehorn Date: Sun Oct 12 17:59:31 2014 New Revision: 273005 URL: https://svnweb.freebsd.org/changeset/base/273005 Log: Only allow ZFS boot on GPT; the MBR ZFS bootblocks cannot be installed using gpart bootcode as /boot/zfsboot needs to be split into multiple pieces by hand and copied to different areas of the partition. Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_x86.c Sun Oct 12 17:56:02 2014 (r273004) +++ head/usr.sbin/bsdinstall/partedit/partedit_x86.c Sun Oct 12 17:59:31 2014 (r273005) @@ -49,7 +49,8 @@ x86_bootmethod(void) } const char * -default_scheme(void) { +default_scheme(void) +{ return ("GPT"); } @@ -77,6 +78,7 @@ is_fs_bootable(const char *part_type, co return (1); if (strcmp(fs, "freebsd-zfs") == 0 && + strcmp(part_type, "GPT") == 0 && strcmp(x86_bootmethod(), "BIOS") == 0) return (1); From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 18:01:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D309EE; Sun, 12 Oct 2014 18:01:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6912C60C; Sun, 12 Oct 2014 18:01:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CI1tOj087171; Sun, 12 Oct 2014 18:01:55 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CI1qVW087154; Sun, 12 Oct 2014 18:01:52 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410121801.s9CI1qVW087154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 12 Oct 2014 18:01:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273006 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 18:01:55 -0000 Author: pfg Date: Sun Oct 12 18:01:52 2014 New Revision: 273006 URL: https://svnweb.freebsd.org/changeset/base/273006 Log: ddb: ANSI-fy function declarations. MFC after: 5 days Modified: head/sys/ddb/db_access.c head/sys/ddb/db_break.c head/sys/ddb/db_command.c head/sys/ddb/db_examine.c head/sys/ddb/db_input.c head/sys/ddb/db_lex.c head/sys/ddb/db_output.c head/sys/ddb/db_run.c head/sys/ddb/db_sym.c head/sys/ddb/db_watch.c head/sys/ddb/db_write_cmd.c Modified: head/sys/ddb/db_access.c ============================================================================== --- head/sys/ddb/db_access.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_access.c Sun Oct 12 18:01:52 2014 (r273006) @@ -54,10 +54,7 @@ static unsigned db_extend[] = { /* table #endif db_expr_t -db_get_value(addr, size, is_signed) - db_addr_t addr; - register int size; - boolean_t is_signed; +db_get_value(db_addr_t addr, int size, boolean_t is_signed) { char data[sizeof(u_int64_t)]; register db_expr_t value; @@ -87,10 +84,7 @@ db_get_value(addr, size, is_signed) } void -db_put_value(addr, size, value) - db_addr_t addr; - register int size; - register db_expr_t value; +db_put_value(db_addr_t addr, int size, db_expr_t value) { char data[sizeof(int)]; register int i; Modified: head/sys/ddb/db_break.c ============================================================================== --- head/sys/ddb/db_break.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_break.c Sun Oct 12 18:01:52 2014 (r273006) @@ -59,7 +59,7 @@ static void db_list_breakpoints(void); static void db_set_breakpoint(vm_map_t map, db_addr_t addr, int count); static db_breakpoint_t -db_breakpoint_alloc() +db_breakpoint_alloc(void) { register db_breakpoint_t bkpt; @@ -78,18 +78,14 @@ db_breakpoint_alloc() } static void -db_breakpoint_free(bkpt) - register db_breakpoint_t bkpt; +db_breakpoint_free(db_breakpoint_t bkpt) { bkpt->link = db_free_breakpoints; db_free_breakpoints = bkpt; } static void -db_set_breakpoint(map, addr, count) - vm_map_t map; - db_addr_t addr; - int count; +db_set_breakpoint(vm_map_t map, db_addr_t addr, int count) { register db_breakpoint_t bkpt; @@ -115,9 +111,7 @@ db_set_breakpoint(map, addr, count) } static void -db_delete_breakpoint(map, addr) - vm_map_t map; - db_addr_t addr; +db_delete_breakpoint(vm_map_t map, db_addr_t addr) { register db_breakpoint_t bkpt; register db_breakpoint_t *prev; @@ -140,9 +134,7 @@ db_delete_breakpoint(map, addr) } static db_breakpoint_t -db_find_breakpoint(map, addr) - vm_map_t map; - db_addr_t addr; +db_find_breakpoint(vm_map_t map, db_addr_t addr) { register db_breakpoint_t bkpt; @@ -158,8 +150,7 @@ db_find_breakpoint(map, addr) } db_breakpoint_t -db_find_breakpoint_here(addr) - db_addr_t addr; +db_find_breakpoint_here(db_addr_t addr) { return db_find_breakpoint(db_map_addr(addr), addr); } @@ -180,7 +171,7 @@ do { \ #endif void -db_set_breakpoints() +db_set_breakpoints(void) { register db_breakpoint_t bkpt; @@ -197,7 +188,7 @@ db_set_breakpoints() } void -db_clear_breakpoints() +db_clear_breakpoints(void) { register db_breakpoint_t bkpt; @@ -220,8 +211,7 @@ db_clear_breakpoints() * so the breakpoint does not have to be on the breakpoint list. */ db_breakpoint_t -db_set_temp_breakpoint(addr) - db_addr_t addr; +db_set_temp_breakpoint(db_addr_t addr) { register db_breakpoint_t bkpt; @@ -242,8 +232,7 @@ db_set_temp_breakpoint(addr) } void -db_delete_temp_breakpoint(bkpt) - db_breakpoint_t bkpt; +db_delete_temp_breakpoint(db_breakpoint_t bkpt) { BKPT_CLEAR(bkpt->address, &bkpt->bkpt_inst); db_breakpoint_free(bkpt); @@ -254,7 +243,7 @@ db_delete_temp_breakpoint(bkpt) * List breakpoints. */ static void -db_list_breakpoints() +db_list_breakpoints(void) { register db_breakpoint_t bkpt; @@ -278,11 +267,7 @@ db_list_breakpoints() /* Delete breakpoint */ /*ARGSUSED*/ void -db_delete_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_delete_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) { db_delete_breakpoint(db_map_addr(addr), (db_addr_t)addr); } @@ -290,11 +275,8 @@ db_delete_cmd(addr, have_addr, count, mo /* Set breakpoint with skip count */ /*ARGSUSED*/ void -db_breakpoint_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_breakpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, + char *modif) { if (count == -1) count = 1; @@ -304,11 +286,8 @@ db_breakpoint_cmd(addr, have_addr, count /* list breakpoints */ void -db_listbreak_cmd(dummy1, dummy2, dummy3, dummy4) - db_expr_t dummy1; - boolean_t dummy2; - db_expr_t dummy3; - char * dummy4; +db_listbreak_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, + char *dummy4) { db_list_breakpoints(); } @@ -320,8 +299,7 @@ db_listbreak_cmd(dummy1, dummy2, dummy3, */ boolean_t -db_map_equal(map1, map2) - vm_map_t map1, map2; +db_map_equal(vm_map_t map1, vm_map_t map2) { return ((map1 == map2) || ((map1 == NULL) && (map2 == kernel_map)) || @@ -329,8 +307,7 @@ db_map_equal(map1, map2) } boolean_t -db_map_current(map) - vm_map_t map; +db_map_current(vm_map_t map) { #if 0 thread_t thread; @@ -345,8 +322,7 @@ db_map_current(map) } vm_map_t -db_map_addr(addr) - vm_offset_t addr; +db_map_addr(vm_offset_t addr) { #if 0 thread_t thread; Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_command.c Sun Oct 12 18:01:52 2014 (r273006) @@ -157,7 +157,7 @@ static boolean_t db_ed_style = TRUE; * Utility routine - discard tokens through end-of-line. */ void -db_skip_to_eol() +db_skip_to_eol(void) { int t; do { @@ -252,11 +252,8 @@ db_command_unregister(struct command_tab * Helper function to match a single command. */ static void -db_cmd_match(name, cmd, cmdp, resultp) - char * name; - struct command *cmd; - struct command **cmdp; /* out */ - int * resultp; +db_cmd_match(char *name, struct command *cmd, struct command **cmdp, + int *resultp) { char *lp, *rp; int c; @@ -291,10 +288,7 @@ db_cmd_match(name, cmd, cmdp, resultp) * Search for command prefix. */ static int -db_cmd_search(name, table, cmdp) - char * name; - struct command_table *table; - struct command **cmdp; /* out */ +db_cmd_search(char *name, struct command_table *table, struct command **cmdp) { struct command *cmd; int result = CMD_NONE; @@ -315,8 +309,7 @@ db_cmd_search(name, table, cmdp) } static void -db_cmd_list(table) - struct command_table *table; +db_cmd_list(struct command_table *table) { register struct command *cmd; @@ -327,10 +320,8 @@ db_cmd_list(table) } static void -db_command(last_cmdp, cmd_table, dopager) - struct command **last_cmdp; /* IN_OUT */ - struct command_table *cmd_table; - int dopager; +db_command(struct command **last_cmdp, struct command_table *cmd_table, + int dopager) { struct command *cmd = NULL; int t; @@ -483,7 +474,7 @@ DB_COMMAND(panic, db_panic) } void -db_command_loop() +db_command_loop(void) { /* * Initialize 'prev' and 'next' to dot. @@ -521,8 +512,7 @@ db_command_script(const char *command) } void -db_error(s) - const char *s; +db_error(const char *s) { if (s) db_printf("%s", s); @@ -581,11 +571,7 @@ db_fncall_generic(db_expr_t addr, db_exp } static void -db_fncall(dummy1, dummy2, dummy3, dummy4) - db_expr_t dummy1; - boolean_t dummy2; - db_expr_t dummy3; - char * dummy4; +db_fncall(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) { db_expr_t fn_addr; db_expr_t args[DB_MAXARGS]; @@ -639,11 +625,7 @@ db_halt(db_expr_t dummy, boolean_t dummy } static void -db_kill(dummy1, dummy2, dummy3, dummy4) - db_expr_t dummy1; - boolean_t dummy2; - db_expr_t dummy3; - char * dummy4; +db_kill(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) { db_expr_t old_radix, pid, sig; struct proc *p; @@ -732,11 +714,7 @@ db_reset(db_expr_t addr, boolean_t have_ } static void -db_watchdog(dummy1, dummy2, dummy3, dummy4) - db_expr_t dummy1; - boolean_t dummy2; - db_expr_t dummy3; - char * dummy4; +db_watchdog(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) { db_expr_t old_radix, tout; int err, i; Modified: head/sys/ddb/db_examine.c ============================================================================== --- head/sys/ddb/db_examine.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_examine.c Sun Oct 12 18:01:52 2014 (r273006) @@ -52,11 +52,8 @@ static void db_search(db_addr_t, int, db */ /*ARGSUSED*/ void -db_examine_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_examine_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, + char *modif) { if (modif[0] != '\0') db_strcpy(db_examine_format, modif); @@ -68,11 +65,7 @@ db_examine_cmd(addr, have_addr, count, m } static void -db_examine(addr, fmt, count) - register - db_addr_t addr; - char * fmt; /* format string */ - int count; /* repeat count */ +db_examine(db_addr_t addr, char *fmt, int count) { int c; db_expr_t value; @@ -197,11 +190,8 @@ static char db_print_format = 'x'; /*ARGSUSED*/ void -db_print_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_print_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, + char *modif) { db_expr_t value; @@ -242,8 +232,7 @@ db_print_cmd(addr, have_addr, count, mod } void -db_print_loc_and_inst(loc) - db_addr_t loc; +db_print_loc_and_inst(db_addr_t loc) { db_printsym(loc, DB_STGY_PROC); db_printf(":\t"); @@ -255,11 +244,8 @@ db_print_loc_and_inst(loc) * Syntax: search [/bhl] addr value [mask] [,count] */ void -db_search_cmd(dummy1, dummy2, dummy3, dummy4) - db_expr_t dummy1; - boolean_t dummy2; - db_expr_t dummy3; - char * dummy4; +db_search_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, + char *dummy4) { int t; db_addr_t addr; @@ -323,13 +309,8 @@ db_search_cmd(dummy1, dummy2, dummy3, du } static void -db_search(addr, size, value, mask, count) - register - db_addr_t addr; - int size; - db_expr_t value; - db_expr_t mask; - unsigned int count; +db_search(db_addr_t addr, int size, db_expr_t value, db_expr_t mask, + unsigned int count) { while (count-- != 0) { db_prev = addr; Modified: head/sys/ddb/db_input.c ============================================================================== --- head/sys/ddb/db_input.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_input.c Sun Oct 12 18:01:52 2014 (r273006) @@ -346,7 +346,7 @@ db_readline(lstart, lsize) } void -db_check_interrupt() +db_check_interrupt(void) { register int c; Modified: head/sys/ddb/db_lex.c ============================================================================== --- head/sys/ddb/db_lex.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_lex.c Sun Oct 12 18:01:52 2014 (r273006) @@ -49,7 +49,7 @@ static int db_read_char(void); static void db_unread_char(int); int -db_read_line() +db_read_line(void) { int i; @@ -97,7 +97,7 @@ db_flush_line() static int db_look_char = 0; static int -db_read_char() +db_read_char(void) { int c; @@ -148,7 +148,7 @@ char db_tok_string[TOK_STRING_SIZE]; db_expr_t db_radix = 16; void -db_flush_lex() +db_flush_lex(void) { db_flush_line(); db_look_char = 0; @@ -156,7 +156,7 @@ db_flush_lex() } static int -db_lex() +db_lex(void) { int c; Modified: head/sys/ddb/db_output.c ============================================================================== --- head/sys/ddb/db_output.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_output.c Sun Oct 12 18:01:52 2014 (r273006) @@ -91,7 +91,7 @@ static void db_pager(void); * Force pending whitespace. */ void -db_force_whitespace() +db_force_whitespace(void) { register int last_print, next_tab; @@ -308,7 +308,7 @@ db_pager(void) * Return output position */ int -db_print_position() +db_print_position(void) { return (db_output_position); } Modified: head/sys/ddb/db_run.c ============================================================================== --- head/sys/ddb/db_run.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_run.c Sun Oct 12 18:01:52 2014 (r273006) @@ -78,8 +78,7 @@ db_breakpoint_t db_taken_bkpt = 0; #endif boolean_t -db_stop_at_pc(is_breakpoint) - boolean_t *is_breakpoint; +db_stop_at_pc(boolean_t *is_breakpoint) { register db_addr_t pc; register db_breakpoint_t bkpt; @@ -180,8 +179,7 @@ db_stop_at_pc(is_breakpoint) } void -db_restart_at_pc(watchpt) - boolean_t watchpt; +db_restart_at_pc(boolean_t watchpt) { register db_addr_t pc = PC_REGS(); @@ -328,11 +326,8 @@ db_single_step_cmd(addr, have_addr, coun /* trace and print until call/return */ /*ARGSUSED*/ void -db_trace_until_call_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_trace_until_call_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, + char *modif) { boolean_t print = FALSE; @@ -350,11 +345,8 @@ db_trace_until_call_cmd(addr, have_addr, /*ARGSUSED*/ void -db_trace_until_matching_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_trace_until_matching_cmd(db_expr_t addr, boolean_t have_addr, + db_expr_t count, char *modif) { boolean_t print = FALSE; @@ -374,11 +366,8 @@ db_trace_until_matching_cmd(addr, have_a /* continue */ /*ARGSUSED*/ void -db_continue_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_continue_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, + char *modif) { if (modif[0] == 'c') db_run_mode = STEP_COUNT; Modified: head/sys/ddb/db_sym.c ============================================================================== --- head/sys/ddb/db_sym.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_sym.c Sun Oct 12 18:01:52 2014 (r273006) @@ -170,11 +170,7 @@ db_var_curvnet(struct db_variable *vp, d * Add symbol table, with given name, to list of symbol tables. */ void -db_add_symbol_table(start, end, name, ref) - char *start; - char *end; - char *name; - char *ref; +db_add_symbol_table(char *start, char *end, char *name, char *ref) { if (db_nsymtab >= MAXNOSYMTABS) { printf ("No slots left for %s symbol table", name); @@ -195,9 +191,7 @@ db_add_symbol_table(start, end, name, re * overwritten by each call... but in practice this seems okay. */ static char * -db_qualify(sym, symtabname) - c_db_sym_t sym; - register char *symtabname; +db_qualify(c_db_sym_t sym, char *symtabname) { const char *symname; static char tmp[256]; @@ -209,10 +203,7 @@ db_qualify(sym, symtabname) boolean_t -db_eqname(src, dst, c) - const char *src; - const char *dst; - int c; +db_eqname(const char *src, const char *dst, int c) { if (!strcmp(src, dst)) return (TRUE); @@ -222,9 +213,7 @@ db_eqname(src, dst, c) } boolean_t -db_value_of_name(name, valuep) - const char *name; - db_expr_t *valuep; +db_value_of_name(const char *name, db_expr_t *valuep) { c_db_sym_t sym; @@ -236,9 +225,7 @@ db_value_of_name(name, valuep) } boolean_t -db_value_of_name_pcpu(name, valuep) - const char *name; - db_expr_t *valuep; +db_value_of_name_pcpu(const char *name, db_expr_t *valuep) { static char tmp[256]; db_expr_t value; @@ -261,9 +248,7 @@ db_value_of_name_pcpu(name, valuep) } boolean_t -db_value_of_name_vnet(name, valuep) - const char *name; - db_expr_t *valuep; +db_value_of_name_vnet(const char *name, db_expr_t *valuep) { #ifdef VIMAGE static char tmp[256]; @@ -296,8 +281,7 @@ db_value_of_name_vnet(name, valuep) * otherwise, all symbol tables will be searched. */ static c_db_sym_t -db_lookup(symstr) - const char *symstr; +db_lookup(const char *symstr) { c_db_sym_t sp; register int i; @@ -354,8 +338,7 @@ static volatile boolean_t db_qualify_amb * Used by db_symbol_values to decide whether to qualify a symbol. */ static boolean_t -db_symbol_is_ambiguous(sym) - c_db_sym_t sym; +db_symbol_is_ambiguous(c_db_sym_t sym) { const char *sym_name; register int i; @@ -381,10 +364,7 @@ db_symbol_is_ambiguous(sym) * and the difference between val and the symbol found. */ c_db_sym_t -db_search_symbol( val, strategy, offp) - register db_addr_t val; - db_strategy_t strategy; - db_expr_t *offp; +db_search_symbol(db_addr_t val, db_strategy_t strategy, db_expr_t *offp) { register unsigned int diff; @@ -409,10 +389,7 @@ db_search_symbol( val, strategy, offp) * Return name and value of a symbol */ void -db_symbol_values(sym, namep, valuep) - c_db_sym_t sym; - const char **namep; - db_expr_t *valuep; +db_symbol_values(c_db_sym_t sym, const char **namep, db_expr_t *valuep) { db_expr_t value; @@ -449,9 +426,7 @@ db_symbol_values(sym, namep, valuep) db_expr_t db_maxoff = 0x10000; void -db_printsym(off, strategy) - db_expr_t off; - db_strategy_t strategy; +db_printsym(db_expr_t off, db_strategy_t strategy) { db_expr_t d; char *filename; @@ -486,20 +461,13 @@ db_printsym(off, strategy) } static boolean_t -db_line_at_pc( sym, filename, linenum, pc) - c_db_sym_t sym; - char **filename; - int *linenum; - db_expr_t pc; +db_line_at_pc(c_db_sym_t sym, char **filename, int *linenum, db_expr_t pc) { return X_db_line_at_pc( db_last_symtab, sym, filename, linenum, pc); } int -db_sym_numargs(sym, nargp, argnames) - c_db_sym_t sym; - int *nargp; - char **argnames; +db_sym_numargs(c_db_sym_t sym, int *nargp, char **argnames) { return X_db_sym_numargs(db_last_symtab, sym, nargp, argnames); } Modified: head/sys/ddb/db_watch.c ============================================================================== --- head/sys/ddb/db_watch.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_watch.c Sun Oct 12 18:01:52 2014 (r273006) @@ -67,7 +67,7 @@ static void db_set_watchpoint(vm_map_t vm_size_t size); static db_watchpoint_t -db_watchpoint_alloc() +db_watchpoint_alloc(void) { register db_watchpoint_t watch; @@ -86,18 +86,14 @@ db_watchpoint_alloc() } static void -db_watchpoint_free(watch) - register db_watchpoint_t watch; +db_watchpoint_free(db_watchpoint_t watch) { watch->link = db_free_watchpoints; db_free_watchpoints = watch; } static void -db_set_watchpoint(map, addr, size) - vm_map_t map; - db_addr_t addr; - vm_size_t size; +db_set_watchpoint(vm_map_t map, db_addr_t addr, vm_size_t size) { register db_watchpoint_t watch; @@ -137,9 +133,7 @@ db_set_watchpoint(map, addr, size) } static void -db_delete_watchpoint(map, addr) - vm_map_t map; - db_addr_t addr; +db_delete_watchpoint(vm_map_t map, db_addr_t addr) { register db_watchpoint_t watch; register db_watchpoint_t *prev; @@ -159,7 +153,7 @@ db_delete_watchpoint(map, addr) } static void -db_list_watchpoints() +db_list_watchpoints(void) { register db_watchpoint_t watch; @@ -189,11 +183,8 @@ db_list_watchpoints() /* Delete watchpoint */ /*ARGSUSED*/ void -db_deletewatch_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_deletewatch_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, + char *modif) { db_delete_watchpoint(db_map_addr(addr), addr); } @@ -201,11 +192,8 @@ db_deletewatch_cmd(addr, have_addr, coun /* Set watchpoint */ /*ARGSUSED*/ void -db_watchpoint_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_watchpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, + char *modif) { vm_size_t size; db_expr_t value; @@ -230,7 +218,7 @@ DB_SHOW_COMMAND(watches, db_listwatch_cm } void -db_set_watchpoints() +db_set_watchpoints(void) { register db_watchpoint_t watch; @@ -248,17 +236,14 @@ db_set_watchpoints() } void -db_clear_watchpoints() +db_clear_watchpoints(void) { db_watchpoints_inserted = FALSE; } #ifdef notused static boolean_t -db_find_watchpoint(map, addr, regs) - vm_map_t map; - db_addr_t addr; - db_regs_t *regs; +db_find_watchpoint(vm_map_t map, db_addr_t addr, db_regs_t regs) { register db_watchpoint_t watch; db_watchpoint_t found = 0; @@ -295,11 +280,8 @@ db_find_watchpoint(map, addr, regs) /* Delete hardware watchpoint */ /*ARGSUSED*/ void -db_deletehwatch_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_deletehwatch_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, + char *modif) { int rc; @@ -314,11 +296,8 @@ db_deletehwatch_cmd(addr, have_addr, cou /* Set hardware watchpoint */ /*ARGSUSED*/ void -db_hwatchpoint_cmd(addr, have_addr, count, modif) - db_expr_t addr; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_hwatchpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, + char *modif) { int rc; Modified: head/sys/ddb/db_write_cmd.c ============================================================================== --- head/sys/ddb/db_write_cmd.c Sun Oct 12 17:59:31 2014 (r273005) +++ head/sys/ddb/db_write_cmd.c Sun Oct 12 18:01:52 2014 (r273006) @@ -43,11 +43,8 @@ __FBSDID("$FreeBSD$"); */ /*ARGSUSED*/ void -db_write_cmd(address, have_addr, count, modif) - db_expr_t address; - boolean_t have_addr; - db_expr_t count; - char * modif; +db_write_cmd(db_expr_t address, boolean_t have_addr, db_expr_t count, + char * modif) { register db_addr_t addr; From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 18:57:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAD0CC52; Sun, 12 Oct 2014 18:57:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7762AAE; Sun, 12 Oct 2014 18:57:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CIvNBH012130; Sun, 12 Oct 2014 18:57:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CIvNrC012128; Sun, 12 Oct 2014 18:57:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410121857.s9CIvNrC012128@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 12 Oct 2014 18:57:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273008 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 18:57:23 -0000 Author: mav Date: Sun Oct 12 18:57:22 2014 New Revision: 273008 URL: https://svnweb.freebsd.org/changeset/base/273008 Log: Remove stale comments. Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Sun Oct 12 18:53:45 2014 (r273007) +++ head/sys/cam/ctl/scsi_ctl.c Sun Oct 12 18:57:22 2014 (r273008) @@ -1513,11 +1513,6 @@ ctlfedone(struct cam_periph *periph, uni case CAM_MESSAGE_RECV: switch (inot->arg) { case MSG_ABORT_TASK_SET: - /* - * XXX KDM this isn't currently - * supported by CTL. It ends up - * being a no-op. - */ io->taskio.task_action = CTL_TASK_ABORT_TASK_SET; break; @@ -1534,11 +1529,6 @@ ctlfedone(struct cam_periph *periph, uni CTL_TASK_LUN_RESET; break; case MSG_CLEAR_TASK_SET: - /* - * XXX KDM this isn't currently - * supported by CTL. It ends up - * being a no-op. - */ io->taskio.task_action = CTL_TASK_CLEAR_TASK_SET; break; From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 19:12:49 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8B01EE; Sun, 12 Oct 2014 19:12:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B40B0C84; Sun, 12 Oct 2014 19:12:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CJCnZr021170; Sun, 12 Oct 2014 19:12:49 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CJCncl021168; Sun, 12 Oct 2014 19:12:49 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201410121912.s9CJCncl021168@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 12 Oct 2014 19:12:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273009 - in head: etc/devd sys/powerpc/powermac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 19:12:50 -0000 Author: jhibbits Date: Sun Oct 12 19:12:48 2014 New Revision: 273009 URL: https://svnweb.freebsd.org/changeset/base/273009 Log: Add an AC line monitor so power_profile can work Summary: Add a polling loop (1Hz) to monitor the battery and AC status, to notify devd like ACPI does for power monitoring. This allows /etc/rc.d/power_profile to work on PowerPC laptops Test Plan: Tested on a Titanium PowerBook, configuring economy_cpu_freq and performance_cpu_freq, disabling powerd. Reviewers: #powerpc, nwhitehorn Reviewed By: nwhitehorn Subscribers: rpaulo Differential Revision: https://reviews.freebsd.org/D937 Modified: head/etc/devd/apple.conf head/sys/powerpc/powermac/pmu.c Modified: head/etc/devd/apple.conf ============================================================================== --- head/etc/devd/apple.conf Sun Oct 12 18:57:22 2014 (r273008) +++ head/etc/devd/apple.conf Sun Oct 12 19:12:48 2014 (r273009) @@ -71,4 +71,10 @@ notify 0 { action "camcontrol eject cd0"; }; - +# Equivalent to the ACPI/ACAD notify +notify 10 { + match "system" "PMU"; + match "subsystem" "POWER"; + match "type" "ACLINE"; + action "/etc/rc.d/power_profile $notify"; +} Modified: head/sys/powerpc/powermac/pmu.c ============================================================================== --- head/sys/powerpc/powermac/pmu.c Sun Oct 12 18:57:22 2014 (r273008) +++ head/sys/powerpc/powermac/pmu.c Sun Oct 12 19:12:48 2014 (r273009) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -183,6 +184,9 @@ static int pmu_send(void *cookie, int cm static uint8_t pmu_read_reg(struct pmu_softc *sc, u_int offset); static void pmu_write_reg(struct pmu_softc *sc, u_int offset, uint8_t value); static int pmu_intr_state(struct pmu_softc *); +static void pmu_battquery_proc(void); +static void pmu_battery_notify(struct pmu_battstate *batt, + struct pmu_battstate *old); /* these values shows that number of data returned after 'send' cmd is sent */ static signed char pm_send_cmd_type[] = { @@ -256,6 +260,13 @@ static signed char pm_receive_cmd_type[] -1, -1, -1, -1, -1, -1, -1, -1, }; +static struct proc *pmubattproc; +static struct kproc_desc pmu_batt_kp = { + "pmu_batt", + pmu_battquery_proc, + &pmubattproc +}; + /* We only have one of each device, so globals are safe */ static device_t pmu = NULL; static device_t pmu_extint = NULL; @@ -420,6 +431,8 @@ pmu_attach(device_t dev) struct sysctl_oid *oid, *battroot; char battnum[2]; + /* Only start the battery monitor if we have a battery. */ + kproc_start(&pmu_batt_kp); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "acline", CTLTYPE_INT | CTLFLAG_RD, sc, 0, pmu_acline_state, "I", "AC Line Status"); @@ -914,6 +927,39 @@ pmu_query_battery(struct pmu_softc *sc, return (0); } +static void +pmu_battery_notify(struct pmu_battstate *batt, struct pmu_battstate *old) +{ + char notify_buf[16]; + int acline; + + acline = (batt->state & PMU_PWR_AC_PRESENT) ? 1 : 0; + if (acline != (old->state & PMU_PWR_AC_PRESENT)) { + snprintf(notify_buf, sizeof(notify_buf), + "notify=0x%02x", acline); + devctl_notify("PMU", "POWER", "ACLINE", notify_buf); + } +} + +static void +pmu_battquery_proc() +{ + struct pmu_softc *sc; + struct pmu_battstate batt; + struct pmu_battstate cur_batt; + int error; + + sc = device_get_softc(pmu); + + error = pmu_query_battery(sc, 0, &cur_batt); + while (1) { + error = pmu_query_battery(sc, 0, &batt); + pmu_battery_notify(&batt, &cur_batt); + cur_batt = batt; + pause("pmu_batt", hz); + } +} + static int pmu_acline_state(SYSCTL_HANDLER_ARGS) { From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 19:26:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7449B401; Sun, 12 Oct 2014 19:26:45 +0000 (UTC) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B6B9D9E; Sun, 12 Oct 2014 19:26:45 +0000 (UTC) Received: by mail-pa0-f49.google.com with SMTP id hz1so4700750pad.36 for ; Sun, 12 Oct 2014 12:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type; bh=87jH74/9qvlset8r6/roGGaYc7Yt6kF9sKyqPPdZTZ8=; b=BidBOJNuPY2dvpLH2IgbCnokynX3tZx4iZWtYzozhk/l6F7vPeMGpIXraSb+uYf//e f+jqHSNYzUqHfC6B92YdhpwcJ/Iz+PMP0drNK17bgAu1yGE94OMu6tNgMGyhbeWAjARc 48OR5LV0p1BmaSaBebxu9/drIRkmbrREII5oGQdDCPXPvtlns0iQcIR6S7ODv0wzPVPj jY8ylfpRJwXJsBAb9vsLw06t/YytHV+YMwzLwaFeDytK9kA/vrn+7tXwqwIxMtUVKv+I zSxnfWlX07hXkB1v95a0wbHrtCSqdIKpZIveFVf0cV2jkKNZwKmmD689BQVob49DFMws q3LA== X-Received: by 10.68.68.162 with SMTP id x2mr19210820pbt.40.1413142004883; Sun, 12 Oct 2014 12:26:44 -0700 (PDT) Received: from zhabar.attlocal.net (107-222-186-3.lightspeed.sntcca.sbcglobal.net. [107.222.186.3]) by mx.google.com with ESMTPSA id ki1sm9146593pdb.59.2014.10.12.12.26.43 for (version=SSLv3 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 12 Oct 2014 12:26:44 -0700 (PDT) Date: Sun, 12 Oct 2014 12:26:36 -0700 From: Justin Hibbits To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r273009 - in head: etc/devd sys/powerpc/powermac Message-ID: <20141012122636.4f1a0394@zhabar.attlocal.net> In-Reply-To: <201410121912.s9CJCncl021168@svn.freebsd.org> References: <201410121912.s9CJCncl021168@svn.freebsd.org> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; powerpc64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/JUsEfnoKWqwia1iGMlFxd4P"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 19:26:45 -0000 --Sig_/JUsEfnoKWqwia1iGMlFxd4P Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 12 Oct 2014 19:12:49 +0000 (UTC) Justin Hibbits wrote: > Author: jhibbits > Date: Sun Oct 12 19:12:48 2014 > New Revision: 273009 > URL: https://svnweb.freebsd.org/changeset/base/273009 >=20 > Log: > Add an AC line monitor so power_profile can work > =20 > Summary: > Add a polling loop (1Hz) to monitor the battery and AC status, to > notify devd like ACPI does for power monitoring. This > allows /etc/rc.d/power_profile to work on PowerPC laptops > =20 > Test Plan: > Tested on a Titanium PowerBook, configuring economy_cpu_freq and > performance_cpu_freq, disabling powerd. > =20 > Reviewers: #powerpc, nwhitehorn > =20 > Reviewed By: nwhitehorn > =20 > Subscribers: rpaulo > =20 > Differential Revision: https://reviews.freebsd.org/D937 >=20 MFC After: 3 weeks Relnotes: Yes (Can we add a template to arc to include those fields in arc messages?) - Justin --Sig_/JUsEfnoKWqwia1iGMlFxd4P Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUOtXuAAoJEDDHhY43vi25zQQH/i87aUuYRIQr186YSFUv9gqO YqPXbJgPrRJgNo6JPlV10/IzlYfPzFH3W3gLxeMVLdGSjnRUCags0BKvS7j/eQR9 +a9EPeu+uXkT8PMnNtLcUffWLkeB6+P6vEaLvWJIBPBlO+oDoefUojKagxgEMAS2 dhe0YKih0TPgcSrTO9fC3bzsNtNfmqSdE/LjVhPfNEUVbo8oF+xH2xQp7Q4Xyxbg aOmLlpEStGfAMcoZf177pPmDXVDSC8ReTPbsHkLiJJU3d1qQc8pk5AOykMaIniAu 1mYkPN0MLfXODVhDchcdTyV5IpnvscqM/o++Khm6EAApn9zgqSrUoD8WiKABnew= =ulT7 -----END PGP SIGNATURE----- --Sig_/JUsEfnoKWqwia1iGMlFxd4P-- From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 21:53:13 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D068F649; Sun, 12 Oct 2014 21:53:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC6B8DA8; Sun, 12 Oct 2014 21:53:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CLrDKm001298; Sun, 12 Oct 2014 21:53:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CLrDp5001297; Sun, 12 Oct 2014 21:53:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410122153.s9CLrDp5001297@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 12 Oct 2014 21:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273010 - head/contrib/netbsd-tests/lib/libc/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 21:53:13 -0000 Author: ngie Date: Sun Oct 12 21:53:13 2014 New Revision: 273010 URL: https://svnweb.freebsd.org/changeset/base/273010 Log: Implement 64MB memory limit for test to ensure that it fails reliably in 600 seconds; it would previously fail inconsistently when run in some virtual machine configurations This patch might need to be reverted or revisited later (see the attached PR for more details) PR: 169302 Submitted by: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Sun Oct 12 19:12:48 2014 (r273009) +++ head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Sun Oct 12 21:53:13 2014 (r273010) @@ -45,6 +45,9 @@ __RCSID("$NetBSD: t_exhaust.c,v 1.7 2011 #include #include #include +#if defined(__FreeBSD__) +#include +#endif #ifndef REGEX_MAXSIZE #define REGEX_MAXSIZE 9999 @@ -176,14 +179,25 @@ ATF_TC_HEAD(regcomp_too_big, tc) " crash, but return a proper error code"); // libtre needs it. atf_tc_set_md_var(tc, "timeout", "600"); +#if defined(__FreeBSD__) + atf_tc_set_md_var(tc, "require.memory", "64M"); +#else atf_tc_set_md_var(tc, "require.memory", "120M"); +#endif } ATF_TC_BODY(regcomp_too_big, tc) { regex_t re; +#if defined(__FreeBSD__) + struct rlimit limit; +#endif int e; +#if defined(__FreeBSD__) + limit.rlim_cur = limit.rlim_max = 64 * 1024 * 1024; + ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1); +#endif for (size_t i = 0; i < __arraycount(tests); i++) { char *d = (*tests[i].pattern)(REGEX_MAXSIZE); e = regcomp(&re, d, tests[i].type); From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 21:54:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84F5B80D; Sun, 12 Oct 2014 21:54:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 717C0DC0; Sun, 12 Oct 2014 21:54:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CLsuDR001578; Sun, 12 Oct 2014 21:54:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CLsu76001577; Sun, 12 Oct 2014 21:54:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410122154.s9CLsu76001577@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 12 Oct 2014 21:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273011 - head/contrib/netbsd-tests/lib/libc/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 21:54:56 -0000 Author: ngie Date: Sun Oct 12 21:54:55 2014 New Revision: 273011 URL: https://svnweb.freebsd.org/changeset/base/273011 Log: Fix compilation errors with missing wide-type headers and fix compilation warnings with -Wformat In collaboration with: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/debug.c Sun Oct 12 21:53:13 2014 (r273010) +++ head/contrib/netbsd-tests/lib/libc/regex/debug.c Sun Oct 12 21:54:55 2014 (r273011) @@ -34,6 +34,10 @@ #include #include +#if defined(__FreeBSD__) +#include +#include +#endif /* Don't sort these! */ #include "utils.h" @@ -50,6 +54,7 @@ static char *regchar(int); void regprint(regex_t *r, FILE *d) { +#if defined(__NetBSD__) struct re_guts *g = r->re_g; int c; int last; @@ -111,6 +116,7 @@ regprint(regex_t *r, FILE *d) } fprintf(d, "\n"); } +#endif } /* @@ -171,6 +177,7 @@ s_print(struct re_guts *g, FILE *d) break; case OANYOF: fprintf(d, "[(%ld)", (long)opnd); +#if defined(__NetBSD__) cs = &g->sets[opnd]; last = -1; for (size_t i = 0; i < g->csetsize+1; i++) /* +1 flushes */ @@ -187,6 +194,7 @@ s_print(struct re_guts *g, FILE *d) last = -1; } } +#endif fprintf(d, "]"); break; case OBACK_: @@ -242,7 +250,11 @@ s_print(struct re_guts *g, FILE *d) fprintf(d, ">"); break; default: +#if defined(__FreeBSD__) + fprintf(d, "!%ld(%ld)!", OP(*s), opnd); +#else fprintf(d, "!%d(%d)!", OP(*s), opnd); +#endif break; } if (!done) From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 21:59:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6531F9FE; Sun, 12 Oct 2014 21:59:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFB9DE9; Sun, 12 Oct 2014 21:59:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CLxOjX002214; Sun, 12 Oct 2014 21:59:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CLxOAK002213; Sun, 12 Oct 2014 21:59:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410122159.s9CLxOAK002213@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 12 Oct 2014 21:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273012 - head/contrib/netbsd-tests/lib/libc/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 21:59:24 -0000 Author: ngie Date: Sun Oct 12 21:59:23 2014 New Revision: 273012 URL: https://svnweb.freebsd.org/changeset/base/273012 Log: - Add libutil #include for fparseln - Change ATF_REQUIRE_EQ_MSG to ATF_CHECK_EQ_MSG to gather all failing results possible (currently 12 with leftassoc) - Mark leftassoc "atf_tc_expect_fail" on FreeBSD (PR coming soon after further analysis is done on the code) In collaboration with: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c Modified: head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c Sun Oct 12 21:54:55 2014 (r273011) +++ head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c Sun Oct 12 21:59:23 2014 (r273012) @@ -48,6 +48,9 @@ __RCSID("$NetBSD: t_regex_att.c,v 1.1 20 #include #include #include +#if defined(__FreeBSD__) +#include +#endif static const char sep[] = "\r\n\t"; static const char delim[3] = "\\\\\0"; @@ -374,7 +377,11 @@ checkmatches(const char *matches, size_t " cur=%d, max=%zu", res, l, len - off); off += l; } +#if defined(__FreeBSD__) + ATF_CHECK_STREQ_MSG(res, matches, " at line %zu", lineno); +#else ATF_REQUIRE_STREQ_MSG(res, matches, " at line %zu", lineno); +#endif free(res); } @@ -573,6 +580,9 @@ ATF_TC_BODY(leftassoc, tc) * any explation. Mark as broken here, but I don't know why. */ atf_tc_expect_fail("Reason for breakage unknown"); #endif +#if defined(__FreeBSD__) + atf_tc_expect_fail("The expected and matched groups are mismatched on FreeBSD"); +#endif att_test(tc, "leftassoc"); } From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 22:11:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C939D90; Sun, 12 Oct 2014 22:11:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 699CBF69; Sun, 12 Oct 2014 22:11:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CMBTM5010615; Sun, 12 Oct 2014 22:11:29 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CMBT58010614; Sun, 12 Oct 2014 22:11:29 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410122211.s9CMBT58010614@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sun, 12 Oct 2014 22:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273013 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 22:11:29 -0000 Author: hrs Date: Sun Oct 12 22:11:28 2014 New Revision: 273013 URL: https://svnweb.freebsd.org/changeset/base/273013 Log: s/-/_/ in name. Modified: head/etc/rc.d/bgfsck Modified: head/etc/rc.d/bgfsck ============================================================================== --- head/etc/rc.d/bgfsck Sun Oct 12 21:59:23 2014 (r273012) +++ head/etc/rc.d/bgfsck Sun Oct 12 22:11:28 2014 (r273013) @@ -9,7 +9,7 @@ . /etc/rc.subr -name="background-fsck" +name="background_fsck" rcvar="background_fsck" start_cmd="bgfsck_start" stop_cmd=":" From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 23:01:26 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F6768ED; Sun, 12 Oct 2014 23:01:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C8B66C2; Sun, 12 Oct 2014 23:01:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CN1PJE037061; Sun, 12 Oct 2014 23:01:25 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CN1Pxr037060; Sun, 12 Oct 2014 23:01:25 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201410122301.s9CN1Pxr037060@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Sun, 12 Oct 2014 23:01:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273014 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 23:01:26 -0000 Author: jch Date: Sun Oct 12 23:01:25 2014 New Revision: 273014 URL: https://svnweb.freebsd.org/changeset/base/273014 Log: A connection in TIME_WAIT state before calling close() actually did not received any RST packet. Do not set error to ECONNRESET in this case. Differential Revision: https://reviews.freebsd.org/D879 Reviewed by: rpaulo, adrian Approved by: jhb (mentor) Sponsored by: Verisign, Inc. Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Sun Oct 12 22:11:28 2014 (r273013) +++ head/sys/netinet/tcp_usrreq.c Sun Oct 12 23:01:25 2014 (r273014) @@ -592,7 +592,9 @@ tcp_usr_disconnect(struct socket *so) inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_disconnect: inp == NULL")); INP_WLOCK(inp); - if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + if (inp->inp_flags & INP_TIMEWAIT) + goto out; + if (inp->inp_flags & INP_DROPPED) { error = ECONNRESET; goto out; } From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 23:46:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B44CF5E; Sun, 12 Oct 2014 23:46:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48109A5E; Sun, 12 Oct 2014 23:46:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CNkPAB057230; Sun, 12 Oct 2014 23:46:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CNkPuw057229; Sun, 12 Oct 2014 23:46:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410122346.s9CNkPuw057229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 12 Oct 2014 23:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273015 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 23:46:25 -0000 Author: ngie Date: Sun Oct 12 23:46:24 2014 New Revision: 273015 URL: https://svnweb.freebsd.org/changeset/base/273015 Log: Expect nice_err to fail on FreeBSD with unprivileged users PR: 189821 Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_nice.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Sun Oct 12 23:01:25 2014 (r273014) +++ head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Sun Oct 12 23:46:24 2014 (r273015) @@ -72,6 +72,11 @@ ATF_TC_BODY(nice_err, tc) { int i; +#if defined(__FreeBSD__) + atf_tc_expect_fail("nice(incr) with incr < 0 fails with unprivileged " + "users and sets errno == EPERM; see PR # 189821 for more details"); +#endif + /* * The call should fail with EPERM if the * supplied parameter is negative and the From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 23:48:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67E491A5; Sun, 12 Oct 2014 23:48:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5410CA78; Sun, 12 Oct 2014 23:48:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CNmuuR057587; Sun, 12 Oct 2014 23:48:56 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CNmuuJ057586; Sun, 12 Oct 2014 23:48:56 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201410122348.s9CNmuuJ057586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 12 Oct 2014 23:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273016 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 12 Oct 2014 23:48:56 -0000 Author: jhibbits Date: Sun Oct 12 23:48:55 2014 New Revision: 273016 URL: https://svnweb.freebsd.org/changeset/base/273016 Log: Check error return from reading integer part of temperature. There's a very remote, but possible, chance that the integer part read will fail, but the fraction read succeeds, at which point the reported temperature is invalid. Reported by: Matthew Rezny MFC after: 3 weeks Modified: head/sys/dev/iicbus/max6690.c Modified: head/sys/dev/iicbus/max6690.c ============================================================================== --- head/sys/dev/iicbus/max6690.c Sun Oct 12 23:46:24 2014 (r273015) +++ head/sys/dev/iicbus/max6690.c Sun Oct 12 23:48:55 2014 (r273016) @@ -340,6 +340,10 @@ max6690_sensor_read(struct max6690_senso } err = max6690_read(sc->sc_dev, sc->sc_addr, reg_int, &integer); + + if (err < 0) + return (-1); + err = max6690_read(sc->sc_dev, sc->sc_addr, reg_ext, &fraction); if (err < 0) From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 00:34:00 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BD2A77D; Mon, 13 Oct 2014 00:34:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18428E73; Mon, 13 Oct 2014 00:34:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D0Xxw3081402; Mon, 13 Oct 2014 00:33:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D0XxVu081401; Mon, 13 Oct 2014 00:33:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410130033.s9D0XxVu081401@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Oct 2014 00:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273017 - head/contrib/netbsd-tests/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 00:34:00 -0000 Author: ngie Date: Mon Oct 13 00:33:59 2014 New Revision: 273017 URL: https://svnweb.freebsd.org/changeset/base/273017 Log: Add #include for printf Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c Modified: head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c Sun Oct 12 23:48:55 2014 (r273016) +++ head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c Mon Oct 13 00:33:59 2014 (r273017) @@ -66,6 +66,10 @@ __RCSID("$NetBSD: t_wcstod.c,v 1.3 2011/ #include +#if defined(__FreeBSD__) +#include +#endif + #define ALT_HUGE_VAL -1 #define ALT_MINUS_HUGE_VAL -2 #define ALT_NAN -3 From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 01:06:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6108C4C; Mon, 13 Oct 2014 01:06:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2B80199; Mon, 13 Oct 2014 01:06:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D16egO095712; Mon, 13 Oct 2014 01:06:40 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D16e6L095711; Mon, 13 Oct 2014 01:06:40 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201410130106.s9D16e6L095711@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Mon, 13 Oct 2014 01:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273018 - head/sys/dev/alc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 01:06:40 -0000 Author: yongari Date: Mon Oct 13 01:06:40 2014 New Revision: 273018 URL: https://svnweb.freebsd.org/changeset/base/273018 Log: Remove ALC_LOCK_ASSERT in alc_stop_queue(). This function is now called in device attach without holding a driver lock so it resulted in panic. Reported by: markj Modified: head/sys/dev/alc/if_alc.c Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Mon Oct 13 00:33:59 2014 (r273017) +++ head/sys/dev/alc/if_alc.c Mon Oct 13 01:06:40 2014 (r273018) @@ -4394,8 +4394,6 @@ alc_stop_queue(struct alc_softc *sc) uint32_t reg; int i; - ALC_LOCK_ASSERT(sc); - /* Disable RxQ. */ reg = CSR_READ_4(sc, ALC_RXQ_CFG); if ((sc->alc_flags & ALC_FLAG_AR816X_FAMILY) == 0) { From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 01:14:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86280F4F; Mon, 13 Oct 2014 01:14:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71B1B263; Mon, 13 Oct 2014 01:14:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D1E3rZ000236; Mon, 13 Oct 2014 01:14:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D1E1W5000225; Mon, 13 Oct 2014 01:14:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410130114.s9D1E1W5000225@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Oct 2014 01:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273019 - head/contrib/netbsd-tests/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 01:14:03 -0000 Author: ngie Date: Mon Oct 13 01:14:01 2014 New Revision: 273019 URL: https://svnweb.freebsd.org/changeset/base/273019 Log: Do initial port of contrib/netbsd-tests/lib/libc/locale t_io: - Expect failures potentially related to implementation-specific knowledge of the zh_TW.Big5 locale [*] t_mbrtowc: - Handle unknown locales more gracefully (do not test if the locale doesn't exist) - Expect failure with mbrtowc_internal dealing with Japanese locales (potentially related to implementation detail knowledge of the ja_* locales) [*]. t_mbstowcs, t_mbtowc, t_wctomb: - Handle unknown locales more gracefully (do not test if the locale doesn't exist) t_wcstod: - Treat FreeBSD like NetBSD and Linux in the XXX: FIXME section [*] More investigation is required to determine the root cause of the failures Submitted by: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/locale/t_io.c head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c Modified: head/contrib/netbsd-tests/lib/libc/locale/t_io.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_io.c Mon Oct 13 01:06:40 2014 (r273018) +++ head/contrib/netbsd-tests/lib/libc/locale/t_io.c Mon Oct 13 01:14:01 2014 (r273019) @@ -56,6 +56,11 @@ ATF_TC_BODY(bad_big5_wprintf, tc) /* XXX implementation detail knowledge (wchar_t encoding) */ wchar_t ibuf[] = { 0xcf10, 0 }; setlocale(LC_CTYPE, "zh_TW.Big5"); + +#if defined(__FreeBSD__) + atf_tc_expect_fail("does not fail as expected (may be implementation " + "specific issue with the test)"); +#endif ATF_REQUIRE_ERRNO(EILSEQ, wprintf(L"%ls\n", ibuf) < 0); ATF_REQUIRE(ferror(stdout)); } @@ -72,6 +77,11 @@ ATF_TC_BODY(bad_big5_swprintf, tc) wchar_t ibuf[] = { 0xcf10, 0 }; wchar_t obuf[20]; setlocale(LC_CTYPE, "zh_TW.Big5"); + +#if defined(__FreeBSD__) + atf_tc_expect_fail("does not fail as expected (may be implementation " + "specific issue with the test)"); +#endif ATF_REQUIRE_ERRNO(EILSEQ, swprintf(obuf, sizeof(obuf), L"%ls\n", ibuf) < 0); } @@ -161,6 +171,9 @@ ATF_TC_BODY(bad_big5_getwc, tc) ATF_REQUIRE(fp != NULL); setlocale(LC_CTYPE, "zh_TW.Big5"); +#if defined(__FreeBSD__) + atf_tc_expect_fail("does not return WEOF as expected"); +#endif ATF_REQUIRE_EQ(getwc(fp), WEOF); fclose(fp); } Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c Mon Oct 13 01:06:40 2014 (r273018) +++ head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c Mon Oct 13 01:14:01 2014 (r273019) @@ -132,7 +132,14 @@ h_ctype2(const struct test *t, bool use_ size_t n; ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C"); +#if defined(__NetBSD__) ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL); +#else + if (setlocale(LC_CTYPE, t->locale) == NULL) { + fprintf(stderr, "Locale %s not found.\n", t->locale); + return; + } +#endif (void)strvis(buf, t->data, VIS_WHITE | VIS_OCTAL); (void)printf("Checking string: \"%s\"\n", buf); @@ -238,6 +245,9 @@ ATF_TC_BODY(mbrtowc_internal, tc) { struct test *t; +#if defined(__FreeBSD__) + atf_tc_expect_fail("ja_* locale fails"); +#endif for (t = &tests[0]; t->data != NULL; ++t) h_ctype2(t, false); } Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Mon Oct 13 01:06:40 2014 (r273018) +++ head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Mon Oct 13 01:14:01 2014 (r273019) @@ -150,7 +150,14 @@ ATF_TC_BODY(mbstowcs_basic, tc) int i; ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C"); +#if defined(__NetBSD__) ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL); +#else + if (setlocale(LC_CTYPE, t->locale) == NULL) { + fprintf(stderr, "Locale %s not found.\n", t->locale); + continue; + } +#endif (void)strvis(visbuf, t->data, VIS_WHITE | VIS_OCTAL); (void)printf("Checking string: \"%s\"\n", visbuf); Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c Mon Oct 13 01:06:40 2014 (r273018) +++ head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c Mon Oct 13 01:14:01 2014 (r273019) @@ -76,7 +76,14 @@ h_mbtowc(const char *locale, const char char *str; ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C"); +#if defined(__NetBSD__) ATF_REQUIRE(setlocale(LC_CTYPE, locale) != NULL); +#else + if (setlocale(LC_CTYPE, locale) == NULL) { + fprintf(stderr, "Locale %s not found.\n", locale); + return; + } +#endif ATF_REQUIRE((str = setlocale(LC_ALL, NULL)) != NULL); (void)printf("Using locale: %s\n", str); @@ -130,9 +137,16 @@ ATF_TC_BODY(mbtowc, tc) h_mbtowc("ja_JP.ISO2022-JP", "\033$B", "\033$B$\"\033(B"); h_mbtowc("ja_JP.SJIS", "\202", "\202\240"); h_mbtowc("ja_JP.eucJP", "\244", "\244\242"); +#if !defined(__FreeBSD__) + /* Moved last as it fails */ h_mbtowc("zh_CN.GB18030", "\241", "\241\241"); +#endif h_mbtowc("zh_TW.Big5", "\241", "\241@"); h_mbtowc("zh_TW.eucTW", "\241", "\241\241"); +#if defined(__FreeBSD__) + atf_tc_expect_fail("zh_CN.GB18030"); + h_mbtowc("zh_CN.GB18030", "\241", "\241\241"); +#endif } ATF_TP_ADD_TCS(tp) Modified: head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c Mon Oct 13 01:06:40 2014 (r273018) +++ head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c Mon Oct 13 01:14:01 2014 (r273019) @@ -238,7 +238,7 @@ static struct test { { L" -0X.", 12, 0, 0 }, #endif /* XXX: FIXME */ -#if defined(__NetBSD__) || defined(__linux__) +#if defined(__NetBSD__) || defined(__linux__) || defined(__FreeBSD__) { L"0X.0", 4, 0, 0 }, { L"+0X.0", 5, 0, 0 }, { L"-0X.0", 5, 0, 0 }, Modified: head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c Mon Oct 13 01:06:40 2014 (r273018) +++ head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c Mon Oct 13 01:14:01 2014 (r273019) @@ -109,7 +109,14 @@ h_wctomb(const struct test *t, char tc) size_t sz, ret, i; ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C"); +#if defined(__NetBSD__) ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL); +#else + if (setlocale(LC_CTYPE, t->locale) == NULL) { + fprintf(stderr, "Locale %s not found.\n", t->locale); + return; + } +#endif (void)strvis(buf, t->data, VIS_WHITE | VIS_OCTAL); (void)printf("Checking sequence: \"%s\"\n", buf); From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 02:23:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA6DE961; Mon, 13 Oct 2014 02:23:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6AE1A4E; Mon, 13 Oct 2014 02:23:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D2NOJD032955; Mon, 13 Oct 2014 02:23:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D2NOCY032954; Mon, 13 Oct 2014 02:23:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410130223.s9D2NOCY032954@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Oct 2014 02:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273020 - head/contrib/netbsd-tests/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 02:23:25 -0000 Author: ngie Date: Mon Oct 13 02:23:24 2014 New Revision: 273020 URL: https://svnweb.freebsd.org/changeset/base/273020 Log: memmem with NUL length "needle" (aka small) strings on FreeBSD/OSX returns NULL instead of the "haystack" value (aka big) Submitted by: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/string/t_memmem.c Modified: head/contrib/netbsd-tests/lib/libc/string/t_memmem.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_memmem.c Mon Oct 13 01:14:01 2014 (r273019) +++ head/contrib/netbsd-tests/lib/libc/string/t_memmem.c Mon Oct 13 02:23:24 2014 (r273020) @@ -75,8 +75,13 @@ ATF_TC_HEAD(memmem_basic, tc) ATF_TC_BODY(memmem_basic, tc) { +#if defined(__darwin__) || defined(__FreeBSD__) + expect(memmem(b2, lb2, p0, lp0) == NULL); + expect(memmem(b0, lb0, p0, lp0) == NULL); +#else expect(memmem(b2, lb2, p0, lp0) == b2); expect(memmem(b0, lb0, p0, lp0) == b0); +#endif expect(memmem(b0, lb0, p1, lp1) == NULL); expect(memmem(b1, lb1, p1, lp1) == NULL); From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 02:28:00 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37039B1E; Mon, 13 Oct 2014 02:28:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23531A7A; Mon, 13 Oct 2014 02:28:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D2S0R8033531; Mon, 13 Oct 2014 02:28:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D2RxSb033529; Mon, 13 Oct 2014 02:27:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410130227.s9D2RxSb033529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Oct 2014 02:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273021 - head/contrib/netbsd-tests/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 02:28:00 -0000 Author: ngie Date: Mon Oct 13 02:27:59 2014 New Revision: 273021 URL: https://svnweb.freebsd.org/changeset/base/273021 Log: Use 1 as a random seed, as recommended in srandom(3). Adjust the random values accordingly Submitted by: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Modified: head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Mon Oct 13 02:23:24 2014 (r273020) +++ head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Mon Oct 13 02:27:59 2014 (r273021) @@ -51,7 +51,11 @@ unsigned char *start[BLOCKTYPES] = { }; char result[100]; +#if defined(__NetBSD__) const char goodResult[] = "7b405d24bc03195474c70ddae9e1f8fb"; +#else +const char goodResult[] = "217b4fbe456916bf62a2f85df752e4ab"; +#endif static void runTest(unsigned char *b1, unsigned char *b2) @@ -89,7 +93,15 @@ ATF_TC_BODY(memcpy_basic, tc) start[2] = auto1; start[3] = auto2; +#if defined(__NetBSD__) srandom(0L); +#else + /* + * random() shall produce by default a sequence of numbers that can be + * duplicated by calling srandom() with 1 as the seed. + */ + srandom(1); +#endif MD5Init(mc); for (i = 0; i < BLOCKTYPES; ++i) for (j = 0; j < BLOCKTYPES; ++j) From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 02:29:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE1B4C90; Mon, 13 Oct 2014 02:29:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA5D1A95; Mon, 13 Oct 2014 02:29:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D2TxhT033871; Mon, 13 Oct 2014 02:29:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D2TxkQ033870; Mon, 13 Oct 2014 02:29:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410130229.s9D2TxkQ033870@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Oct 2014 02:29:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273022 - head/contrib/netbsd-tests/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 02:29:59 -0000 Author: ngie Date: Mon Oct 13 02:29:58 2014 New Revision: 273022 URL: https://svnweb.freebsd.org/changeset/base/273022 Log: Add #include to get sys_nerr definition Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/string/t_strerror.c Modified: head/contrib/netbsd-tests/lib/libc/string/t_strerror.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_strerror.c Mon Oct 13 02:27:59 2014 (r273021) +++ head/contrib/netbsd-tests/lib/libc/string/t_strerror.c Mon Oct 13 02:29:58 2014 (r273022) @@ -37,6 +37,10 @@ __RCSID("$NetBSD: t_strerror.c,v 1.3 201 #include #include +#if defined(__FreeBSD__) +#include +#endif + ATF_TC(strerror_basic); ATF_TC_HEAD(strerror_basic, tc) { From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 02:32:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8300AE15; Mon, 13 Oct 2014 02:32:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F2B7B53; Mon, 13 Oct 2014 02:32:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D2WcKi037690; Mon, 13 Oct 2014 02:32:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D2WcZu037689; Mon, 13 Oct 2014 02:32:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410130232.s9D2WcZu037689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Oct 2014 02:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273023 - head/contrib/netbsd-tests/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 02:32:38 -0000 Author: ngie Date: Mon Oct 13 02:32:37 2014 New Revision: 273023 URL: https://svnweb.freebsd.org/changeset/base/273023 Log: __isnanl is automatically picked according to data type in . There isn't a need for the explicit __isnanl test Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Mon Oct 13 02:29:58 2014 (r273022) +++ head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Mon Oct 13 02:32:37 2014 (r273023) @@ -221,7 +221,9 @@ ATF_TC_BODY(strtold_nan, tc) volatile long double ld = strtold(nan_string, &end); ATF_REQUIRE(isnan(ld) != 0); +#if !defined(__FreeBSD__) ATF_REQUIRE(__isnanl(ld) != 0); +#endif ATF_REQUIRE(strcmp(end, "y") == 0); # else atf_tc_skip("Requires long double support"); From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 02:44:36 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E4B718A; Mon, 13 Oct 2014 02:44:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A7DFC3C; Mon, 13 Oct 2014 02:44:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D2iaTE042531; Mon, 13 Oct 2014 02:44:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D2iama042530; Mon, 13 Oct 2014 02:44:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410130244.s9D2iama042530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Oct 2014 02:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273024 - head/contrib/netbsd-tests/lib/libc/time X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 02:44:36 -0000 Author: ngie Date: Mon Oct 13 02:44:35 2014 New Revision: 273024 URL: https://svnweb.freebsd.org/changeset/base/273024 Log: Only test the return value in mktime_negyear Testing for the errno is an optional requirement according to POSIX, and FreeBSD doesn't document that errno would be set on failure with mktime Submitted by: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/time/t_mktime.c Modified: head/contrib/netbsd-tests/lib/libc/time/t_mktime.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/time/t_mktime.c Mon Oct 13 02:32:37 2014 (r273023) +++ head/contrib/netbsd-tests/lib/libc/time/t_mktime.c Mon Oct 13 02:44:35 2014 (r273024) @@ -72,7 +72,12 @@ ATF_TC_BODY(mktime_negyear, tc) errno = 0; t = mktime(&tms); +#if defined(__FreeBSD__) + /* Open Group says "and may set errno to indicate the error" */ + ATF_REQUIRE(t == (time_t)-1); +#else ATF_REQUIRE_ERRNO(0, t != (time_t)-1); +#endif } ATF_TC(timegm_epoch); From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 03:55:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F2F2B56; Mon, 13 Oct 2014 03:55:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6018E3D4; Mon, 13 Oct 2014 03:55:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D3tmQ6075836; Mon, 13 Oct 2014 03:55:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D3tmAi075834; Mon, 13 Oct 2014 03:55:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410130355.s9D3tmAi075834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Oct 2014 03:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273025 - head/contrib/netbsd-tests/lib/libc/time X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 03:55:48 -0000 Author: ngie Date: Mon Oct 13 03:55:47 2014 New Revision: 273025 URL: https://svnweb.freebsd.org/changeset/base/273025 Log: Change ATF_REQUIRE_MSG calls to ATF_CHECK_MSG to get as many errors as possible t_strptime:common.. - Expect the testcase body as a whole to fail. Multiple PRs will be filed to track the issues (there are 18 check failures) t_strptime:day.. - %EA and %OA seem to be case insensitive on FreeBSD Modified: head/contrib/netbsd-tests/lib/libc/time/t_strptime.c Modified: head/contrib/netbsd-tests/lib/libc/time/t_strptime.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/time/t_strptime.c Mon Oct 13 02:44:35 2014 (r273024) +++ head/contrib/netbsd-tests/lib/libc/time/t_strptime.c Mon Oct 13 03:55:47 2014 (r273025) @@ -49,6 +49,17 @@ h_pass(const char *buf, const char *fmt, exp = buf + len; ret = strptime(buf, fmt, &tm); +#if defined(__FreeBSD__) + ATF_CHECK_MSG(ret == exp, + "strptime(\"%s\", \"%s\", tm): incorrect return code: " + "expected: %p, got: %p", buf, fmt, exp, ret); + +#define H_REQUIRE_FIELD(field) \ + ATF_CHECK_MSG(tm.field == field, \ + "strptime(\"%s\", \"%s\", tm): incorrect %s: " \ + "expected: %d, but got: %d", buf, fmt, \ + ___STRING(field), field, tm.field) +#else ATF_REQUIRE_MSG(ret == exp, "strptime(\"%s\", \"%s\", tm): incorrect return code: " "expected: %p, got: %p", buf, fmt, exp, ret); @@ -58,6 +69,7 @@ h_pass(const char *buf, const char *fmt, "strptime(\"%s\", \"%s\", tm): incorrect %s: " \ "expected: %d, but got: %d", buf, fmt, \ ___STRING(field), field, tm.field) +#endif H_REQUIRE_FIELD(tm_sec); H_REQUIRE_FIELD(tm_min); @@ -76,8 +88,13 @@ h_fail(const char *buf, const char *fmt) { struct tm tm = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, NULL }; +#if defined(__FreeBSD__) + ATF_CHECK_MSG(strptime(buf, fmt, &tm) == NULL, "strptime(\"%s\", " + "\"%s\", &tm) should fail, but it didn't", buf, fmt); +#else ATF_REQUIRE_MSG(strptime(buf, fmt, &tm) == NULL, "strptime(\"%s\", " "\"%s\", &tm) should fail, but it didn't", buf, fmt); +#endif } ATF_TC(common); @@ -91,6 +108,10 @@ ATF_TC_HEAD(common, tc) ATF_TC_BODY(common, tc) { +#if defined(__FreeBSD__) + atf_tc_expect_fail("There are various issues with strptime on FreeBSD"); +#endif + h_pass("Tue Jan 20 23:27:46 1998", "%a %b %d %T %Y", 24, 46, 27, 23, 20, 0, 98, 2, -1); h_pass("Tue Jan 20 23:27:46 1998", "%a %b %d %H:%M:%S %Y", @@ -168,9 +189,17 @@ ATF_TC_BODY(day, tc) h_pass("mon", "%a", 3, -1, -1, -1, -1, -1, -1, 1, -1); h_pass("tueSDay", "%A", 7, -1, -1, -1, -1, -1, -1, 2, -1); h_pass("sunday", "%A", 6, -1, -1, -1, -1, -1, -1, 0, -1); +#if defined(__NetBSD__) h_fail("sunday", "%EA"); +#else + h_pass("Sunday", "%EA", 6, -1, -1, -1, -1, -1, -1, 0, -1); +#endif h_pass("SaturDay", "%A", 8, -1, -1, -1, -1, -1, -1, 6, -1); +#if defined(__NetBSD__) h_fail("SaturDay", "%OA"); +#else + h_pass("SaturDay", "%OA", 8, -1, -1, -1, -1, -1, -1, 6, -1); +#endif } ATF_TC(month); From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 05:34:11 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13CB6CB1; Mon, 13 Oct 2014 05:34:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F33BBE5C; Mon, 13 Oct 2014 05:34:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D5YAfu022729; Mon, 13 Oct 2014 05:34:10 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D5YA3M022728; Mon, 13 Oct 2014 05:34:10 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410130534.s9D5YA3M022728@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 13 Oct 2014 05:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273026 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 05:34:11 -0000 Author: delphij Date: Mon Oct 13 05:34:10 2014 New Revision: 273026 URL: https://svnweb.freebsd.org/changeset/base/273026 Log: Add a tunable for arc_shrink_shift (vfs.zfs.arc_shrink_shift) that controls how much fraction, 1/2^arc_shrink_shift, should be reclaimed when there is memory pressure. Submitted by: Richard Kojedzinszky MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Oct 13 03:55:47 2014 (r273025) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Oct 13 05:34:10 2014 (r273026) @@ -217,6 +217,7 @@ SYSINIT(arc_free_target_init, SI_SUB_KTH arc_free_target_init, NULL); TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit); +TUNABLE_INT("vfs.zfs.arc_shrink_shift", &zfs_arc_shrink_shift); SYSCTL_DECL(_vfs_zfs); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, "Maximum ARC size"); @@ -225,6 +226,10 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_average_blocksize, CTLFLAG_RDTUN, &zfs_arc_average_blocksize, 0, "ARC average blocksize"); +SYSCTL_INT(_vfs_zfs, OID_AUTO, arc_shrink_shift, CTLFLAG_RW, + &arc_shrink_shift, 0, + "log2(fraction of arc to reclaim)"); + /* * We don't have a tunable for arc_free_target due to the dependency on * pagedaemon initialisation. From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 06:50:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CA25C3E; Mon, 13 Oct 2014 06:50:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED118826; Mon, 13 Oct 2014 06:50:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D6o86b056114; Mon, 13 Oct 2014 06:50:08 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D6o8Qf056113; Mon, 13 Oct 2014 06:50:08 GMT (envelope-from np@FreeBSD.org) Message-Id: <201410130650.s9D6o8Qf056113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 13 Oct 2014 06:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273027 - head/sys/dev/random X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 06:50:09 -0000 Author: np Date: Mon Oct 13 06:50:08 2014 New Revision: 273027 URL: https://svnweb.freebsd.org/changeset/base/273027 Log: Make sure correct object code is generated at -O0. Submitted by: grehan@ Approved by: so@ (des) MFC after: 1 month Modified: head/sys/dev/random/ivy.c Modified: head/sys/dev/random/ivy.c ============================================================================== --- head/sys/dev/random/ivy.c Mon Oct 13 05:34:10 2014 (r273026) +++ head/sys/dev/random/ivy.c Mon Oct 13 06:50:08 2014 (r273027) @@ -79,7 +79,7 @@ ivy_rng_store(long *buf) "2:\n\t" "mov %2,%1\n\t" /* *buf = tmp */ "3:" - : "+q" (retry), "=m" (*buf), "=q" (tmp) : : "cc"); + : "+q" (retry), "=m" (*buf), "+q" (tmp) : : "cc"); return (retry); #else /* __GNUCLIKE_ASM */ return (0); From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 06:51:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07A49D80; Mon, 13 Oct 2014 06:51:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD591833; Mon, 13 Oct 2014 06:51:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D6pfIR057396; Mon, 13 Oct 2014 06:51:41 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D6pfJ8057392; Mon, 13 Oct 2014 06:51:41 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201410130651.s9D6pfJ8057392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Mon, 13 Oct 2014 06:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273028 - in head/sys/dev: msk nfe sk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 06:51:42 -0000 Author: rwatson Date: Mon Oct 13 06:51:40 2014 New Revision: 273028 URL: https://svnweb.freebsd.org/changeset/base/273028 Log: Eliminate unnecessary checking for M_EXT on mbufs returned by m_getjcl(). Reviewed by: bz, glebius, yongari MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D938 Modified: head/sys/dev/msk/if_msk.c head/sys/dev/nfe/if_nfe.c head/sys/dev/sk/if_sk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon Oct 13 06:50:08 2014 (r273027) +++ head/sys/dev/msk/if_msk.c Mon Oct 13 06:51:40 2014 (r273028) @@ -962,10 +962,6 @@ msk_jumbo_newbuf(struct msk_if_softc *sc m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); if (m == NULL) return (ENOBUFS); - if ((m->m_flags & M_EXT) == 0) { - m_freem(m); - return (ENOBUFS); - } m->m_len = m->m_pkthdr.len = MJUM9BYTES; if ((sc_if->msk_flags & MSK_FLAG_RAMBUF) == 0) m_adj(m, ETHER_ALIGN); Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Mon Oct 13 06:50:08 2014 (r273027) +++ head/sys/dev/nfe/if_nfe.c Mon Oct 13 06:51:40 2014 (r273028) @@ -2063,10 +2063,6 @@ nfe_jnewbuf(struct nfe_softc *sc, int id m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); if (m == NULL) return (ENOBUFS); - if ((m->m_flags & M_EXT) == 0) { - m_freem(m); - return (ENOBUFS); - } m->m_pkthdr.len = m->m_len = MJUM9BYTES; m_adj(m, ETHER_ALIGN); Modified: head/sys/dev/sk/if_sk.c ============================================================================== --- head/sys/dev/sk/if_sk.c Mon Oct 13 06:50:08 2014 (r273027) +++ head/sys/dev/sk/if_sk.c Mon Oct 13 06:51:40 2014 (r273028) @@ -1012,10 +1012,6 @@ sk_jumbo_newbuf(sc_if, idx) m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); if (m == NULL) return (ENOBUFS); - if ((m->m_flags & M_EXT) == 0) { - m_freem(m); - return (ENOBUFS); - } m->m_pkthdr.len = m->m_len = MJUM9BYTES; /* * Adjust alignment so packet payload begins on a From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 07:38:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7855C5C4 for ; Mon, 13 Oct 2014 07:38:20 +0000 (UTC) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com [209.85.217.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F01CABE0 for ; Mon, 13 Oct 2014 07:38:19 +0000 (UTC) Received: by mail-lb0-f171.google.com with SMTP id z12so5957196lbi.16 for ; Mon, 13 Oct 2014 00:38:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=la1/8aDN+reqkPlPOc5C552sLaWZ5d8EZaPRaW6JVQQ=; b=DEhbLQWoKC22z4PZ2iFpx1pM89uu9c2en6yOuYxZLSHL0qhKN/j2rR3UjdaEf2Nz0b Drbm/AJloIOo+x0Zb43onwzUbxQ249uYu05ec/IKgV/7xhiUr9IS8rrMTfUtN31qOUcY 23U9jQKTYOMRiSbUGLaD8xUUSuVlAiKm1yJrFnRfz52Kys1GG/Y5kf2Ycfl+1IjYdodJ avyEnL+nCqZVouCogc5ipshImMngZ99AWXW+f6wJqzRpkBP9yYu6ZVicUrtTrdW5HsDe OnpHST3Vs75/OH5BxIxULub0RdKbEcJXMl4ZuBnZJwGGDntvtCd5sQwiJlC9JcZvauvn w0vQ== X-Gm-Message-State: ALoCoQk6k6Ld5wkj9FfvDPvL+qq1Z3wfpQu3446fQgqJzMHNsscDhNIpS1S12xikCSj/0KRoN6+Y X-Received: by 10.152.1.1 with SMTP id 1mr1178628lai.89.1413185892159; Mon, 13 Oct 2014 00:38:12 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id iq1sm4329967lac.9.2014.10.13.00.38.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Oct 2014 00:38:11 -0700 (PDT) Message-ID: <543B8162.9020607@freebsd.org> Date: Mon, 13 Oct 2014 11:38:10 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r273024 - head/contrib/netbsd-tests/lib/libc/time References: <201410130244.s9D2iama042530@svn.freebsd.org> In-Reply-To: <201410130244.s9D2iama042530@svn.freebsd.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 07:38:20 -0000 On 13.10.2014 6:44, Garrett Cooper wrote: > Author: ngie > Date: Mon Oct 13 02:44:35 2014 > New Revision: 273024 > URL: https://svnweb.freebsd.org/changeset/base/273024 > > Log: > Only test the return value in mktime_negyear > > Testing for the errno is an optional requirement according to POSIX, and > FreeBSD doesn't document that errno would be set on failure with mktime According to Base Specs, Issue 7, at least EOVERFLOW we don't support is not optional. -- http://ache.vniz.net/ From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 08:02:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B16BC05 for ; Mon, 13 Oct 2014 08:02:46 +0000 (UTC) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 943B5EED for ; Mon, 13 Oct 2014 08:02:45 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id gi9so6270755lab.33 for ; Mon, 13 Oct 2014 01:02:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=eVZtkBdsWR6mmHWOlodOa6AHioHpLkkE8o1uiArn4TA=; b=OzkEcChZ7YaRv/CG4zorD/sawlv783Rznzv1nbdIfYgosKksplxLQl+Kk+fT6iBiZ+ EddiO4rLJiY4MZ4QRt29dld6dy4wwhVmFvpe4GI4LeE7/f9HVguKOwYZvAYfUjAhxj27 W7/JfdhXq4qrhy+ZfcIZoO1dbmTUCsd7iaiX4l3ZRU2U839TpHmIxo6xol9u0zT6qgtf DOHNoMa7xSUVvkiEzurU05a1EDPJiOn1Owa2pdQT9DePkc2yTxaK0MomzbENfB7bpVNh a7cyoyJ/YzGSm+6pibkBycRNx4AVNARAC1k1VVv5ZlB+UCZWllRhmnA7NDNFUKtLy3gN AymA== X-Gm-Message-State: ALoCoQlmUyK8q5kcOV9/2EUHRTjBemjuOFSFm37GOPr0y9PwNfA6L1z1db7kiplZY7hcF12ajfRp X-Received: by 10.112.148.170 with SMTP id tt10mr22122944lbb.61.1413187362877; Mon, 13 Oct 2014 01:02:42 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id pd6sm4348045lbb.5.2014.10.13.01.02.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Oct 2014 01:02:42 -0700 (PDT) Message-ID: <543B8721.1050906@freebsd.org> Date: Mon, 13 Oct 2014 12:02:41 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r273024 - head/contrib/netbsd-tests/lib/libc/time References: <201410130244.s9D2iama042530@svn.freebsd.org> <543B8162.9020607@freebsd.org> In-Reply-To: <543B8162.9020607@freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 08:02:46 -0000 On 13.10.2014 11:38, Andrey Chernov wrote: > On 13.10.2014 6:44, Garrett Cooper wrote: >> Author: ngie >> Date: Mon Oct 13 02:44:35 2014 >> New Revision: 273024 >> URL: https://svnweb.freebsd.org/changeset/base/273024 >> >> Log: >> Only test the return value in mktime_negyear >> >> Testing for the errno is an optional requirement according to POSIX, and >> FreeBSD doesn't document that errno would be set on failure with mktime > > According to Base Specs, Issue 7, at least EOVERFLOW we don't support is > not optional. > Exact quote (I see absolutely no optionality of this): RETURN VALUE ... If the time since the Epoch cannot be represented, the function shall return the value (time_t)−1 and set errno to indicate the error. ERRORS The mktime() function shall fail if: [EOVERFLOW] The result cannot be represented. -- http://ache.vniz.net/ From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 09:05:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69AC598F; Mon, 13 Oct 2014 09:05:12 +0000 (UTC) Received: from mail-yk0-x22e.google.com (mail-yk0-x22e.google.com [IPv6:2607:f8b0:4002:c07::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02ECD755; Mon, 13 Oct 2014 09:05:11 +0000 (UTC) Received: by mail-yk0-f174.google.com with SMTP id 142so3263828ykq.19 for ; Mon, 13 Oct 2014 02:05:11 -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=JxI4oTt+qli8oHE+QfE2O/TOdxrCA4uAQNkfg/mhoRk=; b=JzC5GrbLdNAeBr7o0fZLxr/cNDAxsbz+Ji+vCkYwxh1T0/RyRj8WapBAA2TtlVVLuN nBX2vdFdl2XY2SWDYfMpuEK//ftgPA7z03jbs1PDLFqabMVa2Lx6iqTP5K7XGrcG/xtz nTl8eY0fHsyvBv8gaAZD/ziSk/a6cqD8EyG+gWOynRzJWzFLwyeSX1HZICufIaEIxC+N OPbTb0qk2apGQLqONBbhTtqM9h6jtVX+PQzXbvrbgTbmpn0n2JAx0hOAb6I1zzmpCCuM S1C3LM2pqbIKSlHFuN63Ci+T5AIUnIrm8/qpgQEgzsX+beuNaO02/XJ3/GOn1zTOLSAU D3lw== MIME-Version: 1.0 X-Received: by 10.236.62.198 with SMTP id y46mr36358825yhc.108.1413191110898; Mon, 13 Oct 2014 02:05:10 -0700 (PDT) Received: by 10.170.59.65 with HTTP; Mon, 13 Oct 2014 02:05:10 -0700 (PDT) In-Reply-To: <20140928091625.GU884@FreeBSD.org> References: <201409280857.s8S8v8cG011117@svn.freebsd.org> <20140928091625.GU884@FreeBSD.org> Date: Mon, 13 Oct 2014 12:05:10 +0300 Message-ID: Subject: Re: svn commit: r272244 - head/sys/net From: Markiyan Kushnir To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 09:05:12 -0000 Gleb, looks like there is something to do for userland apps to let them replace their old counter code. An example would be devel/libgtop that is failing to build now (I'm on r273006 of base/head and r370733 on ports/head): /bin/sh ../../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/local/include/glib-2.0 -I/usr/local/include -I/usr/local/include -I/usr/local/include -DHAVE_NET_IF_VAR_H -D_WANT_IFADDR -Winline -Wall -std=gnu89 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -fno-strict-aliasing -MT netload.lo -MD -MP -MF .deps/netload.Tpo -c -o netload.lo netload.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/local/include/glib-2.0 -I/usr/local/include -I/usr/local/include -I/usr/local/include -DHAVE_NET_IF_VAR_H -D_WANT_IFADDR -Winline -Wall -std=gnu89 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -fno-strict-aliasing -MT netload.lo -MD -MP -MF .deps/netload.Tpo -c netload.c -fPIC -DPIC -o .libs/netload.o netload.c:182:41: error: no member named 'if_ipackets' in 'struct ifnet' buf->packets_in = ifnet.if_ipackets; ~~~~~ ^ netload.c:183:42: error: no member named 'if_opackets' in 'struct ifnet' buf->packets_out = ifnet.if_opackets; ~~~~~ ^ netload.c:186:39: error: no member named 'if_ibytes' in 'struct ifnet' buf->bytes_in = ifnet.if_ibytes; ~~~~~ ^ netload.c:187:40: error: no member named 'if_obytes' in 'struct ifnet' buf->bytes_out = ifnet.if_obytes; ~~~~~ ^ netload.c:190:40: error: no member named 'if_ierrors' in 'struct ifnet' buf->errors_in = ifnet.if_ierrors; ~~~~~ ^ netload.c:191:41: error: no member named 'if_oerrors' in 'struct ifnet' buf->errors_out = ifnet.if_oerrors; ~~~~~ ^ netload.c:194:41: error: no member named 'if_collisions' in 'struct ifnet' buf->collisions = ifnet.if_collisions; ~~~~~ ^ netload.c:211:58: warning: cast from 'struct sockaddr *' to 'struct sockaddr_dl *' increases required alignment from 1 to 2 [-Wcast-align] struct sockaddr_dl *dl = (struct sockaddr_dl *) sa; ^~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:217:39: warning: cast from 'struct sockaddr *' to 'struct sockaddr_in *' increases required alignment from 1 to 4 [-Wcast-align] sin = (struct sockaddr_in *)sa; ^~~~~~~~~~~~~~~~~~~~~~~~ netload.c:225:61: warning: cast from 'struct sockaddr *' to 'struct sockaddr_in6 *' increases required alignment from 1 to 4 [-Wcast-align] struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa; ^~~~~~~~~~~~~~~~~~~~~~~~~~ 3 warnings and 7 errors generated. Makefile:435: recipe for target 'netload.lo' failed gmake[4]: *** [netload.lo] Error 1 gmake[4]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4/sysdeps/freebsd' Makefile:336: recipe for target 'all-recursive' failed gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4/sysdeps' Makefile:471: recipe for target 'all-recursive' failed gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4' Makefile:354: recipe for target 'all' failed gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4' *** Error code 1 Stop. make: stopped in /work/ports.svn/devel/libgtop Or, any hints on getting it fixed? -- Markiyan. 2014-09-28 12:16 GMT+03:00 Gleb Smirnoff : > On Sun, Sep 28, 2014 at 08:57:08AM +0000, Gleb Smirnoff wrote: > T> Author: glebius > T> Date: Sun Sep 28 08:57:07 2014 > T> New Revision: 272244 > T> URL: http://svnweb.freebsd.org/changeset/base/272244 > T> > T> Log: > T> Finally, convert counters in struct ifnet to counter(9). > T> > T> Sponsored by: Netflix > T> Sponsored by: Nginx, Inc. > > Now the network stack is 99% free of old style ++ on a global > variable, that trashes cache line and is racy. > > The last remnant is queue drop counter in buf_ring(9), which > would be probably addressed when interface queuing is generalized. > > -- > Totus tuus, Glebius. > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 11:00:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFA04D88; Mon, 13 Oct 2014 11:00:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 922B71B2; Mon, 13 Oct 2014 11:00:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DB0xCg076571; Mon, 13 Oct 2014 11:00:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DB0xgP076570; Mon, 13 Oct 2014 11:00:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410131100.s9DB0xgP076570@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 13 Oct 2014 11:00:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273029 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 11:00:59 -0000 Author: mav Date: Mon Oct 13 11:00:58 2014 New Revision: 273029 URL: https://svnweb.freebsd.org/changeset/base/273029 Log: Report physical block size for file-backed LUNs, using vattr.va_blocksize. MFC after: 1 week Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Mon Oct 13 06:51:40 2014 (r273028) +++ head/sys/cam/ctl/ctl_backend_block.c Mon Oct 13 11:00:58 2014 (r273029) @@ -1542,6 +1542,7 @@ ctl_be_block_open_file(struct ctl_be_blo struct ctl_be_block_filedata *file_data; struct ctl_lun_create_params *params; struct vattr vattr; + off_t pss; int error; error = 0; @@ -1590,21 +1591,21 @@ ctl_be_block_open_file(struct ctl_be_blo be_lun->flags |= CTL_BE_BLOCK_LUN_MULTI_THREAD; /* - * XXX KDM vattr.va_blocksize may be larger than 512 bytes here. - * With ZFS, it is 131072 bytes. Block sizes that large don't work - * with disklabel and UFS on FreeBSD at least. Large block sizes - * may not work with other OSes as well. So just export a sector - * size of 512 bytes, which should work with any OS or - * application. Since our backing is a file, any block size will - * work fine for the backing store. + * For files we can use any logical block size. Prefer 512 bytes + * for compatibility reasons. If file's vattr.va_blocksize + * (preferred I/O block size) is bigger and multiple to chosen + * logical block size -- report it as physical block size. */ -#if 0 - be_lun->blocksize= vattr.va_blocksize; -#endif if (params->blocksize_bytes != 0) be_lun->blocksize = params->blocksize_bytes; else be_lun->blocksize = 512; + pss = vattr.va_blocksize / be_lun->blocksize; + if ((pss > 0) && (pss * be_lun->blocksize == vattr.va_blocksize) && + ((pss & (pss - 1)) == 0)) { + be_lun->pblockexp = fls(pss) - 1; + be_lun->pblockoff = 0; + } /* * Sanity check. The media size has to be at least one From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 11:26:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F4D042F; Mon, 13 Oct 2014 11:26:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87A6861B; Mon, 13 Oct 2014 11:26:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DBQI8S087388; Mon, 13 Oct 2014 11:26:18 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DBQI4k087387; Mon, 13 Oct 2014 11:26:18 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410131126.s9DBQI4k087387@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 13 Oct 2014 11:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273032 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 11:26:18 -0000 Author: melifaro Date: Mon Oct 13 11:26:17 2014 New Revision: 273032 URL: https://svnweb.freebsd.org/changeset/base/273032 Log: * Fix zeroing individual entries via ipfw(8). * Report error and return non-zero exit code if zeroing non-matched entries Found by: Oleg Ginzburg Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Oct 13 11:16:44 2014 (r273031) +++ head/sbin/ipfw/ipfw2.c Mon Oct 13 11:26:17 2014 (r273032) @@ -2111,13 +2111,19 @@ static int do_range_cmd(int cmd, ipfw_range_tlv *rt) { ipfw_range_header rh; + size_t sz; memset(&rh, 0, sizeof(rh)); memcpy(&rh.range, rt, sizeof(*rt)); rh.range.head.length = sizeof(*rt); rh.range.head.type = IPFW_TLV_RANGE; + sz = sizeof(rh); - return (do_set3(cmd, &rh.opheader, sizeof(rh))); + if (do_get3(cmd, &rh.opheader, &sz) != 0) + return (-1); + /* Save number of matched objects */ + rt->new_set = rh.range.new_set; + return (0); } /* @@ -4792,6 +4798,9 @@ ipfw_zero(int ac, char *av[], int optnam warn("rule %u: setsockopt(IP_FW_X%s)", arg, name); failed = EX_UNAVAILABLE; + } else if (rt.new_set == 0) { + printf("Entry %d not found\n", arg); + failed = EX_UNAVAILABLE; } else if (!co.do_quiet) printf("Entry %d %s.\n", arg, optname == IP_FW_XZERO ? @@ -4799,6 +4808,7 @@ ipfw_zero(int ac, char *av[], int optnam } else { errx(EX_USAGE, "invalid rule number ``%s''", *av); } + av++; ac--; } if (failed != EX_OK) exit(failed); From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 12:38:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26C90655; Mon, 13 Oct 2014 12:38:01 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E2D8CFB; Mon, 13 Oct 2014 12:37:59 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s9DCbts5064063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 13 Oct 2014 16:37:55 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s9DCbtND064062; Mon, 13 Oct 2014 16:37:55 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 13 Oct 2014 16:37:55 +0400 From: Gleb Smirnoff To: Markiyan Kushnir Subject: Re: svn commit: r272244 - head/sys/net Message-ID: <20141013123755.GS73266@FreeBSD.org> References: <201409280857.s8S8v8cG011117@svn.freebsd.org> <20140928091625.GU884@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, kwm@FreeBSD.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 12:38:01 -0000 On Mon, Oct 13, 2014 at 12:05:10PM +0300, Markiyan Kushnir wrote: M> Gleb, looks like there is something to do for userland apps to let M> them replace their old counter code. An example would be devel/libgtop M> that is failing to build now (I'm on r273006 of base/head and r370733 M> on ports/head): I have fixed all ports a week ago. Those that were trivial to test, I committed myself. For others I sent patches to their maintainers. Surprised that libgtop fix is still not committed. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 12:49:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0625F8AF; Mon, 13 Oct 2014 12:49:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E68B6DEE; Mon, 13 Oct 2014 12:49:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DCn44c025257; Mon, 13 Oct 2014 12:49:04 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DCn4DK025255; Mon, 13 Oct 2014 12:49:04 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410131249.s9DCn4DK025255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 13 Oct 2014 12:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273033 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 12:49:05 -0000 Author: melifaro Date: Mon Oct 13 12:49:04 2014 New Revision: 273033 URL: https://svnweb.freebsd.org/changeset/base/273033 Log: Show error when deleting non-existing rule number. Found by: Oleg Ginzburg Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Oct 13 11:26:17 2014 (r273032) +++ head/sbin/ipfw/ipfw2.c Mon Oct 13 12:49:04 2014 (r273033) @@ -3009,7 +3009,6 @@ fill_flags_cmd(ipfw_insn *cmd, enum ipfw void ipfw_delete(char *av[]) { - uint32_t rulenum; int i; int exitval = EX_OK; int do_set = 0; @@ -3059,7 +3058,15 @@ ipfw_delete(char *av[]) if (i != 0) { exitval = EX_UNAVAILABLE; warn("rule %u: setsockopt(IP_FW_XDEL)", - rulenum); + rt.start_rule); + } else if (rt.new_set == 0) { + exitval = EX_UNAVAILABLE; + if (rt.start_rule != rt.end_rule) + warnx("no rules rules in %u-%u range", + rt.start_rule, rt.end_rule); + else + warnx("rule %u not found", + rt.start_rule); } } } From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 13:13:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A021FEE; Mon, 13 Oct 2014 13:13:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46332143; Mon, 13 Oct 2014 13:13:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DDDhhC039021; Mon, 13 Oct 2014 13:13:43 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DDDhUL039020; Mon, 13 Oct 2014 13:13:43 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201410131313.s9DDDhUL039020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 13 Oct 2014 13:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273034 - head/sys/dev/amdtemp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 13:13:43 -0000 Author: brueffer Date: Mon Oct 13 13:13:42 2014 New Revision: 273034 URL: https://svnweb.freebsd.org/changeset/base/273034 Log: Add one more AMD Kaveri APU device ID. Submitted by: Remy Nonnenmacher MFC after: 1 week Modified: head/sys/dev/amdtemp/amdtemp.c Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Mon Oct 13 12:49:04 2014 (r273033) +++ head/sys/dev/amdtemp/amdtemp.c Mon Oct 13 13:13:42 2014 (r273034) @@ -80,6 +80,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_MISC14 0x1703 #define DEVICEID_AMD_MISC15 0x1603 #define DEVICEID_AMD_MISC16 0x1533 +#define DEVICEID_AMD_MISC17 0x141d static struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -92,6 +93,7 @@ static struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_MISC14 }, { VENDORID_AMD, DEVICEID_AMD_MISC15 }, { VENDORID_AMD, DEVICEID_AMD_MISC16 }, + { VENDORID_AMD, DEVICEID_AMD_MISC17 }, { 0, 0 } }; From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 13:49:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEE11AAF; Mon, 13 Oct 2014 13:49:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FBD76BB; Mon, 13 Oct 2014 13:49:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DDnTwA054113; Mon, 13 Oct 2014 13:49:29 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DDnTAp054111; Mon, 13 Oct 2014 13:49:29 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410131349.s9DDnTAp054111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 13 Oct 2014 13:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273035 - in head/sys: netinet netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 13:49:29 -0000 Author: melifaro Date: Mon Oct 13 13:49:28 2014 New Revision: 273035 URL: https://svnweb.freebsd.org/changeset/base/273035 Log: Fix matching default rule on clear/show commands. Found by: Oleg Ginzburg Modified: head/sys/netinet/ip_fw.h head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netinet/ip_fw.h ============================================================================== --- head/sys/netinet/ip_fw.h Mon Oct 13 13:13:42 2014 (r273034) +++ head/sys/netinet/ip_fw.h Mon Oct 13 13:49:28 2014 (r273035) @@ -886,6 +886,11 @@ typedef struct _ipfw_range_tlv { #define IPFW_RCFLAG_RANGE 0x01 /* rule range is set */ #define IPFW_RCFLAG_ALL 0x02 /* match ALL rules */ #define IPFW_RCFLAG_SET 0x04 /* match rules in given set */ +/* User-settable flags */ +#define IPFW_RCFLAG_USER (IPFW_RCFLAG_RANGE | IPFW_RCFLAG_ALL | \ + IPFW_RCFLAG_SET) +/* Internally used flags */ +#define IPFW_RCFLAG_DEFAULT 0x0100 /* Do not skip defaul rule */ typedef struct _ipfw_ta_tinfo { uint32_t flags; /* Format flags */ Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Oct 13 13:13:42 2014 (r273034) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Oct 13 13:49:28 2014 (r273035) @@ -833,8 +833,9 @@ int ipfw_match_range(struct ip_fw *rule, ipfw_range_tlv *rt) { - /* Don't match default rule regardless of query */ - if (rule->rulenum == IPFW_DEFAULT_RULE) + /* Don't match default rule for modification queries */ + if (rule->rulenum == IPFW_DEFAULT_RULE && + (rt->flags & IPFW_RCFLAG_DEFAULT) == 0) return (0); /* Don't match rules in reserved set for flush requests */ @@ -965,7 +966,7 @@ move_range(struct ip_fw_chain *chain, ip } /* XXX: We have to do swap holding WLOCK */ - for (i = 0; i < chain->n_rules - 1; i++) { + for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; if (ipfw_match_range(rule, rt) == 0) continue; @@ -1006,9 +1007,10 @@ clear_range(struct ip_fw_chain *chain, i int i; num = 0; + rt->flags |= IPFW_RCFLAG_DEFAULT; IPFW_UH_WLOCK(chain); /* arbitrate writers */ - for (i = 0; i < chain->n_rules - 1; i++) { + for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; if (ipfw_match_range(rule, rt) == 0) continue; @@ -1031,6 +1033,9 @@ check_range_tlv(ipfw_range_tlv *rt) if (rt->set >= IPFW_MAX_SETS || rt->new_set >= IPFW_MAX_SETS) return (1); + if ((rt->flags & IPFW_RCFLAG_USER) != rt->flags) + return (1); + return (0); } @@ -2012,7 +2017,7 @@ dump_config(struct ip_fw_chain *chain, i da.b = ipfw_find_rule(chain, rnum, 0); rnum = hdr->end_rule; rnum = (rnum < IPFW_DEFAULT_RULE) ? rnum+1 : IPFW_DEFAULT_RULE; - da.e = ipfw_find_rule(chain, rnum, 0); + da.e = ipfw_find_rule(chain, rnum, 0) + 1; } if (hdr->flags & IPFW_CFG_GET_STATIC) { From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 14:26:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FEDFD06; Mon, 13 Oct 2014 14:26:01 +0000 (UTC) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 99C48B56; Mon, 13 Oct 2014 14:26:00 +0000 (UTC) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-7-57.eburwd3.vic.optusnet.com.au [110.22.7.57]) by lauren.room52.net (Postfix) with ESMTPSA id B716A7E88F; Tue, 14 Oct 2014 01:19:39 +1100 (EST) Message-ID: <543BDF68.9010800@freebsd.org> Date: Tue, 14 Oct 2014 01:19:20 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys References: <201409220827.s8M8RRHB031526@svn.freebsd.org> In-Reply-To: <201409220827.s8M8RRHB031526@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 14:26:01 -0000 Hi Hans, I have questions and feedback regarding this patch that I was hoping to work through with you. Some general points are below and then context specific points are inline with the patch further down. - Is QinQ support affected by this change? - There are some style(9) nits throughout that might be tweaked if parts of this patch end up being reworked e.g. new lines in if_hw_tsomax_common() and if_hw_tsomax_update() On 09/22/14 18:27, Hans Petter Selasky wrote: > Author: hselasky > Date: Mon Sep 22 08:27:27 2014 > New Revision: 271946 > URL: http://svnweb.freebsd.org/changeset/base/271946 > > Log: > Improve transmit sending offload, TSO, algorithm in general. > > The current TSO limitation feature only takes the total number of > bytes in an mbuf chain into account and does not limit by the number > of mbufs in a chain. Some kinds of hardware is limited by two > factors. One is the fragment length and the second is the fragment > count. Both of these limits need to be taken into account when doing > TSO. Else some kinds of hardware might have to drop completely valid > mbuf chains because they cannot loaded into the given hardware's DMA > engine. The new way of doing TSO limitation has been made backwards > compatible as input from other FreeBSD developers and will use > defaults for values not set. > > Reviewed by: adrian, rmacklem > Sponsored by: Mellanox Technologies > MFC after: 1 week > > Modified: > head/sys/dev/oce/oce_if.c > head/sys/dev/oce/oce_if.h > head/sys/dev/vmware/vmxnet3/if_vmx.c > head/sys/dev/vmware/vmxnet3/if_vmxvar.h > head/sys/dev/xen/netfront/netfront.c > head/sys/kern/uipc_sockbuf.c > head/sys/net/if.c > head/sys/net/if_lagg.c > head/sys/net/if_var.h > head/sys/net/if_vlan.c > head/sys/netinet/tcp_input.c > head/sys/netinet/tcp_output.c > head/sys/netinet/tcp_subr.c > head/sys/netinet/tcp_var.h > head/sys/ofed/drivers/net/mlx4/en_netdev.c > head/sys/sys/sockbuf.h > > Modified: head/sys/dev/oce/oce_if.c > ============================================================================== > --- head/sys/dev/oce/oce_if.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/dev/oce/oce_if.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -1731,7 +1731,9 @@ oce_attach_ifp(POCE_SOFTC sc) > sc->ifp->if_baudrate = IF_Gbps(10); > > #if __FreeBSD_version >= 1000000 > - sc->ifp->if_hw_tsomax = OCE_MAX_TSO_SIZE; > + sc->ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); > + sc->ifp->if_hw_tsomaxsegcount = OCE_MAX_TX_ELEMENTS; > + sc->ifp->if_hw_tsomaxsegsize = 4096; > #endif > > ether_ifattach(sc->ifp, sc->macaddr.mac_addr); > I don't like the use of the 65536 magic number here and throughout the driver changes. Also, should it be 65536 or IP_MAXPACKET (65535)? > Modified: head/sys/dev/oce/oce_if.h > ============================================================================== > --- head/sys/dev/oce/oce_if.h Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/dev/oce/oce_if.h Mon Sep 22 08:27:27 2014 (r271946) > @@ -152,7 +152,6 @@ extern int mp_ncpus; /* system's total > #define OCE_MAX_TX_ELEMENTS 29 > #define OCE_MAX_TX_DESC 1024 > #define OCE_MAX_TX_SIZE 65535 > -#define OCE_MAX_TSO_SIZE (65535 - ETHER_HDR_LEN) > #define OCE_MAX_RX_SIZE 4096 > #define OCE_MAX_RQ_POSTS 255 > #define OCE_DEFAULT_PROMISCUOUS 0 > > Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c > ============================================================================== > --- head/sys/dev/vmware/vmxnet3/if_vmx.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/dev/vmware/vmxnet3/if_vmx.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -1722,7 +1722,9 @@ vmxnet3_setup_interface(struct vmxnet3_s > ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; > ifp->if_init = vmxnet3_init; > ifp->if_ioctl = vmxnet3_ioctl; > - ifp->if_hw_tsomax = VMXNET3_TSO_MAXSIZE; > + ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); > + ifp->if_hw_tsomaxsegcount = VMXNET3_TX_MAXSEGS; > + ifp->if_hw_tsomaxsegsize = VMXNET3_TX_MAXSEGSIZE; > > #ifdef VMXNET3_LEGACY_TX > ifp->if_start = vmxnet3_start; > > Modified: head/sys/dev/vmware/vmxnet3/if_vmxvar.h > ============================================================================== > --- head/sys/dev/vmware/vmxnet3/if_vmxvar.h Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/dev/vmware/vmxnet3/if_vmxvar.h Mon Sep 22 08:27:27 2014 (r271946) > @@ -277,8 +277,6 @@ struct vmxnet3_softc { > */ > #define VMXNET3_TX_MAXSEGS 32 > #define VMXNET3_TX_MAXSIZE (VMXNET3_TX_MAXSEGS * MCLBYTES) > -#define VMXNET3_TSO_MAXSIZE \ > - (VMXNET3_TX_MAXSIZE - sizeof(struct ether_vlan_header)) > > /* > * Maximum support Tx segments size. The length field in the > > Modified: head/sys/dev/xen/netfront/netfront.c > ============================================================================== > --- head/sys/dev/xen/netfront/netfront.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/dev/xen/netfront/netfront.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -134,7 +134,6 @@ static const int MODPARM_rx_flip = 0; > * to mirror the Linux MAX_SKB_FRAGS constant. > */ > #define MAX_TX_REQ_FRAGS (65536 / PAGE_SIZE + 2) > -#define NF_TSO_MAXBURST ((IP_MAXPACKET / PAGE_SIZE) * MCLBYTES) > > #define RX_COPY_THRESHOLD 256 > > @@ -2102,7 +2101,9 @@ create_netdev(device_t dev) > > ifp->if_hwassist = XN_CSUM_FEATURES; > ifp->if_capabilities = IFCAP_HWCSUM; > - ifp->if_hw_tsomax = NF_TSO_MAXBURST; > + ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); > + ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; > + ifp->if_hw_tsomaxsegsize = PAGE_SIZE; > > ether_ifattach(ifp, np->mac); > callout_init(&np->xn_stat_ch, CALLOUT_MPSAFE); > > Modified: head/sys/kern/uipc_sockbuf.c > ============================================================================== > --- head/sys/kern/uipc_sockbuf.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/kern/uipc_sockbuf.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -1015,6 +1015,37 @@ sbsndptr(struct sockbuf *sb, u_int off, > } > > /* > + * Return the first mbuf and the mbuf data offset for the provided > + * send offset without changing the "sb_sndptroff" field. > + */ > +struct mbuf * > +sbsndmbuf(struct sockbuf *sb, u_int off, u_int *moff) > +{ > + struct mbuf *m; > + > + KASSERT(sb->sb_mb != NULL, ("%s: sb_mb is NULL", __func__)); > + > + /* > + * If the "off" is below the stored offset, which happens on > + * retransmits, just use "sb_mb": > + */ > + if (sb->sb_sndptr == NULL || sb->sb_sndptroff > off) { > + m = sb->sb_mb; > + } else { > + m = sb->sb_sndptr; > + off -= sb->sb_sndptroff; > + } > + while (off > 0 && m != NULL) { > + if (off < m->m_len) > + break; > + off -= m->m_len; > + m = m->m_next; > + } > + *moff = off; > + return (m); > +} > + > +/* > * Drop a record off the front of a sockbuf and move the next record to the > * front. > */ > > Modified: head/sys/net/if.c > ============================================================================== > --- head/sys/net/if.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/net/if.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -584,6 +584,57 @@ if_attach(struct ifnet *ifp) > if_attach_internal(ifp, 0); > } > > +/* > + * Compute the least common TSO limit. > + */ > +void > +if_hw_tsomax_common(if_t ifp, struct ifnet_hw_tsomax *pmax) > +{ > + /* > + * 1) If there is no limit currently, take the limit from > + * the network adapter. > + * > + * 2) If the network adapter has a limit below the current > + * limit, apply it. > + */ > + if (pmax->tsomaxbytes == 0 || (ifp->if_hw_tsomax != 0 && > + ifp->if_hw_tsomax < pmax->tsomaxbytes)) { > + pmax->tsomaxbytes = ifp->if_hw_tsomax; > + } > + if (pmax->tsomaxsegcount == 0 || (ifp->if_hw_tsomaxsegcount != 0 && > + ifp->if_hw_tsomaxsegcount < pmax->tsomaxsegcount)) { > + pmax->tsomaxsegcount = ifp->if_hw_tsomaxsegcount; > + } > + if (pmax->tsomaxsegsize == 0 || (ifp->if_hw_tsomaxsegsize != 0 && > + ifp->if_hw_tsomaxsegsize < pmax->tsomaxsegsize)) { > + pmax->tsomaxsegsize = ifp->if_hw_tsomaxsegsize; > + } > +} > + > +/* > + * Update TSO limit of a network adapter. > + * > + * Returns zero if no change. Else non-zero. > + */ > +int > +if_hw_tsomax_update(if_t ifp, struct ifnet_hw_tsomax *pmax) > +{ > + int retval = 0; > + if (ifp->if_hw_tsomax != pmax->tsomaxbytes) { > + ifp->if_hw_tsomax = pmax->tsomaxbytes; > + retval++; > + } > + if (ifp->if_hw_tsomaxsegsize != pmax->tsomaxsegsize) { > + ifp->if_hw_tsomaxsegsize = pmax->tsomaxsegsize; > + retval++; > + } > + if (ifp->if_hw_tsomaxsegcount != pmax->tsomaxsegcount) { > + ifp->if_hw_tsomaxsegcount = pmax->tsomaxsegcount; > + retval++; > + } > + return (retval); > +} > + > static void > if_attach_internal(struct ifnet *ifp, int vmove) > { > @@ -659,13 +710,36 @@ if_attach_internal(struct ifnet *ifp, in > ifp->if_broadcastaddr = NULL; > > #if defined(INET) || defined(INET6) > - /* Initialize to max value. */ > - if (ifp->if_hw_tsomax == 0) > - ifp->if_hw_tsomax = min(IP_MAXPACKET, 32 * MCLBYTES - > + /* Use defaults for TSO, if nothing is set */ > + if (ifp->if_hw_tsomax == 0 && > + ifp->if_hw_tsomaxsegcount == 0 && > + ifp->if_hw_tsomaxsegsize == 0) { > + /* > + * The TSO defaults needs to be such that an > + * NFS mbuf list of 35 mbufs totalling just > + * below 64K works and that a chain of mbufs > + * can be defragged into at most 32 segments: > + */ > + ifp->if_hw_tsomax = min(IP_MAXPACKET, (32 * MCLBYTES) - > (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)); > - KASSERT(ifp->if_hw_tsomax <= IP_MAXPACKET && > - ifp->if_hw_tsomax >= IP_MAXPACKET / 8, > - ("%s: tsomax outside of range", __func__)); > + ifp->if_hw_tsomaxsegcount = 35; > + ifp->if_hw_tsomaxsegsize = 2048; /* 2K */ > + > + /* XXX some drivers set IFCAP_TSO after ethernet attach */ > + if (ifp->if_capabilities & IFCAP_TSO) { > + if_printf(ifp, "Using defaults for TSO: %u/%u/%u\n", > + ifp->if_hw_tsomax, > + ifp->if_hw_tsomaxsegcount, > + ifp->if_hw_tsomaxsegsize); > + } > + } > + /* > + * If the "if_hw_tsomax" limit is set, check if it is > + * too small: > + */ > + KASSERT(ifp->if_hw_tsomax == 0 || > + ifp->if_hw_tsomax >= (IP_MAXPACKET / 8), > + ("%s: if_hw_tsomax is outside of range", __func__)); I don't understand the second condition of the KASSERT i.e. "ifp->if_hw_tsomax >= (IP_MAXPACKET / 8)" > #endif > } > #ifdef VIMAGE > > Modified: head/sys/net/if_lagg.c > ============================================================================== > --- head/sys/net/if_lagg.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/net/if_lagg.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -454,23 +454,18 @@ lagg_capabilities(struct lagg_softc *sc) > struct lagg_port *lp; > int cap = ~0, ena = ~0; > u_long hwa = ~0UL; > -#if defined(INET) || defined(INET6) > - u_int hw_tsomax = IP_MAXPACKET; /* Initialize to the maximum value. */ > -#else > - u_int hw_tsomax = ~0; /* if_hw_tsomax is only for INET/INET6, but.. */ > -#endif > + struct ifnet_hw_tsomax hw_tsomax; > > LAGG_WLOCK_ASSERT(sc); > > + memset(&hw_tsomax, 0, sizeof(hw_tsomax)); > + > /* Get capabilities from the lagg ports */ > SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { > cap &= lp->lp_ifp->if_capabilities; > ena &= lp->lp_ifp->if_capenable; > hwa &= lp->lp_ifp->if_hwassist; > - /* Set to the minimum value of the lagg ports. */ > - if (lp->lp_ifp->if_hw_tsomax < hw_tsomax && > - lp->lp_ifp->if_hw_tsomax > 0) > - hw_tsomax = lp->lp_ifp->if_hw_tsomax; > + if_hw_tsomax_common(lp->lp_ifp, &hw_tsomax); > } > cap = (cap == ~0 ? 0 : cap); > ena = (ena == ~0 ? 0 : ena); > @@ -479,11 +474,10 @@ lagg_capabilities(struct lagg_softc *sc) > if (sc->sc_ifp->if_capabilities != cap || > sc->sc_ifp->if_capenable != ena || > sc->sc_ifp->if_hwassist != hwa || > - sc->sc_ifp->if_hw_tsomax != hw_tsomax) { > + if_hw_tsomax_update(sc->sc_ifp, &hw_tsomax) != 0) { > sc->sc_ifp->if_capabilities = cap; > sc->sc_ifp->if_capenable = ena; > sc->sc_ifp->if_hwassist = hwa; > - sc->sc_ifp->if_hw_tsomax = hw_tsomax; > getmicrotime(&sc->sc_ifp->if_lastchange); > > if (sc->sc_ifflags & IFF_DEBUG) > > Modified: head/sys/net/if_var.h > ============================================================================== > --- head/sys/net/if_var.h Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/net/if_var.h Mon Sep 22 08:27:27 2014 (r271946) > @@ -119,6 +119,12 @@ typedef void (*if_qflush_fn_t)(if_t); > typedef int (*if_transmit_fn_t)(if_t, struct mbuf *); > typedef uint64_t (*if_get_counter_t)(if_t, ift_counter); > > +struct ifnet_hw_tsomax { > + u_int tsomaxbytes; /* TSO total burst length limit in bytes */ > + u_int tsomaxsegcount; /* TSO maximum segment count */ > + u_int tsomaxsegsize; /* TSO maximum segment size in bytes */ > +}; > + > /* > * Structure defining a network interface. > * > @@ -222,10 +228,11 @@ struct ifnet { > if_get_counter_t if_get_counter; /* get counter values */ > > /* Stuff that's only temporary and doesn't belong here. */ > - u_int if_hw_tsomax; /* tso burst length limit, the minimum > - * is (IP_MAXPACKET / 8). > - * XXXAO: Have to find a better place > - * for it eventually. */ > + u_int if_hw_tsomax; /* TSO total burst length > + * limit in bytes. A value of > + * zero means no limit. Have > + * to find a better place for > + * it eventually. */ > /* > * Old, racy and expensive statistics, should not be used in > * new drivers. > @@ -243,6 +250,10 @@ struct ifnet { > uint64_t if_oqdrops; /* dropped on output */ > uint64_t if_noproto; /* destined for unsupported protocol */ > > + /* TSO fields for segment limits. If a field is zero below, there is no limit. */ > + u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ > + u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ > + > /* > * Spare fields to be added before branching a stable branch, so > * that structure can be enhanced without changing the kernel > @@ -596,5 +607,9 @@ struct mbuf* drbr_dequeue_drv(if_t ifp, > int drbr_needs_enqueue_drv(if_t ifp, struct buf_ring *br); > int drbr_enqueue_drv(if_t ifp, struct buf_ring *br, struct mbuf *m); > > +/* TSO */ > +void if_hw_tsomax_common(if_t ifp, struct ifnet_hw_tsomax *); > +int if_hw_tsomax_update(if_t ifp, struct ifnet_hw_tsomax *); > + > #endif /* _KERNEL */ > #endif /* !_NET_IF_VAR_H_ */ > > Modified: head/sys/net/if_vlan.c > ============================================================================== > --- head/sys/net/if_vlan.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/net/if_vlan.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -1536,6 +1536,7 @@ vlan_capabilities(struct ifvlan *ifv) > { > struct ifnet *p = PARENT(ifv); > struct ifnet *ifp = ifv->ifv_ifp; > + struct ifnet_hw_tsomax hw_tsomax; > > TRUNK_LOCK_ASSERT(TRUNK(ifv)); > > @@ -1562,8 +1563,9 @@ vlan_capabilities(struct ifvlan *ifv) > * propagate the hardware-assisted flag. TSO on VLANs > * does not necessarily require hardware VLAN tagging. > */ > - if (p->if_hw_tsomax > 0) > - ifp->if_hw_tsomax = p->if_hw_tsomax; > + memset(&hw_tsomax, 0, sizeof(hw_tsomax)); > + if_hw_tsomax_common(p, &hw_tsomax); > + if_hw_tsomax_update(ifp, &hw_tsomax); > if (p->if_capabilities & IFCAP_VLAN_HWTSO) > ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; > if (p->if_capenable & IFCAP_VLAN_HWTSO) { > > Modified: head/sys/netinet/tcp_input.c > ============================================================================== > --- head/sys/netinet/tcp_input.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/netinet/tcp_input.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -3591,6 +3591,8 @@ tcp_mss(struct tcpcb *tp, int offer) > if (cap.ifcap & CSUM_TSO) { > tp->t_flags |= TF_TSO; > tp->t_tsomax = cap.tsomax; > + tp->t_tsomaxsegcount = cap.tsomaxsegcount; > + tp->t_tsomaxsegsize = cap.tsomaxsegsize; > } > } > > > Modified: head/sys/netinet/tcp_output.c > ============================================================================== > --- head/sys/netinet/tcp_output.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/netinet/tcp_output.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -767,28 +767,113 @@ send: > flags &= ~TH_FIN; > > if (tso) { > + u_int if_hw_tsomax; > + u_int if_hw_tsomaxsegcount; > + u_int if_hw_tsomaxsegsize; > + struct mbuf *mb; > + u_int moff; > + int max_len; > + > + /* extract TSO information */ > + if_hw_tsomax = tp->t_tsomax; > + if_hw_tsomaxsegcount = tp->t_tsomaxsegcount; > + if_hw_tsomaxsegsize = tp->t_tsomaxsegsize; > + > + /* > + * Limit a TSO burst to prevent it from > + * overflowing or exceeding the maximum length > + * allowed by the network interface: > + */ This appears to have been moved from just below for no apparent reason? > KASSERT(ipoptlen == 0, > ("%s: TSO can't do IP options", __func__)); > > /* > - * Limit a burst to t_tsomax minus IP, > - * TCP and options length to keep ip->ip_len > - * from overflowing or exceeding the maximum > - * length allowed by the network interface. > + * Check if we should limit by maximum payload > + * length: > */ > - if (len > tp->t_tsomax - hdrlen) { > - len = tp->t_tsomax - hdrlen; > - sendalot = 1; > + if (if_hw_tsomax != 0) { > + /* compute maximum TSO length */ > + max_len = (if_hw_tsomax - hdrlen); > + if (max_len <= 0) { > + len = 0; Is the "max_len < 0" check useful? If "if_hw_tsomax - hdrlen" is leq 0, then TSO is unusable on the interface is it not? > + } else if (len > (u_int)max_len) { > + sendalot = 1; > + len = (u_int)max_len; > + } Why is max_len cast to u_int for comparison/assignment with/to len here and elsewhere? > + } > + > + /* > + * Check if we should limit by maximum segment > + * size and count: > + */ > + if (if_hw_tsomaxsegcount != 0 && if_hw_tsomaxsegsize != 0) { Is it conceivable a driver may want to limit by maxsegcount or maxsegsize, but not by both? In the event if_hw_tsomax, if_hw_tsomaxsegcount and if_hw_tsomaxsegsize are non-zero, the calculation of len related to if_hw_tsomax will be overridden to a potentially incorrect value in this block. > + max_len = 0; > + mb = sbsndmbuf(&so->so_snd, off, &moff); > + > + while (mb != NULL && (u_int)max_len < len) { > + u_int cur_length; > + u_int cur_frags; > + > + /* > + * Get length of mbuf fragment > + * and how many hardware > + * frags, rounded up, it would > + * use: > + */ > + cur_length = (mb->m_len - moff); > + cur_frags = (cur_length + if_hw_tsomaxsegsize - > + 1) / if_hw_tsomaxsegsize; > + > + /* Handle special case: Zero Length Mbuf */ > + if (cur_frags == 0) > + cur_frags = 1; > + > + /* > + * Check if the fragment limit > + * will be reached or > + * exceeded: > + */ > + if (cur_frags >= if_hw_tsomaxsegcount) { > + max_len += min(cur_length, > + if_hw_tsomaxsegcount * > + if_hw_tsomaxsegsize); > + break; > + } > + max_len += cur_length; > + if_hw_tsomaxsegcount -= cur_frags; > + moff = 0; > + mb = mb->m_next; > + } > + if (max_len <= 0) { > + len = 0; > + } else if (len > (u_int)max_len) { > + sendalot = 1; > + len = (u_int)max_len; > + } > } > > /* > * Prevent the last segment from being > - * fractional unless the send sockbuf can > - * be emptied. > + * fractional unless the send sockbuf can be > + * emptied: > + */ > + max_len = (tp->t_maxopd - optlen); > + if ((off + len) < so->so_snd.sb_cc) { > + moff = len % (u_int)max_len; > + if (moff != 0) { > + len -= moff; > + sendalot = 1; > + } > + } > + > + /* > + * In case there are too many small fragments > + * don't use TSO: > */ > - if (sendalot && off + len < so->so_snd.sb_cc) { > - len -= len % (tp->t_maxopd - optlen); > + if (len <= (u_int)max_len) { > + len = (u_int)max_len; > sendalot = 1; > + tso = 0; > } I don't quite understand the "too many small fragements" check. > > /* > > Modified: head/sys/netinet/tcp_subr.c > ============================================================================== > --- head/sys/netinet/tcp_subr.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/netinet/tcp_subr.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -1819,6 +1819,8 @@ tcp_maxmtu(struct in_conninfo *inc, stru > ifp->if_hwassist & CSUM_TSO) { > cap->ifcap |= CSUM_TSO; > cap->tsomax = ifp->if_hw_tsomax; > + cap->tsomaxsegcount = ifp->if_hw_tsomaxsegcount; > + cap->tsomaxsegsize = ifp->if_hw_tsomaxsegsize; > } > } > RTFREE(sro.ro_rt); > @@ -1858,6 +1860,8 @@ tcp_maxmtu6(struct in_conninfo *inc, str > ifp->if_hwassist & CSUM_TSO) { > cap->ifcap |= CSUM_TSO; > cap->tsomax = ifp->if_hw_tsomax; > + cap->tsomaxsegcount = ifp->if_hw_tsomaxsegcount; > + cap->tsomaxsegsize = ifp->if_hw_tsomaxsegsize; > } > } > RTFREE(sro6.ro_rt); > > Modified: head/sys/netinet/tcp_var.h > ============================================================================== > --- head/sys/netinet/tcp_var.h Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/netinet/tcp_var.h Mon Sep 22 08:27:27 2014 (r271946) > @@ -199,9 +199,12 @@ struct tcpcb { > u_int t_keepintvl; /* interval between keepalives */ > u_int t_keepcnt; /* number of keepalives before close */ > > - u_int t_tsomax; /* tso burst length limit */ > + u_int t_tsomax; /* TSO total burst length limit in bytes */ > + > + uint32_t t_ispare[6]; /* 5 UTO, 1 TBD */ > + uint32_t t_tsomaxsegcount; /* TSO maximum segment count */ > + uint32_t t_tsomaxsegsize; /* TSO maximum segment size in bytes */ > > - uint32_t t_ispare[8]; /* 5 UTO, 3 TBD */ > void *t_pspare2[4]; /* 1 TCP_SIGNATURE, 3 TBD */ > uint64_t _pad[6]; /* 6 TBD (1-2 CC/RTT?) */ > }; I don't think the patch for head should be consuming the spares in struct tcpcb. We generally only consume spares when MFCing to stable branches, leaving the spares intact on the head branch. > @@ -324,6 +327,8 @@ struct hc_metrics_lite { /* must stay in > struct tcp_ifcap { > int ifcap; > u_int tsomax; > + u_int tsomaxsegcount; > + u_int tsomaxsegsize; > }; > > #ifndef _NETINET_IN_PCB_H_ > > Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c > ============================================================================== > --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Sep 22 08:27:27 2014 (r271946) > @@ -673,6 +673,11 @@ int mlx4_en_do_start_port(struct net_dev > else > priv->rx_csum = 0; > > + /* set TSO limits so that we don't have to drop TX packets */ > + dev->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); > + dev->if_hw_tsomaxsegcount = 16; > + dev->if_hw_tsomaxsegsize = 65536; /* XXX can do up to 4GByte */ > + > err = mlx4_wol_read(priv->mdev->dev, &config, priv->port); > if (err) { > en_err(priv, "Failed to get WoL info, unable to modify\n"); > > Modified: head/sys/sys/sockbuf.h > ============================================================================== > --- head/sys/sys/sockbuf.h Mon Sep 22 07:59:25 2014 (r271945) > +++ head/sys/sys/sockbuf.h Mon Sep 22 08:27:27 2014 (r271946) > @@ -158,6 +158,8 @@ int sbreserve_locked(struct sockbuf *sb, > struct thread *td); > struct mbuf * > sbsndptr(struct sockbuf *sb, u_int off, u_int len, u_int *moff); > +struct mbuf * > + sbsndmbuf(struct sockbuf *sb, u_int off, u_int *moff); > void sbtoxsockbuf(struct sockbuf *sb, struct xsockbuf *xsb); > int sbwait(struct sockbuf *sb); > int sblock(struct sockbuf *sb, int flags); > That's the initial list of things I noticed. Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 14:48:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01B142AF; Mon, 13 Oct 2014 14:48:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1CC8D64; Mon, 13 Oct 2014 14:48:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DEmorL083659; Mon, 13 Oct 2014 14:48:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DEmnHq083654; Mon, 13 Oct 2014 14:48:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410131448.s9DEmnHq083654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 13 Oct 2014 14:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273038 - in head/sys/cam: ctl scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 14:48:51 -0000 Author: mav Date: Mon Oct 13 14:48:49 2014 New Revision: 273038 URL: https://svnweb.freebsd.org/changeset/base/273038 Log: Add support for READ DEFECT DATA (10/12) commands. SPC-4 r2 allows to return empty defect list if the list is not supported. We don't reallu support defect data lists, but this suppresses some errors. MFC after: 1 week Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_cmd_table.c head/sys/cam/ctl/ctl_private.h head/sys/cam/scsi/scsi_da.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Oct 13 14:40:00 2014 (r273037) +++ head/sys/cam/ctl/ctl.c Mon Oct 13 14:48:49 2014 (r273038) @@ -7389,6 +7389,89 @@ ctl_read_capacity_16(struct ctl_scsiio * } int +ctl_read_defect(struct ctl_scsiio *ctsio) +{ + struct scsi_read_defect_data_10 *ccb10; + struct scsi_read_defect_data_12 *ccb12; + struct scsi_read_defect_data_hdr_10 *data10; + struct scsi_read_defect_data_hdr_12 *data12; + struct ctl_lun *lun; + uint32_t alloc_len, data_len; + uint8_t format; + + CTL_DEBUG_PRINT(("ctl_read_defect\n")); + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + if (lun->flags & CTL_LUN_PR_RESERVED) { + uint32_t residx; + + /* + * XXX KDM need a lock here. + */ + residx = ctl_get_resindex(&ctsio->io_hdr.nexus); + if ((lun->res_type == SPR_TYPE_EX_AC + && residx != lun->pr_res_idx) + || ((lun->res_type == SPR_TYPE_EX_AC_RO + || lun->res_type == SPR_TYPE_EX_AC_AR) + && lun->pr_keys[residx] == 0)) { + ctl_set_reservation_conflict(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + } + + if (ctsio->cdb[0] == READ_DEFECT_DATA_10) { + ccb10 = (struct scsi_read_defect_data_10 *)&ctsio->cdb; + format = ccb10->format; + alloc_len = scsi_2btoul(ccb10->alloc_length); + data_len = sizeof(*data10); + } else { + ccb12 = (struct scsi_read_defect_data_12 *)&ctsio->cdb; + format = ccb12->format; + alloc_len = scsi_4btoul(ccb12->alloc_length); + data_len = sizeof(*data12); + } + if (alloc_len == 0) { + ctl_set_success(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + + if (ctsio->cdb[0] == READ_DEFECT_DATA_10) { + data10 = (struct scsi_read_defect_data_hdr_10 *) + ctsio->kern_data_ptr; + data10->format = format; + scsi_ulto2b(0, data10->length); + } else { + data12 = (struct scsi_read_defect_data_hdr_12 *) + ctsio->kern_data_ptr; + data12->format = format; + scsi_ulto2b(0, data12->generation); + scsi_ulto4b(0, data12->length); + } + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); +} + +int ctl_report_tagret_port_groups(struct ctl_scsiio *ctsio) { struct scsi_maintenance_in *cdb; Modified: head/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- head/sys/cam/ctl/ctl_cmd_table.c Mon Oct 13 14:40:00 2014 (r273037) +++ head/sys/cam/ctl/ctl_cmd_table.c Mon Oct 13 14:48:49 2014 (r273038) @@ -768,7 +768,11 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 37 READ DEFECT DATA(10) */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_read_defect, CTL_SERIDX_MD_SNS, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_LUN_PAT_NONE, + 10, {0, 0x1f, 0, 0, 0, 0, 0xff, 0xff, 0x07}}, /* 38 MEDIUM SCAN */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -1247,7 +1251,11 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* B7 READ DEFECT DATA(12) */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_read_defect, CTL_SERIDX_MD_SNS, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_LUN_PAT_NONE, + 12, {0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* B8 READ ELEMENT STATUS */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Mon Oct 13 14:40:00 2014 (r273037) +++ head/sys/cam/ctl/ctl_private.h Mon Oct 13 14:48:49 2014 (r273038) @@ -486,6 +486,7 @@ int ctl_mode_select(struct ctl_scsiio *c int ctl_mode_sense(struct ctl_scsiio *ctsio); int ctl_read_capacity(struct ctl_scsiio *ctsio); int ctl_read_capacity_16(struct ctl_scsiio *ctsio); +int ctl_read_defect(struct ctl_scsiio *ctsio); int ctl_read_write(struct ctl_scsiio *ctsio); int ctl_cnw(struct ctl_scsiio *ctsio); int ctl_report_luns(struct ctl_scsiio *ctsio); Modified: head/sys/cam/scsi/scsi_da.h ============================================================================== --- head/sys/cam/scsi/scsi_da.h Mon Oct 13 14:40:00 2014 (r273037) +++ head/sys/cam/scsi/scsi_da.h Mon Oct 13 14:48:49 2014 (r273038) @@ -92,28 +92,19 @@ struct scsi_reassign_blocks struct scsi_read_defect_data_10 { - u_int8_t opcode; - - /* - * The most significant 3 bits are the LUN, the other 5 are - * reserved. - */ -#define SRDD10_LUN_MASK 0xE0 - u_int8_t byte2; + uint8_t opcode; + uint8_t byte2; #define SRDD10_GLIST 0x08 #define SRDD10_PLIST 0x10 #define SRDD10_DLIST_FORMAT_MASK 0x07 #define SRDD10_BLOCK_FORMAT 0x00 #define SRDD10_BYTES_FROM_INDEX_FORMAT 0x04 #define SRDD10_PHYSICAL_SECTOR_FORMAT 0x05 - u_int8_t format; - - u_int8_t reserved[4]; - - u_int8_t alloc_length[2]; + uint8_t format; + uint8_t reserved[4]; + uint8_t alloc_length[2]; #define SRDD10_MAX_LENGTH 0xffff - - u_int8_t control; + uint8_t control; }; struct scsi_sanitize @@ -143,29 +134,18 @@ struct scsi_sanitize_parameter_list struct scsi_read_defect_data_12 { - u_int8_t opcode; - - /* - * The most significant 3 bits are the LUN, the other 5 are - * reserved. - */ -#define SRDD12_LUN_MASK 0xE0 - u_int8_t byte2; - + uint8_t opcode; #define SRDD12_GLIST 0x08 #define SRDD12_PLIST 0x10 #define SRDD12_DLIST_FORMAT_MASK 0x07 #define SRDD12_BLOCK_FORMAT 0x00 #define SRDD12_BYTES_FROM_INDEX_FORMAT 0x04 #define SRDD12_PHYSICAL_SECTOR_FORMAT 0x05 - u_int8_t format; - - u_int8_t reserved[4]; - - u_int8_t alloc_length[4]; - - u_int8_t control; - + uint8_t format; + uint8_t address_descriptor_index[4]; + uint8_t alloc_length[4]; + uint8_t reserved; + uint8_t control; }; @@ -376,6 +356,7 @@ struct scsi_read_defect_data_hdr_12 #define SRDDH12_BYTES_FROM_INDEX_FORMAT 0x04 #define SRDDH12_PHYSICAL_SECTOR_FORMAT 0x05 u_int8_t format; + u_int8_t generation[2]; u_int8_t length[4]; }; From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 15:16:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E3C295E; Mon, 13 Oct 2014 15:16:19 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 261FC82; Mon, 13 Oct 2014 15:16:19 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 82BB9B917; Mon, 13 Oct 2014 11:16:17 -0400 (EDT) From: John Baldwin To: Justin Hibbits Subject: Re: svn commit: r273009 - in head: etc/devd sys/powerpc/powermac Date: Mon, 13 Oct 2014 11:10:08 -0400 Message-ID: <2575643.xWorzK0sfL@ralph.baldwin.cx> User-Agent: KMail/4.12.5 (FreeBSD/10.1-BETA2; KDE/4.12.5; amd64; ; ) In-Reply-To: <20141012122636.4f1a0394@zhabar.attlocal.net> References: <201410121912.s9CJCncl021168@svn.freebsd.org> <20141012122636.4f1a0394@zhabar.attlocal.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 13 Oct 2014 11:16:17 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 15:16:19 -0000 On Sunday, October 12, 2014 12:26:36 PM Justin Hibbits wrote: > On Sun, 12 Oct 2014 19:12:49 +0000 (UTC) > > Justin Hibbits wrote: > > Author: jhibbits > > Date: Sun Oct 12 19:12:48 2014 > > New Revision: 273009 > > URL: https://svnweb.freebsd.org/changeset/base/273009 > > > > Log: > > Add an AC line monitor so power_profile can work > > > > Summary: > > Add a polling loop (1Hz) to monitor the battery and AC status, to > > > > notify devd like ACPI does for power monitoring. This > > allows /etc/rc.d/power_profile to work on PowerPC laptops > > > > Test Plan: > > Tested on a Titanium PowerBook, configuring economy_cpu_freq and > > performance_cpu_freq, disabling powerd. > > > > Reviewers: #powerpc, nwhitehorn > > > > Reviewed By: nwhitehorn > > > > Subscribers: rpaulo > > > > Differential Revision: https://reviews.freebsd.org/D937 > > MFC After: 3 weeks > Relnotes: Yes > > (Can we add a template to arc to include those fields in arc messages?) I think Baptiste looked at hacking the arcanist template to include our template fields and in general be more like our messages and ran away screaming instead. I've just been using copy and paste to copy the message I type into arc from the web browswer into my normal commit window. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 15:16:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81C0E95F; Mon, 13 Oct 2014 15:16:19 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B54285; Mon, 13 Oct 2014 15:16:19 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 31070B923; Mon, 13 Oct 2014 11:16:18 -0400 (EDT) From: John Baldwin To: Hiroki Sato Subject: Re: svn commit: r272974 - in head: etc share/man/man8 Date: Mon, 13 Oct 2014 11:03:07 -0400 Message-ID: <19185059.XYhcd3Nsjh@ralph.baldwin.cx> User-Agent: KMail/4.12.5 (FreeBSD/10.1-BETA2; KDE/4.12.5; amd64; ; ) In-Reply-To: <201410112349.s9BNnSXc065105@svn.freebsd.org> References: <201410112349.s9BNnSXc065105@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 13 Oct 2014 11:16:18 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 15:16:19 -0000 On Saturday, October 11, 2014 11:49:28 PM Hiroki Sato wrote: > Author: hrs > Date: Sat Oct 11 23:49:27 2014 > New Revision: 272974 > URL: https://svnweb.freebsd.org/changeset/base/272974 > > Log: > Add ${name}_env and ${name}_prepend. ${name}_env is an argument list > which will be passed to env(1). ${name}_prepend is simply prepended to the > command line for $command. Nice! I've needed _env before and resorted to hacks instead. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 15:16:21 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35C59A34; Mon, 13 Oct 2014 15:16:21 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F188D89; Mon, 13 Oct 2014 15:16:20 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E49BFB958; Mon, 13 Oct 2014 11:16:19 -0400 (EDT) From: John Baldwin To: "Alexander V. Chernikov" Subject: Re: svn commit: r272840 - in head: sbin/ipfw sys/conf sys/modules/ipfw sys/netgraph sys/netinet sys/netpfil/ipfw Date: Mon, 13 Oct 2014 09:48:44 -0400 Message-ID: <2571261.YJvB1AIsTc@ralph.baldwin.cx> User-Agent: KMail/4.12.5 (FreeBSD/10.1-BETA2; KDE/4.12.5; amd64; ; ) In-Reply-To: <5A09F093-EC19-4E02-8930-224D8CC08D31@ipfw.ru> References: <201410091932.s99JWaSc065624@svn.freebsd.org> <6784482.tcpsbB2Pkh@ralph.baldwin.cx> <5A09F093-EC19-4E02-8930-224D8CC08D31@ipfw.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 13 Oct 2014 11:16:20 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "Alexander V. Chernikov" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 15:16:21 -0000 On Sunday, October 12, 2014 12:14:51 AM Alexander V. Chernikov wrote: > On 11 Oct 2014, at 20:13, John Baldwin wrote: > > On Thursday, October 09, 2014 07:32:36 PM Alexander V. Chernikov wr= ote: > >> Author: melifaro > >> Date: Thu Oct 9 19:32:35 2014 > >> New Revision: 272840 > >> URL: https://svnweb.freebsd.org/changeset/base/272840 > >>=20 > >> Log: > >> Merge projects/ipfw to HEAD. > >=20 > > Should it now say 'ipfw3' in dmesg instead of ipfw2? Also, should = the >=20 > I=E2=80=99m not sure all these changes are worth renaming ipfw2 to ip= fw3 :) A similar change warranted ipfw -> ipfw2 IIRC. :) Note that the module= is=20 still called 'ipfw' in dependencies. The '2' in ipfw2 was simply the m= odule version number. > > associated filenames (ipfw2.* and ip_fw2.*) be renamed? (Perhaps b= ack > > to just ipfw.* and ip_fw.* to avoid more rototill in the future?) Another approach would be to just go back to calling it 'ipfw' and drop= the 2 entirely. It's kind of like how pkgng is now called pkg(8), or the "new NFS client/server" is now just the "NFS client/server". --=20 John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 15:18:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35CBEECC for ; Mon, 13 Oct 2014 15:18:44 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F09ABD3 for ; Mon, 13 Oct 2014 15:18:43 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DFIhS0067468 for ; Mon, 13 Oct 2014 15:18:43 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s9DFIh4N067463 for svn-src-head@freebsd.org; Mon, 13 Oct 2014 15:18:43 GMT (envelope-from bdrewery) Received: (qmail 43817 invoked from network); 13 Oct 2014 10:18:42 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 13 Oct 2014 10:18:42 -0500 Message-ID: <543BED4F.7010706@FreeBSD.org> Date: Mon, 13 Oct 2014 10:18:39 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: John Baldwin , Hiroki Sato Subject: Re: svn commit: r272974 - in head: etc share/man/man8 References: <201410112349.s9BNnSXc065105@svn.freebsd.org> <19185059.XYhcd3Nsjh@ralph.baldwin.cx> In-Reply-To: <19185059.XYhcd3Nsjh@ralph.baldwin.cx> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XQ7CDg4OiBclCSfkiePT13BxbBOHH9wFf" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 15:18:44 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XQ7CDg4OiBclCSfkiePT13BxbBOHH9wFf Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/13/2014 10:03 AM, John Baldwin wrote: > On Saturday, October 11, 2014 11:49:28 PM Hiroki Sato wrote: >> Author: hrs >> Date: Sat Oct 11 23:49:27 2014 >> New Revision: 272974 >> URL: https://svnweb.freebsd.org/changeset/base/272974 >> >> Log: >> Add ${name}_env and ${name}_prepend. ${name}_env is an argument lis= t >> which will be passed to env(1). ${name}_prepend is simply prepended t= o the >> command line for $command. >=20 > Nice! I've needed _env before and resorted to hacks instead. >=20 I'm planning to commit https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D88913 once I find som= e free time. It will allow wrapping any rc cmd with an arbitrary script. --=20 Regards, Bryan Drewery --XQ7CDg4OiBclCSfkiePT13BxbBOHH9wFf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJUO+1PAAoJEDXXcbtuRpfPxzQH/2ipsTteJFIifYAfRLsLFbva +LeoA4q1z05oKJkKvB9YW3VSKIBlUJuiX+y4T3aY3HzZjJUFSa+xBHtWt0+fFNph 3sXRKnWXvkzAFFMiCovlhbDPofHTDmAbhOAisbqF5uT1SYmPxN6LZqgnouMlAQR1 Nshb1XeTPYryQ7qZaC5e8MSwSmF9W0RsnXVDxlFT9SnygpQsfUcp/Nh3VNAkNtEJ u69LIVmq/Wx/rN38QNKZSRylYL22BwsfIWH+VUFLZf6csqXG0eoO1d59ndZp/gB5 K6Ujc18ocQigUcG7z9yaKN2omOKMNZMEmgnyJUj5hAQZmuXd4g+qdJ/aYEOGk38= =JIG7 -----END PGP SIGNATURE----- --XQ7CDg4OiBclCSfkiePT13BxbBOHH9wFf-- From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 15:24:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90361286 for ; Mon, 13 Oct 2014 15:24:46 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 579DA1BB for ; Mon, 13 Oct 2014 15:24:46 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DFOkqH070340 for ; Mon, 13 Oct 2014 15:24:46 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s9DFOkJk070337 for svn-src-head@freebsd.org; Mon, 13 Oct 2014 15:24:46 GMT (envelope-from bdrewery) Received: (qmail 95174 invoked from network); 13 Oct 2014 10:24:44 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 13 Oct 2014 10:24:44 -0500 Message-ID: <543BEEB9.9020809@FreeBSD.org> Date: Mon, 13 Oct 2014 10:24:41 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: John Baldwin , Hiroki Sato Subject: Re: svn commit: r272974 - in head: etc share/man/man8 References: <201410112349.s9BNnSXc065105@svn.freebsd.org> <19185059.XYhcd3Nsjh@ralph.baldwin.cx> <543BED4F.7010706@FreeBSD.org> In-Reply-To: <543BED4F.7010706@FreeBSD.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="duJuvN7OSk0w0KSE6UBHhV8fklqiimEih" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 15:24:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --duJuvN7OSk0w0KSE6UBHhV8fklqiimEih Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/13/2014 10:18 AM, Bryan Drewery wrote: > On 10/13/2014 10:03 AM, John Baldwin wrote: >> On Saturday, October 11, 2014 11:49:28 PM Hiroki Sato wrote: >>> Author: hrs >>> Date: Sat Oct 11 23:49:27 2014 >>> New Revision: 272974 >>> URL: https://svnweb.freebsd.org/changeset/base/272974 >>> >>> Log: >>> Add ${name}_env and ${name}_prepend. ${name}_env is an argument li= st >>> which will be passed to env(1). ${name}_prepend is simply prepended = to the >>> command line for $command. >> >> Nice! I've needed _env before and resorted to hacks instead. >> >=20 > I'm planning to commit > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D88913 once I find s= ome > free time. It will allow wrapping any rc cmd with an arbitrary script. >=20 (I didn't really read the entire patch for r272974). I see that this commit invalidates that. I'll close it :) --=20 Regards, Bryan Drewery --duJuvN7OSk0w0KSE6UBHhV8fklqiimEih Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJUO+65AAoJEDXXcbtuRpfP/YcH/1PhuODb8tLGiuTbnmZk5McO X+le97CoxWRncEC8ICKxE2RGqYVdvcndFoUn9zLoEuQEKa/bxidYH4q72I4jPvlV 8XCeG+BZV+xWn3vB0Wl/3vV58zzgMBHuDMXnjkRIo5ILUDPYSaQ3E0PxNY8h0OTg jtsbOovKuyrphrBk+p3JO4QQ931+/CwiTlcI+WVi2VAYgsEp+RtAruthxiJmFJTS s5i+tys8bYNjijkkYhbSMXI5TSCLM//STYMa1GHzGUk6lPaVYi7GlyEKvpigGEtr 6oUJzgVymUff6KTZWhZN5XEwukLWb+Hz/mn5eZaaZqUD2In2SSwZ8zoAnWpEfAk= =vLQd -----END PGP SIGNATURE----- --duJuvN7OSk0w0KSE6UBHhV8fklqiimEih-- From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 15:33:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 077665A5; Mon, 13 Oct 2014 15:33:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD6BF2D3; Mon, 13 Oct 2014 15:33:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DFXSus006798; Mon, 13 Oct 2014 15:33:28 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DFXR6l006791; Mon, 13 Oct 2014 15:33:27 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201410131533.s9DFXR6l006791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Mon, 13 Oct 2014 15:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273040 - head/sys/dev/mrsas X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 15:33:29 -0000 Author: kadesai Date: Mon Oct 13 15:33:27 2014 New Revision: 273040 URL: https://svnweb.freebsd.org/changeset/base/273040 Log: Fix for build issue on i386.xen and amd64.xen. This is a duplicate variable reference in mrsas, so now this patch isolate atomic_ variable and relavent function call using prefix mrsas_xx. Issue was introduced in r272737. MFC after: 2 weeks Sponsored by: Avago Technology Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c head/sys/dev/mrsas/mrsas_fp.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Mon Oct 13 14:52:54 2014 (r273039) +++ head/sys/dev/mrsas/mrsas.c Mon Oct 13 15:33:27 2014 (r273040) @@ -850,7 +850,7 @@ mrsas_attach(device_t dev) TAILQ_INIT(&sc->mrsas_mpt_cmd_list_head); TAILQ_INIT(&sc->mrsas_mfi_cmd_list_head); - atomic_set(&sc->fw_outstanding, 0); + mrsas_atomic_set(&sc->fw_outstanding, 0); sc->io_cmds_highwater = 0; @@ -1392,7 +1392,7 @@ mrsas_isr(void *arg) return; } /* If we are resetting, bail */ - if (test_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags)) { + if (mrsas_test_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags)) { printf(" Entered into ISR when OCR is going active. \n"); mrsas_clear_intr(sc); return; @@ -1462,7 +1462,7 @@ mrsas_complete_cmd(struct mrsas_softc *s lbinfo = &sc->load_balance_info[device_id]; if (cmd_mpt->load_balance == MRSAS_LOAD_BALANCE_FLAG) { arm = lbinfo->raid1DevHandle[0] == scsi_io_req->DevHandle ? 0 : 1; - atomic_dec(&lbinfo->scsi_pending_cmds[arm]); + mrsas_atomic_dec(&lbinfo->scsi_pending_cmds[arm]); cmd_mpt->load_balance &= ~MRSAS_LOAD_BALANCE_FLAG; } /* Fall thru and complete IO */ @@ -1471,7 +1471,7 @@ mrsas_complete_cmd(struct mrsas_softc *s mrsas_cmd_done(sc, cmd_mpt); scsi_io_req->RaidContext.status = 0; scsi_io_req->RaidContext.exStatus = 0; - atomic_dec(&sc->fw_outstanding); + mrsas_atomic_dec(&sc->fw_outstanding); break; case MRSAS_MPI2_FUNCTION_PASSTHRU_IO_REQUEST: /* MFI command */ cmd_mfi = sc->mfi_cmd_list[cmd_mpt->sync_cmd_idx]; @@ -2672,7 +2672,7 @@ mrsas_reset_ctrl(struct mrsas_softc *sc) "mrsas: Hardware critical error, returning FAIL.\n"); return FAIL; } - set_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); + mrsas_set_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); sc->adprecovery = MRSAS_ADPRESET_SM_INFAULT; mrsas_disable_intr(sc); DELAY(1000 * 1000); @@ -2689,7 +2689,7 @@ mrsas_reset_ctrl(struct mrsas_softc *sc) ccb = (union ccb *)(mpt_cmd->ccb_ptr); ccb->ccb_h.status = CAM_SCSI_BUS_RESET; mrsas_cmd_done(sc, mpt_cmd); - atomic_dec(&sc->fw_outstanding); + mrsas_atomic_dec(&sc->fw_outstanding); } } @@ -2787,7 +2787,7 @@ mrsas_reset_ctrl(struct mrsas_softc *sc) mrsas_dprint(sc, MRSAS_OCR, "mrsas_ioc_init() failed!\n"); continue; } - clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); + mrsas_clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); mrsas_enable_intr(sc); sc->adprecovery = MRSAS_HBA_OPERATIONAL; @@ -2833,12 +2833,12 @@ mrsas_reset_ctrl(struct mrsas_softc *sc) mrsas_kill_hba(sc); retval = FAIL; } else { - clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); + mrsas_clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); mrsas_enable_intr(sc); sc->adprecovery = MRSAS_HBA_OPERATIONAL; } out: - clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); + mrsas_clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); mrsas_dprint(sc, MRSAS_OCR, "Reset Exit with %d.\n", retval); return retval; @@ -2890,7 +2890,7 @@ mrsas_wait_for_outstanding(struct mrsas_ retval = 1; goto out; } - outstanding = atomic_read(&sc->fw_outstanding); + outstanding = mrsas_atomic_read(&sc->fw_outstanding); if (!outstanding) goto out; @@ -2904,7 +2904,7 @@ mrsas_wait_for_outstanding(struct mrsas_ DELAY(1000 * 1000); } - if (atomic_read(&sc->fw_outstanding)) { + if (mrsas_atomic_read(&sc->fw_outstanding)) { mrsas_dprint(sc, MRSAS_OCR, " pending commands remain after waiting," " will reset adapter.\n"); Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Mon Oct 13 14:52:54 2014 (r273039) +++ head/sys/dev/mrsas/mrsas.h Mon Oct 13 15:33:27 2014 (r273040) @@ -101,7 +101,7 @@ __FBSDID("$FreeBSD$"); */ #define BYTE_ALIGNMENT 1 #define MRSAS_MAX_NAME_LENGTH 32 -#define MRSAS_VERSION "06.705.10.01-fbsd" +#define MRSAS_VERSION "06.705.10.02-fbsd" #define MRSAS_ULONG_MAX 0xFFFFFFFFFFFFFFFF #define MRSAS_DEFAULT_TIMEOUT 0x14 /* Temporarily set */ #define DONE 0 @@ -513,12 +513,12 @@ Mpi2ReplyDescriptorsUnion_t, MPI2_POINTE typedef struct { volatile unsigned int val; -} atomic_t; +} mrsas_atomic_t; -#define atomic_read(v) atomic_load_acq_int(&(v)->val) -#define atomic_set(v,i) atomic_store_rel_int(&(v)->val, i) -#define atomic_dec(v) atomic_fetchadd_int(&(v)->val, -1) -#define atomic_inc(v) atomic_fetchadd_int(&(v)->val, 1) +#define mrsas_atomic_read(v) atomic_load_acq_int(&(v)->val) +#define mrsas_atomic_set(v,i) atomic_store_rel_int(&(v)->val, i) +#define mrsas_atomic_dec(v) atomic_fetchadd_int(&(v)->val, -1) +#define mrsas_atomic_inc(v) atomic_fetchadd_int(&(v)->val, 1) /* IOCInit Request message */ typedef struct _MPI2_IOC_INIT_REQUEST { @@ -813,7 +813,7 @@ typedef struct _LD_LOAD_BALANCE_INFO { u_int8_t loadBalanceFlag; u_int8_t reserved1; u_int16_t raid1DevHandle[2]; - atomic_t scsi_pending_cmds[2]; + mrsas_atomic_t scsi_pending_cmds[2]; u_int64_t last_accessed_block[2]; } LD_LOAD_BALANCE_INFO, *PLD_LOAD_BALANCE_INFO; @@ -2524,7 +2524,7 @@ struct mrsas_softc { bus_addr_t ctlr_info_phys_addr; u_int32_t max_sectors_per_req; u_int8_t disableOnlineCtrlReset; - atomic_t fw_outstanding; + mrsas_atomic_t fw_outstanding; u_int32_t mrsas_debug; u_int32_t mrsas_io_timeout; u_int32_t mrsas_fw_fault_check_delay; @@ -2577,19 +2577,19 @@ struct mrsas_softc { #endif static __inline void -clear_bit(int b, volatile void *p) +mrsas_clear_bit(int b, volatile void *p) { atomic_clear_int(((volatile int *)p) + (b >> 5), 1 << (b & 0x1f)); } static __inline void -set_bit(int b, volatile void *p) +mrsas_set_bit(int b, volatile void *p) { atomic_set_int(((volatile int *)p) + (b >> 5), 1 << (b & 0x1f)); } static __inline int -test_bit(int b, volatile void *p) +mrsas_test_bit(int b, volatile void *p) { return ((volatile int *)p)[b >> 5] & (1 << (b & 0x1f)); } Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Mon Oct 13 14:52:54 2014 (r273039) +++ head/sys/dev/mrsas/mrsas_cam.c Mon Oct 13 15:33:27 2014 (r273040) @@ -532,9 +532,9 @@ mrsas_startio(struct mrsas_softc *sc, st */ callout_reset(&cmd->cm_callout, (sc->mrsas_io_timeout * hz) / 1000, mrsas_scsiio_timeout, cmd); - atomic_inc(&sc->fw_outstanding); + mrsas_atomic_inc(&sc->fw_outstanding); - if (atomic_read(&sc->fw_outstanding) > sc->io_cmds_highwater) + if (mrsas_atomic_read(&sc->fw_outstanding) > sc->io_cmds_highwater) sc->io_cmds_highwater++; mrsas_fire_cmd(sc, req_desc->addr.u.low, req_desc->addr.u.high); Modified: head/sys/dev/mrsas/mrsas_fp.c ============================================================================== --- head/sys/dev/mrsas/mrsas_fp.c Mon Oct 13 14:52:54 2014 (r273039) +++ head/sys/dev/mrsas/mrsas_fp.c Mon Oct 13 15:33:27 2014 (r273040) @@ -1347,8 +1347,8 @@ mrsas_get_best_arm(PLD_LOAD_BALANCE_INFO u_int8_t bestArm; /* get the pending cmds for the data and mirror arms */ - pend0 = atomic_read(&lbInfo->scsi_pending_cmds[0]); - pend1 = atomic_read(&lbInfo->scsi_pending_cmds[1]); + pend0 = mrsas_atomic_read(&lbInfo->scsi_pending_cmds[0]); + pend1 = mrsas_atomic_read(&lbInfo->scsi_pending_cmds[1]); /* Determine the disk whose head is nearer to the req. block */ diff0 = ABS_DIFF(block, lbInfo->last_accessed_block[0]); @@ -1382,7 +1382,7 @@ mrsas_get_updated_dev_handle(PLD_LOAD_BA /* get best new arm */ arm = mrsas_get_best_arm(lbInfo, old_arm, io_info->ldStartBlock, io_info->numBlocks); devHandle = lbInfo->raid1DevHandle[arm]; - atomic_inc(&lbInfo->scsi_pending_cmds[arm]); + mrsas_atomic_inc(&lbInfo->scsi_pending_cmds[arm]); return devHandle; } From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 15:35:11 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08E1C6F3; Mon, 13 Oct 2014 15:35:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDEAD2E1; Mon, 13 Oct 2014 15:35:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DFZAgC007111; Mon, 13 Oct 2014 15:35:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DFZ9kY007105; Mon, 13 Oct 2014 15:35:09 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410131535.s9DFZ9kY007105@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 13 Oct 2014 15:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273041 - in head/sys/arm/ti: . omap3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 15:35:11 -0000 Author: andrew Date: Mon Oct 13 15:35:08 2014 New Revision: 273041 URL: https://svnweb.freebsd.org/changeset/base/273041 Log: Start removing the omap3 support. In base it was only ever a header and a few changes to drivers, no kernel config was added. As the SoCs are quite old and the code is unmaintained start the process of removing support by deleting the header file and code that depends on it along with the macro SOC_OMAP3. Other Ti SoCs shouldn't be affected, other than for us to have less code to maintain. Differential Revision: https://reviews.freebsd.org/D936 Reviewed by: rpaulo, loos Deleted: head/sys/arm/ti/omap3/omap3_reg.h Modified: head/sys/arm/ti/ti_cpuid.c head/sys/arm/ti/ti_cpuid.h head/sys/arm/ti/ti_gpio.c head/sys/arm/ti/ti_i2c.c head/sys/arm/ti/ti_mmchs.c head/sys/arm/ti/ti_sdhci.c Modified: head/sys/arm/ti/ti_cpuid.c ============================================================================== --- head/sys/arm/ti/ti_cpuid.c Mon Oct 13 15:33:27 2014 (r273040) +++ head/sys/arm/ti/ti_cpuid.c Mon Oct 13 15:35:08 2014 (r273041) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #define OMAP4_STD_FUSE_DIE_ID_0 0x2200 @@ -198,67 +197,6 @@ omap4_get_revision(void) } } -/** - * omap3_get_revision - determines omap3 revision - * - * Reads the registers to determine the revision of the chip we are currently - * running on. Stores the information in global variables. - * - * WARNING: This function currently only really works for OMAP3530 devices. - * - * - * - */ -static void -omap3_get_revision(void) -{ - uint32_t id_code; - uint32_t revision; - uint32_t hawkeye; - bus_space_handle_t bsh; - - /* The chip revsion is read from the device identification registers and - * the JTAG (?) tap registers, which are located in address 0x4A00_2200 to - * 0x4A00_2218. This is part of the L4_CORE memory range and should have - * been mapped in by the machdep.c code. - * - * CONTROL_IDCODE 0x4830 A204 (this is the only one we need) - * - * - */ - bus_space_map(fdtbus_bs_tag, OMAP35XX_L4_WAKEUP_HWBASE, 0x10000, 0, &bsh); - id_code = bus_space_read_4(fdtbus_bs_tag, bsh, OMAP3_ID_CODE); - bus_space_unmap(fdtbus_bs_tag, bsh, 0x10000); - - hawkeye = ((id_code >> 12) & 0xffff); - revision = ((id_code >> 28) & 0xf); - - switch (hawkeye) { - case 0xB6D6: - chip_revision = OMAP3350_REV_ES1_0; - break; - case 0xB7AE: - if (revision == 1) - chip_revision = OMAP3530_REV_ES2_0; - else if (revision == 2) - chip_revision = OMAP3530_REV_ES2_1; - else if (revision == 3) - chip_revision = OMAP3530_REV_ES3_0; - else if (revision == 4) - chip_revision = OMAP3530_REV_ES3_1; - else if (revision == 7) - chip_revision = OMAP3530_REV_ES3_1_2; - break; - default: - /* Default to the latest revision if we can't determine type */ - chip_revision = OMAP3530_REV_ES3_1_2; - break; - } - printf("Texas Instruments OMAP%04x Processor, Revision ES%u.%u\n", - OMAP_REV_DEVICE(chip_revision), OMAP_REV_MAJOR(chip_revision), - OMAP_REV_MINOR(chip_revision)); -} - static void am335x_get_revision(void) { @@ -313,9 +251,6 @@ static void ti_cpu_ident(void *dummy) { switch(ti_chip()) { - case CHIP_OMAP_3: - omap3_get_revision(); - break; case CHIP_OMAP_4: omap4_get_revision(); break; Modified: head/sys/arm/ti/ti_cpuid.h ============================================================================== --- head/sys/arm/ti/ti_cpuid.h Mon Oct 13 15:33:27 2014 (r273040) +++ head/sys/arm/ti/ti_cpuid.h Mon Oct 13 15:35:08 2014 (r273041) @@ -67,16 +67,13 @@ #define AM335X_DEVREV(x) ((x) >> 28) -#define CHIP_OMAP_3 0 -#define CHIP_OMAP_4 1 -#define CHIP_AM335X 2 +#define CHIP_OMAP_4 0 +#define CHIP_AM335X 1 static __inline int ti_chip(void) { #if defined(SOC_OMAP4) return CHIP_OMAP_4; -#elif defined(SOC_OMAP3) - return CHIP_OMAP_3; #elif defined(SOC_TI_AM335X) return CHIP_AM335X; #else Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Mon Oct 13 15:33:27 2014 (r273040) +++ head/sys/arm/ti/ti_gpio.c Mon Oct 13 15:35:08 2014 (r273041) @@ -70,32 +70,7 @@ __FBSDID("$FreeBSD$"); /* Register definitions */ #define TI_GPIO_REVISION 0x0000 #define TI_GPIO_SYSCONFIG 0x0010 -#if defined(SOC_OMAP3) -#define TI_GPIO_SYSSTATUS 0x0014 -#define TI_GPIO_IRQSTATUS1 0x0018 -#define TI_GPIO_IRQENABLE1 0x001C -#define TI_GPIO_WAKEUPENABLE 0x0020 -#define TI_GPIO_IRQSTATUS2 0x0028 -#define TI_GPIO_IRQENABLE2 0x002C -#define TI_GPIO_CTRL 0x0030 -#define TI_GPIO_OE 0x0034 -#define TI_GPIO_DATAIN 0x0038 -#define TI_GPIO_DATAOUT 0x003C -#define TI_GPIO_LEVELDETECT0 0x0040 -#define TI_GPIO_LEVELDETECT1 0x0044 -#define TI_GPIO_RISINGDETECT 0x0048 -#define TI_GPIO_FALLINGDETECT 0x004C -#define TI_GPIO_DEBOUNCENABLE 0x0050 -#define TI_GPIO_DEBOUNCINGTIME 0x0054 -#define TI_GPIO_CLEARIRQENABLE1 0x0060 -#define TI_GPIO_SETIRQENABLE1 0x0064 -#define TI_GPIO_CLEARIRQENABLE2 0x0070 -#define TI_GPIO_SETIRQENABLE2 0x0074 -#define TI_GPIO_CLEARWKUENA 0x0080 -#define TI_GPIO_SETWKUENA 0x0084 -#define TI_GPIO_CLEARDATAOUT 0x0090 -#define TI_GPIO_SETDATAOUT 0x0094 -#elif defined(SOC_OMAP4) || defined(SOC_TI_AM335X) +#if defined(SOC_OMAP4) || defined(SOC_TI_AM335X) #define TI_GPIO_IRQSTATUS_RAW_0 0x0024 #define TI_GPIO_IRQSTATUS_RAW_1 0x0028 #define TI_GPIO_IRQSTATUS_0 0x002C @@ -131,10 +106,6 @@ __FBSDID("$FreeBSD$"); #endif /* Other SoC Specific definitions */ -#define OMAP3_MAX_GPIO_BANKS 6 -#define OMAP3_FIRST_GPIO_BANK 1 -#define OMAP3_INTR_PER_BANK 1 -#define OMAP3_GPIO_REV 0x00000025 #define OMAP4_MAX_GPIO_BANKS 6 #define OMAP4_FIRST_GPIO_BANK 1 #define OMAP4_INTR_PER_BANK 1 @@ -152,10 +123,6 @@ static u_int ti_max_gpio_banks(void) { switch(ti_chip()) { -#ifdef SOC_OMAP3 - case CHIP_OMAP_3: - return (OMAP3_MAX_GPIO_BANKS); -#endif #ifdef SOC_OMAP4 case CHIP_OMAP_4: return (OMAP4_MAX_GPIO_BANKS); @@ -172,10 +139,6 @@ static u_int ti_max_gpio_intrs(void) { switch(ti_chip()) { -#ifdef SOC_OMAP3 - case CHIP_OMAP_3: - return (OMAP3_MAX_GPIO_BANKS * OMAP3_INTR_PER_BANK); -#endif #ifdef SOC_OMAP4 case CHIP_OMAP_4: return (OMAP4_MAX_GPIO_BANKS * OMAP4_INTR_PER_BANK); @@ -192,10 +155,6 @@ static u_int ti_first_gpio_bank(void) { switch(ti_chip()) { -#ifdef SOC_OMAP3 - case CHIP_OMAP_3: - return (OMAP3_FIRST_GPIO_BANK); -#endif #ifdef SOC_OMAP4 case CHIP_OMAP_4: return (OMAP4_FIRST_GPIO_BANK); @@ -212,10 +171,6 @@ static uint32_t ti_gpio_rev(void) { switch(ti_chip()) { -#ifdef SOC_OMAP3 - case CHIP_OMAP_3: - return (OMAP3_GPIO_REV); -#endif #ifdef SOC_OMAP4 case CHIP_OMAP_4: return (OMAP4_GPIO_REV); Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Mon Oct 13 15:33:27 2014 (r273040) +++ head/sys/arm/ti/ti_i2c.c Mon Oct 13 15:35:08 2014 (r273041) @@ -111,10 +111,6 @@ struct ti_i2c_clock_config uint8_t hssclh; /* High Speed mode SCL high time */ }; -#if defined(SOC_OMAP3) -#error "Unsupported SoC" -#endif - #if defined(SOC_OMAP4) static struct ti_i2c_clock_config ti_omap4_i2c_clock_configs[] = { { IIC_UNKNOWN, 100000, 23, 13, 15, 0, 0}, Modified: head/sys/arm/ti/ti_mmchs.c ============================================================================== --- head/sys/arm/ti/ti_mmchs.c Mon Oct 13 15:33:27 2014 (r273040) +++ head/sys/arm/ti/ti_mmchs.c Mon Oct 13 15:35:08 2014 (r273041) @@ -1621,9 +1621,7 @@ ti_mmchs_activate(device_t dev) goto errout; /* Set the register offset */ - if (ti_chip() == CHIP_OMAP_3) - sc->sc_reg_off = OMAP3_MMCHS_REG_OFFSET; - else if (ti_chip() == CHIP_OMAP_4) + if (ti_chip() == CHIP_OMAP_4) sc->sc_reg_off = OMAP4_MMCHS_REG_OFFSET; else if (ti_chip() == CHIP_AM335X) sc->sc_reg_off = AM335X_MMCHS_REG_OFFSET; Modified: head/sys/arm/ti/ti_sdhci.c ============================================================================== --- head/sys/arm/ti/ti_sdhci.c Mon Oct 13 15:33:27 2014 (r273040) +++ head/sys/arm/ti/ti_sdhci.c Mon Oct 13 15:35:08 2014 (r273041) @@ -494,9 +494,7 @@ ti_sdhci_attach(device_t dev) * Set the offset from the device's memory start to the MMCHS registers. * Also for OMAP4 disable high speed mode due to erratum ID i626. */ - if (ti_chip() == CHIP_OMAP_3) - sc->mmchs_reg_off = OMAP3_MMCHS_REG_OFFSET; - else if (ti_chip() == CHIP_OMAP_4) { + if (ti_chip() == CHIP_OMAP_4) { sc->mmchs_reg_off = OMAP4_MMCHS_REG_OFFSET; sc->disable_highspeed = true; } else if (ti_chip() == CHIP_AM335X) From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:12:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7AD5D0B; Mon, 13 Oct 2014 16:12:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3A0EB34; Mon, 13 Oct 2014 16:12:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGCS2m026651; Mon, 13 Oct 2014 16:12:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGCSqg026649; Mon, 13 Oct 2014 16:12:28 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410131612.s9DGCSqg026649@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 13 Oct 2014 16:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273045 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:12:29 -0000 Author: andrew Date: Mon Oct 13 16:12:28 2014 New Revision: 273045 URL: https://svnweb.freebsd.org/changeset/base/273045 Log: Sort the files in the am355x directory. Modified: head/sys/arm/ti/am335x/files.am335x Modified: head/sys/arm/ti/am335x/files.am335x ============================================================================== --- head/sys/arm/ti/am335x/files.am335x Mon Oct 13 15:58:03 2014 (r273044) +++ head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:12:28 2014 (r273045) @@ -1,13 +1,15 @@ #$FreeBSD$ arm/ti/aintc.c standard -arm/ti/am335x/am335x_prcm.c standard + arm/ti/am335x/am335x_dmtimer.c standard -arm/ti/am335x/am335x_scm_padconf.c standard arm/ti/am335x/am335x_lcd.c optional sc arm/ti/am335x/am335x_lcd_syscons.c optional sc +arm/ti/am335x/am335x_prcm.c standard arm/ti/am335x/am335x_pwm.c standard +arm/ti/am335x/am335x_scm_padconf.c standard arm/ti/am335x/am335x_usbss.c optional musb fdt + arm/ti/ti_edma3.c standard arm/ti/ti_sdhci.c optional sdhci #arm/ti/ti_mmchs.c optional mmc From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:15:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F168911D; Mon, 13 Oct 2014 16:15:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDFD5B75; Mon, 13 Oct 2014 16:15:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGFWKc027204; Mon, 13 Oct 2014 16:15:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGFWYf027203; Mon, 13 Oct 2014 16:15:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410131615.s9DGFWYf027203@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 13 Oct 2014 16:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273046 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:15:33 -0000 Author: mav Date: Mon Oct 13 16:15:32 2014 New Revision: 273046 URL: https://svnweb.freebsd.org/changeset/base/273046 Log: Don't confuse frontend with zero length data moves, just return immediately. MFC after: 1 week Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Oct 13 16:12:28 2014 (r273045) +++ head/sys/cam/ctl/ctl.c Mon Oct 13 16:15:32 2014 (r273046) @@ -10821,15 +10821,9 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio } ctsio->scsi_status = SCSI_STATUS_OK; - if (ctsio->kern_data_len > 0) { - ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; - ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); - } else { - ctsio->io_hdr.status = CTL_SUCCESS; - ctl_done((union ctl_io *)ctsio); - } - + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } @@ -12901,6 +12895,12 @@ ctl_datamove(union ctl_io *io) return; } + /* Don't confuse frontend with zero length data move. */ + if (io->scsiio.kern_data_len == 0) { + io->scsiio.be_move_done(io); + return; + } + /* * If we're in XFER mode and this I/O is from the other shelf * controller, we need to send the DMA to the other side to From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:16:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42B5D272; Mon, 13 Oct 2014 16:16:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2ED11B8A; Mon, 13 Oct 2014 16:16:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGGXlo027396; Mon, 13 Oct 2014 16:16:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGGWtK027394; Mon, 13 Oct 2014 16:16:32 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410131616.s9DGGWtK027394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 13 Oct 2014 16:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273047 - in head/sys/arm: conf ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:16:33 -0000 Author: andrew Date: Mon Oct 13 16:16:32 2014 New Revision: 273047 URL: https://svnweb.freebsd.org/changeset/base/273047 Log: Remove the need for files.beaglebone and std.beaglebone by moving the one option they defined into files.am335x. Deleted: head/sys/arm/ti/am335x/files.beaglebone head/sys/arm/ti/am335x/std.beaglebone Modified: head/sys/arm/conf/BEAGLEBONE head/sys/arm/ti/am335x/files.am335x Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Mon Oct 13 16:15:32 2014 (r273046) +++ head/sys/arm/conf/BEAGLEBONE Mon Oct 13 16:16:32 2014 (r273047) @@ -22,7 +22,7 @@ ident BEAGLEBONE -include "../ti/am335x/std.beaglebone" +include "../ti/am335x/std.am335x" makeoptions WITHOUT_MODULES="ahc" Modified: head/sys/arm/ti/am335x/files.am335x ============================================================================== --- head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:15:32 2014 (r273046) +++ head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:16:32 2014 (r273047) @@ -5,6 +5,7 @@ arm/ti/aintc.c standard arm/ti/am335x/am335x_dmtimer.c standard arm/ti/am335x/am335x_lcd.c optional sc arm/ti/am335x/am335x_lcd_syscons.c optional sc +arm/ti/am335x/am335x_pmic.c optional am335x_pmic arm/ti/am335x/am335x_prcm.c standard arm/ti/am335x/am335x_pwm.c standard arm/ti/am335x/am335x_scm_padconf.c standard From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:17:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C97543B9; Mon, 13 Oct 2014 16:17:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5E53B92; Mon, 13 Oct 2014 16:17:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGHhTS027584; Mon, 13 Oct 2014 16:17:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGHh25027583; Mon, 13 Oct 2014 16:17:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201410131617.s9DGHh25027583@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 13 Oct 2014 16:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273048 - head/usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:17:44 -0000 Author: jhb Date: Mon Oct 13 16:17:42 2014 New Revision: 273048 URL: https://svnweb.freebsd.org/changeset/base/273048 Log: Fix most of the warnings in kdump(1). Sponsored by: Norse Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Mon Oct 13 16:16:32 2014 (r273047) +++ head/usr.bin/kdump/kdump.c Mon Oct 13 16:17:42 2014 (r273048) @@ -103,9 +103,9 @@ void ktrgenio(struct ktr_genio *, int); void ktrpsig(struct ktr_psig *); void ktrcsw(struct ktr_csw *); void ktrcsw_old(struct ktr_csw_old *); -void ktruser_malloc(unsigned char *); -void ktruser_rtld(int, unsigned char *); -void ktruser(int, unsigned char *); +void ktruser_malloc(void *); +void ktruser_rtld(int, void *); +void ktruser(int, void *); void ktrcaprights(cap_rights_t *); void ktrsockaddr(struct sockaddr *); void ktrstat(struct stat *); @@ -122,10 +122,13 @@ void ioctlname(unsigned long, int); #define TIMESTAMP_ELAPSED 0x2 #define TIMESTAMP_RELATIVE 0x4 -int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, +extern const char *signames[], *syscallnames[]; +extern int nsyscalls; + +static int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, resolv = 0, abiflag = 0, syscallno = 0; -const char *tracefile = DEF_TRACEFILE; -struct ktr_header ktr_header; +static const char *tracefile = DEF_TRACEFILE; +static struct ktr_header ktr_header; #define TIME_FORMAT "%b %e %T %Y" #define eqs(s1, s2) (strcmp((s1), (s2)) == 0) @@ -172,7 +175,7 @@ struct proc_info pid_t pid; }; -TAILQ_HEAD(trace_procs, proc_info) trace_procs; +static TAILQ_HEAD(trace_procs, proc_info) trace_procs; #ifdef HAVE_LIBCAPSICUM static cap_channel_t *cappwd, *capgrp; @@ -456,7 +459,7 @@ limitfd(int fd) unsigned long cmd; cap_rights_init(&rights, CAP_FSTAT); - cmd = -1; + cmd = 0; switch (fd) { case STDIN_FILENO: @@ -479,7 +482,7 @@ limitfd(int fd) if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) err(1, "unable to limit rights for descriptor %d", fd); - if (cmd != -1 && cap_ioctls_limit(fd, &cmd, 1) < 0 && errno != ENOSYS) + if (cmd != 0 && cap_ioctls_limit(fd, &cmd, 1) < 0 && errno != ENOSYS) err(1, "unable to limit ioctls for descriptor %d", fd); } @@ -1093,7 +1096,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in print_number(ip, narg, c); putchar(','); flagsname(ip[0]); - printf(",0%o", ip[1]); + printf(",0%o", (unsigned int)ip[1]); ip += 3; narg -= 3; break; @@ -1515,9 +1518,10 @@ struct utrace_rtld { }; void -ktruser_rtld(int len, unsigned char *p) +ktruser_rtld(int len, void *p) { - struct utrace_rtld *ut = (struct utrace_rtld *)p; + struct utrace_rtld *ut = p; + unsigned char *cp; void *parent; int mode; @@ -1582,14 +1586,15 @@ ktruser_rtld(int len, unsigned char *p) ut->name); break; default: - p += 4; + cp = p; + cp += 4; len -= 4; printf("RTLD: %d ", len); while (len--) if (decimal) - printf(" %d", *p++); + printf(" %d", *cp++); else - printf(" %02x", *p++); + printf(" %02x", *cp++); printf("\n"); } } @@ -1601,9 +1606,9 @@ struct utrace_malloc { }; void -ktruser_malloc(unsigned char *p) +ktruser_malloc(void *p) { - struct utrace_malloc *ut = (struct utrace_malloc *)p; + struct utrace_malloc *ut = p; if (ut->p == (void *)(intptr_t)(-1)) printf("malloc_init()\n"); @@ -1616,8 +1621,9 @@ ktruser_malloc(unsigned char *p) } void -ktruser(int len, unsigned char *p) +ktruser(int len, void *p) { + unsigned char *cp; if (len >= 8 && bcmp(p, "RTLD", 4) == 0) { ktruser_rtld(len, p); @@ -1630,11 +1636,12 @@ ktruser(int len, unsigned char *p) } printf("%d ", len); + cp = p; while (len--) if (decimal) - printf(" %d", *p++); + printf(" %d", *cp++); else - printf(" %02x", *p++); + printf(" %02x", *cp++); printf("\n"); } From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:20:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24832532; Mon, 13 Oct 2014 16:20:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10983BA7; Mon, 13 Oct 2014 16:20:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGK4Rx028321; Mon, 13 Oct 2014 16:20:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGK4TG028318; Mon, 13 Oct 2014 16:20:04 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410131620.s9DGK4TG028318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 13 Oct 2014 16:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273049 - in head/sys/arm/ti: . am335x omap4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:20:05 -0000 Author: andrew Date: Mon Oct 13 16:20:04 2014 New Revision: 273049 URL: https://svnweb.freebsd.org/changeset/base/273049 Log: Remove ti_mmchs.c, it has been replaced by ti_sdhci.c. Deleted: head/sys/arm/ti/ti_mmchs.c head/sys/arm/ti/ti_mmchs.h Modified: head/sys/arm/ti/am335x/files.am335x head/sys/arm/ti/omap4/files.omap4 Modified: head/sys/arm/ti/am335x/files.am335x ============================================================================== --- head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:17:42 2014 (r273048) +++ head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:20:04 2014 (r273049) @@ -13,5 +13,4 @@ arm/ti/am335x/am335x_usbss.c optional m arm/ti/ti_edma3.c standard arm/ti/ti_sdhci.c optional sdhci -#arm/ti/ti_mmchs.c optional mmc arm/ti/cpsw/if_cpsw.c optional cpsw Modified: head/sys/arm/ti/omap4/files.omap4 ============================================================================== --- head/sys/arm/ti/omap4/files.omap4 Mon Oct 13 16:17:42 2014 (r273048) +++ head/sys/arm/ti/omap4/files.omap4 Mon Oct 13 16:20:04 2014 (r273049) @@ -7,7 +7,6 @@ arm/ti/ti_smc.S standard arm/ti/usb/omap_ehci.c optional usb ehci arm/ti/ti_sdma.c optional ti_sdma arm/ti/ti_sdhci.c optional sdhci -#arm/ti/ti_mmchs.c optional mmc arm/ti/omap4/omap4_l2cache.c optional pl310 arm/ti/omap4/omap4_prcm_clks.c standard From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:23:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C3C0704; Mon, 13 Oct 2014 16:23:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58D93C59; Mon, 13 Oct 2014 16:23:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGNqq1032226; Mon, 13 Oct 2014 16:23:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGNqhH032225; Mon, 13 Oct 2014 16:23:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201410131623.s9DGNqhH032225@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 13 Oct 2014 16:23:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273050 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:23:52 -0000 Author: imp Date: Mon Oct 13 16:23:51 2014 New Revision: 273050 URL: https://svnweb.freebsd.org/changeset/base/273050 Log: class, subclass and progif were never used, so don't bother setting them. Modified: head/sys/dev/sdhci/sdhci_pci.c Modified: head/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- head/sys/dev/sdhci/sdhci_pci.c Mon Oct 13 16:20:04 2014 (r273049) +++ head/sys/dev/sdhci/sdhci_pci.c Mon Oct 13 16:23:51 2014 (r273050) @@ -260,16 +260,12 @@ sdhci_pci_attach(device_t dev) struct sdhci_pci_softc *sc = device_get_softc(dev); uint32_t model; uint16_t subvendor; - uint8_t class, subclass, progif; int bar, err, rid, slots, i; sc->dev = dev; model = (uint32_t)pci_get_device(dev) << 16; model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; subvendor = pci_get_subvendor(dev); - class = pci_get_class(dev); - subclass = pci_get_subclass(dev); - progif = pci_get_progif(dev); /* Apply chip specific quirks. */ for (i = 0; sdhci_devices[i].model != 0; i++) { if (sdhci_devices[i].model == model && From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:23:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AFA3843; Mon, 13 Oct 2014 16:23:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 176A9C5A; Mon, 13 Oct 2014 16:23:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGNwcC032295; Mon, 13 Oct 2014 16:23:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGNwj3032294; Mon, 13 Oct 2014 16:23:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201410131623.s9DGNwj3032294@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 13 Oct 2014 16:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273051 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:23:59 -0000 Author: imp Date: Mon Oct 13 16:23:58 2014 New Revision: 273051 URL: https://svnweb.freebsd.org/changeset/base/273051 Log: Use the C99 flexible array construct to denote a variable amount of data rather than the old-school [1] construct. We have required c99 compilers for some time. Modified: head/sys/dev/isp/ispmbox.h Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Mon Oct 13 16:23:51 2014 (r273050) +++ head/sys/dev/isp/ispmbox.h Mon Oct 13 16:23:58 2014 (r273051) @@ -1442,7 +1442,7 @@ typedef struct { uint16_t snscb_addr[4]; /* response buffer address */ uint16_t snscb_sblen; /* subcommand buffer length (words) */ uint16_t snscb_reserved1; - uint16_t snscb_data[1]; /* variable data */ + uint16_t snscb_data[]; /* variable data */ } sns_screq_t; /* Subcommand Request Structure */ typedef struct { @@ -1503,7 +1503,7 @@ typedef struct { uint8_t snscb_port_type; uint8_t snscb_port_id[3]; uint8_t snscb_portname[8]; - uint16_t snscb_data[1]; /* variable data */ + uint16_t snscb_data[]; /* variable data */ } sns_scrsp_t; /* Subcommand Response Structure */ typedef struct { From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:33:08 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF035B19; Mon, 13 Oct 2014 16:33:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB636D70; Mon, 13 Oct 2014 16:33:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGX8vj037021; Mon, 13 Oct 2014 16:33:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGX8OJ037020; Mon, 13 Oct 2014 16:33:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410131633.s9DGX8OJ037020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 13 Oct 2014 16:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273052 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:33:09 -0000 Author: andrew Date: Mon Oct 13 16:33:08 2014 New Revision: 273052 URL: https://svnweb.freebsd.org/changeset/base/273052 Log: Use a switch on ti_chip() to find which SoC we are on. This allow us t only enable support for the SoCs we are built for. Modified: head/sys/arm/ti/ti_sdhci.c Modified: head/sys/arm/ti/ti_sdhci.c ============================================================================== --- head/sys/arm/ti/ti_sdhci.c Mon Oct 13 16:23:58 2014 (r273051) +++ head/sys/arm/ti/ti_sdhci.c Mon Oct 13 16:33:08 2014 (r273052) @@ -494,13 +494,21 @@ ti_sdhci_attach(device_t dev) * Set the offset from the device's memory start to the MMCHS registers. * Also for OMAP4 disable high speed mode due to erratum ID i626. */ - if (ti_chip() == CHIP_OMAP_4) { + switch (ti_chip()) { +#ifdef SOC_OMAP4 + case CHIP_OMAP_4: sc->mmchs_reg_off = OMAP4_MMCHS_REG_OFFSET; sc->disable_highspeed = true; - } else if (ti_chip() == CHIP_AM335X) + break; +#endif +#ifdef SOC_TI_AM335X + case CHIP_AM335X: sc->mmchs_reg_off = AM335X_MMCHS_REG_OFFSET; - else + break; +#endif + default: panic("Unknown OMAP device\n"); + } /* * The standard SDHCI registers are at a fixed offset (the same on all From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:37:08 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DEB0CE8; Mon, 13 Oct 2014 16:37:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4981FD95; Mon, 13 Oct 2014 16:37:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGb8q1037652; Mon, 13 Oct 2014 16:37:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGb7t7037644; Mon, 13 Oct 2014 16:37:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201410131637.s9DGb7t7037644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 13 Oct 2014 16:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273053 - in head/usr.bin: kdump truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:37:08 -0000 Author: jhb Date: Mon Oct 13 16:37:06 2014 New Revision: 273053 URL: https://svnweb.freebsd.org/changeset/base/273053 Log: Decode the arguments passed to _umtx_op(). In particular, decode the opcode. MFC after: 1 week Sponsored by: Norse Modified: head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Mon Oct 13 16:33:08 2014 (r273052) +++ head/usr.bin/kdump/kdump.c Mon Oct 13 16:37:06 2014 (r273053) @@ -57,6 +57,7 @@ extern int errno; #include #include #include +#include #include #include #include @@ -1268,6 +1269,26 @@ ktrsyscall(struct ktr_syscall *ktr, u_in ip++; narg--; break; + case SYS__umtx_op: + print_number(ip, narg, c); + putchar(','); + umtxopname(*ip); + switch (*ip) { + case UMTX_OP_CV_WAIT: + ip++; + narg--; + putchar(','); + umtxcvwaitflags(*ip); + break; + case UMTX_OP_RW_RDLOCK: + ip++; + narg--; + putchar(','); + umtxrwlockflags(*ip); + break; + } + ip++; + narg--; } } while (narg > 0) { Modified: head/usr.bin/kdump/mksubr ============================================================================== --- head/usr.bin/kdump/mksubr Mon Oct 13 16:33:08 2014 (r273052) +++ head/usr.bin/kdump/mksubr Mon Oct 13 16:37:06 2014 (r273053) @@ -185,6 +185,7 @@ cat <<_EOF_ #include #include #include +#include #include #include #include @@ -489,6 +490,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 "umtxopname" "UMTX_OP_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/umtx.h" auto_switch_type "vmresultname" "KERN_[A-Z]+[[:space:]]+[0-9]+" "vm/vm_param.h" auto_or_type "wait6optname" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" auto_switch_type "whencename" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h" @@ -677,6 +679,62 @@ cat <<_EOF_ } } +/* + * AUTO - Special + * + * Just print 0 as 0. + */ +void +umtxcvwaitflags(intmax_t arg) +{ + int or = 0; + if (arg == 0) { + printf("0"); + return; + } + printf("%#jx<", (uintmax_t)arg); +_EOF_ + egrep "^#[[:space:]]*define[[:space:]]+CVWAIT_[A-Z_]+[[:space:]]+0x[0-9]+[[:space:]]*" \ + $include_dir/sys/umtx.h | \ + awk '{ for (i = 1; i <= NF; i++) \ + if ($i ~ /define/) \ + break; \ + ++i; \ + printf "\tif (!((arg > 0) ^ ((%s) > 0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i }' +cat <<_EOF_ + printf(">"); + if (or == 0) + printf("%jd", arg); +} + + +/* + * AUTO - Special + * + * Just print 0 as 0. + */ +void +umtxrwlockflags(intmax_t arg) +{ + int or = 0; + if (arg == 0) { + printf("0"); + return; + } + printf("%#jx<", (uintmax_t)arg); +_EOF_ + egrep "^#[[:space:]]*define[[:space:]]+URWLOCK_PREFER_READER[[:space:]]+0x[0-9]+[[:space:]]*" \ + $include_dir/sys/umtx.h | \ + awk '{ for (i = 1; i <= NF; i++) \ + if ($i ~ /define/) \ + break; \ + ++i; \ + printf "\tif (!((arg > 0) ^ ((%s) > 0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i }' +cat <<_EOF_ + printf(">"); + if (or == 0) + printf("%jd", arg); +} _EOF_ egrep '#define[[:space:]]+CAP_[A-Z_]+[[:space:]]+CAPRIGHT\([0-9],[[:space:]]+0x[0-9]{16}ULL\)' \ $include_dir/sys/capsicum.h | \ Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Mon Oct 13 16:33:08 2014 (r273052) +++ head/usr.bin/truss/syscall.h Mon Oct 13 16:37:06 2014 (r273053) @@ -5,6 +5,7 @@ * Hex -- values that should be printed in hex (addresses) * Octal -- Same as above, but octal * Int -- normal integer values (file descriptors, for example) + * LongHex -- long value that should be printed in hex * Name -- pointer to a NULL-terminated string. * BinString -- pointer to an array of chars, printed via strvisx(). * Ptr -- pointer to some unspecified structure. Just print as hex for now. @@ -34,13 +35,13 @@ * $FreeBSD$ */ -enum Argtype { None = 1, Hex, Octal, Int, Name, Ptr, Stat, Ioctl, Quad, +enum Argtype { None = 1, Hex, Octal, Int, LongHex, Name, Ptr, Stat, Ioctl, Quad, Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval, Pollfd, Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open, Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, - LinuxSockArgs }; + LinuxSockArgs, Umtxop }; #define ARG_MASK 0xff #define OUT 0x100 Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Mon Oct 13 16:33:08 2014 (r273052) +++ head/usr.bin/truss/syscalls.c Mon Oct 13 16:37:06 2014 (r273053) @@ -279,6 +279,9 @@ static struct syscall syscalls[] = { { Waitoptions, 3 }, { Rusage | OUT, 4 }, { Ptr, 5 } } }, { .name = "procctl", .ret_type = 1, .nargs = 4, .args = { { Idtype, 0 }, { Int, 1 }, { Procctl, 2 }, { Ptr, 3 } } }, + { .name = "_umtx_op", .ret_type = 1, .nargs = 5, + .args = { { Ptr, 0 }, { Umtxop, 1 }, { LongHex, 2 }, { Ptr, 3 }, + { Ptr, 4 } } }, { .name = 0 }, }; @@ -412,6 +415,18 @@ static struct xlat procctl_arg[] = { X(PROC_SPROTECT) XEND }; +static struct xlat umtx_ops[] = { + X(UMTX_OP_RESERVED0) X(UMTX_OP_RESERVED1) X(UMTX_OP_WAIT) + X(UMTX_OP_WAKE) X(UMTX_OP_MUTEX_TRYLOCK) X(UMTX_OP_MUTEX_LOCK) + X(UMTX_OP_MUTEX_UNLOCK) X(UMTX_OP_SET_CEILING) X(UMTX_OP_CV_WAIT) + X(UMTX_OP_CV_SIGNAL) X(UMTX_OP_CV_BROADCAST) X(UMTX_OP_WAIT_UINT) + X(UMTX_OP_RW_RDLOCK) X(UMTX_OP_RW_WRLOCK) X(UMTX_OP_RW_UNLOCK) + X(UMTX_OP_WAIT_UINT_PRIVATE) X(UMTX_OP_WAKE_PRIVATE) + X(UMTX_OP_MUTEX_WAIT) X(UMTX_OP_MUTEX_WAKE) X(UMTX_OP_SEM_WAIT) + X(UMTX_OP_SEM_WAKE) X(UMTX_OP_NWAKE_PRIVATE) X(UMTX_OP_MUTEX_WAKE2) + XEND +}; + #undef X #undef XEND @@ -608,6 +623,9 @@ print_arg(struct syscall_args *sc, unsig case Int: asprintf(&tmp, "%d", (int)args[sc->offset]); break; + case LongHex: + asprintf(&tmp, "0x%lx", args[sc->offset]); + break; case Name: { /* NULL-terminated string. */ char *tmp2; @@ -1275,6 +1293,9 @@ print_arg(struct syscall_args *sc, unsig case Procctl: tmp = strdup(xlookup(procctl_arg, args[sc->offset])); break; + case Umtxop: + tmp = strdup(xlookup(umtx_ops, args[sc->offset])); + break; default: errx(1, "Invalid argument type %d\n", sc->type & ARG_MASK); } From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:37:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7A5AE29; Mon, 13 Oct 2014 16:37:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9F0BD9C; Mon, 13 Oct 2014 16:37:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGbYSS037752; Mon, 13 Oct 2014 16:37:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGbYkd037751; Mon, 13 Oct 2014 16:37:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410131637.s9DGbYkd037751@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 13 Oct 2014 16:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273054 - head/sys/arm/ti/omap3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:37:35 -0000 Author: andrew Date: Mon Oct 13 16:37:34 2014 New Revision: 273054 URL: https://svnweb.freebsd.org/changeset/base/273054 Log: Remove the omap3 directory that should have happened in r273041. Deleted: head/sys/arm/ti/omap3/ From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:40:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 498E8F8F; Mon, 13 Oct 2014 16:40:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35A0BDB2; Mon, 13 Oct 2014 16:40:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGegcp038242; Mon, 13 Oct 2014 16:40:42 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGeflf038237; Mon, 13 Oct 2014 16:40:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410131640.s9DGeflf038237@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 13 Oct 2014 16:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273055 - in head/sys/arm/ti: . am335x omap4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:40:42 -0000 Author: andrew Date: Mon Oct 13 16:40:40 2014 New Revision: 273055 URL: https://svnweb.freebsd.org/changeset/base/273055 Log: Move the sdhci option to files.ti, it's common to both SoCs. Modified: head/sys/arm/ti/am335x/files.am335x head/sys/arm/ti/files.ti head/sys/arm/ti/omap4/files.omap4 Modified: head/sys/arm/ti/am335x/files.am335x ============================================================================== --- head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:37:34 2014 (r273054) +++ head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:40:40 2014 (r273055) @@ -12,5 +12,4 @@ arm/ti/am335x/am335x_scm_padconf.c stand arm/ti/am335x/am335x_usbss.c optional musb fdt arm/ti/ti_edma3.c standard -arm/ti/ti_sdhci.c optional sdhci arm/ti/cpsw/if_cpsw.c optional cpsw Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Mon Oct 13 16:37:34 2014 (r273054) +++ head/sys/arm/ti/files.ti Mon Oct 13 16:40:40 2014 (r273055) @@ -22,6 +22,7 @@ arm/ti/ti_pruss.c standard arm/ti/ti_adc.c optional ti_adc arm/ti/ti_gpio.c optional gpio arm/ti/ti_i2c.c optional ti_i2c +arm/ti/ti_sdhci.c optional sdhci dev/uart/uart_dev_ti8250.c optional uart dev/uart/uart_dev_ns8250.c optional uart Modified: head/sys/arm/ti/omap4/files.omap4 ============================================================================== --- head/sys/arm/ti/omap4/files.omap4 Mon Oct 13 16:37:34 2014 (r273054) +++ head/sys/arm/ti/omap4/files.omap4 Mon Oct 13 16:40:40 2014 (r273055) @@ -6,7 +6,6 @@ arm/ti/ti_smc.S standard arm/ti/usb/omap_ehci.c optional usb ehci arm/ti/ti_sdma.c optional ti_sdma -arm/ti/ti_sdhci.c optional sdhci arm/ti/omap4/omap4_l2cache.c optional pl310 arm/ti/omap4/omap4_prcm_clks.c standard From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:42:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2906517B; Mon, 13 Oct 2014 16:42:34 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40793E52; Mon, 13 Oct 2014 16:42:33 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id y10so8943654wgg.3 for ; Mon, 13 Oct 2014 09:42:31 -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:from:date:message-id :subject:to:cc:content-type; bh=hij1nsnA4eaXTgzamcVaZFOuTI7DquuizqYG/t8FcwQ=; b=ArAZ40GkHatpioXB6M4EbzcSXT97Mq9cZrm6/9Hsjqbqdi/wPDBDnm93AsmgyQRgh7 0umhvyYWDSY88eq6PpiYm3oLYMVaD6/LyDocAuY5sy30wZwZL7XiQFdIiw2Pcm5t1qYS hH5r2HkRw2qr+Jy2JII4TE61+PS2pDoZ0DTgk//SBMaR0FMJn4fZf8ieaviWa4eLyfmE uQ4HUr2BiT13vUUrcwzGjeLX01K4SHnt2BzkFNChKWPpCsjAtyAzOUehitpKX3hS6NsZ 4AK69/syK+dQ96pl93W7qLSXx9HqGXso1UdCDRyjUvKYG1TRyzFR+eTGKY8/lhpcXQ0T gzkQ== X-Received: by 10.194.8.232 with SMTP id u8mr22738418wja.64.1413218551490; Mon, 13 Oct 2014 09:42:31 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.194.164.73 with HTTP; Mon, 13 Oct 2014 09:42:11 -0700 (PDT) In-Reply-To: <201410101926.s9AJQRY1049602@svn.freebsd.org> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Mon, 13 Oct 2014 18:42:11 +0200 X-Google-Sender-Auth: 29Nqn1rlLtya3W3YnW-QFtLBy5Q Message-ID: Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys To: "George V. Neville-Neil" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:42:34 -0000 On Fri, Oct 10, 2014 at 9:26 PM, George V. Neville-Neil wrote: > Author: gnn > Date: Fri Oct 10 19:26:26 2014 > New Revision: 272906 > URL: https://svnweb.freebsd.org/changeset/base/272906 > > Log: > Change the PF hash from Jenkins to Murmur3. In forwarding tests > this showed a conservative 3% incrase in PPS. > > It's not easy to measure 3% of difference ;-) My benchs didn't reach to measure it (about 2000 flows of minimum packet-size, result displayed in packet-per-second): In state-full: x 272685.pf-statefull + 273009.pf-statefull +----------------------------------------------------------------------+ |x x + + xx x ++ +| | |__________________A_________M_______| | | |____________A_M___________| | +----------------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 1297273 1332110 1329176 1321089.2 14527.702 + 5 1324108 1351078 1336257 1335044.2 10562.448 No difference proven at 95.0% confidence Neither in stateless: x 272685.pf-stateless + 273009.pf-stateless +----------------------------------------------------------------------+ |x x + x+ x x + + +| | |_______________M_A________________| | | |__________________________A_________________________| | +----------------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 1311342 1316466 1313645 1313898.6 2378.5845 + 5 1312893 1320772 1316878 1316927.4 3607.1013 No difference proven at 95.0% confidence Regards, Olivier From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 16:48:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51E77326; Mon, 13 Oct 2014 16:48:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DF8AE82; Mon, 13 Oct 2014 16:48:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DGm25q042651; Mon, 13 Oct 2014 16:48:02 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DGm2mE042650; Mon, 13 Oct 2014 16:48:02 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201410131648.s9DGm2mE042650@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 13 Oct 2014 16:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273056 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 16:48:02 -0000 Author: sbruno Date: Mon Oct 13 16:48:01 2014 New Revision: 273056 URL: https://svnweb.freebsd.org/changeset/base/273056 Log: Repair build of tools/ath/athalq and define missing value len. Reviewed by: adrian Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Mon Oct 13 16:40:40 2014 (r273055) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Mon Oct 13 16:48:01 2014 (r273056) @@ -347,6 +347,7 @@ struct ar9300_txc { /* ds_status2 */ #define AR_data_len 0x00000fff +#define AR_data_len_S 0 #define AR_rx_more 0x00001000 #define AR_num_delim 0x003fc000 #define AR_num_delim_S 14 From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 19:05:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4958F675; Mon, 13 Oct 2014 19:05:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35784DF; Mon, 13 Oct 2014 19:05:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DJ5J2v012200; Mon, 13 Oct 2014 19:05:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DJ5Jp7012199; Mon, 13 Oct 2014 19:05:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410131905.s9DJ5Jp7012199@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 13 Oct 2014 19:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273059 - head/lib/libcuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 19:05:19 -0000 Author: hselasky Date: Mon Oct 13 19:05:18 2014 New Revision: 273059 URL: https://svnweb.freebsd.org/changeset/base/273059 Log: Fix compiler locking diagnostic warnings. PR: 194289 Modified: head/lib/libcuse/cuse_lib.c Modified: head/lib/libcuse/cuse_lib.c ============================================================================== --- head/lib/libcuse/cuse_lib.c Mon Oct 13 18:53:56 2014 (r273058) +++ head/lib/libcuse/cuse_lib.c Mon Oct 13 19:05:18 2014 (r273059) @@ -87,17 +87,11 @@ static TAILQ_HEAD(, cuse_dev_entered) h_ static struct cuse_vm_allocation a_cuse[CUSE_ALLOC_UNIT_MAX] __guarded_by(m_cuse); -static void -cuse_lock(void) __locks_exclusive(m_cuse) -{ - pthread_mutex_lock(&m_cuse); -} +#define CUSE_LOCK() \ + pthread_mutex_lock(&m_cuse) -static void -cuse_unlock(void) __unlocks(m_cuse) -{ - pthread_mutex_unlock(&m_cuse); -} +#define CUSE_UNLOCK() \ + pthread_mutex_unlock(&m_cuse) int cuse_init(void) @@ -150,7 +144,7 @@ cuse_vmoffset(void *_ptr) unsigned long remainder; int n; - cuse_lock(); + CUSE_LOCK(); for (n = 0; n != CUSE_ALLOC_UNIT_MAX; n++) { if (a_cuse[n].ptr == NULL) continue; @@ -160,7 +154,7 @@ cuse_vmoffset(void *_ptr) if ((ptr >= ptr_min) && (ptr <= ptr_max)) { - cuse_unlock(); + CUSE_UNLOCK(); remainder = (ptr - ptr_min); @@ -169,7 +163,7 @@ cuse_vmoffset(void *_ptr) return ((n * PAGE_SIZE * CUSE_ALLOC_PAGES_MAX) + remainder); } } - cuse_unlock(); + CUSE_UNLOCK(); return (0x80000000UL); /* failure */ } @@ -192,7 +186,7 @@ cuse_vmalloc(int size) info.page_count = (size + PAGE_SIZE - 1) / PAGE_SIZE; - cuse_lock(); + CUSE_LOCK(); for (n = 0; n != CUSE_ALLOC_UNIT_MAX; n++) { if (a_cuse[n].ptr != NULL) @@ -201,7 +195,7 @@ cuse_vmalloc(int size) a_cuse[n].ptr = ((uint8_t *)1); /* reserve */ a_cuse[n].size = 0; - cuse_unlock(); + CUSE_UNLOCK(); info.alloc_nr = n; @@ -209,7 +203,7 @@ cuse_vmalloc(int size) if (error) { - cuse_lock(); + CUSE_LOCK(); a_cuse[n].ptr = NULL; @@ -230,20 +224,20 @@ cuse_vmalloc(int size) if (error) { /* ignore */ } - cuse_lock(); + CUSE_LOCK(); a_cuse[n].ptr = NULL; break; } - cuse_lock(); + CUSE_LOCK(); a_cuse[n].ptr = ptr; a_cuse[n].size = size; - cuse_unlock(); + CUSE_UNLOCK(); return (ptr); /* success */ } - cuse_unlock(); + CUSE_UNLOCK(); return (NULL); /* failure */ } @@ -255,12 +249,12 @@ cuse_is_vmalloc_addr(void *ptr) if (f_cuse < 0 || ptr == NULL) return (0); /* false */ - cuse_lock(); + CUSE_LOCK(); for (n = 0; n != CUSE_ALLOC_UNIT_MAX; n++) { if (a_cuse[n].ptr == ptr) break; } - cuse_unlock(); + CUSE_UNLOCK(); return (n != CUSE_ALLOC_UNIT_MAX); } @@ -268,6 +262,7 @@ cuse_is_vmalloc_addr(void *ptr) void cuse_vmfree(void *ptr) { + struct cuse_vm_allocation temp; struct cuse_alloc_info info; int error; int n; @@ -275,32 +270,35 @@ cuse_vmfree(void *ptr) if (f_cuse < 0) return; - memset(&info, 0, sizeof(info)); - - cuse_lock(); + CUSE_LOCK(); for (n = 0; n != CUSE_ALLOC_UNIT_MAX; n++) { if (a_cuse[n].ptr != ptr) continue; - cuse_unlock(); + temp = a_cuse[n]; - info.alloc_nr = n; + CUSE_UNLOCK(); + + munmap(temp.ptr, temp.size); - munmap(ptr, a_cuse[n].size); + memset(&info, 0, sizeof(info)); + + info.alloc_nr = n; error = ioctl(f_cuse, CUSE_IOCTL_FREE_MEMORY, &info); - if (error) { - /* ignore */ + if (error != 0) { + /* ignore any errors */ + DPRINTF("Freeing memory failed: %d\n", errno); } - cuse_lock(); + CUSE_LOCK(); a_cuse[n].ptr = NULL; a_cuse[n].size = 0; break; } - cuse_unlock(); + CUSE_UNLOCK(); } int @@ -407,9 +405,9 @@ cuse_dev_create(const struct cuse_method free(cdev); return (NULL); } - cuse_lock(); + CUSE_LOCK(); TAILQ_INSERT_TAIL(&h_cuse, cdev, entry); - cuse_unlock(); + CUSE_UNLOCK(); return (cdev); } @@ -423,9 +421,9 @@ cuse_dev_destroy(struct cuse_dev *cdev) if (f_cuse < 0) return; - cuse_lock(); + CUSE_LOCK(); TAILQ_REMOVE(&h_cuse, cdev, entry); - cuse_unlock(); + CUSE_UNLOCK(); error = ioctl(f_cuse, CUSE_IOCTL_DESTROY_DEV, &cdev); if (error) @@ -477,7 +475,7 @@ cuse_wait_and_process(void) cdev = info.dev; - cuse_lock(); + CUSE_LOCK(); enter.thread = curr; enter.per_file_handle = (void *)info.per_file_handle; enter.cmd = info.command; @@ -485,7 +483,7 @@ cuse_wait_and_process(void) enter.got_signal = 0; enter.cdev = cdev; TAILQ_INSERT_TAIL(&h_cuse_entered, &enter, entry); - cuse_unlock(); + CUSE_UNLOCK(); DPRINTF("cuse: Command = %d = %s, flags = %d, arg = 0x%08x, ptr = 0x%08x\n", (int)info.command, cuse_cmd_str(info.command), (int)info.fflags, @@ -507,7 +505,7 @@ cuse_wait_and_process(void) error = 0; - cuse_lock(); + CUSE_LOCK(); TAILQ_FOREACH(pe, &h_cuse_entered, entry) { if (pe->cdev != cdev) continue; @@ -520,7 +518,7 @@ cuse_wait_and_process(void) pthread_kill(pe->thread, SIGHUP); error = CUSE_ERR_BUSY; } - cuse_unlock(); + CUSE_UNLOCK(); if (error == 0) break; @@ -571,7 +569,7 @@ cuse_wait_and_process(void) break; case CUSE_CMD_SIGNAL: - cuse_lock(); + CUSE_LOCK(); TAILQ_FOREACH(pe, &h_cuse_entered, entry) { if (pe->cdev != cdev) continue; @@ -583,7 +581,7 @@ cuse_wait_and_process(void) pe->got_signal = 1; pthread_kill(pe->thread, SIGHUP); } - cuse_unlock(); + CUSE_UNLOCK(); break; default: @@ -594,9 +592,9 @@ cuse_wait_and_process(void) DPRINTF("cuse: Command error = %d for %s\n", error, cuse_cmd_str(info.command)); - cuse_lock(); + CUSE_LOCK(); TAILQ_REMOVE(&h_cuse_entered, &enter, entry); - cuse_unlock(); + CUSE_UNLOCK(); /* we ignore any sync command failures */ ioctl(f_cuse, CUSE_IOCTL_SYNC_COMMAND, &error); @@ -610,12 +608,12 @@ cuse_dev_get_entered(void) struct cuse_dev_entered *pe; pthread_t curr = pthread_self(); - cuse_lock(); + CUSE_LOCK(); TAILQ_FOREACH(pe, &h_cuse_entered, entry) { if (pe->thread == curr) break; } - cuse_unlock(); + CUSE_UNLOCK(); return (pe); } From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 19:17:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E023E8D; Mon, 13 Oct 2014 19:17:18 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB4F524D; Mon, 13 Oct 2014 19:17:17 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id k14so9282809wgh.31 for ; Mon, 13 Oct 2014 12:17:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=fx3S5ySXqDeLvXd15x2Y4PZil2KXMjkiUPMuBo2B9TA=; b=xmknhF6/R8yjv1T3us3+PzLZw0CH7dAXbJxGbfi/6FlK5mZpuucgehfOXJ22X52LBE V6lOppy2zxl63XZGf/cyIB2xEY6dp9uVbhGLOufvh2BijLLmowTD4vVogsAfTMPCARvv xHItXp/1HyqCiqcyyGy4mlGbxwzpiHFiU1JP+wqRgZuKUfbWG1qbl5b2w4Rk1FCyGcjf WGzYkcAoQ2pYkG4Bz208dQVbJhUea/OXJhuPygCoiW//SKzgJ+6jVLZl/MQobyxdZGqX x6aE1hC5VH6M1QFrTrK3XSKs8B5fmD+hxVz2uoRPRgR0fvqZTQrvPVVHatbeein8Fdk8 YAjQ== X-Received: by 10.180.106.71 with SMTP id gs7mr809190wib.71.1413227836032; Mon, 13 Oct 2014 12:17:16 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id ua8sm17652391wjc.7.2014.10.13.12.17.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Oct 2014 12:17:15 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 13 Oct 2014 21:17:12 +0200 From: Baptiste Daroussin To: John Baldwin Subject: Re: svn commit: r273009 - in head: etc/devd sys/powerpc/powermac Message-ID: <20141013191712.GR19486@ivaldir.etoilebsd.net> References: <201410121912.s9CJCncl021168@svn.freebsd.org> <20141012122636.4f1a0394@zhabar.attlocal.net> <2575643.xWorzK0sfL@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6eUvXotnMb6+obQB" Content-Disposition: inline In-Reply-To: <2575643.xWorzK0sfL@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Justin Hibbits X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 19:17:18 -0000 --6eUvXotnMb6+obQB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 13, 2014 at 11:10:08AM -0400, John Baldwin wrote: > On Sunday, October 12, 2014 12:26:36 PM Justin Hibbits wrote: > > On Sun, 12 Oct 2014 19:12:49 +0000 (UTC) > >=20 > > Justin Hibbits wrote: > > > Author: jhibbits > > > Date: Sun Oct 12 19:12:48 2014 > > > New Revision: 273009 > > > URL: https://svnweb.freebsd.org/changeset/base/273009 > > >=20 > > > Log: > > > Add an AC line monitor so power_profile can work > > > =20 > > > Summary: > > > Add a polling loop (1Hz) to monitor the battery and AC status, to > > >=20 > > > notify devd like ACPI does for power monitoring. This > > > allows /etc/rc.d/power_profile to work on PowerPC laptops > > >=20 > > > Test Plan: > > > Tested on a Titanium PowerBook, configuring economy_cpu_freq and > > > performance_cpu_freq, disabling powerd. > > > =20 > > > Reviewers: #powerpc, nwhitehorn > > > =20 > > > Reviewed By: nwhitehorn > > > =20 > > > Subscribers: rpaulo > > > =20 > > > Differential Revision: https://reviews.freebsd.org/D937 > >=20 > > MFC After: 3 weeks > > Relnotes: Yes > >=20 > > (Can we add a template to arc to include those fields in arc messages?) >=20 > I think Baptiste looked at hacking the arcanist template to include our > template fields and in general be more like our messages and ran away > screaming instead. I've just been using copy and paste to copy the messa= ge > I type into arc from the web browswer into my normal commit window. >=20 Yeah that is basically it :) Bapt --6eUvXotnMb6+obQB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlQ8JTgACgkQ8kTtMUmk6EzlwwCghRivfgGNA/3nXGwgXIKcgmms pgcAoL0/dTyh9tGHBXhX0V9bj4ghZz3z =7jix -----END PGP SIGNATURE----- --6eUvXotnMb6+obQB-- From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 20:39:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D133846A; Mon, 13 Oct 2014 20:39:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCE99C53; Mon, 13 Oct 2014 20:39:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DKdp5K055574; Mon, 13 Oct 2014 20:39:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DKdpmh055573; Mon, 13 Oct 2014 20:39:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410132039.s9DKdpmh055573@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 13 Oct 2014 20:39:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273060 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 20:39:51 -0000 Author: delphij Date: Mon Oct 13 20:39:51 2014 New Revision: 273060 URL: https://svnweb.freebsd.org/changeset/base/273060 Log: Use write_psize instead of write_asize when doing vdev_space_update. Without this change the accounting of L2ARC usage would be wrong and give 16EB free space because the number became negative and overflows. Obtained from: FreeNAS (issue #6239) MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Oct 13 19:05:18 2014 (r273059) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Oct 13 20:39:51 2014 (r273060) @@ -5232,7 +5232,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize); ARCSTAT_INCR(arcstat_l2_size, write_sz); ARCSTAT_INCR(arcstat_l2_asize, write_asize); - vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0); + vdev_space_update(dev->l2ad_vdev, write_psize, 0, 0); /* * Bump device hand to the device start if it is approaching the end. From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 21:04:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DB70A32; Mon, 13 Oct 2014 21:04:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE211ED6; Mon, 13 Oct 2014 21:04:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DL4E6G068975; Mon, 13 Oct 2014 21:04:14 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DL4EZB068974; Mon, 13 Oct 2014 21:04:14 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201410132104.s9DL4EZB068974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 13 Oct 2014 21:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273061 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 21:04:15 -0000 Author: sbruno Date: Mon Oct 13 21:04:14 2014 New Revision: 273061 URL: https://svnweb.freebsd.org/changeset/base/273061 Log: Update tcp(4) with plpmtud blackhole sysctls Submitted by: Mikhail MFC after: 2 weeks Relnotes: yes Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Mon Oct 13 20:39:51 2014 (r273060) +++ head/share/man/man4/tcp.4 Mon Oct 13 21:04:14 2014 (r273061) @@ -518,6 +518,21 @@ avoid packet drops. Number of retries (SYN or SYN/ACK retransmits) before disabling ECN on a specific connection. This is needed to help with connection establishment when a broken firewall is in the network path. +.It Va pmtud_blackhole_detection +Turn on automatic path MTU blackhole detection. In case of retransmits we will +lower the MSS to check if it's MTU problem. If current MSS is greater than +configured value to try, it will be set to it, otherwise, MSS will be set to +default values (net.inet.tcp.mssdflt and net.inet.tcp.v6mssdflt). +.It Va pmtud_blackhole_mss +MSS to try for IPv4 if PMTU blackhole detection is turned on. +.It Va v6pmtud_blackhole_mss +MSS to try for IPv6 if PMTU blackhole detection is turned on. +.It Va pmtud_blackhole_activated +Number of times the code was activated to attempt a MSS downshift. +.It Va pmtud_blackhole_min_activated +Number of times the blackhole MSS was used in an attempt to downshift. +.It Va pmtud_blackhole_failed +Number of times that we failed to connect after we downshifted the MSS. .El .Sh ERRORS A socket operation may fail with one of the following errors returned: From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 21:05:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D25EBC15; Mon, 13 Oct 2014 21:05:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBFA2EEC; Mon, 13 Oct 2014 21:05:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DL5Thn069196; Mon, 13 Oct 2014 21:05:29 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DL5TNa069195; Mon, 13 Oct 2014 21:05:29 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201410132105.s9DL5TNa069195@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 13 Oct 2014 21:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273062 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 21:05:29 -0000 Author: sbruno Date: Mon Oct 13 21:05:29 2014 New Revision: 273062 URL: https://svnweb.freebsd.org/changeset/base/273062 Log: Catch ipv6 case when attempting to do PLPMTUD blackhole detection. Submitted by: Mikhail MFC after: 2 weeks Relnotes: yes Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon Oct 13 21:04:14 2014 (r273061) +++ head/sys/netinet/tcp_output.c Mon Oct 13 21:05:29 2014 (r273062) @@ -1273,6 +1273,11 @@ send: */ ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6)); + if (V_path_mtu_discovery && tp->t_maxopd > V_tcp_minmss) + tp->t_flags2 |= TF2_PLPMTU_PMTUD; + else + tp->t_flags2 &= ~TF2_PLPMTU_PMTUD; + if (tp->t_state == TCPS_SYN_SENT) TCP_PROBE5(connect__request, NULL, tp, ip6, tp, th); From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 21:06:22 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15826D6C; Mon, 13 Oct 2014 21:06:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02244EFD; Mon, 13 Oct 2014 21:06:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DL6LJO069354; Mon, 13 Oct 2014 21:06:21 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DL6LKK069353; Mon, 13 Oct 2014 21:06:21 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201410132106.s9DL6LKK069353@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 13 Oct 2014 21:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273063 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 21:06:22 -0000 Author: sbruno Date: Mon Oct 13 21:06:21 2014 New Revision: 273063 URL: https://svnweb.freebsd.org/changeset/base/273063 Log: Handle small file case with regards to plpmtud blackhole detection. Submitted by: Mikhail MFC after: 2 weeks Relnotes: yes Modified: head/sys/netinet/tcp_timer.c Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Mon Oct 13 21:05:29 2014 (r273062) +++ head/sys/netinet/tcp_timer.c Mon Oct 13 21:06:21 2014 (r273063) @@ -693,7 +693,15 @@ tcp_timer_rexmt(void * xtp) TCPT_RANGESET(tp->t_rxtcur, rexmt, tp->t_rttmin, TCPTV_REXMTMAX); - if (V_tcp_pmtud_blackhole_detect && (tp->t_state == TCPS_ESTABLISHED)) { + /* + * We enter the path for PLMTUD if connection is established or, if + * connection is FIN_WAIT_1 status, reason for the last is that if + * amount of data we send is very small, we could send it in couple of + * packets and process straight to FIN. In that case we won't catch + * ESTABLISHED state. + */ + if (V_tcp_pmtud_blackhole_detect && (((tp->t_state == TCPS_ESTABLISHED)) + || (tp->t_state == TCPS_FIN_WAIT_1))) { int optlen; #ifdef INET6 int isipv6; From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 21:08:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F06AAED8; Mon, 13 Oct 2014 21:08:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD10EF14; Mon, 13 Oct 2014 21:08:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DL8RLY069644; Mon, 13 Oct 2014 21:08:27 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DL8RHc069643; Mon, 13 Oct 2014 21:08:27 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201410132108.s9DL8RHc069643@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 13 Oct 2014 21:08:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273064 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 21:08:28 -0000 Author: sbruno Date: Mon Oct 13 21:08:27 2014 New Revision: 273064 URL: https://svnweb.freebsd.org/changeset/base/273064 Log: Bump .Dd Submitted by: gjb MFC after: 2 weeks Relnotes: yes Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Mon Oct 13 21:06:21 2014 (r273063) +++ head/share/man/man4/tcp.4 Mon Oct 13 21:08:27 2014 (r273064) @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 8, 2013 +.Dd October 13, 2014 .Dt TCP 4 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 22:15:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C43421C6; Mon, 13 Oct 2014 22:15:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A56E28DC; Mon, 13 Oct 2014 22:15:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DMFRxI003177; Mon, 13 Oct 2014 22:15:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DMFQHM003173; Mon, 13 Oct 2014 22:15:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410132215.s9DMFQHM003173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 13 Oct 2014 22:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273065 - in head: lib lib/libevent share/mk usr.sbin/ftp-proxy usr.sbin/ftp-proxy/ftp-proxy usr.sbin/ftp-proxy/libevent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 22:15:28 -0000 Author: delphij Date: Mon Oct 13 22:15:26 2014 New Revision: 273065 URL: https://svnweb.freebsd.org/changeset/base/273065 Log: Promote libevent to lib/ level and fold ftp-proxy into its parent Makefile. This allows us to use libevent for other application in the future. For now libevent is still INTERNALLIB and no shared library is installed. MFC after: 1 month Added: head/lib/libevent/ - copied from r273060, head/usr.sbin/ftp-proxy/libevent/ Deleted: head/usr.sbin/ftp-proxy/Makefile.inc head/usr.sbin/ftp-proxy/ftp-proxy/ head/usr.sbin/ftp-proxy/libevent/ Modified: head/lib/Makefile head/lib/libevent/Makefile head/share/mk/src.libnames.mk head/usr.sbin/ftp-proxy/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Oct 13 21:08:27 2014 (r273064) +++ head/lib/Makefile Mon Oct 13 22:15:26 2014 (r273065) @@ -44,6 +44,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libdevstat \ libdwarf \ libedit \ + ${_libevent} \ libexecinfo \ libexpat \ libfetch \ @@ -226,6 +227,10 @@ _libnetgraph= libnetgraph _libypclnt= libypclnt .endif +.if ${MK_PF} != "no" +_libevent= libevent +.endif + .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _libsmb= libsmb _libvgl= libvgl Modified: head/lib/libevent/Makefile ============================================================================== --- head/usr.sbin/ftp-proxy/libevent/Makefile Mon Oct 13 20:39:51 2014 (r273060) +++ head/lib/libevent/Makefile Mon Oct 13 22:15:26 2014 (r273065) @@ -1,10 +1,14 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../contrib/pf/libevent +.PATH: ${.CURDIR}/../../contrib/pf/libevent +.include + +LIB= event +SHLIB_MAJOR= 1 +PRIVATELIB= +INTERNALLIB= -LIB= event -INTERNALLIB=yes SRCS= buffer.c evbuffer.c event.c kqueue.c log.c poll.c select.c signal.c HDRS= event.h Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Oct 13 21:08:27 2014 (r273064) +++ head/share/mk/src.libnames.mk Mon Oct 13 22:15:26 2014 (r273065) @@ -21,6 +21,10 @@ LIBBSDSTATDIR= ${ROOTOBJDIR}/lib/libbsds LDBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.so LIBBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.a +LIBEVENTDIR= ${ROOTOBJDIR}/lib/libevent +LDEVENT?= ${LIBEVENTDIR}/libevent.so +LIBEVENT?= ${LIBEVENTDIR}/libevent.a + LIBHEIMIPCCDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcc LDHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.so LIBHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.a Modified: head/usr.sbin/ftp-proxy/Makefile ============================================================================== --- head/usr.sbin/ftp-proxy/Makefile Mon Oct 13 21:08:27 2014 (r273064) +++ head/usr.sbin/ftp-proxy/Makefile Mon Oct 13 22:15:26 2014 (r273065) @@ -1,5 +1,17 @@ # $FreeBSD$ -SUBDIR= libevent ftp-proxy +.PATH: ${.CURDIR}/../../contrib/pf/ftp-proxy -.include +PROG= ftp-proxy +MAN= ftp-proxy.8 + +SRCS= ftp-proxy.c filter.c + +CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent + +LDADD+= ${LIBEVENT} +DPADD+= ${LIBEVENT} + +WARNS?= 3 + +.include From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 22:25:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85144538; Mon, 13 Oct 2014 22:25:47 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A093A9CA; Mon, 13 Oct 2014 22:25:46 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id h11so5093141wiw.11 for ; Mon, 13 Oct 2014 15:25:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=/R8JyOA3X8kd+4E4XhGlMKFcioyf1cxRXzX/f1LGpDg=; b=QJO0/JXbaKl2TPmiKolU97MCo+slHEoHWzGMoIxzOpEU3c468JAAsqFqKu2Vai+BEC RPmOq44FrA9UG3EDgBzadiFVd7BuXhcIw+ruEjeVP28I1uahXi4zC26XyvM6tMARj53I hHj2isKCjAnV39cAA1/kORERW8Zco4e+e2/xTMEO9HAx75KZhkSe8SdaAvLZigBrdIQn Yz4K/998PpEepxcTT9JhbKHNifZ1PvOsReTJmCsntC2/xyJzbhFTrXHlco89RmoEUHRz 7HzNFqQw56dWSI8AFgq7hmvWo1PbWpwntF2CKFdIu2VrzYY6cE4CQam8ZvCrDqJ4A+Zr G2ew== X-Received: by 10.180.9.65 with SMTP id x1mr1703055wia.30.1413239144811; Mon, 13 Oct 2014 15:25:44 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id mb20sm13618313wic.9.2014.10.13.15.25.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Oct 2014 15:25:43 -0700 (PDT) Sender: Baptiste Daroussin Date: Tue, 14 Oct 2014 00:25:41 +0200 From: Baptiste Daroussin To: Xin LI Subject: Re: svn commit: r273065 - in head: lib lib/libevent share/mk usr.sbin/ftp-proxy usr.sbin/ftp-proxy/ftp-proxy usr.sbin/ftp-proxy/libevent Message-ID: <20141013222541.GS19486@ivaldir.etoilebsd.net> References: <201410132215.s9DMFQHM003173@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CRjAHycgiaTQGSqU" Content-Disposition: inline In-Reply-To: <201410132215.s9DMFQHM003173@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 22:25:47 -0000 --CRjAHycgiaTQGSqU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 13, 2014 at 10:15:26PM +0000, Xin LI wrote: > Author: delphij > Date: Mon Oct 13 22:15:26 2014 > New Revision: 273065 > URL: https://svnweb.freebsd.org/changeset/base/273065 >=20 > Log: > Promote libevent to lib/ level and fold ftp-proxy into its parent Makef= ile. > This allows us to use libevent for other application in the future. > =20 > For now libevent is still INTERNALLIB and no shared library is installe= d. > =20 > MFC after: 1 month >=20 > Added: > head/lib/libevent/ > - copied from r273060, head/usr.sbin/ftp-proxy/libevent/ > Deleted: > head/usr.sbin/ftp-proxy/Makefile.inc > head/usr.sbin/ftp-proxy/ftp-proxy/ > head/usr.sbin/ftp-proxy/libevent/ > Modified: > head/lib/Makefile > head/lib/libevent/Makefile > head/share/mk/src.libnames.mk > head/usr.sbin/ftp-proxy/Makefile >=20 > Modified: head/lib/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/Makefile Mon Oct 13 21:08:27 2014 (r273064) > +++ head/lib/Makefile Mon Oct 13 22:15:26 2014 (r273065) > @@ -44,6 +44,7 @@ SUBDIR=3D ${SUBDIR_ORDERED} \ > libdevstat \ > libdwarf \ > libedit \ > + ${_libevent} \ > libexecinfo \ > libexpat \ > libfetch \ > @@ -226,6 +227,10 @@ _libnetgraph=3D libnetgraph > _libypclnt=3D libypclnt > .endif > =20 > +.if ${MK_PF} !=3D "no" > +_libevent=3D libevent > +.endif > + > .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D "amd64" > _libsmb=3D libsmb > _libvgl=3D libvgl >=20 > Modified: head/lib/libevent/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/ftp-proxy/libevent/Makefile Mon Oct 13 20:39:51 2014 (r= 273060) > +++ head/lib/libevent/Makefile Mon Oct 13 22:15:26 2014 (r273065) > @@ -1,10 +1,14 @@ > # $FreeBSD$ > =20 > -.PATH: ${.CURDIR}/../../../contrib/pf/libevent > +.PATH: ${.CURDIR}/../../contrib/pf/libevent > =20 > +.include > + > +LIB=3D event > +SHLIB_MAJOR=3D 1 > +PRIVATELIB=3D > +INTERNALLIB=3D Both PRIVATELIB and INTERNALLIB looks wrong I think you only want PRIVATELIB regards, Bapt --CRjAHycgiaTQGSqU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlQ8UWUACgkQ8kTtMUmk6Ey/UACfdkbeCvyAXTZi56Yr1Q83AO0N bI4An3uhoLRg4u2qbyjH/kHEz1ZrXW6t =XsFp -----END PGP SIGNATURE----- --CRjAHycgiaTQGSqU-- From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 22:30:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D4A1792; Mon, 13 Oct 2014 22:30:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2999C9F0; Mon, 13 Oct 2014 22:30:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DMU99U009869; Mon, 13 Oct 2014 22:30:09 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DMU90p009847; Mon, 13 Oct 2014 22:30:09 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201410132230.s9DMU90p009847@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 13 Oct 2014 22:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273066 - head/contrib/libc++/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 13 Oct 2014 22:30:09 -0000 Author: bapt Date: Mon Oct 13 22:30:08 2014 New Revision: 273066 URL: https://svnweb.freebsd.org/changeset/base/273066 Log: Import patch from libc++ r197313 which allows using libc++ headers with gcc Differential Revision: https://reviews.freebsd.org/D942 Reviewed by: imp Modified: head/contrib/libc++/include/__config Modified: head/contrib/libc++/include/__config ============================================================================== --- head/contrib/libc++/include/__config Mon Oct 13 22:15:26 2014 (r273065) +++ head/contrib/libc++/include/__config Mon Oct 13 22:30:08 2014 (r273066) @@ -374,6 +374,7 @@ namespace std { #define _LIBCPP_HAS_NO_VARIADICS #define _LIBCPP_HAS_NO_RVALUE_REFERENCES #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS +#define _LIBCPP_HAS_NO_STRONG_ENUMS #else // __GXX_EXPERIMENTAL_CXX0X__ From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 03:11:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33723757; Tue, 14 Oct 2014 03:11:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05C37AC3; Tue, 14 Oct 2014 03:11:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9E3Blx0044114; Tue, 14 Oct 2014 03:11:47 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9E3Blgw044111; Tue, 14 Oct 2014 03:11:47 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201410140311.s9E3Blgw044111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 14 Oct 2014 03:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273067 - in head/usr.sbin/bsdconfig: includes share share/packages X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 03:11:48 -0000 Author: dteske Date: Tue Oct 14 03:11:46 2014 New Revision: 273067 URL: https://svnweb.freebsd.org/changeset/base/273067 Log: Fix awk(1) asorti() implementation to work when called in a loop. MFC after: 3 days X-MFC-to: stable/10, stable/9 Modified: head/usr.sbin/bsdconfig/includes/includes head/usr.sbin/bsdconfig/share/device.subr head/usr.sbin/bsdconfig/share/packages/index.subr Modified: head/usr.sbin/bsdconfig/includes/includes ============================================================================== --- head/usr.sbin/bsdconfig/includes/includes Mon Oct 13 22:30:08 2014 (r273066) +++ head/usr.sbin/bsdconfig/includes/includes Tue Oct 14 03:11:46 2014 (r273067) @@ -71,8 +71,10 @@ show_include() -v show_desc=${SHOW_DESC:-0} ' function asorti(src, dest) { + k = nitems = 0; + # Copy src indices to dest and calculate array length - nitems = 0; for (i in src) dest[++nitems] = i + for (i in src) dest[++nitems] = i # Sort the array of indices (dest) using insertion sort method for (i = 1; i <= nitems; k = i++) Modified: head/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/device.subr Mon Oct 13 22:30:08 2014 (r273066) +++ head/usr.sbin/bsdconfig/share/device.subr Tue Oct 14 03:11:46 2014 (r273067) @@ -1118,6 +1118,7 @@ f_device_sort_by_awk=' # -v prop="property" function asorti(src, dest) { + k = nitems = 0 for (i in src) dest[++nitems] = i for (i = 1; i <= nitems; k = i++) { idx = dest[i] Modified: head/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/index.subr Mon Oct 13 22:30:08 2014 (r273066) +++ head/usr.sbin/bsdconfig/share/packages/index.subr Tue Oct 14 03:11:46 2014 (r273067) @@ -243,8 +243,10 @@ f_index_read() eval "$( debug= f_getvar "$var_to_get" | awk -F'|' ' function asorti(src, dest) { + k = nitems = 0 + # Copy src indices to dest and calculate array length - nitems = 0; for (i in src) dest[++nitems] = i + for (i in src) dest[++nitems] = i # Sort the array of indices (dest) using insertion sort method for (i = 1; i <= nitems; k = i++) From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 03:22:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FFE7922; Tue, 14 Oct 2014 03:22:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21A56BA6; Tue, 14 Oct 2014 03:22:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9E3MdYc048841; Tue, 14 Oct 2014 03:22:39 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9E3Mc2w048838; Tue, 14 Oct 2014 03:22:38 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201410140322.s9E3Mc2w048838@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 14 Oct 2014 03:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273068 - in head/usr.sbin/bsdconfig: includes share share/packages X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 03:22:39 -0000 Author: dteske Date: Tue Oct 14 03:22:37 2014 New Revision: 273068 URL: https://svnweb.freebsd.org/changeset/base/273068 Log: Rename awk(1) implementation of GNU awk's built-in asorti() function to prevent fatal conflict should one-true-awk ever be replaced -- e.g., in an appliance -- with GNU awk. NB: Renamed my implementation to _asorti() MFC after: 3 days X-MFC-to: stable/10, stable/9 Modified: head/usr.sbin/bsdconfig/includes/includes head/usr.sbin/bsdconfig/share/device.subr head/usr.sbin/bsdconfig/share/packages/index.subr Modified: head/usr.sbin/bsdconfig/includes/includes ============================================================================== --- head/usr.sbin/bsdconfig/includes/includes Tue Oct 14 03:11:46 2014 (r273067) +++ head/usr.sbin/bsdconfig/includes/includes Tue Oct 14 03:22:37 2014 (r273068) @@ -69,7 +69,7 @@ show_include() -v use_color=${USE_COLOR:-0} \ -v re="$pattern" \ -v show_desc=${SHOW_DESC:-0} ' - function asorti(src, dest) + function _asorti(src, dest) { k = nitems = 0; @@ -120,7 +120,7 @@ show_include() } } END { - n = asorti(syntax, sorted_indices) + n = _asorti(syntax, sorted_indices) for (i = 1; i <= n; i++) printf "%s", syntax[sorted_indices[i]] }' "$file" ) Modified: head/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/device.subr Tue Oct 14 03:11:46 2014 (r273067) +++ head/usr.sbin/bsdconfig/share/device.subr Tue Oct 14 03:22:37 2014 (r273068) @@ -1116,7 +1116,7 @@ f_device_shutdown() f_device_sort_by_awk=' # Variables that should be defined on the invocation line: # -v prop="property" -function asorti(src, dest) +function _asorti(src, dest) { k = nitems = 0 for (i in src) dest[++nitems] = i @@ -1137,7 +1137,7 @@ function asorti(src, dest) } } END { - nitems = asorti(devices, devices_sorted) + nitems = _asorti(devices, devices_sorted) for (i = 1; i <= nitems; i++) print devices[devices_sorted[i]] } ' Modified: head/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/index.subr Tue Oct 14 03:11:46 2014 (r273067) +++ head/usr.sbin/bsdconfig/share/packages/index.subr Tue Oct 14 03:22:37 2014 (r273068) @@ -241,7 +241,7 @@ f_index_read() export msg_packages eval "$( debug= f_getvar "$var_to_get" | awk -F'|' ' - function asorti(src, dest) + function _asorti(src, dest) { k = nitems = 0 @@ -292,7 +292,7 @@ f_index_read() END { print "_npkgs=" tpkgs # For convenience, total package count - n = asorti(categories, categories_sorted) + n = _asorti(categories, categories_sorted) # Produce package counts for each category for (i = 1; i <= n; i++) From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 06:43:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A56DEB0; Tue, 14 Oct 2014 06:43:56 +0000 (UTC) Received: from mail-yh0-x231.google.com (mail-yh0-x231.google.com [IPv6:2607:f8b0:4002:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA3CDE87; Tue, 14 Oct 2014 06:43:55 +0000 (UTC) Received: by mail-yh0-f49.google.com with SMTP id a41so4405668yho.36 for ; Mon, 13 Oct 2014 23:43:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=XoGEEra3DY8vC7BXz1L06vep0dC9AlViSkXi4LWlJDY=; b=mGIrDhTXQr9T2NEkBktz1ZW+SIACyKyp4/vpEhYfoLYYdVmXQjH9VL5LgMam1C1ARy +OGI4gGm6OwbnEGaUEtBGWmMeb2el6qd/TCIeDpS+94uQKsJFtrZCovEPh/wT10uphuE q2N6OSsz6Hr+sULb8+M+pBKQsLnoz5OIai+zw5jNQI6cB588XS2xy5enm2SFBr+GksuW ncX9XH/e7zb5CIv9hsp1cQk7Aoe6W0Gr/5ln0EdSLB04u3SOK9zHEuH0tDLn4/rScsJD pr/bP+c3OVuMnxienAy5wD+IwE9MGwnZ76/8WW5QUQ8OAEeB2E6uPIl7K7CMVSyN3dVi QpKw== MIME-Version: 1.0 X-Received: by 10.236.31.70 with SMTP id l46mr849096yha.123.1413269034775; Mon, 13 Oct 2014 23:43:54 -0700 (PDT) Received: by 10.170.59.65 with HTTP; Mon, 13 Oct 2014 23:43:54 -0700 (PDT) Date: Tue, 14 Oct 2014 09:43:54 +0300 Message-ID: Subject: Re: svn commit: r272244 - head/sys/net From: Markiyan Kushnir To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, kwm@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, gnome@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 06:43:56 -0000 2014-10-13 15:37 GMT+03:00 Gleb Smirnoff : > On Mon, Oct 13, 2014 at 12:05:10PM +0300, Markiyan Kushnir wrote: > M> Gleb, looks like there is something to do for userland apps to let > M> them replace their old counter code. An example would be devel/libgtop > M> that is failing to build now (I'm on r273006 of base/head and r370733 > M> on ports/head): > > I have fixed all ports a week ago. Those that were trivial to test, > I committed myself. For others I sent patches to their maintainers. > Surprised that libgtop fix is still not committed. > ok, thanks for prompt response. I'm cc-ing libgtop's maintainer to let them know. > -- > Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 08:30:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 546B510E; Tue, 14 Oct 2014 08:30:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40D59A25; Tue, 14 Oct 2014 08:30:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9E8U31x089762; Tue, 14 Oct 2014 08:30:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9E8U2wa089756; Tue, 14 Oct 2014 08:30:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410140830.s9E8U2wa089756@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 14 Oct 2014 08:30:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273072 - in head: share/misc sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 08:30:03 -0000 Author: mav Date: Tue Oct 14 08:30:02 2014 New Revision: 273072 URL: https://svnweb.freebsd.org/changeset/base/273072 Log: Add LBPERE mode bit definition. Modified: head/share/misc/scsi_modes head/sys/cam/scsi/scsi_da.h Modified: head/share/misc/scsi_modes ============================================================================== --- head/share/misc/scsi_modes Tue Oct 14 07:52:37 2014 (r273071) +++ head/share/misc/scsi_modes Tue Oct 14 08:30:02 2014 (r273072) @@ -223,7 +223,8 @@ {Correction Span} i1 {Head Offset Count} i1 {Data Strobe Offset Count} i1 - {Reserved} *i1 + {LBPERE (LBP Error Reporting Enabled)} t1 + {Reserved} *t7 {Write Retry Count} i1 {Reserved} *i1 {Recovery Time Limit} i2 Modified: head/sys/cam/scsi/scsi_da.h ============================================================================== --- head/sys/cam/scsi/scsi_da.h Tue Oct 14 07:52:37 2014 (r273071) +++ head/sys/cam/scsi/scsi_da.h Tue Oct 14 08:30:02 2014 (r273072) @@ -527,7 +527,8 @@ struct scsi_da_rw_recovery_page { u_int8_t correction_span; u_int8_t head_offset_count; u_int8_t data_strobe_offset_cnt; - u_int8_t reserved; + u_int8_t byte8; +#define SMS_RWER_LBPERE 0x80 u_int8_t write_retry_count; u_int8_t reserved2; u_int8_t recovery_time_limit[2]; From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 09:11:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4717A757; Tue, 14 Oct 2014 09:11:19 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1C51D7D; Tue, 14 Oct 2014 09:11:18 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id F23DF1FE022; Tue, 14 Oct 2014 11:11:15 +0200 (CEST) Message-ID: <543CE8B6.6050602@selasky.org> Date: Tue, 14 Oct 2014 11:11:18 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Lawrence Stewart , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, rmacklem@uoguelph.ca Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <543BDF68.9010800@freebsd.org> In-Reply-To: <543BDF68.9010800@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 09:11:19 -0000 Hi Lawrence, First of all, thanks for feedback on this patch. On 10/13/14 16:19, Lawrence Stewart wrote: > Hi Hans, > > I have questions and feedback regarding this patch that I was hoping to > work through with you. Some general points are below and then context > specific points are inline with the patch further down. > > - Is QinQ support affected by this change? In what way affected? > > - There are some style(9) nits throughout that might be tweaked if parts > of this patch end up being reworked e.g. new lines in > if_hw_tsomax_common() and if_hw_tsomax_update() Ok. >> >> #if __FreeBSD_version >= 1000000 >> - sc->ifp->if_hw_tsomax = OCE_MAX_TSO_SIZE; >> + sc->ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); >> + sc->ifp->if_hw_tsomaxsegcount = OCE_MAX_TX_ELEMENTS; >> + sc->ifp->if_hw_tsomaxsegsize = 4096; >> #endif >> >> ether_ifattach(sc->ifp, sc->macaddr.mac_addr); >> > > I don't like the use of the 65536 magic number here and throughout the > driver changes. Also, should it be 65536 or IP_MAXPACKET (65535)? It should be 65536. As far as I know, this is a hardwired limit inside the NFS layer, which it uses when creating mbuf chains, to avoid fragmentation of data. "Rick Macklem" CC'ed can explain more. >> + /* >> + * If the "if_hw_tsomax" limit is set, check if it is >> + * too small: >> + */ >> + KASSERT(ifp->if_hw_tsomax == 0 || >> + ifp->if_hw_tsomax >= (IP_MAXPACKET / 8), >> + ("%s: if_hw_tsomax is outside of range", __func__)); > > I don't understand the second condition of the KASSERT i.e. > "ifp->if_hw_tsomax >= (IP_MAXPACKET / 8)" I think this second KASSERT can now safely be removed. From what I guess, it is there to prevent that if you set the MTU to be more than the TSO limit, the old code would run into a KASSERT in tcp_output.c . The new code switches TSO off and uses regular sending if it cannot fit the IP packet(s) within the TSO restrictions. >> >> >> Modified: head/sys/netinet/tcp_output.c >> ============================================================================== >> --- head/sys/netinet/tcp_output.c Mon Sep 22 07:59:25 2014 (r271945) >> +++ head/sys/netinet/tcp_output.c Mon Sep 22 08:27:27 2014 (r271946) >> @@ -767,28 +767,113 @@ send: >> flags &= ~TH_FIN; >> >> if (tso) { >> + u_int if_hw_tsomax; >> + u_int if_hw_tsomaxsegcount; >> + u_int if_hw_tsomaxsegsize; >> + struct mbuf *mb; >> + u_int moff; >> + int max_len; >> + >> + /* extract TSO information */ >> + if_hw_tsomax = tp->t_tsomax; >> + if_hw_tsomaxsegcount = tp->t_tsomaxsegcount; >> + if_hw_tsomaxsegsize = tp->t_tsomaxsegsize; >> + >> + /* >> + * Limit a TSO burst to prevent it from >> + * overflowing or exceeding the maximum length >> + * allowed by the network interface: >> + */ > > This appears to have been moved from just below for no apparent reason? Correct. > >> KASSERT(ipoptlen == 0, >> ("%s: TSO can't do IP options", __func__)); >> >> /* >> - * Limit a burst to t_tsomax minus IP, >> - * TCP and options length to keep ip->ip_len >> - * from overflowing or exceeding the maximum >> - * length allowed by the network interface. >> + * Check if we should limit by maximum payload >> + * length: >> */ >> - if (len > tp->t_tsomax - hdrlen) { >> - len = tp->t_tsomax - hdrlen; >> - sendalot = 1; >> + if (if_hw_tsomax != 0) { >> + /* compute maximum TSO length */ >> + max_len = (if_hw_tsomax - hdrlen); >> + if (max_len <= 0) { >> + len = 0; > > Is the "max_len < 0" check useful? If "if_hw_tsomax - hdrlen" is leq 0, > then TSO is unusable on the interface is it not? From what I can see there are no checks or asserts anywhere else, except the KASSERT() in the network adapter attach, which compares this limit to IP_MAXPACKET/8 . You are right that the TSO is unusable if too low, and the problem is that drivers change the TSO enable/disable/limit flags/values after initial xxx_ifattach(), so we have no way to really stop invalid parameters, except here. > >> + } else if (len > (u_int)max_len) { >> + sendalot = 1; >> + len = (u_int)max_len; >> + } > > Why is max_len cast to u_int for comparison/assignment with/to len here > and elsewhere? Because "max_len" is an "int" and we compare to below zero. "max_len" can be changed into "unsigned", if the checks are updated. > >> + } >> + >> + /* >> + * Check if we should limit by maximum segment >> + * size and count: >> + */ >> + if (if_hw_tsomaxsegcount != 0 && if_hw_tsomaxsegsize != 0) { > > > Is it conceivable a driver may want to limit by maxsegcount or > maxsegsize, but not by both? Technically speaking, yes. The input for me was that some pieces of hardware can do more than 65535 bytes of TSO packets, while others not. The "maxsegcount * maxsegsize" limit might then indicate a too large maximum TSO segment limit, because the TSO payload length typically is written into a 16-bit field, while the maximum segment list can indicate more data can be sent then actually will be. > > In the event if_hw_tsomax, if_hw_tsomaxsegcount and if_hw_tsomaxsegsize > are non-zero, the calculation of len related to if_hw_tsomax will be > overridden to a potentially incorrect value in this block. Can you tell which line? There is already a check at the beginning of the function, that the payload length must be greater than a certain limit. And we are not overriding beyond that limit. > >> + max_len = 0; >> + mb = sbsndmbuf(&so->so_snd, off, &moff); >> + >> + while (mb != NULL && (u_int)max_len < len) { >> + u_int cur_length; >> + u_int cur_frags; >> + >> + /* >> + * Get length of mbuf fragment >> + * and how many hardware >> + * frags, rounded up, it would >> + * use: >> + */ >> + cur_length = (mb->m_len - moff); >> + cur_frags = (cur_length + if_hw_tsomaxsegsize - >> + 1) / if_hw_tsomaxsegsize; >> + >> + /* Handle special case: Zero Length Mbuf */ >> + if (cur_frags == 0) >> + cur_frags = 1; >> + >> + /* >> + * Check if the fragment limit >> + * will be reached or >> + * exceeded: >> + */ >> + if (cur_frags >= if_hw_tsomaxsegcount) { >> + max_len += min(cur_length, >> + if_hw_tsomaxsegcount * >> + if_hw_tsomaxsegsize); >> + break; >> + } >> + max_len += cur_length; >> + if_hw_tsomaxsegcount -= cur_frags; >> + moff = 0; >> + mb = mb->m_next; >> + } >> + if (max_len <= 0) { >> + len = 0; >> + } else if (len > (u_int)max_len) { >> + sendalot = 1; >> + len = (u_int)max_len; >> + } >> } >> >> /* >> * Prevent the last segment from being >> - * fractional unless the send sockbuf can >> - * be emptied. >> + * fractional unless the send sockbuf can be >> + * emptied: >> + */ >> + max_len = (tp->t_maxopd - optlen); >> + if ((off + len) < so->so_snd.sb_cc) { >> + moff = len % (u_int)max_len; >> + if (moff != 0) { >> + len -= moff; >> + sendalot = 1; >> + } >> + } >> + >> + /* >> + * In case there are too many small fragments >> + * don't use TSO: >> */ >> - if (sendalot && off + len < so->so_snd.sb_cc) { >> - len -= len % (tp->t_maxopd - optlen); >> + if (len <= (u_int)max_len) { >> + len = (u_int)max_len; >> sendalot = 1; >> + tso = 0; >> } > > I don't quite understand the "too many small fragements" check. For example: If the maximum number of segments is "1" for example, then only one mbuf will will fit. If that mbuf is an ethernet TCPI/IP-header, then we cannot use TSO for this case. Also, if the maximum segment count is greater than "1" and such that we end up sending less than MTU, we should not use TSO. Instead the ethernet drivers forward such special packets to m_defrag(), before outputting them. >> >> Modified: head/sys/netinet/tcp_var.h >> ============================================================================== >> --- head/sys/netinet/tcp_var.h Mon Sep 22 07:59:25 2014 (r271945) >> +++ head/sys/netinet/tcp_var.h Mon Sep 22 08:27:27 2014 (r271946) >> @@ -199,9 +199,12 @@ struct tcpcb { >> u_int t_keepintvl; /* interval between keepalives */ >> u_int t_keepcnt; /* number of keepalives before close */ >> >> - u_int t_tsomax; /* tso burst length limit */ >> + u_int t_tsomax; /* TSO total burst length limit in bytes */ >> + >> + uint32_t t_ispare[6]; /* 5 UTO, 1 TBD */ >> + uint32_t t_tsomaxsegcount; /* TSO maximum segment count */ >> + uint32_t t_tsomaxsegsize; /* TSO maximum segment size in bytes */ >> >> - uint32_t t_ispare[8]; /* 5 UTO, 3 TBD */ >> void *t_pspare2[4]; /* 1 TCP_SIGNATURE, 3 TBD */ >> uint64_t _pad[6]; /* 6 TBD (1-2 CC/RTT?) */ >> }; > > I don't think the patch for head should be consuming the spares in > struct tcpcb. We generally only consume spares when MFCing to stable > branches, leaving the spares intact on the head branch. It was done this way to facilitate an MFC to 10- . Can you suggest how the structure should look after restoring the spares? > > > That's the initial list of things I noticed. Thanks! --HPS From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 10:14:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4982A1E; Tue, 14 Oct 2014 10:14:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FCE667D; Tue, 14 Oct 2014 10:14:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EAEFZc040704; Tue, 14 Oct 2014 10:14:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EAEElh040693; Tue, 14 Oct 2014 10:14:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410141014.s9EAEElh040693@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 14 Oct 2014 10:14:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273073 - in head/sys/cam: ctl scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 10:14:15 -0000 Author: mav Date: Tue Oct 14 10:14:14 2014 New Revision: 273073 URL: https://svnweb.freebsd.org/changeset/base/273073 Log: Some groundwork for later Informational Exceptions support. This includes support for: - Read-Write Error Recovery mode page; - Informational Exceptions Control mode page; - Logical Block Provisioning mode page; - LOG SENSE command. No real Informational Exceptions features yet. This is only a placeholder. Sponsored by: iXsystems, Inc. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_cmd_table.c head/sys/cam/ctl/ctl_private.h head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Oct 14 08:30:02 2014 (r273072) +++ head/sys/cam/ctl/ctl.c Tue Oct 14 10:14:14 2014 (r273073) @@ -178,6 +178,34 @@ static struct copan_debugconf_subpage de {0xff,0xff}, /* ctl_time_io_secs */ }; +static struct scsi_da_rw_recovery_page rw_er_page_default = { + /*page_code*/SMS_RW_ERROR_RECOVERY_PAGE, + /*page_length*/sizeof(struct scsi_da_rw_recovery_page) - 2, + /*byte3*/SMS_RWER_AWRE|SMS_RWER_ARRE, + /*read_retry_count*/0, + /*correction_span*/0, + /*head_offset_count*/0, + /*data_strobe_offset_cnt*/0, + /*byte8*/0, + /*write_retry_count*/0, + /*reserved2*/0, + /*recovery_time_limit*/{0, 0}, +}; + +static struct scsi_da_rw_recovery_page rw_er_page_changeable = { + /*page_code*/SMS_RW_ERROR_RECOVERY_PAGE, + /*page_length*/sizeof(struct scsi_da_rw_recovery_page) - 2, + /*byte3*/0, + /*read_retry_count*/0, + /*correction_span*/0, + /*head_offset_count*/0, + /*data_strobe_offset_cnt*/0, + /*byte8*/0, + /*write_retry_count*/0, + /*reserved2*/0, + /*recovery_time_limit*/{0, 0}, +}; + static struct scsi_format_page format_page_default = { /*page_code*/SMS_FORMAT_DEVICE_PAGE, /*page_length*/sizeof(struct scsi_format_page) - 2, @@ -300,6 +328,41 @@ static struct scsi_control_page control_ /*extended_selftest_completion_time*/{0, 0} }; +static struct scsi_info_exceptions_page ie_page_default = { + /*page_code*/SMS_INFO_EXCEPTIONS_PAGE, + /*page_length*/sizeof(struct scsi_info_exceptions_page) - 2, + /*info_flags*/SIEP_FLAGS_DEXCPT, + /*mrie*/0, + /*interval_timer*/{0, 0, 0, 0}, + /*report_count*/{0, 0, 0, 0} +}; + +static struct scsi_info_exceptions_page ie_page_changeable = { + /*page_code*/SMS_INFO_EXCEPTIONS_PAGE, + /*page_length*/sizeof(struct scsi_info_exceptions_page) - 2, + /*info_flags*/0, + /*mrie*/0, + /*interval_timer*/{0, 0, 0, 0}, + /*report_count*/{0, 0, 0, 0} +}; + +static struct scsi_logical_block_provisioning_page lbp_page_default = { + /*page_code*/SMS_INFO_EXCEPTIONS_PAGE | SMPH_SPF, + /*subpage_code*/0x02, + /*page_length*/{0, sizeof(struct scsi_logical_block_provisioning_page) - 4}, + /*flags*/0, + /*reserved*/{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + /*descr*/{} +}; + +static struct scsi_logical_block_provisioning_page lbp_page_changeable = { + /*page_code*/SMS_INFO_EXCEPTIONS_PAGE | SMPH_SPF, + /*subpage_code*/0x02, + /*page_length*/{0, sizeof(struct scsi_logical_block_provisioning_page) - 4}, + /*flags*/0, + /*reserved*/{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + /*descr*/{} +}; /* * XXX KDM move these into the softc. @@ -4153,14 +4216,11 @@ ctl_init_page_index(struct ctl_lun *lun) { int i; struct ctl_page_index *page_index; - struct ctl_softc *softc; const char *value; memcpy(&lun->mode_pages.index, page_index_template, sizeof(page_index_template)); - softc = lun->ctl_softc; - for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { page_index = &lun->mode_pages.index[i]; @@ -4175,6 +4235,25 @@ ctl_init_page_index(struct ctl_lun *lun) continue; switch (page_index->page_code & SMPH_PC_MASK) { + case SMS_RW_ERROR_RECOVERY_PAGE: { + if (page_index->subpage != SMS_SUBPAGE_PAGE_0) + panic("subpage is incorrect!"); + memcpy(&lun->mode_pages.rw_er_page[CTL_PAGE_CURRENT], + &rw_er_page_default, + sizeof(rw_er_page_default)); + memcpy(&lun->mode_pages.rw_er_page[CTL_PAGE_CHANGEABLE], + &rw_er_page_changeable, + sizeof(rw_er_page_changeable)); + memcpy(&lun->mode_pages.rw_er_page[CTL_PAGE_DEFAULT], + &rw_er_page_default, + sizeof(rw_er_page_default)); + memcpy(&lun->mode_pages.rw_er_page[CTL_PAGE_SAVED], + &rw_er_page_default, + sizeof(rw_er_page_default)); + page_index->page_data = + (uint8_t *)lun->mode_pages.rw_er_page; + break; + } case SMS_FORMAT_DEVICE_PAGE: { struct scsi_format_page *format_page; @@ -4364,6 +4443,42 @@ ctl_init_page_index(struct ctl_lun *lun) break; } + case SMS_INFO_EXCEPTIONS_PAGE: { + switch (page_index->subpage) { + case SMS_SUBPAGE_PAGE_0: + memcpy(&lun->mode_pages.ie_page[CTL_PAGE_CURRENT], + &ie_page_default, + sizeof(ie_page_default)); + memcpy(&lun->mode_pages.ie_page[ + CTL_PAGE_CHANGEABLE], &ie_page_changeable, + sizeof(ie_page_changeable)); + memcpy(&lun->mode_pages.ie_page[CTL_PAGE_DEFAULT], + &ie_page_default, + sizeof(ie_page_default)); + memcpy(&lun->mode_pages.ie_page[CTL_PAGE_SAVED], + &ie_page_default, + sizeof(ie_page_default)); + page_index->page_data = + (uint8_t *)lun->mode_pages.ie_page; + break; + case 0x02: + memcpy(&lun->mode_pages.lbp_page[CTL_PAGE_CURRENT], + &lbp_page_default, + sizeof(lbp_page_default)); + memcpy(&lun->mode_pages.lbp_page[ + CTL_PAGE_CHANGEABLE], &lbp_page_changeable, + sizeof(lbp_page_changeable)); + memcpy(&lun->mode_pages.lbp_page[CTL_PAGE_DEFAULT], + &lbp_page_default, + sizeof(lbp_page_default)); + memcpy(&lun->mode_pages.lbp_page[CTL_PAGE_SAVED], + &lbp_page_default, + sizeof(lbp_page_default)); + page_index->page_data = + (uint8_t *)lun->mode_pages.lbp_page; + } + break; + } case SMS_VENDOR_SPECIFIC_PAGE:{ switch (page_index->subpage) { case PWR_SUBPAGE_CODE: { @@ -4487,6 +4602,45 @@ ctl_init_page_index(struct ctl_lun *lun) return (CTL_RETVAL_COMPLETE); } +static int +ctl_init_log_page_index(struct ctl_lun *lun) +{ + struct ctl_page_index *page_index; + int i, j, prev; + + memcpy(&lun->log_pages.index, log_page_index_template, + sizeof(log_page_index_template)); + + prev = -1; + for (i = 0, j = 0; i < CTL_NUM_LOG_PAGES; i++) { + + page_index = &lun->log_pages.index[i]; + /* + * If this is a disk-only mode page, there's no point in + * setting it up. For some pages, we have to have some + * basic information about the disk in order to calculate the + * mode page data. + */ + if ((lun->be_lun->lun_type != T_DIRECT) + && (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) + continue; + + if (page_index->page_code != prev) { + lun->log_pages.pages_page[j] = page_index->page_code; + prev = page_index->page_code; + j++; + } + lun->log_pages.subpages_page[i*2] = page_index->page_code; + lun->log_pages.subpages_page[i*2+1] = page_index->subpage; + } + lun->log_pages.index[0].page_data = &lun->log_pages.pages_page[0]; + lun->log_pages.index[0].page_len = j; + lun->log_pages.index[1].page_data = &lun->log_pages.subpages_page[0]; + lun->log_pages.index[1].page_len = i * 2; + + return (CTL_RETVAL_COMPLETE); +} + /* * LUN allocation. * @@ -4682,9 +4836,10 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft ctl_tpc_lun_init(lun); /* - * Initialize the mode page index. + * Initialize the mode and log page index. */ ctl_init_page_index(lun); + ctl_init_log_page_index(lun); /* * Set the poweron UA for all initiators on this LUN only. @@ -7266,6 +7421,91 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) } int +ctl_log_sense(struct ctl_scsiio *ctsio) +{ + struct ctl_lun *lun; + int i, pc, page_code, subpage; + int alloc_len, total_len; + struct ctl_page_index *page_index; + struct scsi_log_sense *cdb; + struct scsi_log_header *header; + + CTL_DEBUG_PRINT(("ctl_log_sense\n")); + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + cdb = (struct scsi_log_sense *)ctsio->cdb; + pc = (cdb->page & SLS_PAGE_CTRL_MASK) >> 6; + page_code = cdb->page & SLS_PAGE_CODE; + subpage = cdb->subpage; + alloc_len = scsi_2btoul(cdb->length); + + page_index = NULL; + for (i = 0; i < CTL_NUM_LOG_PAGES; i++) { + page_index = &lun->log_pages.index[i]; + + /* Look for the right page code */ + if ((page_index->page_code & SL_PAGE_CODE) != page_code) + continue; + + /* Look for the right subpage or the subpage wildcard*/ + if (page_index->subpage != subpage) + continue; + + break; + } + if (i >= CTL_NUM_LOG_PAGES) { + ctl_set_invalid_field(ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 2, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + total_len = sizeof(struct scsi_log_header) + page_index->page_len; + + ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); + ctsio->kern_sg_entries = 0; + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + if (total_len < alloc_len) { + ctsio->residual = alloc_len - total_len; + ctsio->kern_data_len = total_len; + ctsio->kern_total_len = total_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + + header = (struct scsi_log_header *)ctsio->kern_data_ptr; + header->page = page_index->page_code; + if (page_index->subpage) { + header->page |= SL_SPF; + header->subpage = page_index->subpage; + } + scsi_ulto2b(page_index->page_len, header->datalen); + + /* + * Call the handler, if it exists, to update the + * page to the latest values. + */ + if (page_index->sense_handler != NULL) + page_index->sense_handler(ctsio, page_index, pc); + + memcpy(header + 1, page_index->page_data, page_index->page_len); + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); +} + +int ctl_read_capacity(struct ctl_scsiio *ctsio) { struct scsi_read_capacity *cdb; Modified: head/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- head/sys/cam/ctl/ctl_cmd_table.c Tue Oct 14 08:30:02 2014 (r273072) +++ head/sys/cam/ctl/ctl_cmd_table.c Tue Oct 14 10:14:14 2014 (r273073) @@ -850,7 +850,10 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 4D LOG SENSE */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_log_sense, CTL_SERIDX_LOG_SNS, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_LUN_PAT_NONE, 10, {0, 0xff, 0xff, 0, 0xff, 0xff, 0xff, 0xff, 0x07} }, /* 4E STOP PLAY/SCAN */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Tue Oct 14 08:30:02 2014 (r273072) +++ head/sys/cam/ctl/ctl_private.h Tue Oct 14 10:14:14 2014 (r273073) @@ -302,6 +302,8 @@ struct ctl_page_index { #define CTL_PAGE_SAVED 0x03 static const struct ctl_page_index page_index_template[] = { + {SMS_RW_ERROR_RECOVERY_PAGE, 0, sizeof(struct scsi_da_rw_recovery_page), NULL, + CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, {SMS_FORMAT_DEVICE_PAGE, 0, sizeof(struct scsi_format_page), NULL, CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, {SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL, @@ -310,6 +312,11 @@ static const struct ctl_page_index page_ CTL_PAGE_FLAG_DISK_ONLY, NULL, ctl_caching_sp_handler}, {SMS_CONTROL_MODE_PAGE, 0, sizeof(struct scsi_control_page), NULL, CTL_PAGE_FLAG_NONE, NULL, ctl_control_page_handler}, + {SMS_INFO_EXCEPTIONS_PAGE, 0, sizeof(struct scsi_info_exceptions_page), NULL, + CTL_PAGE_FLAG_NONE, NULL, NULL}, + {SMS_INFO_EXCEPTIONS_PAGE | SMPH_SPF, 0x02, + sizeof(struct scsi_logical_block_provisioning_page), NULL, + CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, {SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, PWR_SUBPAGE_CODE, sizeof(struct copan_power_subpage), NULL, CTL_PAGE_FLAG_NONE, ctl_power_sp_sense_handler, ctl_power_sp_handler}, @@ -325,16 +332,35 @@ static const struct ctl_page_index page_ sizeof(page_index_template[0]) struct ctl_mode_pages { + struct scsi_da_rw_recovery_page rw_er_page[4]; struct scsi_format_page format_page[4]; struct scsi_rigid_disk_page rigid_disk_page[4]; struct scsi_caching_page caching_page[4]; struct scsi_control_page control_page[4]; + struct scsi_info_exceptions_page ie_page[4]; + struct scsi_logical_block_provisioning_page lbp_page[4]; struct copan_power_subpage power_subpage[4]; struct copan_aps_subpage aps_subpage[4]; struct copan_debugconf_subpage debugconf_subpage[4]; struct ctl_page_index index[CTL_NUM_MODE_PAGES]; }; +static const struct ctl_page_index log_page_index_template[] = { + {SLS_SUPPORTED_PAGES_PAGE, 0, 0, NULL, + CTL_PAGE_FLAG_NONE, NULL, NULL}, + {SLS_SUPPORTED_PAGES_PAGE, SLS_SUPPORTED_SUBPAGES_SUBPAGE, 0, NULL, + CTL_PAGE_FLAG_NONE, NULL, NULL}, +}; + +#define CTL_NUM_LOG_PAGES sizeof(log_page_index_template)/ \ + sizeof(log_page_index_template[0]) + +struct ctl_log_pages { + uint8_t pages_page[CTL_NUM_LOG_PAGES]; + uint8_t subpages_page[CTL_NUM_LOG_PAGES * 2]; + struct ctl_page_index index[CTL_NUM_LOG_PAGES]; +}; + struct ctl_lun_delay_info { ctl_delay_type datamove_type; uint32_t datamove_delay; @@ -391,6 +417,7 @@ struct ctl_lun { #endif ctl_ua_type pending_ua[CTL_MAX_INITIATORS]; struct ctl_mode_pages mode_pages; + struct ctl_log_pages log_pages; struct ctl_lun_io_stats stats; uint32_t res_idx; unsigned int PRGeneration; @@ -484,6 +511,7 @@ int ctl_write_same(struct ctl_scsiio *ct int ctl_unmap(struct ctl_scsiio *ctsio); int ctl_mode_select(struct ctl_scsiio *ctsio); int ctl_mode_sense(struct ctl_scsiio *ctsio); +int ctl_log_sense(struct ctl_scsiio *ctsio); int ctl_read_capacity(struct ctl_scsiio *ctsio); int ctl_read_capacity_16(struct ctl_scsiio *ctsio); int ctl_read_defect(struct ctl_scsiio *ctsio); Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Tue Oct 14 08:30:02 2014 (r273072) +++ head/sys/cam/scsi/scsi_all.h Tue Oct 14 10:14:14 2014 (r273073) @@ -551,7 +551,7 @@ struct scsi_log_sense #define SLS_PPC 0x02 u_int8_t page; #define SLS_PAGE_CODE 0x3F -#define SLS_ALL_PAGES_PAGE 0x00 +#define SLS_SUPPORTED_PAGES_PAGE 0x00 #define SLS_OVERRUN_PAGE 0x01 #define SLS_ERROR_WRITE_PAGE 0x02 #define SLS_ERROR_READ_PAGE 0x03 @@ -566,7 +566,9 @@ struct scsi_log_sense #define SLS_PAGE_CTRL_CUMULATIVE 0x40 #define SLS_PAGE_CTRL_THRESH_DEFAULT 0x80 #define SLS_PAGE_CTRL_CUMUL_DEFAULT 0xC0 - u_int8_t reserved[2]; + u_int8_t subpage; +#define SLS_SUPPORTED_SUBPAGES_SUBPAGE 0xff + u_int8_t reserved; u_int8_t paramptr[2]; u_int8_t length[2]; u_int8_t control; @@ -592,7 +594,10 @@ struct scsi_log_select struct scsi_log_header { u_int8_t page; - u_int8_t reserved; +#define SL_PAGE_CODE 0x3F +#define SL_SPF 0x40 +#define SL_DS 0x80 + u_int8_t subpage; u_int8_t datalen[2]; }; @@ -767,6 +772,23 @@ struct scsi_info_exceptions_page { u_int8_t report_count[4]; }; +struct scsi_logical_block_provisioning_page_descr { + uint8_t flags; + uint8_t resource; + uint8_t reserved[2]; + uint8_t count[4]; +}; + +struct scsi_logical_block_provisioning_page { + uint8_t page_code; + uint8_t subpage_code; + uint8_t page_length[2]; + uint8_t flags; +#define SLBPP_SITUA 0x01 + uint8_t reserved[11]; + struct scsi_logical_block_provisioning_page_descr descr[0]; +}; + /* * SCSI protocol identifier values, current as of SPC4r36l. */ From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 11:28:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96C4F3A2; Tue, 14 Oct 2014 11:28:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81BBBDAE; Tue, 14 Oct 2014 11:28:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EBSRsq075478; Tue, 14 Oct 2014 11:28:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EBSQtf075468; Tue, 14 Oct 2014 11:28:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410141128.s9EBSQtf075468@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 14 Oct 2014 11:28:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273075 - in head/sys/cam: ctl scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 11:28:27 -0000 Author: mav Date: Tue Oct 14 11:28:25 2014 New Revision: 273075 URL: https://svnweb.freebsd.org/changeset/base/273075 Log: Remove couple Copan's vendor-specific mode pages. Those pages are highly system-/hardware-specific, the code is incomplete, and so they hardly can be useful for anybody else. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_backend.h head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_private.h head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Oct 14 11:20:08 2014 (r273074) +++ head/sys/cam/ctl/ctl.c Tue Oct 14 11:28:25 2014 (r273075) @@ -109,56 +109,6 @@ struct ctl_softc *control_softc = NULL; * Note that these are default values only. The actual values will be * filled in when the user does a mode sense. */ -static struct copan_power_subpage power_page_default = { - /*page_code*/ PWR_PAGE_CODE | SMPH_SPF, - /*subpage*/ PWR_SUBPAGE_CODE, - /*page_length*/ {(sizeof(struct copan_power_subpage) - 4) & 0xff00, - (sizeof(struct copan_power_subpage) - 4) & 0x00ff}, - /*page_version*/ PWR_VERSION, - /* total_luns */ 26, - /* max_active_luns*/ PWR_DFLT_MAX_LUNS, - /*reserved*/ {0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0} -}; - -static struct copan_power_subpage power_page_changeable = { - /*page_code*/ PWR_PAGE_CODE | SMPH_SPF, - /*subpage*/ PWR_SUBPAGE_CODE, - /*page_length*/ {(sizeof(struct copan_power_subpage) - 4) & 0xff00, - (sizeof(struct copan_power_subpage) - 4) & 0x00ff}, - /*page_version*/ 0, - /* total_luns */ 0, - /* max_active_luns*/ 0, - /*reserved*/ {0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0} -}; - -static struct copan_aps_subpage aps_page_default = { - APS_PAGE_CODE | SMPH_SPF, //page_code - APS_SUBPAGE_CODE, //subpage - {(sizeof(struct copan_aps_subpage) - 4) & 0xff00, - (sizeof(struct copan_aps_subpage) - 4) & 0x00ff}, //page_length - APS_VERSION, //page_version - 0, //lock_active - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0} //reserved -}; - -static struct copan_aps_subpage aps_page_changeable = { - APS_PAGE_CODE | SMPH_SPF, //page_code - APS_SUBPAGE_CODE, //subpage - {(sizeof(struct copan_aps_subpage) - 4) & 0xff00, - (sizeof(struct copan_aps_subpage) - 4) & 0x00ff}, //page_length - 0, //page_version - 0, //lock_active - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0} //reserved -}; - static struct copan_debugconf_subpage debugconf_page_default = { DBGCNF_PAGE_CODE | SMPH_SPF, /* page_code */ DBGCNF_SUBPAGE_CODE, /* subpage */ @@ -371,7 +321,6 @@ static int rcv_sync_msg; static int persis_offset; static uint8_t ctl_pause_rtr; static int ctl_is_single = 1; -static int index_to_aps_page; SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); static int worker_threads = -1; @@ -949,26 +898,6 @@ ctl_isc_event_handler(ctl_ha_channel cha case CTL_MSG_SYNC_FE: rcv_sync_msg = 1; break; - case CTL_MSG_APS_LOCK: { - // It's quicker to execute this then to - // queue it. - struct ctl_lun *lun; - struct ctl_page_index *page_index; - struct copan_aps_subpage *current_sp; - uint32_t targ_lun; - - targ_lun = msg_info.hdr.nexus.targ_mapped_lun; - lun = ctl_softc->ctl_luns[targ_lun]; - mtx_lock(&lun->lun_lock); - page_index = &lun->mode_pages.index[index_to_aps_page]; - current_sp = (struct copan_aps_subpage *) - (page_index->page_data + - (page_index->page_len * CTL_PAGE_CURRENT)); - - current_sp->lock_active = msg_info.aps.lock_flag; - mtx_unlock(&lun->lun_lock); - break; - } default: printf("How did I get here?\n"); } @@ -4057,156 +3986,6 @@ ctl_copy_io(union ctl_io *src, union ctl dest->io_hdr.flags |= CTL_FLAG_INT_COPY; } -#ifdef NEEDTOPORT -static void -ctl_update_power_subpage(struct copan_power_subpage *page) -{ - int num_luns, num_partitions, config_type; - struct ctl_softc *softc; - cs_BOOL_t aor_present, shelf_50pct_power; - cs_raidset_personality_t rs_type; - int max_active_luns; - - softc = control_softc; - - /* subtract out the processor LUN */ - num_luns = softc->num_luns - 1; - /* - * Default to 7 LUNs active, which was the only number we allowed - * in the past. - */ - max_active_luns = 7; - - num_partitions = config_GetRsPartitionInfo(); - config_type = config_GetConfigType(); - shelf_50pct_power = config_GetShelfPowerMode(); - aor_present = config_IsAorRsPresent(); - - rs_type = ddb_GetRsRaidType(1); - if ((rs_type != CS_RAIDSET_PERSONALITY_RAID5) - && (rs_type != CS_RAIDSET_PERSONALITY_RAID1)) { - EPRINT(0, "Unsupported RS type %d!", rs_type); - } - - - page->total_luns = num_luns; - - switch (config_type) { - case 40: - /* - * In a 40 drive configuration, it doesn't matter what DC - * cards we have, whether we have AOR enabled or not, - * partitioning or not, or what type of RAIDset we have. - * In that scenario, we can power up every LUN we present - * to the user. - */ - max_active_luns = num_luns; - - break; - case 64: - if (shelf_50pct_power == CS_FALSE) { - /* 25% power */ - if (aor_present == CS_TRUE) { - if (rs_type == - CS_RAIDSET_PERSONALITY_RAID5) { - max_active_luns = 7; - } else if (rs_type == - CS_RAIDSET_PERSONALITY_RAID1){ - max_active_luns = 14; - } else { - /* XXX KDM now what?? */ - } - } else { - if (rs_type == - CS_RAIDSET_PERSONALITY_RAID5) { - max_active_luns = 8; - } else if (rs_type == - CS_RAIDSET_PERSONALITY_RAID1){ - max_active_luns = 16; - } else { - /* XXX KDM now what?? */ - } - } - } else { - /* 50% power */ - /* - * With 50% power in a 64 drive configuration, we - * can power all LUNs we present. - */ - max_active_luns = num_luns; - } - break; - case 112: - if (shelf_50pct_power == CS_FALSE) { - /* 25% power */ - if (aor_present == CS_TRUE) { - if (rs_type == - CS_RAIDSET_PERSONALITY_RAID5) { - max_active_luns = 7; - } else if (rs_type == - CS_RAIDSET_PERSONALITY_RAID1){ - max_active_luns = 14; - } else { - /* XXX KDM now what?? */ - } - } else { - if (rs_type == - CS_RAIDSET_PERSONALITY_RAID5) { - max_active_luns = 8; - } else if (rs_type == - CS_RAIDSET_PERSONALITY_RAID1){ - max_active_luns = 16; - } else { - /* XXX KDM now what?? */ - } - } - } else { - /* 50% power */ - if (aor_present == CS_TRUE) { - if (rs_type == - CS_RAIDSET_PERSONALITY_RAID5) { - max_active_luns = 14; - } else if (rs_type == - CS_RAIDSET_PERSONALITY_RAID1){ - /* - * We're assuming here that disk - * caching is enabled, and so we're - * able to power up half of each - * LUN, and cache all writes. - */ - max_active_luns = num_luns; - } else { - /* XXX KDM now what?? */ - } - } else { - if (rs_type == - CS_RAIDSET_PERSONALITY_RAID5) { - max_active_luns = 15; - } else if (rs_type == - CS_RAIDSET_PERSONALITY_RAID1){ - max_active_luns = 30; - } else { - /* XXX KDM now what?? */ - } - } - } - break; - default: - /* - * In this case, we have an unknown configuration, so we - * just use the default from above. - */ - break; - } - - page->max_active_luns = max_active_luns; -#if 0 - printk("%s: total_luns = %d, max_active_luns = %d\n", __func__, - page->total_luns, page->max_active_luns); -#endif -} -#endif /* NEEDTOPORT */ - /* * This routine could be used in the future to load default and/or saved * mode page parameters for a particuar lun. @@ -4481,77 +4260,6 @@ ctl_init_page_index(struct ctl_lun *lun) } case SMS_VENDOR_SPECIFIC_PAGE:{ switch (page_index->subpage) { - case PWR_SUBPAGE_CODE: { - struct copan_power_subpage *current_page, - *saved_page; - - memcpy(&lun->mode_pages.power_subpage[ - CTL_PAGE_CURRENT], - &power_page_default, - sizeof(power_page_default)); - memcpy(&lun->mode_pages.power_subpage[ - CTL_PAGE_CHANGEABLE], - &power_page_changeable, - sizeof(power_page_changeable)); - memcpy(&lun->mode_pages.power_subpage[ - CTL_PAGE_DEFAULT], - &power_page_default, - sizeof(power_page_default)); - memcpy(&lun->mode_pages.power_subpage[ - CTL_PAGE_SAVED], - &power_page_default, - sizeof(power_page_default)); - page_index->page_data = - (uint8_t *)lun->mode_pages.power_subpage; - - current_page = (struct copan_power_subpage *) - (page_index->page_data + - (page_index->page_len * - CTL_PAGE_CURRENT)); - saved_page = (struct copan_power_subpage *) - (page_index->page_data + - (page_index->page_len * - CTL_PAGE_SAVED)); - break; - } - case APS_SUBPAGE_CODE: { - struct copan_aps_subpage *current_page, - *saved_page; - - // This gets set multiple times but - // it should always be the same. It's - // only done during init so who cares. - index_to_aps_page = i; - - memcpy(&lun->mode_pages.aps_subpage[ - CTL_PAGE_CURRENT], - &aps_page_default, - sizeof(aps_page_default)); - memcpy(&lun->mode_pages.aps_subpage[ - CTL_PAGE_CHANGEABLE], - &aps_page_changeable, - sizeof(aps_page_changeable)); - memcpy(&lun->mode_pages.aps_subpage[ - CTL_PAGE_DEFAULT], - &aps_page_default, - sizeof(aps_page_default)); - memcpy(&lun->mode_pages.aps_subpage[ - CTL_PAGE_SAVED], - &aps_page_default, - sizeof(aps_page_default)); - page_index->page_data = - (uint8_t *)lun->mode_pages.aps_subpage; - - current_page = (struct copan_aps_subpage *) - (page_index->page_data + - (page_index->page_len * - CTL_PAGE_CURRENT)); - saved_page = (struct copan_aps_subpage *) - (page_index->page_data + - (page_index->page_len * - CTL_PAGE_SAVED)); - break; - } case DBGCNF_SUBPAGE_CODE: { struct copan_debugconf_subpage *current_page, *saved_page; @@ -5270,95 +4978,6 @@ ctl_lun_operable(struct ctl_be_lun *be_l return (0); } -int -ctl_lun_power_lock(struct ctl_be_lun *be_lun, struct ctl_nexus *nexus, - int lock) -{ - struct ctl_softc *softc; - struct ctl_lun *lun; - struct copan_aps_subpage *current_sp; - struct ctl_page_index *page_index; - int i; - - softc = control_softc; - - mtx_lock(&softc->ctl_lock); - - lun = (struct ctl_lun *)be_lun->ctl_lun; - mtx_lock(&lun->lun_lock); - - page_index = NULL; - for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { - if ((lun->mode_pages.index[i].page_code & SMPH_PC_MASK) != - APS_PAGE_CODE) - continue; - - if (lun->mode_pages.index[i].subpage != APS_SUBPAGE_CODE) - continue; - page_index = &lun->mode_pages.index[i]; - } - - if (page_index == NULL) { - mtx_unlock(&lun->lun_lock); - mtx_unlock(&softc->ctl_lock); - printf("%s: APS subpage not found for lun %ju!\n", __func__, - (uintmax_t)lun->lun); - return (1); - } -#if 0 - if ((softc->aps_locked_lun != 0) - && (softc->aps_locked_lun != lun->lun)) { - printf("%s: attempt to lock LUN %llu when %llu is already " - "locked\n"); - mtx_unlock(&lun->lun_lock); - mtx_unlock(&softc->ctl_lock); - return (1); - } -#endif - - current_sp = (struct copan_aps_subpage *)(page_index->page_data + - (page_index->page_len * CTL_PAGE_CURRENT)); - - if (lock != 0) { - current_sp->lock_active = APS_LOCK_ACTIVE; - softc->aps_locked_lun = lun->lun; - } else { - current_sp->lock_active = 0; - softc->aps_locked_lun = 0; - } - - - /* - * If we're in HA mode, try to send the lock message to the other - * side. - */ - if (ctl_is_single == 0) { - int isc_retval; - union ctl_ha_msg lock_msg; - - lock_msg.hdr.nexus = *nexus; - lock_msg.hdr.msg_type = CTL_MSG_APS_LOCK; - if (lock != 0) - lock_msg.aps.lock_flag = 1; - else - lock_msg.aps.lock_flag = 0; - isc_retval = ctl_ha_msg_send(CTL_HA_CHAN_CTL, &lock_msg, - sizeof(lock_msg), 0); - if (isc_retval > CTL_HA_STATUS_SUCCESS) { - printf("%s: APS (lock=%d) error returned from " - "ctl_ha_msg_send: %d\n", __func__, lock, isc_retval); - mtx_unlock(&lun->lun_lock); - mtx_unlock(&softc->ctl_lock); - return (1); - } - } - - mtx_unlock(&lun->lun_lock); - mtx_unlock(&softc->ctl_lock); - - return (0); -} - void ctl_lun_capacity_changed(struct ctl_be_lun *be_lun) { @@ -6515,121 +6134,6 @@ ctl_caching_sp_handler(struct ctl_scsiio } int -ctl_power_sp_handler(struct ctl_scsiio *ctsio, - struct ctl_page_index *page_index, uint8_t *page_ptr) -{ - return (0); -} - -int -ctl_power_sp_sense_handler(struct ctl_scsiio *ctsio, - struct ctl_page_index *page_index, int pc) -{ - struct copan_power_subpage *page; - - page = (struct copan_power_subpage *)page_index->page_data + - (page_index->page_len * pc); - - switch (pc) { - case SMS_PAGE_CTRL_CHANGEABLE >> 6: - /* - * We don't update the changable bits for this page. - */ - break; - case SMS_PAGE_CTRL_CURRENT >> 6: - case SMS_PAGE_CTRL_DEFAULT >> 6: - case SMS_PAGE_CTRL_SAVED >> 6: -#ifdef NEEDTOPORT - ctl_update_power_subpage(page); -#endif - break; - default: -#ifdef NEEDTOPORT - EPRINT(0, "Invalid PC %d!!", pc); -#endif - break; - } - return (0); -} - - -int -ctl_aps_sp_handler(struct ctl_scsiio *ctsio, - struct ctl_page_index *page_index, uint8_t *page_ptr) -{ - struct copan_aps_subpage *user_sp; - struct copan_aps_subpage *current_sp; - union ctl_modepage_info *modepage_info; - struct ctl_softc *softc; - struct ctl_lun *lun; - int retval; - - retval = CTL_RETVAL_COMPLETE; - current_sp = (struct copan_aps_subpage *)(page_index->page_data + - (page_index->page_len * CTL_PAGE_CURRENT)); - softc = control_softc; - lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - - user_sp = (struct copan_aps_subpage *)page_ptr; - - modepage_info = (union ctl_modepage_info *) - ctsio->io_hdr.ctl_private[CTL_PRIV_MODEPAGE].bytes; - - modepage_info->header.page_code = page_index->page_code & SMPH_PC_MASK; - modepage_info->header.subpage = page_index->subpage; - modepage_info->aps.lock_active = user_sp->lock_active; - - mtx_lock(&softc->ctl_lock); - - /* - * If there is a request to lock the LUN and another LUN is locked - * this is an error. If the requested LUN is already locked ignore - * the request. If no LUN is locked attempt to lock it. - * if there is a request to unlock the LUN and the LUN is currently - * locked attempt to unlock it. Otherwise ignore the request. i.e. - * if another LUN is locked or no LUN is locked. - */ - if (user_sp->lock_active & APS_LOCK_ACTIVE) { - if (softc->aps_locked_lun == lun->lun) { - /* - * This LUN is already locked, so we're done. - */ - retval = CTL_RETVAL_COMPLETE; - } else if (softc->aps_locked_lun == 0) { - /* - * No one has the lock, pass the request to the - * backend. - */ - retval = lun->backend->config_write( - (union ctl_io *)ctsio); - } else { - /* - * Someone else has the lock, throw out the request. - */ - ctl_set_already_locked(ctsio); - free(ctsio->kern_data_ptr, M_CTL); - ctl_done((union ctl_io *)ctsio); - - /* - * Set the return value so that ctl_do_mode_select() - * won't try to complete the command. We already - * completed it here. - */ - retval = CTL_RETVAL_ERROR; - } - } else if (softc->aps_locked_lun == lun->lun) { - /* - * This LUN is locked, so pass the unlock request to the - * backend. - */ - retval = lun->backend->config_write((union ctl_io *)ctsio); - } - mtx_unlock(&softc->ctl_lock); - - return (retval); -} - -int ctl_debugconf_sp_select_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr) Modified: head/sys/cam/ctl/ctl.h ============================================================================== --- head/sys/cam/ctl/ctl.h Tue Oct 14 11:20:08 2014 (r273074) +++ head/sys/cam/ctl/ctl.h Tue Oct 14 11:28:25 2014 (r273075) @@ -172,12 +172,6 @@ int ctl_failover_sp_handler(struct ctl_s struct ctl_page_index *page_index, uint8_t *page_ptr); **/ -int ctl_power_sp_handler(struct ctl_scsiio *ctsio, - struct ctl_page_index *page_index, uint8_t *page_ptr); -int ctl_power_sp_sense_handler(struct ctl_scsiio *ctsio, - struct ctl_page_index *page_index, int pc); -int ctl_aps_sp_handler(struct ctl_scsiio *ctsio, - struct ctl_page_index *page_index, uint8_t *page_ptr); int ctl_debugconf_sp_sense_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc); Modified: head/sys/cam/ctl/ctl_backend.h ============================================================================== --- head/sys/cam/ctl/ctl_backend.h Tue Oct 14 11:20:08 2014 (r273074) +++ head/sys/cam/ctl/ctl_backend.h Tue Oct 14 11:28:25 2014 (r273075) @@ -280,14 +280,6 @@ int ctl_lun_inoperable(struct ctl_be_lun int ctl_lun_operable(struct ctl_be_lun *be_lun); /* - * If a LUN is locked on or unlocked from a power/APS standpoint, call - * ctl_lun_power_lock() to update the current status in CTL's APS subpage. - * Set the lock flag to 1 to lock the LUN, set it to 0 to unlock the LUN. - */ -int ctl_lun_power_lock(struct ctl_be_lun *be_lun, struct ctl_nexus *nexus, - int lock); - -/* * To take a LUN offline, call ctl_lun_offline(). Generally the LUN will * be online again once the user sends a SCSI START STOP UNIT command with * the start and on/offline bits set. The backend can bring the LUN back Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Tue Oct 14 11:20:08 2014 (r273074) +++ head/sys/cam/ctl/ctl_io.h Tue Oct 14 11:28:25 2014 (r273075) @@ -234,7 +234,6 @@ typedef enum { CTL_MSG_MANAGE_TASKS, CTL_MSG_PERS_ACTION, CTL_MSG_SYNC_FE, - CTL_MSG_APS_LOCK, CTL_MSG_DATAMOVE, CTL_MSG_DATAMOVE_DONE } ctl_msg_type; @@ -424,14 +423,6 @@ struct ctl_ha_msg_hdr { #define CTL_HA_MAX_SG_ENTRIES 16 /* - * Used for CTL_MSG_APS_LOCK. - */ -struct ctl_ha_msg_aps { - struct ctl_ha_msg_hdr hdr; - uint8_t lock_flag; -}; - -/* * Used for CTL_MSG_PERS_ACTION. */ struct ctl_ha_msg_pr { @@ -500,7 +491,6 @@ union ctl_ha_msg { struct ctl_ha_msg_scsi scsi; struct ctl_ha_msg_dt dt; struct ctl_ha_msg_pr pr; - struct ctl_ha_msg_aps aps; }; Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Tue Oct 14 11:20:08 2014 (r273074) +++ head/sys/cam/ctl/ctl_private.h Tue Oct 14 11:28:25 2014 (r273075) @@ -317,12 +317,6 @@ static const struct ctl_page_index page_ {SMS_INFO_EXCEPTIONS_PAGE | SMPH_SPF, 0x02, sizeof(struct scsi_logical_block_provisioning_page), NULL, CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, - {SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, PWR_SUBPAGE_CODE, - sizeof(struct copan_power_subpage), NULL, CTL_PAGE_FLAG_NONE, - ctl_power_sp_sense_handler, ctl_power_sp_handler}, - {SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, APS_SUBPAGE_CODE, - sizeof(struct copan_aps_subpage), NULL, CTL_PAGE_FLAG_NONE, - NULL, ctl_aps_sp_handler}, {SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, DBGCNF_SUBPAGE_CODE, sizeof(struct copan_debugconf_subpage), NULL, CTL_PAGE_FLAG_NONE, ctl_debugconf_sp_sense_handler, ctl_debugconf_sp_select_handler}, @@ -339,8 +333,6 @@ struct ctl_mode_pages { struct scsi_control_page control_page[4]; struct scsi_info_exceptions_page ie_page[4]; struct scsi_logical_block_provisioning_page lbp_page[4]; - struct copan_power_subpage power_subpage[4]; - struct copan_aps_subpage aps_subpage[4]; struct copan_debugconf_subpage debugconf_subpage[4]; struct ctl_page_index index[CTL_NUM_MODE_PAGES]; }; @@ -469,7 +461,6 @@ struct ctl_softc { uint32_t ctl_lun_mask[(CTL_MAX_LUNS + 31) / 32]; struct ctl_lun *ctl_luns[CTL_MAX_LUNS]; uint32_t ctl_port_mask[(CTL_MAX_PORTS + 31) / 32]; - uint64_t aps_locked_lun; STAILQ_HEAD(, ctl_lun) lun_list; STAILQ_HEAD(, ctl_be_lun) pending_lun_queue; uint32_t num_frontends; Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Tue Oct 14 11:20:08 2014 (r273074) +++ head/sys/cam/scsi/scsi_all.h Tue Oct 14 11:28:25 2014 (r273075) @@ -709,40 +709,6 @@ struct scsi_caching_page { /* * XXX KDM move this off to a vendor shim. */ -struct copan_power_subpage { - uint8_t page_code; -#define PWR_PAGE_CODE 0x00 - uint8_t subpage; -#define PWR_SUBPAGE_CODE 0x02 - uint8_t page_length[2]; - uint8_t page_version; -#define PWR_VERSION 0x01 - uint8_t total_luns; - uint8_t max_active_luns; -#define PWR_DFLT_MAX_LUNS 0x07 - uint8_t reserved[25]; -}; - -/* - * XXX KDM move this off to a vendor shim. - */ -struct copan_aps_subpage { - uint8_t page_code; -#define APS_PAGE_CODE 0x00 - uint8_t subpage; -#define APS_SUBPAGE_CODE 0x03 - uint8_t page_length[2]; - uint8_t page_version; -#define APS_VERSION 0x00 - uint8_t lock_active; -#define APS_LOCK_ACTIVE 0x01 -#define APS_LOCK_INACTIVE 0x00 - uint8_t reserved[26]; -}; - -/* - * XXX KDM move this off to a vendor shim. - */ struct copan_debugconf_subpage { uint8_t page_code; #define DBGCNF_PAGE_CODE 0x00 From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 12:29:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89AD89D8; Tue, 14 Oct 2014 12:29:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75B9D673; Tue, 14 Oct 2014 12:29:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9ECTPKB004572; Tue, 14 Oct 2014 12:29:25 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9ECTP1W004571; Tue, 14 Oct 2014 12:29:25 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201410141229.s9ECTP1W004571@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Tue, 14 Oct 2014 12:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273081 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 12:29:25 -0000 Author: brueffer Date: Tue Oct 14 12:29:24 2014 New Revision: 273081 URL: https://svnweb.freebsd.org/changeset/base/273081 Log: New sentence -> new line; use macros where appropriate. Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Tue Oct 14 12:23:44 2014 (r273080) +++ head/share/man/man4/tcp.4 Tue Oct 14 12:29:24 2014 (r273081) @@ -516,13 +516,20 @@ ECN allows a TCP sender to reduce the tr avoid packet drops. .It Va ecn.maxretries Number of retries (SYN or SYN/ACK retransmits) before disabling ECN on a -specific connection. This is needed to help with connection establishment +specific connection. +This is needed to help with connection establishment when a broken firewall is in the network path. .It Va pmtud_blackhole_detection -Turn on automatic path MTU blackhole detection. In case of retransmits we will -lower the MSS to check if it's MTU problem. If current MSS is greater than +Turn on automatic path MTU blackhole detection. +In case of retransmits we will +lower the MSS to check if it's MTU problem. +If current MSS is greater than configured value to try, it will be set to it, otherwise, MSS will be set to -default values (net.inet.tcp.mssdflt and net.inet.tcp.v6mssdflt). +default values +.Po Va net.inet.tcp.mssdflt +and +.Va net.inet.tcp.v6mssdflt +.Pc . .It Va pmtud_blackhole_mss MSS to try for IPv4 if PMTU blackhole detection is turned on. .It Va v6pmtud_blackhole_mss From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 13:24:26 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA936D15; Tue, 14 Oct 2014 13:24:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6EB9C80; Tue, 14 Oct 2014 13:24:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EDOQJm033047; Tue, 14 Oct 2014 13:24:26 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EDOQ0Z033045; Tue, 14 Oct 2014 13:24:26 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410141324.s9EDOQ0Z033045@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 14 Oct 2014 13:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273086 - in head/sys/arm/ti: am335x omap4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 13:24:27 -0000 Author: andrew Date: Tue Oct 14 13:24:25 2014 New Revision: 273086 URL: https://svnweb.freebsd.org/changeset/base/273086 Log: Make the ti_padstate_devmap arrays ststic, they are only used with the file where they are defined. Modified: head/sys/arm/ti/am335x/am335x_scm_padconf.c head/sys/arm/ti/omap4/omap4_scm_padconf.c Modified: head/sys/arm/ti/am335x/am335x_scm_padconf.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_scm_padconf.c Tue Oct 14 13:06:13 2014 (r273085) +++ head/sys/arm/ti/am335x/am335x_scm_padconf.c Tue Oct 14 13:24:25 2014 (r273086) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); #define PADCONF_INPUT_PULLDOWN (RXACTIVE) #define PADCONF_INPUT_PULLUP_SLOW (PADCONF_INPUT_PULLUP | SLEWCTRL) -const struct ti_scm_padstate ti_padstate_devmap[] = { +const static struct ti_scm_padstate ti_padstate_devmap[] = { {"output", PADCONF_OUTPUT }, {"output_pullup", PADCONF_OUTPUT_PULLUP }, {"input", PADCONF_INPUT }, Modified: head/sys/arm/ti/omap4/omap4_scm_padconf.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_scm_padconf.c Tue Oct 14 13:06:13 2014 (r273085) +++ head/sys/arm/ti/omap4/omap4_scm_padconf.c Tue Oct 14 13:24:25 2014 (r273086) @@ -131,7 +131,7 @@ __FBSDID("$FreeBSD$"); .muxmodes[7] = m7, \ } -const struct ti_scm_padstate ti_padstate_devmap[] = { +const static struct ti_scm_padstate ti_padstate_devmap[] = { {"output", PADCONF_PIN_OUTPUT}, {"input", PADCONF_PIN_INPUT}, {"input_pullup", PADCONF_PIN_INPUT_PULLUP}, From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 13:31:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47359F06; Tue, 14 Oct 2014 13:31:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32C02D75; Tue, 14 Oct 2014 13:31:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EDVmHB037466; Tue, 14 Oct 2014 13:31:48 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EDVlXw037463; Tue, 14 Oct 2014 13:31:47 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410141331.s9EDVlXw037463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 14 Oct 2014 13:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273087 - in head: share/man/man4 sys/net sys/netinet sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 13:31:48 -0000 Author: ae Date: Tue Oct 14 13:31:47 2014 New Revision: 273087 URL: https://svnweb.freebsd.org/changeset/base/273087 Log: Overhaul if_gif(4): o convert to if_transmit; o use rmlock to protect access to gif_softc; o use sx lock to protect from concurrent ioctls; o remove a lot of unneeded and duplicated code; o remove cached route support (it won't work with concurrent io); o style fixes. Reviewed by: melifaro Obtained from: Yandex LLC MFC after: 1 month Sponsored by: Yandex LLC Modified: head/share/man/man4/gif.4 head/sys/net/if_gif.c head/sys/net/if_gif.h head/sys/netinet/in_gif.c head/sys/netinet/in_gif.h head/sys/netinet6/in6_gif.c head/sys/netinet6/in6_gif.h Modified: head/share/man/man4/gif.4 ============================================================================== --- head/share/man/man4/gif.4 Tue Oct 14 13:24:25 2014 (r273086) +++ head/share/man/man4/gif.4 Tue Oct 14 13:31:47 2014 (r273087) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 1, 2011 +.Dd October 14, 2014 .Dt GIF 4 .Os .Sh NAME @@ -160,16 +160,6 @@ routed network. It can be turned off by .Dv IFF_LINK2 bit. -.Ss Route caching -Processing each packet requires two route lookups: first on the -packet itself, and second on the tunnel destination. -This second route can be cached, increasing tunnel performance. -However, in a dynamically routed network, the tunnel will stick -to the cached route, ignoring routing table updates. -Route caching can be enabled with the -.Dv IFF_LINK0 -flag. -.\" .Ss Miscellaneous By default, .Nm Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Tue Oct 14 13:24:25 2014 (r273086) +++ head/sys/net/if_gif.c Tue Oct 14 13:31:47 2014 (r273087) @@ -1,6 +1,3 @@ -/* $FreeBSD$ */ -/* $KAME: if_gif.c,v 1.87 2001/10/19 08:50:27 itojun Exp $ */ - /*- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. @@ -28,8 +25,13 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $KAME: if_gif.c,v 1.87 2001/10/19 08:50:27 itojun Exp $ */ +#include +__FBSDID("$FreeBSD$"); + #include "opt_inet.h" #include "opt_inet6.h" @@ -37,11 +39,14 @@ #include #include #include +#include #include #include #include +#include #include #include +#include #include #include #include @@ -64,6 +69,7 @@ #include #include #include +#include #ifdef INET #include #include @@ -76,6 +82,7 @@ #endif #include #include +#include #include #include #include @@ -99,6 +106,8 @@ static VNET_DEFINE(struct mtx, gif_mtx); static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); #define V_gif_softc_list VNET(gif_softc_list) +static struct sx gif_ioctl_sx; +SX_SYSINIT(gif_ioctl_sx, &gif_ioctl_sx, "gif_ioctl"); #define GIF_LIST_LOCK_INIT(x) mtx_init(&V_gif_mtx, "gif_mtx", \ NULL, MTX_DEF) @@ -111,7 +120,12 @@ void (*ng_gif_input_orphan_p)(struct ifn void (*ng_gif_attach_p)(struct ifnet *ifp); void (*ng_gif_detach_p)(struct ifnet *ifp); -static void gif_start(struct ifnet *); +static int gif_set_tunnel(struct ifnet *, struct sockaddr *, + struct sockaddr *); +static void gif_delete_tunnel(struct ifnet *); +static int gif_ioctl(struct ifnet *, u_long, caddr_t); +static int gif_transmit(struct ifnet *, struct mbuf *); +static void gif_qflush(struct ifnet *); static int gif_clone_create(struct if_clone *, int, caddr_t); static void gif_clone_destroy(struct ifnet *); static VNET_DEFINE(struct if_clone *, gif_cloner); @@ -168,19 +182,10 @@ gif_clone_create(struct if_clone *ifc, i sc = malloc(sizeof(struct gif_softc), M_GIF, M_WAITOK | M_ZERO); sc->gif_fibnum = curthread->td_proc->p_fibnum; GIF2IFP(sc) = if_alloc(IFT_GIF); - if (GIF2IFP(sc) == NULL) { - free(sc, M_GIF); - return (ENOSPC); - } - GIF_LOCK_INIT(sc); - GIF2IFP(sc)->if_softc = sc; if_initname(GIF2IFP(sc), gifname, unit); - sc->encap_cookie4 = sc->encap_cookie6 = NULL; - sc->gif_options = 0; - GIF2IFP(sc)->if_addrlen = 0; GIF2IFP(sc)->if_mtu = GIF_MTU; GIF2IFP(sc)->if_flags = IFF_POINTOPOINT | IFF_MULTICAST; @@ -189,9 +194,9 @@ gif_clone_create(struct if_clone *ifc, i GIF2IFP(sc)->if_flags |= IFF_LINK2; #endif GIF2IFP(sc)->if_ioctl = gif_ioctl; - GIF2IFP(sc)->if_start = gif_start; + GIF2IFP(sc)->if_transmit = gif_transmit; + GIF2IFP(sc)->if_qflush = gif_qflush; GIF2IFP(sc)->if_output = gif_output; - GIF2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; if_attach(GIF2IFP(sc)); bpfattach(GIF2IFP(sc), DLT_NULL, sizeof(u_int32_t)); if (ng_gif_attach_p != NULL) @@ -200,44 +205,29 @@ gif_clone_create(struct if_clone *ifc, i GIF_LIST_LOCK(); LIST_INSERT_HEAD(&V_gif_softc_list, sc, gif_list); GIF_LIST_UNLOCK(); - return (0); } static void gif_clone_destroy(struct ifnet *ifp) { -#if defined(INET) || defined(INET6) - int err; -#endif - struct gif_softc *sc = ifp->if_softc; + struct gif_softc *sc; + sx_xlock(&gif_ioctl_sx); + sc = ifp->if_softc; + gif_delete_tunnel(ifp); GIF_LIST_LOCK(); LIST_REMOVE(sc, gif_list); GIF_LIST_UNLOCK(); - - gif_delete_tunnel(ifp); -#ifdef INET6 - if (sc->encap_cookie6 != NULL) { - err = encap_detach(sc->encap_cookie6); - KASSERT(err == 0, ("Unexpected error detaching encap_cookie6")); - } -#endif -#ifdef INET - if (sc->encap_cookie4 != NULL) { - err = encap_detach(sc->encap_cookie4); - KASSERT(err == 0, ("Unexpected error detaching encap_cookie4")); - } -#endif - if (ng_gif_detach_p != NULL) (*ng_gif_detach_p)(ifp); bpfdetach(ifp); if_detach(ifp); - if_free(ifp); + ifp->if_softc = NULL; + sx_xunlock(&gif_ioctl_sx); + if_free(ifp); GIF_LOCK_DESTROY(sc); - free(sc, M_GIF); } @@ -289,162 +279,193 @@ MODULE_VERSION(if_gif, 1); int gif_encapcheck(const struct mbuf *m, int off, int proto, void *arg) { - struct ip ip; + GIF_RLOCK_TRACKER; struct gif_softc *sc; + int ret; + uint8_t ver; sc = (struct gif_softc *)arg; - if (sc == NULL) - return 0; + if (sc == NULL || (GIF2IFP(sc)->if_flags & IFF_UP) == 0) + return (0); - if ((GIF2IFP(sc)->if_flags & IFF_UP) == 0) - return 0; + ret = 0; + GIF_RLOCK(sc); /* no physical address */ - if (!sc->gif_psrc || !sc->gif_pdst) - return 0; + if (sc->gif_family == 0) + goto done; switch (proto) { #ifdef INET case IPPROTO_IPV4: - break; #endif #ifdef INET6 case IPPROTO_IPV6: - break; #endif case IPPROTO_ETHERIP: break; - default: - return 0; + goto done; } /* Bail on short packets */ - if (m->m_pkthdr.len < sizeof(ip)) - return 0; - - m_copydata(m, 0, sizeof(ip), (caddr_t)&ip); + if (m->m_pkthdr.len < sizeof(struct ip)) + goto done; - switch (ip.ip_v) { + m_copydata(m, 0, 1, &ver); + switch (ver >> 4) { #ifdef INET case 4: - if (sc->gif_psrc->sa_family != AF_INET || - sc->gif_pdst->sa_family != AF_INET) - return 0; - return gif_encapcheck4(m, off, proto, arg); + if (sc->gif_family != AF_INET) + goto done; + ret = in_gif_encapcheck(m, off, proto, arg); + break; #endif #ifdef INET6 case 6: if (m->m_pkthdr.len < sizeof(struct ip6_hdr)) - return 0; - if (sc->gif_psrc->sa_family != AF_INET6 || - sc->gif_pdst->sa_family != AF_INET6) - return 0; - return gif_encapcheck6(m, off, proto, arg); + goto done; + if (sc->gif_family != AF_INET6) + goto done; + ret = in6_gif_encapcheck(m, off, proto, arg); + break; #endif - default: - return 0; } +done: + GIF_RUNLOCK(sc); + return (ret); } + +static int +gif_transmit(struct ifnet *ifp, struct mbuf *m) +{ + struct gif_softc *sc; + struct etherip_header *eth; #ifdef INET -#define GIF_HDR_LEN (ETHER_HDR_LEN + sizeof (struct ip)) + struct ip *ip; #endif #ifdef INET6 -#define GIF_HDR_LEN6 (ETHER_HDR_LEN + sizeof (struct ip6_hdr)) + struct ip6_hdr *ip6; + uint32_t t; #endif - -static void -gif_start(struct ifnet *ifp) -{ - struct gif_softc *sc; - struct mbuf *m; uint32_t af; - int error = 0; + uint8_t proto, ecn; + int error; + error = ENETDOWN; sc = ifp->if_softc; - GIF_LOCK(sc); - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); - if (m == 0) - break; - -#ifdef ALTQ - /* Take out those altq bytes we add in gif_output */ + if (sc->gif_family == 0) { + m_freem(m); + goto err; + } + /* Now pull back the af that we stashed in the csum_data. */ + af = m->m_pkthdr.csum_data; + BPF_MTAP2(ifp, &af, sizeof(af), m); + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); + M_SETFIB(m, sc->gif_fibnum); + /* inner AF-specific encapsulation */ + ecn = 0; + switch (af) { #ifdef INET - if (sc->gif_psrc->sa_family == AF_INET) - m->m_pkthdr.len -= GIF_HDR_LEN; + case AF_INET: + proto = IPPROTO_IPV4; + if (m->m_len < sizeof(struct ip)) + m = m_pullup(m, sizeof(struct ip)); + if (m == NULL) { + error = ENOBUFS; + goto err; + } + ip = mtod(m, struct ip *); + ip_ecn_ingress((ifp->if_flags & IFF_LINK1) ? ECN_ALLOWED: + ECN_NOCARE, &ecn, &ip->ip_tos); + break; #endif #ifdef INET6 - if (sc->gif_psrc->sa_family == AF_INET6) - m->m_pkthdr.len -= GIF_HDR_LEN6; -#endif + case AF_INET6: + proto = IPPROTO_IPV6; + if (m->m_len < sizeof(struct ip6_hdr)) + m = m_pullup(m, sizeof(struct ip6_hdr)); + if (m == NULL) { + error = ENOBUFS; + goto err; + } + t = 0; + ip6 = mtod(m, struct ip6_hdr *); + ip6_ecn_ingress((ifp->if_flags & IFF_LINK1) ? ECN_ALLOWED: + ECN_NOCARE, &t, &ip6->ip6_flow); + ecn = (ntohl(t) >> 20) & 0xff; + break; #endif - /* - * Now pull back the af that we - * stashed in the csum_data. - */ - af = m->m_pkthdr.csum_data; - - /* override to IPPROTO_ETHERIP for bridged traffic */ - if (ifp->if_bridge) - af = AF_LINK; - - BPF_MTAP2(ifp, &af, sizeof(af), m); - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - -/* Done by IFQ_HANDOFF */ -/* if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len);*/ - - M_SETFIB(m, sc->gif_fibnum); - /* inner AF-specific encapsulation */ - /* XXX should we check if our outer source is legal? */ - /* dispatch to output logic based on outer AF */ - switch (sc->gif_psrc->sa_family) { + case AF_LINK: + proto = IPPROTO_ETHERIP; + M_PREPEND(m, sizeof(struct etherip_header), M_NOWAIT); + if (m != NULL && m->m_len < sizeof(struct etherip_header)) + m = m_pullup(m, sizeof(struct etherip_header)); + if (m == NULL) { + error = ENOBUFS; + goto err; + } + eth = mtod(m, struct etherip_header *); + eth->eip_resvh = 0; + if ((sc->gif_options & GIF_SEND_REVETHIP) != 0) { + eth->eip_ver = 0; + eth->eip_resvl = ETHERIP_VERSION; + } else { + eth->eip_ver = ETHERIP_VERSION; + eth->eip_resvl = 0; + } + break; + default: + error = EAFNOSUPPORT; + m_freem(m); + goto err; + } + /* XXX should we check if our outer source is legal? */ + /* dispatch to output logic based on outer AF */ + switch (sc->gif_family) { #ifdef INET - case AF_INET: - error = in_gif_output(ifp, af, m); - break; + case AF_INET: + error = in_gif_output(ifp, m, proto, ecn); + break; #endif #ifdef INET6 - case AF_INET6: - error = in6_gif_output(ifp, af, m); - break; + case AF_INET6: + error = in6_gif_output(ifp, m, proto, ecn); + break; #endif - default: - m_freem(m); - error = ENETDOWN; - } - if (error) - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - + default: + m_freem(m); } - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - GIF_UNLOCK(sc); - return; +err: + if (error) + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (error); +} + +static void +gif_qflush(struct ifnet *ifp __unused) +{ + } int gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro) { - struct gif_softc *sc = ifp->if_softc; struct m_tag *mtag; - int error = 0; - int gif_called; uint32_t af; + int gif_called; + int error = 0; #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); - if (error) { - m_freem(m); - goto end; - } + if (error) + goto err; #endif - if ((ifp->if_flags & IFF_MONITOR) != 0) { + if ((ifp->if_flags & IFF_MONITOR) != 0 || + (ifp->if_flags & IFF_UP) == 0) { error = ENETDOWN; - m_freem(m); - goto end; + goto err; } /* @@ -461,9 +482,8 @@ gif_output(struct ifnet *ifp, struct mbu log(LOG_NOTICE, "gif_output: loop detected on %s\n", (*(struct ifnet **)(mtag + 1))->if_xname); - m_freem(m); error = EIO; /* is there better errno? */ - goto end; + goto err; } mtag = m_tag_locate(m, MTAG_GIF, MTAG_GIF_CALLED, mtag); gif_called++; @@ -472,73 +492,54 @@ gif_output(struct ifnet *ifp, struct mbu log(LOG_NOTICE, "gif_output: recursively called too many times(%d)\n", gif_called); - m_freem(m); error = EIO; /* is there better errno? */ - goto end; + goto err; } mtag = m_tag_alloc(MTAG_GIF, MTAG_GIF_CALLED, sizeof(struct ifnet *), M_NOWAIT); if (mtag == NULL) { - m_freem(m); error = ENOMEM; - goto end; + goto err; } *(struct ifnet **)(mtag + 1) = ifp; m_tag_prepend(m, mtag); m->m_flags &= ~(M_BCAST|M_MCAST); - /* BPF writes need to be handled specially. */ if (dst->sa_family == AF_UNSPEC) bcopy(dst->sa_data, &af, sizeof(af)); else af = dst->sa_family; - /* - * Now save the af in the inbound pkt csum - * data, this is a cheat since we are using - * the inbound csum_data field to carry the - * af over to the gif_start() routine, avoiding - * using yet another mtag. - */ - m->m_pkthdr.csum_data = af; - if (!(ifp->if_flags & IFF_UP) || - sc->gif_psrc == NULL || sc->gif_pdst == NULL) { - m_freem(m); - error = ENETDOWN; - goto end; - } -#ifdef ALTQ + if (ifp->if_bridge) + af = AF_LINK; /* - * Make altq aware of the bytes we will add - * when we actually send it. + * Now save the af in the inbound pkt csum data, this is a cheat since + * we are using the inbound csum_data field to carry the af over to + * the gif_transmit() routine, avoiding using yet another mtag. */ -#ifdef INET - if (sc->gif_psrc->sa_family == AF_INET) - m->m_pkthdr.len += GIF_HDR_LEN; -#endif -#ifdef INET6 - if (sc->gif_psrc->sa_family == AF_INET6) - m->m_pkthdr.len += GIF_HDR_LEN6; -#endif -#endif - /* - * Queue message on interface, update output statistics if - * successful, and start output if interface not yet active. - */ - IFQ_HANDOFF(ifp, m, error); - end: - if (error) - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + m->m_pkthdr.csum_data = af; + return (ifp->if_transmit(ifp, m)); +err: + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + m_freem(m); return (error); } void -gif_input(struct mbuf *m, int af, struct ifnet *ifp) +gif_input(struct mbuf *m, struct ifnet *ifp, int proto, uint8_t ecn) { - int isr, n; - struct gif_softc *sc; struct etherip_header *eip; +#ifdef INET + struct ip *ip; +#endif +#ifdef INET6 + struct ip6_hdr *ip6; + uint32_t t; +#endif + struct gif_softc *sc; struct ether_header *eh; struct ifnet *oldifp; + uint32_t gif_options; + int isr, n, af; if (ifp == NULL) { /* just in case */ @@ -546,15 +547,55 @@ gif_input(struct mbuf *m, int af, struct return; } sc = ifp->if_softc; + gif_options = sc->gif_options; m->m_pkthdr.rcvif = ifp; m_clrprotoflags(m); + switch (proto) { +#ifdef INET + case IPPROTO_IPV4: + af = AF_INET; + if (m->m_len < sizeof(struct ip)) + m = m_pullup(m, sizeof(struct ip)); + if (m == NULL) + goto drop; + ip = mtod(m, struct ip *); + if (ip_ecn_egress((ifp->if_flags & IFF_LINK1) ? ECN_ALLOWED: + ECN_NOCARE, &ecn, &ip->ip_tos) == 0) { + m_freem(m); + goto drop; + } + break; +#endif +#ifdef INET6 + case IPPROTO_IPV6: + af = AF_INET6; + if (m->m_len < sizeof(struct ip6_hdr)) + m = m_pullup(m, sizeof(struct ip6_hdr)); + if (m == NULL) + goto drop; + t = htonl((uint32_t)ecn << 20); + ip6 = mtod(m, struct ip6_hdr *); + if (ip6_ecn_egress((ifp->if_flags & IFF_LINK1) ? ECN_ALLOWED: + ECN_NOCARE, &t, &ip6->ip6_flow) == 0) { + m_freem(m); + goto drop; + } + break; +#endif + case IPPROTO_ETHERIP: + af = AF_LINK; + break; + default: + m_freem(m); + goto drop; + } #ifdef MAC mac_ifnet_create_mbuf(ifp, m); #endif if (bpf_peers_present(ifp->if_bpf)) { - u_int32_t af1 = af; + uint32_t af1 = af; bpf_mtap2(ifp->if_bpf, &af1, sizeof(af1), m); } @@ -568,7 +609,7 @@ gif_input(struct mbuf *m, int af, struct if (ng_gif_input_p != NULL) { (*ng_gif_input_p)(ifp, &m, af); if (m == NULL) - return; + goto drop; } /* @@ -595,33 +636,23 @@ gif_input(struct mbuf *m, int af, struct #endif case AF_LINK: n = sizeof(struct etherip_header) + sizeof(struct ether_header); - if (n > m->m_len) { + if (n > m->m_len) m = m_pullup(m, n); - if (m == NULL) { - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - return; - } - } - + if (m == NULL) + goto drop; eip = mtod(m, struct etherip_header *); - /* + /* * GIF_ACCEPT_REVETHIP (enabled by default) intentionally * accepts an EtherIP packet with revered version field in * the header. This is a knob for backward compatibility * with FreeBSD 7.2R or prior. */ - if (sc->gif_options & GIF_ACCEPT_REVETHIP) { - if (eip->eip_resvl != ETHERIP_VERSION - && eip->eip_ver != ETHERIP_VERSION) { + if (eip->eip_ver != ETHERIP_VERSION) { + if ((gif_options & GIF_ACCEPT_REVETHIP) == 0 || + eip->eip_resvl != ETHERIP_VERSION) { /* discard unknown versions */ m_freem(m); - return; - } - } else { - if (eip->eip_ver != ETHERIP_VERSION) { - /* discard unknown versions */ - m_freem(m); - return; + goto drop; } } m_adj(m, sizeof(struct etherip_header)); @@ -666,48 +697,55 @@ gif_input(struct mbuf *m, int af, struct if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); + return; +drop: + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); } /* XXX how should we handle IPv6 scope on SIOC[GS]IFPHYADDR? */ int gif_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { - struct gif_softc *sc = ifp->if_softc; - struct ifreq *ifr = (struct ifreq*)data; - int error = 0, size; - u_int options; + GIF_RLOCK_TRACKER; + struct ifreq *ifr = (struct ifreq*)data; struct sockaddr *dst, *src; -#ifdef SIOCSIFMTU /* xxx */ - u_long mtu; + struct gif_softc *sc; +#ifdef INET + struct sockaddr_in *sin = NULL; +#endif +#ifdef INET6 + struct sockaddr_in6 *sin6 = NULL; #endif + u_int options; + int error; switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - break; - case SIOCADDMULTI: case SIOCDELMULTI: - break; - -#ifdef SIOCSIFMTU /* xxx */ case SIOCGIFMTU: - break; - + case SIOCSIFFLAGS: + return (0); case SIOCSIFMTU: - mtu = ifr->ifr_mtu; - if (mtu < GIF_MTU_MIN || mtu > GIF_MTU_MAX) + if (ifr->ifr_mtu < GIF_MTU_MIN || + ifr->ifr_mtu > GIF_MTU_MAX) return (EINVAL); - ifp->if_mtu = mtu; - break; -#endif /* SIOCSIFMTU */ - -#ifdef INET + else + ifp->if_mtu = ifr->ifr_mtu; + return (0); + } + sx_xlock(&gif_ioctl_sx); + sc = ifp->if_softc; + if (sc == NULL) { + error = ENXIO; + goto bad; + } + error = 0; + switch (cmd) { case SIOCSIFPHYADDR: -#endif -#ifdef INET6 case SIOCSIFPHYADDR_IN6: -#endif /* INET6 */ + error = EINVAL; switch (cmd) { #ifdef INET case SIOCSIFPHYADDR: @@ -726,164 +764,169 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, break; #endif default: - return EINVAL; + goto bad; } - /* sa_family must be equal */ - if (src->sa_family != dst->sa_family) - return EINVAL; + if (src->sa_family != dst->sa_family || + src->sa_len != dst->sa_len) + goto bad; /* validate sa_len */ switch (src->sa_family) { #ifdef INET case AF_INET: if (src->sa_len != sizeof(struct sockaddr_in)) - return EINVAL; + goto bad; break; #endif #ifdef INET6 case AF_INET6: if (src->sa_len != sizeof(struct sockaddr_in6)) - return EINVAL; - break; -#endif - default: - return EAFNOSUPPORT; - } - switch (dst->sa_family) { -#ifdef INET - case AF_INET: - if (dst->sa_len != sizeof(struct sockaddr_in)) - return EINVAL; - break; -#endif -#ifdef INET6 - case AF_INET6: - if (dst->sa_len != sizeof(struct sockaddr_in6)) - return EINVAL; + goto bad; break; #endif default: - return EAFNOSUPPORT; + error = EAFNOSUPPORT; + goto bad; } - /* check sa_family looks sane for the cmd */ + error = EAFNOSUPPORT; switch (cmd) { +#ifdef INET case SIOCSIFPHYADDR: if (src->sa_family == AF_INET) break; - return EAFNOSUPPORT; + goto bad; +#endif #ifdef INET6 case SIOCSIFPHYADDR_IN6: if (src->sa_family == AF_INET6) break; - return EAFNOSUPPORT; -#endif /* INET6 */ + goto bad; +#endif } - - error = gif_set_tunnel(GIF2IFP(sc), src, dst); + error = EADDRNOTAVAIL; + switch (src->sa_family) { +#ifdef INET + case AF_INET: + if (satosin(src)->sin_addr.s_addr == INADDR_ANY || + satosin(dst)->sin_addr.s_addr == INADDR_ANY) + goto bad; + break; +#endif +#ifdef INET6 + case AF_INET6: + if (IN6_IS_ADDR_UNSPECIFIED(&satosin6(src)->sin6_addr) + || + IN6_IS_ADDR_UNSPECIFIED(&satosin6(dst)->sin6_addr)) + goto bad; + /* + * Check validity of the scope zone ID of the + * addresses, and convert it into the kernel + * internal form if necessary. + */ + error = sa6_embedscope(satosin6(src), 0); + if (error != 0) + goto bad; + error = sa6_embedscope(satosin6(dst), 0); + if (error != 0) + goto bad; +#endif + }; + error = gif_set_tunnel(ifp, src, dst); break; - -#ifdef SIOCDIFPHYADDR case SIOCDIFPHYADDR: - gif_delete_tunnel(GIF2IFP(sc)); + gif_delete_tunnel(ifp); break; -#endif - case SIOCGIFPSRCADDR: -#ifdef INET6 + case SIOCGIFPDSTADDR: case SIOCGIFPSRCADDR_IN6: -#endif /* INET6 */ - if (sc->gif_psrc == NULL) { + case SIOCGIFPDSTADDR_IN6: + if (sc->gif_family == 0) { error = EADDRNOTAVAIL; - goto bad; + break; } - src = sc->gif_psrc; + GIF_RLOCK(sc); switch (cmd) { #ifdef INET case SIOCGIFPSRCADDR: - dst = &ifr->ifr_addr; - size = sizeof(ifr->ifr_addr); + case SIOCGIFPDSTADDR: + if (sc->gif_family != AF_INET) { + error = EADDRNOTAVAIL; + break; + } + sin = (struct sockaddr_in *)&ifr->ifr_addr; + memset(sin, 0, sizeof(*sin)); + sin->sin_family = AF_INET; + sin->sin_len = sizeof(*sin); break; -#endif /* INET */ +#endif #ifdef INET6 case SIOCGIFPSRCADDR_IN6: - dst = (struct sockaddr *) + case SIOCGIFPDSTADDR_IN6: + if (sc->gif_family != AF_INET6) { + error = EADDRNOTAVAIL; + break; + } + sin6 = (struct sockaddr_in6 *) &(((struct in6_ifreq *)data)->ifr_addr); - size = sizeof(((struct in6_ifreq *)data)->ifr_addr); + memset(sin6, 0, sizeof(*sin6)); + sin6->sin6_family = AF_INET6; + sin6->sin6_len = sizeof(*sin6); break; -#endif /* INET6 */ +#endif default: - error = EADDRNOTAVAIL; - goto bad; - } - if (src->sa_len > size) - return EINVAL; - bcopy((caddr_t)src, (caddr_t)dst, src->sa_len); -#ifdef INET6 - if (dst->sa_family == AF_INET6) { - error = sa6_recoverscope((struct sockaddr_in6 *)dst); - if (error != 0) - return (error); + error = EAFNOSUPPORT; } + if (error == 0) { + switch (cmd) { +#ifdef INET + case SIOCGIFPSRCADDR: + sin->sin_addr = sc->gif_iphdr->ip_src; + break; + case SIOCGIFPDSTADDR: + sin->sin_addr = sc->gif_iphdr->ip_dst; + break; #endif - break; - - case SIOCGIFPDSTADDR: #ifdef INET6 - case SIOCGIFPDSTADDR_IN6: -#endif /* INET6 */ - if (sc->gif_pdst == NULL) { - error = EADDRNOTAVAIL; - goto bad; + case SIOCGIFPSRCADDR_IN6: + sin6->sin6_addr = sc->gif_ip6hdr->ip6_src; + break; + case SIOCGIFPDSTADDR_IN6: + sin6->sin6_addr = sc->gif_ip6hdr->ip6_dst; + break; +#endif + } } - src = sc->gif_pdst; + GIF_RUNLOCK(sc); + if (error != 0) + break; switch (cmd) { #ifdef INET + case SIOCGIFPSRCADDR: case SIOCGIFPDSTADDR: - dst = &ifr->ifr_addr; - size = sizeof(ifr->ifr_addr); + error = prison_if(curthread->td_ucred, + (struct sockaddr *)sin); + if (error != 0) + memset(sin, 0, sizeof(*sin)); break; -#endif /* INET */ +#endif #ifdef INET6 + case SIOCGIFPSRCADDR_IN6: case SIOCGIFPDSTADDR_IN6: - dst = (struct sockaddr *) - &(((struct in6_ifreq *)data)->ifr_addr); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 14:27:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 296ADE4C; Tue, 14 Oct 2014 14:27:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 149033CF; Tue, 14 Oct 2014 14:27:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EERrOp062229; Tue, 14 Oct 2014 14:27:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EERqQ5062216; Tue, 14 Oct 2014 14:27:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410141427.s9EERqQ5062216@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 14 Oct 2014 14:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273088 - head/lib/libc/arm/aeabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 14:27:54 -0000 Author: andrew Date: Tue Oct 14 14:27:51 2014 New Revision: 273088 URL: https://svnweb.freebsd.org/changeset/base/273088 Log: Add support for the __aeabi_c*cmp* functions. These are similar to the existing functions with the exception they use the condition flags to store the result. Differential Revision: https://reviews.freebsd.org/D872 Silence from: current@ and numerics@ MFC after: 1 week Added: head/lib/libc/arm/aeabi/aeabi_asm_double.S (contents, props changed) head/lib/libc/arm/aeabi/aeabi_asm_float.S (contents, props changed) Modified: head/lib/libc/arm/aeabi/Makefile.inc head/lib/libc/arm/aeabi/Symbol.map head/lib/libc/arm/aeabi/aeabi_double.c head/lib/libc/arm/aeabi/aeabi_float.c head/lib/libc/arm/aeabi/aeabi_vfp_double.S head/lib/libc/arm/aeabi/aeabi_vfp_float.S Modified: head/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- head/lib/libc/arm/aeabi/Makefile.inc Tue Oct 14 13:31:47 2014 (r273087) +++ head/lib/libc/arm/aeabi/Makefile.inc Tue Oct 14 14:27:51 2014 (r273088) @@ -6,7 +6,9 @@ SRCS+= aeabi_atexit.c \ aeabi_unwind_cpp.c \ aeabi_unwind_exidx.c .if ${MACHINE_ARCH:Marm*hf*} == "" -SRCS+= aeabi_double.c \ +SRCS+= aeabi_asm_double.S \ + aeabi_asm_float.S \ + aeabi_double.c \ aeabi_float.c .endif .if ${MACHINE_ARCH:Marmv6*} Modified: head/lib/libc/arm/aeabi/Symbol.map ============================================================================== --- head/lib/libc/arm/aeabi/Symbol.map Tue Oct 14 13:31:47 2014 (r273087) +++ head/lib/libc/arm/aeabi/Symbol.map Tue Oct 14 14:27:51 2014 (r273088) @@ -17,6 +17,10 @@ FBSDprivate_1.0 { __aeabi_dcmpgt; __aeabi_dcmpun; + __aeabi_cdcmpeq; + __aeabi_cdcmple; + __aeabi_cdrcmple; + __aeabi_d2iz; __aeabi_d2f; @@ -33,6 +37,10 @@ FBSDprivate_1.0 { __aeabi_fcmpgt; __aeabi_fcmpun; + __aeabi_cfcmpeq; + __aeabi_cfcmple; + __aeabi_cfrcmple; + __aeabi_f2iz; __aeabi_f2d; Added: head/lib/libc/arm/aeabi/aeabi_asm_double.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/aeabi/aeabi_asm_double.S Tue Oct 14 14:27:51 2014 (r273088) @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2014 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#define PCR_Z (1 << 30) +#define PCR_C (1 << 29) + +/* + * These functions return the result in the CPSR register. + * + * For __aeabi_cdcmple: + * Z C + * LT 0 0 + * EQ 1 1 + * else 0 1 + * + * __aeabi_cdrcmple is the same as __aeabi_cdcmple, however the arguments + * have been swapped. + */ +ENTRY(__aeabi_cdcmple) + push {r4, r5, r6, r7, ip, lr} + + /* Backup the input registers */ + mov r4, r0 + mov r5, r1 + mov r6, r2 + mov r7, r3 + /* Is it less than? */ + bl __aeabi_dcmplt + cmp r0, #1 + bne 1f + /* Yes, clear Z and C */ + msr cpsr_c, #(0) + b 99f + +1: + /* Restore the input regsters for the next function call */ + mov r0, r4 + mov r1, r5 + mov r2, r6 + mov r3, r7 + /* Is it equal? */ + bl __aeabi_dcmpeq + cmp r0, #1 + bne 2f + /* Yes, set Z and C */ + msr cpsr_c, #(PCR_Z | PCR_C) + b 99f + +2: + /* Not less than or equal, set C and clear Z */ + msr cpsr_c, #(PCR_C) + +99: + pop {r4, r5, r6, r7, ip, pc} +END(__aeabi_cdcmple) + +ENTRY(__aeabi_cdrcmple) + /* Swap the first half of the arguments */ + mov ip, r0 + mov r0, r2 + mov r2, ip + + /* And the second half */ + mov ip, r1 + mov r1, r3 + mov r3, ip + + b __aeabi_cdcmple +END(__aeabi_cdrcmple) + +/* + * This is just like __aeabi_cdcmple except it will not throw an exception + * in the presence of a quiet NaN. If either argument is a signalling NaN we + * will still signal. + */ +ENTRY(__aeabi_cdcmpeq) + /* Check if we can call __aeabi_cfcmple safely */ + push {r0, r1, r2, r3, r4, lr} + bl __aeabi_cdcmpeq_helper + cmp r0, #1 + pop {r0, r1, r2, r3, r4, lr} + beq 1f + + bl __aeabi_cdcmple + RET + +1: + msr cpsr_c, #(PCR_C) + RET +END(__aeabi_cdcmpeq) Added: head/lib/libc/arm/aeabi/aeabi_asm_float.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/aeabi/aeabi_asm_float.S Tue Oct 14 14:27:51 2014 (r273088) @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2014 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#define PCR_Z (1 << 30) +#define PCR_C (1 << 29) + +/* + * These functions return the result in the CPSR register. + * + * For __aeabi_cfcmple: + * Z C + * LT 0 0 + * EQ 1 1 + * else 0 1 + * + * __aeabi_cfrcmple is the same as __aeabi_cfcmple, however the arguments + * have been swapped. + */ +ENTRY(__aeabi_cfcmple) + push {r4, r5, ip, lr} + + /* Backup the input registers */ + mov r4, r0 + mov r5, r1 + /* Is it less than? */ + bl __aeabi_fcmplt + cmp r0, #1 + bne 1f + /* Yes, clear Z and C */ + msr cpsr_c, #(0) + b 99f + +1: + /* Restore the input regsters for the next function call */ + mov r0, r4 + mov r1, r5 + /* Is it equal? */ + bl __aeabi_fcmpeq + cmp r0, #1 + bne 2f + /* Yes, set Z and C */ + msr cpsr_c, #(PCR_Z | PCR_C) + b 99f + +2: + /* Not less than or equal, set C and clear Z */ + msr cpsr_c, #(PCR_C) + +99: + pop {r4, r5, ip, pc} +END(__aeabi_cfcmple) + +ENTRY(__aeabi_cfrcmple) + /* Swap the arguments */ + mov ip, r0 + mov r0, r1 + mov r1, ip + + b __aeabi_cfcmple +END(__aeabi_cfrcmple) + +/* + * This is just like __aeabi_cfcmple except it will not throw an exception + * in the presence of a quiet NaN. If either argument is a signalling NaN we + * will still signal. + */ +ENTRY(__aeabi_cfcmpeq) + /* Check if we can call __aeabi_cfcmple safely */ + push {r0, r1, r2, lr} + bl __aeabi_cfcmpeq_helper + cmp r0, #1 + pop {r0, r1, r2, lr} + beq 1f + + bl __aeabi_cfcmple + RET + +1: + msreq cpsr_c, #(PCR_C) + RET +END(__aeabi_cfcmpeq) Modified: head/lib/libc/arm/aeabi/aeabi_double.c ============================================================================== --- head/lib/libc/arm/aeabi/aeabi_double.c Tue Oct 14 13:31:47 2014 (r273087) +++ head/lib/libc/arm/aeabi/aeabi_double.c Tue Oct 14 14:27:51 2014 (r273088) @@ -74,3 +74,28 @@ float64 AEABI_FUNC2(ddiv, float64, float float64 AEABI_FUNC2(dmul, float64, float64_mul) float64 AEABI_FUNC2(dsub, float64, float64_sub) +int +__aeabi_cdcmpeq_helper(float64 a, float64 b) +{ + int quiet = 0; + + /* Check if a is a NaN */ + if ((a << 1) > 0xffe0000000000000ull) { + /* If it's a signalling NaN we will always signal */ + if ((a & 0x0008000000000000ull) == 0) + return (0); + + quiet = 1; + } + + /* Check if b is a NaN */ + if ((b << 1) > 0xffe0000000000000ull) { + /* If it's a signalling NaN we will always signal */ + if ((b & 0x0008000000000000ull) == 0) + return (0); + + quiet = 1; + } + + return (quiet); +} Modified: head/lib/libc/arm/aeabi/aeabi_float.c ============================================================================== --- head/lib/libc/arm/aeabi/aeabi_float.c Tue Oct 14 13:31:47 2014 (r273087) +++ head/lib/libc/arm/aeabi/aeabi_float.c Tue Oct 14 14:27:51 2014 (r273088) @@ -74,3 +74,28 @@ float32 AEABI_FUNC2(fdiv, float32, float float32 AEABI_FUNC2(fmul, float32, float32_mul) float32 AEABI_FUNC2(fsub, float32, float32_sub) +int +__aeabi_cfcmpeq_helper(float32 a, float32 b) +{ + int quiet = 0; + + /* Check if a is a NaN */ + if ((a << 1) > 0xff000000u) { + /* If it's a signalling NaN we will always signal */ + if ((a & 0x00400000u) == 0) + return (0); + + quiet = 1; + } + + /* Check if b is a NaN */ + if ((b << 1) > 0xff000000u) { + /* If it's a signalling NaN we will always signal */ + if ((b & 0x00400000u) == 0) + return (0); + + quiet = 1; + } + + return (quiet); +} Modified: head/lib/libc/arm/aeabi/aeabi_vfp_double.S ============================================================================== --- head/lib/libc/arm/aeabi/aeabi_vfp_double.S Tue Oct 14 13:31:47 2014 (r273087) +++ head/lib/libc/arm/aeabi/aeabi_vfp_double.S Tue Oct 14 14:27:51 2014 (r273088) @@ -33,6 +33,33 @@ __FBSDID("$FreeBSD$"); .fpu vfp .syntax unified +/* void __aeabi_cdcmpeq(double, double) */ +AEABI_ENTRY(cdcmpeq) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vcmp.f64 d0, d1 + vmrs APSR_nzcv, fpscr + RET +AEABI_END(cdcmpeq) + +/* void __aeabi_cdcmple(double, double) */ +AEABI_ENTRY(cdcmple) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vcmpe.f64 d0, d1 + vmrs APSR_nzcv, fpscr + RET +AEABI_END(cdcmple) + +/* void __aeabi_cdrcmple(double, double) */ +AEABI_ENTRY(cdrcmple) + LOAD_DREG(d0, r0, r1) + LOAD_DREG(d1, r2, r3) + vcmpe.f64 d1, d0 + vmrs APSR_nzcv, fpscr + RET +AEABI_END(cdrcmple) + /* int __aeabi_dcmpeq(double, double) */ AEABI_ENTRY(dcmpeq) LOAD_DREG(d0, r0, r1) Modified: head/lib/libc/arm/aeabi/aeabi_vfp_float.S ============================================================================== --- head/lib/libc/arm/aeabi/aeabi_vfp_float.S Tue Oct 14 13:31:47 2014 (r273087) +++ head/lib/libc/arm/aeabi/aeabi_vfp_float.S Tue Oct 14 14:27:51 2014 (r273088) @@ -33,6 +33,30 @@ __FBSDID("$FreeBSD$"); .fpu vfp .syntax unified +/* void __aeabi_cfcmpeq(float, float) */ +AEABI_ENTRY(cfcmpeq) + LOAD_SREGS(s0, s1, r0, r1) + vcmp.f32 s0, s1 + vmrs APSR_nzcv, fpscr + RET +AEABI_END(cfcmpeq) + +/* void __aeabi_cfcmple(float, float) */ +AEABI_ENTRY(cfcmple) + LOAD_SREGS(s0, s1, r0, r1) + vcmpe.f32 s0, s1 + vmrs APSR_nzcv, fpscr + RET +AEABI_END(cfcmple) + +/* void __aeabi_cfrcmple(float, float) */ +AEABI_ENTRY(cfrcmple) + LOAD_SREGS(s0, s1, r0, r1) + vcmpe.f32 s1, s0 + vmrs APSR_nzcv, fpscr + RET +AEABI_END(cfrcmple) + /* int __aeabi_fcmpeq(float, float) */ AEABI_ENTRY(fcmpeq) LOAD_SREGS(s0, s1, r0, r1) From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 14:32:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C75D111; Tue, 14 Oct 2014 14:32:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38B0567E; Tue, 14 Oct 2014 14:32:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EEWxrS066351; Tue, 14 Oct 2014 14:32:59 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EEWx8k066350; Tue, 14 Oct 2014 14:32:59 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410141432.s9EEWx8k066350@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 14 Oct 2014 14:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273089 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 14:32:59 -0000 Author: andrew Date: Tue Oct 14 14:32:58 2014 New Revision: 273089 URL: https://svnweb.freebsd.org/changeset/base/273089 Log: Uncomment general options from the Pandaboard config. These are in other configs and there is no reason for them not to be here. Modified: head/sys/arm/conf/PANDABOARD Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Tue Oct 14 14:27:51 2014 (r273088) +++ head/sys/arm/conf/PANDABOARD Tue Oct 14 14:32:58 2014 (r273089) @@ -35,7 +35,7 @@ makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking -#options INET6 # IPv6 communications protocols +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 @@ -44,8 +44,8 @@ options GEOM_PART_BSD # BSD partition options GEOM_PART_MBR # MBR partition scheme options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem -#options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +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 From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 14:41:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94C59319; Tue, 14 Oct 2014 14:41:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 808EB6D5; Tue, 14 Oct 2014 14:41:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EEf7Hb070817; Tue, 14 Oct 2014 14:41:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EEf7sL070816; Tue, 14 Oct 2014 14:41:07 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410141441.s9EEf7sL070816@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 14 Oct 2014 14:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273090 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 14:41:07 -0000 Author: ae Date: Tue Oct 14 14:41:06 2014 New Revision: 273090 URL: https://svnweb.freebsd.org/changeset/base/273090 Log: Move memset under ifdef INET6. MFH: 1 month Reported by: bz Modified: head/sys/net/if_gif.c Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Tue Oct 14 14:32:58 2014 (r273089) +++ head/sys/net/if_gif.c Tue Oct 14 14:41:06 2014 (r273090) @@ -918,9 +918,9 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, (struct sockaddr *)sin6); if (error == 0) error = sa6_recoverscope(sin6); -#endif if (error != 0) memset(sin6, 0, sizeof(*sin6)); +#endif } break; case GIFGOPTS: From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 14:51:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 865AA5F0; Tue, 14 Oct 2014 14:51:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7343D8B1; Tue, 14 Oct 2014 14:51:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EEpS3E075152; Tue, 14 Oct 2014 14:51:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EEpSWn075151; Tue, 14 Oct 2014 14:51:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410141451.s9EEpSWn075151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 14 Oct 2014 14:51:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273091 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 14:51:28 -0000 Author: ae Date: Tue Oct 14 14:51:27 2014 New Revision: 273091 URL: https://svnweb.freebsd.org/changeset/base/273091 Log: Add more ifdefs. SIOC*_IN6 are defined only with INET6. MFC after: 1 month Reported by: bz Modified: head/sys/net/if_gif.c Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Tue Oct 14 14:41:06 2014 (r273090) +++ head/sys/net/if_gif.c Tue Oct 14 14:51:27 2014 (r273091) @@ -744,7 +744,9 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, error = 0; switch (cmd) { case SIOCSIFPHYADDR: +#ifdef INET6 case SIOCSIFPHYADDR_IN6: +#endif error = EINVAL; switch (cmd) { #ifdef INET @@ -840,8 +842,10 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, break; case SIOCGIFPSRCADDR: case SIOCGIFPDSTADDR: +#ifdef INET6 case SIOCGIFPSRCADDR_IN6: case SIOCGIFPDSTADDR_IN6: +#endif if (sc->gif_family == 0) { error = EADDRNOTAVAIL; break; @@ -1057,7 +1061,9 @@ gif_set_tunnel(struct ifnet *ifp, struct sc->gif_family = src->sa_family; sc->gif_hdr = hdr; GIF_WUNLOCK(sc); +#if defined(INET) || defined(INET6) bad: +#endif if (error == 0 && sc->gif_family != 0) ifp->if_drv_flags |= IFF_DRV_RUNNING; else From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 14:52:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1123E73F; Tue, 14 Oct 2014 14:52:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F26048C4; Tue, 14 Oct 2014 14:52:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EEqdEU075808; Tue, 14 Oct 2014 14:52:39 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EEqdVH075807; Tue, 14 Oct 2014 14:52:39 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410141452.s9EEqdVH075807@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 14 Oct 2014 14:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273092 - head/sys/modules/if_gif X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 14:52:40 -0000 Author: ae Date: Tue Oct 14 14:52:39 2014 New Revision: 273092 URL: https://svnweb.freebsd.org/changeset/base/273092 Log: opt_mrouting.h isn't needed anymore. MFC after: 1 month Modified: head/sys/modules/if_gif/Makefile Modified: head/sys/modules/if_gif/Makefile ============================================================================== --- head/sys/modules/if_gif/Makefile Tue Oct 14 14:51:27 2014 (r273091) +++ head/sys/modules/if_gif/Makefile Tue Oct 14 14:52:39 2014 (r273092) @@ -6,7 +6,7 @@ SYSDIR?=${.CURDIR}/../.. .PATH: ${SYSDIR}/net ${SYSDIR}/netinet ${SYSDIR}/netinet6 KMOD= if_gif -SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h opt_mrouting.h +SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h .if defined(KERNBUILDDIR) OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 15:03:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59C1CAA2; Tue, 14 Oct 2014 15:03:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CC949C5; Tue, 14 Oct 2014 15:03:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EF37hx080737; Tue, 14 Oct 2014 15:03:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EF36ZG080734; Tue, 14 Oct 2014 15:03:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410141503.s9EF36ZG080734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 14 Oct 2014 15:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273093 - in head/release: amd64 i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 15:03:07 -0000 Author: gjb Date: Tue Oct 14 15:03:06 2014 New Revision: 273093 URL: https://svnweb.freebsd.org/changeset/base/273093 Log: Merge the following from ^/projects/release-vmimage: r272436, r272437, r272792: r272436: Remove the first argument to panic(), which was initially intended to be the exit code, however when a non-zero exit code was returned to release/Makefile, this would prevent any remaining (and possibly successful) stages from being attempted. r272437: If the vm-base target fails, prevent the vm-image target from being run since it cannot possibly succeed. r272792: Add /usr/local/bin and /usr/local/sbin to PATH, needed if third-party software needs to use utilities outside of the base system during post-install stages (indexinfo is one culprit). MFC after: 3 days X-MFC-10.1: yes Sponsored by: The FreeBSD Foundation Modified: head/release/amd64/mk-vmimage.sh head/release/i386/mk-vmimage.sh Modified: head/release/amd64/mk-vmimage.sh ============================================================================== --- head/release/amd64/mk-vmimage.sh Tue Oct 14 14:52:39 2014 (r273092) +++ head/release/amd64/mk-vmimage.sh Tue Oct 14 15:03:06 2014 (r273093) @@ -32,7 +32,7 @@ # $FreeBSD$ # -PATH="/bin:/usr/bin:/sbin:/usr/sbin" +PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" export PATH usage_vm_base() { @@ -58,16 +58,25 @@ usage() { } panic() { - rc="${1}" - shift 1 msg="${@}" printf "${msg}\n" if [ ! -z "${mddev}" ]; then mdconfig -d -u ${mddev} fi + case ${cmd} in + vm-base) + # If the vm-base target fails, the vm-image target + # cannot possibly succeed. Touch the .TARGET file + # so it is not attempted. + touch vm-image + ;; + *) + # FALLTHROUGH + ;; + esac # Do not allow one failure case to chain through any remaining image # builds. - exit 0 + return 1 } vm_create_baseimage() { @@ -96,7 +105,7 @@ vm_create_baseimage() { cd ${WORLDDIR} && \ make DESTDIR=${DESTDIR} \ installworld installkernel distribution || \ - panic 1 "\n\nCannot install the base system to ${DESTDIR}." + panic "\n\nCannot install the base system to ${DESTDIR}." chroot ${DESTDIR} /usr/bin/newaliases echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab @@ -111,7 +120,7 @@ vm_create_baseimage() { # This should never happen. But, it has happened. msg="Cannot umount(8) ${DESTDIR}\n" msg="${msg}Something has gone horribly wrong." - panic 1 "${msg}" + panic "${msg}" fi sleep 1 done @@ -141,11 +150,11 @@ vm_create_vmdisk() { if [ -z "${mkimg_version}" ]; then msg="Cannot determine mkimg(1) version.\n" msg="${msg}Cannot continue without a known mkimg(1) version." - panic 0 "${msg}" + panic "${msg}" fi if ! mkimg --formats 2>/dev/null | grep -q ${FORMAT}; then - panic 0 "'${FORMAT}' is not supported by this mkimg(1).\n" + panic "'${FORMAT}' is not supported by this mkimg(1).\n" fi case ${FORMAT} in Modified: head/release/i386/mk-vmimage.sh ============================================================================== --- head/release/i386/mk-vmimage.sh Tue Oct 14 14:52:39 2014 (r273092) +++ head/release/i386/mk-vmimage.sh Tue Oct 14 15:03:06 2014 (r273093) @@ -32,7 +32,7 @@ # $FreeBSD$ # -PATH="/bin:/usr/bin:/sbin:/usr/sbin" +PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" export PATH usage_vm_base() { @@ -58,16 +58,25 @@ usage() { } panic() { - rc="${1}" - shift 1 msg="${@}" printf "${msg}\n" if [ ! -z "${mddev}" ]; then mdconfig -d -u ${mddev} fi + case ${cmd} in + vm-base) + # If the vm-base target fails, the vm-image target + # cannot possibly succeed. Touch the .TARGET file + # so it is not attempted. + touch vm-image + ;; + *) + # FALLTHROUGH + ;; + esac # Do not allow one failure case to chain through any remaining image # builds. - exit 0 + return 1 } vm_create_baseimage() { @@ -96,7 +105,7 @@ vm_create_baseimage() { cd ${WORLDDIR} && \ make DESTDIR=${DESTDIR} \ installworld installkernel distribution || \ - panic 1 "\n\nCannot install the base system to ${DESTDIR}." + panic "\n\nCannot install the base system to ${DESTDIR}." chroot ${DESTDIR} /usr/bin/newaliases echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab @@ -111,7 +120,7 @@ vm_create_baseimage() { # This should never happen. But, it has happened. msg="Cannot umount(8) ${DESTDIR}\n" msg="${msg}Something has gone horribly wrong." - panic 1 "${msg}" + panic "${msg}" fi sleep 1 done @@ -141,11 +150,11 @@ vm_create_vmdisk() { if [ -z "${mkimg_version}" ]; then msg="Cannot determine mkimg(1) version.\n" msg="${msg}Cannot continue without a known mkimg(1) version." - panic 0 "${msg}" + panic "${msg}" fi if ! mkimg --formats 2>/dev/null | grep -q ${FORMAT}; then - panic 0 "'${FORMAT}' is not supported by this mkimg(1).\n" + panic "'${FORMAT}' is not supported by this mkimg(1).\n" fi case ${FORMAT} in From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 15:22:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CCA9E0; Tue, 14 Oct 2014 15:22:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DC9FBBE; Tue, 14 Oct 2014 15:22:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EFMm7o090396; Tue, 14 Oct 2014 15:22:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EFMlhb090392; Tue, 14 Oct 2014 15:22:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410141522.s9EFMlhb090392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 14 Oct 2014 15:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273096 - in head/release: . amd64 i386 tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 15:22:48 -0000 Author: gjb Date: Tue Oct 14 15:22:46 2014 New Revision: 273096 URL: https://svnweb.freebsd.org/changeset/base/273096 Log: Merge the following from ^/projects/release-vmimage: r273076, r273077, r273079, r273095: r273076: Add a separate make(1) target to release/Makefile to build FreeBSD virtual machine disk images for use on the Microsoft Azure service. For now, this target is not directly connected to the build, however can be manually invoked. The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh, which does the heavy lifting to produce proper VHDs. mk-azure.sh uses a configuration file, defaulting to tools/azure.conf if otherwise unset. r273077: Clear VM_RC_LIST. r273079: Fix signal list to trigger umount(8). r273095: Output an informational message when mkimg(1) runs, so it does not appear that the process has stopped while waiting for a 'y/n' response when waagent is deprovisioned. Tested on: releng/10.1@r272876 MFC after: 3 days X-MFC-10.1: yes Sponsored by: The FreeBSD Foundation Added: head/release/amd64/mk-azure.sh - copied, changed from r273076, projects/release-vmimage/release/amd64/mk-azure.sh head/release/i386/mk-azure.sh - copied, changed from r273076, projects/release-vmimage/release/i386/mk-azure.sh head/release/tools/azure.conf - copied, changed from r273076, projects/release-vmimage/release/tools/azure.conf Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Tue Oct 14 15:18:22 2014 (r273095) +++ head/release/Makefile Tue Oct 14 15:22:46 2014 (r273096) @@ -101,6 +101,7 @@ VMTARGETS= vm-base vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G VMBASE?= vm +AZURECONF?= ${.CURDIR}/tools/azure.conf CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) @@ -121,6 +122,12 @@ CLEANDIRS= dist ftp release bootonly dvd .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) CLEANDIRS+= ${VMTARGETS} .endif +.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) +CLEANFILES+= ${OSRELEASE}.vhd \ + ${OSRELEASE}.vhd.raw \ + azure.img +CLEANDIRS+= vm-azure +.endif beforeclean: chflags -R noschg . .include @@ -338,3 +345,11 @@ vm-image: vm-base . endif .endif touch ${.TARGET} + +vm-azure: +.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \ + ${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \ + ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OSRELEASE}.vhd +.endif + touch ${.TARGET} Copied and modified: head/release/amd64/mk-azure.sh (from r273076, projects/release-vmimage/release/amd64/mk-azure.sh) ============================================================================== --- projects/release-vmimage/release/amd64/mk-azure.sh Tue Oct 14 11:48:28 2014 (r273076, copy source) +++ head/release/amd64/mk-azure.sh Tue Oct 14 15:22:46 2014 (r273096) @@ -67,7 +67,7 @@ vm_create_azure() { usage fi - trap "umount ${DESTDIR}/dev ${DESTDIR}" EXIT + trap "umount ${DESTDIR}/dev ${DESTDIR}" INT QUIT TRAP ABRT TERM i=0 mkdir -p ${DESTDIR} @@ -130,6 +130,8 @@ vm_create_azure() { sleep 1 done + echo "Creating image... Please wait." + mkimg -f vhdf -s gpt \ -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ -p freebsd-swap/swapfs::1G \ Copied and modified: head/release/i386/mk-azure.sh (from r273076, projects/release-vmimage/release/i386/mk-azure.sh) ============================================================================== --- projects/release-vmimage/release/i386/mk-azure.sh Tue Oct 14 11:48:28 2014 (r273076, copy source) +++ head/release/i386/mk-azure.sh Tue Oct 14 15:22:46 2014 (r273096) @@ -67,7 +67,7 @@ vm_create_azure() { usage fi - trap "umount ${DESTDIR}/dev ${DESTDIR}" EXIT + trap "umount ${DESTDIR}/dev ${DESTDIR}" INT QUIT TRAP ABRT TERM i=0 mkdir -p ${DESTDIR} @@ -130,6 +130,8 @@ vm_create_azure() { sleep 1 done + echo "Creating image... Please wait." + mkimg -f vhdf -s gpt \ -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ -p freebsd-swap/swapfs::1G \ Copied and modified: head/release/tools/azure.conf (from r273076, projects/release-vmimage/release/tools/azure.conf) ============================================================================== --- projects/release-vmimage/release/tools/azure.conf Tue Oct 14 11:48:28 2014 (r273076, copy source) +++ head/release/tools/azure.conf Tue Oct 14 15:22:46 2014 (r273096) @@ -11,4 +11,4 @@ export VM_EXTRA_PACKAGES= # Set to a list of third-party software to enable in rc.conf(5). # Example: #export VM_RC_LIST="apache24" -export VM_RC_LIST="apache24" +export VM_RC_LIST= From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 18:34:16 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 440018D3; Tue, 14 Oct 2014 18:34:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FCE531A; Tue, 14 Oct 2014 18:34:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EIYGCs086841; Tue, 14 Oct 2014 18:34:16 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EIYGwQ086840; Tue, 14 Oct 2014 18:34:16 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201410141834.s9EIYGwQ086840@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Tue, 14 Oct 2014 18:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273102 - head/share/examples/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 18:34:16 -0000 Author: neel Date: Tue Oct 14 18:34:15 2014 New Revision: 273102 URL: https://svnweb.freebsd.org/changeset/base/273102 Log: Use '-e' to check if the virtio backing file has already been created. The '-f' check works fine on a regular file but not if the backing file is a device (e.g., /dev/md0). In this case it would print a misleading but otherwise benign message about the backing file not being present. Submitted by: Marcus Reid (marcus@blazingdot.com) Discussed with: grehan Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Tue Oct 14 17:13:47 2014 (r273101) +++ head/share/examples/bhyve/vmrun.sh Tue Oct 14 18:34:15 2014 (r273102) @@ -152,7 +152,7 @@ make_and_check_diskdev() { local virtio_diskdev="$1" # Create the virtio diskdev file if needed - if [ ! -f ${virtio_diskdev} ]; then + if [ ! -e ${virtio_diskdev} ]; then echo "virtio disk device file \"${virtio_diskdev}\" does not exist." echo "Creating it ..." truncate -s 8G ${virtio_diskdev} > /dev/null From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 19:55:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2900724E; Tue, 14 Oct 2014 19:55:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14D1AD80; Tue, 14 Oct 2014 19:55:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EJtYTZ025281; Tue, 14 Oct 2014 19:55:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EJtYrU025280; Tue, 14 Oct 2014 19:55:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410141955.s9EJtYrU025280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Oct 2014 19:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273107 - head/usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 19:55:35 -0000 Author: trasz Date: Tue Oct 14 19:55:34 2014 New Revision: 273107 URL: https://svnweb.freebsd.org/changeset/base/273107 Log: Make automount(8)/automountd(8) treat percent sign as a valid part of path. It's useful for spaces encoded as %20 as msdosfs labels. Submitted by: glebius@ MFC after: 1 month Modified: head/usr.sbin/autofs/token.l Modified: head/usr.sbin/autofs/token.l ============================================================================== --- head/usr.sbin/autofs/token.l Tue Oct 14 19:38:31 2014 (r273106) +++ head/usr.sbin/autofs/token.l Tue Oct 14 19:55:34 2014 (r273107) @@ -49,7 +49,7 @@ extern int yylex(void); %% \"[^"]+\" { yytext++; yytext[strlen(yytext) - 1] = '\0'; return STR; }; -[a-zA-Z0-9\.\+-_/\:\[\]$&{}]+ { return STR; } +[a-zA-Z0-9\.\+-_/\:\[\]$&%{}]+ { return STR; } #.*\n { lineno++; return NEWLINE; }; \\\n { lineno++; }; \n { lineno++; return NEWLINE; } From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 21:02:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97B1D283; Tue, 14 Oct 2014 21:02:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A1636BA; Tue, 14 Oct 2014 21:02:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EL2YRO058576; Tue, 14 Oct 2014 21:02:34 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EL2YiG058575; Tue, 14 Oct 2014 21:02:34 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201410142102.s9EL2YiG058575@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Tue, 14 Oct 2014 21:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273108 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Oct 2014 21:02:34 -0000 Author: neel Date: Tue Oct 14 21:02:33 2014 New Revision: 273108 URL: https://svnweb.freebsd.org/changeset/base/273108 Log: Emulate "POP r/m". This is needed to boot OpenBSD/i386 MP kernel in bhyve. Reported by: grehan MFC after: 1 week Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Tue Oct 14 19:55:34 2014 (r273107) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Tue Oct 14 21:02:33 2014 (r273108) @@ -69,6 +69,7 @@ enum { VIE_OP_TYPE_TWO_BYTE, VIE_OP_TYPE_PUSH, VIE_OP_TYPE_CMP, + VIE_OP_TYPE_POP, VIE_OP_TYPE_LAST }; @@ -159,6 +160,11 @@ static const struct vie_op one_byte_opco .op_type = VIE_OP_TYPE_OR, .op_flags = VIE_OP_F_IMM8, }, + [0x8F] = { + /* XXX Group 1A extended opcode - not just POP */ + .op_byte = 0x8F, + .op_type = VIE_OP_TYPE_POP, + }, [0xFF] = { /* XXX Group 5 extended opcode - not just PUSH */ .op_byte = 0xFF, @@ -821,7 +827,7 @@ emulate_sub(void *vm, int vcpuid, uint64 } static int -emulate_push(void *vm, int vcpuid, uint64_t mmio_gpa, struct vie *vie, +emulate_stack_op(void *vm, int vcpuid, uint64_t mmio_gpa, struct vie *vie, struct vm_guest_paging *paging, mem_region_read_t memread, mem_region_write_t memwrite, void *arg) { @@ -832,18 +838,12 @@ emulate_push(void *vm, int vcpuid, uint6 #endif struct seg_desc ss_desc; uint64_t cr0, rflags, rsp, stack_gla, val; - int error, size, stackaddrsize; - - /* - * Table A-6, "Opcode Extensions", Intel SDM, Vol 2. - * - * PUSH is part of the group 5 extended opcodes and is identified - * by ModRM:reg = b110. - */ - if ((vie->reg & 7) != 6) - return (EINVAL); + int error, size, stackaddrsize, pushop; + val = 0; size = vie->opsize; + pushop = (vie->op.op_type == VIE_OP_TYPE_PUSH) ? 1 : 0; + /* * From "Address-Size Attributes for Stack Accesses", Intel SDL, Vol 1 */ @@ -882,10 +882,13 @@ emulate_push(void *vm, int vcpuid, uint6 error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RSP, &rsp); KASSERT(error == 0, ("%s: error %d getting rsp", __func__, error)); + if (pushop) { + rsp -= size; + } - rsp -= size; if (vie_calculate_gla(paging->cpu_mode, VM_REG_GUEST_SS, &ss_desc, - rsp, size, stackaddrsize, PROT_WRITE, &stack_gla)) { + rsp, size, stackaddrsize, pushop ? PROT_WRITE : PROT_READ, + &stack_gla)) { vm_inject_ss(vm, vcpuid, 0); return (0); } @@ -900,8 +903,8 @@ emulate_push(void *vm, int vcpuid, uint6 return (0); } - error = vm_copy_setup(vm, vcpuid, paging, stack_gla, size, PROT_WRITE, - copyinfo, nitems(copyinfo)); + error = vm_copy_setup(vm, vcpuid, paging, stack_gla, size, + pushop ? PROT_WRITE : PROT_READ, copyinfo, nitems(copyinfo)); if (error == -1) { /* * XXX cannot return a negative error value here because it @@ -914,16 +917,66 @@ emulate_push(void *vm, int vcpuid, uint6 return (0); } - error = memread(vm, vcpuid, mmio_gpa, &val, size, arg); + if (pushop) { + error = memread(vm, vcpuid, mmio_gpa, &val, size, arg); + if (error == 0) + vm_copyout(vm, vcpuid, &val, copyinfo, size); + } else { + vm_copyin(vm, vcpuid, copyinfo, &val, size); + error = memwrite(vm, vcpuid, mmio_gpa, val, size, arg); + rsp += size; + } +#ifdef _KERNEL + vm_copy_teardown(vm, vcpuid, copyinfo, nitems(copyinfo)); +#endif + if (error == 0) { - vm_copyout(vm, vcpuid, &val, copyinfo, size); error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RSP, rsp, stackaddrsize); KASSERT(error == 0, ("error %d updating rsp", error)); } -#ifdef _KERNEL - vm_copy_teardown(vm, vcpuid, copyinfo, nitems(copyinfo)); -#endif + return (error); +} + +static int +emulate_push(void *vm, int vcpuid, uint64_t mmio_gpa, struct vie *vie, + struct vm_guest_paging *paging, mem_region_read_t memread, + mem_region_write_t memwrite, void *arg) +{ + int error; + + /* + * Table A-6, "Opcode Extensions", Intel SDM, Vol 2. + * + * PUSH is part of the group 5 extended opcodes and is identified + * by ModRM:reg = b110. + */ + if ((vie->reg & 7) != 6) + return (EINVAL); + + error = emulate_stack_op(vm, vcpuid, mmio_gpa, vie, paging, memread, + memwrite, arg); + return (error); +} + +static int +emulate_pop(void *vm, int vcpuid, uint64_t mmio_gpa, struct vie *vie, + struct vm_guest_paging *paging, mem_region_read_t memread, + mem_region_write_t memwrite, void *arg) +{ + int error; + + /* + * Table A-6, "Opcode Extensions", Intel SDM, Vol 2. + * + * POP is part of the group 1A extended opcodes and is identified + * by ModRM:reg = b000. + */ + if ((vie->reg & 7) != 0) + return (EINVAL); + + error = emulate_stack_op(vm, vcpuid, mmio_gpa, vie, paging, memread, + memwrite, arg); return (error); } @@ -938,6 +991,10 @@ vmm_emulate_instruction(void *vm, int vc return (EINVAL); switch (vie->op.op_type) { + case VIE_OP_TYPE_POP: + error = emulate_pop(vm, vcpuid, gpa, vie, paging, memread, + memwrite, memarg); + break; case VIE_OP_TYPE_PUSH: error = emulate_push(vm, vcpuid, gpa, vie, paging, memread, memwrite, memarg); From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 01:16:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A8A3E6C; Wed, 15 Oct 2014 01:16:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74B06232; Wed, 15 Oct 2014 01:16:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F1GCpb079063; Wed, 15 Oct 2014 01:16:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F1GCZL079062; Wed, 15 Oct 2014 01:16:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201410150116.s9F1GCZL079062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 15 Oct 2014 01:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273111 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 01:16:12 -0000 Author: mjg Date: Wed Oct 15 01:16:11 2014 New Revision: 273111 URL: https://svnweb.freebsd.org/changeset/base/273111 Log: filedesc: plug 2 assignments to M_ZERO-ed pointers in falloc_noinstall No functional changes. Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Tue Oct 14 23:16:52 2014 (r273110) +++ head/sys/kern/kern_descrip.c Wed Oct 15 01:16:11 2014 (r273111) @@ -1740,8 +1740,6 @@ falloc_noinstall(struct thread *td, stru refcount_init(&fp->f_count, 1); fp->f_cred = crhold(td->td_ucred); fp->f_ops = &badfileops; - fp->f_data = NULL; - fp->f_vnode = NULL; *resultfp = fp; return (0); } From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 01:22:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD988B0; Wed, 15 Oct 2014 01:22:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C982D325; Wed, 15 Oct 2014 01:22:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F1MuwH083307; Wed, 15 Oct 2014 01:22:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F1Mudu083306; Wed, 15 Oct 2014 01:22:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201410150122.s9F1Mudu083306@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 15 Oct 2014 01:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273112 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 01:22:57 -0000 Author: adrian Date: Wed Oct 15 01:22:56 2014 New Revision: 273112 URL: https://svnweb.freebsd.org/changeset/base/273112 Log: Set the DROP_EN bit before the RX queue is brought up and active. He noticed issues setting this bit in SRRCTL after the queue was up, so doing it from the sysctl handler isn't enough and may not actually work correctly. This commit doesn't remove the sysctl path or try to change its behaviour. I'll talk with others about how to finish fixing that before I tackle that. PR: kern/194311 Submitted by: luigi MFC after: 3 days Sponsored by: Norse Corp, Inc Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Wed Oct 15 01:16:11 2014 (r273111) +++ head/sys/dev/ixgbe/ixgbe.c Wed Oct 15 01:22:56 2014 (r273112) @@ -4377,6 +4377,20 @@ ixgbe_initialize_receive_units(struct ad srrctl &= ~IXGBE_SRRCTL_BSIZEPKT_MASK; srrctl |= bufsz; srrctl |= IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF; + + /* + * Set DROP_EN iff we have no flow control and >1 queue. + * Note that srrctl was cleared shortly before during reset, + * so we do not need to clear the bit, but do it just in case + * this code is moved elsewhere. + */ + if (adapter->num_queues > 1 && + adapter->hw.fc.requested_mode == ixgbe_fc_none) { + srrctl |= IXGBE_SRRCTL_DROP_EN; + } else { + srrctl &= ~IXGBE_SRRCTL_DROP_EN; + } + IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); /* Setup the HW Rx Head and Tail Descriptor Pointers */ From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 01:51:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6F8A561; Wed, 15 Oct 2014 01:51:50 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A0A197B6; Wed, 15 Oct 2014 01:51:50 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s9F1pmF9037878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Oct 2014 18:51:49 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s9F1pmYt037877; Tue, 14 Oct 2014 18:51:48 -0700 (PDT) (envelope-from jmg) Date: Tue, 14 Oct 2014 18:51:48 -0700 From: John-Mark Gurney To: Warner Losh Subject: Re: svn commit: r273051 - head/sys/dev/isp Message-ID: <20141015015148.GB1852@funkthat.com> References: <201410131623.s9DGNwj3032294@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201410131623.s9DGNwj3032294@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 14 Oct 2014 18:51:49 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 01:51:50 -0000 Warner Losh wrote this message on Mon, Oct 13, 2014 at 16:23 +0000: > Author: imp > Date: Mon Oct 13 16:23:58 2014 > New Revision: 273051 > URL: https://svnweb.freebsd.org/changeset/base/273051 > > Log: > Use the C99 flexible array construct to denote a variable amount of > data rather than the old-school [1] construct. We have required c99 > compilers for some time. Have you audited that there aren't any mallocs or anything else that needs to be adjusted? i.e. old code that did: var = malloc(sizeof(sns_screq_t) + sizeof(uint16_t) * (cnt - 1)); Will now allocate too few bytes... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 01:58:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDFA2726 for ; Wed, 15 Oct 2014 01:58:39 +0000 (UTC) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB87F7E6 for ; Wed, 15 Oct 2014 01:58:39 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id y10so326306pdj.9 for ; Tue, 14 Oct 2014 18:58:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=ZVooe5aay+PYihIoy4gA6q2WlKwERd/t21LHi+IVPx4=; b=bK1K6LDrPYkfJ14m/n42kdDAxN/kC9Zae93Dt5iQUTHCiIVTzXcvPRjme4x7GKDDEu QzYA5xJoGWKUqjhGVuezi3AjhQhIbX5m1Dcg9UK0vIw2/3bjWwU+0uypkTwsWv1qRFjx 0EfQM8IxIxEKkprHF81HA9+6YpdzZxBW8OgCnwdE1qdLZrnMmvgtzKbLxVawN6KibU8v 8Eou71neyXH7DnWvP2vrCtPkybg0CiSAIL+B7Ue4ZHVFzd9ZvI5Ta7jwBdn0IAtH2kTY 40JxzFoCg49/+rjKK+V9JpbZZk3GrnqBaBT+8+6MONCMt5FYKdI7+HoDI3nUHo7D9dpO NNqA== X-Gm-Message-State: ALoCoQlRLgUdyK/Z3Zr4fLVqsLedRycDLHxX8LS9H2pg7DceYKRDhbRhMYVJrMfxTF40X8WRbDt2 X-Received: by 10.66.97.39 with SMTP id dx7mr8820023pab.65.1413338318934; Tue, 14 Oct 2014 18:58:38 -0700 (PDT) Received: from [10.64.26.87] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id xr10sm15577520pab.35.2014.10.14.18.58.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 18:58:38 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r273051 - head/sys/dev/isp From: Warner Losh In-Reply-To: <20141015015148.GB1852@funkthat.com> Date: Tue, 14 Oct 2014 19:58:35 -0600 Message-Id: References: <201410131623.s9DGNwj3032294@svn.freebsd.org> <20141015015148.GB1852@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 01:58:40 -0000 --Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Oct 14, 2014, at 7:51 PM, John-Mark Gurney wrote: > Warner Losh wrote this message on Mon, Oct 13, 2014 at 16:23 +0000: >> Author: imp >> Date: Mon Oct 13 16:23:58 2014 >> New Revision: 273051 >> URL: https://svnweb.freebsd.org/changeset/base/273051 >>=20 >> Log: >> Use the C99 flexible array construct to denote a variable amount of >> data rather than the old-school [1] construct. We have required c99 >> compilers for some time. >=20 > Have you audited that there aren't any mallocs or anything else that > needs to be adjusted? i.e. old code that did: > var =3D malloc(sizeof(sns_screq_t) + sizeof(uint16_t) * (cnt - 1)); >=20 > Will now allocate too few bytes... I audited it. These structures are never malloced and only used to describe structures that are passed back and forth to the firmware. When used in host memory, there=92s a fixed allocation size that=92s independent of the structure size. And they are used in like 3 or 4 places that I could find. Did I miss something? Warner --Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUPdTLAAoJEGwc0Sh9sBEAlVsP/2hsYMhJ0F5uylCQYnQKLi0J 42MxyPMKEgWcD5779LIdekjSz7mzLXmJoxul87uwJ9wXYIKQO5gOFItv1eiJCOZn Jj6PHz6S+32IZ29K+LYgii4ujKQuhaVlmiFw1IBShtlTsBMrvbBBvXZR81EAUAFX vJlsKINe6zpVZ+ksLbjEocv2TANlIQqHWgCO+/9azrHd+cHwA1nHYU/3KUnFBrtF Hc2YV/irB2/QlVdSBfv5q/+GrgzL37TFnjIriug4uHpk47rGGaoHXgAbYrxHDRR4 2pLONS3mV4RvByBsOeBTSohLeV0aEFTPOBl7m+1mFFF9h0tWjw8Bdm9tUxvC46o3 79AkTeq3ztoRMVCRG2yxODQcOeHBRYDUGYmCa+G+lCsCpyKt8lNoyH2YOZJ2r0Ks RqSkxkIBZg5kZkrk1fXAfsumh5zpTfOZJT9wD4q4SE6IMVaiQB1LgLWpudS4pRyf W30OQlbdJ0A2ALMn22hVpaSXPt+14fJJBm4Vl0yLo6cw6Nek6VLFfOcFvN0wq3u5 094resIKK3WXEEhuNDg4lhSh+7W7a2whC6/vwTpzGKW09QY+2LF8/AYo7sOQKCGV BcOrEZpM5dwsqQxxAPl+91mDm7KUnSEmdpuSN0IJ24WEJ8NC9ZQNgZUXZN5E03dL 5MqECHAC0Ny1SG3BdWf4 =yy+p -----END PGP SIGNATURE----- --Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC-- From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 02:00:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7BF8872; Wed, 15 Oct 2014 02:00:17 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 96EA07F2; Wed, 15 Oct 2014 02:00:17 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s9F20FGo038048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Oct 2014 19:00:15 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s9F20FSp038047; Tue, 14 Oct 2014 19:00:15 -0700 (PDT) (envelope-from jmg) Date: Tue, 14 Oct 2014 19:00:15 -0700 From: John-Mark Gurney To: Warner Losh Subject: Re: svn commit: r273051 - head/sys/dev/isp Message-ID: <20141015020015.GC1852@funkthat.com> References: <201410131623.s9DGNwj3032294@svn.freebsd.org> <20141015015148.GB1852@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 14 Oct 2014 19:00:15 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 02:00:18 -0000 Warner Losh wrote this message on Tue, Oct 14, 2014 at 19:58 -0600: > On Oct 14, 2014, at 7:51 PM, John-Mark Gurney wrote: > > > Warner Losh wrote this message on Mon, Oct 13, 2014 at 16:23 +0000: > >> Author: imp > >> Date: Mon Oct 13 16:23:58 2014 > >> New Revision: 273051 > >> URL: https://svnweb.freebsd.org/changeset/base/273051 > >> > >> Log: > >> Use the C99 flexible array construct to denote a variable amount of > >> data rather than the old-school [1] construct. We have required c99 > >> compilers for some time. > > > > Have you audited that there aren't any mallocs or anything else that > > needs to be adjusted? i.e. old code that did: > > var = malloc(sizeof(sns_screq_t) + sizeof(uint16_t) * (cnt - 1)); > > > > Will now allocate too few bytes... > > I audited it. These structures are never malloced and only used to > describe structures that are passed back and forth to the firmware. > When used in host memory, there?s a fixed allocation size that?s > independent of the structure size. And they are used in like 3 or 4 > places that I could find. > > Did I miss something? I looked briefly, but didn't see anything... I just wanted to make sure since it wasn't mentioned in the commit message... Thanks. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 02:31:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62D35301; Wed, 15 Oct 2014 02:31:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E204B0C; Wed, 15 Oct 2014 02:31:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F2VFHF013511; Wed, 15 Oct 2014 02:31:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F2VFVo013510; Wed, 15 Oct 2014 02:31:15 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201410150231.s9F2VFVo013510@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 15 Oct 2014 02:31:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273113 - head/sys/powerpc/powermac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 02:31:15 -0000 Author: jhibbits Date: Wed Oct 15 02:31:14 2014 New Revision: 273113 URL: https://svnweb.freebsd.org/changeset/base/273113 Log: Add a sysctl to allow disabling the monitoring thread. Summary: If a user uses powerd, or doesn't want to use the cycles monitoring, they can now suspend the monitoring thread. While here, reorganize the added prototypes to match existing groupings. Reviewers: nwhitehorn, #powerpc, rpaulo Reviewed By: #powerpc, rpaulo Differential Revision: https://reviews.freebsd.org/D944 X-MFC-with: r273009 MFC after: 3 weeks Modified: head/sys/powerpc/powermac/pmu.c Modified: head/sys/powerpc/powermac/pmu.c ============================================================================== --- head/sys/powerpc/powermac/pmu.c Wed Oct 15 01:22:56 2014 (r273112) +++ head/sys/powerpc/powermac/pmu.c Wed Oct 15 02:31:14 2014 (r273113) @@ -104,6 +104,10 @@ static int pmu_acline_state(SYSCTL_HANDL static int pmu_query_battery(struct pmu_softc *sc, int batt, struct pmu_battstate *info); static int pmu_battquery_sysctl(SYSCTL_HANDLER_ARGS); +static int pmu_battmon(SYSCTL_HANDLER_ARGS); +static void pmu_battquery_proc(void); +static void pmu_battery_notify(struct pmu_battstate *batt, + struct pmu_battstate *old); /* * List of battery-related sysctls we might ask for @@ -184,9 +188,6 @@ static int pmu_send(void *cookie, int cm static uint8_t pmu_read_reg(struct pmu_softc *sc, u_int offset); static void pmu_write_reg(struct pmu_softc *sc, u_int offset, uint8_t value); static int pmu_intr_state(struct pmu_softc *); -static void pmu_battquery_proc(void); -static void pmu_battery_notify(struct pmu_battstate *batt, - struct pmu_battstate *old); /* these values shows that number of data returned after 'send' cmd is sent */ static signed char pm_send_cmd_type[] = { @@ -260,6 +261,7 @@ static signed char pm_receive_cmd_type[] -1, -1, -1, -1, -1, -1, -1, -1, }; +static int pmu_battmon_enabled = 1; static struct proc *pmubattproc; static struct kproc_desc pmu_batt_kp = { "pmu_batt", @@ -434,6 +436,11 @@ pmu_attach(device_t dev) /* Only start the battery monitor if we have a battery. */ kproc_start(&pmu_batt_kp); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "monitor_batteries", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + pmu_battmon, "I", "Post battery events to devd"); + + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "acline", CTLTYPE_INT | CTLFLAG_RD, sc, 0, pmu_acline_state, "I", "AC Line Status"); @@ -931,12 +938,14 @@ static void pmu_battery_notify(struct pmu_battstate *batt, struct pmu_battstate *old) { char notify_buf[16]; - int acline; + int new_acline, old_acline; - acline = (batt->state & PMU_PWR_AC_PRESENT) ? 1 : 0; - if (acline != (old->state & PMU_PWR_AC_PRESENT)) { + new_acline = (batt->state & PMU_PWR_AC_PRESENT) ? 1 : 0; + old_acline = (old->state & PMU_PWR_AC_PRESENT) ? 1 : 0; + + if (new_acline != old_acline) { snprintf(notify_buf, sizeof(notify_buf), - "notify=0x%02x", acline); + "notify=0x%02x", new_acline); devctl_notify("PMU", "POWER", "ACLINE", notify_buf); } } @@ -951,8 +960,9 @@ pmu_battquery_proc() sc = device_get_softc(pmu); - error = pmu_query_battery(sc, 0, &cur_batt); + bzero(&cur_batt, sizeof(cur_batt)); while (1) { + kproc_suspend_check(curproc); error = pmu_query_battery(sc, 0, &batt); pmu_battery_notify(&batt, &cur_batt); cur_batt = batt; @@ -961,6 +971,29 @@ pmu_battquery_proc() } static int +pmu_battmon(SYSCTL_HANDLER_ARGS) +{ + struct pmu_softc *sc; + int error, result; + + sc = arg1; + result = pmu_battmon_enabled; + + error = sysctl_handle_int(oidp, &result, 0, req); + + if (error || !req->newptr) + return (error); + + if (!result && pmu_battmon_enabled) + error = kproc_suspend(pmubattproc, hz); + else if (result && pmu_battmon_enabled == 0) + error = kproc_resume(pmubattproc); + pmu_battmon_enabled = (result != 0); + + return (error); +} + +static int pmu_acline_state(SYSCTL_HANDLER_ARGS) { struct pmu_softc *sc; From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 02:34:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E37A496; Wed, 15 Oct 2014 02:34:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A55AB39; Wed, 15 Oct 2014 02:34:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F2YRFs016251; Wed, 15 Oct 2014 02:34:27 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F2YRvx016250; Wed, 15 Oct 2014 02:34:27 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410150234.s9F2YRvx016250@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Wed, 15 Oct 2014 02:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273114 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 02:34:27 -0000 Author: des Date: Wed Oct 15 02:34:26 2014 New Revision: 273114 URL: https://svnweb.freebsd.org/changeset/base/273114 Log: Drop support for SSLv3. MFC after: 1 week Modified: head/lib/libfetch/common.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Wed Oct 15 02:31:14 2014 (r273113) +++ head/lib/libfetch/common.c Wed Oct 15 02:34:26 2014 (r273114) @@ -820,7 +820,7 @@ fetch_ssl(conn_t *conn, const struct url SSL_load_error_strings(); - conn->ssl_meth = SSLv23_client_method(); + conn->ssl_meth = TLSv1_client_method(); conn->ssl_ctx = SSL_CTX_new(conn->ssl_meth); SSL_CTX_set_mode(conn->ssl_ctx, SSL_MODE_AUTO_RETRY); From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 03:04:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3CCAB5C; Wed, 15 Oct 2014 03:04:59 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 51F2EE7F; Wed, 15 Oct 2014 03:04:58 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s9F34tBI077247 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 15 Oct 2014 07:04:55 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s9F34tWr077246; Wed, 15 Oct 2014 07:04:55 +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, 15 Oct 2014 07:04:55 +0400 From: Gleb Smirnoff To: Olivier =?iso-8859-1?Q?Cochard-Labb=E9?= Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys Message-ID: <20141015030455.GC73266@FreeBSD.org> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="wAI/bQb0EMvlZCHl" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head , "George V. Neville-Neil" , svn-src-all , src-committers X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 03:04:59 -0000 --wAI/bQb0EMvlZCHl Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, Oct 13, 2014 at 06:42:11PM +0200, Olivier Cochard-Labbé wrote: O> > Author: gnn O> > Date: Fri Oct 10 19:26:26 2014 O> > New Revision: 272906 O> > URL: https://svnweb.freebsd.org/changeset/base/272906 O> > O> > Log: O> > Change the PF hash from Jenkins to Murmur3. In forwarding tests O> > this showed a conservative 3% incrase in PPS. O> O> It's not easy to measure 3% of difference ;-) However, it is easy to estimate distribution of a hash function. Also doing the calculation speed test along the way. I've got very disappointing results with this murmur3 against jenkins. I am running 87k states just taken from a live system against a 32k state hash table (which is a default size). Look at results at the end of email. Guess what -j and -m mean. I want either proving me doing the test wrong, or backing the change out ASAP. The sources for the test attached. First you need to run dump2key program to store output of 'pfctl -s states' in a binary format. Then experiment with hashtest. Now dump2key would fail on a IPv6 state. You can either fix that or just filter out IPv6 states. glebius@think:~/pf/hashtest:|>./hashtest -j ../offcarp1.keys 0 collisions 2199 hits 1 collisions 6115 hits 2 collisions 8042 hits 3 collisions 7228 hits 4 collisions 4789 hits 5 collisions 2552 hits 6 collisions 1182 hits 7 collisions 466 hits 8 collisions 137 hits 9 collisions 44 hits 10 collisions 12 hits 11 collisions 2 hits Read 87787 keys, found 87787 keys in hash Hashes calculation time 8188957 nsec glebius@think:~/pf/hashtest:|>./hashtest -m ../offcarp1.keys 0 collisions 23979 hits 1 collisions 4118 hits 2 collisions 1707 hits 3 collisions 691 hits 4 collisions 411 hits 5 collisions 259 hits 6 collisions 231 hits 7 collisions 149 hits 8 collisions 131 hits 9 collisions 124 hits 10 collisions 88 hits 11 collisions 78 hits 12 collisions 58 hits 13 collisions 61 hits 14 collisions 45 hits 15 collisions 39 hits 16 collisions 31 hits 17 collisions 34 hits 18 collisions 28 hits 19 collisions 23 hits 20 collisions 20 hits 21 collisions 18 hits 22 collisions 20 hits 23 collisions 18 hits 24 collisions 10 hits 25 collisions 14 hits 26 collisions 13 hits 27 collisions 14 hits 28 collisions 12 hits 29 collisions 12 hits 30 collisions 13 hits 31 collisions 13 hits 32 collisions 6 hits 33 collisions 10 hits 34 collisions 8 hits 35 collisions 5 hits 36 collisions 9 hits 37 collisions 5 hits 38 collisions 9 hits 39 collisions 5 hits 40 collisions 7 hits 41 collisions 6 hits 42 collisions 11 hits 43 collisions 4 hits 44 collisions 6 hits 45 collisions 5 hits 46 collisions 10 hits 47 collisions 6 hits 48 collisions 3 hits 49 collisions 5 hits 50 collisions 4 hits 51 collisions 4 hits 52 collisions 6 hits 53 collisions 4 hits 54 collisions 7 hits 55 collisions 1 hits 56 collisions 9 hits 57 collisions 2 hits 58 collisions 3 hits 59 collisions 4 hits 60 collisions 2 hits 61 collisions 3 hits 62 collisions 3 hits 63 collisions 2 hits 64 collisions 3 hits 65 collisions 5 hits 67 collisions 2 hits 68 collisions 2 hits 69 collisions 3 hits 70 collisions 3 hits 71 collisions 1 hits 72 collisions 2 hits 73 collisions 1 hits 74 collisions 2 hits 75 collisions 2 hits 76 collisions 1 hits 77 collisions 1 hits 78 collisions 2 hits 79 collisions 2 hits 80 collisions 1 hits 81 collisions 2 hits 82 collisions 1 hits 83 collisions 1 hits 84 collisions 2 hits 85 collisions 3 hits 86 collisions 1 hits 87 collisions 2 hits 88 collisions 1 hits 89 collisions 1 hits 90 collisions 1 hits 91 collisions 2 hits 92 collisions 1 hits 93 collisions 1 hits 95 collisions 2 hits 96 collisions 1 hits 97 collisions 2 hits 98 collisions 1 hits >99 collisions 74 hits Read 87787 keys, found 47693 keys in hash Hashes calculation time 2835154 nsec -- Totus tuus, Glebius. --wAI/bQb0EMvlZCHl Content-Type: application/octet-stream Content-Disposition: attachment; filename="pf-hash-testing.tar.bz2" Content-Transfer-Encoding: base64 QlpoOTFBWSZTWVqaAs8ABid/2dywAoB7////L+/fvv//3/5AAAQAAAIAAIAIYAi/eAj1exp1 1W26642GQGlFGgHDQ0ZNGjRpoZGQwgDIAZBpoAAGQMgCSQmhPUwkejSmanqANMgAANA0AGgB o9qgA0E0Sah+qBppppoBtQYhoAAAAAAaAAJNSRKenpBGmmE00AABo0AAA0A0ANAAcNDRk0aN GmhkZDCAMgBkGmgAAZAyAJEhAEExMjKbCTIp5T8inqYmn6p6gAB6g0zUH6UB+qfWL+Iv1H7D y3HmDkSziZlTB3AAuPXxs5RYgX2ETcQiRgF4ExgBoCIxERBRioMGCMkQUFUQGIkOTr2zmXRG MZOaMkqMoqUKCIsRERVgqxUYxRVFFZ+uePHDnBxjHVGDB/N11rSrN/6KJcYUbiBRVrWsqKIq 1aoXjjS8WmhioiKmZVJeJQkJcJgiGmfLNMWO+sTRFBYsFP5RvtuoI35hk92gE4BOdi2CYvaH UTELYgtQcFziDL9R0Ys6ZeMj7K0LZ3ihQKasBsW9NSYE38bw2F7rKuDPGcEyrl8q+Zvji8nS GWfgzh0r6TzTR95j6+ozdxMoXYGXYsoBFqEJ4l72K6SgjU5GCH9OWn8BZZwnqqoqIdFiiTnN 3GdLb0Ros3FBPFx4dqrU2VUglL1Oua9KomqsWTXD3uQ8WQPZjPWEEWCGQjMEFFwDASORUAv7 kDOWDDEwyDI5wS0zEGGvA9RuIO6MYbMc2nWrzVvuqKMZWXxgECDvSXsaBteBICYM7zpICTLR pETIDS18tEHqEwO0WOlnD2UF2jqFs/22NpjbfOWOlpLUZui3CsvLiromRaoTmNkKVa8RKHFS arAzcUUR1RBOCgwlY6t30UlFCNowVjFqU0KwpGv2kl3cCAwuZ04Xkg9JYWbIPjunfPJuj1PP nHnOg1FrC3RF9cUdJls75Vx6Mc9CqkRdDx3ThbEjb80Da0RKVF0YLM7Deta0yF5iMCxl5ts3 HDpsNpQ3fvt+cnbkqk4iN7nKHVoxJwZsZrk41xKRmJHUPREdK8uRsMW7c6JRsc7jMa4zWcWv VPKF5PPhQXlNLNkKGQVY0YLJn1hZPPEN62HYSg1maV781gX8AE5j8Ccj0DwFWMAtoW8JgXv+ Hx5HBwRFQHf3nEhYikSFMGBJHiIgU/y0E9ffWvncpc8R3pJlI2NLzYiZWSTokbklxmBl49Ry ZPKDazVRVp7QolnFREWQnk9IpE25qZif0tErrSJFQ0yqXEWcNU6vcHMKYV5cCFXTH+ROYsCl ZEiRErGr5Xg6CCBKGezwRPECD4Aw8eUbAxrwIKgsBEyUQBfmLnMco7+eEeu5+3mmF9UGHNk2 /QU0vKTgruhL3PIzB5+XQYp1dTK1QA+e2vLPHdJ7ZVQofDYlrUMmgwk/VKCTbQTGJbjSIUFX ee/xRmPad5/ifiQRD1YbzFw0w8d4et0yRS68wWGusCpHYcVBarQeUzeIkQ3yGBYsoxUEsRHG XGQtvIkE+FDDqo4YlYb+ThKu4melfiKDGigvrXc2CSJMZsqGRnhlCFpmrR0A7Ia5QmzVhoV2 Brok5W1xfL1vR0KaNIopL9ixJUHHt7Y+Y8NfDZ+c5EKhpDUHeaV9AbCh+RrwD6RUaPgQcBe8 rJB3I/gQew7DuXroYL3mQXAMx3dxYQ1B8D6jtKwVgFDEL8DgcM4oxJDLzSQaAq+BBExyXrih hi86kUQVkGgEso2ZayuhHpkSe4Y20pUezDWxOB44rNI+ycoJlAKQSx4RmHrOVDPJGUJu23+7 Pa6hLIv5oHWsTEJAlx31tOOaMZ2jCRE6BRfg1G9loqq2dmBULD0D2C2qwLTZ9aDflALWc6XI YGFpp0CyoDilaIS33tJHVSoJgETHYGZZ8eol2MmN5VFRXaa0dVlTfI9wsSysC7sZtgadnYIU uyYTuTKut+XLyn5CuZXag5iYpIIGF4HBS44CRxuKGo3j2ou3FRWaBgKhVMg2G09Yz07Deg/E TMw16EigM46C/nr5r7U5SiSdKgNPmOjA5/iLBJHhiYLENH2zoO08xBdXzNiqY9mWXCJajTs2 L7zhhr7uF4lQYUwOQLUuDYbGLsD0P0ivt2nDQXMLWXSNJgpqiOo10BL1dPA25MDPexs85ai8 VW9A9rNrCVeXN8QcCZ9xYtQ9IoJMWFFzpCcQREjGFxkyDlwMarQZ1F9YMaNxKRIoxIysoUI5 kbV15SSJjRnB1WgFCQfcvLxjSLJg2QcQ3ZHdQZ2rHehGXESn1owEmL5TNNvX2Zw6SYci7ZZY tVS6xLWmKgtFlrVV2pnl+Ab8jENXCKmjlS7UEpqhMzTU3rCVyC23HYXIVDWGwuQbZsmAUIQF qETSMQKhauhhn0VY0pqIUXdZI0jrUgtsrowrN8CrTTbKy6JOpZzqDMMkoBZrr1bYB62RtGyZ LnOkctxEncnVI0KgT8eXFUFZyFUgZTKMYVSN2UsTTY2mdL4o0MobpNxMBmeTgTFuEWJHNOQm iYmgMrIYoKg3CrDNsMkYFpowrkzKkMaZcK4mGCQWhiHPA2RkoWajVm0be3M4uSkCTDWYazsJ EhnNy4i1bCQg0CyeQtvE0gxaDzmTyFnOmnLZo1AaT8O1CDrLCElamLQkiZiBsP/EEGQDzoD/ 4u5IpwoSC1NAWeA= --wAI/bQb0EMvlZCHl-- From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 03:15:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A5EEDF2; Wed, 15 Oct 2014 03:15:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BCC5F9A; Wed, 15 Oct 2014 03:15:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F3FldM036072; Wed, 15 Oct 2014 03:15:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F3Fltl036071; Wed, 15 Oct 2014 03:15:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201410150315.s9F3Fltl036071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 15 Oct 2014 03:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273115 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 03:15:47 -0000 Author: markj Date: Wed Oct 15 03:15:46 2014 New Revision: 273115 URL: https://svnweb.freebsd.org/changeset/base/273115 Log: Remove a build artifact of the USDT tests. MFC after: 3 days Deleted: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/main.c From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 03:18:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D899F71; Wed, 15 Oct 2014 03:18:30 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 78C5CFC0; Wed, 15 Oct 2014 03:18:28 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s9F3IQsW077294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 15 Oct 2014 07:18:26 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s9F3IQ4S077293; Wed, 15 Oct 2014 07:18:26 +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, 15 Oct 2014 07:18:26 +0400 From: Gleb Smirnoff To: Olivier =?iso-8859-1?Q?Cochard-Labb=E9?= Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys Message-ID: <20141015031826.GD73266@FreeBSD.org> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20141015030455.GC73266@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head , "George V. Neville-Neil" , svn-src-all , src-committers X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 03:18:30 -0000 On Wed, Oct 15, 2014 at 07:04:55AM +0400, Gleb Smirnoff wrote: T> On Mon, Oct 13, 2014 at 06:42:11PM +0200, Olivier Cochard-Labbé wrote: T> O> > Author: gnn T> O> > Date: Fri Oct 10 19:26:26 2014 T> O> > New Revision: 272906 T> O> > URL: https://svnweb.freebsd.org/changeset/base/272906 T> O> > T> O> > Log: T> O> > Change the PF hash from Jenkins to Murmur3. In forwarding tests T> O> > this showed a conservative 3% incrase in PPS. T> O> T> O> It's not easy to measure 3% of difference ;-) T> T> However, it is easy to estimate distribution of a hash function. Also T> doing the calculation speed test along the way. T> T> I've got very disappointing results with this murmur3 against jenkins. T> I am running 87k states just taken from a live system against a 32k T> state hash table (which is a default size). T> T> Look at results at the end of email. Guess what -j and -m mean. I T> want either proving me doing the test wrong, or backing the change T> out ASAP. And now for a generate case, which actually is a practical case. We've got an internal load balancer, where all connections come from the same IPs, making the ports only being source of entropy. We've got 198k states there. And here are results: glebius@think:~/pf/hashtest:|>./hashtest -m ../node01.apps.keys Stat overflow: 144507 -> 99 Stat overflow: 53514 -> 99 Stat overflow: 517 -> 99 0 collisions 32761 hits 1 collisions 1 hits 2 collisions 1 hits 18 collisions 1 hits 44 collisions 1 hits >99 collisions 3 hits Read 198603 keys, found 362 keys in hash Execution time 6164622 nsec Yes, 144k collisions. Simply a linear search. Jenkins does good: glebius@think:~/pf/hashtest:|>./hashtest -j ../node01.apps.keys 0 collisions 69 hits 1 collisions 465 hits 2 collisions 1393 hits 3 collisions 2829 hits 4 collisions 4205 hits 5 collisions 5231 hits 6 collisions 5405 hits 7 collisions 4613 hits 8 collisions 3360 hits 9 collisions 2371 hits 10 collisions 1357 hits 11 collisions 774 hits 12 collisions 387 hits 13 collisions 177 hits 14 collisions 76 hits 15 collisions 42 hits 16 collisions 11 hits 17 collisions 3 hits Read 198603 keys, found 198603 keys in hash Execution time 18564948 nsec -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 03:38:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC04940F; Wed, 15 Oct 2014 03:38:44 +0000 (UTC) Received: from mail-ie0-x22d.google.com (mail-ie0-x22d.google.com [IPv6:2607:f8b0:4001:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 533EB259; Wed, 15 Oct 2014 03:38:44 +0000 (UTC) Received: by mail-ie0-f173.google.com with SMTP id tp5so432383ieb.4 for ; Tue, 14 Oct 2014 20:38:43 -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:from:date:message-id :subject:to:cc:content-type; bh=8c7thCwSva9R0qUyF4Qepi7BdxMQbbCZRS6rvvFgQe4=; b=TGJSc2F+k5qh9xqYdiTNjKtG7krmfWJpwSQVySIwaKVWgDaEBoxCih+hb32vpbG/l3 DNzUtFieI5mF8Ce/cM86Tfho2JFmszZ3wGHGxdEAb0rqNw8dcSDmjBs/nk7lnLpgodh5 ANcwrUi6YIKgpEUzA53+M0SyYrArhkOEHWnpsKUBJl06eVn0iL70Mb0eRRq8ycyYw2fX mJGgaDGw/pyHE5GoeHe2WVlyvBXnAS7QO4/Y1QuRgpdygUNmSuOpCeljPXuTRppgqnMS wNuyh4bJt3Vsx0YuLu7IyxhCA6V99ikm380GwgqxIbrGnAKu+8yeJWWHLFGOUl5nXAuO 1JKg== X-Received: by 10.42.87.6 with SMTP id w6mr9102305icl.10.1413344323768; Tue, 14 Oct 2014 20:38:43 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.29.132 with HTTP; Tue, 14 Oct 2014 20:38:23 -0700 (PDT) In-Reply-To: <20141015030455.GC73266@FreeBSD.org> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> From: Ed Maste Date: Tue, 14 Oct 2014 23:38:23 -0400 X-Google-Sender-Auth: TfTbS8wsJ0rNPstqezGpPS0jbSk Message-ID: Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= , "George V. Neville-Neil" , svn-src-all , src-committers , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 03:38:44 -0000 On 14 October 2014 23:04, Gleb Smirnoff wrote: > > Look at results at the end of email. Guess what -j and -m mean. I > want either proving me doing the test wrong, or backing the change > out ASAP. It looks like there is indeed an error in the test: > h = murmur3_aligned_32((uint32_t *)&key[i], > sizeof(struct pf_state_key_cmp)/sizeof(uint32_t), murmur3's size argument is bytes, not uint32_ts, so the test is only hashing the first 1/4 of the keys. From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 04:14:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 189B68D0; Wed, 15 Oct 2014 04:14:24 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 561EC7C5; Wed, 15 Oct 2014 04:14:22 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s9F4EJ5t077519 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 15 Oct 2014 08:14:19 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s9F4EJpV077518; Wed, 15 Oct 2014 08:14:19 +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, 15 Oct 2014 08:14:19 +0400 From: Gleb Smirnoff To: Ed Maste Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys Message-ID: <20141015041418.GE73266@FreeBSD.org> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Olivier =?iso-8859-1?Q?Cochard-Labb=E9?= , "George V. Neville-Neil" , svn-src-all , src-committers , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 04:14:24 -0000 On Tue, Oct 14, 2014 at 11:38:23PM -0400, Ed Maste wrote: E> On 14 October 2014 23:04, Gleb Smirnoff wrote: E> > E> > Look at results at the end of email. Guess what -j and -m mean. I E> > want either proving me doing the test wrong, or backing the change E> > out ASAP. E> E> It looks like there is indeed an error in the test: E> E> > h = murmur3_aligned_32((uint32_t *)&key[i], E> > sizeof(struct pf_state_key_cmp)/sizeof(uint32_t), E> E> murmur3's size argument is bytes, not uint32_ts, so the test is only E> hashing the first 1/4 of the keys. Thanks a lot, Ed. I rerun the tests. Results are fine. Distribution is equal (plots attached). Murmur is 9% +/- 1.5% faster. Sorry for noise. x jenkins-time + murmur-time +------------------------------------------------------------------------------+ | ++ x | | ++ xx | |+ +++ xx | |+++++ + + xx x x x x x| | |_A_| |_____M______A_____________| | +------------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 12 8147243 8851519 8173132 8296753.8 235815.07 + 15 7502767 7655925 7547376 7551089.5 39524.149 Difference at 95.0% confidence -745664 +/- 127010 -8.98742% +/- 1.53084% (Student's t, pooled s = 159194) -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 05:17:36 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C62BF3C0; Wed, 15 Oct 2014 05:17:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2D4CCC2; Wed, 15 Oct 2014 05:17:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F5Has1011390; Wed, 15 Oct 2014 05:17:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F5HaT0011389; Wed, 15 Oct 2014 05:17:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201410150517.s9F5HaT0011389@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 15 Oct 2014 05:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273118 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 05:17:36 -0000 Author: mjg Date: Wed Oct 15 05:17:36 2014 New Revision: 273118 URL: https://svnweb.freebsd.org/changeset/base/273118 Log: Don't take devmtx unnecessarily in vn_isdisk. MFC after: 1 week Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed Oct 15 04:34:07 2014 (r273117) +++ head/sys/kern/vfs_subr.c Wed Oct 15 05:17:36 2014 (r273118) @@ -3775,17 +3775,20 @@ vn_isdisk(struct vnode *vp, int *errp) { int error; + if (vp->v_type != VCHR) { + error = ENOTBLK; + goto out; + } error = 0; dev_lock(); - if (vp->v_type != VCHR) - error = ENOTBLK; - else if (vp->v_rdev == NULL) + if (vp->v_rdev == NULL) error = ENXIO; else if (vp->v_rdev->si_devsw == NULL) error = ENXIO; else if (!(vp->v_rdev->si_devsw->d_flags & D_DISK)) error = ENOTBLK; dev_unlock(); +out: if (errp != NULL) *errp = error; return (error == 0); From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 06:10:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19415D10; Wed, 15 Oct 2014 06:10:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05CF615D; Wed, 15 Oct 2014 06:10:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F6AXwZ035793; Wed, 15 Oct 2014 06:10:33 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F6AXoi035792; Wed, 15 Oct 2014 06:10:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410150610.s9F6AXoi035792@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 15 Oct 2014 06:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273121 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 06:10:34 -0000 Author: ae Date: Wed Oct 15 06:10:33 2014 New Revision: 273121 URL: https://svnweb.freebsd.org/changeset/base/273121 Log: Add inet/inet6 to the dependency list. Without them if_gif is useless. MFC after: 1 month Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Oct 15 05:24:43 2014 (r273120) +++ head/sys/conf/files Wed Oct 15 06:10:33 2014 (r273121) @@ -3231,7 +3231,7 @@ net/if_ethersubr.c optional ether net/if_faith.c optional faith net/if_fddisubr.c optional fddi net/if_fwsubr.c optional fwip -net/if_gif.c optional gif | netgraph_gif +net/if_gif.c optional gif inet | gif inet6 | netgraph_gif net/if_gre.c optional gre inet net/if_iso88025subr.c optional token net/if_lagg.c optional lagg From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 07:09:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3641C985; Wed, 15 Oct 2014 07:09:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 227C494C; Wed, 15 Oct 2014 07:09:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F79kBp062792; Wed, 15 Oct 2014 07:09:46 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F79jhR062791; Wed, 15 Oct 2014 07:09:46 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410150709.s9F79jhR062791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 15 Oct 2014 07:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273123 - head/usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 07:09:46 -0000 Author: trasz Date: Wed Oct 15 07:09:45 2014 New Revision: 273123 URL: https://svnweb.freebsd.org/changeset/base/273123 Log: Silence down a warning that doesn't provide any useful information unless debug is enabled. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/autofs/automountd.c Modified: head/usr.sbin/autofs/automountd.c ============================================================================== --- head/usr.sbin/autofs/automountd.c Wed Oct 15 06:31:08 2014 (r273122) +++ head/usr.sbin/autofs/automountd.c Wed Oct 15 07:09:45 2014 (r273123) @@ -366,7 +366,7 @@ wait_for_children(bool block) log_warnx("child process %d terminated with signal %d", pid, WTERMSIG(status)); } else if (WEXITSTATUS(status) != 0) { - log_warnx("child process %d terminated with exit status %d", + log_debugx("child process %d terminated with exit status %d", pid, WEXITSTATUS(status)); } else { log_debugx("child process %d terminated gracefully", pid); From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 07:35:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C062614B; Wed, 15 Oct 2014 07:35:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC467BDA; Wed, 15 Oct 2014 07:35:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F7ZpQU076203; Wed, 15 Oct 2014 07:35:51 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F7ZpjW076201; Wed, 15 Oct 2014 07:35:51 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410150735.s9F7ZpjW076201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Wed, 15 Oct 2014 07:35:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273124 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 07:35:51 -0000 Author: des Date: Wed Oct 15 07:35:50 2014 New Revision: 273124 URL: https://svnweb.freebsd.org/changeset/base/273124 Log: As pointed out by several people, r273114 was incorrect: it unconditionally disabled everything except TLS 1.0. Replace it with a more carefully wrought patch: - Switch the default for SSLv3 from on to off - Add environment variables to control TLS 1.1 and 1.2 - In verbose mode, report which version is used - Update the man page to reflect these changes. MFC after: 1 week Modified: head/lib/libfetch/common.c head/lib/libfetch/fetch.3 Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Wed Oct 15 07:09:45 2014 (r273123) +++ head/lib/libfetch/common.c Wed Oct 15 07:35:50 2014 (r273124) @@ -675,10 +675,14 @@ fetch_ssl_setup_transport_layer(SSL_CTX ssl_ctx_options = SSL_OP_ALL | SSL_OP_NO_TICKET; if (getenv("SSL_ALLOW_SSL2") == NULL) ssl_ctx_options |= SSL_OP_NO_SSLv2; - if (getenv("SSL_NO_SSL3") != NULL) + if (getenv("SSL_ALLOW_SSL3") == NULL) ssl_ctx_options |= SSL_OP_NO_SSLv3; if (getenv("SSL_NO_TLS1") != NULL) ssl_ctx_options |= SSL_OP_NO_TLSv1; + if (getenv("SSL_NO_TLS1_1") != NULL) + ssl_ctx_options |= SSL_OP_NO_TLSv1_1; + if (getenv("SSL_NO_TLS1_2") != NULL) + ssl_ctx_options |= SSL_OP_NO_TLSv1_2; if (verbose) fetch_info("SSL options: %lx", ssl_ctx_options); SSL_CTX_set_options(ctx, ssl_ctx_options); @@ -820,7 +824,7 @@ fetch_ssl(conn_t *conn, const struct url SSL_load_error_strings(); - conn->ssl_meth = TLSv1_client_method(); + conn->ssl_meth = SSLv23_client_method(); conn->ssl_ctx = SSL_CTX_new(conn->ssl_meth); SSL_CTX_set_mode(conn->ssl_ctx, SSL_MODE_AUTO_RETRY); @@ -873,8 +877,8 @@ fetch_ssl(conn_t *conn, const struct url } if (verbose) { - fetch_info("SSL connection established using %s", - SSL_get_cipher(conn->ssl)); + fetch_info("%s connection established using %s", + SSL_get_version(conn->ssl), SSL_get_cipher(conn->ssl)); name = X509_get_subject_name(conn->ssl_cert); str = X509_NAME_oneline(name, 0, 0); fetch_info("Certificate subject: %s", str); Modified: head/lib/libfetch/fetch.3 ============================================================================== --- head/lib/libfetch/fetch.3 Wed Oct 15 07:09:45 2014 (r273123) +++ head/lib/libfetch/fetch.3 Wed Oct 15 07:35:50 2014 (r273124) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2013 +.Dd October 15, 2014 .Dt FETCH 3 .Os .Sh NAME @@ -438,15 +438,17 @@ input (see .Pp By default .Nm libfetch -allows SSLv3 and TLSv1 when negotiating the connecting with the remote +allows TLSv1 and newer when negotiating the connecting with the remote peer. -You can change this behavior by setting the environment variable +You can change this behavior by setting the .Ev SSL_ALLOW_SSL2 -to allow SSLv2 (not recommended) and -.Ev SSL_NO_SSL3 -or -.Ev SSL_NO_TLS1 -to disable the respective methods. +and +.Ev SSL_ALLOW_SSL3 +environment variables to allow SSLv2 and SSLv3, respectively, and +.Ev SSL_NO_TLS1 , +.Ev SSL_NO_TLS1_1 and +.Ev SSL_NO_TLS1_2 +to disable TLS 1.0, 1.1 and 1.2 respectively. .Sh AUTHENTICATION Apart from setting the appropriate environment variables and specifying the user name and password in the URL or the @@ -646,6 +648,8 @@ Same as for compatibility. .It Ev SSL_ALLOW_SSL2 Allow SSL version 2 when negotiating the connection (not recommended). +.It Ev SSL_ALLOW_SSL3 +Allow SSL version 3 when negotiating the connection (not recommended). .It Ev SSL_CA_CERT_FILE CA certificate bundle containing trusted CA certificates. Default value: @@ -660,10 +664,12 @@ PEM encoded client key in case key and c are stored separately. .It Ev SSL_CRL_FILE File containing certificate revocation list. -.It Ev SSL_NO_SSL3 -Don't allow SSL version 3 when negotiating the connection. .It Ev SSL_NO_TLS1 -Don't allow TLV version 1 when negotiating the connection. +Do not allow TLS version 1.0 when negotiating the connection. +.It Ev SSL_NO_TLS1_1 +Do not allow TLS version 1.1 when negotiating the connection. +.It Ev SSL_NO_TLS1_2 +Do not allow TLS version 1.2 when negotiating the connection. .It Ev SSL_NO_VERIFY_HOSTNAME If set, do not verify that the hostname matches the subject of the certificate presented by the server. From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 09:21:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 465E23AE; Wed, 15 Oct 2014 09:21:52 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 039788C4; Wed, 15 Oct 2014 09:21:51 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 045E8CDEC; Wed, 15 Oct 2014 09:21:51 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 1E5AB4FA6; Wed, 15 Oct 2014 11:21:52 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Maste Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> Date: Wed, 15 Oct 2014 11:21:52 +0200 In-Reply-To: (Ed Maste's message of "Tue, 14 Oct 2014 23:38:23 -0400") Message-ID: <86wq81y9fz.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers , svn-src-all , "George V. Neville-Neil" , Gleb Smirnoff , Olivier =?utf-8?Q?Cochard-Labb?= =?utf-8?Q?=C3=A9?= , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 09:21:52 -0000 Ed Maste writes: > murmur3's size argument is bytes, not uint32_ts, so the test is only > hashing the first 1/4 of the keys. That's my fault, and I'm going to change it, because it's illogical. The function works on aligned arrays of int32s and should take a count, not a size. I just didn't want to delay the patch even further. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 09:28:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B27066E; Wed, 15 Oct 2014 09:28:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1641E996; Wed, 15 Oct 2014 09:28:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F9Skoc028353; Wed, 15 Oct 2014 09:28:46 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F9SjvK028344; Wed, 15 Oct 2014 09:28:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410150928.s9F9SjvK028344@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 15 Oct 2014 09:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273127 - in head: sys/fs/autofs usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 09:28:47 -0000 Author: trasz Date: Wed Oct 15 09:28:45 2014 New Revision: 273127 URL: https://svnweb.freebsd.org/changeset/base/273127 Log: Make automountd(8) inform autofs(4) whether directory being handled can have wildcards. This makes it possible for autofs(4) to avoid requesting automountd(8) action on access to nonexistent nodes - unless wildcards are actually used. Note that this change breaks ABI for automountd(8). Tested by: dhw@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.c head/sys/fs/autofs/autofs.h head/sys/fs/autofs/autofs_ioctl.h head/usr.sbin/autofs/automountd.c head/usr.sbin/autofs/common.c head/usr.sbin/autofs/common.h Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Wed Oct 15 08:04:43 2014 (r273126) +++ head/sys/fs/autofs/autofs.c Wed Oct 15 09:28:45 2014 (r273127) @@ -274,6 +274,7 @@ autofs_task(void *context, int pending) * XXX: EIO perhaps? */ ar->ar_error = ETIMEDOUT; + ar->ar_wildcards = true; ar->ar_done = true; ar->ar_in_progress = false; cv_broadcast(&autofs_softc->sc_cv); @@ -291,12 +292,13 @@ autofs_cached(struct autofs_node *anp, c AUTOFS_ASSERT_UNLOCKED(amp); /* - * For top-level nodes we need to request automountd(8) - * assistance even if the node is marked as cached, - * but the requested subdirectory does not exist. This - * is necessary for wildcard indirect map keys to work. + * For root node we need to request automountd(8) assistance even + * if the node is marked as cached, but the requested top-level + * directory does not exist. This is necessary for wildcard indirect + * map keys to work. We don't do this if we know that there are + * no wildcards. */ - if (anp->an_parent == NULL && componentlen != 0) { + if (anp->an_parent == NULL && componentlen != 0 && anp->an_wildcards) { AUTOFS_SLOCK(amp); error = autofs_node_find(anp, component, componentlen, NULL); AUTOFS_SUNLOCK(amp); @@ -366,6 +368,7 @@ autofs_trigger_one(struct autofs_node *a struct autofs_request *ar; char *key, *path; int error = 0, request_error, last; + bool wildcards; amp = anp->an_mount; @@ -450,6 +453,8 @@ autofs_trigger_one(struct autofs_node *a ar->ar_path, request_error); } + wildcards = ar->ar_wildcards; + last = refcount_release(&ar->ar_refcount); if (last) { TAILQ_REMOVE(&autofs_softc->sc_requests, ar, ar_next); @@ -470,6 +475,7 @@ autofs_trigger_one(struct autofs_node *a */ if (error == 0 && request_error == 0 && autofs_cache > 0) { anp->an_cached = true; + anp->an_wildcards = wildcards; callout_reset(&anp->an_callout, autofs_cache * hz, autofs_cache_callout, anp); } @@ -584,6 +590,7 @@ autofs_ioctl_done(struct autofs_daemon_d } ar->ar_error = add->add_error; + ar->ar_wildcards = add->add_wildcards; ar->ar_done = true; ar->ar_in_progress = false; cv_broadcast(&autofs_softc->sc_cv); Modified: head/sys/fs/autofs/autofs.h ============================================================================== --- head/sys/fs/autofs/autofs.h Wed Oct 15 08:04:43 2014 (r273126) +++ head/sys/fs/autofs/autofs.h Wed Oct 15 09:28:45 2014 (r273127) @@ -74,6 +74,7 @@ struct autofs_node { struct vnode *an_vnode; struct sx an_vnode_lock; bool an_cached; + bool an_wildcards; struct callout an_callout; int an_retries; struct timespec an_ctime; @@ -97,6 +98,7 @@ struct autofs_request { int ar_id; bool ar_done; int ar_error; + bool ar_wildcards; bool ar_in_progress; char ar_from[MAXPATHLEN]; char ar_path[MAXPATHLEN]; Modified: head/sys/fs/autofs/autofs_ioctl.h ============================================================================== --- head/sys/fs/autofs/autofs_ioctl.h Wed Oct 15 08:04:43 2014 (r273126) +++ head/sys/fs/autofs/autofs_ioctl.h Wed Oct 15 09:28:45 2014 (r273127) @@ -78,6 +78,12 @@ struct autofs_daemon_done { int add_id; /* + * Set to 1 if the map may contain wildcard entries; + * otherwise autofs will do negative caching. + */ + int add_wildcards; + + /* * Error number, possibly returned to userland. */ int add_error; Modified: head/usr.sbin/autofs/automountd.c ============================================================================== --- head/usr.sbin/autofs/automountd.c Wed Oct 15 08:04:43 2014 (r273126) +++ head/usr.sbin/autofs/automountd.c Wed Oct 15 09:28:45 2014 (r273127) @@ -68,13 +68,14 @@ static int autofs_fd; static int request_id; static void -done(int request_error) +done(int request_error, bool wildcards) { struct autofs_daemon_done add; int error; memset(&add, 0, sizeof(add)); add.add_id = request_id; + add.add_wildcards = wildcards; add.add_error = request_error; log_debugx("completing request %d with error %d", @@ -172,7 +173,7 @@ static void exit_callback(void) { - done(EIO); + done(EIO, true); } static void @@ -184,6 +185,7 @@ handle_request(const struct autofs_daemo FILE *f; char *options, *fstype, *nobrowse, *retrycnt, *tmp; int error; + bool wildcards; log_debugx("got request %d: from %s, path %s, prefix \"%s\", " "key \"%s\", options \"%s\"", adr->adr_id, adr->adr_from, @@ -209,9 +211,26 @@ handle_request(const struct autofs_daemo checked_strdup(adr->adr_options), checked_strdup(map), checked_strdup("[kernel request]"), lineno); } - parse_map(parent, map, adr->adr_key[0] != '\0' ? adr->adr_key : NULL); + + /* + * "Wildcards" here actually means "make autofs(4) request + * automountd(8) action if the node being looked up does not + * exist, even though the parent is marked as cached". This + * needs to be done for maps with wildcard entries, but also + * for special and executable maps. + */ + parse_map(parent, map, adr->adr_key[0] != '\0' ? adr->adr_key : NULL, + &wildcards); + if (!wildcards) + wildcards = node_has_wildcards(parent); + if (wildcards) + log_debugx("map may contain wildcard entries"); + else + log_debugx("map does not contain wildcard entries"); + if (adr->adr_key[0] != '\0') node_expand_wildcard(root, adr->adr_key); + node = node_find(root, adr->adr_path); if (node == NULL) { log_errx(1, "map %s does not contain key for \"%s\"; " @@ -236,7 +255,7 @@ handle_request(const struct autofs_daemo if (nobrowse != NULL && adr->adr_key[0] == '\0') { log_debugx("skipping map %s due to \"nobrowse\" " "option; exiting", map); - done(0); + done(0, true); /* * Exit without calling exit_callback(). @@ -263,7 +282,7 @@ handle_request(const struct autofs_daemo } log_debugx("nothing to mount; exiting"); - done(0); + done(0, wildcards); /* * Exit without calling exit_callback(). @@ -337,7 +356,7 @@ handle_request(const struct autofs_daemo log_errx(1, "mount failed"); log_debugx("mount done; exiting"); - done(0); + done(0, wildcards); /* * Exit without calling exit_callback(). Modified: head/usr.sbin/autofs/common.c ============================================================================== --- head/usr.sbin/autofs/common.c Wed Oct 15 08:04:43 2014 (r273126) +++ head/usr.sbin/autofs/common.c Wed Oct 15 09:28:45 2014 (r273127) @@ -498,6 +498,19 @@ node_is_direct_map(const struct node *n) return (true); } +bool +node_has_wildcards(const struct node *n) +{ + const struct node *child; + + TAILQ_FOREACH(child, &n->n_children, n_next) { + if (strcmp(child->n_key, "*") == 0) + return (true); + } + + return (false); +} + static void node_expand_maps(struct node *n, bool indirect) { @@ -526,7 +539,7 @@ node_expand_maps(struct node *n, bool in log_debugx("map \"%s\" is a direct map, parsing", child->n_map); } - parse_map(child, child->n_map, NULL); + parse_map(child, child->n_map, NULL, NULL); } } @@ -996,7 +1009,8 @@ parse_included_map(struct node *parent, } void -parse_map(struct node *parent, const char *map, const char *key) +parse_map(struct node *parent, const char *map, const char *key, + bool *wildcards) { char *path = NULL; int error, ret; @@ -1007,8 +1021,14 @@ parse_map(struct node *parent, const cha log_debugx("parsing map \"%s\"", map); - if (map[0] == '-') + if (wildcards != NULL) + *wildcards = false; + + if (map[0] == '-') { + if (wildcards != NULL) + *wildcards = true; return (parse_special_map(parent, map, key)); + } if (map[0] == '/') { path = checked_strdup(map); @@ -1035,6 +1055,9 @@ parse_map(struct node *parent, const cha if (executable) { log_debugx("map \"%s\" is executable", map); + if (wildcards != NULL) + *wildcards = true; + if (key != NULL) { yyin = auto_popen(path, key, NULL); } else { Modified: head/usr.sbin/autofs/common.h ============================================================================== --- head/usr.sbin/autofs/common.h Wed Oct 15 08:04:43 2014 (r273126) +++ head/usr.sbin/autofs/common.h Wed Oct 15 09:28:45 2014 (r273127) @@ -80,6 +80,7 @@ struct node *node_new_map(struct node *p char *map, const char *config_file, int config_line); struct node *node_find(struct node *root, const char *mountpoint); bool node_is_direct_map(const struct node *n); +bool node_has_wildcards(const struct node *n); char *node_path(const struct node *n); char *node_options(const struct node *n); void node_expand_ampersand(struct node *root, const char *key); @@ -88,7 +89,8 @@ int node_expand_defined(struct node *roo void node_expand_indirect_maps(struct node *n); void node_print(const struct node *n); void parse_master(struct node *root, const char *path); -void parse_map(struct node *parent, const char *map, const char *args); +void parse_map(struct node *parent, const char *map, const char *args, + bool *wildcards); char *defined_expand(const char *string); void defined_init(void); void defined_parse_and_add(char *def); From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 12:38:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 967489D7; Wed, 15 Oct 2014 12:38:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82CA911E; Wed, 15 Oct 2014 12:38:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FCcRK4018201; Wed, 15 Oct 2014 12:38:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FCcRMe018200; Wed, 15 Oct 2014 12:38:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410151238.s9FCcRMe018200@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Oct 2014 12:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273129 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 12:38:27 -0000 Author: kib Date: Wed Oct 15 12:38:26 2014 New Revision: 273129 URL: https://svnweb.freebsd.org/changeset/base/273129 Log: Implement FIODTYPE for master ptys. Requested and reviewed by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/tty_pts.c Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Wed Oct 15 12:37:56 2014 (r273128) +++ head/sys/kern/tty_pts.c Wed Oct 15 12:38:26 2014 (r273129) @@ -262,6 +262,9 @@ ptsdev_ioctl(struct file *fp, u_long cmd int error = 0, sig; switch (cmd) { + case FIODTYPE: + *(int *)data = D_TTY; + return (0); case FIONBIO: /* This device supports non-blocking operation. */ return (0); From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 13:08:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BDD3134; Wed, 15 Oct 2014 13:08:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBF8C405; Wed, 15 Oct 2014 13:08:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FD8rct032850; Wed, 15 Oct 2014 13:08:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FD8rY4032849; Wed, 15 Oct 2014 13:08:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410151308.s9FD8rY4032849@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Oct 2014 13:08:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273130 - head/sys/fs/deadfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 13:08:54 -0000 Author: kib Date: Wed Oct 15 13:08:53 2014 New Revision: 273130 URL: https://svnweb.freebsd.org/changeset/base/273130 Log: Change the deadfs poll VOP to return POLLIN|POLLRDNORM if the caller is interested in i/o state. Return POLLNVAL for invalid bits, similar to poll_no_poll(). Note that POLLOUT must not be returned, since POLLHUP is set. Noted and reviewed by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/deadfs/dead_vnops.c Modified: head/sys/fs/deadfs/dead_vnops.c ============================================================================== --- head/sys/fs/deadfs/dead_vnops.c Wed Oct 15 12:38:26 2014 (r273129) +++ head/sys/fs/deadfs/dead_vnops.c Wed Oct 15 13:08:53 2014 (r273130) @@ -163,16 +163,19 @@ dead_write(ap) return (EIO); } -/* - * Trivial poll routine that always returns POLLHUP. - * This is necessary so that a process which is polling a file - * gets notified when that file is revoke()d. - */ static int dead_poll(ap) struct vop_poll_args *ap; { - return (POLLHUP); + + if (ap->a_events & ~POLLSTANDARD) + return (POLLNVAL); + + /* + * Let the user find out that the descriptor is gone. + */ + return (POLLHUP | ((POLLIN | POLLRDNORM) & ap->a_events)); + } static int From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 13:10:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F66D29F; Wed, 15 Oct 2014 13:10:32 +0000 (UTC) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13F235FA; Wed, 15 Oct 2014 13:10:32 +0000 (UTC) Received: by mail-ie0-f178.google.com with SMTP id rl12so1140392iec.37 for ; Wed, 15 Oct 2014 06:10:31 -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:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=IzKo5fCyQgH0hQrIeiYB7V9vw5F5CXQVn7X5fLYvoeA=; b=RKyGjHzFe1nJzW8TyYE5hHji08p5DqaG/3aTVNcFsVmafAgQd5M90xlFhBTw0v9rET KVr9FQ1bAzpgtFoiGsYxYcXS+zWan7OP7kdUgHMdPl4r3dVZwr7W23Mc712jMGkJOcD2 ZsE6hpGP2Gm+kR0MYAAnXHQpzjpV38142syTtJV0ETuQbhR8jhgHxDUEqdx7mp0h69Bg UnMFZTX6cJnlMYex6xZjOyeW25eEnsoAR+p06Ba0e0K3DelnsAKhpnFk0QX06XZqEGQY mu3/sDXeSk/3OtzuO4ScBTZbitTHb24GFzJ3dPUwjYf/XMkN+rVvmOOKi1FK6flUB36p mZpQ== X-Received: by 10.107.130.136 with SMTP id m8mr9385265ioi.8.1413378631484; Wed, 15 Oct 2014 06:10:31 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.29.132 with HTTP; Wed, 15 Oct 2014 06:10:10 -0700 (PDT) In-Reply-To: <86wq81y9fz.fsf@nine.des.no> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> <86wq81y9fz.fsf@nine.des.no> From: Ed Maste Date: Wed, 15 Oct 2014 09:10:10 -0400 X-Google-Sender-Auth: dxIcJPG_GCx-eXWj9P0W6MDY6DI Message-ID: Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers , svn-src-all , "George V. Neville-Neil" , Gleb Smirnoff , =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 13:10:32 -0000 On 15 October 2014 05:21, Dag-Erling Sm=C3=B8rgrav wrote: > > That's my fault, and I'm going to change it, because it's illogical. > The function works on aligned arrays of int32s and should take a count, > not a size. I just didn't want to delay the patch even further. The fact that it works only on aligned 32-bit ints is a detail of this implementation and not a requirement of murmur3 though. AFAICT common implementations treat this case as an optimization but handle arbitrarily aligned buffers of arbitrary numbers of bytes, as is the case for other hashes in my quick survey. The reference Jenkins hash looks to be the odd one out here in taking a uint32_t * and a count rather than a char * or void * and a byte length. From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 13:16:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 379E74AB; Wed, 15 Oct 2014 13:16:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 180AE6D6; Wed, 15 Oct 2014 13:16:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FDGqTq037432; Wed, 15 Oct 2014 13:16:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FDGqMF037429; Wed, 15 Oct 2014 13:16:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410151316.s9FDGqMF037429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Oct 2014 13:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273131 - in head/sys: fs/deadfs fs/devfs sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 13:16:53 -0000 Author: kib Date: Wed Oct 15 13:16:51 2014 New Revision: 273131 URL: https://svnweb.freebsd.org/changeset/base/273131 Log: When vnode bypass cannot be performed on the cdev file descriptor for read/write/poll/ioctl, call standard vnode filedescriptor fop. This restores the special handling for terminals by calling the deadfs VOP, instead of always returning ENXIO for destroyed devices or revoked terminals. Since destroyed (and not revoked) device would use devfs_specops VOP vector, make dead_read/write/poll non-static and fill VOP table with pointers to the functions, to instead of VOP_PANIC. Noted and reviewed by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/deadfs/dead_vnops.c head/sys/fs/devfs/devfs_vnops.c head/sys/sys/vnode.h Modified: head/sys/fs/deadfs/dead_vnops.c ============================================================================== --- head/sys/fs/deadfs/dead_vnops.c Wed Oct 15 13:08:53 2014 (r273130) +++ head/sys/fs/deadfs/dead_vnops.c Wed Oct 15 13:16:51 2014 (r273131) @@ -43,9 +43,6 @@ */ static vop_lookup_t dead_lookup; static vop_open_t dead_open; -static vop_poll_t dead_poll; -static vop_read_t dead_read; -static vop_write_t dead_write; static vop_getwritemount_t dead_getwritemount; static vop_rename_t dead_rename; @@ -130,7 +127,7 @@ dead_open(ap) * Vnode op for read */ /* ARGSUSED */ -static int +int dead_read(ap) struct vop_read_args /* { struct vnode *a_vp; @@ -151,7 +148,7 @@ dead_read(ap) * Vnode op for write */ /* ARGSUSED */ -static int +int dead_write(ap) struct vop_write_args /* { struct vnode *a_vp; @@ -163,7 +160,7 @@ dead_write(ap) return (EIO); } -static int +int dead_poll(ap) struct vop_poll_args *ap; { Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Wed Oct 15 13:08:53 2014 (r273130) +++ head/sys/fs/devfs/devfs_vnops.c Wed Oct 15 13:16:51 2014 (r273131) @@ -737,8 +737,10 @@ devfs_ioctl_f(struct file *fp, u_long co fpop = td->td_fpop; error = devfs_fp_check(fp, &dev, &dsw, &ref); - if (error) + if (error != 0) { + error = vnops.fo_ioctl(fp, com, data, cred, td); return (error); + } if (com == FIODTYPE) { *(int *)data = dsw->d_flags & D_TYPEMASK; @@ -1152,8 +1154,10 @@ devfs_poll_f(struct file *fp, int events fpop = td->td_fpop; error = devfs_fp_check(fp, &dev, &dsw, &ref); - if (error) - return (poll_no_poll(events)); + if (error != 0) { + error = vnops.fo_poll(fp, events, cred, td); + return (error); + } error = dsw->d_poll(dev, events, td); td->td_fpop = fpop; dev_relthread(dev, ref); @@ -1185,8 +1189,10 @@ devfs_read_f(struct file *fp, struct uio return (EINVAL); fpop = td->td_fpop; error = devfs_fp_check(fp, &dev, &dsw, &ref); - if (error) + if (error != 0) { + error = vnops.fo_read(fp, uio, cred, flags, td); return (error); + } resid = uio->uio_resid; ioflag = fp->f_flag & (O_NONBLOCK | O_DIRECT); if (ioflag & O_DIRECT) @@ -1660,8 +1666,10 @@ devfs_write_f(struct file *fp, struct ui return (EINVAL); fpop = td->td_fpop; error = devfs_fp_check(fp, &dev, &dsw, &ref); - if (error) + if (error != 0) { + error = vnops.fo_write(fp, uio, cred, flags, td); return (error); + } KASSERT(uio->uio_td == td, ("uio_td %p is not td %p", uio->uio_td, td)); ioflag = fp->f_flag & (O_NONBLOCK | O_DIRECT | O_FSYNC); if (ioflag & O_DIRECT) @@ -1744,8 +1752,9 @@ static struct vop_vector devfs_specops = .vop_mknod = VOP_PANIC, .vop_open = devfs_open, .vop_pathconf = devfs_pathconf, + .vop_poll = dead_poll, .vop_print = devfs_print, - .vop_read = VOP_PANIC, + .vop_read = dead_read, .vop_readdir = VOP_PANIC, .vop_readlink = VOP_PANIC, .vop_reallocblks = VOP_PANIC, @@ -1761,7 +1770,7 @@ static struct vop_vector devfs_specops = .vop_strategy = VOP_PANIC, .vop_symlink = VOP_PANIC, .vop_vptocnp = devfs_vptocnp, - .vop_write = VOP_PANIC, + .vop_write = dead_write, }; /* Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed Oct 15 13:08:53 2014 (r273130) +++ head/sys/sys/vnode.h Wed Oct 15 13:16:51 2014 (r273131) @@ -758,6 +758,9 @@ int vop_enoent(struct vop_generic_args * int vop_enotty(struct vop_generic_args *ap); int vop_null(struct vop_generic_args *ap); int vop_panic(struct vop_generic_args *ap); +int dead_poll(struct vop_poll_args *ap); +int dead_read(struct vop_read_args *ap); +int dead_write(struct vop_write_args *ap); /* These are called from within the actual VOPS. */ void vop_create_post(void *a, int rc); From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 13:22:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DC1B636; Wed, 15 Oct 2014 13:22:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FD947E9; Wed, 15 Oct 2014 13:22:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FDMXMc041563; Wed, 15 Oct 2014 13:22:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FDMXSf041562; Wed, 15 Oct 2014 13:22:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410151322.s9FDMXSf041562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Oct 2014 13:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273132 - head/sys/fs/deadfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 13:22:34 -0000 Author: kib Date: Wed Oct 15 13:22:33 2014 New Revision: 273132 URL: https://svnweb.freebsd.org/changeset/base/273132 Log: Style changes for deadfs: - ANSIfy VOPs. - Remove trivial comments. - Remove ARGSUSED. - Remove copies of the vop_XXX_args structure definitions in comments. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/deadfs/dead_vnops.c Modified: head/sys/fs/deadfs/dead_vnops.c ============================================================================== --- head/sys/fs/deadfs/dead_vnops.c Wed Oct 15 13:16:51 2014 (r273131) +++ head/sys/fs/deadfs/dead_vnops.c Wed Oct 15 13:22:33 2014 (r273132) @@ -77,14 +77,10 @@ struct vop_vector dead_vnodeops = { .vop_write = dead_write, }; -/* ARGSUSED */ static int -dead_getwritemount(ap) - struct vop_getwritemount_args /* { - struct vnode *a_vp; - struct mount **a_mpp; - } */ *ap; +dead_getwritemount(struct vop_getwritemount_args *ap) { + *(ap->a_mpp) = NULL; return (0); } @@ -92,14 +88,8 @@ dead_getwritemount(ap) /* * Trivial lookup routine that always fails. */ -/* ARGSUSED */ static int -dead_lookup(ap) - struct vop_lookup_args /* { - struct vnode * a_dvp; - struct vnode ** a_vpp; - struct componentname * a_cnp; - } */ *ap; +dead_lookup(struct vop_lookup_args *ap) { *ap->a_vpp = NULL; @@ -109,33 +99,17 @@ dead_lookup(ap) /* * Open always fails as if device did not exist. */ -/* ARGSUSED */ static int -dead_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; +dead_open(struct vop_open_args *ap) { return (ENXIO); } -/* - * Vnode op for read - */ -/* ARGSUSED */ int -dead_read(ap) - struct vop_read_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +dead_read(struct vop_read_args *ap) { + /* * Return EOF for tty devices, EIO for others */ @@ -144,25 +118,15 @@ dead_read(ap) return (0); } -/* - * Vnode op for write - */ -/* ARGSUSED */ int -dead_write(ap) - struct vop_write_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +dead_write(struct vop_write_args *ap) { + return (EIO); } int -dead_poll(ap) - struct vop_poll_args *ap; +dead_poll(struct vop_poll_args *ap) { if (ap->a_events & ~POLLSTANDARD) @@ -176,15 +140,7 @@ dead_poll(ap) } static int -dead_rename(ap) - struct vop_rename_args /* { - struct vnode *a_fdvp; - struct vnode *a_fvp; - struct componentname *a_fcnp; - struct vnode *a_tdvp; - struct vnode *a_tvp; - struct componentname *a_tcnp; - } */ *ap; +dead_rename(struct vop_rename_args *ap) { vop_rename_fail(ap); From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 13:40:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3A27C6D; Wed, 15 Oct 2014 13:40:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB30592B; Wed, 15 Oct 2014 13:40:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FDebDL049819; Wed, 15 Oct 2014 13:40:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FDeUFQ049767; Wed, 15 Oct 2014 13:40:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410151340.s9FDeUFQ049767@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 15 Oct 2014 13:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273135 - in head/sys: contrib/rdma/krping dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/drivers/infiniband/ulp/i... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 13:40:38 -0000 Author: hselasky Date: Wed Oct 15 13:40:29 2014 New Revision: 273135 URL: https://svnweb.freebsd.org/changeset/base/273135 Log: Update the OFED Linux compatibility layer and Mellanox hardware driver(s): - Properly name an inclusion guard - Fix compile warnings regarding unsigned enums - Add two new sysctl nodes - Remove all empty linux header files - Make an error printout more verbose - Use "mod_delayed_work()" instead of cancelling and starting a timeout. - Implement more Linux scatterlist functions. MFC after: 3 days Sponsored by: Mellanox Technologies Deleted: head/sys/ofed/drivers/net/mlx4/en_frag.c head/sys/ofed/drivers/net/mlx4/en_params.c head/sys/ofed/drivers/net/mlx4/xrcd.c head/sys/ofed/include/asm/page.h head/sys/ofed/include/linux/ethtool.h head/sys/ofed/include/linux/inet.h head/sys/ofed/include/linux/mount.h Modified: head/sys/contrib/rdma/krping/krping.c head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h head/sys/ofed/drivers/infiniband/core/addr.c head/sys/ofed/drivers/infiniband/core/agent.c head/sys/ofed/drivers/infiniband/core/ucm.c head/sys/ofed/drivers/infiniband/core/uverbs_main.c head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c head/sys/ofed/drivers/net/mlx4/Makefile head/sys/ofed/drivers/net/mlx4/en_ethtool.c head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/drivers/net/mlx4/en_selftest.c head/sys/ofed/drivers/net/mlx4/en_tx.c head/sys/ofed/drivers/net/mlx4/pd.c head/sys/ofed/include/linux/completion.h head/sys/ofed/include/linux/etherdevice.h head/sys/ofed/include/linux/linux_compat.c head/sys/ofed/include/linux/mlx4/device.h head/sys/ofed/include/linux/mlx4/driver.h head/sys/ofed/include/linux/netdevice.h head/sys/ofed/include/linux/scatterlist.h head/sys/ofed/include/linux/vmalloc.h head/sys/ofed/include/rdma/ib_addr.h head/sys/ofed/include/rdma/ib_smi.h head/sys/ofed/include/rdma/ib_user_cm.h Modified: head/sys/contrib/rdma/krping/krping.c ============================================================================== --- head/sys/contrib/rdma/krping/krping.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/contrib/rdma/krping/krping.c Wed Oct 15 13:40:29 2014 (r273135) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Oct 15 13:40:29 2014 (r273135) @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/addr.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/infiniband/core/addr.c Wed Oct 15 13:40:29 2014 (r273135) @@ -35,10 +35,15 @@ #include #include +#include #include +#include +#include #include #include #include +#include + MODULE_AUTHOR("Sean Hefty"); MODULE_DESCRIPTION("IB Address Translation"); @@ -189,13 +194,11 @@ static void set_timeout(unsigned long ti { unsigned long delay; - cancel_delayed_work(&work); - delay = time - jiffies; if ((long)delay <= 0) delay = 1; - queue_delayed_work(addr_wq, &work, delay); + mod_delayed_work(addr_wq, &work, delay); } static void queue_req(struct addr_req *req) @@ -620,7 +623,7 @@ static struct notifier_block nb = { .notifier_call = netevent_callback }; -static int addr_init(void) +static int __init addr_init(void) { INIT_DELAYED_WORK(&work, process_req); addr_wq = create_singlethread_workqueue("ib_addr"); @@ -631,7 +634,7 @@ static int addr_init(void) return 0; } -static void addr_cleanup(void) +static void __exit addr_cleanup(void) { unregister_netevent_notifier(&nb); destroy_workqueue(addr_wq); Modified: head/sys/ofed/drivers/infiniband/core/agent.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/agent.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/infiniband/core/agent.c Wed Oct 15 13:40:29 2014 (r273135) @@ -101,7 +101,8 @@ void agent_send_response(struct ib_mad * agent = port_priv->agent[qpn]; ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num); if (IS_ERR(ah)) { - printk(KERN_ERR SPFX "ib_create_ah_from_wc error\n"); + printk(KERN_ERR SPFX "ib_create_ah_from_wc error %ld\n", + PTR_ERR(ah)); return; } Modified: head/sys/ofed/drivers/infiniband/core/ucm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ucm.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/infiniband/core/ucm.c Wed Oct 15 13:40:29 2014 (r273135) @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed Oct 15 13:40:29 2014 (r273135) @@ -40,7 +40,6 @@ #include #include #include -#include #include #include Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c Wed Oct 15 13:40:29 2014 (r273135) @@ -38,7 +38,6 @@ #include #include -#include #include #include "mlx4_ib.h" Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h Wed Oct 15 13:40:29 2014 (r273135) @@ -34,7 +34,7 @@ #ifndef MTHCA_CONFIG_REG_H #define MTHCA_CONFIG_REG_H -#include +#include #define MTHCA_HCR_BASE 0x80680 #define MTHCA_HCR_SIZE 0x0001c Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c Wed Oct 15 13:40:29 2014 (r273135) @@ -36,7 +36,7 @@ #include #include -#include +#include #include "mthca_memfree.h" #include "mthca_dev.h" Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c Wed Oct 15 13:40:29 2014 (r273135) @@ -30,7 +30,7 @@ * SOFTWARE. */ -#include /* PAGE_SHIFT */ +#include #include "mthca_dev.h" #include "mthca_memfree.h" Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c Wed Oct 15 13:40:29 2014 (r273135) @@ -31,7 +31,6 @@ */ #include -#include #include #include "ipoib.h" Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c Wed Oct 15 13:40:29 2014 (r273135) @@ -32,7 +32,6 @@ */ #include "ipoib.h" -#include int ipoib_mcast_attach(struct ipoib_dev_priv *priv, u16 mlid, union ib_gid *mgid, int set_qkey) { Modified: head/sys/ofed/drivers/net/mlx4/Makefile ============================================================================== --- head/sys/ofed/drivers/net/mlx4/Makefile Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/net/mlx4/Makefile Wed Oct 15 13:40:29 2014 (r273135) @@ -31,4 +31,3 @@ opt_inet6.h: .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} - Modified: head/sys/ofed/drivers/net/mlx4/en_ethtool.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_ethtool.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/net/mlx4/en_ethtool.c Wed Oct 15 13:40:29 2014 (r273135) @@ -32,7 +32,6 @@ */ #include -#include #include #include #include Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Wed Oct 15 13:40:29 2014 (r273135) @@ -2335,9 +2335,11 @@ static void mlx4_en_sysctl_conf(struct m struct sysctl_oid_list *node_list; struct sysctl_oid *coal; struct sysctl_oid_list *coal_list; + const char *pnameunit; dev = priv->dev; ctx = &priv->conf_ctx; + pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); sysctl_ctx_init(ctx); priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), @@ -2350,10 +2352,10 @@ static void mlx4_en_sysctl_conf(struct m CTLFLAG_RW, &priv->msg_enable, 0, "Driver message enable bitfield"); SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "rx_rings", - CTLTYPE_INT | CTLFLAG_RD, &priv->rx_ring_num, 0, + CTLFLAG_RD, &priv->rx_ring_num, 0, "Number of receive rings"); SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_rings", - CTLTYPE_INT | CTLFLAG_RD, &priv->tx_ring_num, 0, + CTLFLAG_RD, &priv->tx_ring_num, 0, "Number of transmit rings"); SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "rx_size", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, @@ -2367,6 +2369,12 @@ static void mlx4_en_sysctl_conf(struct m SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "rx_ppp", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, mlx4_en_set_rx_ppp, "I", "RX Per-priority pause"); + SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "port_num", + CTLFLAG_RD, &priv->port, 0, + "Port Number"); + SYSCTL_ADD_STRING(ctx, node_list, OID_AUTO, "device_name", + CTLFLAG_RD, __DECONST(void *, pnameunit), 0, + "PCI device name"); /* Add coalescer configuration. */ coal = SYSCTL_ADD_NODE(ctx, node_list, OID_AUTO, Modified: head/sys/ofed/drivers/net/mlx4/en_selftest.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_selftest.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/net/mlx4/en_selftest.c Wed Oct 15 13:40:29 2014 (r273135) @@ -32,7 +32,6 @@ */ #include -#include #include #include #include Modified: head/sys/ofed/drivers/net/mlx4/en_tx.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_tx.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/net/mlx4/en_tx.c Wed Oct 15 13:40:29 2014 (r273135) @@ -31,7 +31,7 @@ * */ -#include +#include #include #include #include Modified: head/sys/ofed/drivers/net/mlx4/pd.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/pd.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/drivers/net/mlx4/pd.c Wed Oct 15 13:40:29 2014 (r273135) @@ -35,7 +35,7 @@ #include #include -#include +#include #include "mlx4.h" #include "icm.h" Modified: head/sys/ofed/include/linux/completion.h ============================================================================== --- head/sys/ofed/include/linux/completion.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/linux/completion.h Wed Oct 15 13:40:29 2014 (r273135) @@ -27,8 +27,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _FBSD_COMPLETION_H_ -#define _FBSD_COMPLETION_H_ +#ifndef _LINUX_COMPLETION_H_ +#define _LINUX_COMPLETION_H_ #include Modified: head/sys/ofed/include/linux/etherdevice.h ============================================================================== --- head/sys/ofed/include/linux/etherdevice.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/linux/etherdevice.h Wed Oct 15 13:40:29 2014 (r273135) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Mellanox Technologies, Ltd. All rights reserved. * Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/linux/linux_compat.c Wed Oct 15 13:40:29 2014 (r273135) @@ -588,15 +588,15 @@ struct fileops linuxfileops = { .fo_read = linux_file_read, .fo_write = invfo_rdwr, .fo_truncate = invfo_truncate, - .fo_ioctl = linux_file_ioctl, - .fo_poll = linux_file_poll, .fo_kqfilter = invfo_kqfilter, .fo_stat = linux_file_stat, + .fo_fill_kinfo = linux_file_fill_kinfo, + .fo_poll = linux_file_poll, .fo_close = linux_file_close, + .fo_ioctl = linux_file_ioctl, .fo_chmod = invfo_chmod, .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, - .fo_fill_kinfo = linux_file_fill_kinfo, }; /* Modified: head/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- head/sys/ofed/include/linux/mlx4/device.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/linux/mlx4/device.h Wed Oct 15 13:40:29 2014 (r273135) @@ -1036,6 +1036,7 @@ enum mlx4_net_trans_rule_id { MLX4_NET_TRANS_RULE_ID_TCP, MLX4_NET_TRANS_RULE_ID_UDP, MLX4_NET_TRANS_RULE_NUM, /* should be last */ + MLX4_NET_TRANS_RULE_DUMMY = -1, /* force enum to be signed */ }; extern const u16 __sw_id_hw[]; @@ -1058,6 +1059,7 @@ enum mlx4_net_trans_promisc_mode { MLX4_FS_UC_SNIFFER, MLX4_FS_MC_SNIFFER, MLX4_FS_MODE_NUM, /* should be last */ + MLX4_FS_MODE_DUMMY = -1, /* force enum to be signed */ }; struct mlx4_spec_eth { Modified: head/sys/ofed/include/linux/mlx4/driver.h ============================================================================== --- head/sys/ofed/include/linux/mlx4/driver.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/linux/mlx4/driver.h Wed Oct 15 13:40:29 2014 (r273135) @@ -121,7 +121,7 @@ void *mlx4_get_protocol_dev(struct mlx4_ #ifndef ETH_ALEN #define ETH_ALEN 6 #endif -static inline u64 mlx4_mac_to_u64(u8 *addr) +static inline u64 mlx4_mac_to_u64(const u8 *addr) { u64 mac = 0; int i; Modified: head/sys/ofed/include/linux/netdevice.h ============================================================================== --- head/sys/ofed/include/linux/netdevice.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/linux/netdevice.h Wed Oct 15 13:40:29 2014 (r273135) @@ -40,7 +40,6 @@ #include #include -#include #include #include #include Modified: head/sys/ofed/include/linux/scatterlist.h ============================================================================== --- head/sys/ofed/include/linux/scatterlist.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/linux/scatterlist.h Wed Oct 15 13:40:29 2014 (r273135) @@ -31,6 +31,21 @@ #define _LINUX_SCATTERLIST_H_ #include +#include + +/* + * SG table design. + * + * If flags bit 0 is set, then the sg field contains a pointer to the next sg + * table list. Otherwise the next entry is at sg + 1, can be determined using + * the sg_is_chain() function. + * + * If flags bit 1 is set, then this sg entry is the last element in a list, + * can be determined using the sg_is_last() function. + * + * See sg_next(). + * + */ struct scatterlist { union { @@ -49,6 +64,12 @@ struct sg_table { unsigned int orig_nents; /* original size of list */ }; +/* + * Maximum number of entries that will be allocated in one piece, if + * a list larger than this is required then chaining will be utilized. + */ +#define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) + #define sg_dma_address(sg) (sg)->address #define sg_dma_len(sg) (sg)->length #define sg_page(sg) (sg)->sl_un.page @@ -99,6 +120,212 @@ sg_phys(struct scatterlist *sg) return sg_page(sg)->phys_addr + sg->offset; } +/** + * sg_chain - Chain two sglists together + * @prv: First scatterlist + * @prv_nents: Number of entries in prv + * @sgl: Second scatterlist + * + * Description: + * Links @prv@ and @sgl@ together, to form a longer scatterlist. + * + **/ +static inline void +sg_chain(struct scatterlist *prv, unsigned int prv_nents, + struct scatterlist *sgl) +{ +/* + * offset and length are unused for chain entry. Clear them. + */ + struct scatterlist *sg = &prv[prv_nents - 1]; + + sg->offset = 0; + sg->length = 0; + + /* + * Indicate a link pointer, and set the link to the second list. + */ + sg->flags = SG_CHAIN; + sg->sl_un.sg = sgl; +} + +/** + * sg_mark_end - Mark the end of the scatterlist + * @sg: SG entryScatterlist + * + * Description: + * Marks the passed in sg entry as the termination point for the sg + * table. A call to sg_next() on this entry will return NULL. + * + **/ +static inline void sg_mark_end(struct scatterlist *sg) +{ + sg->flags = SG_END; +} + +/** + * __sg_free_table - Free a previously mapped sg table + * @table: The sg table header to use + * @max_ents: The maximum number of entries per single scatterlist + * + * Description: + * Free an sg table previously allocated and setup with + * __sg_alloc_table(). The @max_ents value must be identical to + * that previously used with __sg_alloc_table(). + * + **/ +static inline void +__sg_free_table(struct sg_table *table, unsigned int max_ents) +{ + struct scatterlist *sgl, *next; + + if (unlikely(!table->sgl)) + return; + + sgl = table->sgl; + while (table->orig_nents) { + unsigned int alloc_size = table->orig_nents; + unsigned int sg_size; + + /* + * If we have more than max_ents segments left, + * then assign 'next' to the sg table after the current one. + * sg_size is then one less than alloc size, since the last + * element is the chain pointer. + */ + if (alloc_size > max_ents) { + next = sgl[max_ents - 1].sl_un.sg; + alloc_size = max_ents; + sg_size = alloc_size - 1; + } else { + sg_size = alloc_size; + next = NULL; + } + + table->orig_nents -= sg_size; + kfree(sgl); + sgl = next; + } + + table->sgl = NULL; +} + +/** + * sg_free_table - Free a previously allocated sg table + * @table: The mapped sg table header + * + **/ +static inline void +sg_free_table(struct sg_table *table) +{ + __sg_free_table(table, SG_MAX_SINGLE_ALLOC); +} + +/** + * __sg_alloc_table - Allocate and initialize an sg table with given allocator + * @table: The sg table header to use + * @nents: Number of entries in sg list + * @max_ents: The maximum number of entries the allocator returns per call + * @gfp_mask: GFP allocation mask + * + * Description: + * This function returns a @table @nents long. The allocator is + * defined to return scatterlist chunks of maximum size @max_ents. + * Thus if @nents is bigger than @max_ents, the scatterlists will be + * chained in units of @max_ents. + * + * Notes: + * If this function returns non-0 (eg failure), the caller must call + * __sg_free_table() to cleanup any leftover allocations. + * + **/ +static inline int +__sg_alloc_table(struct sg_table *table, unsigned int nents, + unsigned int max_ents, gfp_t gfp_mask) +{ + struct scatterlist *sg, *prv; + unsigned int left; + + memset(table, 0, sizeof(*table)); + + if (nents == 0) + return -EINVAL; + left = nents; + prv = NULL; + do { + unsigned int sg_size, alloc_size = left; + + if (alloc_size > max_ents) { + alloc_size = max_ents; + sg_size = alloc_size - 1; + } else + sg_size = alloc_size; + + left -= sg_size; + + sg = kmalloc(alloc_size * sizeof(struct scatterlist), gfp_mask); + if (unlikely(!sg)) { + /* + * Adjust entry count to reflect that the last + * entry of the previous table won't be used for + * linkage. Without this, sg_kfree() may get + * confused. + */ + if (prv) + table->nents = ++table->orig_nents; + + return -ENOMEM; + } + + sg_init_table(sg, alloc_size); + table->nents = table->orig_nents += sg_size; + + /* + * If this is the first mapping, assign the sg table header. + * If this is not the first mapping, chain previous part. + */ + if (prv) + sg_chain(prv, max_ents, sg); + else + table->sgl = sg; + + /* + * If no more entries after this one, mark the end + */ + if (!left) + sg_mark_end(&sg[sg_size - 1]); + + prv = sg; + } while (left); + + return 0; +} + +/** + * sg_alloc_table - Allocate and initialize an sg table + * @table: The sg table header to use + * @nents: Number of entries in sg list + * @gfp_mask: GFP allocation mask + * + * Description: + * Allocate and initialize an sg table. If @nents@ is larger than + * SG_MAX_SINGLE_ALLOC a chained sg table will be setup. + * + **/ + +static inline int +sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask) +{ + int ret; + + ret = __sg_alloc_table(table, nents, SG_MAX_SINGLE_ALLOC, + gfp_mask); + if (unlikely(ret)) + __sg_free_table(table, SG_MAX_SINGLE_ALLOC); + + return ret; +} + #define for_each_sg(sglist, sg, sgmax, _itr) \ for (_itr = 0, sg = (sglist); _itr < (sgmax); _itr++, sg = sg_next(sg)) Modified: head/sys/ofed/include/linux/vmalloc.h ============================================================================== --- head/sys/ofed/include/linux/vmalloc.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/linux/vmalloc.h Wed Oct 15 13:40:29 2014 (r273135) @@ -30,7 +30,7 @@ #ifndef _LINUX_VMALLOC_H_ #define _LINUX_VMALLOC_H_ -#include +#include #define VM_MAP 0x0000 #define PAGE_KERNEL 0x0000 Modified: head/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- head/sys/ofed/include/rdma/ib_addr.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/rdma/ib_addr.h Wed Oct 15 13:40:29 2014 (r273135) @@ -41,7 +41,6 @@ #include #include #include -#include #include struct rdma_addr_client { Modified: head/sys/ofed/include/rdma/ib_smi.h ============================================================================== --- head/sys/ofed/include/rdma/ib_smi.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/rdma/ib_smi.h Wed Oct 15 13:40:29 2014 (r273135) @@ -38,6 +38,7 @@ #define IB_SMI_H #include +#include #define IB_SMP_DATA_SIZE 64 #define IB_SMP_MAX_PATH_HOPS 64 Modified: head/sys/ofed/include/rdma/ib_user_cm.h ============================================================================== --- head/sys/ofed/include/rdma/ib_user_cm.h Wed Oct 15 13:39:00 2014 (r273134) +++ head/sys/ofed/include/rdma/ib_user_cm.h Wed Oct 15 13:40:29 2014 (r273135) @@ -34,6 +34,7 @@ #ifndef IB_USER_CM_H #define IB_USER_CM_H +#include #include #define IB_USER_CM_ABI_VERSION 5 From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 15:05:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C06334DE; Wed, 15 Oct 2014 15:05:35 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7BAF42F1; Wed, 15 Oct 2014 15:05:35 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 1DDF0C39B; Wed, 15 Oct 2014 15:05:33 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 4B52E4FE7; Wed, 15 Oct 2014 17:05:34 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Maste Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> <86wq81y9fz.fsf@nine.des.no> Date: Wed, 15 Oct 2014 17:05:34 +0200 In-Reply-To: (Ed Maste's message of "Wed, 15 Oct 2014 09:10:10 -0400") Message-ID: <86siipxtj5.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers , svn-src-all , "George V. Neville-Neil" , Gleb Smirnoff , Olivier =?utf-8?Q?Cochard-Labb?= =?utf-8?Q?=C3=A9?= , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 15:05:35 -0000 Ed Maste writes: > Dag-Erling Sm=C3=B8rgrav writes: > > That's my fault, and I'm going to change it, because it's illogical. > > The function works on aligned arrays of int32s and should take a count, > > not a size. I just didn't want to delay the patch even further. > The fact that it works only on aligned 32-bit ints is a detail of this > implementation and not a requirement of murmur3 though. Absolutely. This implementation was tuned specifically for pf's use and therefore only works on aligned arrays. It is a pared-down version of a more complete implementation I wrote for cryb.to (still a WIP). DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 17:55:11 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BEA37F0; Wed, 15 Oct 2014 17:55:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67B9398A; Wed, 15 Oct 2014 17:55:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FHtB1h070811; Wed, 15 Oct 2014 17:55:11 GMT (envelope-from schweikh@FreeBSD.org) Received: (from schweikh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FHtBwH070810; Wed, 15 Oct 2014 17:55:11 GMT (envelope-from schweikh@FreeBSD.org) Message-Id: <201410151755.s9FHtBwH070810@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: schweikh set sender to schweikh@FreeBSD.org using -f From: Jens Schweikhardt Date: Wed, 15 Oct 2014 17:55:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273142 - head/sys/boot/i386/gptzfsboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 17:55:11 -0000 Author: schweikh Date: Wed Oct 15 17:55:10 2014 New Revision: 273142 URL: https://svnweb.freebsd.org/changeset/base/273142 Log: Correct grammos. MFC after: 3 weeks Modified: head/sys/boot/i386/gptzfsboot/gptzfsboot.8 Modified: head/sys/boot/i386/gptzfsboot/gptzfsboot.8 ============================================================================== --- head/sys/boot/i386/gptzfsboot/gptzfsboot.8 Wed Oct 15 17:36:30 2014 (r273141) +++ head/sys/boot/i386/gptzfsboot/gptzfsboot.8 Wed Oct 15 17:55:10 2014 (r273142) @@ -56,7 +56,7 @@ itself was loaded. Other disks are probed in BIOS defined order. After a disk is probed and .Nm -determines that the whole disk is not a ZFS pool member, then +determines that the whole disk is not a ZFS pool member, the individual partitions are probed in their partition table order. Currently GPT and MBR partition schemes are supported. With the GPT scheme, only partitions of type @@ -103,9 +103,9 @@ accepts all the options that .Xr boot 8 supports. .Pp -Filesystem specification and the path to +The filesystem specification and the path to .Xr zfsloader 8 -is different from +are different from .Xr boot 8 . The format is .Pp From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 18:36:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 810161C6; Wed, 15 Oct 2014 18:36:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D93ED76; Wed, 15 Oct 2014 18:36:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FIaZ2s090175; Wed, 15 Oct 2014 18:36:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FIaZBU090173; Wed, 15 Oct 2014 18:36:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410151836.s9FIaZBU090173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 15 Oct 2014 18:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273143 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 18:36:35 -0000 Author: mav Date: Wed Oct 15 18:36:34 2014 New Revision: 273143 URL: https://svnweb.freebsd.org/changeset/base/273143 Log: Remove setting BIO_DONE flag for BIOs that have done() method. This fixes use-after-free, caused by geom_disk, completing same BIO twice to save extra allocation, and getting BIO_DONE set after the first. MFC after: 1 week Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Oct 15 17:55:10 2014 (r273142) +++ head/sys/kern/vfs_bio.c Wed Oct 15 18:36:34 2014 (r273143) @@ -3618,10 +3618,8 @@ biodone(struct bio *bp) bp->bio_flags |= BIO_DONE; wakeup(bp); mtx_unlock(mtxp); - } else { - bp->bio_flags |= BIO_DONE; + } else done(bp); - } } /* From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 18:48:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBE8C637; Wed, 15 Oct 2014 18:48:51 +0000 (UTC) Received: from mail-ie0-x230.google.com (mail-ie0-x230.google.com [IPv6:2607:f8b0:4001:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A05BEE84; Wed, 15 Oct 2014 18:48:51 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id rp18so1853504iec.21 for ; Wed, 15 Oct 2014 11:48:51 -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=453e59xuLymAGPTiGhiCfmtk1N/o2rc/8DMLcWx4BLQ=; b=j3Jo7PxAufcNVNIZPIdXwTAr3ImAb/fuemcaUlF4cMj7SH3+gV2LR/Eda2RXC6fIVp hd8k+ruBeyTu2Cs3Bc374ZWqUHDQrkLhyxoeiWuya/pFg4KZ+y4iP+LF3m/H3LqtiBn8 /+DoVbLpzbWaeikbUK97wvIxfBpStmY5geRsRuc4waO1d9HiuhxPuKr4NKEUjgao+gNU rs3xownuy5kjcDEboJ8I7QD1719GcemuAiCqQeNBQI1dVHSEvGW9gSblFTKa0v0JjfD8 N1EoQ49i+VQ0aOz/adqJQ4NzTjC05903DE0NPu79Pu7CG1spbLgrnYWIfAfB+3s81JhV 3HRA== MIME-Version: 1.0 X-Received: by 10.43.42.75 with SMTP id tx11mr1640992icb.82.1413398930910; Wed, 15 Oct 2014 11:48:50 -0700 (PDT) Received: by 10.50.227.42 with HTTP; Wed, 15 Oct 2014 11:48:50 -0700 (PDT) In-Reply-To: <201410151836.s9FIaZBU090173@svn.freebsd.org> References: <201410151836.s9FIaZBU090173@svn.freebsd.org> Date: Wed, 15 Oct 2014 11:48:50 -0700 Message-ID: Subject: Re: svn commit: r273143 - head/sys/kern From: NGie Cooper To: Alexander Motin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 18:48:52 -0000 On Wed, Oct 15, 2014 at 11:36 AM, Alexander Motin wrote: > Author: mav > Date: Wed Oct 15 18:36:34 2014 > New Revision: 273143 > URL: https://svnweb.freebsd.org/changeset/base/273143 > > Log: > Remove setting BIO_DONE flag for BIOs that have done() method. > > This fixes use-after-free, caused by geom_disk, completing same BIO twice > to save extra allocation, and getting BIO_DONE set after the first. > > MFC after: 1 week Hi mav, This bug is present in stable/10 as well. Could you please merge it back to releng/10.1 before the release is cut? Thank you! From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 19:09:11 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5697A1; Wed, 15 Oct 2014 19:09:11 +0000 (UTC) Received: from mail-la0-x232.google.com (mail-la0-x232.google.com [IPv6:2a00:1450:4010:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D466D14C; Wed, 15 Oct 2014 19:09:10 +0000 (UTC) Received: by mail-la0-f50.google.com with SMTP id s18so1668047lam.9 for ; Wed, 15 Oct 2014 12:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=etuJdrxrxntUzOYb286+W+SjXpRn3iZpbmwj8UH1qtw=; b=o8PANna79CRDYi9LTCnR/jXbvmeNaiGEcapOZkNpgyc6x6s1BeXmk68PtxcDrgIa6O GCimR9nX5wFth8hw1372Fyin7AQ5w/uEDGSsEA7Bvqnm3OpJadC8GDBQNobKVZLFVWkJ 5khCVUssDKFfhYRzukXS7ML9EYHkxP3m+1V+p1oT0Q8HBLBnzZmYVOyWen/0EosGMsFA zg1PUC+YvlFy+BIfuQyaVpJQlp2KZ9IpKsjp5EDH/n+fiysclmClRiTf4L5MQEt3VqDf YnuXgdXmlelSChv1pZzMQr1TNMFVMyxVNs7qeZT0V7CSyYygnl5oz05XBun1JITQ7XYT LDTQ== X-Received: by 10.112.73.35 with SMTP id i3mr14469577lbv.75.1413400148563; Wed, 15 Oct 2014 12:09:08 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id dq5sm6978456lbc.11.2014.10.15.12.09.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 Oct 2014 12:09:07 -0700 (PDT) Sender: Alexander Motin Message-ID: <543EC651.1060903@FreeBSD.org> Date: Wed, 15 Oct 2014 22:09:05 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: NGie Cooper Subject: Re: svn commit: r273143 - head/sys/kern References: <201410151836.s9FIaZBU090173@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 19:09:11 -0000 On 15.10.2014 21:48, NGie Cooper wrote: > On Wed, Oct 15, 2014 at 11:36 AM, Alexander Motin wrote: >> Author: mav >> Date: Wed Oct 15 18:36:34 2014 >> New Revision: 273143 >> URL: https://svnweb.freebsd.org/changeset/base/273143 >> >> Log: >> Remove setting BIO_DONE flag for BIOs that have done() method. >> >> This fixes use-after-free, caused by geom_disk, completing same BIO twice >> to save extra allocation, and getting BIO_DONE set after the first. >> >> MFC after: 1 week > > Hi mav, > This bug is present in stable/10 as well. Could you please merge > it back to releng/10.1 before the release is cut? I'll send request to re@ after required minimal three days. Though this code was committed to head about a year ago, so not sure how big is this problem. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 19:12:10 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE135207; Wed, 15 Oct 2014 19:12:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B59BB1F7; Wed, 15 Oct 2014 19:12:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FJCAuM009091; Wed, 15 Oct 2014 19:12:10 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FJC5ow009066; Wed, 15 Oct 2014 19:12:05 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201410151912.s9FJC5ow009066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 15 Oct 2014 19:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273144 - in head: . crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bn crypto/openssl/crypto/bn/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 19:12:10 -0000 Author: jkim Date: Wed Oct 15 19:12:05 2014 New Revision: 273144 URL: https://svnweb.freebsd.org/changeset/base/273144 Log: Merge OpenSSL 1.0.1j. Added: head/crypto/openssl/crypto/constant_time_locl.h - copied unchanged from r273138, vendor-crypto/openssl/dist/crypto/constant_time_locl.h head/crypto/openssl/crypto/constant_time_test.c - copied unchanged from r273138, vendor-crypto/openssl/dist/crypto/constant_time_test.c head/crypto/openssl/doc/apps/c_rehash.pod - copied unchanged from r273138, vendor-crypto/openssl/dist/doc/apps/c_rehash.pod head/crypto/openssl/doc/crypto/CMS_add1_signer.pod - copied unchanged from r273138, vendor-crypto/openssl/dist/doc/crypto/CMS_add1_signer.pod head/secure/lib/libcrypto/man/CMS_add1_signer.3 (contents, props changed) Deleted: head/crypto/openssl/doc/crypto/CMS_sign_add1_signer.pod head/secure/lib/libcrypto/man/CMS_sign_add1_signer.3 Modified: head/ObsoleteFiles.inc head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/s_client.c head/crypto/openssl/crypto/Makefile head/crypto/openssl/crypto/aes/asm/aesni-x86_64.pl head/crypto/openssl/crypto/asn1/a_strex.c head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c head/crypto/openssl/crypto/bn/bn_exp.c head/crypto/openssl/crypto/bn/bn_nist.c head/crypto/openssl/crypto/bn/exptest.c head/crypto/openssl/crypto/dsa/dsa_ameth.c head/crypto/openssl/crypto/ebcdic.h head/crypto/openssl/crypto/ec/ec.h head/crypto/openssl/crypto/ec/ec2_smpl.c head/crypto/openssl/crypto/ec/ec_ameth.c head/crypto/openssl/crypto/ec/ec_asn1.c head/crypto/openssl/crypto/ec/ecp_mont.c head/crypto/openssl/crypto/ec/ecp_nist.c head/crypto/openssl/crypto/ec/ecp_smpl.c head/crypto/openssl/crypto/ec/ectest.c head/crypto/openssl/crypto/evp/Makefile head/crypto/openssl/crypto/evp/e_aes.c head/crypto/openssl/crypto/evp/evp_enc.c head/crypto/openssl/crypto/md5/asm/md5-x86_64.pl head/crypto/openssl/crypto/modes/modes.h head/crypto/openssl/crypto/ocsp/ocsp_vfy.c head/crypto/openssl/crypto/opensslconf.h head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/ossl_typ.h head/crypto/openssl/crypto/pkcs7/pkcs7.h head/crypto/openssl/crypto/pqueue/pqueue.h head/crypto/openssl/crypto/rsa/Makefile head/crypto/openssl/crypto/rsa/rsa.h head/crypto/openssl/crypto/rsa/rsa_err.c head/crypto/openssl/crypto/rsa/rsa_oaep.c head/crypto/openssl/crypto/rsa/rsa_pk1.c head/crypto/openssl/crypto/rsa/rsa_sign.c head/crypto/openssl/crypto/stack/safestack.h head/crypto/openssl/doc/apps/dgst.pod head/crypto/openssl/doc/crypto/BIO_s_accept.pod head/crypto/openssl/doc/crypto/EVP_DigestInit.pod head/crypto/openssl/doc/crypto/EVP_DigestVerifyInit.pod head/crypto/openssl/doc/crypto/EVP_EncryptInit.pod head/crypto/openssl/doc/crypto/EVP_PKEY_set1_RSA.pod head/crypto/openssl/doc/crypto/EVP_PKEY_sign.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod head/crypto/openssl/e_os.h head/crypto/openssl/ssl/Makefile head/crypto/openssl/ssl/d1_both.c head/crypto/openssl/ssl/d1_lib.c head/crypto/openssl/ssl/d1_srtp.c head/crypto/openssl/ssl/dtls1.h head/crypto/openssl/ssl/s23_clnt.c head/crypto/openssl/ssl/s23_srvr.c head/crypto/openssl/ssl/s2_lib.c head/crypto/openssl/ssl/s3_cbc.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_enc.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/srtp.h head/crypto/openssl/ssl/ssl.h head/crypto/openssl/ssl/ssl3.h head/crypto/openssl/ssl/ssl_err.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/t1_enc.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/ssl/tls1.h head/crypto/openssl/util/mk1mf.pl head/crypto/openssl/util/mkdef.pl head/crypto/openssl/util/ssleay.num head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/Makefile.man head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/Makefile.man head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Oct 15 18:36:34 2014 (r273143) +++ head/ObsoleteFiles.inc Wed Oct 15 19:12:05 2014 (r273144) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20141015: OpenSSL 1.0.1j import +OLD_FILES+=usr/share/openssl/man/man3/CMS_sign_add1_signer.3.gz # 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/CHANGES Wed Oct 15 19:12:05 2014 (r273144) @@ -2,6 +2,57 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1i and 1.0.1j [15 Oct 2014] + + *) SRTP Memory Leak. + + A flaw in the DTLS SRTP extension parsing code allows an attacker, who + sends a carefully crafted handshake message, to cause OpenSSL to fail + to free up to 64k of memory causing a memory leak. This could be + exploited in a Denial Of Service attack. This issue affects OpenSSL + 1.0.1 server implementations for both SSL/TLS and DTLS regardless of + whether SRTP is used or configured. Implementations of OpenSSL that + have been compiled with OPENSSL_NO_SRTP defined are not affected. + + The fix was developed by the OpenSSL team. + (CVE-2014-3513) + [OpenSSL team] + + *) Session Ticket Memory Leak. + + When an OpenSSL SSL/TLS/DTLS server receives a session ticket the + integrity of that ticket is first verified. In the event of a session + ticket integrity check failing, OpenSSL will fail to free memory + causing a memory leak. By sending a large number of invalid session + tickets an attacker could exploit this issue in a Denial Of Service + attack. + (CVE-2014-3567) + [Steve Henson] + + *) Build option no-ssl3 is incomplete. + + When OpenSSL is configured with "no-ssl3" as a build option, servers + could accept and complete a SSL 3.0 handshake, and clients could be + configured to send them. + (CVE-2014-3568) + [Akamai and the OpenSSL team] + + *) Add support for TLS_FALLBACK_SCSV. + Client applications doing fallback retries should call + SSL_set_mode(s, SSL_MODE_SEND_FALLBACK_SCSV). + (CVE-2014-3566) + [Adam Langley, Bodo Moeller] + + *) Add additional DigestInfo checks. + + Reencode DigestInto in DER and check against the original when + verifying RSA signature: this will reject any improperly encoded + DigestInfo structures. + + Note: this is a precautionary measure and no attacks are currently known. + + [Steve Henson] + Changes between 1.0.1h and 1.0.1i [6 Aug 2014] *) Fix SRP buffer overrun vulnerability. Invalid parameters passed to the Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/Configure Wed Oct 15 19:12:05 2014 (r273144) @@ -1767,6 +1767,9 @@ open(OUT,'>crypto/opensslconf.h.new') || print OUT "/* opensslconf.h */\n"; print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n"; +print OUT "#ifdef __cplusplus\n"; +print OUT "extern \"C\" {\n"; +print OUT "#endif\n"; print OUT "/* OpenSSL was configured with the following options: */\n"; my $openssl_algorithm_defines_trans = $openssl_algorithm_defines; $openssl_experimental_defines =~ s/^\s*#\s*define\s+OPENSSL_NO_(.*)/#ifndef OPENSSL_EXPERIMENTAL_$1\n# ifndef OPENSSL_NO_$1\n# define OPENSSL_NO_$1\n# endif\n#endif/mg; @@ -1871,6 +1874,9 @@ while () { print OUT $_; } } close(IN); +print OUT "#ifdef __cplusplus\n"; +print OUT "}\n"; +print OUT "#endif\n"; close(OUT); rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h"; rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n"; Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/Makefile Wed Oct 15 19:12:05 2014 (r273144) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1i +VERSION=1.0.1j MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/NEWS Wed Oct 15 19:12:05 2014 (r273144) @@ -5,6 +5,13 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1i and OpenSSL 1.0.1j [15 Oct 2014] + + o Fix for CVE-2014-3513 + o Fix for CVE-2014-3567 + o Mitigation for CVE-2014-3566 (SSL protocol vulnerability) + o Fix for CVE-2014-3568 + Major changes between OpenSSL 1.0.1h and OpenSSL 1.0.1i [6 Aug 2014] o Fix for CVE-2014-3512 Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/README Wed Oct 15 19:12:05 2014 (r273144) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1i 6 Aug 2014 + OpenSSL 1.0.1j 15 Oct 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/s_client.c ============================================================================== --- head/crypto/openssl/apps/s_client.c Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/apps/s_client.c Wed Oct 15 19:12:05 2014 (r273144) @@ -337,6 +337,7 @@ static void sc_usage(void) BIO_printf(bio_err," -tls1_1 - just use TLSv1.1\n"); BIO_printf(bio_err," -tls1 - just use TLSv1\n"); BIO_printf(bio_err," -dtls1 - just use DTLSv1\n"); + BIO_printf(bio_err," -fallback_scsv - send TLS_FALLBACK_SCSV\n"); BIO_printf(bio_err," -mtu - set the link layer MTU\n"); BIO_printf(bio_err," -no_tls1_2/-no_tls1_1/-no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol\n"); BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n"); @@ -617,6 +618,7 @@ int MAIN(int argc, char **argv) char *sess_out = NULL; struct sockaddr peer; int peerlen = sizeof(peer); + int fallback_scsv = 0; int enable_timeouts = 0 ; long socket_mtu = 0; #ifndef OPENSSL_NO_JPAKE @@ -823,6 +825,10 @@ int MAIN(int argc, char **argv) meth=DTLSv1_client_method(); socket_type=SOCK_DGRAM; } + else if (strcmp(*argv,"-fallback_scsv") == 0) + { + fallback_scsv = 1; + } else if (strcmp(*argv,"-timeout") == 0) enable_timeouts=1; else if (strcmp(*argv,"-mtu") == 0) @@ -1235,6 +1241,10 @@ bad: SSL_set_session(con, sess); SSL_SESSION_free(sess); } + + if (fallback_scsv) + SSL_set_mode(con, SSL_MODE_SEND_FALLBACK_SCSV); + #ifndef OPENSSL_NO_TLSEXT if (servername != NULL) { Modified: head/crypto/openssl/crypto/Makefile ============================================================================== --- head/crypto/openssl/crypto/Makefile Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/crypto/Makefile Wed Oct 15 19:12:05 2014 (r273144) @@ -32,6 +32,7 @@ CPUID_OBJ=mem_clr.o LIBS= GENERAL=Makefile README crypto-lib.com install.com +TEST=constant_time_test.c LIB= $(TOP)/libcrypto.a SHARED_LIB= libcrypto$(SHLIB_EXT) @@ -44,7 +45,8 @@ SRC= $(LIBSRC) EXHEADER= crypto.h opensslv.h opensslconf.h ebcdic.h symhacks.h \ ossl_typ.h -HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h $(EXHEADER) +HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h \ + constant_time_locl.h $(EXHEADER) ALL= $(GENERAL) $(SRC) $(HEADER) Modified: head/crypto/openssl/crypto/aes/asm/aesni-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aesni-x86_64.pl Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/crypto/aes/asm/aesni-x86_64.pl Wed Oct 15 19:12:05 2014 (r273144) @@ -525,6 +525,16 @@ $code.=<<___; .type aesni_ecb_encrypt,\@function,5 .align 16 aesni_ecb_encrypt: +___ +$code.=<<___ if ($win64); + lea -0x58(%rsp),%rsp + movaps %xmm6,(%rsp) + movaps %xmm7,0x10(%rsp) + movaps %xmm8,0x20(%rsp) + movaps %xmm9,0x30(%rsp) +.Lecb_enc_body: +___ +$code.=<<___; and \$-16,$len jz .Lecb_ret @@ -805,6 +815,16 @@ $code.=<<___; movups $inout5,0x50($out) .Lecb_ret: +___ +$code.=<<___ if ($win64); + movaps (%rsp),%xmm6 + movaps 0x10(%rsp),%xmm7 + movaps 0x20(%rsp),%xmm8 + movaps 0x30(%rsp),%xmm9 + lea 0x58(%rsp),%rsp +.Lecb_enc_ret: +___ +$code.=<<___; ret .size aesni_ecb_encrypt,.-aesni_ecb_encrypt ___ @@ -2730,28 +2750,9 @@ $code.=<<___; .extern __imp_RtlVirtualUnwind ___ $code.=<<___ if ($PREFIX eq "aesni"); -.type ecb_se_handler,\@abi-omnipotent -.align 16 -ecb_se_handler: - push %rsi - push %rdi - push %rbx - push %rbp - push %r12 - push %r13 - push %r14 - push %r15 - pushfq - sub \$64,%rsp - - mov 152($context),%rax # pull context->Rsp - - jmp .Lcommon_seh_tail -.size ecb_se_handler,.-ecb_se_handler - -.type ccm64_se_handler,\@abi-omnipotent +.type ecb_ccm64_se_handler,\@abi-omnipotent .align 16 -ccm64_se_handler: +ecb_ccm64_se_handler: push %rsi push %rdi push %rbx @@ -2788,7 +2789,7 @@ ccm64_se_handler: lea 0x58(%rax),%rax # adjust stack pointer jmp .Lcommon_seh_tail -.size ccm64_se_handler,.-ccm64_se_handler +.size ecb_ccm64_se_handler,.-ecb_ccm64_se_handler .type ctr32_se_handler,\@abi-omnipotent .align 16 @@ -2993,14 +2994,15 @@ ___ $code.=<<___ if ($PREFIX eq "aesni"); .LSEH_info_ecb: .byte 9,0,0,0 - .rva ecb_se_handler + .rva ecb_ccm64_se_handler + .rva .Lecb_enc_body,.Lecb_enc_ret # HandlerData[] .LSEH_info_ccm64_enc: .byte 9,0,0,0 - .rva ccm64_se_handler + .rva ecb_ccm64_se_handler .rva .Lccm64_enc_body,.Lccm64_enc_ret # HandlerData[] .LSEH_info_ccm64_dec: .byte 9,0,0,0 - .rva ccm64_se_handler + .rva ecb_ccm64_se_handler .rva .Lccm64_dec_body,.Lccm64_dec_ret # HandlerData[] .LSEH_info_ctr32: .byte 9,0,0,0 Modified: head/crypto/openssl/crypto/asn1/a_strex.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_strex.c Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/crypto/asn1/a_strex.c Wed Oct 15 19:12:05 2014 (r273144) @@ -568,6 +568,7 @@ int ASN1_STRING_to_UTF8(unsigned char ** mbflag |= MBSTRING_FLAG; stmp.data = NULL; stmp.length = 0; + stmp.flags = 0; ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING); if(ret < 0) return ret; *out = stmp.data; Modified: head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c ============================================================================== --- head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c Wed Oct 15 19:12:05 2014 (r273144) @@ -189,7 +189,7 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con if (n <= 0) return 0; - asm ( + asm volatile ( " subq %2,%2 \n" ".p2align 4 \n" "1: movq (%4,%2,8),%0 \n" @@ -200,7 +200,7 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con " sbbq %0,%0 \n" : "=&a"(ret),"+c"(n),"=&r"(i) : "r"(rp),"r"(ap),"r"(bp) - : "cc" + : "cc", "memory" ); return ret&1; @@ -212,7 +212,7 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con if (n <= 0) return 0; - asm ( + asm volatile ( " subq %2,%2 \n" ".p2align 4 \n" "1: movq (%4,%2,8),%0 \n" @@ -223,7 +223,7 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con " sbbq %0,%0 \n" : "=&a"(ret),"+c"(n),"=&r"(i) : "r"(rp),"r"(ap),"r"(bp) - : "cc" + : "cc", "memory" ); return ret&1; Modified: head/crypto/openssl/crypto/bn/bn_exp.c ============================================================================== --- head/crypto/openssl/crypto/bn/bn_exp.c Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/crypto/bn/bn_exp.c Wed Oct 15 19:12:05 2014 (r273144) @@ -874,7 +874,14 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ bits = BN_num_bits(p); if (bits == 0) { - ret = BN_one(rr); + /* x**0 mod 1 is still zero. */ + if (BN_is_one(m)) + { + ret = 1; + BN_zero(rr); + } + else + ret = BN_one(rr); return ret; } if (a == 0) Modified: head/crypto/openssl/crypto/bn/bn_nist.c ============================================================================== --- head/crypto/openssl/crypto/bn/bn_nist.c Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/crypto/bn/bn_nist.c Wed Oct 15 19:12:05 2014 (r273144) @@ -1088,9 +1088,9 @@ int BN_nist_mod_521(BIGNUM *r, const BIG /* ... and right shift */ for (val=t_d[0],i=0; i>BN_NIST_521_RSHIFT; - val = t_d[i+1]; - t_d[i] = (tmp | val<>BN_NIST_521_RSHIFT | + (tmp=t_d[i+1])<>BN_NIST_521_RSHIFT; /* lower 521 bits */ Modified: head/crypto/openssl/crypto/bn/exptest.c ============================================================================== --- head/crypto/openssl/crypto/bn/exptest.c Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/crypto/bn/exptest.c Wed Oct 15 19:12:05 2014 (r273144) @@ -71,6 +71,43 @@ static const char rnd_seed[] = "string to make the random number generator think it has entropy"; +/* test_exp_mod_zero tests that x**0 mod 1 == 0. It returns zero on success. */ +static int test_exp_mod_zero() { + BIGNUM a, p, m; + BIGNUM r; + BN_CTX *ctx = BN_CTX_new(); + int ret = 1; + + BN_init(&m); + BN_one(&m); + + BN_init(&a); + BN_one(&a); + + BN_init(&p); + BN_zero(&p); + + BN_init(&r); + BN_mod_exp(&r, &a, &p, &m, ctx); + BN_CTX_free(ctx); + + if (BN_is_zero(&r)) + ret = 0; + else + { + printf("1**0 mod 1 = "); + BN_print_fp(stdout, &r); + printf(", should be 0\n"); + } + + BN_free(&r); + BN_free(&a); + BN_free(&p); + BN_free(&m); + + return ret; +} + int main(int argc, char *argv[]) { BN_CTX *ctx; @@ -190,7 +227,13 @@ int main(int argc, char *argv[]) ERR_remove_thread_state(NULL); CRYPTO_mem_leaks(out); BIO_free(out); - printf(" done\n"); + printf("\n"); + + if (test_exp_mod_zero() != 0) + goto err; + + printf("done\n"); + EXIT(0); err: ERR_load_crypto_strings(); Copied: head/crypto/openssl/crypto/constant_time_locl.h (from r273138, vendor-crypto/openssl/dist/crypto/constant_time_locl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/crypto/openssl/crypto/constant_time_locl.h Wed Oct 15 19:12:05 2014 (r273144, copy of r273138, vendor-crypto/openssl/dist/crypto/constant_time_locl.h) @@ -0,0 +1,216 @@ +/* crypto/constant_time_locl.h */ +/* + * Utilities for constant-time cryptography. + * + * Author: Emilia Kasper (emilia@openssl.org) + * Based on previous work by Bodo Moeller, Emilia Kasper, Adam Langley + * (Google). + * ==================================================================== + * Copyright (c) 2014 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#ifndef HEADER_CONSTANT_TIME_LOCL_H +#define HEADER_CONSTANT_TIME_LOCL_H + +#include "e_os.h" /* For 'inline' */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The boolean methods return a bitmask of all ones (0xff...f) for true + * and 0 for false. This is useful for choosing a value based on the result + * of a conditional in constant time. For example, + * + * if (a < b) { + * c = a; + * } else { + * c = b; + * } + * + * can be written as + * + * unsigned int lt = constant_time_lt(a, b); + * c = constant_time_select(lt, a, b); + */ + +/* + * Returns the given value with the MSB copied to all the other + * bits. Uses the fact that arithmetic shift shifts-in the sign bit. + * However, this is not ensured by the C standard so you may need to + * replace this with something else on odd CPUs. + */ +static inline unsigned int constant_time_msb(unsigned int a); + +/* + * Returns 0xff..f if a < b and 0 otherwise. + */ +static inline unsigned int constant_time_lt(unsigned int a, unsigned int b); +/* Convenience method for getting an 8-bit mask. */ +static inline unsigned char constant_time_lt_8(unsigned int a, unsigned int b); + +/* + * Returns 0xff..f if a >= b and 0 otherwise. + */ +static inline unsigned int constant_time_ge(unsigned int a, unsigned int b); +/* Convenience method for getting an 8-bit mask. */ +static inline unsigned char constant_time_ge_8(unsigned int a, unsigned int b); + +/* + * Returns 0xff..f if a == 0 and 0 otherwise. + */ +static inline unsigned int constant_time_is_zero(unsigned int a); +/* Convenience method for getting an 8-bit mask. */ +static inline unsigned char constant_time_is_zero_8(unsigned int a); + + +/* + * Returns 0xff..f if a == b and 0 otherwise. + */ +static inline unsigned int constant_time_eq(unsigned int a, unsigned int b); +/* Convenience method for getting an 8-bit mask. */ +static inline unsigned char constant_time_eq_8(unsigned int a, unsigned int b); +/* Signed integers. */ +static inline unsigned int constant_time_eq_int(int a, int b); +/* Convenience method for getting an 8-bit mask. */ +static inline unsigned char constant_time_eq_int_8(int a, int b); + + +/* + * Returns (mask & a) | (~mask & b). + * + * When |mask| is all 1s or all 0s (as returned by the methods above), + * the select methods return either |a| (if |mask| is nonzero) or |b| + * (if |mask| is zero). + */ +static inline unsigned int constant_time_select(unsigned int mask, + unsigned int a, unsigned int b); +/* Convenience method for unsigned chars. */ +static inline unsigned char constant_time_select_8(unsigned char mask, + unsigned char a, unsigned char b); +/* Convenience method for signed integers. */ +static inline int constant_time_select_int(unsigned int mask, int a, int b); + +static inline unsigned int constant_time_msb(unsigned int a) + { + return (unsigned int)((int)(a) >> (sizeof(int) * 8 - 1)); + } + +static inline unsigned int constant_time_lt(unsigned int a, unsigned int b) + { + unsigned int lt; + /* Case 1: msb(a) == msb(b). a < b iff the MSB of a - b is set.*/ + lt = ~(a ^ b) & (a - b); + /* Case 2: msb(a) != msb(b). a < b iff the MSB of b is set. */ + lt |= ~a & b; + return constant_time_msb(lt); + } + +static inline unsigned char constant_time_lt_8(unsigned int a, unsigned int b) + { + return (unsigned char)(constant_time_lt(a, b)); + } + +static inline unsigned int constant_time_ge(unsigned int a, unsigned int b) + { + unsigned int ge; + /* Case 1: msb(a) == msb(b). a >= b iff the MSB of a - b is not set.*/ + ge = ~((a ^ b) | (a - b)); + /* Case 2: msb(a) != msb(b). a >= b iff the MSB of a is set. */ + ge |= a & ~b; + return constant_time_msb(ge); + } + +static inline unsigned char constant_time_ge_8(unsigned int a, unsigned int b) + { + return (unsigned char)(constant_time_ge(a, b)); + } + +static inline unsigned int constant_time_is_zero(unsigned int a) + { + return constant_time_msb(~a & (a - 1)); + } + +static inline unsigned char constant_time_is_zero_8(unsigned int a) + { + return (unsigned char)(constant_time_is_zero(a)); + } + +static inline unsigned int constant_time_eq(unsigned int a, unsigned int b) + { + return constant_time_is_zero(a ^ b); + } + +static inline unsigned char constant_time_eq_8(unsigned int a, unsigned int b) + { + return (unsigned char)(constant_time_eq(a, b)); + } + +static inline unsigned int constant_time_eq_int(int a, int b) + { + return constant_time_eq((unsigned)(a), (unsigned)(b)); + } + +static inline unsigned char constant_time_eq_int_8(int a, int b) + { + return constant_time_eq_8((unsigned)(a), (unsigned)(b)); + } + +static inline unsigned int constant_time_select(unsigned int mask, + unsigned int a, unsigned int b) + { + return (mask & a) | (~mask & b); + } + +static inline unsigned char constant_time_select_8(unsigned char mask, + unsigned char a, unsigned char b) + { + return (unsigned char)(constant_time_select(mask, a, b)); + } + +inline int constant_time_select_int(unsigned int mask, int a, int b) + { + return (int)(constant_time_select(mask, (unsigned)(a), (unsigned)(b))); + } + +#ifdef __cplusplus +} +#endif + +#endif /* HEADER_CONSTANT_TIME_LOCL_H */ Copied: head/crypto/openssl/crypto/constant_time_test.c (from r273138, vendor-crypto/openssl/dist/crypto/constant_time_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/crypto/openssl/crypto/constant_time_test.c Wed Oct 15 19:12:05 2014 (r273144, copy of r273138, vendor-crypto/openssl/dist/crypto/constant_time_test.c) @@ -0,0 +1,330 @@ +/* crypto/constant_time_test.c */ +/* + * Utilities for constant-time cryptography. + * + * Author: Emilia Kasper (emilia@openssl.org) + * Based on previous work by Bodo Moeller, Emilia Kasper, Adam Langley + * (Google). + * ==================================================================== + * Copyright (c) 2014 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include "../crypto/constant_time_locl.h" + +#include +#include +#include + +static const unsigned int CONSTTIME_TRUE = (unsigned)(~0); +static const unsigned int CONSTTIME_FALSE = 0; +static const unsigned char CONSTTIME_TRUE_8 = 0xff; +static const unsigned char CONSTTIME_FALSE_8 = 0; + +static int test_binary_op(unsigned int (*op)(unsigned int a, unsigned int b), + const char* op_name, unsigned int a, unsigned int b, int is_true) + { + unsigned c = op(a, b); + if (is_true && c != CONSTTIME_TRUE) + { + fprintf(stderr, "Test failed for %s(%du, %du): expected %du " + "(TRUE), got %du\n", op_name, a, b, CONSTTIME_TRUE, c); + return 1; + } + else if (!is_true && c != CONSTTIME_FALSE) + { + fprintf(stderr, "Test failed for %s(%du, %du): expected %du " + "(FALSE), got %du\n", op_name, a, b, CONSTTIME_FALSE, + c); + return 1; + } + return 0; + } + +static int test_binary_op_8(unsigned char (*op)(unsigned int a, unsigned int b), + const char* op_name, unsigned int a, unsigned int b, int is_true) + { + unsigned char c = op(a, b); + if (is_true && c != CONSTTIME_TRUE_8) + { + fprintf(stderr, "Test failed for %s(%du, %du): expected %u " + "(TRUE), got %u\n", op_name, a, b, CONSTTIME_TRUE_8, c); + return 1; + } + else if (!is_true && c != CONSTTIME_FALSE_8) + { + fprintf(stderr, "Test failed for %s(%du, %du): expected %u " + "(FALSE), got %u\n", op_name, a, b, CONSTTIME_FALSE_8, + c); + return 1; + } + return 0; + } + +static int test_is_zero(unsigned int a) + { + unsigned int c = constant_time_is_zero(a); + if (a == 0 && c != CONSTTIME_TRUE) + { + fprintf(stderr, "Test failed for constant_time_is_zero(%du): " + "expected %du (TRUE), got %du\n", a, CONSTTIME_TRUE, c); + return 1; + } + else if (a != 0 && c != CONSTTIME_FALSE) + { + fprintf(stderr, "Test failed for constant_time_is_zero(%du): " + "expected %du (FALSE), got %du\n", a, CONSTTIME_FALSE, + c); + return 1; + } + return 0; + } + +static int test_is_zero_8(unsigned int a) + { + unsigned char c = constant_time_is_zero_8(a); + if (a == 0 && c != CONSTTIME_TRUE_8) + { + fprintf(stderr, "Test failed for constant_time_is_zero(%du): " + "expected %u (TRUE), got %u\n", a, CONSTTIME_TRUE_8, c); + return 1; + } + else if (a != 0 && c != CONSTTIME_FALSE) + { + fprintf(stderr, "Test failed for constant_time_is_zero(%du): " + "expected %u (FALSE), got %u\n", a, CONSTTIME_FALSE_8, + c); + return 1; + } + return 0; + } + +static int test_select(unsigned int a, unsigned int b) + { + unsigned int selected = constant_time_select(CONSTTIME_TRUE, a, b); + if (selected != a) + { + fprintf(stderr, "Test failed for constant_time_select(%du, %du," + "%du): expected %du(first value), got %du\n", + CONSTTIME_TRUE, a, b, a, selected); + return 1; + } + selected = constant_time_select(CONSTTIME_FALSE, a, b); + if (selected != b) + { + fprintf(stderr, "Test failed for constant_time_select(%du, %du," + "%du): expected %du(second value), got %du\n", + CONSTTIME_FALSE, a, b, b, selected); + return 1; + } + return 0; + } + +static int test_select_8(unsigned char a, unsigned char b) + { + unsigned char selected = constant_time_select_8(CONSTTIME_TRUE_8, a, b); + if (selected != a) + { + fprintf(stderr, "Test failed for constant_time_select(%u, %u," + "%u): expected %u(first value), got %u\n", + CONSTTIME_TRUE, a, b, a, selected); + return 1; + } + selected = constant_time_select_8(CONSTTIME_FALSE_8, a, b); + if (selected != b) + { + fprintf(stderr, "Test failed for constant_time_select(%u, %u," + "%u): expected %u(second value), got %u\n", + CONSTTIME_FALSE, a, b, b, selected); + return 1; + } + return 0; + } + +static int test_select_int(int a, int b) + { + int selected = constant_time_select_int(CONSTTIME_TRUE, a, b); + if (selected != a) + { + fprintf(stderr, "Test failed for constant_time_select(%du, %d," + "%d): expected %d(first value), got %d\n", + CONSTTIME_TRUE, a, b, a, selected); + return 1; + } + selected = constant_time_select_int(CONSTTIME_FALSE, a, b); + if (selected != b) + { + fprintf(stderr, "Test failed for constant_time_select(%du, %d," + "%d): expected %d(second value), got %d\n", + CONSTTIME_FALSE, a, b, b, selected); + return 1; + } + return 0; + } + +static int test_eq_int(int a, int b) + { + unsigned int equal = constant_time_eq_int(a, b); + if (a == b && equal != CONSTTIME_TRUE) + { + fprintf(stderr, "Test failed for constant_time_eq_int(%d, %d): " + "expected %du(TRUE), got %du\n", + a, b, CONSTTIME_TRUE, equal); + return 1; + } + else if (a != b && equal != CONSTTIME_FALSE) + { + fprintf(stderr, "Test failed for constant_time_eq_int(%d, %d): " + "expected %du(FALSE), got %du\n", + a, b, CONSTTIME_FALSE, equal); + return 1; + } + return 0; + } + +static int test_eq_int_8(int a, int b) + { + unsigned char equal = constant_time_eq_int_8(a, b); + if (a == b && equal != CONSTTIME_TRUE_8) + { + fprintf(stderr, "Test failed for constant_time_eq_int_8(%d, %d): " + "expected %u(TRUE), got %u\n", + a, b, CONSTTIME_TRUE_8, equal); + return 1; + } + else if (a != b && equal != CONSTTIME_FALSE_8) + { + fprintf(stderr, "Test failed for constant_time_eq_int_8(%d, %d): " + "expected %u(FALSE), got %u\n", + a, b, CONSTTIME_FALSE_8, equal); + return 1; + } + return 0; + } + +static unsigned int test_values[] = {0, 1, 1024, 12345, 32000, UINT_MAX/2-1, + UINT_MAX/2, UINT_MAX/2+1, UINT_MAX-1, + UINT_MAX}; + +static unsigned char test_values_8[] = {0, 1, 2, 20, 32, 127, 128, 129, 255}; + +static int signed_test_values[] = {0, 1, -1, 1024, -1024, 12345, -12345, + 32000, -32000, INT_MAX, INT_MIN, INT_MAX-1, + INT_MIN+1}; + + +int main(int argc, char *argv[]) + { + unsigned int a, b, i, j; + int c, d; + unsigned char e, f; + int num_failed = 0, num_all = 0; + fprintf(stdout, "Testing constant time operations...\n"); + + for (i = 0; i < sizeof(test_values)/sizeof(int); ++i) + { + a = test_values[i]; + num_failed += test_is_zero(a); + num_failed += test_is_zero_8(a); + num_all += 2; + for (j = 0; j < sizeof(test_values)/sizeof(int); ++j) + { + b = test_values[j]; + num_failed += test_binary_op(&constant_time_lt, + "constant_time_lt", a, b, a < b); + num_failed += test_binary_op_8(&constant_time_lt_8, + "constant_time_lt_8", a, b, a < b); + num_failed += test_binary_op(&constant_time_lt, + "constant_time_lt_8", b, a, b < a); + num_failed += test_binary_op_8(&constant_time_lt_8, + "constant_time_lt_8", b, a, b < a); + num_failed += test_binary_op(&constant_time_ge, + "constant_time_ge", a, b, a >= b); + num_failed += test_binary_op_8(&constant_time_ge_8, + "constant_time_ge_8", a, b, a >= b); + num_failed += test_binary_op(&constant_time_ge, + "constant_time_ge", b, a, b >= a); + num_failed += test_binary_op_8(&constant_time_ge_8, + "constant_time_ge_8", b, a, b >= a); + num_failed += test_binary_op(&constant_time_eq, + "constant_time_eq", a, b, a == b); + num_failed += test_binary_op_8(&constant_time_eq_8, + "constant_time_eq_8", a, b, a == b); + num_failed += test_binary_op(&constant_time_eq, + "constant_time_eq", b, a, b == a); + num_failed += test_binary_op_8(&constant_time_eq_8, + "constant_time_eq_8", b, a, b == a); + num_failed += test_select(a, b); + num_all += 13; + } + } + + for (i = 0; i < sizeof(signed_test_values)/sizeof(int); ++i) + { + c = signed_test_values[i]; + for (j = 0; j < sizeof(signed_test_values)/sizeof(int); ++j) + { + d = signed_test_values[j]; + num_failed += test_select_int(c, d); + num_failed += test_eq_int(c, d); + num_failed += test_eq_int_8(c, d); + num_all += 3; + } + } + + for (i = 0; i < sizeof(test_values_8); ++i) + { + e = test_values_8[i]; + for (j = 0; j < sizeof(test_values_8); ++j) + { + f = test_values_8[j]; + num_failed += test_select_8(e, f); + num_all += 1; + } + } + + if (!num_failed) + { + fprintf(stdout, "ok (ran %d tests)\n", num_all); + return EXIT_SUCCESS; + } + else + { + fprintf(stdout, "%d of %d tests failed!\n", num_failed, num_all); + return EXIT_FAILURE; + } + } Modified: head/crypto/openssl/crypto/dsa/dsa_ameth.c ============================================================================== --- head/crypto/openssl/crypto/dsa/dsa_ameth.c Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/crypto/dsa/dsa_ameth.c Wed Oct 15 19:12:05 2014 (r273144) @@ -307,6 +307,12 @@ static int dsa_priv_encode(PKCS8_PRIV_KE unsigned char *dp = NULL; int dplen; + if (!pkey->pkey.dsa || !pkey->pkey.dsa->priv_key) + { + DSAerr(DSA_F_DSA_PRIV_ENCODE,DSA_R_MISSING_PARAMETERS); + goto err; + } + params = ASN1_STRING_new(); if (!params) @@ -701,4 +707,3 @@ const EVP_PKEY_ASN1_METHOD dsa_asn1_meth old_dsa_priv_encode } }; - Modified: head/crypto/openssl/crypto/ebcdic.h ============================================================================== --- head/crypto/openssl/crypto/ebcdic.h Wed Oct 15 18:36:34 2014 (r273143) +++ head/crypto/openssl/crypto/ebcdic.h Wed Oct 15 19:12:05 2014 (r273144) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 19:29:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABF62933; Wed, 15 Oct 2014 19:29:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9604B389; Wed, 15 Oct 2014 19:29:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FJTNRa015079; Wed, 15 Oct 2014 19:29:23 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FJTNbV015078; Wed, 15 Oct 2014 19:29:23 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201410151929.s9FJTNbV015078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 15 Oct 2014 19:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273146 - head/secure/usr.bin/openssl/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 19:29:23 -0000 Author: jkim Date: Wed Oct 15 19:29:22 2014 New Revision: 273146 URL: https://svnweb.freebsd.org/changeset/base/273146 Log: Merge OpenSSL 1.0.1j. Relnotes: yes Added: head/secure/usr.bin/openssl/man/c_rehash.1 (contents, props changed) Added: head/secure/usr.bin/openssl/man/c_rehash.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/usr.bin/openssl/man/c_rehash.1 Wed Oct 15 19:29:22 2014 (r273146) @@ -0,0 +1,199 @@ +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.28) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "C_REHASH 1" +.TH C_REHASH 1 "2014-10-15" "1.0.1j" "OpenSSL" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +c_rehash \- Create symbolic links to files named by the hash values +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBc_rehash\fR +[ \fIdirectory\fR...] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBc_rehash\fR scans directories and calculates a hash value of each \f(CW\*(C`.pem\*(C'\fR +file in the specified directory list and creates symbolic links +for each file, where the name of the link is the hash value. +This utility is useful as many programs that use OpenSSL require +directories to be set up like this in order to find certificates. +.PP +If any directories are named on the command line, then those are +processed in turn. If not, then the \fB\s-1SSL_CERT_DIR\s0\fR environment variable +is consulted; this shold be a colon-separated list of directories, +like the Unix \fB\s-1PATH\s0\fR variable. +If that is not set then the default directory (installation-specific +but often \fB/usr/local/ssl/certs\fR) is processed. +.PP +In order for a directory to be processed, the user must have write +permissions on that directory, otherwise it will be skipped. +The links created are of the form \f(CW\*(C`HHHHHHHH.D\*(C'\fR, where each \fBH\fR +is a hexadecimal character and \fBD\fR is a single decimal digit. +When processing a directory, \fBc_rehash\fR will first remove all links +that have a name in that syntax. If you have links in that format +used for other purposes, they will be removed. +Hashes for \s-1CRL\s0's look similar except the letter \fBr\fR appears after +the period, like this: \f(CW\*(C`HHHHHHHH.rD\*(C'\fR. +.PP +Multiple objects may have the same hash; they will be indicated by +incrementing the \fBD\fR value. Duplicates are found by comparing the +full \s-1SHA\-1\s0 fingerprint. A warning will be displayed if a duplicate +is found. +.PP +A warning will also be displayed if there are \fB.pem\fR files that +cannot be parsed as either a certificate or a \s-1CRL\s0. +.PP +The program uses the \fBopenssl\fR program to compute the hashes and +fingerprints. If not found in the user's \fB\s-1PATH\s0\fR, then set the +\&\fB\s-1OPENSSL\s0\fR environment variable to the full pathname. +Any program can be used, it will be invoked as follows for either +a certificate or \s-1CRL:\s0 +.PP +.Vb 2 +\& $OPENSSL x509 \-hash \-fingerprint \-noout \-in FFFFFF +\& $OPENSSL crl \-hash \-fingerprint \-noout \-in FFFFFF +.Ve +.PP +where \fB\s-1FFFFFF\s0\fR is the filename. It must output the hash of the +file on the first line, and the fingerprint on the second, +optionally prefixed with some text and an equals sign. +.SH "ENVIRONMENT" +.IX Header "ENVIRONMENT" +.IP "\fB\s-1OPENSSL\s0\fR" 4 +.IX Item "OPENSSL" +The path to an executable to use to generate hashes and +fingerprints (see above). +.IP "\fB\s-1SSL_CERT_DIR\s0\fR" 4 +.IX Item "SSL_CERT_DIR" +Colon separated list of directories to operate on. +Ignored if directories are listed on the command line. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIopenssl\fR\|(1), +\&\fIcrl\fR\|(1). +\&\fIx509\fR\|(1). From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 19:32:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id A58BEBB6; Wed, 15 Oct 2014 19:32:58 +0000 (UTC) Message-ID: <543ECBEA.3000902@FreeBSD.org> Date: Wed, 15 Oct 2014 15:32:58 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r273146 - head/secure/usr.bin/openssl/man References: <201410151929.s9FJTNbV015078@svn.freebsd.org> In-Reply-To: <201410151929.s9FJTNbV015078@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 19:32:59 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-10-15 15:29:23 -0400, Jung-uk Kim wrote: > Author: jkim Date: Wed Oct 15 19:29:22 2014 New Revision: 273146 > URL: https://svnweb.freebsd.org/changeset/base/273146 > > Log: Merge OpenSSL 1.0.1j. > > Relnotes: yes > > Added: head/secure/usr.bin/openssl/man/c_rehash.1 (contents, > props changed) ... It was missing in the previous commit (r273144). Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUPsvqAAoJEHyflib82/FG5dUH/3OEW7PS9a3kCwHmpfvy4OkM kifQ7MAv8LdRFDzJAOhU/1dwbJMTGZYMNxU4uqtM+bi4Q4gP+lNuzfosEe69HmPs g4raE/paa7luXHe9/nySMccqN0y24ChQMPdCPdCzNgqzCofdyIh+YYp43Q3iE9yM mPcNdpSqqHTpnmXOTvfCdJp6eqJ/nBOUE3j+GGKV4Dq3C6UbqkQ65hKMC1GMMui1 XmvqkCQ45lxSGURB+64E32dMs8tuwUOKqBXeNdO5LT9CzwEUvFqYF7u5i+B8+PRv 7seOqG63qkNrxsPnt+aeuQGaljYvqGuo1hSwYVo+UtD/PjRoULFq8VqeM5WlBr4= =KEKG -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 19:33:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F20DECFD; Wed, 15 Oct 2014 19:33:04 +0000 (UTC) Received: from mail-ie0-x231.google.com (mail-ie0-x231.google.com [IPv6:2607:f8b0:4001:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF83637; Wed, 15 Oct 2014 19:33:04 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id rd18so1935330iec.36 for ; Wed, 15 Oct 2014 12:33:04 -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=dRTTA2LcvpPZDFn6LW1MorbKE9ui1yrac1wvmVzWDE8=; b=VKeDbTY3OTvoozG5LXd3Tp3Knv1UpiuwRsGhO2Fs1TTO0kbP/GVjBE28exouUF/zGq h+W2z4K0mA6r1YHDaDXf6EtC8T3JORgQMpYBK7Y/ir4GSAyRuW9p2vxOCzaPGQ97rR1K BADDOQBcFmyMFpZZPgRuu8gqo1N8keh3G28FW4CcTIJpIA5YssIBAeaPLEN3iu6NzT+/ T1Ui4uM5ka46hlLPHFAXSesjo2DNH7HTxYXjz/rYBJ7V6GRV1bop33LM1hrV68mdFBSM sSE8p7mpuItiSUc3AQGEV4rbejcORZS0sYyOrJtoRi7zuA9k4qll8dXBcJu8OI99t3LQ SSAA== MIME-Version: 1.0 X-Received: by 10.107.18.76 with SMTP id a73mr4613911ioj.83.1413401583903; Wed, 15 Oct 2014 12:33:03 -0700 (PDT) Received: by 10.50.227.42 with HTTP; Wed, 15 Oct 2014 12:33:03 -0700 (PDT) In-Reply-To: <543EC651.1060903@FreeBSD.org> References: <201410151836.s9FIaZBU090173@svn.freebsd.org> <543EC651.1060903@FreeBSD.org> Date: Wed, 15 Oct 2014 12:33:03 -0700 Message-ID: Subject: Re: svn commit: r273143 - head/sys/kern From: NGie Cooper To: Alexander Motin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Benno Rice , "bdrewery@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 19:33:05 -0000 On Wed, Oct 15, 2014 at 12:09 PM, Alexander Motin wrote: > On 15.10.2014 21:48, NGie Cooper wrote: >> On Wed, Oct 15, 2014 at 11:36 AM, Alexander Motin wrote: >>> Author: mav >>> Date: Wed Oct 15 18:36:34 2014 >>> New Revision: 273143 >>> URL: https://svnweb.freebsd.org/changeset/base/273143 >>> >>> Log: >>> Remove setting BIO_DONE flag for BIOs that have done() method. >>> >>> This fixes use-after-free, caused by geom_disk, completing same BIO twice >>> to save extra allocation, and getting BIO_DONE set after the first. >>> >>> MFC after: 1 week >> >> Hi mav, >> This bug is present in stable/10 as well. Could you please merge >> it back to releng/10.1 before the release is cut? > > I'll send request to re@ after required minimal three days. Ok! > Though this code was committed to head about a year ago, so not sure how big is this > problem. Isilon uses gmirror for some devices and we've been running into random use-after-free panics in geom (sometimes with gmirror) with memguard(9) enabled. I have some potentially useful tests that I'll post on freefall (they need a bit more polishing before they can be committed to mainline FreeBSD). Thanks! From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 19:55:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 314D39DB for ; Wed, 15 Oct 2014 19:55:02 +0000 (UTC) Received: from mail-pa0-x243.google.com (mail-pa0-x243.google.com [IPv6:2607:f8b0:400e:c03::243]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 082F3914 for ; Wed, 15 Oct 2014 19:55:02 +0000 (UTC) Received: by mail-pa0-f67.google.com with SMTP id et14so795814pad.10 for ; Wed, 15 Oct 2014 12:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=message-id:date:from:mime-version:to:reply-to:subject:content-type :content-transfer-encoding; bh=9agDyBVxaUz7HZXjUzgiGemeqaeiXxy1WOQI6iFDenM=; b=YroHvLGrNY3YKEY1A+wZ/ukjBvh5vNL7YgKoWELK+NRxbpaON9VFel0SbCzG7nrd1U hdZj638fpPl5YVTjZ5hEkUEOt4hSYCAFgaV/mPjfJp1Lze00powU5A9hXAOlWNzNj1PK /NXX+StKpwBTnT1OzKhVydcSO6K9zx1JuPcmwVfHG0QStjnc69uHbtniIBJw+qrWZXcH KCufFvZBSyUewQULM8AgfdBPsjao/GccA7NMoG4TlxsBkhJaRnc16ylm7g/GMGwXYSXo yqt1V6h4j8HA23Ae3BF/woxpreFQJVmc+05NjOgFdbjCi1Jk7bTqWDqPIradU2m5GCOy V6Tg== X-Received: by 10.70.18.130 with SMTP id w2mr5101787pdd.153.1413402901727; Wed, 15 Oct 2014 12:55:01 -0700 (PDT) Received: from Inder-PC ([27.255.188.64]) by mx.google.com with ESMTPSA id yp10sm18013320pac.18.2014.10.15.12.54.59 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Oct 2014 12:55:00 -0700 (PDT) Message-ID: <543ed114.eaf8420a.1526.1baf@mx.google.com> Date: Wed, 15 Oct 2014 12:55:00 -0700 (PDT) X-Google-Original-Date: 16 Oct 2014 01:25:03 +0530 From: lori76557@googlemail.com X-Google-Original-From: LORI76557@gmail.com To: svn-src-head@freebsd.org Reply-To: limpid75154@gmail.com Subject: Has your website : mail-archive.com been penalized by Google ? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 19:55:02 -0000 Good Morning Bussiness Owner Has your website lost traffic or rankings in last few weeks ? If yes, then your website is a VICTIM to these NEW google algorithm updates. To correct this you need to hire a professioanl Search Engine Optimization company who understands these changes better than what you can. More with these new updates coming each month you need your online web presence to be taken care by a group of SEO Experts who are dedicated to learn all these new changes coming their way. We are presently offering a 15 days FREE Trial for our S.E.O Service, so that you can experience our expert S.E.O skills and then decided to sign up with us. Our S.E.O Plans start from just 199$ and go to 399$ / month making sure your website is optimized for all possible keywords and not just 10-20 keywords like other companies offer. Google has recently launched 3 Big updates and refreshes keep coming every month 1) Google Panda Update : Targeting Websites with Bad ONSITE 2) Google Penguin : Targeting Websites with Bad backlinks 3) Google Pigeon : Targeting Websites with bad local presence We have helped our clients pass all these algorithms pass these updates in last 3 years and we are one of those few ONLY SEO companies who have not been affected MUCH by these updates. What makes our company different : 1) We optimize website not keywords : ( We optimize your website for as many keywords possible ) 2) We assure results in first 15 days itself 3) We have the best possible pricing on the web 4) We abide by all google rules 5) Every link built is shared with for your future use 6) We Offer complete SEO Service not just LINK BUILDING Email us back with your website and your phone number so we can study your website and email you back with our Customized proposal. Looking forward working with you. Regards Vince G SEO Manager ( TOB ) Skype ________________________________________ NO CLICK in the subject to STOP EMAILS From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 21:20:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BC24175; Wed, 15 Oct 2014 21:20:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17AE920B; Wed, 15 Oct 2014 21:20:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FLKvbl071071; Wed, 15 Oct 2014 21:20:57 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FLKv8P071066; Wed, 15 Oct 2014 21:20:57 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201410152120.s9FLKv8P071066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 15 Oct 2014 21:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273152 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 21:20:58 -0000 Author: jilles Date: Wed Oct 15 21:20:56 2014 New Revision: 273152 URL: https://svnweb.freebsd.org/changeset/base/273152 Log: sh: Remove more gotos. Modified: head/bin/sh/expand.c head/bin/sh/jobs.c head/bin/sh/parser.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Wed Oct 15 20:28:31 2014 (r273151) +++ head/bin/sh/expand.c Wed Oct 15 21:20:56 2014 (r273152) @@ -884,24 +884,22 @@ varvalue(const char *name, int quoted, i switch (*name) { case '$': num = rootpid; - goto numvar; + break; case '?': num = oexitstatus; - goto numvar; + break; case '#': num = shellparam.nparam; - goto numvar; + break; case '!': num = backgndpidval(); -numvar: - expdest = cvtnum(num, expdest); break; case '-': for (i = 0 ; i < NOPTS ; i++) { if (optlist[i].val) STPUTC(optlist[i].letter, expdest); } - break; + return; case '@': if (flag & EXP_FULL && quoted) { for (ap = shellparam.p ; (p = *ap++) != NULL ; ) { @@ -909,7 +907,7 @@ numvar: if (*ap) STPUTC('\0', expdest); } - break; + return; } /* FALLTHROUGH */ case '*': @@ -924,7 +922,7 @@ numvar: if (sep || (flag & EXP_FULL && !quoted && **ap != '\0')) STPUTC(sep, expdest); } - break; + return; default: if (is_digit(*name)) { num = atoi(name); @@ -933,11 +931,12 @@ numvar: else if (num > 0 && num <= shellparam.nparam) p = shellparam.p[num - 1]; else - break; + return; strtodest(p, flag, subtype, quoted); } - break; + return; } + expdest = cvtnum(num, expdest); } @@ -1105,24 +1104,23 @@ expandmeta(struct strlist *str, int flag /* TODO - EXP_REDIR */ while (str) { - if (fflag) - goto nometa; - p = str->text; - for (;;) { /* fast check for meta chars */ - if ((c = *p++) == '\0') - goto nometa; - if (c == '*' || c == '?' || c == '[') - break; - } savelastp = exparg.lastp; - INTOFF; - expmeta(expdir, str->text); - INTON; + if (!fflag) { + p = str->text; + for (; (c = *p) != '\0'; p++) { + /* fast check for meta chars */ + if (c == '*' || c == '?' || c == '[') { + INTOFF; + expmeta(expdir, str->text); + INTON; + break; + } + } + } if (exparg.lastp == savelastp) { /* * no matches */ -nometa: *exparg.lastp = str; rmescapes(str->text); exparg.lastp = &str->next; Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Wed Oct 15 20:28:31 2014 (r273151) +++ head/bin/sh/jobs.c Wed Oct 15 21:20:56 2014 (r273152) @@ -592,23 +592,23 @@ getjob_nonotfound(const char *name) if (name == NULL) { #if JOBS -currentjob: if ((jp = getcurjob(NULL)) == NULL) - error("No current job"); - return (jp); + name = "%+"; #else error("No current job"); #endif - } else if (name[0] == '%') { + } + if (name[0] == '%') { if (is_digit(name[1])) { jobno = number(name + 1); if (jobno > 0 && jobno <= njobs && jobtab[jobno - 1].used != 0) return &jobtab[jobno - 1]; #if JOBS - } else if (name[1] == '%' && name[2] == '\0') { - goto currentjob; - } else if (name[1] == '+' && name[2] == '\0') { - goto currentjob; + } else if ((name[1] == '%' || name[1] == '+') && + name[2] == '\0') { + if ((jp = getcurjob(NULL)) == NULL) + error("No current job"); + return (jp); } else if (name[1] == '-' && name[2] == '\0') { if ((jp = getcurjob(NULL)) == NULL || (jp = getcurjob(jp)) == NULL) @@ -1288,13 +1288,43 @@ commandtext(union node *n) static void +cmdtxtdogroup(union node *n) +{ + cmdputs("; do "); + cmdtxt(n); + cmdputs("; done"); +} + + +static void +cmdtxtredir(union node *n, const char *op, int deffd) +{ + char s[2]; + + if (n->nfile.fd != deffd) { + s[0] = n->nfile.fd + '0'; + s[1] = '\0'; + cmdputs(s); + } + cmdputs(op); + if (n->type == NTOFD || n->type == NFROMFD) { + if (n->ndup.dupfd >= 0) + s[0] = n->ndup.dupfd + '0'; + else + s[0] = '-'; + s[1] = '\0'; + cmdputs(s); + } else { + cmdtxt(n->nfile.fname); + } +} + + +static void cmdtxt(union node *n) { union node *np; struct nodelist *lp; - const char *p; - int i; - char s[2]; if (n == NULL) return; @@ -1339,14 +1369,13 @@ cmdtxt(union node *n) break; case NWHILE: cmdputs("while "); - goto until; + cmdtxt(n->nbinary.ch1); + cmdtxtdogroup(n->nbinary.ch2); + break; case NUNTIL: cmdputs("until "); -until: cmdtxt(n->nbinary.ch1); - cmdputs("; do "); - cmdtxt(n->nbinary.ch2); - cmdputs("; done"); + cmdtxtdogroup(n->nbinary.ch2); break; case NFOR: cmdputs("for "); @@ -1381,36 +1410,25 @@ until: cmdputs(n->narg.text); break; case NTO: - p = ">"; i = 1; goto redir; + cmdtxtredir(n, ">", 1); + break; case NAPPEND: - p = ">>"; i = 1; goto redir; + cmdtxtredir(n, ">>", 1); + break; case NTOFD: - p = ">&"; i = 1; goto redir; + cmdtxtredir(n, ">&", 1); + break; case NCLOBBER: - p = ">|"; i = 1; goto redir; + cmdtxtredir(n, ">|", 1); + break; case NFROM: - p = "<"; i = 0; goto redir; + cmdtxtredir(n, "<", 0); + break; case NFROMTO: - p = "<>"; i = 0; goto redir; + cmdtxtredir(n, "<>", 0); + break; case NFROMFD: - p = "<&"; i = 0; goto redir; -redir: - if (n->nfile.fd != i) { - s[0] = n->nfile.fd + '0'; - s[1] = '\0'; - cmdputs(s); - } - cmdputs(p); - if (n->type == NTOFD || n->type == NFROMFD) { - if (n->ndup.dupfd >= 0) - s[0] = n->ndup.dupfd + '0'; - else - s[0] = '-'; - s[1] = '\0'; - cmdputs(s); - } else { - cmdtxt(n->nfile.fname); - } + cmdtxtredir(n, "<&", 0); break; case NHERE: case NXHERE: Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Wed Oct 15 20:28:31 2014 (r273151) +++ head/bin/sh/parser.c Wed Oct 15 21:20:56 2014 (r273152) @@ -889,7 +889,9 @@ xxreadtoken(void) continue; } pungetc(); - goto breakloop; + /* FALLTHROUGH */ + default: + return readtoken1(c, BASESYNTAX, (char *)NULL, 0); case '\n': plinno++; needprompt = doprompt; @@ -918,12 +920,8 @@ xxreadtoken(void) RETURN(TLP); case ')': RETURN(TRP); - default: - goto breakloop; } } -breakloop: - return readtoken1(c, BASESYNTAX, (char *)NULL, 0); #undef RETURN } @@ -1039,10 +1037,10 @@ parsebackq(char *out, struct nodelist ** needprompt = 0; } CHECKSTRSPACE(2, oout); - switch (c = pgetc()) { - case '`': - goto done; - + c = pgetc(); + if (c == '`') + break; + switch (c) { case '\\': if ((c = pgetc()) == '\n') { plinno++; @@ -1078,7 +1076,6 @@ parsebackq(char *out, struct nodelist ** } USTPUTC(c, oout); } -done: USTPUTC('\0', oout); olen = oout - stackblock(); INTOFF; From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 21:26:10 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF0D1325; Wed, 15 Oct 2014 21:26:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB2732FD; Wed, 15 Oct 2014 21:26:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FLQAlj072688; Wed, 15 Oct 2014 21:26:10 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FLQAWG072687; Wed, 15 Oct 2014 21:26:10 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201410152126.s9FLQAWG072687@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 15 Oct 2014 21:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273153 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 21:26:11 -0000 Author: jilles Date: Wed Oct 15 21:26:09 2014 New Revision: 273153 URL: https://svnweb.freebsd.org/changeset/base/273153 Log: sh: Make parseredir() a proper function instead of an emulated nested function. Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Wed Oct 15 21:20:56 2014 (r273152) +++ head/bin/sh/parser.c Wed Oct 15 21:26:09 2014 (r273153) @@ -977,6 +977,63 @@ checkend(int c, const char *eofmark, int /* + * Parse a redirection operator. The variable "out" points to a string + * specifying the fd to be redirected. The variable "c" contains the + * first character of the redirection operator. + */ + +static void +parseredir(char *out, int c) +{ + char fd = *out; + union node *np; + + np = (union node *)stalloc(sizeof (struct nfile)); + if (c == '>') { + np->nfile.fd = 1; + c = pgetc(); + if (c == '>') + np->type = NAPPEND; + else if (c == '&') + np->type = NTOFD; + else if (c == '|') + np->type = NCLOBBER; + else { + np->type = NTO; + pungetc(); + } + } else { /* c == '<' */ + np->nfile.fd = 0; + c = pgetc(); + if (c == '<') { + if (sizeof (struct nfile) != sizeof (struct nhere)) { + np = (union node *)stalloc(sizeof (struct nhere)); + np->nfile.fd = 0; + } + np->type = NHERE; + heredoc = (struct heredoc *)stalloc(sizeof (struct heredoc)); + heredoc->here = np; + if ((c = pgetc()) == '-') { + heredoc->striptabs = 1; + } else { + heredoc->striptabs = 0; + pungetc(); + } + } else if (c == '&') + np->type = NFROMFD; + else if (c == '>') + np->type = NFROMTO; + else { + np->type = NFROM; + pungetc(); + } + } + if (fd != '\0') + np->nfile.fd = digit_val(fd); + redirnode = np; +} + +/* * Called to parse command substitutions. */ @@ -1306,7 +1363,6 @@ readcstyleesc(char *out) * will run code that appears at the end of readtoken1. */ -#define PARSEREDIR() {goto parseredir; parseredir_return:;} #define PARSESUB() {goto parsesub; parsesub_return:;} #define PARSEARITH() {goto parsearith; parsearith_return:;} @@ -1506,7 +1562,7 @@ endword: && quotef == 0 && len <= 2 && (*out == '\0' || is_digit(*out))) { - PARSEREDIR(); + parseredir(out, c); return lasttoken = TREDIR; } else { pungetc(); @@ -1521,63 +1577,6 @@ endword: /* - * Parse a redirection operator. The variable "out" points to a string - * specifying the fd to be redirected. The variable "c" contains the - * first character of the redirection operator. - */ - -parseredir: { - char fd = *out; - union node *np; - - np = (union node *)stalloc(sizeof (struct nfile)); - if (c == '>') { - np->nfile.fd = 1; - c = pgetc(); - if (c == '>') - np->type = NAPPEND; - else if (c == '&') - np->type = NTOFD; - else if (c == '|') - np->type = NCLOBBER; - else { - np->type = NTO; - pungetc(); - } - } else { /* c == '<' */ - np->nfile.fd = 0; - c = pgetc(); - if (c == '<') { - if (sizeof (struct nfile) != sizeof (struct nhere)) { - np = (union node *)stalloc(sizeof (struct nhere)); - np->nfile.fd = 0; - } - np->type = NHERE; - heredoc = (struct heredoc *)stalloc(sizeof (struct heredoc)); - heredoc->here = np; - if ((c = pgetc()) == '-') { - heredoc->striptabs = 1; - } else { - heredoc->striptabs = 0; - pungetc(); - } - } else if (c == '&') - np->type = NFROMFD; - else if (c == '>') - np->type = NFROMTO; - else { - np->type = NFROM; - pungetc(); - } - } - if (fd != '\0') - np->nfile.fd = digit_val(fd); - redirnode = np; - goto parseredir_return; -} - - -/* * Parse a substitution. At this point, we have read the dollar sign * and nothing else. */ From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 23:39:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7FD6F10; Wed, 15 Oct 2014 23:39:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A45DF255; Wed, 15 Oct 2014 23:39:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FNdmeq034775; Wed, 15 Oct 2014 23:39:48 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FNdm7Z034774; Wed, 15 Oct 2014 23:39:48 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201410152339.s9FNdm7Z034774@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 15 Oct 2014 23:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273154 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 15 Oct 2014 23:39:48 -0000 Author: gavin Date: Wed Oct 15 23:39:47 2014 New Revision: 273154 URL: https://svnweb.freebsd.org/changeset/base/273154 Log: Slightly improve grammar in EAGAIN description. PR: 176806 Submitted by: Jeremy Chadwick MFC after: 3 days Modified: head/lib/libc/sys/recv.2 Modified: head/lib/libc/sys/recv.2 ============================================================================== --- head/lib/libc/sys/recv.2 Wed Oct 15 21:26:09 2014 (r273153) +++ head/lib/libc/sys/recv.2 Wed Oct 15 23:39:47 2014 (r273154) @@ -28,7 +28,7 @@ .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd March 19, 2013 +.Dd October 15, 2014 .Dt RECV 2 .Os .Sh NAME @@ -324,9 +324,9 @@ In this case the descriptors are closed, any pending data can be returned by another call to .Fn recvmsg . .It Bq Er EAGAIN -The socket is marked non-blocking, and the receive operation +The socket is marked non-blocking and the receive operation would block, or -a receive timeout had been set, +a receive timeout had been set and the timeout expired before data were received. .It Bq Er EINTR The receive was interrupted by delivery of a signal before From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 00:33:08 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 123BED1; Thu, 16 Oct 2014 00:33:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F28B9A01; Thu, 16 Oct 2014 00:33:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9G0X7dY063006; Thu, 16 Oct 2014 00:33:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9G0X6W1063001; Thu, 16 Oct 2014 00:33:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201410160033.s9G0X6W1063001@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 16 Oct 2014 00:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273155 - in head: etc/devd libexec share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 00:33:08 -0000 Author: imp Date: Thu Oct 16 00:33:06 2014 New Revision: 273155 URL: https://svnweb.freebsd.org/changeset/base/273155 Log: HYPERV isn't available on all architectures, but just on by default for i386/amd64. Rather, it only works on i386/amd64 and should only be built there. Rather than change the default based on which architecutre, do things more directly by only building it on i386/amd64 and having it always on. This is how we handle other options that are relevant only for a few architectures. Added: head/libexec/Makefile.amd64 (contents, props changed) head/libexec/Makefile.i386 (contents, props changed) Modified: head/etc/devd/Makefile head/libexec/Makefile head/share/mk/src.opts.mk Modified: head/etc/devd/Makefile ============================================================================== --- head/etc/devd/Makefile Wed Oct 15 23:39:47 2014 (r273154) +++ head/etc/devd/Makefile Thu Oct 16 00:33:06 2014 (r273155) @@ -8,6 +8,9 @@ FILES+= apple.conf .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" FILES+= asus.conf +.if ${MK_HYPERV} != "no" +FILES+= hyperv.conf +.endif .endif .if ${MK_USB} != "no" @@ -18,10 +21,6 @@ FILES+= uath.conf ulpt.conf usb.conf FILES+= zfs.conf .endif -.if ${MK_HYPERV} != "no" -FILES+= hyperv.conf -.endif - NO_OBJ= FILESDIR= /etc/devd FILESMODE= 644 Modified: head/libexec/Makefile ============================================================================== --- head/libexec/Makefile Wed Oct 15 23:39:47 2014 (r273154) +++ head/libexec/Makefile Thu Oct 16 00:33:06 2014 (r273155) @@ -13,7 +13,6 @@ SUBDIR= ${_atf} \ fingerd \ ftpd \ getty \ - ${_hyperv} \ ${_mail.local} \ ${_mknetid} \ ${_pppoed} \ @@ -55,10 +54,6 @@ _dma= dma _dma-mbox-create= dma-mbox-create .endif -.if ${MK_HYPERV} != "no" -_hyperv= hyperv -.endif - .if ${MK_NIS} != "no" _mknetid= mknetid _ypxfr= ypxfr @@ -95,4 +90,6 @@ _atf= atf _tests= tests .endif +.include + .include Added: head/libexec/Makefile.amd64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/Makefile.amd64 Thu Oct 16 00:33:06 2014 (r273155) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +.if ${MK_HYPERV} != "no" +SUBDIR+= hyperv +.endif Added: head/libexec/Makefile.i386 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/Makefile.i386 Thu Oct 16 00:33:06 2014 (r273155) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +.if ${MK_HYPERV} != "no" +SUBDIR+= hyperv +.endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Oct 15 23:39:47 2014 (r273154) +++ head/share/mk/src.opts.mk Thu Oct 16 00:33:06 2014 (r273155) @@ -90,6 +90,7 @@ __DEFAULT_YES_OPTIONS = \ GPL_DTC \ GROFF \ HTML \ + HYPERV \ ICONV \ INET \ INET6 \ @@ -211,13 +212,6 @@ __DEFAULT_NO_OPTIONS+=CLANG_IS_CC CLANG __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX .endif -# HyperV is only available for x86 and amd64. -.if ${__T} == "amd64" || ${__T} == "i386" -__DEFAULT_YES_OPTIONS+=HYPERV -.else -__DEFAULT_NO_OPTIONS+=HYPERV -.endif - .include # From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 01:32:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B21321F; Thu, 16 Oct 2014 01:32:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35BDDF60; Thu, 16 Oct 2014 01:32:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9G1WOaL091359; Thu, 16 Oct 2014 01:32:24 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9G1WNEo091354; Thu, 16 Oct 2014 01:32:23 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201410160132.s9G1WNEo091354@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 16 Oct 2014 01:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273156 - in head/sys: conf dev/iicbus powerpc/conf powerpc/powermac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 01:32:24 -0000 Author: jhibbits Date: Thu Oct 16 01:32:22 2014 New Revision: 273156 URL: https://svnweb.freebsd.org/changeset/base/273156 Log: Move the adm1030 driver to the proper location, and rename it. For compatibility, 'device windtunnel' is still supported, but one should use 'device adm1030' instead, and this has been updated in GENERIC and NOTES. Added: head/sys/dev/iicbus/adm1030.c - copied unchanged from r273153, head/sys/powerpc/powermac/windtunnel.c Deleted: head/sys/powerpc/powermac/windtunnel.c Modified: head/sys/conf/files.powerpc head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/NOTES Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Oct 16 00:33:06 2014 (r273155) +++ head/sys/conf/files.powerpc Thu Oct 16 01:32:22 2014 (r273156) @@ -33,6 +33,7 @@ dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc dev/hwpmc/hwpmc_ppc970.c optional hwpmc dev/iicbus/ad7417.c optional ad7417 powermac +dev/iicbus/adm1030.c optional powermac windtunnel | adm1030 powermac dev/iicbus/adt746x.c optional adt746x powermac dev/iicbus/ds1631.c optional ds1631 powermac dev/iicbus/ds1775.c optional ds1775 powermac @@ -169,7 +170,6 @@ powerpc/powermac/smusat.c optional power powerpc/powermac/uninorth.c optional powermac powerpc/powermac/uninorthpci.c optional powermac pci powerpc/powermac/vcoregpio.c optional powermac -powerpc/powermac/windtunnel.c optional powermac windtunnel powerpc/powerpc/altivec.c standard powerpc/powerpc/autoconf.c standard powerpc/powerpc/bcopy.c standard Copied: head/sys/dev/iicbus/adm1030.c (from r273153, head/sys/powerpc/powermac/windtunnel.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iicbus/adm1030.c Thu Oct 16 01:32:22 2014 (r273156, copy of r273153, head/sys/powerpc/powermac/windtunnel.c) @@ -0,0 +1,240 @@ +/*- + * Copyright (c) 2011 Justin Hibbits + * Copyright (c) 2010 Andreas Tobler + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include + +struct adm1030_softc { + struct pmac_fan fan; + device_t sc_dev; + struct intr_config_hook enum_hook; + uint32_t sc_addr; + int sc_pwm; +}; + +/* Regular bus attachment functions */ +static int adm1030_probe(device_t); +static int adm1030_attach(device_t); + +/* Utility functions */ +static void adm1030_start(void *xdev); +static int adm1030_write_byte(device_t dev, uint32_t addr, uint8_t reg, uint8_t buf); +static int adm1030_set(struct adm1030_softc *fan, int pwm); +static int adm1030_sysctl(SYSCTL_HANDLER_ARGS); + +static device_method_t adm1030_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, adm1030_probe), + DEVMETHOD(device_attach, adm1030_attach), + {0, 0}, +}; + +static driver_t adm1030_driver = { + "adm1030", + adm1030_methods, + sizeof(struct adm1030_softc) +}; + +static devclass_t adm1030_devclass; + +DRIVER_MODULE(adm1030, iicbus, adm1030_driver, adm1030_devclass, 0, 0); + +static int +adm1030_write_byte(device_t dev, uint32_t addr, uint8_t reg, uint8_t byte) +{ + unsigned char buf[4]; + int try = 0; + + struct iic_msg msg[] = { + {addr, IIC_M_WR, 0, buf} + }; + + msg[0].len = 2; + buf[0] = reg; + buf[1] = byte; + + for (;;) + { + if (iicbus_transfer(dev, msg, 1) == 0) + return (0); + + if (++try > 5) { + device_printf(dev, "iicbus write failed\n"); + return (-1); + } + pause("adm1030_write_byte", hz); + } +} + +static int +adm1030_probe(device_t dev) +{ + const char *name, *compatible; + struct adm1030_softc *sc; + phandle_t handle; + phandle_t thermostat; + + name = ofw_bus_get_name(dev); + compatible = ofw_bus_get_compat(dev); + handle = ofw_bus_get_node(dev); + + if (!name) + return (ENXIO); + + if (strcmp(name, "fan") != 0 || strcmp(compatible, "adm1030") != 0) + return (ENXIO); + + /* This driver can only be used if there's an associated temp sensor. */ + if (OF_getprop(handle, "platform-getTemp", &thermostat, sizeof(thermostat)) < 0) + return (ENXIO); + + sc = device_get_softc(dev); + sc->sc_dev = dev; + sc->sc_addr = iicbus_get_addr(dev); + + device_set_desc(dev, "G4 MDD Fan driver"); + + return (0); +} + +static int +adm1030_attach(device_t dev) +{ + struct adm1030_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + + sc = device_get_softc(dev); + + sc->enum_hook.ich_func = adm1030_start; + sc->enum_hook.ich_arg = dev; + + /* + * Wait until interrupts are available, which won't be until the openpic is + * intialized. + */ + + if (config_intrhook_establish(&sc->enum_hook) != 0) + return (ENOMEM); + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "pwm", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, + 0, adm1030_sysctl, "I", "Fan PWM Rate"); + + return (0); +} + +static void +adm1030_start(void *xdev) +{ + struct adm1030_softc *sc; + + device_t dev = (device_t) xdev; + + sc = device_get_softc(dev); + + /* Start the adm1030 device. */ + adm1030_write_byte(sc->sc_dev, sc->sc_addr, 0x1, 0x1); + adm1030_write_byte(sc->sc_dev, sc->sc_addr, 0x0, 0x95); + adm1030_write_byte(sc->sc_dev, sc->sc_addr, 0x23, 0x91); + + /* Use the RPM fields as PWM duty cycles. */ + sc->fan.min_rpm = 0; + sc->fan.max_rpm = 0x0F; + sc->fan.default_rpm = 2; + + strcpy(sc->fan.name, "MDD Case fan"); + sc->fan.zone = 0; + sc->fan.read = NULL; + sc->fan.set = (int (*)(struct pmac_fan *, int))adm1030_set; + config_intrhook_disestablish(&sc->enum_hook); + + pmac_thermal_fan_register(&sc->fan); +} + +static int adm1030_set(struct adm1030_softc *fan, int pwm) +{ + /* Clamp the PWM to 0-0xF, one nibble. */ + if (pwm > 0xF) + pwm = 0xF; + if (pwm < 0) + pwm = 0; + + if (adm1030_write_byte(fan->sc_dev, fan->sc_addr, 0x22, pwm) < 0) + return (-1); + + fan->sc_pwm = pwm; + return (0); +} + +static int +adm1030_sysctl(SYSCTL_HANDLER_ARGS) +{ + device_t adm1030; + struct adm1030_softc *sc; + int pwm, error; + + adm1030 = arg1; + sc = device_get_softc(adm1030); + + pwm = sc->sc_pwm; + + error = sysctl_handle_int(oidp, &pwm, 0, req); + + if (error || !req->newptr) + return (error); + + return (adm1030_set(sc, pwm)); +} Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Thu Oct 16 00:33:06 2014 (r273155) +++ head/sys/powerpc/conf/GENERIC Thu Oct 16 01:32:22 2014 (r273156) @@ -196,7 +196,7 @@ device fcu # Apple Fan Control Unit device max6690 # PowerMac7,2 temperature sensor device powermac_nvram # Open Firmware configuration NVRAM device smu # Apple System Management Unit -device windtunnel # Apple G4 MDD fan controller +device adm1030 # Apple G4 MDD fan controller device atibl # ATI-based backlight driver for PowerBooks/iBooks device nvbl # nVidia-based backlight driver for PowerBooks/iBooks Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Thu Oct 16 00:33:06 2014 (r273155) +++ head/sys/powerpc/conf/NOTES Thu Oct 16 01:32:22 2014 (r273156) @@ -50,7 +50,7 @@ device pmu # Apple Power Management Un device smu # Apple System Management Unit device snd_ai2s # Apple I2S Audio device snd_davbus # Apple Davbus Audio -device windtunnel # Apple G4 MDD fan controller +device adm1030 # Apple G4 MDD fan controller ##################################################################### From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 01:48:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 827525D5; Thu, 16 Oct 2014 01:48:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E832F0; Thu, 16 Oct 2014 01:48:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9G1meHi096793; Thu, 16 Oct 2014 01:48:40 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9G1me4Y096791; Thu, 16 Oct 2014 01:48:40 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201410160148.s9G1me4Y096791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Thu, 16 Oct 2014 01:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273157 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 01:48:40 -0000 Author: rpaulo Date: Thu Oct 16 01:48:39 2014 New Revision: 273157 URL: https://svnweb.freebsd.org/changeset/base/273157 Log: Remove the "Unable to unwind further" message from DDB. The ARM version of DDB is supposedly reliable enough making this message benign. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Thu Oct 16 01:32:22 2014 (r273156) +++ head/sys/arm/arm/db_trace.c Thu Oct 16 01:48:39 2014 (r273157) @@ -382,7 +382,7 @@ db_stack_trace_cmd(struct unwind_state * } else { /* A prel31 offset to the unwind table */ state->insn = (uint32_t *) - ((uintptr_t)&index->insn + + ((uintptr_t)&index->insn + db_expand_prel31(index->insn)); } /* Run the unwind function */ @@ -407,7 +407,7 @@ db_stack_trace_cmd(struct unwind_state * state->registers[SP], state->registers[FP]); /* Don't print the registers we have already printed */ - upd_mask = state->update_mask & + upd_mask = state->update_mask & ~((1 << SP) | (1 << FP) | (1 << LR) | (1 << PC)); sep = "\n\t"; for (i = 0, reg = 0; upd_mask != 0; upd_mask >>= 1, reg++) { @@ -421,7 +421,7 @@ db_stack_trace_cmd(struct unwind_state * i = 0; } else sep = " "; - + } } db_printf("\n"); @@ -436,7 +436,6 @@ db_stack_trace_cmd(struct unwind_state * * message (maybe it needs a STOP_UNWINDING). */ if (index->insn == EXIDX_CANTUNWIND) { - db_printf("Unable to unwind further\n"); finished = true; } else if (state->registers[PC] < VM_MIN_KERNEL_ADDRESS) { db_printf("Unable to unwind into user mode\n"); From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 02:23:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D227CBC4; Thu, 16 Oct 2014 02:23:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3F64611; Thu, 16 Oct 2014 02:23:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9G2NSZ1015141; Thu, 16 Oct 2014 02:23:28 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9G2NSDu015140; Thu, 16 Oct 2014 02:23:28 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410160223.s9G2NSDu015140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 16 Oct 2014 02:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273158 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 02:23:28 -0000 Author: smh Date: Thu Oct 16 02:23:27 2014 New Revision: 273158 URL: https://svnweb.freebsd.org/changeset/base/273158 Log: Prevent ZFS leaking pool free space When processing async destroys ZFS would leak space every txg timeout (5 seconds by default), if no writes occurred, until the pool is totally full. At this point it would be unfixable without a pool recreation. In addition if the machine was rebooted with the pool in this situation would fail to import on boot, hanging indefinitely, as the import process requires the ability to write data to the pool. Any attempts to query the pool status during the hung import would not return as the import holds the pool lock. The only way to import such a pool would be to specify -o readonly=on to the zpool import. zdb -bb can be used to check for "deferred free" size which is where this lost space will be counted. MFC after: 3 days Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Thu Oct 16 01:48:39 2014 (r273157) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Thu Oct 16 02:23:27 2014 (r273158) @@ -1459,13 +1459,6 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * "traverse_dataset_destroyed()", err); } - /* - * If we didn't make progress, mark the async destroy as - * stalled, so that we will not initiate a spa_sync() on - * its behalf. - */ - scn->scn_async_stalled = (scn->scn_visited_this_txg == 0); - if (bptree_is_empty(dp->dp_meta_objset, dp->dp_bptree_obj)) { /* finished; deactivate async destroy feature */ spa_feature_decr(spa, SPA_FEATURE_ASYNC_DESTROY, tx); @@ -1478,6 +1471,14 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * dp->dp_bptree_obj, tx)); dp->dp_bptree_obj = 0; scn->scn_async_destroying = B_FALSE; + } else { + /* + * If we didn't make progress, mark the async destroy as + * stalled, so that we will not initiate a spa_sync() on + * its behalf. + */ + scn->scn_async_stalled = + (scn->scn_visited_this_txg == 0); } } if (scn->scn_visited_this_txg) { From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 02:24:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 994D3D02; Thu, 16 Oct 2014 02:24:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CD2C619; Thu, 16 Oct 2014 02:24:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9G2OKKE015296; Thu, 16 Oct 2014 02:24:20 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9G2OKmI015295; Thu, 16 Oct 2014 02:24:20 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201410160224.s9G2OKmI015295@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 16 Oct 2014 02:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273159 - head/sys/fs/nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 02:24:20 -0000 Author: araujo (ports committer) Date: Thu Oct 16 02:24:19 2014 New Revision: 273159 URL: https://svnweb.freebsd.org/changeset/base/273159 Log: Add two sysctl(8) to enable/disable NFSv4 server to check when setting user nobody and/or setting group nogroup as owner of a file or directory. Usually at the client side, if there is an username that is not in the client's passwd database, some clients will send 'nobody@' in the wire and the NFSv4 server will treat it as an ERROR. However, if you have a valid user nobody in your passwd database, the NFSv4 server will treat it as a NFSERR_BADOWNER as its believes the client doesn't has the username mapped. Submitted by: Loic Blot Reviewed by: rmacklem Approved by: rmacklem MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdsubs.c Modified: head/sys/fs/nfsserver/nfs_nfsdsubs.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdsubs.c Thu Oct 16 02:23:27 2014 (r273158) +++ head/sys/fs/nfsserver/nfs_nfsdsubs.c Thu Oct 16 02:24:19 2014 (r273159) @@ -66,6 +66,16 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, disable_ &disable_checkutf8, 0, "Disable the NFSv4 check for a UTF8 compliant name"); +static int enable_nobodycheck = 1; +SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_nobodycheck, CTLFLAG_RW, + &enable_nobodycheck, 0, + "Enable the NFSv4 check when setting user nobody as owner"); + +static int enable_nogroupcheck = 1; +SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_nogroupcheck, CTLFLAG_RW, + &enable_nogroupcheck, 0, + "Enable the NFSv4 check when setting group nogroup as owner"); + static char nfsrv_hexdigit(char, int *); /* @@ -1543,8 +1553,10 @@ nfsrv_checkuidgid(struct nfsrv_descript */ if (NFSVNO_NOTSETUID(nvap) && NFSVNO_NOTSETGID(nvap)) goto out; - if ((NFSVNO_ISSETUID(nvap) && nvap->na_uid == nfsrv_defaultuid) - || (NFSVNO_ISSETGID(nvap) && nvap->na_gid == nfsrv_defaultgid)) { + if ((NFSVNO_ISSETUID(nvap) && nvap->na_uid == nfsrv_defaultuid && + enable_nobodycheck == 1) + || (NFSVNO_ISSETGID(nvap) && nvap->na_gid == nfsrv_defaultgid && + enable_nogroupcheck == 1)) { error = NFSERR_BADOWNER; goto out; } From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 08:33:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBD36202; Thu, 16 Oct 2014 08:33:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8179DBA; Thu, 16 Oct 2014 08:33:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9G8X40f088362; Thu, 16 Oct 2014 08:33:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9G8X48c088361; Thu, 16 Oct 2014 08:33:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410160833.s9G8X48c088361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 16 Oct 2014 08:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273160 - head/usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 08:33:05 -0000 Author: trasz Date: Thu Oct 16 08:33:04 2014 New Revision: 273160 URL: https://svnweb.freebsd.org/changeset/base/273160 Log: Fix automountd(8) not to leave zombies. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/autofs/automountd.c Modified: head/usr.sbin/autofs/automountd.c ============================================================================== --- head/usr.sbin/autofs/automountd.c Thu Oct 16 02:24:19 2014 (r273159) +++ head/usr.sbin/autofs/automountd.c Thu Oct 16 08:33:04 2014 (r273160) @@ -364,6 +364,33 @@ handle_request(const struct autofs_daemo quick_exit(0); } +static void +sigchld_handler(int dummy __unused) +{ + + /* + * The only purpose of this handler is to make SIGCHLD + * interrupt the AUTOFSREQUEST ioctl(2), so we can call + * wait_for_children(). + */ +} + +static void +register_sigchld(void) +{ + struct sigaction sa; + int error; + + bzero(&sa, sizeof(sa)); + sa.sa_handler = sigchld_handler; + sigfillset(&sa.sa_mask); + error = sigaction(SIGCHLD, &sa, NULL); + if (error != 0) + log_err(1, "sigaction"); + +} + + static int wait_for_children(bool block) { @@ -496,6 +523,8 @@ main_automountd(int argc, char **argv) pidfile_write(pidfh); + register_sigchld(); + for (;;) { log_debugx("waiting for request from the kernel"); From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 08:42:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 031F995A; Thu, 16 Oct 2014 08:42:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9ECCEBA; Thu, 16 Oct 2014 08:42:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9G8gJPL093432; Thu, 16 Oct 2014 08:42:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9G8gIaT093422; Thu, 16 Oct 2014 08:42:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410160842.s9G8gIaT093422@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 16 Oct 2014 08:42:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273163 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 08:42:20 -0000 Author: mav Date: Thu Oct 16 08:42:17 2014 New Revision: 273163 URL: https://svnweb.freebsd.org/changeset/base/273163 Log: Implement more functional CTL debug logging. Setting bits in kern.cam.ctl.debug allows to log errors, commands and some commands data respectively. MFC after: 1 week Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_debug.h head/sys/cam/ctl/ctl_private.h head/sys/cam/ctl/ctl_scsi_all.c head/sys/cam/ctl/ctl_util.c head/sys/cam/ctl/ctl_util.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Oct 16 08:39:44 2014 (r273162) +++ head/sys/cam/ctl/ctl.c Thu Oct 16 08:42:17 2014 (r273163) @@ -326,9 +326,9 @@ SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CT static int worker_threads = -1; SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN, &worker_threads, 1, "Number of worker threads"); -static int verbose = 0; -SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verbose, CTLFLAG_RWTUN, - &verbose, 0, "Show SCSI errors returned to initiator"); +static int ctl_debug = CTL_DEBUG_NONE; +SYSCTL_INT(_kern_cam_ctl, OID_AUTO, debug, CTLFLAG_RWTUN, + &ctl_debug, 0, "Enabled debug flags"); /* * Supported pages (0x00), Serial number (0x80), Device ID (0x83), @@ -5066,6 +5066,8 @@ ctl_config_move_done(union ctl_io *io) * * - Call some other function once the data is in? */ + if (ctl_debug & CTL_DEBUG_CDB_DATA) + ctl_data_print(io); /* * XXX KDM call ctl_scsiio() again for now, and check flag @@ -13508,17 +13510,14 @@ ctl_process_done(union ctl_io *io) case CTL_IO_SCSI: break; case CTL_IO_TASK: - if (bootverbose || verbose > 0) + if (bootverbose || (ctl_debug & CTL_DEBUG_INFO)) ctl_io_error_print(io, NULL); if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) ctl_free_io(io); else fe_done(io); return (CTL_RETVAL_COMPLETE); - break; default: - printf("ctl_process_done: invalid io type %d\n", - io->io_hdr.io_type); panic("ctl_process_done: invalid io type %d\n", io->io_hdr.io_type); break; /* NOTREACHED */ @@ -13612,74 +13611,28 @@ ctl_process_done(union ctl_io *io) ctl_set_task_aborted(&io->scsiio); /* - * We print out status for every task management command. For SCSI - * commands, we filter out any unit attention errors; they happen - * on every boot, and would clutter up the log. Note: task - * management commands aren't printed here, they are printed above, - * since they should never even make it down here. + * If enabled, print command error status. + * We don't print UAs unless debugging was enabled explicitly. */ - switch (io->io_hdr.io_type) { - case CTL_IO_SCSI: { - int error_code, sense_key, asc, ascq; - - sense_key = 0; + do { + if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) + break; + if (!bootverbose && (ctl_debug & CTL_DEBUG_INFO) == 0) + break; + if ((ctl_debug & CTL_DEBUG_INFO) == 0 && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SCSI_ERROR) && + (io->scsiio.scsi_status == SCSI_STATUS_CHECK_COND)) { + int error_code, sense_key, asc, ascq; - if (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SCSI_ERROR) - && (io->scsiio.scsi_status == SCSI_STATUS_CHECK_COND)) { - /* - * Since this is just for printing, no need to - * show errors here. - */ scsi_extract_sense_len(&io->scsiio.sense_data, - io->scsiio.sense_len, - &error_code, - &sense_key, - &asc, - &ascq, - /*show_errors*/ 0); + io->scsiio.sense_len, &error_code, &sense_key, + &asc, &ascq, /*show_errors*/ 0); + if (sense_key == SSD_KEY_UNIT_ATTENTION) + break; } - if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) - && (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SCSI_ERROR) - || (io->scsiio.scsi_status != SCSI_STATUS_CHECK_COND) - || (sense_key != SSD_KEY_UNIT_ATTENTION))) { - - if ((time_uptime - ctl_softc->last_print_jiffies) <= 0){ - ctl_softc->skipped_prints++; - } else { - uint32_t skipped_prints; - - skipped_prints = ctl_softc->skipped_prints; - - ctl_softc->skipped_prints = 0; - ctl_softc->last_print_jiffies = time_uptime; - - if (skipped_prints > 0) { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_ERROR_REPORT, - csevent_LogType_Trace, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "High CTL error volume, %d prints " - "skipped", skipped_prints); -#endif - } - if (bootverbose || verbose > 0) - ctl_io_error_print(io, NULL); - } - } - break; - } - case CTL_IO_TASK: - if (bootverbose || verbose > 0) - ctl_io_error_print(io, NULL); - break; - default: - break; - } + ctl_io_error_print(io, NULL); + } while (0); /* * Tell the FETD or the other shelf controller we're done with this @@ -13824,6 +13777,8 @@ ctl_queue(union ctl_io *io) switch (io->io_hdr.io_type) { case CTL_IO_SCSI: case CTL_IO_TASK: + if (ctl_debug & CTL_DEBUG_CDB) + ctl_io_print(io); ctl_enqueue_incoming(io); break; default: Modified: head/sys/cam/ctl/ctl_debug.h ============================================================================== --- head/sys/cam/ctl/ctl_debug.h Thu Oct 16 08:39:44 2014 (r273162) +++ head/sys/cam/ctl/ctl_debug.h Thu Oct 16 08:42:17 2014 (r273163) @@ -39,6 +39,16 @@ #ifndef _CTL_DEBUG_H_ #define _CTL_DEBUG_H_ +/* + * Debugging flags. + */ +typedef enum { + CTL_DEBUG_NONE = 0x00, /* no debugging */ + CTL_DEBUG_INFO = 0x01, /* SCSI errors */ + CTL_DEBUG_CDB = 0x02, /* SCSI CDBs and tasks */ + CTL_DEBUG_CDB_DATA = 0x04 /* SCSI CDB DATA */ +} ctl_debug_flags; + #ifdef CAM_CTL_DEBUG #define CTL_DEBUG_PRINT(X) \ do { \ Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Thu Oct 16 08:39:44 2014 (r273162) +++ head/sys/cam/ctl/ctl_private.h Thu Oct 16 08:42:17 2014 (r273163) @@ -474,8 +474,6 @@ struct ctl_softc { uint32_t num_pools; uint32_t cur_pool_id; STAILQ_HEAD(, ctl_io_pool) io_pools; - time_t last_print_jiffies; - uint32_t skipped_prints; struct ctl_thread threads[CTL_MAX_THREADS]; TAILQ_HEAD(tpc_tokens, tpc_token) tpc_tokens; struct callout tpc_timeout; Modified: head/sys/cam/ctl/ctl_scsi_all.c ============================================================================== --- head/sys/cam/ctl/ctl_scsi_all.c Thu Oct 16 08:39:44 2014 (r273162) +++ head/sys/cam/ctl/ctl_scsi_all.c Thu Oct 16 08:42:17 2014 (r273163) @@ -112,32 +112,10 @@ ctl_scsi_command_string(struct ctl_scsii void ctl_scsi_path_string(union ctl_io *io, char *path_str, int len) { - if (io->io_hdr.nexus.targ_target.wwid[0] == 0) { - snprintf(path_str, len, "(%ju:%d:%ju:%d): ", - (uintmax_t)io->io_hdr.nexus.initid.id, - io->io_hdr.nexus.targ_port, - (uintmax_t)io->io_hdr.nexus.targ_target.id, - io->io_hdr.nexus.targ_lun); - } else { - /* - * XXX KDM find a better way to display FC WWIDs. - */ -#ifdef _KERNEL - snprintf(path_str, len, "(%ju:%d:%#jx,%#jx:%d): ", - (uintmax_t)io->io_hdr.nexus.initid.id, - io->io_hdr.nexus.targ_port, - (intmax_t)io->io_hdr.nexus.targ_target.wwid[0], - (intmax_t)io->io_hdr.nexus.targ_target.wwid[1], - io->io_hdr.nexus.targ_lun); -#else /* _KERNEL */ - snprintf(path_str, len, "(%ju:%d:%#jx,%#jx:%d): ", - (uintmax_t)io->io_hdr.nexus.initid.id, - io->io_hdr.nexus.targ_port, - (intmax_t)io->io_hdr.nexus.targ_target.wwid[0], - (intmax_t)io->io_hdr.nexus.targ_target.wwid[1], - io->io_hdr.nexus.targ_lun); -#endif /* _KERNEL */ - } + + snprintf(path_str, len, "(%u:%u:%u/%u): ", + io->io_hdr.nexus.initid.id, io->io_hdr.nexus.targ_port, + io->io_hdr.nexus.targ_lun, io->io_hdr.nexus.targ_mapped_lun); } /* Modified: head/sys/cam/ctl/ctl_util.c ============================================================================== --- head/sys/cam/ctl/ctl_util.c Thu Oct 16 08:39:44 2014 (r273162) +++ head/sys/cam/ctl/ctl_util.c Thu Oct 16 08:42:17 2014 (r273163) @@ -731,69 +731,64 @@ ctl_scsi_task_string(struct ctl_taskio * } void -ctl_io_error_sbuf(union ctl_io *io, struct scsi_inquiry_data *inq_data, - struct sbuf *sb) +ctl_io_sbuf(union ctl_io *io, struct sbuf *sb) { - struct ctl_status_desc *status_desc; + const char *task_desc; char path_str[64]; - unsigned int i; - - status_desc = NULL; - - for (i = 0; i < (sizeof(ctl_status_table)/sizeof(ctl_status_table[0])); - i++) { - if ((io->io_hdr.status & CTL_STATUS_MASK) == - ctl_status_table[i].status) { - status_desc = &ctl_status_table[i]; - break; - } - } ctl_scsi_path_string(io, path_str, sizeof(path_str)); switch (io->io_hdr.io_type) { case CTL_IO_SCSI: sbuf_cat(sb, path_str); - ctl_scsi_command_string(&io->scsiio, NULL, sb); - - sbuf_printf(sb, "\n"); - - sbuf_printf(sb, "%sTag: 0x%04x, Type: %d\n", path_str, + sbuf_printf(sb, " Tag: %#x/%d\n", io->scsiio.tag_num, io->scsiio.tag_type); break; - case CTL_IO_TASK: { - const char *task_desc; - + case CTL_IO_TASK: sbuf_cat(sb, path_str); - task_desc = ctl_scsi_task_string(&io->taskio); - if (task_desc == NULL) sbuf_printf(sb, "Unknown Task Action %d (%#x)", - io->taskio.task_action, - io->taskio.task_action); + io->taskio.task_action, io->taskio.task_action); else sbuf_printf(sb, "Task Action: %s", task_desc); - - sbuf_printf(sb, "\n"); - switch (io->taskio.task_action) { case CTL_TASK_ABORT_TASK: - case CTL_TASK_ABORT_TASK_SET: - case CTL_TASK_CLEAR_TASK_SET: - sbuf_printf(sb, "%sTag: 0x%04x, Type: %d\n", path_str, - io->taskio.tag_num, - io->taskio.tag_type); + sbuf_printf(sb, " Tag: %#x/%d\n", + io->taskio.tag_num, io->taskio.tag_type); break; default: + sbuf_printf(sb, "\n"); break; } break; - } default: break; } +} + +void +ctl_io_error_sbuf(union ctl_io *io, struct scsi_inquiry_data *inq_data, + struct sbuf *sb) +{ + struct ctl_status_desc *status_desc; + char path_str[64]; + unsigned int i; + + ctl_io_sbuf(io, sb); + + status_desc = NULL; + for (i = 0; i < (sizeof(ctl_status_table)/sizeof(ctl_status_table[0])); + i++) { + if ((io->io_hdr.status & CTL_STATUS_MASK) == + ctl_status_table[i].status) { + status_desc = &ctl_status_table[i]; + break; + } + } + + ctl_scsi_path_string(io, path_str, sizeof(path_str)); sbuf_cat(sb, path_str); if (status_desc == NULL) @@ -815,23 +810,39 @@ ctl_io_error_sbuf(union ctl_io *io, stru } char * +ctl_io_string(union ctl_io *io, char *str, int str_len) +{ + struct sbuf sb; + + sbuf_new(&sb, str, str_len, SBUF_FIXEDLEN); + ctl_io_sbuf(io, &sb); + sbuf_finish(&sb); + return (sbuf_data(&sb)); +} + +char * ctl_io_error_string(union ctl_io *io, struct scsi_inquiry_data *inq_data, char *str, int str_len) { struct sbuf sb; sbuf_new(&sb, str, str_len, SBUF_FIXEDLEN); - ctl_io_error_sbuf(io, inq_data, &sb); - sbuf_finish(&sb); - return (sbuf_data(&sb)); } #ifdef _KERNEL void +ctl_io_print(union ctl_io *io) +{ + char str[512]; + + printf("%s", ctl_io_string(io, str, sizeof(str))); +} + +void ctl_io_error_print(union ctl_io *io, struct scsi_inquiry_data *inq_data) { char str[512]; @@ -856,6 +867,37 @@ ctl_io_error_print(union ctl_io *io, str } +void +ctl_data_print(union ctl_io *io) +{ + char str[128]; + char path_str[64]; + struct sbuf sb; + int i, j, len; + + if (io->io_hdr.io_type != CTL_IO_SCSI) + return; + if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) + return; + if (io->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) /* XXX: Implement */ + return; + ctl_scsi_path_string(io, path_str, sizeof(path_str)); + len = min(io->scsiio.kern_data_len, 4096); + for (i = 0; i < len; ) { + sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); + sbuf_cat(&sb, path_str); + sbuf_printf(&sb, " %#6x:%04x:", io->scsiio.tag_num, i); + for (j = 0; j < 16 && i < len; i++, j++) { + if (j == 8) + sbuf_cat(&sb, " "); + sbuf_printf(&sb, " %02x", io->scsiio.kern_data_ptr[i]); + } + sbuf_cat(&sb, "\n"); + sbuf_finish(&sb); + printf("%s", sbuf_data(&sb)); + } +} + #else /* _KERNEL */ void Modified: head/sys/cam/ctl/ctl_util.h ============================================================================== --- head/sys/cam/ctl/ctl_util.h Thu Oct 16 08:39:44 2014 (r273162) +++ head/sys/cam/ctl/ctl_util.h Thu Oct 16 08:42:17 2014 (r273163) @@ -99,19 +99,20 @@ void ctl_scsi_free_io(union ctl_io *io); #endif /* !_KERNEL */ void ctl_scsi_zero_io(union ctl_io *io); const char *ctl_scsi_task_string(struct ctl_taskio *taskio); +void ctl_io_sbuf(union ctl_io *io, struct sbuf *sb); void ctl_io_error_sbuf(union ctl_io *io, struct scsi_inquiry_data *inq_data, struct sbuf *sb); +char *ctl_io_string(union ctl_io *io, char *str, int str_len); char *ctl_io_error_string(union ctl_io *io, struct scsi_inquiry_data *inq_data, char *str, int str_len); #ifdef _KERNEL - +void ctl_io_print(union ctl_io *io); void ctl_io_error_print(union ctl_io *io, struct scsi_inquiry_data *inq_data); +void ctl_data_print(union ctl_io *io); #else /* _KERNEL */ -void -ctl_io_error_print(union ctl_io *io, struct scsi_inquiry_data *inq_data, +void ctl_io_error_print(union ctl_io *io, struct scsi_inquiry_data *inq_data, FILE *ofile); - #endif /* _KERNEL */ __END_DECLS From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 09:09:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12CA8933; Thu, 16 Oct 2014 09:09:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F360F20D; Thu, 16 Oct 2014 09:09:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9G99hXt005016; Thu, 16 Oct 2014 09:09:43 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9G99hwq005015; Thu, 16 Oct 2014 09:09:43 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410160909.s9G99hwq005015@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 16 Oct 2014 09:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273164 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 09:09:44 -0000 Author: trasz Date: Thu Oct 16 09:09:43 2014 New Revision: 273164 URL: https://svnweb.freebsd.org/changeset/base/273164 Log: When removing an iSCSI session, check whether all conditions match, not if any of them matches. This fixes "iscsictl -Rn" removing unrelated sessions. PR: 194034 MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Thu Oct 16 08:42:17 2014 (r273163) +++ head/sys/dev/iscsi/iscsi.c Thu Oct 16 09:09:43 2014 (r273164) @@ -1752,18 +1752,16 @@ static bool iscsi_session_conf_matches(unsigned int id1, const struct iscsi_session_conf *c1, unsigned int id2, const struct iscsi_session_conf *c2) { - if (id2 == 0 && c2->isc_target[0] == '\0' && - c2->isc_target_addr[0] == '\0') - return (true); - if (id2 != 0 && id2 == id1) - return (true); + + if (id2 != 0 && id2 != id1) + return (false); if (c2->isc_target[0] != '\0' && - strcmp(c1->isc_target, c2->isc_target) == 0) - return (true); + strcmp(c1->isc_target, c2->isc_target) != 0) + return (false); if (c2->isc_target_addr[0] != '\0' && - strcmp(c1->isc_target_addr, c2->isc_target_addr) == 0) - return (true); - return (false); + strcmp(c1->isc_target_addr, c2->isc_target_addr) != 0) + return (false); + return (true); } static int From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 12:39:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED7FCC47; Thu, 16 Oct 2014 12:39:14 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED19AE15; Thu, 16 Oct 2014 12:39:13 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id d1so4640739wiv.0 for ; Thu, 16 Oct 2014 05:39:12 -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:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=aNBBD5/w0/bJ5zn447UzGqi9jUaDPgoXLabcZaA2H4Y=; b=iDXHTjdvyDseSyI0IQ3uPNvh7RdJ9WqwiKQkt3rhlzILoqkMsiS3S3rjNPGrBYJmQD EVLwXwZN41izApKBqvmK9ydBASZcCDR8LpBAeK9GxYQXRBO5AtBItBt2lSHLmiveRgWg R84f86VXkGZ3H1YkY0w2cIMxU+t34FGuscdp/VG7WpRyCUNS0TaMjJL5QzR2Z6APSxwl wqZ+c1ZlJ+AklJv73ViQ/kLowMZ0InbQleuCwWXkO0ufE06Nf0hEU+ppdjeqdx87kkc5 CxdHo0+6zMVbV/JwneNzDRV3xr8UrHphkC73LGVHQpxY6fJnYQVb4UhxmtRsx28BAUhE 3fsg== X-Received: by 10.180.12.195 with SMTP id a3mr20550074wic.73.1413463152148; Thu, 16 Oct 2014 05:39:12 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id bc5sm25354446wjb.14.2014.10.16.05.39.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 16 Oct 2014 05:39:11 -0700 (PDT) Date: Thu, 16 Oct 2014 14:39:08 +0200 From: Mateusz Guzik To: Hans Petter Selasky Subject: Re: svn commit: r273135 - in head/sys: contrib/rdma/krping dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/drivers/infiniband/ulp/i... Message-ID: <20141016123908.GA10350@dft-labs.eu> References: <201410151340.s9FDeUFQ049767@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201410151340.s9FDeUFQ049767@svn.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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 12:39:15 -0000 On Wed, Oct 15, 2014 at 01:40:30PM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Oct 15 13:40:29 2014 > New Revision: 273135 > URL: https://svnweb.freebsd.org/changeset/base/273135 > > Log: > Update the OFED Linux compatibility layer and > Mellanox hardware driver(s): > > - Properly name an inclusion guard > - Fix compile warnings regarding unsigned enums > - Add two new sysctl nodes > - Remove all empty linux header files > - Make an error printout more verbose > - Use "mod_delayed_work()" instead of > cancelling and starting a timeout. > - Implement more Linux scatterlist > functions. > Do you have ofed benchmarks by any chance? In linux they use atomic_read which just reads the var and so on, while our compat layer issues full memory barrier in such case (i.e. does it in an expensive way providing guarantees not needed by the code). I would suggest investigating re-implementation of the layer with relaxed functions and checking if it improves stuff. Just my $0,03. > MFC after: 3 days > Sponsored by: Mellanox Technologies > > Deleted: > head/sys/ofed/drivers/net/mlx4/en_frag.c > head/sys/ofed/drivers/net/mlx4/en_params.c > head/sys/ofed/drivers/net/mlx4/xrcd.c > head/sys/ofed/include/asm/page.h > head/sys/ofed/include/linux/ethtool.h > head/sys/ofed/include/linux/inet.h > head/sys/ofed/include/linux/mount.h > Modified: > head/sys/contrib/rdma/krping/krping.c > head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h > head/sys/ofed/drivers/infiniband/core/addr.c > head/sys/ofed/drivers/infiniband/core/agent.c > head/sys/ofed/drivers/infiniband/core/ucm.c > head/sys/ofed/drivers/infiniband/core/uverbs_main.c > head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c > head/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h > head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c > head/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c > head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c > head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c > head/sys/ofed/drivers/net/mlx4/Makefile > head/sys/ofed/drivers/net/mlx4/en_ethtool.c > head/sys/ofed/drivers/net/mlx4/en_netdev.c > head/sys/ofed/drivers/net/mlx4/en_selftest.c > head/sys/ofed/drivers/net/mlx4/en_tx.c > head/sys/ofed/drivers/net/mlx4/pd.c > head/sys/ofed/include/linux/completion.h > head/sys/ofed/include/linux/etherdevice.h > head/sys/ofed/include/linux/linux_compat.c > head/sys/ofed/include/linux/mlx4/device.h > head/sys/ofed/include/linux/mlx4/driver.h > head/sys/ofed/include/linux/netdevice.h > head/sys/ofed/include/linux/scatterlist.h > head/sys/ofed/include/linux/vmalloc.h > head/sys/ofed/include/rdma/ib_addr.h > head/sys/ofed/include/rdma/ib_smi.h > head/sys/ofed/include/rdma/ib_user_cm.h > > Modified: head/sys/contrib/rdma/krping/krping.c > ============================================================================== > --- head/sys/contrib/rdma/krping/krping.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/contrib/rdma/krping/krping.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #include > #include > > Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h > ============================================================================== > --- head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -41,7 +41,6 @@ > #include > #include > #include > -#include > #include > #include > #include > > Modified: head/sys/ofed/drivers/infiniband/core/addr.c > ============================================================================== > --- head/sys/ofed/drivers/infiniband/core/addr.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/infiniband/core/addr.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -35,10 +35,15 @@ > > #include > #include > +#include > #include > +#include > +#include > #include > #include > #include > +#include > + > > MODULE_AUTHOR("Sean Hefty"); > MODULE_DESCRIPTION("IB Address Translation"); > @@ -189,13 +194,11 @@ static void set_timeout(unsigned long ti > { > unsigned long delay; > > - cancel_delayed_work(&work); > - > delay = time - jiffies; > if ((long)delay <= 0) > delay = 1; > > - queue_delayed_work(addr_wq, &work, delay); > + mod_delayed_work(addr_wq, &work, delay); > } > > static void queue_req(struct addr_req *req) > @@ -620,7 +623,7 @@ static struct notifier_block nb = { > .notifier_call = netevent_callback > }; > > -static int addr_init(void) > +static int __init addr_init(void) > { > INIT_DELAYED_WORK(&work, process_req); > addr_wq = create_singlethread_workqueue("ib_addr"); > @@ -631,7 +634,7 @@ static int addr_init(void) > return 0; > } > > -static void addr_cleanup(void) > +static void __exit addr_cleanup(void) > { > unregister_netevent_notifier(&nb); > destroy_workqueue(addr_wq); > > Modified: head/sys/ofed/drivers/infiniband/core/agent.c > ============================================================================== > --- head/sys/ofed/drivers/infiniband/core/agent.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/infiniband/core/agent.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -101,7 +101,8 @@ void agent_send_response(struct ib_mad * > agent = port_priv->agent[qpn]; > ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num); > if (IS_ERR(ah)) { > - printk(KERN_ERR SPFX "ib_create_ah_from_wc error\n"); > + printk(KERN_ERR SPFX "ib_create_ah_from_wc error %ld\n", > + PTR_ERR(ah)); > return; > } > > > Modified: head/sys/ofed/drivers/infiniband/core/ucm.c > ============================================================================== > --- head/sys/ofed/drivers/infiniband/core/ucm.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/infiniband/core/ucm.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -38,7 +38,6 @@ > #include > #include > #include > -#include > #include > #include > #include > > Modified: head/sys/ofed/drivers/infiniband/core/uverbs_main.c > ============================================================================== > --- head/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -40,7 +40,6 @@ > #include > #include > #include > -#include > #include > > #include > > Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c > ============================================================================== > --- head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -38,7 +38,6 @@ > #include > > #include > -#include > #include > > #include "mlx4_ib.h" > > Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h > ============================================================================== > --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -34,7 +34,7 @@ > #ifndef MTHCA_CONFIG_REG_H > #define MTHCA_CONFIG_REG_H > > -#include > +#include > > #define MTHCA_HCR_BASE 0x80680 > #define MTHCA_HCR_SIZE 0x0001c > > Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c > ============================================================================== > --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -36,7 +36,7 @@ > #include > #include > > -#include > +#include > > #include "mthca_memfree.h" > #include "mthca_dev.h" > > Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c > ============================================================================== > --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -30,7 +30,7 @@ > * SOFTWARE. > */ > > -#include /* PAGE_SHIFT */ > +#include > > #include "mthca_dev.h" > #include "mthca_memfree.h" > > Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c > ============================================================================== > --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -31,7 +31,6 @@ > */ > > #include > -#include > #include > > #include "ipoib.h" > > Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c > ============================================================================== > --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -32,7 +32,6 @@ > */ > > #include "ipoib.h" > -#include > > int ipoib_mcast_attach(struct ipoib_dev_priv *priv, u16 mlid, union ib_gid *mgid, int set_qkey) > { > > Modified: head/sys/ofed/drivers/net/mlx4/Makefile > ============================================================================== > --- head/sys/ofed/drivers/net/mlx4/Makefile Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/net/mlx4/Makefile Wed Oct 15 13:40:29 2014 (r273135) > @@ -31,4 +31,3 @@ opt_inet6.h: > .include > > CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} > - > > Modified: head/sys/ofed/drivers/net/mlx4/en_ethtool.c > ============================================================================== > --- head/sys/ofed/drivers/net/mlx4/en_ethtool.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/net/mlx4/en_ethtool.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -32,7 +32,6 @@ > */ > > #include > -#include > #include > #include > #include > > Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c > ============================================================================== > --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -2335,9 +2335,11 @@ static void mlx4_en_sysctl_conf(struct m > struct sysctl_oid_list *node_list; > struct sysctl_oid *coal; > struct sysctl_oid_list *coal_list; > + const char *pnameunit; > > dev = priv->dev; > ctx = &priv->conf_ctx; > + pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); > > sysctl_ctx_init(ctx); > priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), > @@ -2350,10 +2352,10 @@ static void mlx4_en_sysctl_conf(struct m > CTLFLAG_RW, &priv->msg_enable, 0, > "Driver message enable bitfield"); > SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "rx_rings", > - CTLTYPE_INT | CTLFLAG_RD, &priv->rx_ring_num, 0, > + CTLFLAG_RD, &priv->rx_ring_num, 0, > "Number of receive rings"); > SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_rings", > - CTLTYPE_INT | CTLFLAG_RD, &priv->tx_ring_num, 0, > + CTLFLAG_RD, &priv->tx_ring_num, 0, > "Number of transmit rings"); > SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "rx_size", > CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, > @@ -2367,6 +2369,12 @@ static void mlx4_en_sysctl_conf(struct m > SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "rx_ppp", > CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, > mlx4_en_set_rx_ppp, "I", "RX Per-priority pause"); > + SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "port_num", > + CTLFLAG_RD, &priv->port, 0, > + "Port Number"); > + SYSCTL_ADD_STRING(ctx, node_list, OID_AUTO, "device_name", > + CTLFLAG_RD, __DECONST(void *, pnameunit), 0, > + "PCI device name"); > > /* Add coalescer configuration. */ > coal = SYSCTL_ADD_NODE(ctx, node_list, OID_AUTO, > > Modified: head/sys/ofed/drivers/net/mlx4/en_selftest.c > ============================================================================== > --- head/sys/ofed/drivers/net/mlx4/en_selftest.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/net/mlx4/en_selftest.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -32,7 +32,6 @@ > */ > > #include > -#include > #include > #include > #include > > Modified: head/sys/ofed/drivers/net/mlx4/en_tx.c > ============================================================================== > --- head/sys/ofed/drivers/net/mlx4/en_tx.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/net/mlx4/en_tx.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -31,7 +31,7 @@ > * > */ > > -#include > +#include > #include > #include > #include > > Modified: head/sys/ofed/drivers/net/mlx4/pd.c > ============================================================================== > --- head/sys/ofed/drivers/net/mlx4/pd.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/drivers/net/mlx4/pd.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -35,7 +35,7 @@ > #include > #include > > -#include > +#include > > #include "mlx4.h" > #include "icm.h" > > Modified: head/sys/ofed/include/linux/completion.h > ============================================================================== > --- head/sys/ofed/include/linux/completion.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/linux/completion.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -27,8 +27,8 @@ > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > > -#ifndef _FBSD_COMPLETION_H_ > -#define _FBSD_COMPLETION_H_ > +#ifndef _LINUX_COMPLETION_H_ > +#define _LINUX_COMPLETION_H_ > > #include > > > Modified: head/sys/ofed/include/linux/etherdevice.h > ============================================================================== > --- head/sys/ofed/include/linux/etherdevice.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/linux/etherdevice.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -1,4 +1,4 @@ > -/* > +/*- > * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. > * Copyright (c) 2014 Mellanox Technologies, Ltd. All rights reserved. > * > > Modified: head/sys/ofed/include/linux/linux_compat.c > ============================================================================== > --- head/sys/ofed/include/linux/linux_compat.c Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/linux/linux_compat.c Wed Oct 15 13:40:29 2014 (r273135) > @@ -588,15 +588,15 @@ struct fileops linuxfileops = { > .fo_read = linux_file_read, > .fo_write = invfo_rdwr, > .fo_truncate = invfo_truncate, > - .fo_ioctl = linux_file_ioctl, > - .fo_poll = linux_file_poll, > .fo_kqfilter = invfo_kqfilter, > .fo_stat = linux_file_stat, > + .fo_fill_kinfo = linux_file_fill_kinfo, > + .fo_poll = linux_file_poll, > .fo_close = linux_file_close, > + .fo_ioctl = linux_file_ioctl, > .fo_chmod = invfo_chmod, > .fo_chown = invfo_chown, > .fo_sendfile = invfo_sendfile, > - .fo_fill_kinfo = linux_file_fill_kinfo, > }; > > /* > > Modified: head/sys/ofed/include/linux/mlx4/device.h > ============================================================================== > --- head/sys/ofed/include/linux/mlx4/device.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/linux/mlx4/device.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -1036,6 +1036,7 @@ enum mlx4_net_trans_rule_id { > MLX4_NET_TRANS_RULE_ID_TCP, > MLX4_NET_TRANS_RULE_ID_UDP, > MLX4_NET_TRANS_RULE_NUM, /* should be last */ > + MLX4_NET_TRANS_RULE_DUMMY = -1, /* force enum to be signed */ > }; > > extern const u16 __sw_id_hw[]; > @@ -1058,6 +1059,7 @@ enum mlx4_net_trans_promisc_mode { > MLX4_FS_UC_SNIFFER, > MLX4_FS_MC_SNIFFER, > MLX4_FS_MODE_NUM, /* should be last */ > + MLX4_FS_MODE_DUMMY = -1, /* force enum to be signed */ > }; > > struct mlx4_spec_eth { > > Modified: head/sys/ofed/include/linux/mlx4/driver.h > ============================================================================== > --- head/sys/ofed/include/linux/mlx4/driver.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/linux/mlx4/driver.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -121,7 +121,7 @@ void *mlx4_get_protocol_dev(struct mlx4_ > #ifndef ETH_ALEN > #define ETH_ALEN 6 > #endif > -static inline u64 mlx4_mac_to_u64(u8 *addr) > +static inline u64 mlx4_mac_to_u64(const u8 *addr) > { > u64 mac = 0; > int i; > > Modified: head/sys/ofed/include/linux/netdevice.h > ============================================================================== > --- head/sys/ofed/include/linux/netdevice.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/linux/netdevice.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -40,7 +40,6 @@ > > #include > #include > -#include > #include > #include > #include > > Modified: head/sys/ofed/include/linux/scatterlist.h > ============================================================================== > --- head/sys/ofed/include/linux/scatterlist.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/linux/scatterlist.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -31,6 +31,21 @@ > #define _LINUX_SCATTERLIST_H_ > > #include > +#include > + > +/* > + * SG table design. > + * > + * If flags bit 0 is set, then the sg field contains a pointer to the next sg > + * table list. Otherwise the next entry is at sg + 1, can be determined using > + * the sg_is_chain() function. > + * > + * If flags bit 1 is set, then this sg entry is the last element in a list, > + * can be determined using the sg_is_last() function. > + * > + * See sg_next(). > + * > + */ > > struct scatterlist { > union { > @@ -49,6 +64,12 @@ struct sg_table { > unsigned int orig_nents; /* original size of list */ > }; > > +/* > + * Maximum number of entries that will be allocated in one piece, if > + * a list larger than this is required then chaining will be utilized. > + */ > +#define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) > + > #define sg_dma_address(sg) (sg)->address > #define sg_dma_len(sg) (sg)->length > #define sg_page(sg) (sg)->sl_un.page > @@ -99,6 +120,212 @@ sg_phys(struct scatterlist *sg) > return sg_page(sg)->phys_addr + sg->offset; > } > > +/** > + * sg_chain - Chain two sglists together > + * @prv: First scatterlist > + * @prv_nents: Number of entries in prv > + * @sgl: Second scatterlist > + * > + * Description: > + * Links @prv@ and @sgl@ together, to form a longer scatterlist. > + * > + **/ > +static inline void > +sg_chain(struct scatterlist *prv, unsigned int prv_nents, > + struct scatterlist *sgl) > +{ > +/* > + * offset and length are unused for chain entry. Clear them. > + */ > + struct scatterlist *sg = &prv[prv_nents - 1]; > + > + sg->offset = 0; > + sg->length = 0; > + > + /* > + * Indicate a link pointer, and set the link to the second list. > + */ > + sg->flags = SG_CHAIN; > + sg->sl_un.sg = sgl; > +} > + > +/** > + * sg_mark_end - Mark the end of the scatterlist > + * @sg: SG entryScatterlist > + * > + * Description: > + * Marks the passed in sg entry as the termination point for the sg > + * table. A call to sg_next() on this entry will return NULL. > + * > + **/ > +static inline void sg_mark_end(struct scatterlist *sg) > +{ > + sg->flags = SG_END; > +} > + > +/** > + * __sg_free_table - Free a previously mapped sg table > + * @table: The sg table header to use > + * @max_ents: The maximum number of entries per single scatterlist > + * > + * Description: > + * Free an sg table previously allocated and setup with > + * __sg_alloc_table(). The @max_ents value must be identical to > + * that previously used with __sg_alloc_table(). > + * > + **/ > +static inline void > +__sg_free_table(struct sg_table *table, unsigned int max_ents) > +{ > + struct scatterlist *sgl, *next; > + > + if (unlikely(!table->sgl)) > + return; > + > + sgl = table->sgl; > + while (table->orig_nents) { > + unsigned int alloc_size = table->orig_nents; > + unsigned int sg_size; > + > + /* > + * If we have more than max_ents segments left, > + * then assign 'next' to the sg table after the current one. > + * sg_size is then one less than alloc size, since the last > + * element is the chain pointer. > + */ > + if (alloc_size > max_ents) { > + next = sgl[max_ents - 1].sl_un.sg; > + alloc_size = max_ents; > + sg_size = alloc_size - 1; > + } else { > + sg_size = alloc_size; > + next = NULL; > + } > + > + table->orig_nents -= sg_size; > + kfree(sgl); > + sgl = next; > + } > + > + table->sgl = NULL; > +} > + > +/** > + * sg_free_table - Free a previously allocated sg table > + * @table: The mapped sg table header > + * > + **/ > +static inline void > +sg_free_table(struct sg_table *table) > +{ > + __sg_free_table(table, SG_MAX_SINGLE_ALLOC); > +} > + > +/** > + * __sg_alloc_table - Allocate and initialize an sg table with given allocator > + * @table: The sg table header to use > + * @nents: Number of entries in sg list > + * @max_ents: The maximum number of entries the allocator returns per call > + * @gfp_mask: GFP allocation mask > + * > + * Description: > + * This function returns a @table @nents long. The allocator is > + * defined to return scatterlist chunks of maximum size @max_ents. > + * Thus if @nents is bigger than @max_ents, the scatterlists will be > + * chained in units of @max_ents. > + * > + * Notes: > + * If this function returns non-0 (eg failure), the caller must call > + * __sg_free_table() to cleanup any leftover allocations. > + * > + **/ > +static inline int > +__sg_alloc_table(struct sg_table *table, unsigned int nents, > + unsigned int max_ents, gfp_t gfp_mask) > +{ > + struct scatterlist *sg, *prv; > + unsigned int left; > + > + memset(table, 0, sizeof(*table)); > + > + if (nents == 0) > + return -EINVAL; > + left = nents; > + prv = NULL; > + do { > + unsigned int sg_size, alloc_size = left; > + > + if (alloc_size > max_ents) { > + alloc_size = max_ents; > + sg_size = alloc_size - 1; > + } else > + sg_size = alloc_size; > + > + left -= sg_size; > + > + sg = kmalloc(alloc_size * sizeof(struct scatterlist), gfp_mask); > + if (unlikely(!sg)) { > + /* > + * Adjust entry count to reflect that the last > + * entry of the previous table won't be used for > + * linkage. Without this, sg_kfree() may get > + * confused. > + */ > + if (prv) > + table->nents = ++table->orig_nents; > + > + return -ENOMEM; > + } > + > + sg_init_table(sg, alloc_size); > + table->nents = table->orig_nents += sg_size; > + > + /* > + * If this is the first mapping, assign the sg table header. > + * If this is not the first mapping, chain previous part. > + */ > + if (prv) > + sg_chain(prv, max_ents, sg); > + else > + table->sgl = sg; > + > + /* > + * If no more entries after this one, mark the end > + */ > + if (!left) > + sg_mark_end(&sg[sg_size - 1]); > + > + prv = sg; > + } while (left); > + > + return 0; > +} > + > +/** > + * sg_alloc_table - Allocate and initialize an sg table > + * @table: The sg table header to use > + * @nents: Number of entries in sg list > + * @gfp_mask: GFP allocation mask > + * > + * Description: > + * Allocate and initialize an sg table. If @nents@ is larger than > + * SG_MAX_SINGLE_ALLOC a chained sg table will be setup. > + * > + **/ > + > +static inline int > +sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask) > +{ > + int ret; > + > + ret = __sg_alloc_table(table, nents, SG_MAX_SINGLE_ALLOC, > + gfp_mask); > + if (unlikely(ret)) > + __sg_free_table(table, SG_MAX_SINGLE_ALLOC); > + > + return ret; > +} > + > #define for_each_sg(sglist, sg, sgmax, _itr) \ > for (_itr = 0, sg = (sglist); _itr < (sgmax); _itr++, sg = sg_next(sg)) > > > Modified: head/sys/ofed/include/linux/vmalloc.h > ============================================================================== > --- head/sys/ofed/include/linux/vmalloc.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/linux/vmalloc.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -30,7 +30,7 @@ > #ifndef _LINUX_VMALLOC_H_ > #define _LINUX_VMALLOC_H_ > > -#include > +#include > > #define VM_MAP 0x0000 > #define PAGE_KERNEL 0x0000 > > Modified: head/sys/ofed/include/rdma/ib_addr.h > ============================================================================== > --- head/sys/ofed/include/rdma/ib_addr.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/rdma/ib_addr.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -41,7 +41,6 @@ > #include > #include > #include > -#include > #include > > struct rdma_addr_client { > > Modified: head/sys/ofed/include/rdma/ib_smi.h > ============================================================================== > --- head/sys/ofed/include/rdma/ib_smi.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/rdma/ib_smi.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -38,6 +38,7 @@ > #define IB_SMI_H > > #include > +#include > > #define IB_SMP_DATA_SIZE 64 > #define IB_SMP_MAX_PATH_HOPS 64 > > Modified: head/sys/ofed/include/rdma/ib_user_cm.h > ============================================================================== > --- head/sys/ofed/include/rdma/ib_user_cm.h Wed Oct 15 13:39:00 2014 (r273134) > +++ head/sys/ofed/include/rdma/ib_user_cm.h Wed Oct 15 13:40:29 2014 (r273135) > @@ -34,6 +34,7 @@ > #ifndef IB_USER_CM_H > #define IB_USER_CM_H > > +#include > #include > > #define IB_USER_CM_ABI_VERSION 5 > -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 12:41:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BA32DA4; Thu, 16 Oct 2014 12:41:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25DCDE2D; Thu, 16 Oct 2014 12:41:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GCfFxC007664; Thu, 16 Oct 2014 12:41:15 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GCfFHO007663; Thu, 16 Oct 2014 12:41:15 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201410161241.s9GCfFHO007663@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 16 Oct 2014 12:41:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273165 - head/sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 12:41:15 -0000 Author: mjg Date: Thu Oct 16 12:41:14 2014 New Revision: 273165 URL: https://svnweb.freebsd.org/changeset/base/273165 Log: Use lockless quota checks in qsync and qsyncvp. No strong objections from: kib, mckusick MFC after: 1 week Modified: head/sys/ufs/ufs/ufs_quota.c Modified: head/sys/ufs/ufs/ufs_quota.c ============================================================================== --- head/sys/ufs/ufs/ufs_quota.c Thu Oct 16 09:09:43 2014 (r273164) +++ head/sys/ufs/ufs/ufs_quota.c Thu Oct 16 12:41:14 2014 (r273165) @@ -1035,11 +1035,9 @@ qsync(struct mount *mp) * Check if the mount point has any quotas. * If not, simply return. */ - UFS_LOCK(ump); for (i = 0; i < MAXQUOTAS; i++) if (ump->um_quotas[i] != NULLVP) break; - UFS_UNLOCK(ump); if (i == MAXQUOTAS) return (0); /* @@ -1084,11 +1082,9 @@ qsyncvp(struct vnode *vp) * Check if the mount point has any quotas. * If not, simply return. */ - UFS_LOCK(ump); for (i = 0; i < MAXQUOTAS; i++) if (ump->um_quotas[i] != NULLVP) break; - UFS_UNLOCK(ump); if (i == MAXQUOTAS) return (0); /* From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 12:57:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFE6611E; Thu, 16 Oct 2014 12:57:52 +0000 (UTC) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D090495; Thu, 16 Oct 2014 12:57:51 +0000 (UTC) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTP id s9GCvk7W014576; Thu, 16 Oct 2014 21:57:48 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Thu, 16 Oct 2014 21:57:45 +0900 (JST) Message-Id: <20141016.215745.1918694238903129813.nyan@FreeBSD.org> To: imp@freebsd.org Subject: Re: svn commit: r273155 - in head: etc/devd libexec share/mk From: TAKAHASHI Yoshihiro In-Reply-To: <201410160033.s9G0X6W1063001@svn.freebsd.org> References: <201410160033.s9G0X6W1063001@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 12:57:52 -0000 In article <201410160033.s9G0X6W1063001@svn.freebsd.org> Warner Losh writes: > Log: > HYPERV isn't available on all architectures, but just on by default > for i386/amd64. Rather, it only works on i386/amd64 and should only be > built there. Rather than change the default based on which > architecutre, do things more directly by only building it on > i386/amd64 and having it always on. This is how we handle other > options that are relevant only for a few architectures. > > Added: > head/libexec/Makefile.amd64 (contents, props changed) > head/libexec/Makefile.i386 (contents, props changed) We need a dummy Makefile.pc98 to avoid including Makefile.i386 on pc98. --- TAKAHASHI Yoshihiro From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 13:30:21 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E8CE7F8; Thu, 16 Oct 2014 13:30:21 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F013762A; Thu, 16 Oct 2014 13:30:20 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 1CF231FE022; Thu, 16 Oct 2014 15:30:18 +0200 (CEST) Message-ID: <543FC86C.2050509@selasky.org> Date: Thu, 16 Oct 2014 15:30:20 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Mateusz Guzik Subject: Re: svn commit: r273135 - in head/sys: contrib/rdma/krping dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/drivers/infiniband/ulp/i... References: <201410151340.s9FDeUFQ049767@svn.freebsd.org> <20141016123908.GA10350@dft-labs.eu> In-Reply-To: <20141016123908.GA10350@dft-labs.eu> 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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 13:30:21 -0000 On 10/16/14 14:39, Mateusz Guzik wrote: > On Wed, Oct 15, 2014 at 01:40:30PM +0000, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Wed Oct 15 13:40:29 2014 >> New Revision: 273135 >> URL: https://svnweb.freebsd.org/changeset/base/273135 >> >> Log: >> Update the OFED Linux compatibility layer and >> Mellanox hardware driver(s): >> >> - Properly name an inclusion guard >> - Fix compile warnings regarding unsigned enums >> - Add two new sysctl nodes >> - Remove all empty linux header files >> - Make an error printout more verbose >> - Use "mod_delayed_work()" instead of >> cancelling and starting a timeout. >> - Implement more Linux scatterlist >> functions. >> > > Do you have ofed benchmarks by any chance? > > In linux they use atomic_read which just reads the var and so on, while > our compat layer issues full memory barrier in such case (i.e. does it > in an expensive way providing guarantees not needed by the code). > > I would suggest investigating re-implementation of the layer with > relaxed functions and checking if it improves stuff. > > Just my $0,03. > Hi Mateusz, We have not specifically investigated all parts of the OFED layer, and your comments are valid. There is indeed room for improvement. Do you have a patch suggestion? --HPS From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 13:41:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3478A32; Thu, 16 Oct 2014 13:41:14 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E95678D; Thu, 16 Oct 2014 13:41:13 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id d1so4769948wiv.12 for ; Thu, 16 Oct 2014 06:41:12 -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:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=h1ULINLY5TBNFoW8bsE+7CejOjj9g2ddROrqoSfKJ/o=; b=Q3vWqlo+UAdLFuLraWWrNHgrueHbTOxN1Q0H10PUPX6WTPzttFqREoRDCQtvcLeZCE Kubu9NiM5DHkXcqFqhR100tccWct0vOj4S+h/VVTgEhokC26N/bqGh2gCpbKxvaWB+8y O0WsEWs4CLhUFrZ2LUQRwV1NrRTCB6+HPhYSahNIu/UfN8v78NxPHHnqOErQ973sQfJH NBWK3wCXOlKhtJ0CQZ+PE+ahc42rDzgSk843Ial2RxF/8Ql/60j+29Ckq/mZ0C4jYzGl x+/eoNkWP9z5Y6BYSaz1BIBg+7zYI/w4Rl33rExHfOiHvEdylGg5i+RAsI2tB5ULzm5l okCg== X-Received: by 10.181.27.197 with SMTP id ji5mr20844320wid.26.1413466872311; Thu, 16 Oct 2014 06:41:12 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id mc4sm2061759wic.6.2014.10.16.06.41.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 16 Oct 2014 06:41:11 -0700 (PDT) Date: Thu, 16 Oct 2014 15:41:09 +0200 From: Mateusz Guzik To: Hans Petter Selasky Subject: Re: svn commit: r273135 - in head/sys: contrib/rdma/krping dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/drivers/infiniband/ulp/i... Message-ID: <20141016134109.GB10350@dft-labs.eu> References: <201410151340.s9FDeUFQ049767@svn.freebsd.org> <20141016123908.GA10350@dft-labs.eu> <543FC86C.2050509@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <543FC86C.2050509@selasky.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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 13:41:15 -0000 On Thu, Oct 16, 2014 at 03:30:20PM +0200, Hans Petter Selasky wrote: > On 10/16/14 14:39, Mateusz Guzik wrote: > >On Wed, Oct 15, 2014 at 01:40:30PM +0000, Hans Petter Selasky wrote: > >>Author: hselasky > >>Date: Wed Oct 15 13:40:29 2014 > >>New Revision: 273135 > >>URL: https://svnweb.freebsd.org/changeset/base/273135 > >> > >>Log: > >> Update the OFED Linux compatibility layer and > >> Mellanox hardware driver(s): > >> > >> - Properly name an inclusion guard > >> - Fix compile warnings regarding unsigned enums > >> - Add two new sysctl nodes > >> - Remove all empty linux header files > >> - Make an error printout more verbose > >> - Use "mod_delayed_work()" instead of > >> cancelling and starting a timeout. > >> - Implement more Linux scatterlist > >> functions. > >> > > > >Do you have ofed benchmarks by any chance? > > > >In linux they use atomic_read which just reads the var and so on, while > >our compat layer issues full memory barrier in such case (i.e. does it > >in an expensive way providing guarantees not needed by the code). > > > >I would suggest investigating re-implementation of the layer with > >relaxed functions and checking if it improves stuff. > > > >Just my $0,03. > > > > Hi Mateusz, > > We have not specifically investigated all parts of the OFED layer, > and your comments are valid. There is indeed room for improvement. Do > you have a patch suggestion? > Well, atomic_set can be as simple as v->counter = i; (which btw will make it look identical to linux version). This should not give any measureable effect unless atomic_set on given var is abused quite a lot. On the other hand atomic_read, assuming the var is "popular", can give something. To quote my other mail: Reading http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf (pdf page 77) reveals: A cast of a value to a qualified type has no effect; the qualification (volatile, say) can have no effect on the access since it has occurred prior to the cast. If it is necessary to access a non-volatile object using volatile semantics, the technique is to cast the address of the object to the appropriate pointer-to-qualified type, then dereference that pointer. So how about we just follow the recomandation and also get the type automagically like linux folks do (added to sys/param.h): #define READ_ONCE(var) (*(volatile __typeof(var) *)&(var)) ======== However, READ_ONCE macro got some comments and I didn't get around to address that yet. Still, this is something you can use for testing. So that would be return (READ_ONCE(var)) or so. -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 13:49:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DD3AC5B; Thu, 16 Oct 2014 13:49:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19BD4875; Thu, 16 Oct 2014 13:49:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GDns4u039594; Thu, 16 Oct 2014 13:49:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GDnsiv039593; Thu, 16 Oct 2014 13:49:54 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410161349.s9GDnsiv039593@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 16 Oct 2014 13:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273166 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 13:49:55 -0000 Author: andrew Date: Thu Oct 16 13:49:54 2014 New Revision: 273166 URL: https://svnweb.freebsd.org/changeset/base/273166 Log: Fix the type of pte_pa as when it is passed into _kvm_pa2off it is either a uint64_t or a pointer to an off_t. With it being a u_long can result in incorrect values being returned. Modified: head/lib/libkvm/kvm_arm.c Modified: head/lib/libkvm/kvm_arm.c ============================================================================== --- head/lib/libkvm/kvm_arm.c Thu Oct 16 12:41:14 2014 (r273165) +++ head/lib/libkvm/kvm_arm.c Thu Oct 16 13:49:54 2014 (r273166) @@ -212,7 +212,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, off_t struct vmstate *vm = kd->vmst; pd_entry_t pd; pt_entry_t pte; - u_long pte_pa; + off_t pte_pa; if (kd->vmst->minidump) return (_kvm_minidump_kvatop(kd, va, pa)); @@ -228,7 +228,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, off_t return (_kvm_pa2off(kd, *pa, pa, L1_S_SIZE)); } pte_pa = (pd & L1_ADDR_MASK) + l2pte_index(va) * sizeof(pte); - _kvm_pa2off(kd, pte_pa, (off_t *)&pte_pa, L1_S_SIZE); + _kvm_pa2off(kd, pte_pa, &pte_pa, L1_S_SIZE); if (lseek(kd->pmfd, pte_pa, 0) == -1) { _kvm_syserr(kd, kd->program, "_kvm_kvatop: lseek"); goto invalid; From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 13:55:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A10D4F0A; Thu, 16 Oct 2014 13:55:51 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F481950; Thu, 16 Oct 2014 13:55:50 +0000 (UTC) Received: from c116.sec.cl.cam.ac.uk (c116.sec.cl.cam.ac.uk [128.232.18.116]) (authenticated bits=0) by theravensnest.org (8.14.9/8.14.9) with ESMTP id s9GDtke8041576 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 16 Oct 2014 13:55:48 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r273135 - in head/sys: contrib/rdma/krping dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/drivers/infiniband/ulp/i... From: David Chisnall In-Reply-To: <20141016134109.GB10350@dft-labs.eu> Date: Thu, 16 Oct 2014 14:55:46 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201410151340.s9FDeUFQ049767@svn.freebsd.org> <20141016123908.GA10350@dft-labs.eu> <543FC86C.2050509@selasky.org> <20141016134109.GB10350@dft-labs.eu> To: Mateusz Guzik X-Mailer: Apple Mail (2.1878.6) Cc: Hans Petter Selasky , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 13:55:51 -0000 On 16 Oct 2014, at 14:41, Mateusz Guzik wrote: > Well, atomic_set can be as simple as v->counter =3D i; (which btw will > make it look identical to linux version). This should not give any > measureable effect unless atomic_set on given var is abused quite a = lot. v->counter =3D i does not establish a happens-before relationship and so = there is no guarantee that the write will be visible to other threads = until something else does establish such a relationship. The compiler = and CPU are both free to reorder the store at will, and to elide it. There is a reason that C11 provides atomic_store and atomic_load = operations. It sounds like Linux wants the relaxed consistency model = here, which *is* equivalent to v->counter =3D i on x86, but *will not be = the same* on any weakly-ordered architecture (e.g. ARM). Given that we have a stdatomic.h in the base system, which works with = all of our supported compilers, please consider using the functionality = provided by the C standard to solve your exact problem. David From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 14:04:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB0F11EF for ; Thu, 16 Oct 2014 14:04:58 +0000 (UTC) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 877F5A56 for ; Thu, 16 Oct 2014 14:04:58 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id lf10so3513017pab.2 for ; Thu, 16 Oct 2014 07:04:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=EstmQ3JKwKiY4F+5X4E4ERAFh7UdwD6l6Kz21jDjfrk=; b=YqsANBC7/H5rc7uLH2AdCHe6Pfivc6m4VncirXteKNtFfYaPXP2PK1rnOSk61LAkEL ttz9emR7alRWpuBXn0tuNj1893T35f7xtNSnufQcSl6GZ/YNhdjk9hJqaSVdC8DgK8Fm fquPamDYQ7qGqW3vA6nUkGvHWcREf1scUmpjcJZK/PtNNPTp95whnzgYjiJQNPX80lPj xmdsHoU7Tg5ZyHMzWA/+pFBPKlpgrbmsGBscB98Fdp/6yHpJSzplrxc5rbEWgSzC69uH bRxQM2vIR79L+vkcbUdXwp/Orx2k4tnJlTu0KVNOfk0ks+UG9olDs6TUPIV8f84T6jCQ UQvw== X-Gm-Message-State: ALoCoQlJNBe3fGGo9g3IqLcfLxWRYsVRM6SRqeJvf91aJsI7mtEG0nSR5UM3iMPiZ2L7OYn0p9np X-Received: by 10.69.18.139 with SMTP id gm11mr1684368pbd.104.1413468292425; Thu, 16 Oct 2014 07:04:52 -0700 (PDT) Received: from [192.168.5.79] (ip-64-134-223-187.public.wayport.net. [64.134.223.187]) by mx.google.com with ESMTPSA id yw3sm19803726pbc.88.2014.10.16.07.04.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Oct 2014 07:04:51 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_6E83B972-5F28-4E55-B1DF-A1D3988C28B3"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r273155 - in head: etc/devd libexec share/mk From: Warner Losh In-Reply-To: <20141016.215745.1918694238903129813.nyan@FreeBSD.org> Date: Thu, 16 Oct 2014 07:04:48 -0700 Message-Id: <95B919B0-9405-4E1B-B79F-A65E12FFD893@bsdimp.com> References: <201410160033.s9G0X6W1063001@svn.freebsd.org> <20141016.215745.1918694238903129813.nyan@FreeBSD.org> To: TAKAHASHI Yoshihiro X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 14:04:58 -0000 --Apple-Mail=_6E83B972-5F28-4E55-B1DF-A1D3988C28B3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Oct 16, 2014, at 5:57 AM, TAKAHASHI Yoshihiro = wrote: > In article <201410160033.s9G0X6W1063001@svn.freebsd.org> > Warner Losh writes: >=20 >> Log: >> HYPERV isn't available on all architectures, but just on by default >> for i386/amd64. Rather, it only works on i386/amd64 and should only = be >> built there. Rather than change the default based on which >> architecutre, do things more directly by only building it on >> i386/amd64 and having it always on. This is how we handle other >> options that are relevant only for a few architectures. >>=20 >> Added: >> head/libexec/Makefile.amd64 (contents, props changed) >> head/libexec/Makefile.i386 (contents, props changed) >=20 > We need a dummy Makefile.pc98 to avoid including Makefile.i386 on = pc98. Ah, right. Thanks. Will fix that. Sorry that I didn=92t test that. Warner --Apple-Mail=_6E83B972-5F28-4E55-B1DF-A1D3988C28B3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUP9CAAAoJEGwc0Sh9sBEAFygP/2KbyLT8Mq8ScLcTMvPY8OIW gYDnK5QLoONxmaH/h9n0uxGa4ayhvB6DkR3PCZkn2i3kLnEH07btL5yM7EzrXJq7 wpgVR+6TwlOuL3/b0M5Sq0F/N4axIpXCBF5FZGdHHwmhOKzUoTHN9C6fyKrEk58B n8M4t0DFAJjNWfe+axQR0sgZnjtutQ36OjYiPjfPssboxsynqkzYHa8wUtWe47fq BKu1IU5MJP3Jw6tBWdoXBqnW9t6BcAgywcpo5f+pyyc5BvYd4yCGEBHsDae+23P2 e1icwDdkvYOC60mlvZqa7HxUfp2VDOMefeSjHBJgjG+4mcCtDa/3sEnqlON1aeJi 8VRYPZsn0Q7Kxr5+EKhFAgEzTVYn9JOp7ojgF7zuhLdCwWFVLQyHJGlrne5DLm16 RqhoXDaoaPV2er5pf85d5xCjeOIFuSJPSZjw9IYtKz7KZ3Lzh9voQ6Qt+K4UGA3u xQN4IQaV/kDSaIicdZnF5g/YEZzTDMzV8A6cID4qztZmT+lC/4P1gNLO2CdUriOW zzKb4WmGah/SzlkElmcJSftu8uvFvERtdMpj71cT8O0ErMKgzcGTuSOqjirshh50 Mo3VUyPGukwkaHVeWk6YQ9RvFDgikxRCiGZ74oLrU9mhBGHsUJlYSwJTFUEVfYm5 Z0N7VBDUTLM1bwg5Cw9a =3g5z -----END PGP SIGNATURE----- --Apple-Mail=_6E83B972-5F28-4E55-B1DF-A1D3988C28B3-- From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 14:09:00 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DD5D349; Thu, 16 Oct 2014 14:09:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49C7FA8C; Thu, 16 Oct 2014 14:09:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GE904D049115; Thu, 16 Oct 2014 14:09:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GE90Oj049107; Thu, 16 Oct 2014 14:09:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201410161409.s9GE90Oj049107@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 16 Oct 2014 14:09:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273167 - head/libexec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 14:09:00 -0000 Author: imp Date: Thu Oct 16 14:08:59 2014 New Revision: 273167 URL: https://svnweb.freebsd.org/changeset/base/273167 Log: Add an "empty" Makefile.pc98 because it doesn't need/want HYPERV. It is not relevant to the hardware it runs on. Added: head/libexec/Makefile.pc98 (contents, props changed) Added: head/libexec/Makefile.pc98 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/Makefile.pc98 Thu Oct 16 14:08:59 2014 (r273167) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +# Because i386 adds extra stuff we don't need or want for PC98 we need +# an empty file so it doesn't get added. From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 15:36:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83AC2BF8; Thu, 16 Oct 2014 15:36:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F106752; Thu, 16 Oct 2014 15:36:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GFa5SN090958; Thu, 16 Oct 2014 15:36:05 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GFa45u090955; Thu, 16 Oct 2014 15:36:04 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410161536.s9GFa45u090955@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 16 Oct 2014 15:36:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273168 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 15:36:05 -0000 Author: tuexen Date: Thu Oct 16 15:36:04 2014 New Revision: 273168 URL: https://svnweb.freebsd.org/changeset/base/273168 Log: Fix the reported streams in a SCTP_STREAM_RESET_EVENT, if a sent incoming stream reset request was responded with failed or denied. Thanks to Peter Bostroem from Google for reporting the issue. MFC after: 3 days Modified: head/sys/netinet/sctp_header.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_input.h Modified: head/sys/netinet/sctp_header.h ============================================================================== --- head/sys/netinet/sctp_header.h Thu Oct 16 14:08:59 2014 (r273167) +++ head/sys/netinet/sctp_header.h Thu Oct 16 15:36:04 2014 (r273168) @@ -450,6 +450,11 @@ struct sctp_pktdrop_chunk { /**********STREAM RESET STUFF ******************/ +struct sctp_stream_reset_request { + struct sctp_paramhdr ph; + uint32_t request_seq; +} SCTP_PACKED; + struct sctp_stream_reset_out_request { struct sctp_paramhdr ph; uint32_t request_seq; /* monotonically increasing seq no */ @@ -464,7 +469,6 @@ struct sctp_stream_reset_in_request { uint16_t list_of_streams[]; /* if not all list of streams */ } SCTP_PACKED; - struct sctp_stream_reset_tsn_request { struct sctp_paramhdr ph; uint32_t request_seq; Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Thu Oct 16 14:08:59 2014 (r273167) +++ head/sys/netinet/sctp_input.c Thu Oct 16 15:36:04 2014 (r273168) @@ -3496,12 +3496,12 @@ sctp_reset_out_streams(struct sctp_tcb * } -struct sctp_stream_reset_out_request * +struct sctp_stream_reset_request * sctp_find_stream_reset(struct sctp_tcb *stcb, uint32_t seq, struct sctp_tmit_chunk **bchk) { struct sctp_association *asoc; struct sctp_chunkhdr *ch; - struct sctp_stream_reset_out_request *r; + struct sctp_stream_reset_request *r; struct sctp_tmit_chunk *chk; int len, clen; @@ -3524,7 +3524,7 @@ sctp_find_stream_reset(struct sctp_tcb * } clen = chk->send_size; ch = mtod(chk->data, struct sctp_chunkhdr *); - r = (struct sctp_stream_reset_out_request *)(ch + 1); + r = (struct sctp_stream_reset_request *)(ch + 1); if (ntohl(r->request_seq) == seq) { /* found it */ return (r); @@ -3532,7 +3532,7 @@ sctp_find_stream_reset(struct sctp_tcb * len = SCTP_SIZE32(ntohs(r->ph.param_length)); if (clen > (len + (int)sizeof(struct sctp_chunkhdr))) { /* move to the next one, there can only be a max of two */ - r = (struct sctp_stream_reset_out_request *)((caddr_t)r + len); + r = (struct sctp_stream_reset_request *)((caddr_t)r + len); if (ntohl(r->request_seq) == seq) { return (r); } @@ -3576,7 +3576,9 @@ sctp_handle_stream_reset_response(struct int lparm_len; struct sctp_association *asoc = &stcb->asoc; struct sctp_tmit_chunk *chk; - struct sctp_stream_reset_out_request *srparam; + struct sctp_stream_reset_request *req_param; + struct sctp_stream_reset_out_request *req_out_param; + struct sctp_stream_reset_in_request *req_in_param; uint32_t number_entries; if (asoc->stream_reset_outstanding == 0) { @@ -3584,35 +3586,36 @@ sctp_handle_stream_reset_response(struct return (0); } if (seq == stcb->asoc.str_reset_seq_out) { - srparam = sctp_find_stream_reset(stcb, seq, &chk); - if (srparam) { + req_param = sctp_find_stream_reset(stcb, seq, &chk); + if (req_param != NULL) { stcb->asoc.str_reset_seq_out++; - type = ntohs(srparam->ph.param_type); - lparm_len = ntohs(srparam->ph.param_length); + type = ntohs(req_param->ph.param_type); + lparm_len = ntohs(req_param->ph.param_length); if (type == SCTP_STR_RESET_OUT_REQUEST) { + req_out_param = (struct sctp_stream_reset_out_request *)req_param; number_entries = (lparm_len - sizeof(struct sctp_stream_reset_out_request)) / sizeof(uint16_t); asoc->stream_reset_out_is_outstanding = 0; if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { /* do it */ - sctp_reset_out_streams(stcb, number_entries, srparam->list_of_streams); + sctp_reset_out_streams(stcb, number_entries, req_out_param->list_of_streams); } else if (action == SCTP_STREAM_RESET_RESULT_DENIED) { - sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_DENIED_OUT, stcb, number_entries, srparam->list_of_streams, SCTP_SO_NOT_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_DENIED_OUT, stcb, number_entries, req_out_param->list_of_streams, SCTP_SO_NOT_LOCKED); } else { - sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_FAILED_OUT, stcb, number_entries, srparam->list_of_streams, SCTP_SO_NOT_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_FAILED_OUT, stcb, number_entries, req_out_param->list_of_streams, SCTP_SO_NOT_LOCKED); } } else if (type == SCTP_STR_RESET_IN_REQUEST) { - /* Answered my request */ + req_in_param = (struct sctp_stream_reset_in_request *)req_param; number_entries = (lparm_len - sizeof(struct sctp_stream_reset_in_request)) / sizeof(uint16_t); if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; if (action == SCTP_STREAM_RESET_RESULT_DENIED) { sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_DENIED_IN, stcb, - number_entries, srparam->list_of_streams, SCTP_SO_NOT_LOCKED); + number_entries, req_in_param->list_of_streams, SCTP_SO_NOT_LOCKED); } else if (action != SCTP_STREAM_RESET_RESULT_PERFORMED) { sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_FAILED_IN, stcb, - number_entries, srparam->list_of_streams, SCTP_SO_NOT_LOCKED); + number_entries, req_in_param->list_of_streams, SCTP_SO_NOT_LOCKED); } } else if (type == SCTP_STR_RESET_ADD_OUT_STREAMS) { /* Ok we now may have more streams */ Modified: head/sys/netinet/sctp_input.h ============================================================================== --- head/sys/netinet/sctp_input.h Thu Oct 16 14:08:59 2014 (r273167) +++ head/sys/netinet/sctp_input.h Thu Oct 16 15:36:04 2014 (r273168) @@ -48,7 +48,7 @@ sctp_common_input_processing(struct mbuf uint8_t, uint32_t, uint32_t, uint16_t); -struct sctp_stream_reset_out_request * +struct sctp_stream_reset_request * sctp_find_stream_reset(struct sctp_tcb *stcb, uint32_t seq, struct sctp_tmit_chunk **bchk); From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 15:52:36 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5BC82FE; Thu, 16 Oct 2014 15:52:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87F9394D; Thu, 16 Oct 2014 15:52:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GFqaWb099770; Thu, 16 Oct 2014 15:52:36 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GFqa15099769; Thu, 16 Oct 2014 15:52:36 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201410161552.s9GFqa15099769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 16 Oct 2014 15:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273170 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 15:52:36 -0000 Author: brooks Date: Thu Oct 16 15:52:36 2014 New Revision: 273170 URL: https://svnweb.freebsd.org/changeset/base/273170 Log: MK_ARB_EABI was removed in r272350 so remove the documentation. Deleted: head/tools/build/options/WITHOUT_ARM_EABI From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 15:54:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CD72490; Thu, 16 Oct 2014 15:54:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 107CA977; Thu, 16 Oct 2014 15:54:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GFsNG4000139; Thu, 16 Oct 2014 15:54:23 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GFsNrc000138; Thu, 16 Oct 2014 15:54:23 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201410161554.s9GFsNrc000138@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 16 Oct 2014 15:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273171 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 15:54:24 -0000 Author: brooks Date: Thu Oct 16 15:54:23 2014 New Revision: 273171 URL: https://svnweb.freebsd.org/changeset/base/273171 Log: Per r273155, HYPERV is built by default on platforms where it makes sense and ignored on others. Deleted: head/tools/build/options/WITH_HYPERV From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 15:55:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7576A5EC; Thu, 16 Oct 2014 15:55:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61445986; Thu, 16 Oct 2014 15:55:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GFtEKh000329; Thu, 16 Oct 2014 15:55:14 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GFtEkS000328; Thu, 16 Oct 2014 15:55:14 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201410161555.s9GFtEkS000328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 16 Oct 2014 15:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273172 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 15:55:14 -0000 Author: brooks Date: Thu Oct 16 15:55:13 2014 New Revision: 273172 URL: https://svnweb.freebsd.org/changeset/base/273172 Log: Document that WITHOUT_TOOLCHAIN causes headers to not be installed, not just programs. Modified: head/tools/build/options/WITHOUT_TOOLCHAIN Modified: head/tools/build/options/WITHOUT_TOOLCHAIN ============================================================================== --- head/tools/build/options/WITHOUT_TOOLCHAIN Thu Oct 16 15:54:23 2014 (r273171) +++ head/tools/build/options/WITHOUT_TOOLCHAIN Thu Oct 16 15:55:13 2014 (r273172) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -Set to not install +Set to not install header or programs used for program development, compilers, debuggers etc. .Bf -symbolic From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 15:59:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BC9478F; Thu, 16 Oct 2014 15:59:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EA859B4; Thu, 16 Oct 2014 15:59:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GFx1tb000832; Thu, 16 Oct 2014 15:59:01 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GFx18P000831; Thu, 16 Oct 2014 15:59:01 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201410161559.s9GFx18P000831@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 16 Oct 2014 15:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273173 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 15:59:01 -0000 Author: brooks Date: Thu Oct 16 15:59:00 2014 New Revision: 273173 URL: https://svnweb.freebsd.org/changeset/base/273173 Log: Regenerate src.conf.5 after: r273170: MK_ARB_EABI was removed in r272350 so remove the documentation. r273171: Per r273155, HYPERV is built by default on platforms where it makes sense and ignored on others. r273172: Document that WITHOUT_TOOLCHAIN causes headers to not be installed, not just programs. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Oct 16 15:55:13 2014 (r273172) +++ head/share/man/man5/src.conf.5 Thu Oct 16 15:59:00 2014 (r273173) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd September 12, 2014 +.Dd October 16, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -100,9 +100,6 @@ Set to not build .Xr apm 8 , .Xr apmd 8 and related programs. -.It Va WITHOUT_ARM_EABI -.\" from FreeBSD: head/tools/build/options/WITHOUT_ARM_EABI 253396 2013-07-16 19:15:19Z andrew -Set the ARM ABI to OABI. .It Va WITHOUT_ASSERT_DEBUG .\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru Set to compile programs and libraries without the @@ -525,15 +522,6 @@ Set to not build HTML docs. .It Va WITHOUT_HYPERV .\" from FreeBSD: head/tools/build/options/WITHOUT_HYPERV 271493 2014-09-13 02:15:31Z delphij Set to not build or install HyperV utilities. -.Pp -It is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv6hf, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -.It Va WITH_HYPERV -.\" from FreeBSD: head/tools/build/options/WITH_HYPERV 271493 2014-09-13 02:15:31Z delphij -Set to build and install HyperV utilities. -.Pp -It is a default setting on -amd64/amd64, i386/i386 and pc98/i386. .It Va WITHOUT_ICONV .\" from FreeBSD: head/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine Set to not build iconv as part of libc. @@ -1058,8 +1046,8 @@ When set, it also enforces the following .Va WITHOUT_GROFF .El .It Va WITHOUT_TOOLCHAIN -.\" from FreeBSD: head/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru -Set to not install +.\" from FreeBSD: head/tools/build/options/WITHOUT_TOOLCHAIN 273172 2014-10-16 15:55:13Z brooks +Set to not install header or programs used for program development, compilers, debuggers etc. .Bf -symbolic From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 18:04:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC47532A; Thu, 16 Oct 2014 18:04:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94AE492F; Thu, 16 Oct 2014 18:04:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GI4t3k091611; Thu, 16 Oct 2014 18:04:55 GMT (envelope-from davide@FreeBSD.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GI4hed091471; Thu, 16 Oct 2014 18:04:43 GMT (envelope-from davide@FreeBSD.org) Message-Id: <201410161804.s9GI4hed091471@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davide set sender to davide@FreeBSD.org using -f From: Davide Italiano Date: Thu, 16 Oct 2014 18:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci de... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 18:04:55 -0000 Author: davide Date: Thu Oct 16 18:04:43 2014 New Revision: 273174 URL: https://svnweb.freebsd.org/changeset/base/273174 Log: Follow up to r225617. In order to maximize the re-usability of kernel code in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv(). This fixes a namespace collision with libc symbols. Submitted by: kmacy Tested by: make universe Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/vmm/vmm.c head/sys/arm/arm/machdep.c head/sys/cam/ata/ata_da.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/dev/acpica/acpi.c head/sys/dev/asmc/asmc.c head/sys/dev/cfi/cfi_core.c head/sys/dev/drm2/drm_crtc_helper.c head/sys/dev/hatm/if_hatm.c head/sys/dev/mii/brgphy.c head/sys/dev/nfe/if_nfe.c head/sys/dev/patm/if_patm_attach.c head/sys/dev/pci/pci.c head/sys/dev/pci/pci_pci.c head/sys/dev/rt/if_rt.c head/sys/dev/uart/uart_subr.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/geom/geom_dev.c head/sys/geom/raid/g_raid.c head/sys/geom/sched/g_sched.c head/sys/i386/i386/bios.c head/sys/i386/i386/machdep.c head/sys/i386/xen/xen_machdep.c head/sys/kern/init_main.c head/sys/kern/kern_environment.c head/sys/kern/kern_sysctl.c head/sys/kern/subr_hints.c head/sys/kern/subr_param.c head/sys/kern/vfs_mountroot.c head/sys/mips/atheros/ar71xx_machdep.c head/sys/mips/nlm/xlp_machdep.c head/sys/mips/rmi/xlr_machdep.c head/sys/nfs/bootp_subr.c head/sys/nfs/nfs_diskless.c head/sys/nfsclient/nfs_vfsops.c head/sys/powerpc/aim/machdep.c head/sys/sparc64/sparc64/machdep.c head/sys/sys/systm.h head/sys/vm/vm_page.c head/sys/x86/iommu/busdma_dmar.c head/sys/x86/x86/tsc.c head/sys/x86/xen/pv.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/amd64/amd64/machdep.c Thu Oct 16 18:04:43 2014 (r273174) @@ -244,7 +244,7 @@ cpu_startup(dummy) * We do this by disabling a bit in the SMI_EN (SMI Control and * Enable register) of the Intel ICH LPC Interface Bridge. */ - sysenv = getenv("smbios.system.product"); + sysenv = kern_getenv("smbios.system.product"); if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || strncmp(sysenv, "MacBook3,1", 10) == 0 || @@ -276,7 +276,7 @@ cpu_startup(dummy) * Display physical memory if SMBIOS reports reasonable amount. */ memsize = 0; - sysenv = getenv("smbios.memory.enabled"); + sysenv = kern_getenv("smbios.memory.enabled"); if (sysenv != NULL) { memsize = (uintmax_t)strtoul(sysenv, (char **)NULL, 10) << 10; freeenv(sysenv); @@ -2070,7 +2070,7 @@ hammer_time(u_int64_t modulep, u_int64_t thread0.td_pcb->pcb_cr3 = KPML4phys; /* PCID 0 is reserved for kernel */ thread0.td_frame = &proc0_tf; - env = getenv("kernelname"); + env = kern_getenv("kernelname"); if (env != NULL) strlcpy(kernelname, env, sizeof(kernelname)); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/amd64/vmm/vmm.c Thu Oct 16 18:04:43 2014 (r273174) @@ -1934,7 +1934,7 @@ vmm_is_pptdev(int bus, int slot, int fun /* set pptdevs="1/2/3 4/5/6 7/8/9 10/11/12" */ found = 0; for (i = 0; names[i] != NULL && !found; i++) { - cp = val = getenv(names[i]); + cp = val = kern_getenv(names[i]); while (cp != NULL && *cp != '\0') { if ((cp2 = strchr(cp, ' ')) != NULL) *cp2 = '\0'; Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/arm/arm/machdep.c Thu Oct 16 18:04:43 2014 (r273174) @@ -1245,7 +1245,7 @@ initarm(struct arm_boot_params *abp) debugf(" dtbp = 0x%08x\n", (uint32_t)dtbp); print_kenv(); - env = getenv("kernelname"); + env = kern_getenv("kernelname"); if (env != NULL) strlcpy(kernelname, env, sizeof(kernelname)); Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/cam/ata/ata_da.c Thu Oct 16 18:04:43 2014 (r273174) @@ -1316,7 +1316,7 @@ adaregister(struct cam_periph *periph, v softc->disk->d_name, softc->disk->d_unit); snprintf(buf1, sizeof(buf1), "ad%d", legacy_id); - setenv(announce_buf, buf1); + kern_setenv(announce_buf, buf1); } } else legacy_id = -1; Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Oct 16 18:04:43 2014 (r273174) @@ -13052,7 +13052,7 @@ dtrace_dof_property(const char *name) char *p; char *p_env; - if ((p_env = getenv(name)) == NULL) + if ((p_env = kern_getenv(name)) == NULL) return (NULL); len = strlen(p_env) / 2; Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/acpica/acpi.c Thu Oct 16 18:04:43 2014 (r273174) @@ -594,7 +594,7 @@ acpi_attach(device_t dev) sc->acpi_sleep_delay = 1; if (bootverbose) sc->acpi_verbose = 1; - if ((env = getenv("hw.acpi.verbose")) != NULL) { + if ((env = kern_getenv("hw.acpi.verbose")) != NULL) { if (strcmp(env, "0") != 0) sc->acpi_verbose = 1; freeenv(env); @@ -3337,7 +3337,7 @@ acpi_avoid(ACPI_HANDLE handle) np = acpi_name(handle); if (*np == '\\') np++; - if ((env = getenv("debug.acpi.avoid")) == NULL) + if ((env = kern_getenv("debug.acpi.avoid")) == NULL) return (0); /* Scan the avoid list checking for a match */ @@ -3370,7 +3370,7 @@ acpi_disabled(char *subsys) char *cp, *env; int len; - if ((env = getenv("debug.acpi.disabled")) == NULL) + if ((env = kern_getenv("debug.acpi.disabled")) == NULL) return (0); if (strcmp(env, "all") == 0) { freeenv(env); @@ -3753,8 +3753,8 @@ acpi_set_debugging(void *junk) AcpiDbgLevel = 0; } - layer = getenv("debug.acpi.layer"); - level = getenv("debug.acpi.level"); + layer = kern_getenv("debug.acpi.layer"); + level = kern_getenv("debug.acpi.level"); if (layer == NULL && level == NULL) return; @@ -3813,9 +3813,9 @@ acpi_debug_sysctl(SYSCTL_HANDLER_ARGS) /* If the user is setting a string, parse it. */ if (error == 0 && req->newptr != NULL) { - *dbg = 0; - setenv((char *)oidp->oid_arg1, (char *)req->newptr); - acpi_set_debugging(NULL); + *dbg = 0; + kern_setenv((char *)oidp->oid_arg1, (char *)req->newptr); + acpi_set_debugging(NULL); } ACPI_SERIAL_END(acpi); Modified: head/sys/dev/asmc/asmc.c ============================================================================== --- head/sys/dev/asmc/asmc.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/asmc/asmc.c Thu Oct 16 18:04:43 2014 (r273174) @@ -310,7 +310,7 @@ asmc_match(device_t dev) int i; char *model; - model = getenv("smbios.system.product"); + model = kern_getenv("smbios.system.product"); if (model == NULL) return (NULL); Modified: head/sys/dev/cfi/cfi_core.c ============================================================================== --- head/sys/dev/cfi/cfi_core.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/cfi/cfi_core.c Thu Oct 16 18:04:43 2014 (r273174) @@ -410,7 +410,7 @@ cfi_attach(device_t dev) device_get_nameunit(dev)) < (sizeof(name) - 1) && snprintf(value, sizeof(value), "0x%016jx", ppr) < (sizeof(value) - 1)) - (void) setenv(name, value); + (void) kern_setenv(name, value); } #endif Modified: head/sys/dev/drm2/drm_crtc_helper.c ============================================================================== --- head/sys/dev/drm2/drm_crtc_helper.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/drm2/drm_crtc_helper.c Thu Oct 16 18:04:43 2014 (r273174) @@ -53,7 +53,7 @@ drm_fetch_cmdline_mode_from_kenv(struct strlen(drm_get_connector_name(connector)), M_TEMP, M_WAITOK); strcpy(tun_var_name, tun_prefix); strcat(tun_var_name, drm_get_connector_name(connector)); - tun_mode = getenv(tun_var_name); + tun_mode = kern_getenv(tun_var_name); if (tun_mode != NULL) { res = drm_mode_parse_command_line_for_connector(tun_mode, connector, cmdline_mode); Modified: head/sys/dev/hatm/if_hatm.c ============================================================================== --- head/sys/dev/hatm/if_hatm.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/hatm/if_hatm.c Thu Oct 16 18:04:43 2014 (r273174) @@ -1319,7 +1319,7 @@ kenv_getuint(struct hatm_softc *sc, cons snprintf(full, sizeof(full), "hw.%s.%s", device_get_nameunit(sc->dev), var); - if ((val = getenv(full)) == NULL) + if ((val = kern_getenv(full)) == NULL) return (0); u = strtoul(val, &end, 0); if (end == val || *end != '\0') { Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/mii/brgphy.c Thu Oct 16 18:04:43 2014 (r273174) @@ -171,7 +171,7 @@ detect_hs21(struct bce_softc *bce_sc) found = 0; if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { - sysenv = getenv("smbios.system.product"); + sysenv = kern_getenv("smbios.system.product"); if (sysenv != NULL) { if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) == 0) Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/nfe/if_nfe.c Thu Oct 16 18:04:43 2014 (r273174) @@ -345,8 +345,8 @@ nfe_detect_msik9(struct nfe_softc *sc) int found; found = 0; - m = getenv("smbios.planar.maker"); - p = getenv("smbios.planar.product"); + m = kern_getenv("smbios.planar.maker"); + p = kern_getenv("smbios.planar.product"); if (m != NULL && p != NULL) { if (strcmp(m, maker) == 0 && strcmp(p, product) == 0) found = 1; @@ -839,8 +839,8 @@ nfe_can_use_msix(struct nfe_softc *sc) * Search base board manufacturer and product name table * to see this system has a known MSI/MSI-X issue. */ - maker = getenv("smbios.planar.maker"); - product = getenv("smbios.planar.product"); + maker = kern_getenv("smbios.planar.maker"); + product = kern_getenv("smbios.planar.product"); use_msix = 1; if (maker != NULL && product != NULL) { count = sizeof(msix_blacklists) / sizeof(msix_blacklists[0]); Modified: head/sys/dev/patm/if_patm_attach.c ============================================================================== --- head/sys/dev/patm/if_patm_attach.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/patm/if_patm_attach.c Thu Oct 16 18:04:43 2014 (r273174) @@ -579,7 +579,7 @@ patm_env_getuint(struct patm_softc *sc, snprintf(full, sizeof(full), "hw.%s.%s", device_get_nameunit(sc->dev), name); - if ((val = getenv(full)) != NULL) { + if ((val = kern_getenv(full)) != NULL) { u = strtoul(val, &end, 0); if (end > val && *end == '\0') { if (bootverbose) Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/pci/pci.c Thu Oct 16 18:04:43 2014 (r273174) @@ -3270,14 +3270,14 @@ pci_reserve_secbus(device_t bus, device_ case 0x00dd10de: /* Compaq R3000 BIOS sets wrong subordinate bus number. */ - if ((cp = getenv("smbios.planar.maker")) == NULL) + if ((cp = kern_getenv("smbios.planar.maker")) == NULL) break; if (strncmp(cp, "Compal", 6) != 0) { freeenv(cp); break; } freeenv(cp); - if ((cp = getenv("smbios.planar.product")) == NULL) + if ((cp = kern_getenv("smbios.planar.product")) == NULL) break; if (strncmp(cp, "08A0", 4) != 0) { freeenv(cp); Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/pci/pci_pci.c Thu Oct 16 18:04:43 2014 (r273174) @@ -977,14 +977,14 @@ pcib_attach_common(device_t dev) { char *cp; - if ((cp = getenv("smbios.planar.maker")) == NULL) + if ((cp = kern_getenv("smbios.planar.maker")) == NULL) break; if (strncmp(cp, "Compal", 6) != 0) { freeenv(cp); break; } freeenv(cp); - if ((cp = getenv("smbios.planar.product")) == NULL) + if ((cp = kern_getenv("smbios.planar.product")) == NULL) break; if (strncmp(cp, "08A0", 4) != 0) { freeenv(cp); Modified: head/sys/dev/rt/if_rt.c ============================================================================== --- head/sys/dev/rt/if_rt.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/rt/if_rt.c Thu Oct 16 18:04:43 2014 (r273174) @@ -241,8 +241,8 @@ ether_request_mac(device_t dev, uint8_t * "kmac" is passed via argv on RouterBOOT platforms */ #if defined(__U_BOOT__) || defined(__REDBOOT__) || defined(__ROUTERBOOT__) - if ((var = getenv("ethaddr")) != NULL || - (var = getenv("kmac")) != NULL ) { + if ((var = kern_getenv("ethaddr")) != NULL || + (var = kern_getenv("kmac")) != NULL ) { if(!macaddr_atoi(var, mac)) { printf("%s: use %s macaddr from KENV\n", Modified: head/sys/dev/uart/uart_subr.c ============================================================================== --- head/sys/dev/uart/uart_subr.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/dev/uart/uart_subr.c Thu Oct 16 18:04:43 2014 (r273174) @@ -214,9 +214,9 @@ uart_getenv(int devtype, struct uart_dev * port (resp). */ if (devtype == UART_DEV_CONSOLE) - spec = getenv("hw.uart.console"); + spec = kern_getenv("hw.uart.console"); else if (devtype == UART_DEV_DBGPORT) - spec = getenv("hw.uart.dbgport"); + spec = kern_getenv("hw.uart.dbgport"); else spec = NULL; if (spec == NULL) Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Thu Oct 16 18:04:43 2014 (r273174) @@ -442,7 +442,7 @@ nfs_mountroot(struct mount *mp) error = ifioctl(so, SIOCAIFADDR, (caddr_t)&nd->myif, td); if (error) panic("nfs_mountroot: SIOCAIFADDR: %d", error); - if ((cp = getenv("boot.netif.mtu")) != NULL) { + if ((cp = kern_getenv("boot.netif.mtu")) != NULL) { ir.ifr_mtu = strtol(cp, NULL, 10); bcopy(nd->myif.ifra_name, ir.ifr_name, IFNAMSIZ); freeenv(cp); Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/geom/geom_dev.c Thu Oct 16 18:04:43 2014 (r273174) @@ -116,7 +116,7 @@ static void g_dev_init(struct g_class *mp) { - dumpdev = getenv("dumpdev"); + dumpdev = kern_getenv("dumpdev"); } static void @@ -302,7 +302,7 @@ g_dev_taste(struct g_class *mp, struct g for (len = MIN(strlen(gp->name), sizeof(buf) - 15); len > 0; len--) { snprintf(buf, sizeof(buf), "kern.devalias.%s", gp->name); buf[14 + len] = 0; - val = getenv(buf); + val = kern_getenv(buf); if (val != NULL) { snprintf(buf, sizeof(buf), "%s%s", val, gp->name + len); Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/geom/raid/g_raid.c Thu Oct 16 18:04:43 2014 (r273174) @@ -1656,7 +1656,7 @@ g_raid_launch_provider(struct g_raid_vol "kern.devalias.%s", name); snprintf(buf1, sizeof(buf1), "ar%d", vol->v_global_id); - setenv(announce_buf, buf1); + kern_setenv(announce_buf, buf1); } pp = g_new_providerf(sc->sc_geom, "%s", name); Modified: head/sys/geom/sched/g_sched.c ============================================================================== --- head/sys/geom/sched/g_sched.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/geom/sched/g_sched.c Thu Oct 16 18:04:43 2014 (r273174) @@ -1661,7 +1661,7 @@ g_sched_taste(struct g_class *mp, struct if (pp->geom->class == mp) break; - taste_names = getenv("geom.sched.taste"); + taste_names = kern_getenv("geom.sched.taste"); if (taste_names == NULL) break; @@ -1679,7 +1679,7 @@ g_sched_taste(struct g_class *mp, struct pp->name, s); /* look up the provider name in the list */ - s = getenv("geom.sched.algo"); + s = kern_getenv("geom.sched.algo"); if (s == NULL) s = "rr"; Modified: head/sys/i386/i386/bios.c ============================================================================== --- head/sys/i386/i386/bios.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/i386/i386/bios.c Thu Oct 16 18:04:43 2014 (r273174) @@ -106,7 +106,7 @@ bios32_init(void *junk) } /* Allow user override of PCI BIOS search */ - if (((p = getenv("machdep.bios.pci")) == NULL) || strcmp(p, "disable")) { + if (((p = kern_getenv("machdep.bios.pci")) == NULL) || strcmp(p, "disable")) { /* See if there's a PCI BIOS entrypoint here */ PCIbios.ident.id = 0x49435024; /* PCI systems should have this */ @@ -125,7 +125,7 @@ bios32_init(void *junk) * * Allow user override of PnP BIOS search */ - if ((((p = getenv("machdep.bios.pnp")) == NULL) || strcmp(p, "disable")) && + if ((((p = kern_getenv("machdep.bios.pnp")) == NULL) || strcmp(p, "disable")) && ((sigaddr = bios_sigsearch(0, "$PnP", 4, 16, 0)) != 0)) { /* get a virtual pointer to the structure */ Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/i386/i386/machdep.c Thu Oct 16 18:04:43 2014 (r273174) @@ -281,7 +281,7 @@ cpu_startup(dummy) * We do this by disabling a bit in the SMI_EN (SMI Control and * Enable register) of the Intel ICH LPC Interface Bridge. */ - sysenv = getenv("smbios.system.product"); + sysenv = kern_getenv("smbios.system.product"); if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || strncmp(sysenv, "MacBook3,1", 10) == 0 || @@ -314,7 +314,7 @@ cpu_startup(dummy) * Display physical memory if SMBIOS reports reasonable amount. */ memsize = 0; - sysenv = getenv("smbios.memory.enabled"); + sysenv = kern_getenv("smbios.memory.enabled"); if (sysenv != NULL) { memsize = (uintmax_t)strtoul(sysenv, (char **)NULL, 10) << 10; freeenv(sysenv); Modified: head/sys/i386/xen/xen_machdep.c ============================================================================== --- head/sys/i386/xen/xen_machdep.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/i386/xen/xen_machdep.c Thu Oct 16 18:04:43 2014 (r273174) @@ -165,7 +165,7 @@ xen_boothowto(char *envp) /* get equivalents from the environment */ for (i = 0; howto_names[i].ev != NULL; i++) - if (getenv(howto_names[i].ev) != NULL) + if (kern_getenv(howto_names[i].ev) != NULL) howto |= howto_names[i].mask; return howto; } Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/kern/init_main.c Thu Oct 16 18:04:43 2014 (r273174) @@ -716,7 +716,7 @@ start_init(void *dummy) p->p_vmspace->vm_maxsaddr = (caddr_t)addr; p->p_vmspace->vm_ssize = 1; - if ((var = getenv("init_path")) != NULL) { + if ((var = kern_getenv("init_path")) != NULL) { strlcpy(init_path, var, sizeof(init_path)); freeenv(var); } Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/kern/kern_environment.c Thu Oct 16 18:04:43 2014 (r273174) @@ -30,7 +30,7 @@ * dynamic array of strings later when the VM subsystem is up. * * We make these available through the kenv(2) syscall for userland - * and through getenv()/freeenv() setenv() unsetenv() testenv() for + * and through kern_getenv()/freeenv() kern_setenv() kern_unsetenv() testenv() for * the kernel. */ @@ -156,7 +156,7 @@ sys_kenv(td, uap) if (error) goto done; #endif - value = getenv(name); + value = kern_getenv(name); if (value == NULL) { error = ENOENT; goto done; @@ -188,7 +188,7 @@ sys_kenv(td, uap) error = mac_kenv_check_set(td->td_ucred, name, value); if (error == 0) #endif - setenv(name, value); + kern_setenv(name, value); free(value, M_TEMP); break; case KENV_UNSET: @@ -197,7 +197,7 @@ sys_kenv(td, uap) if (error) goto done; #endif - error = unsetenv(name); + error = kern_unsetenv(name); if (error) error = ENOENT; break; @@ -312,7 +312,7 @@ _getenv_static(const char *name) * after use. */ char * -getenv(const char *name) +kern_getenv(const char *name) { char buf[KENV_MNAMELEN + 1 + KENV_MVALLEN + 1]; char *ret; @@ -373,7 +373,7 @@ setenv_static(const char *name, const ch * Set an environment variable by name. */ int -setenv(const char *name, const char *value) +kern_setenv(const char *name, const char *value) { char *buf, *cp, *oldenv; int namelen, vallen, i; @@ -422,7 +422,7 @@ setenv(const char *name, const char *val * Unset an environment variable string. */ int -unsetenv(const char *name) +kern_unsetenv(const char *name) { char *cp, *oldenv; int i, j; Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/kern/kern_sysctl.c Thu Oct 16 18:04:43 2014 (r273174) @@ -241,7 +241,7 @@ sysctl_load_tunable_by_oid_locked(struct req.newptr = &val_64; break; case CTLTYPE_STRING: - penv = getenv(path + rem); + penv = kern_getenv(path + rem); if (penv == NULL) return; req.newlen = strlen(penv); Modified: head/sys/kern/subr_hints.c ============================================================================== --- head/sys/kern/subr_hints.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/kern/subr_hints.c Thu Oct 16 18:04:43 2014 (r273174) @@ -109,7 +109,7 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) line = malloc(i+1, M_TEMP, M_WAITOK); strcpy(line, cp); line[eqidx] = '\0'; - setenv(line, line + eqidx + 1); + kern_setenv(line, line + eqidx + 1); free(line, M_TEMP); cp += i + 1; } Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/kern/subr_param.c Thu Oct 16 18:04:43 2014 (r273174) @@ -188,7 +188,7 @@ detect_virtual(void) char *sysenv; int i; - sysenv = getenv("smbios.bios.vendor"); + sysenv = kern_getenv("smbios.bios.vendor"); if (sysenv != NULL) { for (i = 0; vm_bnames[i] != NULL; i++) if (strcmp(sysenv, vm_bnames[i]) == 0) { @@ -197,7 +197,7 @@ detect_virtual(void) } freeenv(sysenv); } - sysenv = getenv("smbios.system.product"); + sysenv = kern_getenv("smbios.system.product"); if (sysenv != NULL) { for (i = 0; vm_pnames[i] != NULL; i++) if (strcmp(sysenv, vm_pnames[i]) == 0) { Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/kern/vfs_mountroot.c Thu Oct 16 18:04:43 2014 (r273174) @@ -445,7 +445,7 @@ parse_dir_ask_printenv(const char *var) { char *val; - val = getenv(var); + val = kern_getenv(var); if (val != NULL) { printf(" %s=%s\n", var, val); freeenv(val); @@ -836,9 +836,9 @@ vfs_mountroot_conf0(struct sbuf *sb) sbuf_printf(sb, "cd9660:/dev/acd0 ro\n"); sbuf_printf(sb, ".timeout %d\n", root_mount_timeout); } - s = getenv("vfs.root.mountfrom"); + s = kern_getenv("vfs.root.mountfrom"); if (s != NULL) { - opt = getenv("vfs.root.mountfrom.options"); + opt = kern_getenv("vfs.root.mountfrom.options"); tok = s; error = parse_token(&tok, &mnt); while (!error) { Modified: head/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- head/sys/mips/atheros/ar71xx_machdep.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/mips/atheros/ar71xx_machdep.c Thu Oct 16 18:04:43 2014 (r273174) @@ -92,9 +92,9 @@ parse_argv(char *str) } else { n = strsep(&v, "="); if (v == NULL) - setenv(n, "1"); + kern_setenv(n, "1"); else - setenv(n, v); + kern_setenv(n, v); } } } @@ -127,8 +127,8 @@ ar71xx_redboot_get_macaddr(void) * "ethaddr" is passed via envp on RedBoot platforms * "kmac" is passed via argv on RouterBOOT platforms */ - if ((var = getenv("ethaddr")) != NULL || - (var = getenv("kmac")) != NULL) { + if ((var = kern_getenv("ethaddr")) != NULL || + (var = kern_getenv("kmac")) != NULL) { count = sscanf(var, "%x%*c%x%*c%x%*c%x%*c%x%*c%x", &ar711_base_mac[0], &ar711_base_mac[1], &ar711_base_mac[2], &ar711_base_mac[3], @@ -296,7 +296,7 @@ platform_start(__register_t a0 __unused, if (MIPS_IS_VALID_PTR(envp)) { for (i = 0; envp[i]; i+=2) { printf(" %s = %s\n", envp[i], envp[i+1]); - setenv(envp[i], envp[i+1]); + kern_setenv(envp[i], envp[i+1]); } } else Modified: head/sys/mips/nlm/xlp_machdep.c ============================================================================== --- head/sys/mips/nlm/xlp_machdep.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/mips/nlm/xlp_machdep.c Thu Oct 16 18:04:43 2014 (r273174) @@ -282,9 +282,9 @@ xlp_parse_bootargs(char *cmdline) } else { n = strsep(&v, "="); if (v == NULL) - setenv(n, "1"); + kern_setenv(n, "1"); else - setenv(n, v); + kern_setenv(n, v); } } } @@ -349,9 +349,9 @@ xlp_bootargs_init(__register_t arg) v = buf; n = strsep(&v, "="); if (v == NULL) - setenv(n, "1"); + kern_setenv(n, "1"); else - setenv(n, v); + kern_setenv(n, v); p += strlen(p) + 1; } @@ -360,7 +360,7 @@ xlp_bootargs_init(__register_t arg) xlp_hw_thread_mask = mask; /* command line argument */ - v = getenv("bootargs"); + v = kern_getenv("bootargs"); if (v != NULL) { strlcpy(buf, v, sizeof(buf)); xlp_parse_bootargs(buf); Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/mips/rmi/xlr_machdep.c Thu Oct 16 18:04:43 2014 (r273174) @@ -148,7 +148,7 @@ xlr_parse_mmu_options(void) * We don't support sharing TLB per core - TODO */ xlr_shtlb_enabled = 0; - if ((hw_env = getenv("xlr.shtlb")) != NULL) { + if ((hw_env = kern_getenv("xlr.shtlb")) != NULL) { start = hw_env; tmp = strtoul(start, &end, 0); if (start != end) @@ -230,9 +230,9 @@ xlr_set_boot_flags(void) { char *p; - p = getenv("bootflags"); + p = kern_getenv("bootflags"); if (p == NULL) - p = getenv("boot_flags"); /* old style */ + p = kern_getenv("boot_flags"); /* old style */ if (p == NULL) return; Modified: head/sys/nfs/bootp_subr.c ============================================================================== --- head/sys/nfs/bootp_subr.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/nfs/bootp_subr.c Thu Oct 16 18:04:43 2014 (r273174) @@ -1452,7 +1452,7 @@ bootpc_decode_reply(struct nfsv3_diskles * the server value). */ p = NULL; - if ((s = getenv("vfs.root.mountfrom")) != NULL) { + if ((s = kern_getenv("vfs.root.mountfrom")) != NULL) { if ((p = strstr(s, "nfs:")) != NULL) p = strdup(p + 4, M_TEMP); freeenv(s); @@ -1723,7 +1723,7 @@ retry: if (gctx->gotrootpath != 0) { - setenv("boot.netif.name", ifctx->ifp->if_xname); + kern_setenv("boot.netif.name", ifctx->ifp->if_xname); error = md_mount(&nd->root_saddr, nd->root_hostnam, nd->root_fh, &nd->root_fhsize, Modified: head/sys/nfs/nfs_diskless.c ============================================================================== --- head/sys/nfs/nfs_diskless.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/nfs/nfs_diskless.c Thu Oct 16 18:04:43 2014 (r273174) @@ -175,7 +175,7 @@ nfs_setup_diskless(void) return; /* get handle size. If this succeeds, it's an NFSv3 setup. */ - if ((cp = getenv("boot.nfsroot.nfshandlelen")) != NULL) { + if ((cp = kern_getenv("boot.nfsroot.nfshandlelen")) != NULL) { cnt = sscanf(cp, "%d", &len); freeenv(cp); if (cnt != 1 || len == 0 || len > NFSX_V3FHMAX) { @@ -237,7 +237,7 @@ nfs_setup_diskless(void) printf("nfs_diskless: no interface\n"); return; /* no matching interface */ match_done: - setenv("boot.netif.name", ifp->if_xname); + kern_setenv("boot.netif.name", ifp->if_xname); if (is_nfsv3 != 0) { strlcpy(nd3->myif.ifra_name, ifp->if_xname, sizeof(nd3->myif.ifra_name)); @@ -267,11 +267,11 @@ match_done: printf("nfs_diskless: bad NFS handle len=%d\n", fhlen); return; } - if ((cp = getenv("boot.nfsroot.path")) != NULL) { + if ((cp = kern_getenv("boot.nfsroot.path")) != NULL) { strncpy(nd3->root_hostnam, cp, MNAMELEN - 1); freeenv(cp); } - if ((cp = getenv("boot.nfsroot.options")) != NULL) { + if ((cp = kern_getenv("boot.nfsroot.options")) != NULL) { nfs_parse_options(cp, &nd3->root_args); freeenv(cp); } @@ -301,11 +301,11 @@ match_done: printf("nfs_diskless: no NFS handle\n"); return; } - if ((cp = getenv("boot.nfsroot.path")) != NULL) { + if ((cp = kern_getenv("boot.nfsroot.path")) != NULL) { strncpy(nd->root_hostnam, cp, MNAMELEN - 1); freeenv(cp); } - if ((cp = getenv("boot.nfsroot.options")) != NULL) { + if ((cp = kern_getenv("boot.nfsroot.options")) != NULL) { struct nfs_args args; /* @@ -339,7 +339,7 @@ inaddr_to_sockaddr(char *ev, struct sock sa->sin_len = sizeof(*sa); sa->sin_family = AF_INET; - if ((cp = getenv(ev)) == NULL) + if ((cp = kern_getenv(ev)) == NULL) return (1); count = sscanf(cp, "%d.%d.%d.%d", &a[0], &a[1], &a[2], &a[3]); freeenv(cp); @@ -362,7 +362,7 @@ hwaddr_to_sockaddr(char *ev, struct sock sa->sdl_family = AF_LINK; sa->sdl_type = IFT_ETHER; sa->sdl_alen = ETHER_ADDR_LEN; - if ((cp = getenv(ev)) == NULL) + if ((cp = kern_getenv(ev)) == NULL) return (1); count = sscanf(cp, "%x:%x:%x:%x:%x:%x", &a[0], &a[1], &a[2], &a[3], &a[4], &a[5]); @@ -384,7 +384,7 @@ decode_nfshandle(char *ev, u_char *fh, i u_char *cp, *ep; int len, val; - ep = cp = getenv(ev); + ep = cp = kern_getenv(ev); if (cp == NULL) return (0); if ((strlen(cp) < 2) || (*cp != 'X')) { Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/nfsclient/nfs_vfsops.c Thu Oct 16 18:04:43 2014 (r273174) @@ -485,7 +485,7 @@ nfs_mountroot(struct mount *mp) if (error) panic("nfs_mountroot: SIOCAIFADDR: %d", error); - if ((cp = getenv("boot.netif.mtu")) != NULL) { + if ((cp = kern_getenv("boot.netif.mtu")) != NULL) { ir.ifr_mtu = strtol(cp, NULL, 10); bcopy(nd->myif.ifra_name, ir.ifr_name, IFNAMSIZ); freeenv(cp); Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/powerpc/aim/machdep.c Thu Oct 16 18:04:43 2014 (r273174) @@ -566,7 +566,7 @@ powerpc_init(vm_offset_t startkernel, vm /* * Grab booted kernel's name */ - env = getenv("kernelname"); + env = kern_getenv("kernelname"); if (env != NULL) { strlcpy(kernelname, env, sizeof(kernelname)); freeenv(env); Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/sparc64/sparc64/machdep.c Thu Oct 16 18:04:43 2014 (r273174) @@ -511,7 +511,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * Initialize tunables. */ init_param2(physmem); - env = getenv("kernelname"); + env = kern_getenv("kernelname"); if (env != NULL) { strlcpy(kernelname, env, sizeof(kernelname)); freeenv(env); Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/sys/systm.h Thu Oct 16 18:04:43 2014 (r273174) @@ -296,7 +296,7 @@ int cr_cansee(struct ucred *u1, struct u int cr_canseesocket(struct ucred *cred, struct socket *so); int cr_canseeinpcb(struct ucred *cred, struct inpcb *inp); -char *getenv(const char *name); +char *kern_getenv(const char *name); void freeenv(char *env); int getenv_int(const char *name, int *data); int getenv_uint(const char *name, unsigned int *data); @@ -304,8 +304,8 @@ int getenv_long(const char *name, long * int getenv_ulong(const char *name, unsigned long *data); int getenv_string(const char *name, char *data, int size); int getenv_quad(const char *name, quad_t *data); -int setenv(const char *name, const char *value); -int unsetenv(const char *name); +int kern_setenv(const char *name, const char *value); +int kern_unsetenv(const char *name); int testenv(const char *name); typedef uint64_t (cpu_tick_f)(void); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/vm/vm_page.c Thu Oct 16 18:04:43 2014 (r273174) @@ -453,7 +453,7 @@ vm_page_startup(vm_offset_t vaddr) */ vm_cnt.v_page_count = 0; vm_cnt.v_free_count = 0; - list = getenv("vm.blacklist"); + list = kern_getenv("vm.blacklist"); for (i = 0; phys_avail[i + 1] != 0; i += 2) { pa = phys_avail[i]; last_pa = phys_avail[i + 1]; Modified: head/sys/x86/iommu/busdma_dmar.c ============================================================================== --- head/sys/x86/iommu/busdma_dmar.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/x86/iommu/busdma_dmar.c Thu Oct 16 18:04:43 2014 (r273174) @@ -76,7 +76,7 @@ dmar_bus_dma_is_dev_disabled(int domain, snprintf(str, sizeof(str), "hw.busdma.pci%d.%d.%d.%d.bounce", domain, bus, slot, func); - env = getenv(str); + env = kern_getenv(str); if (env == NULL) return (false); freeenv(env); Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/x86/x86/tsc.c Thu Oct 16 18:04:43 2014 (r273174) @@ -155,7 +155,7 @@ tsc_freq_vmware(void) if (strncmp(hv_sig, "VMwareVMware", 12) != 0) return (0); } else { - p = getenv("smbios.system.serial"); + p = kern_getenv("smbios.system.serial"); if (p == NULL) return (0); if (strncmp(p, "VMware-", 7) != 0 && Modified: head/sys/x86/xen/pv.c ============================================================================== --- head/sys/x86/xen/pv.c Thu Oct 16 15:59:00 2014 (r273173) +++ head/sys/x86/xen/pv.c Thu Oct 16 18:04:43 2014 (r273174) @@ -309,7 +309,7 @@ xen_pv_set_boothowto(void) /* get equivalents from the environment */ for (i = 0; howto_names[i].ev != NULL; i++) { - if (getenv(howto_names[i].ev) != NULL) + if (kern_getenv(howto_names[i].ev) != NULL) boothowto |= howto_names[i].mask; } } From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 18:28:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DFE7DB2; Thu, 16 Oct 2014 18:28:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A45AB9E; Thu, 16 Oct 2014 18:28:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GISCAS002755; Thu, 16 Oct 2014 18:28:12 GMT (envelope-from skreuzer@FreeBSD.org) Received: (from skreuzer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GISB78002753; Thu, 16 Oct 2014 18:28:11 GMT (envelope-from skreuzer@FreeBSD.org) Message-Id: <201410161828.s9GISB78002753@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: skreuzer set sender to skreuzer@FreeBSD.org using -f From: Steven Kreuzer Date: Thu, 16 Oct 2014 18:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273177 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 18:28:12 -0000 Author: skreuzer (doc,ports committer) Date: Thu Oct 16 18:28:11 2014 New Revision: 273177 URL: https://svnweb.freebsd.org/changeset/base/273177 Log: Correct two typos PR: 194350 Submitted by: jiashiun@gmail.com Approved by: hrs (mentor) Modified: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP head/tools/build/options/WITHOUT_GCC_BOOTSTRAP Modified: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP ============================================================================== --- head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP Thu Oct 16 18:16:31 2014 (r273176) +++ head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP Thu Oct 16 18:28:11 2014 (r273177) @@ -1,5 +1,5 @@ .\" $FreeBSD$ Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. -You must enable wither gcc or clang bootstrap to be able to build the system, -unless an alternative compiiler is provided via +You must enable either gcc or clang bootstrap to be able to build the system, +unless an alternative compiler is provided via XCC. Modified: head/tools/build/options/WITHOUT_GCC_BOOTSTRAP ============================================================================== --- head/tools/build/options/WITHOUT_GCC_BOOTSTRAP Thu Oct 16 18:16:31 2014 (r273176) +++ head/tools/build/options/WITHOUT_GCC_BOOTSTRAP Thu Oct 16 18:28:11 2014 (r273177) @@ -1,5 +1,5 @@ .\" $FreeBSD$ Set to not build gcc and g++ as part of the bootstrap process. -You must enable wither gcc or clang bootstrap to be able to build the system, -unless an alternative compiiler is provided via +You must enable either gcc or clang bootstrap to be able to build the system, +unless an alternative compiler is provided via XCC. From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 18:49:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DEAE5BD; Thu, 16 Oct 2014 18:49:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F38CBDAA; Thu, 16 Oct 2014 18:49:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GInoje012699; Thu, 16 Oct 2014 18:49:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GIno61012698; Thu, 16 Oct 2014 18:49:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201410161849.s9GIno61012698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 16 Oct 2014 18:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273178 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 18:49:51 -0000 Author: emaste Date: Thu Oct 16 18:49:50 2014 New Revision: 273178 URL: https://svnweb.freebsd.org/changeset/base/273178 Log: Update vt(4) for UEFI defaults and special keys vt(4) is the default console for UEFI boot [1], and the bitmapped kern.vt.spclkeys sysctl has been replaced with individual kern.vt.kbd_* enable sysctls. PR: 193710 Submitted by: wblock [1] Reviewed by: wblock MFC after: 3 days Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D953 Modified: head/share/man/man4/vt.4 Modified: head/share/man/man4/vt.4 ============================================================================== --- head/share/man/man4/vt.4 Thu Oct 16 18:28:11 2014 (r273177) +++ head/share/man/man4/vt.4 Thu Oct 16 18:49:50 2014 (r273178) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 2, 2014 +.Dd October 16, 2014 .Dt "VIRTUAL TERMINALS" 4 .Os .Sh NAME @@ -45,7 +45,15 @@ In .Xr loader.conf 5 : .Cd hw.vga.textmode=1 .Cd kern.vty=vt -.Cd kern.vt.spclkeys=15 +.Pp +In +.Xr loader.conf 5 or +.Xr sysctl.conf 5 : +.Cd kern.vt.kbd_halt=1 +.Cd kern.vt.kbd_poweroff=1 +.Cd kern.vt.kbd_reboot=1 +.Cd kern.vt.kbd_debug=1 +.Cd kern.vt.kbd_panic=0 .Sh DESCRIPTION The .Nm @@ -185,30 +193,41 @@ Set to 1 to use virtual terminals in tex Features that require graphics mode, like loadable fonts, will be disabled. .It Va kern.vty -When both -.Nm -and -.Xr sc 4 have been compiled into the kernel, the one to use for the -system console can be selected by setting this value to +Set this value to .Ql vt or -.Ql sc . -If this value is not set, +.Ql sc +to override the default driver used for the system console. +By default, .Xr sc 4 -is used. -.It Va kern.vt.spclkeys -bitmap of allowed special keys. 1 is enabled, 0 is disabled. Encoded as: -.Bl -tag -compact -width 0x000000 -.It 0x0001 -Debug request key combination. (Ctrl+Alt+Esc) -.It 0x0002 -Reboot. (Ctrl+Alt+Del) -.It 0x0004 -Halt. -.It 0x0008 -Power down. -.El -Default is 15, all enabled. +is used on computers that boot from BIOS, and +.Nm +is used on computers that boot from UEFI. +.Sh KEYBOARD SYSCTL TUNABLES +These settings control whether certain special key combinations are enabled or +ignored. +The specific key combinations can be configured by using a +.Xr keymap 5 +file. +.Pp +These settings can be entered at the +.Xr loader 8 +prompt or in +.Xr loader.conf 5 +and can also be changed at runtime with the +.Xr sysctl 8 +command. +.Bl -tag -width indent +.It Va kern.vt.kbd_halt +Enable halt keyboard combination. +.It Va kern.vt.kbd_poweroff +Enable power off key combination. +.It Va kern.vt.kbd_reboot. +Enable reboot key combination, usually Ctrl+Alt+Del. +.It Va kern.vt.kbd_debug +Enable debug request key combination, usually Ctrl+Alt+Esc. +.It Va kern.vt.kbd_panic +Enable panic key combination. .El .Sh FILES .Bl -tag -width /usr/share/vt/keymaps/* -compact From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 19:52:13 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FB90B0E; Thu, 16 Oct 2014 19:52:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CD6F6E0; Thu, 16 Oct 2014 19:52:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GJqCgX045203; Thu, 16 Oct 2014 19:52:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GJqCf4045202; Thu, 16 Oct 2014 19:52:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201410161952.s9GJqCf4045202@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 16 Oct 2014 19:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273180 - head/sys/dev/mmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 19:52:13 -0000 Author: imp Date: Thu Oct 16 19:52:12 2014 New Revision: 273180 URL: https://svnweb.freebsd.org/changeset/base/273180 Log: fwsectors and fwheads used to be somehwat arbitrary. However, they are used to align partitions in gpart. We also try to align partitions by stripe size when creating new media. Align these two concepts by making fwsectors the same as the stripe size. Select a sensible number of heads so we wind up with about 20 cylinders. This number was selected to keep the rounding effects to a few percent while keeping the number of cylinder groups low. Sadly, it is not possible to make these numbers match the numbers used by SD card readers. There apperas to be much variation between brands so there's no one universal number. These numbers are also not aligned to the stripe size, so some performance problems may still be present when SD cards are created this way. Also, these numbers will differ from the far less common SD to ATA adapters, which present a different, but more uniform, set of numbers that also happened to match the old defaults. Nothing should change for current users. Any suboptimal performance caused by misalignment will still be there. gpart will honor the partitions that aren't on proper boudnaries, but editing the partition tables may result in different alignments being used than before when editing things natively. Ideally, there'd be some way to override these values in the disk subsystem by the user for the USB adapter use case where all "native" notions of geometry disappear. This does not implement that. Modified: head/sys/dev/mmc/mmcsd.c Modified: head/sys/dev/mmc/mmcsd.c ============================================================================== --- head/sys/dev/mmc/mmcsd.c Thu Oct 16 19:27:26 2014 (r273179) +++ head/sys/dev/mmc/mmcsd.c Thu Oct 16 19:52:12 2014 (r273180) @@ -155,14 +155,36 @@ mmcsd_attach(device_t dev) d->d_dump = mmcsd_dump; d->d_name = "mmcsd"; d->d_drv1 = sc; - d->d_maxsize = 4*1024*1024; /* Maximum defined SD card AU size. */ d->d_sectorsize = mmc_get_sector_size(dev); + d->d_maxsize = mmc_get_max_data(dev) * d->d_sectorsize; d->d_mediasize = (off_t)mmc_get_media_size(dev) * d->d_sectorsize; d->d_stripeoffset = 0; d->d_stripesize = mmc_get_erase_sector(dev) * d->d_sectorsize; d->d_unit = device_get_unit(dev); d->d_flags = DISKFLAG_CANDELETE; d->d_delmaxsize = mmc_get_erase_sector(dev) * d->d_sectorsize * 1; /* conservative */ + /* + * The d_fw* values are fake. However, layout is aided by making the + * number of fwsectors equal to the erase sectors from the drive since + * we set the stripe size equal to that. We set fwheads such that there + * are ~20 cylinder groups since all values are somewhat arbitrary here + * and this gives good behavior with ffs without wasting too much + * space. Sadly, geom_part wants to round partitions to these + * values. While not bad, in and of itself, the values we present here + * will almost certainly be different then the values that USB SD + * adapters use and there's too much variation between brands to just + * use those values here. Also SD to ATA adapters favor traditional + * ata sizes, which are different again from the USB adapters (which + * favor SCSI values). This rounding leads to a loss of up to 5% of the + * usable space (usually much less, but that's why 20 was selected: to + * limit this effect at a few percent). gpart needs a way to override + * this behavior for situations like this, but doesn't provide + * one. Perhaps this behavior should be tunable as well, but maybe that + * belongs in the disk layer. These values will be much better than + * the default ones. + */ + d->d_fwsectors = mmc_get_erase_sector(dev); + d->d_fwheads = mmc_get_media_size(dev) / (d->d_fwsectors * 20); strlcpy(d->d_ident, mmc_get_card_sn_string(dev), sizeof(d->d_ident)); strlcpy(d->d_descr, mmc_get_card_id_string(dev), sizeof(d->d_descr)); From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 19:53:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 422F8D27; Thu, 16 Oct 2014 19:53:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F55E753; Thu, 16 Oct 2014 19:53:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GJrXIu045410; Thu, 16 Oct 2014 19:53:33 GMT (envelope-from joerg@FreeBSD.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GJrWir045408; Thu, 16 Oct 2014 19:53:32 GMT (envelope-from joerg@FreeBSD.org) Message-Id: <201410161953.s9GJrWir045408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joerg set sender to joerg@FreeBSD.org using -f From: Joerg Wunsch Date: Thu, 16 Oct 2014 19:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273181 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 19:53:33 -0000 Author: joerg Date: Thu Oct 16 19:53:32 2014 New Revision: 273181 URL: https://svnweb.freebsd.org/changeset/base/273181 Log: Add the Dresden Elektronik deRFnode device to uftdi(4). MFC after: 1 week Modified: head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Thu Oct 16 19:52:12 2014 (r273180) +++ head/sys/dev/usb/serial/uftdi.c Thu Oct 16 19:53:32 2014 (r273181) @@ -298,6 +298,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(CONTEC, COM1USBH, 0), UFTDI_DEV(DRESDENELEKTRONIK, SENSORTERMINALBOARD, 0), UFTDI_DEV(DRESDENELEKTRONIK, WIRELESSHANDHELDTERMINAL, 0), + UFTDI_DEV(DRESDENELEKTRONIK, DE_RFNODE, 0), UFTDI_DEV(DRESDENELEKTRONIK, LEVELSHIFTERSTICKLOWCOST, 0), UFTDI_DEV(ELEKTOR, FT323R, 0), UFTDI_DEV(EVOLUTION, ER1, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Oct 16 19:52:12 2014 (r273180) +++ head/sys/dev/usb/usbdevs Thu Oct 16 19:53:32 2014 (r273181) @@ -1664,6 +1664,7 @@ product DREAMLINK DL100B 0x0004 USB Webm /* dresden elektronik products */ product DRESDENELEKTRONIK SENSORTERMINALBOARD 0x0001 SensorTerminalBoard product DRESDENELEKTRONIK WIRELESSHANDHELDTERMINAL 0x0004 Wireless Handheld Terminal +product DRESDENELEKTRONIK DE_RFNODE 0x001c deRFnode product DRESDENELEKTRONIK LEVELSHIFTERSTICKLOWCOST 0x0022 Levelshifter Stick Low Cost /* Dynastream Innovations */ From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 20:13:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E2842FD; Thu, 16 Oct 2014 20:13:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B2D096A; Thu, 16 Oct 2014 20:13:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GKDH9k055103; Thu, 16 Oct 2014 20:13:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GKDHIY055100; Thu, 16 Oct 2014 20:13:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201410162013.s9GKDHIY055100@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 16 Oct 2014 20:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273182 - in head/sys/modules: qlxgb qlxgbe qlxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 20:13:18 -0000 Author: imp Date: Thu Oct 16 20:13:16 2014 New Revision: 273182 URL: https://svnweb.freebsd.org/changeset/base/273182 Log: There's no need to override the clean target. The clean target works correctly without doing so. Modified: head/sys/modules/qlxgb/Makefile head/sys/modules/qlxgbe/Makefile head/sys/modules/qlxge/Makefile Modified: head/sys/modules/qlxgb/Makefile ============================================================================== --- head/sys/modules/qlxgb/Makefile Thu Oct 16 19:53:32 2014 (r273181) +++ head/sys/modules/qlxgb/Makefile Thu Oct 16 20:13:16 2014 (r273182) @@ -35,9 +35,4 @@ KMOD= if_qlxgb SRCS= qla_os.c qla_dbg.c qla_hw.c qla_misc.c qla_isr.c qla_ioctl.c SRCS+= device_if.h bus_if.h pci_if.h -clean: - rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms - rm -f *.o *.kld *.ko - rm -f @ machine - .include Modified: head/sys/modules/qlxgbe/Makefile ============================================================================== --- head/sys/modules/qlxgbe/Makefile Thu Oct 16 19:53:32 2014 (r273181) +++ head/sys/modules/qlxgbe/Makefile Thu Oct 16 20:13:16 2014 (r273182) @@ -41,10 +41,4 @@ SRCS+= device_if.h bus_if.h pci_if.h #CFLAGS += -DQL_DBG -clean: - rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms - rm -f *.o *.kld *.ko - rm -f @ machine x86 - .include - Modified: head/sys/modules/qlxge/Makefile ============================================================================== --- head/sys/modules/qlxge/Makefile Thu Oct 16 19:53:32 2014 (r273181) +++ head/sys/modules/qlxge/Makefile Thu Oct 16 20:13:16 2014 (r273182) @@ -41,10 +41,5 @@ SRCS+= device_if.h bus_if.h pci_if.h CFLAGS += -DQL_DBG -clean: - rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms - rm -f *.o *.kld *.ko - rm -f @ machine x86 - .include From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 20:33:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DC88A9D; Thu, 16 Oct 2014 20:33:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE98EB94; Thu, 16 Oct 2014 20:33:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GKX5bP064382; Thu, 16 Oct 2014 20:33:05 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GKX5DM064378; Thu, 16 Oct 2014 20:33:05 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201410162033.s9GKX5DM064378@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 16 Oct 2014 20:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273183 - in head/sys/cam: ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 20:33:06 -0000 Author: sbruno Date: Thu Oct 16 20:33:04 2014 New Revision: 273183 URL: https://svnweb.freebsd.org/changeset/base/273183 Log: Add 4k quirks for PM853T Samsung SSD MFC after: 2 weeks Sponsored by: Limelight Networks Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Thu Oct 16 20:13:16 2014 (r273182) +++ head/sys/cam/ata/ata_da.c Thu Oct 16 20:33:04 2014 (r273183) @@ -459,6 +459,14 @@ static struct ada_quirk_entry ada_quirk_ }, { /* + * Samsung PM853T Series SSDs + * 4k optimised + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "SAMSUNG MZ7GE*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* * SuperTalent TeraDrive CT SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Oct 16 20:13:16 2014 (r273182) +++ head/sys/cam/scsi/scsi_da.c Thu Oct 16 20:33:04 2014 (r273183) @@ -1134,6 +1134,14 @@ static struct da_quirk_entry da_quirk_ta }, { /* + * Samsung PM853T Series SSDs + * 4k optimised + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SAMSUNG MZ7GE*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* * SuperTalent TeraDrive CT SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 21:13:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3272AB9; Thu, 16 Oct 2014 21:13:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90043C3; Thu, 16 Oct 2014 21:13:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GLDl5x083621; Thu, 16 Oct 2014 21:13:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GLDlO8083620; Thu, 16 Oct 2014 21:13:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201410162113.s9GLDlO8083620@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 16 Oct 2014 21:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273186 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 21:13:47 -0000 Author: markj Date: Thu Oct 16 21:13:46 2014 New Revision: 273186 URL: https://svnweb.freebsd.org/changeset/base/273186 Log: Don't define rules based on PROGS if PROGS is empty. Reviewed by: sjg, ngie MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Thu Oct 16 20:46:02 2014 (r273185) +++ head/share/mk/bsd.progs.mk Thu Oct 16 21:13:46 2014 (r273186) @@ -99,9 +99,11 @@ $p.$t: .PHONY .MAKE .endfor .endfor +.if !empty(PROGS) .for t in ${PROGS_TARGETS:O:u} $t: ${PROGS:%=%.$t} .endfor +.endif .if empty(PROGS) && !empty(SCRIPTS) From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 22:04:08 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEF3C494; Thu, 16 Oct 2014 22:04:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB22C841; Thu, 16 Oct 2014 22:04:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GM48oC009654; Thu, 16 Oct 2014 22:04:08 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GM48sa009652; Thu, 16 Oct 2014 22:04:08 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410162204.s9GM48sa009652@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 16 Oct 2014 22:04:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273189 - in head: lib/libc/string sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 22:04:08 -0000 Author: delphij Date: Thu Oct 16 22:04:07 2014 New Revision: 273189 URL: https://svnweb.freebsd.org/changeset/base/273189 Log: Remove duplicated code. Suggested by: jmg Deleted: head/lib/libc/string/explicit_bzero.c Modified: head/lib/libc/string/Makefile.inc head/sys/libkern/explicit_bzero.c Modified: head/lib/libc/string/Makefile.inc ============================================================================== --- head/lib/libc/string/Makefile.inc Thu Oct 16 22:00:24 2014 (r273188) +++ head/lib/libc/string/Makefile.inc Thu Oct 16 22:04:07 2014 (r273189) @@ -2,6 +2,7 @@ # $FreeBSD$ .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string ${LIBC_SRCTOP}/string +.PATH: ${LIBC_SRCTOP}/../../sys/libkern CFLAGS+= -I${LIBC_SRCTOP}/locale Modified: head/sys/libkern/explicit_bzero.c ============================================================================== --- head/sys/libkern/explicit_bzero.c Thu Oct 16 22:00:24 2014 (r273188) +++ head/sys/libkern/explicit_bzero.c Thu Oct 16 22:04:07 2014 (r273189) @@ -7,7 +7,11 @@ #include __FBSDID("$FreeBSD$"); +#ifdef _KERNEL #include +#else +#include +#endif /* _KERNEL */ __attribute__((weak)) void __explicit_bzero_hook(void *, size_t); From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 23:00:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AF6280C; Thu, 16 Oct 2014 23:00:06 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DBDB7D18; Thu, 16 Oct 2014 23:00:05 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s9GMxtQO088831 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 17 Oct 2014 02:59:55 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s9GMxtC5088830; Fri, 17 Oct 2014 02:59:55 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 17 Oct 2014 02:59:55 +0400 From: Gleb Smirnoff To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys Message-ID: <20141016225955.GE73266@FreeBSD.org> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> <86wq81y9fz.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86wq81y9fz.fsf@nine.des.no> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: src-committers , Ed Maste , svn-src-all , "George V. Neville-Neil" , Olivier =?iso-8859-1?Q?Cochard-Labb=E9?= , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 23:00:06 -0000 On Wed, Oct 15, 2014 at 11:21:52AM +0200, Dag-Erling Smørgrav wrote: D> Ed Maste writes: D> > murmur3's size argument is bytes, not uint32_ts, so the test is only D> > hashing the first 1/4 of the keys. D> D> That's my fault, and I'm going to change it, because it's illogical. D> The function works on aligned arrays of int32s and should take a count, D> not a size. I just didn't want to delay the patch even further. The function should also be documented in hash(9). -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 23:01:08 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 864F983C; Thu, 16 Oct 2014 23:01:08 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 42A3AD24; Thu, 16 Oct 2014 23:01:07 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 4A1617300A; Fri, 17 Oct 2014 01:04:46 +0200 (CEST) Date: Fri, 17 Oct 2014 01:04:46 +0200 From: Luigi Rizzo To: Gleb Smirnoff Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys Message-ID: <20141016230446.GA11048@onelab2.iet.unipi.it> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> <20141015041418.GE73266@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141015041418.GE73266@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: src-committers , Ed Maste , svn-src-all , "George V. Neville-Neil" , Olivier Cochard-Labb? , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 23:01:08 -0000 On Wed, Oct 15, 2014 at 08:14:19AM +0400, Gleb Smirnoff wrote: > On Tue, Oct 14, 2014 at 11:38:23PM -0400, Ed Maste wrote: > E> On 14 October 2014 23:04, Gleb Smirnoff wrote: > E> > > E> > Look at results at the end of email. Guess what -j and -m mean. I > E> > want either proving me doing the test wrong, or backing the change > E> > out ASAP. > E> > E> It looks like there is indeed an error in the test: > E> > E> > h = murmur3_aligned_32((uint32_t *)&key[i], > E> > sizeof(struct pf_state_key_cmp)/sizeof(uint32_t), > E> > E> murmur3's size argument is bytes, not uint32_ts, so the test is only > E> hashing the first 1/4 of the keys. > > Thanks a lot, Ed. I rerun the tests. Results are fine. Distribution > is equal (plots attached). > > Murmur is 9% +/- 1.5% faster. Sorry for noise. is that 9% on the hash alone ? If so it is surprising that you could see any change on pf's throughput. In my very non-scientific tests with VALE, doing two hashes on the MAC address would result in 17 Mpps vs 20 Mpps when no hashes were done. The difference is about 8ns, which is totally in the noise at 2 Mpps or less. cheers luigi > x jenkins-time > + murmur-time > +------------------------------------------------------------------------------+ > | ++ x | > | ++ xx | > |+ +++ xx | > |+++++ + + xx x x x x x| > | |_A_| |_____M______A_____________| | > +------------------------------------------------------------------------------+ > N Min Max Median Avg Stddev > x 12 8147243 8851519 8173132 8296753.8 235815.07 > + 15 7502767 7655925 7547376 7551089.5 39524.149 > Difference at 95.0% confidence > -745664 +/- 127010 > -8.98742% +/- 1.53084% > (Student's t, pooled s = 159194) > > -- > Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 23:07:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6098CE5; Thu, 16 Oct 2014 23:07:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2644DF5; Thu, 16 Oct 2014 23:07:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GN790i038646; Thu, 16 Oct 2014 23:07:09 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GN79rA038645; Thu, 16 Oct 2014 23:07:09 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201410162307.s9GN79rA038645@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Thu, 16 Oct 2014 23:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273197 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 23:07:10 -0000 Author: gavin Date: Thu Oct 16 23:07:09 2014 New Revision: 273197 URL: https://svnweb.freebsd.org/changeset/base/273197 Log: The igb(4) driver supports 82580, i350, i354, i210 and i211 chipsets too, document them. PR: 192301 MFC after: 1 week Modified: head/share/man/man4/igb.4 Modified: head/share/man/man4/igb.4 ============================================================================== --- head/share/man/man4/igb.4 Thu Oct 16 23:03:04 2014 (r273196) +++ head/share/man/man4/igb.4 Thu Oct 16 23:07:09 2014 (r273197) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 25, 2013 +.Dd October 17, 2014 .Dt IGB 4 .Os .Sh NAME @@ -55,7 +55,8 @@ if_igb_load="YES" The .Nm driver provides support for PCI Express Gigabit Ethernet adapters -based on the Intel 82575 and 82576 Ethernet controller chips. +based on the Intel 82575, 82576, 82580, i21x and i35x +Ethernet controller chips. The driver supports Transmit/Receive checksum offload and Jumbo Frames. Furthermore it supports TCP segmentation offload (TSO) on all @@ -142,6 +143,12 @@ driver supports Gigabit Ethernet adapter Intel Gigabit ET Dual Port Server Adapter (82576) .It Intel Gigabit VT Quad Port Server Adapter (82575) +.It +Intel Single, Dual and Quad Gigabit Ethernet Controller (82580) +.It +Intel i210 and i211 Gigabit Ethernet Controller +.It +Intel i350 and i354 Gigabit Ethernet Controller .El .Sh LOADER TUNABLES Tunables can be set at the From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 23:30:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 015A5678; Thu, 16 Oct 2014 23:30:34 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id B0B65FBE; Thu, 16 Oct 2014 23:30:34 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 26BA3C471; Thu, 16 Oct 2014 23:30:33 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 11EBE51F1; Fri, 17 Oct 2014 01:30:35 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Gleb Smirnoff Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> <86wq81y9fz.fsf@nine.des.no> <20141016225955.GE73266@FreeBSD.org> Date: Fri, 17 Oct 2014 01:30:35 +0200 In-Reply-To: <20141016225955.GE73266@FreeBSD.org> (Gleb Smirnoff's message of "Fri, 17 Oct 2014 02:59:55 +0400") Message-ID: <86wq7zwq1w.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers , Ed Maste , svn-src-all , "George V. Neville-Neil" , Olivier =?utf-8?Q?Cochard-Labb=C3=A9?= , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 23:30:35 -0000 Gleb Smirnoff writes: > The function should also be documented in hash(9). It's not intended as a "general kernel hashing function". It is intended solely for pf. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Thu Oct 16 23:44:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F492A49; Thu, 16 Oct 2014 23:44:42 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F3451C4; Thu, 16 Oct 2014 23:44:42 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 7AD2125D3892; Thu, 16 Oct 2014 23:44:39 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 99FA5C770AE; Thu, 16 Oct 2014 23:44:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Vs_iuCF4x8qr; Thu, 16 Oct 2014 23:44:37 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:2938:aafb:c0ee:1b82] (unknown [IPv6:fde9:577b:c1a9:4410:2938:aafb:c0ee:1b82]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id A7CEEC77071; Thu, 16 Oct 2014 23:44:35 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci de... From: "Bjoern A. Zeeb" In-Reply-To: <201410161804.s9GI4hed091471@svn.freebsd.org> Date: Thu, 16 Oct 2014 23:44:11 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201410161804.s9GI4hed091471@svn.freebsd.org> To: Davide Italiano X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 16 Oct 2014 23:44:42 -0000 On 16 Oct 2014, at 18:04 , Davide Italiano wrote: > Author: davide > Date: Thu Oct 16 18:04:43 2014 > New Revision: 273174 > URL: https://svnweb.freebsd.org/changeset/base/273174 >=20 > Log: > Follow up to r225617. In order to maximize the re-usability of kernel = code > in userland rename in-kernel getenv()/setenv() to = kern_setenv()/kern_getenv(). > This fixes a namespace collision with libc symbols. >=20 > Submitted by: kmacy > Tested by: make universe Hmm I still see a lot of mips kernels broken with /scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c: In function = 'platform_start': /scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c:461: warning: = implicit declaration of function 'setenv' /scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c:461: warning: nested = extern declaration of =91setenv=92 [-Wnested-externs] on my incremental builds. =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 00:07:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5CD7AD; Fri, 17 Oct 2014 00:07:27 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 33E80393; Fri, 17 Oct 2014 00:07:26 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s9H07OjP089506 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 17 Oct 2014 04:07:24 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s9H07NKS089505; Fri, 17 Oct 2014 04:07:23 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 17 Oct 2014 04:07:23 +0400 From: Gleb Smirnoff To: Luigi Rizzo Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys Message-ID: <20141017000723.GG73266@FreeBSD.org> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> <20141015041418.GE73266@FreeBSD.org> <20141016230446.GA11048@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141016230446.GA11048@onelab2.iet.unipi.it> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: src-committers , Ed Maste , svn-src-all , "George V. Neville-Neil" , Olivier Cochard-Labb? , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 00:07:27 -0000 Luigi, On Fri, Oct 17, 2014 at 01:04:46AM +0200, Luigi Rizzo wrote: L> > Thanks a lot, Ed. I rerun the tests. Results are fine. Distribution L> > is equal (plots attached). L> > L> > Murmur is 9% +/- 1.5% faster. Sorry for noise. L> L> is that 9% on the hash alone ? Right. L> If so it is surprising that you could see any change on pf's throughput. L> In my very non-scientific tests with VALE, doing two hashes on L> the MAC address would result in 17 Mpps vs 20 Mpps when no hashes were done. L> The difference is about 8ns, which is totally in the noise at 2 Mpps or less. We share exactly the same position here. Notice also, that Olivier also run tests that showed no change. May be George's tests were on single state? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 00:09:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E792130E; Fri, 17 Oct 2014 00:09:03 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 629633A7; Fri, 17 Oct 2014 00:09:03 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s9H08vjW089526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 17 Oct 2014 04:08:57 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s9H08vAR089525; Fri, 17 Oct 2014 04:08:57 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 17 Oct 2014 04:08:57 +0400 From: Gleb Smirnoff To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys Message-ID: <20141017000857.GH73266@FreeBSD.org> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> <86wq81y9fz.fsf@nine.des.no> <20141016225955.GE73266@FreeBSD.org> <86wq7zwq1w.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86wq7zwq1w.fsf@nine.des.no> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: src-committers , Ed Maste , svn-src-all , "George V. Neville-Neil" , Olivier =?iso-8859-1?Q?Cochard-Labb=E9?= , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 00:09:04 -0000 On Fri, Oct 17, 2014 at 01:30:35AM +0200, Dag-Erling Smørgrav wrote: D> Gleb Smirnoff writes: D> > The function should also be documented in hash(9). D> D> It's not intended as a "general kernel hashing function". It is D> intended solely for pf. Why? If so, it should live in pf and not compiled uncoditionally into all kernels. Anyway, I don't see reason for doing it non-generic. P.S. Once I gathered 3 jenkins hash copy-n-pastes into one place, and we still got an extra copy in ofed. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 00:31:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 739434CB; Fri, 17 Oct 2014 00:31:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F71983E; Fri, 17 Oct 2014 00:31:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9H0Vq0O080770; Fri, 17 Oct 2014 00:31:52 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9H0VqcX080769; Fri, 17 Oct 2014 00:31:52 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410170031.s9H0VqcX080769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Fri, 17 Oct 2014 00:31:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273201 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 00:31:52 -0000 Author: hrs Date: Fri Oct 17 00:31:51 2014 New Revision: 273201 URL: https://svnweb.freebsd.org/changeset/base/273201 Log: Add support of "/{udp,tcp,proto}" suffix into $firewall_myservices, which interpreted the listed items as port numbers of TCP services. A service with no suffix still works and recognized as a TCP service for backward compatibility. It should be updated with /tcp suffix. PR: 194292 MFC after: 1 week Modified: head/etc/rc.firewall Modified: head/etc/rc.firewall ============================================================================== --- head/etc/rc.firewall Fri Oct 17 00:05:31 2014 (r273200) +++ head/etc/rc.firewall Fri Oct 17 00:31:51 2014 (r273201) @@ -422,8 +422,8 @@ case ${firewall_type} in [Ww][Oo][Rr][Kk][Ss][Tt][Aa][Tt][Ii][Oo][Nn]) # Configuration: - # firewall_myservices: List of TCP ports on which this host - # offers services. + # firewall_myservices: List of ports/protocols on which this + # host offers services. # firewall_allowservices: List of IPv4 and/or IPv6 addresses # that have access to # $firewall_myservices. @@ -487,7 +487,24 @@ case ${firewall_type} in # for i in ${firewall_allowservices} ; do for j in ${firewall_myservices} ; do - ${fwcmd} add pass tcp from $i to me $j + case $j in + [0-9A-Za-z]*/[Pp][Rr][Oo][Tt][Oo]) + ${fwcmd} add pass ${j%/[Pp][Rr][Oo][Tt][Oo]} from $i to me + ;; + [0-9A-Za-z]*/[Tt][Cc][Pp]) + ${fwcmd} add pass tcp from $i to me ${j%/[Tt][Cc][Pp]} + ;; + [0-9A-Za-z]*/[Uu][Dd][Pp]) + ${fwcmd} add pass udp from $i to me ${j%/[Uu][Dd][Pp]} + ;; + *[0-9A-Za-z]) + echo "Consider using tcp/$j in firewall_myservices." > /dev/stderr + ${fwcmd} add pass tcp from $i to me $j + ;; + *) + echo "Invalid port in firewall_myservices: $j" > /dev/stderr + ;; + esac done done From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 01:53:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39277A76; Fri, 17 Oct 2014 01:53:47 +0000 (UTC) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [IPv6:2a00:1450:4010:c04::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30CD9E73; Fri, 17 Oct 2014 01:53:46 +0000 (UTC) Received: by mail-lb0-f174.google.com with SMTP id p9so3751831lbv.5 for ; Thu, 16 Oct 2014 18:53:44 -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:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=cXNhX9lwELXbo+s+ytq8yQZ4urMjGMR/UckoReRdp/c=; b=EmOedhMdo2tUtzmCrQd1uQ1/Y7nAnOMZoUV1VP716WT7fAMEbUYKgHyGaA0tWmO9Nh VH/x8jZj7c04bq2qmIUsYSSRHlpdv6T0Q61YNb/iqFHYPHdItus22MRg5strsuaQdz3x As6jpkzanmXQPHMiRjdlWN4CFMf5J8VbPdLqTjn0cr84P8E1C/yw8nxo5XTg04QhbLKZ OaptliJq9XZZSYQziK+NF3S7OFkje8z6jvNyj5Wa6gYLUlEU7NwvhZYBr/cSFxprr/lV UTahJKV+oxJc+SN7TmqrogA6v7KhAu+r9XovpfxfALG4ouVqyILZQV4KpqnnxIMChU7B Duiw== MIME-Version: 1.0 X-Received: by 10.153.11.133 with SMTP id ei5mr5292917lad.75.1413510824163; Thu, 16 Oct 2014 18:53:44 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.170.4 with HTTP; Thu, 16 Oct 2014 18:53:44 -0700 (PDT) In-Reply-To: References: <201410161804.s9GI4hed091471@svn.freebsd.org> Date: Thu, 16 Oct 2014 18:53:44 -0700 X-Google-Sender-Auth: Qv-ZWvx3mNZwfZZMYLGWQ0BS314 Message-ID: Subject: Re: svn commit: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci de... From: Davide Italiano To: "Bjoern A. Zeeb" 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" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 01:53:47 -0000 On Thu, Oct 16, 2014 at 4:44 PM, Bjoern A. Zeeb wrote: > > On 16 Oct 2014, at 18:04 , Davide Italiano wrote: > >> Author: davide >> Date: Thu Oct 16 18:04:43 2014 >> New Revision: 273174 >> URL: https://svnweb.freebsd.org/changeset/base/273174 >> >> Log: >> Follow up to r225617. In order to maximize the re-usability of kernel c= ode >> in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_ge= tenv(). >> This fixes a namespace collision with libc symbols. >> >> Submitted by: kmacy >> Tested by: make universe > > Hmm I still see a lot of mips kernels broken with > > /scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c: In function 'platfor= m_start': > /scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c:461: warning: implici= t declaration of function 'setenv' > /scratch/tmp/bz/head.svn/sys/mips/rmi/xlr_machdep.c:461: warning: nested = extern declaration of =E2=80=98setenv=E2=80=99 [-Wnested-externs] > > on my incremental builds. > > =E2=80=94 > Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 > Hi, I think you're right and I apologize for the breakage (apparently I didn't look at all the log files properly). Can you tell me if this fixes for you: https://people.freebsd.org/~davide/patches/kernsetenv_fixup.diff ? If yes, I'll commit. BTW, it would be cool if universe will put logs of successful builds and logs of failed builds in different directories for easier inspection. If there's already something like this and you can point me to that, it would be appreciated. --=20 Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 02:11:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF84FD66; Fri, 17 Oct 2014 02:11:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB76EF81; Fri, 17 Oct 2014 02:11:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9H2B9pB025637; Fri, 17 Oct 2014 02:11:09 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9H2B9xk025636; Fri, 17 Oct 2014 02:11:09 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201410170211.s9H2B9xk025636@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 17 Oct 2014 02:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273202 - head/sys/fs/nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 02:11:10 -0000 Author: araujo (ports committer) Date: Fri Oct 17 02:11:09 2014 New Revision: 273202 URL: https://svnweb.freebsd.org/changeset/base/273202 Log: Make the sysctl(8) for checkutf8 positively defined and improve the description of it. Submitted by: Ronald Klop Reviewed by: rmacklem Approved by: rmacklem Sponsored by: QNAP Systems Inc. Modified: head/sys/fs/nfsserver/nfs_nfsdsubs.c Modified: head/sys/fs/nfsserver/nfs_nfsdsubs.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdsubs.c Fri Oct 17 00:31:51 2014 (r273201) +++ head/sys/fs/nfsserver/nfs_nfsdsubs.c Fri Oct 17 02:11:09 2014 (r273202) @@ -61,10 +61,10 @@ static u_int32_t nfsrv_isannfserr(u_int3 SYSCTL_DECL(_vfs_nfsd); -static int disable_checkutf8 = 0; -SYSCTL_INT(_vfs_nfsd, OID_AUTO, disable_checkutf8, CTLFLAG_RW, - &disable_checkutf8, 0, - "Disable the NFSv4 check for a UTF8 compliant name"); +static int enable_checkutf8 = 1; +SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_checkutf8, CTLFLAG_RW, + &enable_checkutf8, 0, + "Enable the NFSv4 check for the UTF8 compliant name required by rfc3530"); static int enable_nobodycheck = 1; SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_nobodycheck, CTLFLAG_RW, @@ -2005,7 +2005,7 @@ nfsrv_parsename(struct nfsrv_descript *n error = 0; goto nfsmout; } - if (disable_checkutf8 == 0 && + if (enable_checkutf8 == 1 && nfsrv_checkutf8((u_int8_t *)bufp, outlen)) { nd->nd_repstat = NFSERR_INVAL; error = 0; From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 03:30:57 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9562F9FA; Fri, 17 Oct 2014 03:30:57 +0000 (UTC) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FDE2A21; Fri, 17 Oct 2014 03:30:57 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id r10so4442001pdi.10 for ; Thu, 16 Oct 2014 20:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=Wwhbt2OeSOAH6+xkDOZ1PFyxweSjNm9rzLr/rslD8MI=; b=WbeEAOTwQlQN6YA7pGtiTkslq6dBwCLLlu386K9x0hgQ2b+yimtX+pm6TXWLalNfDY 7og1MIqZM5ihrt24UdKWLyqo8bEbS/MtS/MTEoiZdnFXbvzH307FY+H2Y1HFGI5hZhfM c49FG/OFAI7Q8KZjg2Pq++szWkH/Vy3XEFePnOFG9H8ugMpIbmqc8+geKwUi2EZo8zIb RajBYto/NlLS+ifEZLJub6zxtHexJvRZF68+FisldZLmM5F4xcMN/oEqvAk/elNULCGk L3EaaRN+Y9nmek1qqgUtYLz4diVUsIPztcjLszlBYhB1DaWrBF27vo7QKU8uPh9Nl6Bb dN8A== X-Received: by 10.66.102.105 with SMTP id fn9mr5379211pab.127.1413516656980; Thu, 16 Oct 2014 20:30:56 -0700 (PDT) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id wr8sm67057pbc.52.2014.10.16.20.30.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Oct 2014 20:30:56 -0700 (PDT) References: <201410161804.s9GI4hed091471@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (11D257) From: Garrett Cooper Subject: Re: svn commit: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci de... Date: Thu, 16 Oct 2014 20:30:55 -0700 To: Davide Italiano Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "Bjoern A. Zeeb" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 03:30:57 -0000 > BTW, it would be cool if universe will put logs of successful builds > and logs of failed builds in different directories for easier > inspection. > If there's already something like this and you can point me to that, > it would be appreciated. I think you want make tinderbox instead of make universe (make universe d= oesn't display builds errors whereas make tinderbox does). Cheers!= From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 03:55:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B1F3DD4; Fri, 17 Oct 2014 03:55:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37814BD9; Fri, 17 Oct 2014 03:55:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9H3tYgc074064; Fri, 17 Oct 2014 03:55:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9H3tYeD074063; Fri, 17 Oct 2014 03:55:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410170355.s9H3tYeD074063@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 03:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273204 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 03:55:34 -0000 Author: gjb Date: Fri Oct 17 03:55:33 2014 New Revision: 273204 URL: https://svnweb.freebsd.org/changeset/base/273204 Log: Add more descriptive metadata to the ISO images. PR: 146079 Submitted by: Roman Bogorodskiy MFC after: 3 days X-MFC-10.1: yes Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Fri Oct 17 03:04:38 2014 (r273203) +++ head/release/Makefile Fri Oct 17 03:55:33 2014 (r273204) @@ -62,6 +62,8 @@ OSRELEASE= ${TYPE}-${REVISION}-${BRANCH} .endfor .endif +VOLUME_LABEL= ${OSRELEASE:C/[-\.]/_/g:S/^$${TYPE}_//} + .if !exists(${DOCDIR}) NODOC= true .endif @@ -247,13 +249,13 @@ dvd: release.iso: disc1.iso disc1.iso: system - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} release + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} release dvd1.iso: dvd pkg-stage - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} dvd + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd bootonly.iso: bootonly - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} bootonly + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly memstick: memstick.img memstick.img: system From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 04:07:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BC37EB; Fri, 17 Oct 2014 04:07:17 +0000 (UTC) Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [IPv6:2a00:1450:4010:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73098CC0; Fri, 17 Oct 2014 04:07:16 +0000 (UTC) Received: by mail-la0-f42.google.com with SMTP id gf13so12838lab.29 for ; Thu, 16 Oct 2014 21:07:14 -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:message-id:subject :from:to:cc:content-type; bh=ePVAvhv+/VAbmFY+APG2OG6xM4QZ/5/gNZfygbUB/cg=; b=es3I3mBMzGblkI5/d2hXlJHTiIr4fjB+S1AFIvylQfY8agSt5LBh0ZISRKybWC3fIq ydxmfhZjDugNEK8aKgKkROX0RhW6aMczDnqpPNEf1Za8JXglD2Al1Gqs5wuCuQFZA1F3 MwFYODNWRaqwIf6S0OXHHnvPh6CD6VPdypSkyupihR4i7byvx+lHBFgMJ5nGhxgHASCc mbBXl5MeE8XRU/pzefhqi+0V6JflbG1i76zlY/9aaJB0LsFk7iW6LgIENVZygCXkE3xY zaafDJft7yIITL/45np9rtDLU7ltQPqt4ngbU2+fwnT11NtdAVmi16HMWZBUPNwHQkl5 q+Xg== MIME-Version: 1.0 X-Received: by 10.153.9.7 with SMTP id do7mr7588lad.98.1413518834280; Thu, 16 Oct 2014 21:07:14 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.170.4 with HTTP; Thu, 16 Oct 2014 21:07:14 -0700 (PDT) In-Reply-To: References: <201410161804.s9GI4hed091471@svn.freebsd.org> Date: Thu, 16 Oct 2014 21:07:14 -0700 X-Google-Sender-Auth: Pa9mEp5idMkJuI23KWghU42RBjc Message-ID: Subject: Re: svn commit: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci de... From: Davide Italiano To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "Bjoern A. Zeeb" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 04:07:17 -0000 On Thu, Oct 16, 2014 at 8:30 PM, Garrett Cooper wrote: > >> BTW, it would be cool if universe will put logs of successful builds >> and logs of failed builds in different directories for easier >> inspection. >> If there's already something like this and you can point me to that, >> it would be appreciated. > > I think you want make tinderbox instead of make universe (make universe doesn't display builds errors whereas make tinderbox does). > Cheers! Thanks -- I'm rerunning 'make tinderbox on ref11 as we speak and I'll commit a fix once it's over. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 04:36:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E34A24FA; Fri, 17 Oct 2014 04:36:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0426EF4; Fri, 17 Oct 2014 04:36:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9H4amHJ092962; Fri, 17 Oct 2014 04:36:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9H4amqB092961; Fri, 17 Oct 2014 04:36:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201410170436.s9H4amqB092961@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 17 Oct 2014 04:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273205 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 04:36:49 -0000 Author: imp Date: Fri Oct 17 04:36:48 2014 New Revision: 273205 URL: https://svnweb.freebsd.org/changeset/base/273205 Log: Don't depend on @ or machine for assym.s or genassym.o. That's a vestige of a time when we needed to do that, but it is all handled by beforedepend now. When we depend on the symlink, bmake will cause the file to be rebuilt always. With this change, dtrace.ko doesn't rebuild every time through a KERNFAST run. Sponsored by: Netfix Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Fri Oct 17 03:55:33 2014 (r273204) +++ head/sys/conf/kmod.mk Fri Oct 17 04:36:48 2014 (r273205) @@ -476,7 +476,7 @@ assym.s: genassym.o genassym.o: opt_global.h .endif .if !exists(@) -assym.s: @ +assym.s: .else assym.s: @/kern/genassym.sh .endif @@ -484,7 +484,7 @@ assym.s: @/kern/genassym.sh .if exists(@) genassym.o: @/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c .endif -genassym.o: @ machine ${SRCS:Mopt_*.h} +genassym.o: ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-fno-common} \ @/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c .endif From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 04:36:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 480AC632; Fri, 17 Oct 2014 04:36:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C52BEF6; Fri, 17 Oct 2014 04:36:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9H4ar1W093027; Fri, 17 Oct 2014 04:36:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9H4aroW093026; Fri, 17 Oct 2014 04:36:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201410170436.s9H4aroW093026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 17 Oct 2014 04:36:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273206 - head/sys/modules/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 04:36:54 -0000 Author: imp Date: Fri Oct 17 04:36:53 2014 New Revision: 273206 URL: https://svnweb.freebsd.org/changeset/base/273206 Log: move linux*_locore.s and linux*_support.s to SRCS, remove the OBJS entry and remove now-redunant dependencies. Add assym.s to linux*_locore.s build, as it depends on it. With this change, linux*.ko no longer builds every time through a KERNFAST run. Sponsored by: Netflix Modified: head/sys/modules/linux/Makefile Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Fri Oct 17 04:36:48 2014 (r273205) +++ head/sys/modules/linux/Makefile Fri Oct 17 04:36:53 2014 (r273206) @@ -15,7 +15,8 @@ SRCS= linux_fork.c linux${SFX}_dummy.c l linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \ linux_timer.c \ opt_inet6.h opt_compat.h opt_posix.h opt_usb.h vnode_if.h \ - device_if.h bus_if.h assym.s + device_if.h bus_if.h assym.s \ + linux${SFX}_locore.s linux${SFX}_support.s # XXX: for assym.s SRCS+= opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h @@ -23,8 +24,6 @@ SRCS+= opt_kstack_pages.h opt_nfs.h opt SRCS+= opt_apic.h .endif -OBJS= linux${SFX}_locore.o linux${SFX}_support.o - .if ${MACHINE_CPUARCH} == "i386" SRCS+= linux_ptrace.c imgact_linux.c opt_cpu.h .endif @@ -45,15 +44,15 @@ linux${SFX}_assym.h: @/kern/genassym.sh .endif sh @/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET} -linux${SFX}_locore.o: linux${SFX}_locore.s linux${SFX}_assym.h +linux${SFX}_locore.o: linux${SFX}_assym.h assym.s ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} -linux${SFX}_support.o: linux${SFX}_support.s assym.s linux${SFX}_assym.h +linux${SFX}_support.o: linux${SFX}_assym.h assym.s ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} -linux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine x86 +linux${SFX}_genassym.o: ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 06:58:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED01BA47; Fri, 17 Oct 2014 06:58:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA4C5CA9; Fri, 17 Oct 2014 06:58:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9H6w4OD058305; Fri, 17 Oct 2014 06:58:04 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9H6w4ft058304; Fri, 17 Oct 2014 06:58:04 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410170658.s9H6w4ft058304@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 17 Oct 2014 06:58:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273208 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 06:58:05 -0000 Author: ae Date: Fri Oct 17 06:58:04 2014 New Revision: 273208 URL: https://svnweb.freebsd.org/changeset/base/273208 Log: Add provider's sectorsize and stripesize to confdot output. Submitted by: rpokala at panasas.com Modified: head/sys/geom/geom_dump.c Modified: head/sys/geom/geom_dump.c ============================================================================== --- head/sys/geom/geom_dump.c Fri Oct 17 06:23:04 2014 (r273207) +++ head/sys/geom/geom_dump.c Fri Oct 17 06:58:04 2014 (r273208) @@ -61,8 +61,9 @@ static void g_confdot_provider(struct sbuf *sb, struct g_provider *pp) { - sbuf_printf(sb, "z%p [shape=hexagon,label=\"%s\\nr%dw%de%d\\nerr#%d\"];\n", - pp, pp->name, pp->acr, pp->acw, pp->ace, pp->error); + sbuf_printf(sb, "z%p [shape=hexagon,label=\"%s\\nr%dw%de%d\\nerr#%d\\n" + "sector=%u\\nstripe=%u\"];\n", pp, pp->name, pp->acr, pp->acw, + pp->ace, pp->error, pp->sectorsize, pp->stripesize); } static void From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 07:58:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBC8D77D; Fri, 17 Oct 2014 07:58:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C884C23A; Fri, 17 Oct 2014 07:58:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9H7wpEQ085981; Fri, 17 Oct 2014 07:58:51 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9H7wpW0085980; Fri, 17 Oct 2014 07:58:51 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201410170758.s9H7wpW0085980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 17 Oct 2014 07:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273209 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 07:58:52 -0000 Author: bz Date: Fri Oct 17 07:58:51 2014 New Revision: 273209 URL: https://svnweb.freebsd.org/changeset/base/273209 Log: After r273087,r273090,r273091,r273121 changes to gif(4) try to fix NOIP builds for real. MFC after: 27 days Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Oct 17 06:58:04 2014 (r273208) +++ head/sys/conf/files Fri Oct 17 07:58:51 2014 (r273209) @@ -3231,7 +3231,8 @@ net/if_ethersubr.c optional ether net/if_faith.c optional faith net/if_fddisubr.c optional fddi net/if_fwsubr.c optional fwip -net/if_gif.c optional gif inet | gif inet6 | netgraph_gif +net/if_gif.c optional gif inet | gif inet6 | \ + netgraph_gif inet | netgraph_gif inet6 net/if_gre.c optional gre inet net/if_iso88025subr.c optional token net/if_lagg.c optional lagg @@ -3357,7 +3358,7 @@ netgraph/ng_eiface.c optional netgraph_ netgraph/ng_ether.c optional netgraph_ether netgraph/ng_ether_echo.c optional netgraph_ether_echo netgraph/ng_frame_relay.c optional netgraph_frame_relay -netgraph/ng_gif.c optional netgraph_gif +netgraph/ng_gif.c optional netgraph_gif inet6 | netgraph_gif inet netgraph/ng_gif_demux.c optional netgraph_gif_demux netgraph/ng_hole.c optional netgraph_hole netgraph/ng_iface.c optional netgraph_iface From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 09:08:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C649899D; Fri, 17 Oct 2014 09:08:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7535AC1; Fri, 17 Oct 2014 09:08:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9H98jO1019311; Fri, 17 Oct 2014 09:08:45 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9H98j0c019310; Fri, 17 Oct 2014 09:08:45 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410170908.s9H98j0c019310@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Fri, 17 Oct 2014 09:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273210 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 09:08:45 -0000 Author: hrs Date: Fri Oct 17 09:08:44 2014 New Revision: 273210 URL: https://svnweb.freebsd.org/changeset/base/273210 Log: - Fix lladdr configuration which could prevent LACP mode from working. - Fix LORs when a laggport interface has an IPv6 LLA. PR: 194321 Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Fri Oct 17 07:58:51 2014 (r273209) +++ head/sys/net/if_lagg.c Fri Oct 17 09:08:44 2014 (r273210) @@ -569,9 +569,22 @@ lagg_clone_destroy(struct ifnet *ifp) static void lagg_lladdr(struct lagg_softc *sc, uint8_t *lladdr) { + struct ifnet *ifp = sc->sc_ifp; struct lagg_port lp; + if (memcmp(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN) == 0) + return; + LAGG_WLOCK_ASSERT(sc); + /* + * Set the link layer address on the lagg interface. + * lagg_proto_lladdr() notifies the MAC change to + * the aggregation protocol. iflladdr_event handler which + * may trigger gratuitous ARPs for INET will be handled in + * a taskqueue. + */ + bcopy(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN); + lagg_proto_lladdr(sc); bzero(&lp, sizeof(lp)); lp.lp_ifp = sc->sc_ifp; @@ -625,11 +638,13 @@ lagg_port_lladdr(struct lagg_port *lp, u struct ifnet *ifp = lp->lp_ifp; struct lagg_llq *llq; int pending = 0; + int primary; LAGG_WLOCK_ASSERT(sc); - if (lp->lp_detaching || - memcmp(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN) == 0) + primary = (sc->sc_primary->lp_ifp == ifp) ? 1 : 0; + if (primary == 0 && (lp->lp_detaching || + memcmp(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN) == 0)) return; /* Check to make sure its not already queued to be changed */ @@ -648,7 +663,7 @@ lagg_port_lladdr(struct lagg_port *lp, u /* Update the lladdr even if pending, it may have changed */ llq->llq_ifp = ifp; - llq->llq_primary = (sc->sc_primary->lp_ifp == ifp) ? 1 : 0; + llq->llq_primary = primary; bcopy(lladdr, llq->llq_lladdr, ETHER_ADDR_LEN); if (!pending) @@ -692,23 +707,8 @@ lagg_port_setlladdr(void *arg, int pendi if (error) printf("%s: setlladdr failed on %s\n", __func__, ifp->if_xname); - } else { - /* - * Set the link layer address on the lagg interface. - * lagg_proto_lladdr() notifies the MAC change to - * the aggregation protocol. iflladdr_event handler - * may trigger gratuitous ARPs for INET. - */ - if (memcmp(llq->llq_lladdr, IF_LLADDR(ifp), - ETHER_ADDR_LEN) != 0) { - bcopy(llq->llq_lladdr, IF_LLADDR(ifp), - ETHER_ADDR_LEN); - LAGG_WLOCK(sc); - lagg_proto_lladdr(sc); - LAGG_WUNLOCK(sc); - EVENTHANDLER_INVOKE(iflladdr_event, ifp); - } - } + } else + EVENTHANDLER_INVOKE(iflladdr_event, ifp); CURVNET_RESTORE(); head = SLIST_NEXT(llq, llq_entries); free(llq, M_DEVBUF); @@ -742,34 +742,6 @@ lagg_port_create(struct lagg_softc *sc, if (ifp->if_type != IFT_ETHER) return (EPROTONOSUPPORT); -#ifdef INET6 - /* - * The member interface should not have inet6 address because - * two interfaces with a valid link-local scope zone must not be - * merged in any form. This restriction is needed to - * prevent violation of link-local scope zone. Attempts to - * add a member interface which has inet6 addresses triggers - * removal of all inet6 addresses on the member interface. - */ - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { - if (in6ifa_llaonifp(lp->lp_ifp)) { - in6_ifdetach(lp->lp_ifp); - if_printf(sc->sc_ifp, - "IPv6 addresses on %s have been removed " - "before adding it as a member to prevent " - "IPv6 address scope violation.\n", - lp->lp_ifp->if_xname); - } - } - if (in6ifa_llaonifp(ifp)) { - in6_ifdetach(ifp); - if_printf(sc->sc_ifp, - "IPv6 addresses on %s have been removed " - "before adding it as a member to prevent " - "IPv6 address scope violation.\n", - ifp->if_xname); - } -#endif /* Allow the first Ethernet member to define the MTU */ if (SLIST_EMPTY(&sc->sc_ports)) sc->sc_ifp->if_mtu = ifp->if_mtu; @@ -1414,6 +1386,26 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd error = EINVAL; break; } +#ifdef INET6 + /* + * A laggport interface should not have inet6 address + * because two interfaces with a valid link-local + * scope zone must not be merged in any form. This + * restriction is needed to prevent violation of + * link-local scope zone. Attempts to add a laggport + * interface which has inet6 addresses triggers + * removal of all inet6 addresses on the member + * interface. + */ + if (in6ifa_llaonifp(tpif)) { + in6_ifdetach(tpif); + if_printf(sc->sc_ifp, + "IPv6 addresses on %s have been removed " + "before adding it as a member to prevent " + "IPv6 address scope violation.\n", + tpif->if_xname); + } +#endif LAGG_WLOCK(sc); error = lagg_port_create(sc, tpif); LAGG_WUNLOCK(sc); From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 09:33:11 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1AE7DAD; Fri, 17 Oct 2014 09:33:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD953D58; Fri, 17 Oct 2014 09:33:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9H9XAW6032811; Fri, 17 Oct 2014 09:33:10 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9H9XAcq032809; Fri, 17 Oct 2014 09:33:10 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410170933.s9H9XAcq032809@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Fri, 17 Oct 2014 09:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273211 - head/sbin/ping6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 09:33:11 -0000 Author: hrs Date: Fri Oct 17 09:33:09 2014 New Revision: 273211 URL: https://svnweb.freebsd.org/changeset/base/273211 Log: Add -x waittime and -X timeout options for feature parity. These are equivalent to -W and -t options of ping(8). Different letters are used because both have already been used for another purposes in ping6(8). Modified: head/sbin/ping6/ping6.8 head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.8 ============================================================================== --- head/sbin/ping6/ping6.8 Fri Oct 17 09:08:44 2014 (r273210) +++ head/sbin/ping6/ping6.8 Fri Oct 17 09:33:09 2014 (r273211) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 5, 2013 +.Dd September 22, 2014 .Dt PING6 8 .Os .Sh NAME @@ -65,6 +65,12 @@ packets to network hosts .Op Fl i Ar wait .Ek .Bk -words +.Op Fl x Ar waittime +.Ek +.Bk -words +.Op Fl X Ar timeout +.Ek +.Bk -words .Op Fl l Ar preload .Ek .Bk -words @@ -191,6 +197,15 @@ The default is to wait for one second be This option is incompatible with the .Fl f option. +.It Fl x Ar waittime +Time in milliseconds to wait for a reply for each packet sent. +If a reply arrives later, +the packet is not printed as replied, +but considered as replied when calculating statistics. +.It Fl X Ar timeout +Specify a timeout, +in seconds, +before ping exits regardless of how many packets have been received. .It Fl l Ar preload If .Ar preload Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Fri Oct 17 09:08:44 2014 (r273210) +++ head/sbin/ping6/ping6.c Fri Oct 17 09:33:09 2014 (r273211) @@ -152,6 +152,8 @@ struct tv32 { #define DEFDATALEN ICMP6ECHOTMLEN #define MAXDATALEN MAXPACKETLEN - IP6LEN - ICMP6ECHOLEN #define NROUTES 9 /* number of record route slots */ +#define MAXWAIT 10000 /* max ms to wait for response */ +#define MAXALARM (60 * 60) /* max seconds for alarm timeout */ #define A(bit) rcvd_tbl[(bit)>>3] /* identify byte in array */ #define B(bit) (1 << ((bit) & 0x07)) /* identify bit in byte */ @@ -188,6 +190,7 @@ struct tv32 { #define F_MISSED 0x800000 #define F_DONTFRAG 0x1000000 #define F_NOUSERDATA (F_NODEADDR | F_FQDN | F_FQDNOLD | F_SUPTYPES) +#define F_WAITTIME 0x2000000 u_int options; #define IN6LEN sizeof(struct in6_addr) @@ -228,6 +231,8 @@ long nreceived; /* # of packets we got long nrepeats; /* number of duplicates */ long ntransmitted; /* sequence # for outbound packets = #sent */ int interval = 1000; /* interval between packets in ms */ +int waittime = MAXWAIT; /* timeout for each packet */ +long nrcvtimeout = 0; /* # of packets we got back after waittime */ /* timing */ int timing; /* flag to do timing */ @@ -312,6 +317,7 @@ main(int argc, char *argv[]) char *policy_out = NULL; #endif double t; + u_long alarmtimeout; size_t rthlen; #ifdef IPV6_USE_MIN_MTU int mflag = 0; @@ -321,7 +327,7 @@ main(int argc, char *argv[]) memset(&smsghdr, 0, sizeof(smsghdr)); memset(&smsgiov, 0, sizeof(smsgiov)); - preload = 0; + alarmtimeout = preload = 0; datap = &outpack[ICMP6ECHOLEN + ICMP6ECHOTMLEN]; #ifndef IPSEC #define ADDOPTS @@ -333,7 +339,7 @@ main(int argc, char *argv[]) #endif /*IPSEC_POLICY_IPSEC*/ #endif while ((ch = getopt(argc, argv, - "a:b:c:DdfHg:h:I:i:l:mnNop:qrRS:s:tvwW" ADDOPTS)) != -1) { + "a:b:c:DdfHg:h:I:i:l:mnNop:qrRS:s:tvwWx:X:" ADDOPTS)) != -1) { #undef ADDOPTS switch (ch) { case 'a': @@ -541,6 +547,24 @@ main(int argc, char *argv[]) options &= ~F_NOUSERDATA; options |= F_FQDNOLD; break; + case 'x': + t = strtod(optarg, &e); + if (*e || e == optarg || t > (double)INT_MAX) + err(EX_USAGE, "invalid timing interval: `%s'", + optarg); + options |= F_WAITTIME; + waittime = (int)t; + break; + case 'X': + alarmtimeout = strtoul(optarg, &e, 0); + if ((alarmtimeout < 1) || (alarmtimeout == ULONG_MAX)) + errx(EX_USAGE, "invalid timeout: `%s'", + optarg); + if (alarmtimeout > MAXALARM) + errx(EX_USAGE, "invalid timeout: `%s' > %d", + optarg, MAXALARM); + alarm((int)alarmtimeout); + break; #ifdef IPSEC #ifdef IPSEC_POLICY_IPSEC case 'P': @@ -1057,6 +1081,10 @@ main(int argc, char *argv[]) err(EX_OSERR, "sigaction SIGINFO"); seeninfo = 0; #endif + if (alarmtimeout > 0) { + if (sigaction(SIGALRM, &si_sa, 0) == -1) + err(EX_OSERR, "sigaction SIGALRM"); + } if (options & F_FLOOD) { intvl.tv_sec = 0; intvl.tv_usec = 10000; @@ -1157,17 +1185,18 @@ main(int argc, char *argv[]) /* * If we're not transmitting any more packets, * change the timer to wait two round-trip times - * if we've received any packets or ten seconds - * if we haven't. + * if we've received any packets or (waittime) + * milliseconds if we haven't. */ -#define MAXWAIT 10 intvl.tv_usec = 0; if (nreceived) { intvl.tv_sec = 2 * tmax / 1000; if (intvl.tv_sec == 0) intvl.tv_sec = 1; - } else - intvl.tv_sec = MAXWAIT; + } else { + intvl.tv_sec = waittime / 1000; + intvl.tv_usec = waittime % 1000 * 1000; + } } gettimeofday(&last, NULL); if (ntransmitted - nreceived - 1 > nmissedmax) { @@ -1181,6 +1210,7 @@ main(int argc, char *argv[]) si_sa.sa_flags = 0; si_sa.sa_handler = SIG_IGN; sigaction(SIGINT, &si_sa, 0); + sigaction(SIGALRM, &si_sa, 0); summary(); if (res != NULL) @@ -1198,6 +1228,7 @@ onsignal(int sig) switch (sig) { case SIGINT: + case SIGALRM: seenint++; break; #ifdef SIGINFO @@ -1521,6 +1552,11 @@ pr_pack(u_char *buf, int cc, struct msgh if (options & F_QUIET) return; + if (options & F_WAITTIME && triptime > waittime) { + ++nrcvtimeout; + return; + } + if (options & F_FLOOD) (void)write(STDOUT_FILENO, &BSPACE, 1); else { @@ -2216,6 +2252,8 @@ summary(void) ((((double)ntransmitted - nreceived) * 100.0) / ntransmitted)); } + if (nrcvtimeout) + printf(", %ld packets out of wait time", nrcvtimeout); (void)putchar('\n'); if (nreceived && timing) { /* Only display average to microseconds */ @@ -2741,6 +2779,7 @@ usage(void) #endif "\n" " [-p pattern] [-S sourceaddr] [-s packetsize] " - "[hops ...] host\n"); + "[-x waittime]\n" + " [-X timeout] [hops ...] host\n"); exit(1); } From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 11:37:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C444DC57; Fri, 17 Oct 2014 11:37:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A498EB24; Fri, 17 Oct 2014 11:37:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HBbpUX092969; Fri, 17 Oct 2014 11:37:51 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HBbpAq092967; Fri, 17 Oct 2014 11:37:51 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201410171137.s9HBbpAq092967@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Fri, 17 Oct 2014 11:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273212 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 11:37:51 -0000 Author: tychon Date: Fri Oct 17 11:37:50 2014 New Revision: 273212 URL: https://svnweb.freebsd.org/changeset/base/273212 Log: Support stopping and restarting the AHCI command list via toggling PxCMD.ST from '1' to '0' and back. This allows the driver a chance to recover if for instance a timeout occurred due to activity on the host. Reviewed by: grehan Modified: head/usr.sbin/bhyve/block_if.c head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Fri Oct 17 09:33:09 2014 (r273211) +++ head/usr.sbin/bhyve/block_if.c Fri Oct 17 11:37:50 2014 (r273212) @@ -55,8 +55,7 @@ __FBSDID("$FreeBSD$"); enum blockop { BOP_READ, BOP_WRITE, - BOP_FLUSH, - BOP_CANCEL + BOP_FLUSH }; enum blockstat { @@ -159,9 +158,6 @@ blockif_proc(struct blockif_ctxt *bc, st break; case BOP_FLUSH: break; - case BOP_CANCEL: - err = EINTR; - break; default: err = EINVAL; break; @@ -356,9 +352,28 @@ blockif_flush(struct blockif_ctxt *bc, s int blockif_cancel(struct blockif_ctxt *bc, struct blockif_req *breq) { + struct blockif_elem *be; assert(bc->bc_magic == BLOCKIF_SIG); - return (blockif_request(bc, breq, BOP_CANCEL)); + + pthread_mutex_lock(&bc->bc_mtx); + TAILQ_FOREACH(be, &bc->bc_inuseq, be_link) { + if (be->be_req == breq) + break; + } + if (be == NULL) { + pthread_mutex_unlock(&bc->bc_mtx); + return (EINVAL); + } + + TAILQ_REMOVE(&bc->bc_inuseq, be, be_link); + be->be_status = BST_FREE; + be->be_req = NULL; + TAILQ_INSERT_TAIL(&bc->bc_freeq, be, be_link); + bc->bc_req_count--; + pthread_mutex_unlock(&bc->bc_mtx); + + return (0); } int Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Fri Oct 17 09:33:09 2014 (r273211) +++ head/usr.sbin/bhyve/pci_ahci.c Fri Oct 17 11:37:50 2014 (r273212) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "bhyverun.h" @@ -115,7 +116,8 @@ static FILE *dbg; struct ahci_ioreq { struct blockif_req io_req; struct ahci_port *io_pr; - STAILQ_ENTRY(ahci_ioreq) io_list; + STAILQ_ENTRY(ahci_ioreq) io_flist; + TAILQ_ENTRY(ahci_ioreq) io_blist; uint8_t *cfis; uint32_t len; uint32_t done; @@ -160,6 +162,7 @@ struct ahci_port { struct ahci_ioreq *ioreq; int ioqsz; STAILQ_HEAD(ahci_fhead, ahci_ioreq) iofhd; + TAILQ_HEAD(ahci_bhead, ahci_ioreq) iobhd; }; struct ahci_cmd_hdr { @@ -360,6 +363,68 @@ ahci_write_reset_fis_d2h(struct ahci_por } static void +ahci_check_stopped(struct ahci_port *p) +{ + /* + * If we are no longer processing the command list and nothing + * is in-flight, clear the running bit. + */ + if (!(p->cmd & AHCI_P_CMD_ST)) { + if (p->pending == 0) + p->cmd &= ~(AHCI_P_CMD_CR | AHCI_P_CMD_CCS_MASK); + } +} + +static void +ahci_port_stop(struct ahci_port *p) +{ + struct ahci_ioreq *aior; + uint8_t *cfis; + int slot; + int ncq; + int error; + + assert(pthread_mutex_isowned_np(&p->pr_sc->mtx)); + + TAILQ_FOREACH(aior, &p->iobhd, io_blist) { + /* + * Try to cancel the outstanding blockif request. + */ + error = blockif_cancel(p->bctx, &aior->io_req); + if (error != 0) + continue; + + slot = aior->slot; + cfis = aior->cfis; + if (cfis[2] == ATA_WRITE_FPDMA_QUEUED || + cfis[2] == ATA_READ_FPDMA_QUEUED) + ncq = 1; + + if (ncq) + p->sact &= ~(1 << slot); + else + p->ci &= ~(1 << slot); + + /* + * This command is now done. + */ + p->pending &= ~(1 << slot); + + /* + * Delete the blockif request from the busy list + */ + TAILQ_REMOVE(&p->iobhd, aior, io_blist); + + /* + * Move the blockif request back to the free list + */ + STAILQ_INSERT_TAIL(&p->iofhd, aior, io_flist); + } + + ahci_check_stopped(p); +} + +static void ahci_port_reset(struct ahci_port *pr) { pr->sctl = 0; @@ -492,7 +557,7 @@ ahci_handle_dma(struct ahci_port *p, int */ aior = STAILQ_FIRST(&p->iofhd); assert(aior != NULL); - STAILQ_REMOVE_HEAD(&p->iofhd, io_list); + STAILQ_REMOVE_HEAD(&p->iofhd, io_flist); aior->cfis = cfis; aior->slot = slot; aior->len = len; @@ -503,15 +568,21 @@ ahci_handle_dma(struct ahci_port *p, int if (iovcnt > BLOCKIF_IOV_MAX) { aior->prdtl = iovcnt - BLOCKIF_IOV_MAX; iovcnt = BLOCKIF_IOV_MAX; - /* - * Mark this command in-flight. - */ - p->pending |= 1 << slot; } else aior->prdtl = 0; breq->br_iovcnt = iovcnt; /* + * Mark this command in-flight. + */ + p->pending |= 1 << slot; + + /* + * Stuff request onto busy list + */ + TAILQ_INSERT_HEAD(&p->iobhd, aior, io_blist); + + /* * Build up the iovec based on the prdt */ for (i = 0; i < iovcnt; i++) { @@ -546,7 +617,7 @@ ahci_handle_flush(struct ahci_port *p, i */ aior = STAILQ_FIRST(&p->iofhd); assert(aior != NULL); - STAILQ_REMOVE_HEAD(&p->iofhd, io_list); + STAILQ_REMOVE_HEAD(&p->iofhd, io_flist); aior->cfis = cfis; aior->slot = slot; aior->len = 0; @@ -554,6 +625,16 @@ ahci_handle_flush(struct ahci_port *p, i aior->prdtl = 0; breq = &aior->io_req; + /* + * Mark this command in-flight. + */ + p->pending |= 1 << slot; + + /* + * Stuff request onto busy list + */ + TAILQ_INSERT_HEAD(&p->iobhd, aior, io_blist); + err = blockif_flush(p->bctx, breq); assert(err == 0); } @@ -961,7 +1042,7 @@ atapi_read(struct ahci_port *p, int slot */ aior = STAILQ_FIRST(&p->iofhd); assert(aior != NULL); - STAILQ_REMOVE_HEAD(&p->iofhd, io_list); + STAILQ_REMOVE_HEAD(&p->iofhd, io_flist); aior->cfis = cfis; aior->slot = slot; aior->len = len; @@ -977,6 +1058,16 @@ atapi_read(struct ahci_port *p, int slot breq->br_iovcnt = iovcnt; /* + * Mark this command in-flight. + */ + p->pending |= 1 << slot; + + /* + * Stuff request onto busy list + */ + TAILQ_INSERT_HEAD(&p->iobhd, aior, io_blist); + + /* * Build up the iovec based on the prdt */ for (i = 0; i < iovcnt; i++) { @@ -1415,9 +1506,14 @@ ata_ioreq_cb(struct blockif_req *br, int pthread_mutex_lock(&sc->mtx); /* + * Delete the blockif request from the busy list + */ + TAILQ_REMOVE(&p->iobhd, aior, io_blist); + + /* * Move the blockif request back to the free list */ - STAILQ_INSERT_TAIL(&p->iofhd, aior, io_list); + STAILQ_INSERT_TAIL(&p->iofhd, aior, io_flist); if (pending && !err) { ahci_handle_dma(p, slot, cfis, aior->done, @@ -1438,17 +1534,18 @@ ata_ioreq_cb(struct blockif_req *br, int p->serr |= (1 << slot); } - /* - * This command is now complete. - */ - p->pending &= ~(1 << slot); - if (ncq) { p->sact &= ~(1 << slot); ahci_write_fis_sdb(p, slot, tfd); } else ahci_write_fis_d2h(p, slot, cfis, tfd); + /* + * This command is now complete. + */ + p->pending &= ~(1 << slot); + + ahci_check_stopped(p); out: pthread_mutex_unlock(&sc->mtx); DPRINTF("%s exit\n", __func__); @@ -1478,9 +1575,14 @@ atapi_ioreq_cb(struct blockif_req *br, i pthread_mutex_lock(&sc->mtx); /* + * Delete the blockif request from the busy list + */ + TAILQ_REMOVE(&p->iobhd, aior, io_blist); + + /* * Move the blockif request back to the free list */ - STAILQ_INSERT_TAIL(&p->iofhd, aior, io_list); + STAILQ_INSERT_TAIL(&p->iofhd, aior, io_flist); if (pending && !err) { atapi_read(p, slot, cfis, aior->done, hdr->prdtl - pending); @@ -1500,6 +1602,12 @@ atapi_ioreq_cb(struct blockif_req *br, i cfis[4] = (cfis[4] & ~7) | ATA_I_CMD | ATA_I_IN; ahci_write_fis_d2h(p, slot, cfis, tfd); + /* + * This command is now complete. + */ + p->pending &= ~(1 << slot); + + ahci_check_stopped(p); out: pthread_mutex_unlock(&sc->mtx); DPRINTF("%s exit\n", __func__); @@ -1526,8 +1634,10 @@ pci_ahci_ioreq_init(struct ahci_port *pr else vr->io_req.br_callback = atapi_ioreq_cb; vr->io_req.br_param = vr; - STAILQ_INSERT_TAIL(&pr->iofhd, vr, io_list); + STAILQ_INSERT_TAIL(&pr->iofhd, vr, io_flist); } + + TAILQ_INIT(&pr->iobhd); } static void @@ -1565,9 +1675,7 @@ pci_ahci_port_write(struct pci_ahci_soft p->cmd = value; if (!(value & AHCI_P_CMD_ST)) { - p->cmd &= ~(AHCI_P_CMD_CR | AHCI_P_CMD_CCS_MASK); - p->ci = 0; - p->sact = 0; + ahci_port_stop(p); } else { uint64_t clb; From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 12:06:49 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE8DB6C9; Fri, 17 Oct 2014 12:06:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAAE3E13; Fri, 17 Oct 2014 12:06:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HC6nhS007760; Fri, 17 Oct 2014 12:06:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HC6n4q007759; Fri, 17 Oct 2014 12:06:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410171206.s9HC6n4q007759@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 17 Oct 2014 12:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273213 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 12:06:49 -0000 Author: trasz Date: Fri Oct 17 12:06:48 2014 New Revision: 273213 URL: https://svnweb.freebsd.org/changeset/base/273213 Log: Remove useless debug. Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.c Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Fri Oct 17 11:37:50 2014 (r273212) +++ head/sys/fs/autofs/autofs.c Fri Oct 17 12:06:48 2014 (r273213) @@ -550,7 +550,6 @@ autofs_ioctl_request(struct autofs_daemo &autofs_softc->sc_lock); if (error != 0) { sx_xunlock(&autofs_softc->sc_lock); - AUTOFS_DEBUG("failed with error %d", error); return (error); } } From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 13:20:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B509D2E3; Fri, 17 Oct 2014 13:20:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 872AA6D9; Fri, 17 Oct 2014 13:20:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HDKot4045299; Fri, 17 Oct 2014 13:20:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HDKo53045297; Fri, 17 Oct 2014 13:20:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201410171320.s9HDKo53045297@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 17 Oct 2014 13:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273214 - in head/sys: amd64/vmm/intel modules/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 13:20:50 -0000 Author: imp Date: Fri Oct 17 13:20:49 2014 New Revision: 273214 URL: https://svnweb.freebsd.org/changeset/base/273214 Log: Fix build to not bogusly always rebuild vmm.ko. Rename vmx_assym.s to vmx_assym.h to reflect that file's actual use and update vmx_support.S's include to match. Add vmx_assym.h to the SRCS to that it gets properly added to the dependency list. Add vmx_support.S to SRCS as well, so it gets built and needs fewer special-case goo. Remove now-redundant special-case goo. Finally, vmx_genassym.o doesn't need to depend on a hand expanded ${_ILINKS} explicitly, that's all taken care of by beforedepend. With these items fixed, we no longer build vmm.ko every single time through the modules on a KERNFAST build. Sponsored by: Netflix Modified: head/sys/amd64/vmm/intel/vmx_support.S head/sys/modules/vmm/Makefile Modified: head/sys/amd64/vmm/intel/vmx_support.S ============================================================================== --- head/sys/amd64/vmm/intel/vmx_support.S Fri Oct 17 12:06:48 2014 (r273213) +++ head/sys/amd64/vmm/intel/vmx_support.S Fri Oct 17 13:20:49 2014 (r273214) @@ -29,7 +29,7 @@ #include -#include "vmx_assym.s" +#include "vmx_assym.h" #ifdef SMP #define LK lock ; Modified: head/sys/modules/vmm/Makefile ============================================================================== --- head/sys/modules/vmm/Makefile Fri Oct 17 12:06:48 2014 (r273213) +++ head/sys/modules/vmm/Makefile Fri Oct 17 13:20:49 2014 (r273214) @@ -2,7 +2,7 @@ KMOD= vmm -SRCS= opt_acpi.h opt_ddb.h device_if.h bus_if.h pci_if.h +SRCS= opt_acpi.h opt_ddb.h device_if.h bus_if.h pci_if.h vmx_assym.h CFLAGS+= -DVMM_KEEP_STATS -DSMP CFLAGS+= -I${.CURDIR}/../../amd64/vmm @@ -38,6 +38,7 @@ SRCS+= iommu.c \ SRCS+= ept.c \ vmcs.c \ vmx_msr.c \ + vmx_support.S \ vmx.c \ vtd.c @@ -45,21 +46,19 @@ SRCS+= ept.c \ .PATH: ${.CURDIR}/../../amd64/vmm/amd SRCS+= amdv.c -OBJS= vmx_support.o +CLEANFILES= vmx_assym.h vmx_genassym.o -CLEANFILES= vmx_assym.s vmx_genassym.o - -vmx_assym.s: vmx_genassym.o +vmx_assym.h: vmx_genassym.o .if exists(@) -vmx_assym.s: @/kern/genassym.sh +vmx_assym.h: @/kern/genassym.sh .endif sh @/kern/genassym.sh vmx_genassym.o > ${.TARGET} -vmx_support.o: vmx_support.S vmx_assym.s +vmx_support.o: ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} -vmx_genassym.o: vmx_genassym.c @ machine x86 +vmx_genassym.o: ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} .include From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 13:40:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95D3F79D; Fri, 17 Oct 2014 13:40:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67C4F8E0; Fri, 17 Oct 2014 13:40:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HDeIOQ053181; Fri, 17 Oct 2014 13:40:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HDeIFB053179; Fri, 17 Oct 2014 13:40:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410171340.s9HDeIFB053179@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Oct 2014 13:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273216 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 13:40:18 -0000 Author: hselasky Date: Fri Oct 17 13:40:17 2014 New Revision: 273216 URL: https://svnweb.freebsd.org/changeset/base/273216 Log: Add support for new USB 3G device. Submitted by: gabor@zahemszky.hu MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Fri Oct 17 13:35:56 2014 (r273215) +++ head/sys/dev/usb/serial/u3g.c Fri Oct 17 13:40:17 2014 (r273216) @@ -317,6 +317,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, K3772, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, K3772_INIT, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, K3765, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, K3765_INIT, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, K3770, U3GINIT_HUAWEI), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Oct 17 13:35:56 2014 (r273215) +++ head/sys/dev/usb/usbdevs Fri Oct 17 13:40:17 2014 (r273216) @@ -2347,12 +2347,14 @@ product HUAWEI K4505 0x1464 3G modem product HUAWEI K3765 0x1465 3G modem product HUAWEI E1820 0x14ac E1820 HSPA+ USB Slider product HUAWEI K3770 0x14c9 3G modem +product HUAWEI K3772 0x14cf K3772 product HUAWEI K3770_INIT 0x14d1 K3770 Initial product HUAWEI E3131_INIT 0x14fe 3G modem initial product HUAWEI E392 0x1505 LTE modem product HUAWEI E3131 0x1506 3G modem product HUAWEI K3765_INIT 0x1520 K3765 Initial product HUAWEI K4505_INIT 0x1521 K4505 Initial +product HUAWEI K3772_INIT 0x1526 K3772 Initial product HUAWEI E3272_INIT 0x155b LTE modem initial product HUAWEI R215_INIT 0x1582 LTE modem initial product HUAWEI R215 0x1588 LTE modem From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 13:44:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E445B2E; Fri, 17 Oct 2014 13:44:23 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06DF49A5; Fri, 17 Oct 2014 13:44:23 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DEB48B924; Fri, 17 Oct 2014 09:44:21 -0400 (EDT) From: John Baldwin To: Warner Losh Subject: Re: svn commit: r273206 - head/sys/modules/linux Date: Fri, 17 Oct 2014 09:19:08 -0400 Message-ID: <1942647.sC8T7UmiyW@ralph.baldwin.cx> User-Agent: KMail/4.12.5 (FreeBSD/10.1-BETA2; KDE/4.12.5; amd64; ; ) In-Reply-To: <201410170436.s9H4aroW093026@svn.freebsd.org> References: <201410170436.s9H4aroW093026@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 17 Oct 2014 09:44:22 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 13:44:23 -0000 On Friday, October 17, 2014 04:36:53 AM Warner Losh wrote: > Author: imp > Date: Fri Oct 17 04:36:53 2014 > New Revision: 273206 > URL: https://svnweb.freebsd.org/changeset/base/273206 > > Log: > move linux*_locore.s and linux*_support.s to SRCS, remove the OBJS > entry and remove now-redunant dependencies. Add assym.s to > linux*_locore.s build, as it depends on it. > > With this change, linux*.ko no longer builds every time through a > KERNFAST run. > > Sponsored by: Netflix Thank you for fixing this and dtrace! -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 13:50:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17BE2FE6; Fri, 17 Oct 2014 13:50:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECCD0A6C; Fri, 17 Oct 2014 13:50:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HDobvd059952; Fri, 17 Oct 2014 13:50:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HDobxr059947; Fri, 17 Oct 2014 13:50:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201410171350.s9HDobxr059947@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 17 Oct 2014 13:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273218 - head/share/man/man8 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 13:50:38 -0000 Author: emaste Date: Fri Oct 17 13:50:37 2014 New Revision: 273218 URL: https://svnweb.freebsd.org/changeset/base/273218 Log: Add basic UEFI boot procedure manpage Reviewed by: brueffer MFC after: 4 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D959 Added: head/share/man/man8/uefi.8 (contents, props changed) Modified: head/share/man/man8/Makefile Modified: head/share/man/man8/Makefile ============================================================================== --- head/share/man/man8/Makefile Fri Oct 17 13:46:16 2014 (r273217) +++ head/share/man/man8/Makefile Fri Oct 17 13:50:37 2014 (r273218) @@ -11,6 +11,7 @@ MAN= crash.8 \ rc.sendmail.8 \ rc.subr.8 \ rescue.8 \ + ${_uefi.8} \ yp.8 MLINKS= rc.8 rc.atm.8 \ @@ -25,4 +26,8 @@ MLINKS+=yp.8 NIS.8 \ yp.8 nis.8 \ yp.8 YP.8 +.if ${MACHINE_CPUARCH} == "amd64" +_uefi.8= uefi.8 +.endif + .include Added: head/share/man/man8/uefi.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man8/uefi.8 Fri Oct 17 13:50:37 2014 (r273218) @@ -0,0 +1,152 @@ +.\" Copyright (c) 2014 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 17, 2014 +.Dt UEFI 8 +.Os +.Sh NAME +.Nm UEFI +.Nd Unified Extensible Firmware Interface bootstrapping procedures +.Sh DESCRIPTION +The +.Nm +Unified Extensible Firmware Interface provides boot- and run-time services +services to operating systems. +.Nm +is a replacement for the legacy BIOS on the i386 and amd64 CPU architectures, +and is also used on arm64 and ia64. +.Pp +The +.Nm +boot process loads system bootstrap code located in an EFI System Partition +(ESP). +The ESP is a GPT or MBR parition with a specific identifier that contains an +.Xr msdosfs 5 +FAT file system with a specified file hierarchy. +.Bl -column -offset indent ".Sy Partition Scheme" ".Sy ESP Identifier" +.It Sy "Partition Scheme" Ta Sy "ESP Identifier" +.It GPT Ta C12A7328-F81F-11D2-BA4B-00A0C93EC93B +.It MBR Ta 0xEF +.El +.Pp +The +.Nm +boot process proceeds as follows: +.Bl -enum -offset indent -compact +.It +.Nm +firmware runs at power up and searches for an OS loader in the EFI system +partition. +The path to the loader may be set by an EFI environment variable. +If not set, the default is +.Pa /EFI/BOOT/BOOTX64.EFI . +The default +.Nm +boot configuration for +.Fx +installs +.Pa boot1.efi +as +.Pa /EFI/BOOT/BOOTX64.EFI . +.It +.Pa boot1.efi +locates the first partition with the type +.Li freebsd-ufs , +and from it loads +.Pa loader.efi . +.It +.Pa loader.efi +loads and boots the kernel, as described in +.Xr loader 8 . +.El +.Pp +The +.Xr vt 4 +system console is automatically selected when booting via +.Nm . +.Sh FILES +.Bl -tag -width /boot/loader -compact +.It Pa /boot/boot1.efi +First stage +.Nm +bootstrap +.It Pa /boot/boot1.efifat +.Xr msdosfs 5 +FAT file system image containing +.Pa boot1.efi +for use by +.Xr bsdinstall 8 +and the +.Ar bootcode +argument to +.Xr gpart 8 . +.It Pa /boot/loader.efi +Final stage bootstrap +.It Pa /boot/kernel/kernel +default kernel +.It Pa /boot/kernel.old/kernel +typical non-default kernel (optional) +.El +.Sh CAVEATS +EFI environment variables are not supported by +.Xr loader 8 +or the kernel. +.Pp +.Pa boot1.efi +loads +.Pa loader.efi +from the first FreeBSD-UFS file system it locates, even if it is on a +different disk. +.Pp +.Pa boot1.efi +cannot load +.Pa loader.efi +from a +.Xr ZFS 8 +file system. +As a result, +.Nm +does not support a typical root file system on ZFS configuration. +.Sh SEE ALSO +.Xr vt 4 , +.Xr msdosfs 5 , +.Xr boot 8 , +.Xr gpart 8 +.Sh HISTORY +.Nm +boot support first appeared in +.Fx 10.1 . +.Sh AUTHORS +.An -nosplit +.Nm +boot support was developed by +.An Benno Rice Aq Mt benno@FreeBSD.org , +.An Ed Maste Aq Mt emaste@FreeBSD.org , +and +.An Nathan Whitehorn Aq Mt nwhitehorn@FreeBSD.org . +The +.Fx +Foundation sponsored portions of the work. From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 13:55:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B636F26B; Fri, 17 Oct 2014 13:55:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A22A1AA3; Fri, 17 Oct 2014 13:55:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HDtkY8062232; Fri, 17 Oct 2014 13:55:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HDtkUV062231; Fri, 17 Oct 2014 13:55:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201410171355.s9HDtkUV062231@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 17 Oct 2014 13:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273219 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 13:55:46 -0000 Author: emaste Date: Fri Oct 17 13:55:45 2014 New Revision: 273219 URL: https://svnweb.freebsd.org/changeset/base/273219 Log: Do nothing in vt_upgrade if there is no vt driver Previously, if no drivers attached at boot we would panic with "vtbuf_fill_locked begin.tp_row 0 must be < screen height 0". PR: 192248 Reviewed by: ray MFC after: 3 days Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D954 Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Oct 17 13:50:37 2014 (r273218) +++ head/sys/dev/vt/vt_core.c Fri Oct 17 13:55:45 2014 (r273219) @@ -2498,6 +2498,8 @@ vt_upgrade(struct vt_device *vd) if (!vty_enabled(VTY_VT)) return; + if (main_vd->vd_driver == NULL) + return; for (i = 0; i < VT_MAXWINDOWS; i++) { vw = vd->vd_windows[i]; From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 15:07:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0D98B86; Fri, 17 Oct 2014 15:07:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B85B629C; Fri, 17 Oct 2014 15:07:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HF741G097585; Fri, 17 Oct 2014 15:07:04 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HF74Zd097584; Fri, 17 Oct 2014 15:07:04 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410171507.s9HF74Zd097584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 17 Oct 2014 15:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273220 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 15:07:04 -0000 Author: melifaro Date: Fri Oct 17 15:07:04 2014 New Revision: 273220 URL: https://svnweb.freebsd.org/changeset/base/273220 Log: * Remove route caching in if_stf. * Copy necessary in6_ifa on stack instead of playing with refcounts. Modified: head/sys/net/if_stf.c Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Fri Oct 17 13:55:45 2014 (r273219) +++ head/sys/net/if_stf.c Fri Oct 17 15:07:04 2014 (r273220) @@ -124,10 +124,6 @@ SYSCTL_DECL(_net_link); static SYSCTL_NODE(_net_link, IFT_STF, stf, CTLFLAG_RW, 0, "6to4 Interface"); -static int stf_route_cache = 1; -SYSCTL_INT(_net_link_stf, OID_AUTO, route_cache, CTLFLAG_RW, - &stf_route_cache, 0, "Caching of IPv4 routes for 6to4 Output"); - static int stf_permit_rfc1918 = 0; SYSCTL_INT(_net_link_stf, OID_AUTO, permit_rfc1918, CTLFLAG_RWTUN, &stf_permit_rfc1918, 0, "Permit the use of private IPv4 addresses"); @@ -144,11 +140,6 @@ SYSCTL_INT(_net_link_stf, OID_AUTO, perm struct stf_softc { struct ifnet *sc_ifp; - union { - struct route __sc_ro4; - struct route_in6 __sc_ro6; /* just for safety */ - } __sc_ro46; -#define sc_ro __sc_ro46.__sc_ro4 struct mtx sc_ro_mtx; u_int sc_fibnum; const struct encaptab *encap_cookie; @@ -180,7 +171,7 @@ static char *stfnames[] = {"stf0", "stf" static int stfmodevent(module_t, int, void *); static int stf_encapcheck(const struct mbuf *, int, int, void *); -static struct in6_ifaddr *stf_getsrcifa6(struct ifnet *); +static int stf_getsrcifa6(struct ifnet *, struct in6_addr *, struct in6_addr *); static int stf_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); static int isrfc1918addr(struct in_addr *); @@ -320,9 +311,9 @@ stf_encapcheck(m, off, proto, arg) void *arg; { struct ip ip; - struct in6_ifaddr *ia6; struct stf_softc *sc; struct in_addr a, b, mask; + struct in6_addr addr6, mask6; sc = (struct stf_softc *)arg; if (sc == NULL) @@ -344,20 +335,16 @@ stf_encapcheck(m, off, proto, arg) if (ip.ip_v != 4) return 0; - ia6 = stf_getsrcifa6(STF2IFP(sc)); - if (ia6 == NULL) - return 0; + if (stf_getsrcifa6(STF2IFP(sc), &addr6, &mask6) != 0) + return (0); /* * check if IPv4 dst matches the IPv4 address derived from the * local 6to4 address. * success on: dst = 10.1.1.1, ia6->ia_addr = 2002:0a01:0101:... */ - if (bcmp(GET_V4(&ia6->ia_addr.sin6_addr), &ip.ip_dst, - sizeof(ip.ip_dst)) != 0) { - ifa_free(&ia6->ia_ifa); + if (bcmp(GET_V4(&addr6), &ip.ip_dst, sizeof(ip.ip_dst)) != 0) return 0; - } /* * check if IPv4 src matches the IPv4 address derived from the @@ -366,9 +353,8 @@ stf_encapcheck(m, off, proto, arg) * fail on: src = 10.1.1.1, ia6->ia_addr = 2002:0b00:.../24 */ bzero(&a, sizeof(a)); - bcopy(GET_V4(&ia6->ia_addr.sin6_addr), &a, sizeof(a)); - bcopy(GET_V4(&ia6->ia_prefixmask.sin6_addr), &mask, sizeof(mask)); - ifa_free(&ia6->ia_ifa); + bcopy(GET_V4(&addr6), &a, sizeof(a)); + bcopy(GET_V4(&mask6), &mask, sizeof(mask)); a.s_addr &= mask.s_addr; b = ip.ip_src; b.s_addr &= mask.s_addr; @@ -379,12 +365,12 @@ stf_encapcheck(m, off, proto, arg) return 32; } -static struct in6_ifaddr * -stf_getsrcifa6(ifp) - struct ifnet *ifp; +static int +stf_getsrcifa6(struct ifnet *ifp, struct in6_addr *addr, struct in6_addr *mask) { struct ifaddr *ia; struct in_ifaddr *ia4; + struct in6_ifaddr *ia6; struct sockaddr_in6 *sin6; struct in_addr in; @@ -403,13 +389,16 @@ stf_getsrcifa6(ifp) if (ia4 == NULL) continue; - ifa_ref(ia); + ia6 = (struct in6_ifaddr *)ia; + + *addr = sin6->sin6_addr; + *mask = ia6->ia_prefixmask.sin6_addr; if_addr_runlock(ifp); - return (struct in6_ifaddr *)ia; + return (0); } if_addr_runlock(ifp); - return NULL; + return (ENOENT); } static int @@ -418,14 +407,12 @@ stf_output(struct ifnet *ifp, struct mbu { struct stf_softc *sc; const struct sockaddr_in6 *dst6; - struct route *cached_route; struct in_addr in4; const void *ptr; - struct sockaddr_in *dst4; u_int8_t tos; struct ip *ip; struct ip6_hdr *ip6; - struct in6_ifaddr *ia6; + struct in6_addr addr6, mask6; int error; #ifdef MAC @@ -451,8 +438,7 @@ stf_output(struct ifnet *ifp, struct mbu * we shouldn't generate output. Without this check, we'll end up * using wrong IPv4 source. */ - ia6 = stf_getsrcifa6(ifp); - if (ia6 == NULL) { + if (stf_getsrcifa6(ifp, &addr6, &mask6) != 0) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return ENETDOWN; @@ -461,7 +447,6 @@ stf_output(struct ifnet *ifp, struct mbu if (m->m_len < sizeof(*ip6)) { m = m_pullup(m, sizeof(*ip6)); if (!m) { - ifa_free(&ia6->ia_ifa); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return ENOBUFS; } @@ -479,7 +464,6 @@ stf_output(struct ifnet *ifp, struct mbu else if (IN6_IS_ADDR_6TO4(&dst6->sin6_addr)) ptr = GET_V4(&dst6->sin6_addr); else { - ifa_free(&ia6->ia_ifa); m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return ENETUNREACH; @@ -502,7 +486,6 @@ stf_output(struct ifnet *ifp, struct mbu if (m && m->m_len < sizeof(struct ip)) m = m_pullup(m, sizeof(struct ip)); if (m == NULL) { - ifa_free(&ia6->ia_ifa); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return ENOBUFS; } @@ -510,9 +493,7 @@ stf_output(struct ifnet *ifp, struct mbu bzero(ip, sizeof(*ip)); - bcopy(GET_V4(&((struct sockaddr_in6 *)&ia6->ia_addr)->sin6_addr), - &ip->ip_src, sizeof(ip->ip_src)); - ifa_free(&ia6->ia_ifa); + bcopy(GET_V4(&addr6), &ip->ip_src, sizeof(ip->ip_src)); bcopy(&in4, &ip->ip_dst, sizeof(ip->ip_dst)); ip->ip_p = IPPROTO_IPV6; ip->ip_ttl = ip_stf_ttl; @@ -522,46 +503,10 @@ stf_output(struct ifnet *ifp, struct mbu else ip_ecn_ingress(ECN_NOCARE, &ip->ip_tos, &tos); - if (!stf_route_cache) { - cached_route = NULL; - goto sendit; - } - - /* - * Do we have a cached route? - */ - mtx_lock(&(sc)->sc_ro_mtx); - dst4 = (struct sockaddr_in *)&sc->sc_ro.ro_dst; - if (dst4->sin_family != AF_INET || - bcmp(&dst4->sin_addr, &ip->ip_dst, sizeof(ip->ip_dst)) != 0) { - /* cache route doesn't match */ - dst4->sin_family = AF_INET; - dst4->sin_len = sizeof(struct sockaddr_in); - bcopy(&ip->ip_dst, &dst4->sin_addr, sizeof(dst4->sin_addr)); - if (sc->sc_ro.ro_rt) { - RTFREE(sc->sc_ro.ro_rt); - sc->sc_ro.ro_rt = NULL; - } - } - - if (sc->sc_ro.ro_rt == NULL) { - rtalloc_fib(&sc->sc_ro, sc->sc_fibnum); - if (sc->sc_ro.ro_rt == NULL) { - m_freem(m); - mtx_unlock(&(sc)->sc_ro_mtx); - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENETUNREACH; - } - } - cached_route = &sc->sc_ro; - -sendit: M_SETFIB(m, sc->sc_fibnum); if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - error = ip_output(m, NULL, cached_route, 0, NULL, NULL); + error = ip_output(m, NULL, NULL, 0, NULL, NULL); - if (cached_route != NULL) - mtx_unlock(&(sc)->sc_ro_mtx); return error; } From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 15:11:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50A98ED0; Fri, 17 Oct 2014 15:11:23 +0000 (UTC) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 12A292F1; Fri, 17 Oct 2014 15:11:22 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTP id 728D912646; Sat, 18 Oct 2014 01:11:20 +1000 (EST) Received: from Peters-MacBook-Pro.local (c-24-130-52-29.hsd1.ca.comcast.net [24.130.52.29]) by dommail.onthenet.com.au (MOS 4.4.4-GA) with ESMTP id BZB83907 (AUTH peterg@ptree32.com.au); Sat, 18 Oct 2014 01:11:19 +1000 Message-ID: <54413194.8030704@freebsd.org> Date: Fri, 17 Oct 2014 08:11:16 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r273214 - in head/sys: amd64/vmm/intel modules/vmm References: <201410171320.s9HDKo53045297@svn.freebsd.org> In-Reply-To: <201410171320.s9HDKo53045297@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 15:11:23 -0000 > Author: imp > Date: Fri Oct 17 13:20:49 2014 > New Revision: 273214 > URL: https://svnweb.freebsd.org/changeset/base/273214 > > Log: > Fix build to not bogusly always rebuild vmm.ko. > > Rename vmx_assym.s to vmx_assym.h to reflect that file's actual use > and update vmx_support.S's include to match. Add vmx_assym.h to the > SRCS to that it gets properly added to the dependency list. Add > vmx_support.S to SRCS as well, so it gets built and needs fewer > special-case goo. Remove now-redundant special-case goo. Finally, > vmx_genassym.o doesn't need to depend on a hand expanded ${_ILINKS} > explicitly, that's all taken care of by beforedepend. > > With these items fixed, we no longer build vmm.ko every single time > through the modules on a KERNFAST build. > > Sponsored by: Netflix Discussed with: grehan, neel From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 15:28:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FB82419; Fri, 17 Oct 2014 15:28:12 +0000 (UTC) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com [IPv6:2a00:1450:4010:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 788296D5; Fri, 17 Oct 2014 15:28:11 +0000 (UTC) Received: by mail-la0-f41.google.com with SMTP id pn19so895150lab.14 for ; Fri, 17 Oct 2014 08:28:09 -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:message-id:subject :from:to:cc:content-type; bh=kdwyP2XZEIKW7rfkowImMnxy80PnxsYqVXa9eewxBu0=; b=Sf51F4EJ4zCvHK7WcKSpOhDRVRSjdeqs11FBomEsUOwd7t79vGN/2JeUH81sAGs24k +dNgbr0aD6cjr99NJC5XuKK1xGAWcN558+V2AURvODYMz9FErfloX80Os6OfhGMywwjG H3uOAKbGNyRE27fm6A/0X7HGVUx+nmqznzWLZ7eCddUAxtE5UWesA+kCd8gtrCNvY4+N fGeUPW5ph5V1/3KDT+IV36p4SsjkCbOiElnYDmN0iLp4k2RLIT6VJ9Ttj1vzKA+BZD7C 2PH7RLVzQ3a2sGSfMq7DgeOja53BmobzLq8pjSdxKJ1czSRlvTPnAF5y31UZCuzrtbpd 8iKQ== MIME-Version: 1.0 X-Received: by 10.112.28.75 with SMTP id z11mr9392996lbg.49.1413559688797; Fri, 17 Oct 2014 08:28:08 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.170.4 with HTTP; Fri, 17 Oct 2014 08:28:08 -0700 (PDT) In-Reply-To: References: <201410161804.s9GI4hed091471@svn.freebsd.org> Date: Fri, 17 Oct 2014 08:28:08 -0700 X-Google-Sender-Auth: e6gbi24pfPloMgpOP20_bKvzFGc Message-ID: Subject: Re: svn commit: r273174 - in head/sys: amd64/amd64 amd64/vmm arm/arm cam/ata cddl/contrib/opensolaris/uts/common/dtrace dev/acpica dev/asmc dev/cfi dev/drm2 dev/hatm dev/mii dev/nfe dev/patm dev/pci de... From: Davide Italiano To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "Bjoern A. Zeeb" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 15:28:12 -0000 On Thu, Oct 16, 2014 at 9:07 PM, Davide Italiano wrote: > On Thu, Oct 16, 2014 at 8:30 PM, Garrett Cooper wrote: >> >> I think you want make tinderbox instead of make universe (make universe doesn't display builds errors whereas make tinderbox does). >> Cheers! > > Thanks -- I'm rerunning 'make tinderbox on ref11 as we speak and I'll > commit a fix once it's over. > TL;DR Still see a lot of failures, they seem unrelated so I'll go forward and push my patch. Thanks for the suggestion on tinderbox, Garrett. arm TS7800 kernel failed, check _.arm.TS7800 for details cc: warning: argument unused during compilation: '-mfpu=none' [-Wunused-command- line-argument] error: unknown target CPU 'armv5te' i386 LINT-NOIP kernel failed, check _.i386.LINT-NOIP for details amd64 LINT-NOIP kernel failed, check _.amd64.LINT-NOIP for details linking kernel if_gif.o: In function `gif_delete_tunnel': /home/davide/freebsd/sys/net/if_gif.c:(.text+0x904): undefined reference to `enc ap_detach' powerpc MPC85XX kernel failed, check _.powerpc.MPC85XX for details cc: error: unsupported argument '-me500' to option 'Wa,' cc: error: unsupported argument '-many' to option 'Wa,' powerpc LINT kernel failed, check _.powerpc.LINT for details powerpc WII kernel failed, check _.powerpc.WII for details powerpc GENERIC kernel failed, check _.powerpc.GENERIC for details /home/davide/freebsd/sys/modules/dcons_crom/../../dev/dcons/dcons_crom.c:71:10: fatal error: 'machine/segments.h' file not found #include /* for idt */ As a side note my screen is also spammed with the following during every run of 'make tinderbox' -- I don't remember this happening before, but I may miss something. WARNING: duplicate option `GEOM_PART_BSD' encountered. WARNING: duplicate option `GEOM_PART_EBR' encountered. WARNING: duplicate option `GEOM_PART_EBR_COMPAT' encountered. WARNING: duplicate option `GEOM_PART_MBR' encountered. WARNING: duplicate option `DEV_MEM' encountered. WARNING: duplicate device `mem' encountered. WARNING: duplicate option `CAM_DEBUG_DELAY' encountered. WARNING: duplicate option `DEV_ISA' encountered. WARNING: duplicate device `isa' encountered. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 17:34:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02515258; Fri, 17 Oct 2014 17:34:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1F366A6; Fri, 17 Oct 2014 17:34:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HHY6fn072668; Fri, 17 Oct 2014 17:34:06 GMT (envelope-from davide@FreeBSD.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HHY53a072663; Fri, 17 Oct 2014 17:34:05 GMT (envelope-from davide@FreeBSD.org) Message-Id: <201410171734.s9HHY53a072663@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davide set sender to davide@FreeBSD.org using -f From: Davide Italiano Date: Fri, 17 Oct 2014 17:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273234 - in head/sys: dev/cfe dev/nvram2env mips/beri mips/rmi mips/rt305x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 17:34:07 -0000 Author: davide Date: Fri Oct 17 17:34:05 2014 New Revision: 273234 URL: https://svnweb.freebsd.org/changeset/base/273234 Log: Convert remaining {g,s}etenv->kern_{g,s}etenv left over from r273174. Reported by: bz Modified: head/sys/dev/cfe/cfe_env.c head/sys/dev/nvram2env/nvram2env.c head/sys/mips/beri/beri_machdep.c head/sys/mips/rmi/xlr_machdep.c head/sys/mips/rt305x/rt305x_machdep.c Modified: head/sys/dev/cfe/cfe_env.c ============================================================================== --- head/sys/dev/cfe/cfe_env.c Fri Oct 17 16:32:27 2014 (r273233) +++ head/sys/dev/cfe/cfe_env.c Fri Oct 17 17:34:05 2014 (r273234) @@ -52,7 +52,7 @@ cfe_env_init(void) if (cfe_enumenv(idx, name, sizeof(name), val, sizeof(val)) != 0) break; - if (setenv(name, val) != 0) { + if (kern_setenv(name, val) != 0) { printf("No space to store CFE env: \"%s=%s\"\n", name, val); } Modified: head/sys/dev/nvram2env/nvram2env.c ============================================================================== --- head/sys/dev/nvram2env/nvram2env.c Fri Oct 17 16:32:27 2014 (r273233) +++ head/sys/dev/nvram2env/nvram2env.c Fri Oct 17 17:34:05 2014 (r273234) @@ -263,7 +263,7 @@ nvram2env_attach(device_t dev) if (bootverbose) printf("ENV: %s=%s\n", pair, value); #endif - setenv(pair, value); + kern_setenv(pair, value); if (strcasecmp(pair, "WAN_MAC_ADDR") == 0) { /* Alias for MAC address of eth0 */ @@ -271,7 +271,7 @@ nvram2env_attach(device_t dev) printf("ENV: aliasing " "WAN_MAC_ADDR to ethaddr" " = %s\n", value); - setenv("ethaddr", value); + kern_setenv("ethaddr", value); } else if (strcasecmp(pair, "LAN_MAC_ADDR") == 0){ /* Alias for MAC address of eth1 */ @@ -279,7 +279,7 @@ nvram2env_attach(device_t dev) printf("ENV: aliasing " "LAN_MAC_ADDR to eth1addr" " = %s\n", value); - setenv("eth1addr", value); + kern_setenv("eth1addr", value); } if (strcmp(pair, "bootverbose") == 0) Modified: head/sys/mips/beri/beri_machdep.c ============================================================================== --- head/sys/mips/beri/beri_machdep.c Fri Oct 17 16:32:27 2014 (r273233) +++ head/sys/mips/beri/beri_machdep.c Fri Oct 17 17:34:05 2014 (r273234) @@ -164,9 +164,9 @@ _parse_bootargs(char *cmdline) } else { n = strsep(&v, "="); if (v == NULL) - setenv(n, "1"); + kern_setenv(n, "1"); else - setenv(n, v); + kern_setenv(n, v); } } } Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Fri Oct 17 16:32:27 2014 (r273233) +++ head/sys/mips/rmi/xlr_machdep.c Fri Oct 17 17:34:05 2014 (r273234) @@ -458,9 +458,9 @@ platform_start(__register_t a0 __unused, printf("\t%s\n", arg); n = strsep(&arg, "="); if (arg == NULL) - setenv(n, "1"); + kern_setenv(n, "1"); else - setenv(n, arg); + kern_setenv(n, arg); } xlr_set_boot_flags(); Modified: head/sys/mips/rt305x/rt305x_machdep.c ============================================================================== --- head/sys/mips/rt305x/rt305x_machdep.c Fri Oct 17 16:32:27 2014 (r273233) +++ head/sys/mips/rt305x/rt305x_machdep.c Fri Oct 17 17:34:05 2014 (r273234) @@ -167,7 +167,7 @@ platform_start(__register_t a0 __unused, arg = (char *)(intptr_t)MIPS_PHYS_TO_KSEG0(argv[i]); printf("\targv[%d] = %s\n", i, arg); sprintf(n, "argv%d", i); - setenv(n, arg); + kern_setenv(n, arg); } } @@ -180,9 +180,9 @@ platform_start(__register_t a0 __unused, printf("\t%s\n", arg); n = strsep(&arg, "="); if (arg == NULL) - setenv(n, "1"); + kern_setenv(n, "1"); else - setenv(n, arg); + kern_setenv(n, arg); } From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 18:16:41 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8FDA9B4; Fri, 17 Oct 2014 18:16:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ADDDAAB; Fri, 17 Oct 2014 18:16:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HIGfZt092496; Fri, 17 Oct 2014 18:16:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HIGf2R092494; Fri, 17 Oct 2014 18:16:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201410171816.s9HIGf2R092494@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 17 Oct 2014 18:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273235 - head/share/man/man8 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 18:16:41 -0000 Author: emaste Date: Fri Oct 17 18:16:40 2014 New Revision: 273235 URL: https://svnweb.freebsd.org/changeset/base/273235 Log: Fix UEFI manpage whitespace and minor issues Submitted by: wblock MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D959 Modified: head/share/man/man8/Makefile head/share/man/man8/uefi.8 Modified: head/share/man/man8/Makefile ============================================================================== --- head/share/man/man8/Makefile Fri Oct 17 17:34:05 2014 (r273234) +++ head/share/man/man8/Makefile Fri Oct 17 18:16:40 2014 (r273235) @@ -28,6 +28,6 @@ MLINKS+=yp.8 NIS.8 \ .if ${MACHINE_CPUARCH} == "amd64" _uefi.8= uefi.8 -.endif +.endif .include Modified: head/share/man/man8/uefi.8 ============================================================================== --- head/share/man/man8/uefi.8 Fri Oct 17 17:34:05 2014 (r273234) +++ head/share/man/man8/uefi.8 Fri Oct 17 18:16:40 2014 (r273235) @@ -31,10 +31,10 @@ .Nm UEFI .Nd Unified Extensible Firmware Interface bootstrapping procedures .Sh DESCRIPTION -The +The .Nm Unified Extensible Firmware Interface provides boot- and run-time services -services to operating systems. +to operating systems. .Nm is a replacement for the legacy BIOS on the i386 and amd64 CPU architectures, and is also used on arm64 and ia64. @@ -43,7 +43,7 @@ The .Nm boot process loads system bootstrap code located in an EFI System Partition (ESP). -The ESP is a GPT or MBR parition with a specific identifier that contains an +The ESP is a GPT or MBR partition with a specific identifier that contains an .Xr msdosfs 5 FAT file system with a specified file hierarchy. .Bl -column -offset indent ".Sy Partition Scheme" ".Sy ESP Identifier" @@ -100,7 +100,7 @@ FAT file system image containing for use by .Xr bsdinstall 8 and the -.Ar bootcode +.Ar bootcode argument to .Xr gpart 8 . .It Pa /boot/loader.efi @@ -110,26 +110,6 @@ default kernel .It Pa /boot/kernel.old/kernel typical non-default kernel (optional) .El -.Sh CAVEATS -EFI environment variables are not supported by -.Xr loader 8 -or the kernel. -.Pp -.Pa boot1.efi -loads -.Pa loader.efi -from the first FreeBSD-UFS file system it locates, even if it is on a -different disk. -.Pp -.Pa boot1.efi -cannot load -.Pa loader.efi -from a -.Xr ZFS 8 -file system. -As a result, -.Nm -does not support a typical root file system on ZFS configuration. .Sh SEE ALSO .Xr vt 4 , .Xr msdosfs 5 , @@ -150,3 +130,23 @@ and The .Fx Foundation sponsored portions of the work. +.Sh CAVEATS +EFI environment variables are not supported by +.Xr loader 8 +or the kernel. +.Pp +.Pa boot1.efi +loads +.Pa loader.efi +from the first FreeBSD-UFS file system it locates, even if it is on a +different disk. +.Pp +.Pa boot1.efi +cannot load +.Pa loader.efi +from a +.Xr ZFS 8 +file system. +As a result, +.Nm +does not support a typical root file system on ZFS configuration. From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 19:04:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98C69549; Fri, 17 Oct 2014 19:04:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85366F5E; Fri, 17 Oct 2014 19:04:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HJ4PII015962; Fri, 17 Oct 2014 19:04:25 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HJ4PYS015961; Fri, 17 Oct 2014 19:04:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201410171904.s9HJ4PYS015961@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 17 Oct 2014 19:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273236 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 19:04:25 -0000 Author: markj Date: Fri Oct 17 19:04:24 2014 New Revision: 273236 URL: https://svnweb.freebsd.org/changeset/base/273236 Log: Use pmc_destroy_pmc_descriptor() to actually free the pmc, which is consistent with pmc_destroy_owner_descriptor(). Also be sure to destroy PMCs if a process exits or execs without explicitly releasing them. Reviewed by: bz, gnn MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D958 Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Fri Oct 17 18:16:40 2014 (r273235) +++ head/sys/dev/hwpmc/hwpmc_mod.c Fri Oct 17 19:04:24 2014 (r273236) @@ -192,6 +192,7 @@ static int pmc_detach_process(struct pro static int pmc_detach_one_process(struct proc *p, struct pmc *pm, int flags); static void pmc_destroy_owner_descriptor(struct pmc_owner *po); +static void pmc_destroy_pmc_descriptor(struct pmc *pm); static struct pmc_owner *pmc_find_owner_descriptor(struct proc *p); static int pmc_find_pmc(pmc_id_t pmcid, struct pmc **pm); static struct pmc *pmc_find_pmc_descriptor_in_process(struct pmc_owner *po, @@ -748,6 +749,7 @@ pmc_remove_owner(struct pmc_owner *po) ("[pmc,%d] owner %p != po %p", __LINE__, pm->pm_owner, po)); pmc_release_pmc_descriptor(pm); /* will unlink from the list */ + pmc_destroy_pmc_descriptor(pm); } KASSERT(po->po_sscount == 0, @@ -2160,9 +2162,7 @@ pmc_allocate_pmc_descriptor(void) static void pmc_destroy_pmc_descriptor(struct pmc *pm) { - (void) pm; -#ifdef DEBUG KASSERT(pm->pm_state == PMC_STATE_DELETED || pm->pm_state == PMC_STATE_FREE, ("[pmc,%d] destroying non-deleted PMC", __LINE__)); @@ -2173,7 +2173,8 @@ pmc_destroy_pmc_descriptor(struct pmc *p KASSERT(pm->pm_runcount == 0, ("[pmc,%d] pmc has non-zero run count %d", __LINE__, pm->pm_runcount)); -#endif + + free(pm, M_PMC); } static void @@ -2206,10 +2207,10 @@ pmc_wait_for_pmc_idle(struct pmc *pm) * - detaches the PMC from hardware * - unlinks all target threads that were attached to it * - removes the PMC from its owner's list - * - destroy's the PMC private mutex + * - destroys the PMC private mutex * - * Once this function completes, the given pmc pointer can be safely - * FREE'd by the caller. + * Once this function completes, the given pmc pointer can be freed by + * calling pmc_destroy_pmc_descriptor(). */ static void @@ -2359,8 +2360,6 @@ pmc_release_pmc_descriptor(struct pmc *p LIST_REMOVE(pm, pm_next); pm->pm_owner = NULL; } - - pmc_destroy_pmc_descriptor(pm); } /* @@ -3367,7 +3366,6 @@ pmc_syscall_handler(struct thread *td, v if (n == (int) md->pmd_npmc) { pmc_destroy_pmc_descriptor(pmc); - free(pmc, M_PMC); pmc = NULL; error = EINVAL; break; @@ -3403,7 +3401,6 @@ pmc_syscall_handler(struct thread *td, v (error = pcd->pcd_config_pmc(cpu, adjri, pmc)) != 0) { (void) pcd->pcd_release_pmc(cpu, adjri, pmc); pmc_destroy_pmc_descriptor(pmc); - free(pmc, M_PMC); pmc = NULL; pmc_restore_cpu_binding(&pb); error = EPERM; @@ -3431,7 +3428,7 @@ pmc_syscall_handler(struct thread *td, v if ((error = pmc_register_owner(curthread->td_proc, pmc)) != 0) { pmc_release_pmc_descriptor(pmc); - free(pmc, M_PMC); + pmc_destroy_pmc_descriptor(pmc); pmc = NULL; break; } @@ -3674,8 +3671,7 @@ pmc_syscall_handler(struct thread *td, v po = pm->pm_owner; pmc_release_pmc_descriptor(pm); pmc_maybe_remove_owner(po); - - free(pm, M_PMC); + pmc_destroy_pmc_descriptor(pm); } break; From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 20:47:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A31BC632; Fri, 17 Oct 2014 20:47:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75114BE9; Fri, 17 Oct 2014 20:47:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HKluoH064469; Fri, 17 Oct 2014 20:47:56 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HKlugd064466; Fri, 17 Oct 2014 20:47:56 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410172047.s9HKlugd064466@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 17 Oct 2014 20:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273241 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 20:47:56 -0000 Author: melifaro Date: Fri Oct 17 20:47:55 2014 New Revision: 273241 URL: https://svnweb.freebsd.org/changeset/base/273241 Log: * Fix table sets handling. * Simplify formatting. Suggested by: luigi Modified: head/sbin/ipfw/ipfw2.c head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Fri Oct 17 20:39:39 2014 (r273240) +++ head/sbin/ipfw/ipfw2.c Fri Oct 17 20:47:55 2014 (r273241) @@ -2138,7 +2138,7 @@ ipfw_sets_handler(char *av[]) { uint32_t masks[2]; int i; - uint8_t cmd, new_set, rulenum; + uint8_t cmd, rulenum; ipfw_range_tlv rt; char *msg; size_t size; @@ -2202,7 +2202,7 @@ ipfw_sets_handler(char *av[]) if (!isdigit(*(av[0])) || (cmd == 3 && rt.set > RESVD_SET) || (cmd == 2 && rt.start_rule == IPFW_DEFAULT_RULE) ) errx(EX_DATAERR, "invalid source number %s\n", av[0]); - if (!isdigit(*(av[2])) || new_set > RESVD_SET) + if (!isdigit(*(av[2])) || rt.new_set > RESVD_SET) errx(EX_DATAERR, "invalid dest. set %s\n", av[1]); i = do_range_cmd(cmd, &rt); } else if (_substrcmp(*av, "disable") == 0 || @@ -2543,6 +2543,7 @@ ipfw_show_config(struct cmdline_opts *co dynbase = NULL; dynsz = 0; read = sizeof(*cfg); + rcnt = 0; fo->set_mask = cfg->set_mask; Modified: head/sbin/ipfw/tables.c ============================================================================== --- head/sbin/ipfw/tables.c Fri Oct 17 20:39:39 2014 (r273240) +++ head/sbin/ipfw/tables.c Fri Oct 17 20:47:55 2014 (r273241) @@ -1908,7 +1908,7 @@ ipfw_list_values(int ac, char *av[]) for (i = 0; i < olh->count; i++) { table_show_value(buf, sizeof(buf), (ipfw_table_value *)v, vmask, 0); - printf("[%u] refs=%ju %s\n", v->spare1, v->refcnt, buf); + printf("[%u] refs=%lu %s\n", v->spare1, (u_long)v->refcnt, buf); v = (struct _table_value *)((caddr_t)v + olh->objsize); } From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 21:09:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67E37C26; Fri, 17 Oct 2014 21:09:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5456DDCE; Fri, 17 Oct 2014 21:09:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HL94oi076204; Fri, 17 Oct 2014 21:09:04 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HL94rO076203; Fri, 17 Oct 2014 21:09:04 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201410172109.s9HL94rO076203@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Fri, 17 Oct 2014 21:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273242 - head/usr.bin/col X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 21:09:04 -0000 Author: jmg Date: Fri Oct 17 21:09:03 2014 New Revision: 273242 URL: https://svnweb.freebsd.org/changeset/base/273242 Log: Fix to col when printing half-line feeds w/ -f option... Message-Id on openbsd-tech: 20141017195810.GJ132@iris.usta.de Submitted by: Ingo Schwarze Obtained from: OpenBSD MFC after: 3 days Modified: head/usr.bin/col/col.c Modified: head/usr.bin/col/col.c ============================================================================== --- head/usr.bin/col/col.c Fri Oct 17 20:47:55 2014 (r273241) +++ head/usr.bin/col/col.c Fri Oct 17 21:09:03 2014 (r273242) @@ -378,7 +378,7 @@ flush_blanks(void) PUTC('\n'); if (half) { PUTC('\033'); - PUTC('9'); + PUTC('\011'); if (!nb) PUTC('\r'); } From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 21:52:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2C518FE; Fri, 17 Oct 2014 21:52:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4B18282; Fri, 17 Oct 2014 21:52:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HLqwVx002946; Fri, 17 Oct 2014 21:52:58 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HLqvvo002939; Fri, 17 Oct 2014 21:52:57 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201410172152.s9HLqvvo002939@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 17 Oct 2014 21:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273243 - head/bin/sh/tests/parser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 17 Oct 2014 21:52:59 -0000 Author: jilles Date: Fri Oct 17 21:52:57 2014 New Revision: 273243 URL: https://svnweb.freebsd.org/changeset/base/273243 Log: sh: Add some tests for backslash-newline continuation. Added: head/bin/sh/tests/parser/line-cont1.0 (contents, props changed) head/bin/sh/tests/parser/line-cont2.0 (contents, props changed) head/bin/sh/tests/parser/line-cont3.0 (contents, props changed) Modified: head/bin/sh/tests/parser/Makefile Modified: head/bin/sh/tests/parser/Makefile ============================================================================== --- head/bin/sh/tests/parser/Makefile Fri Oct 17 21:09:03 2014 (r273242) +++ head/bin/sh/tests/parser/Makefile Fri Oct 17 21:52:57 2014 (r273243) @@ -55,6 +55,9 @@ FILES+= heredoc9.0 FILES+= heredoc10.0 FILES+= heredoc11.0 FILES+= heredoc12.0 +FILES+= line-cont1.0 +FILES+= line-cont2.0 +FILES+= line-cont3.0 FILES+= no-space1.0 FILES+= no-space2.0 FILES+= only-redir1.0 Added: head/bin/sh/tests/parser/line-cont1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parser/line-cont1.0 Fri Oct 17 21:52:57 2014 (r273243) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +i\ +f +t\ +r\ +u\ +e +t\ +h\ +e\ +n +: +\ +f\ +i Added: head/bin/sh/tests/parser/line-cont2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parser/line-cont2.0 Fri Oct 17 21:52:57 2014 (r273243) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +[ "a\ +b" = ab ] Added: head/bin/sh/tests/parser/line-cont3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parser/line-cont3.0 Fri Oct 17 21:52:57 2014 (r273243) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +v=`printf %s 'a\ +b'` +w="`printf %s 'c\ +d'`" +[ "$v$w" = abcd ] From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 07:38:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11C9926D; Sat, 18 Oct 2014 07:38:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1A9DD88; Sat, 18 Oct 2014 07:38:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9I7ckDS076377; Sat, 18 Oct 2014 07:38:46 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9I7ck1h076373; Sat, 18 Oct 2014 07:38:46 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201410180738.s9I7ck1h076373@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 18 Oct 2014 07:38:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273247 - head/usr.sbin/watchdogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 07:38:47 -0000 Author: rpaulo Date: Sat Oct 18 07:38:46 2014 New Revision: 273247 URL: https://svnweb.freebsd.org/changeset/base/273247 Log: Fix the watchdog/watchdog man pages. The default timeout is 128 seconds. MFC after: 1 week Modified: head/usr.sbin/watchdogd/watchdog.8 head/usr.sbin/watchdogd/watchdogd.8 Modified: head/usr.sbin/watchdogd/watchdog.8 ============================================================================== --- head/usr.sbin/watchdogd/watchdog.8 Sat Oct 18 07:07:34 2014 (r273246) +++ head/usr.sbin/watchdogd/watchdog.8 Sat Oct 18 07:38:46 2014 (r273247) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2006 +.Dd October 18, 2014 .Dt WATCHDOG 8 .Os .Sh NAME @@ -50,7 +50,7 @@ The option specifies the desired timeout period in seconds, a value of zero will disable the watchdog. -The default timeout is 16 seconds. +The default timeout is 128 seconds. .Sh SEE ALSO .Xr watchdog 4 , .Xr watchdogd 8 , Modified: head/usr.sbin/watchdogd/watchdogd.8 ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.8 Sat Oct 18 07:07:34 2014 (r273246) +++ head/usr.sbin/watchdogd/watchdogd.8 Sat Oct 18 07:38:46 2014 (r273247) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 27, 2013 +.Dd October 18, 2014 .Dt WATCHDOGD 8 .Os .Sh NAME @@ -84,7 +84,7 @@ of the check and defaults to one second. The .Fl t Ar timeout specifies the desired timeout period in seconds. -The default timeout is 16 seconds. +The default timeout is 128 seconds. .Pp One possible circumstance which will cause a watchdog timeout is an interrupt storm. From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 07:40:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FE483B3; Sat, 18 Oct 2014 07:40:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0880E1C; Sat, 18 Oct 2014 07:40:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9I7ec3X076717; Sat, 18 Oct 2014 07:40:38 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9I7ecvi076716; Sat, 18 Oct 2014 07:40:38 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201410180740.s9I7ecvi076716@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 18 Oct 2014 07:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273248 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 07:40:39 -0000 Author: rpaulo Date: Sat Oct 18 07:40:38 2014 New Revision: 273248 URL: https://svnweb.freebsd.org/changeset/base/273248 Log: AM335x FDT: add an entry for the watchdog. MFC after: 1 week Modified: head/sys/boot/fdt/dts/arm/am335x.dtsi Modified: head/sys/boot/fdt/dts/arm/am335x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/am335x.dtsi Sat Oct 18 07:38:46 2014 (r273247) +++ head/sys/boot/fdt/dts/arm/am335x.dtsi Sat Oct 18 07:40:38 2014 (r273248) @@ -81,6 +81,13 @@ interrupts = < 16 >; interrupt-parent = <&AINTC>; }; + + wdt1@44E35000 { + compatible = "ti,wdt"; + reg = <0x44E35000 0x1000>; + interrupts = <91>; + interrupt-parent = <&AINTC>; + }; GPIO: gpio { #gpio-cells = <3>; From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 08:07:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 686C16E0; Sat, 18 Oct 2014 08:07:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54C41FA1; Sat, 18 Oct 2014 08:07:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9I87ISN090472; Sat, 18 Oct 2014 08:07:18 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9I87IiU090471; Sat, 18 Oct 2014 08:07:18 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201410180807.s9I87IiU090471@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sat, 18 Oct 2014 08:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273249 - head/usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 08:07:18 -0000 Author: nyan Date: Sat Oct 18 08:07:17 2014 New Revision: 273249 URL: https://svnweb.freebsd.org/changeset/base/273249 Log: Disable hyperv on pc98. Modified: head/usr.sbin/Makefile.i386 Modified: head/usr.sbin/Makefile.i386 ============================================================================== --- head/usr.sbin/Makefile.i386 Sat Oct 18 07:40:38 2014 (r273248) +++ head/usr.sbin/Makefile.i386 Sat Oct 18 08:07:17 2014 (r273249) @@ -9,9 +9,6 @@ SUBDIR+= asf SUBDIR+= btxld .endif SUBDIR+= cpucontrol -.if ${MK_HYPERV} != "no" -SUBDIR+= hyperv -.endif SUBDIR+= kgmon SUBDIR+= kgzip SUBDIR+= lptcontrol @@ -31,6 +28,9 @@ SUBDIR+= zzz SUBDIR+= acpi .endif SUBDIR+= boot0cfg +.if ${MK_HYPERV} != "no" +SUBDIR+= hyperv +.endif .if ${MK_WIRELESS} != "no" SUBDIR+= wlconfig .endif From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 10:32:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 844CBC9; Sat, 18 Oct 2014 10:32:01 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 68B48E30; Sat, 18 Oct 2014 10:32:00 +0000 (UTC) Received: from bender.lan (97e07ab1.skybroadband.com [151.224.122.177]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id 061505C692; Sat, 18 Oct 2014 10:31:58 +0000 (UTC) Date: Sat, 18 Oct 2014 11:31:51 +0100 From: Andrew Turner To: Rui Paulo Subject: Re: svn commit: r273248 - head/sys/boot/fdt/dts/arm Message-ID: <20141018113151.6d4451bb@bender.lan> In-Reply-To: <201410180740.s9I7ecvi076716@svn.freebsd.org> References: <201410180740.s9I7ecvi076716@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 10:32:01 -0000 On Sat, 18 Oct 2014 07:40:38 +0000 (UTC) Rui Paulo wrote: > Modified: head/sys/boot/fdt/dts/arm/am335x.dtsi > ============================================================================== > --- head/sys/boot/fdt/dts/arm/am335x.dtsi Sat Oct 18 07:38:46 > 2014 (r273247) +++ > head/sys/boot/fdt/dts/arm/am335x.dtsi Sat Oct 18 07:40:38 > 2014 (r273248) @@ -81,6 +81,13 @@ interrupts = < 16 >; > interrupt-parent = <&AINTC>; > }; > + > + wdt1@44E35000 { > + compatible = "ti,wdt"; Linux uses "ti,omap3-wdt" as the compatible string for this device. Andrew From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 12:28:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 984091C5; Sat, 18 Oct 2014 12:28:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8451099C; Sat, 18 Oct 2014 12:28:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9ICSqwI013713; Sat, 18 Oct 2014 12:28:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9ICSpak013706; Sat, 18 Oct 2014 12:28:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201410181228.s9ICSpak013706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 18 Oct 2014 12:28:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273250 - in head: sys/sys sys/vm usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 12:28:52 -0000 Author: jhb Date: Sat Oct 18 12:28:51 2014 New Revision: 273250 URL: https://svnweb.freebsd.org/changeset/base/273250 Log: Retire the unimplemented MAP_RENAME and MAP_NORESERVE flags to mmap(2). Older binaries are still permitted to use these flags. PR: 193961 (exp-run in ports) Differential Revision: https://reviews.freebsd.org/D848 Reviewed by: kib Modified: head/sys/sys/mman.h head/sys/sys/param.h head/sys/vm/vm_mmap.c head/usr.bin/truss/syscalls.c Modified: head/sys/sys/mman.h ============================================================================== --- head/sys/sys/mman.h Sat Oct 18 08:07:17 2014 (r273249) +++ head/sys/sys/mman.h Sat Oct 18 12:28:51 2014 (r273250) @@ -69,8 +69,8 @@ #define MAP_FIXED 0x0010 /* map addr must be exactly as requested */ #if __BSD_VISIBLE -#define MAP_RENAME 0x0020 /* Sun: rename private pages to file */ -#define MAP_NORESERVE 0x0040 /* Sun: don't reserve needed swap area */ +#define MAP_RESERVED0020 0x0020 /* previously unimplemented MAP_RENAME */ +#define MAP_RESERVED0040 0x0040 /* previously unimplemented MAP_NORESERVE */ #define MAP_RESERVED0080 0x0080 /* previously misimplemented MAP_INHERIT */ #define MAP_RESERVED0100 0x0100 /* previously unimplemented MAP_NOEXTEND */ #define MAP_HASSEMAPHORE 0x0200 /* region may contain semaphores */ Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Oct 18 08:07:17 2014 (r273249) +++ head/sys/sys/param.h Sat Oct 18 12:28:51 2014 (r273250) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100038 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100039 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, @@ -81,6 +81,7 @@ #define P_OSREL_SIGSEGV 700004 #define P_OSREL_MAP_ANON 800104 #define P_OSREL_MAP_FSTRICT 1100036 +#define P_OSREL_MAP_RENAME 1100039 #define P_OSREL_MAJOR(x) ((x) / 100000) #endif Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Oct 18 08:07:17 2014 (r273249) +++ head/sys/vm/vm_mmap.c Sat Oct 18 12:28:51 2014 (r273250) @@ -220,6 +220,12 @@ sys_mmap(td, uap) fp = NULL; /* + * Ignore old flags that used to be defined but did not do anything. + */ + if (td->td_proc->p_osrel < P_OSREL_MAP_RENAME) + flags &= ~(MAP_RESERVED0020 | MAP_RESERVED0040); + + /* * Enforce the constraints. * Mapping of length 0 is only allowed for old binaries. * Anonymous mapping shall specify -1 as filedescriptor and @@ -244,9 +250,9 @@ sys_mmap(td, uap) flags |= MAP_ANON; pos = 0; } - if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_RENAME | - MAP_NORESERVE | MAP_HASSEMAPHORE | MAP_STACK | MAP_NOSYNC | - MAP_ANON | MAP_EXCL | MAP_NOCORE | MAP_PREFAULT_READ | + if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_HASSEMAPHORE | + MAP_STACK | MAP_NOSYNC | MAP_ANON | MAP_EXCL | MAP_NOCORE | + MAP_PREFAULT_READ | #ifdef MAP_32BIT MAP_32BIT | #endif Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sat Oct 18 08:07:17 2014 (r273249) +++ head/usr.bin/truss/syscalls.c Sat Oct 18 12:28:51 2014 (r273250) @@ -312,8 +312,8 @@ static struct xlat poll_flags[] = { }; static struct xlat mmap_flags[] = { - X(MAP_SHARED) X(MAP_PRIVATE) X(MAP_FIXED) X(MAP_RENAME) - X(MAP_NORESERVE) X(MAP_RESERVED0080) X(MAP_RESERVED0100) + X(MAP_SHARED) X(MAP_PRIVATE) X(MAP_FIXED) X(MAP_RESERVED0020) + X(MAP_RESERVED0040) X(MAP_RESERVED0080) X(MAP_RESERVED0100) X(MAP_HASSEMAPHORE) X(MAP_STACK) X(MAP_NOSYNC) X(MAP_ANON) X(MAP_NOCORE) X(MAP_PREFAULT_READ) #ifdef MAP_32BIT From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 13:38:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24054EE0; Sat, 18 Oct 2014 13:38:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F9CEED7; Sat, 18 Oct 2014 13:38:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IDc5LJ047026; Sat, 18 Oct 2014 13:38:05 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IDc5NE047022; Sat, 18 Oct 2014 13:38:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410181338.s9IDc5NE047022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 18 Oct 2014 13:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273251 - in head/sys: arm/arm arm/include conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 13:38:06 -0000 Author: andrew Date: Sat Oct 18 13:38:04 2014 New Revision: 273251 URL: https://svnweb.freebsd.org/changeset/base/273251 Log: Add an elf not so kgdb detects the kernel as a FreeBSD elf file. The ELFNOTE macro is based on one from the FreeBSD/ARM Xen tree [1]. Obtained from: Julien Grall [1] Added: head/sys/arm/arm/elf_note.S (contents, props changed) Modified: head/sys/arm/include/asmacros.h head/sys/conf/files.arm Added: head/sys/arm/arm/elf_note.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/elf_note.S Sat Oct 18 13:38:04 2014 (r273251) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +/* An ELF note so GDB detects this as a FreeBSD elf file */ +ELFNOTE(.note.tag, 1, "FreeBSD", .long, __FreeBSD_version); + Modified: head/sys/arm/include/asmacros.h ============================================================================== --- head/sys/arm/include/asmacros.h Sat Oct 18 12:28:51 2014 (r273250) +++ head/sys/arm/include/asmacros.h Sat Oct 18 13:38:04 2014 (r273251) @@ -45,6 +45,18 @@ ldr tmp, [tmp, #PC_CURTHREAD] #endif +#define ELFNOTE(section, type, vendor, desctype, descdata...) \ + .pushsection section ; \ + .balign 4 ; \ + .long 2f - 1f /* namesz */ ; \ + .long 4f - 3f /* descsz */ ; \ + .long type /* type */ ; \ + 1: .asciz vendor /* vendor name */ ; \ + 2: .balign 4 ; \ + 3: desctype descdata /* node */ ; \ + 4: .balign 4 ; \ + .popsection + #endif /* LOCORE */ #endif /* _KERNEL */ Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sat Oct 18 12:28:51 2014 (r273250) +++ head/sys/conf/files.arm Sat Oct 18 13:38:04 2014 (r273251) @@ -18,6 +18,7 @@ arm/arm/devmap.c standard arm/arm/disassem.c optional ddb arm/arm/dump_machdep.c standard arm/arm/elf_machdep.c standard +arm/arm/elf_note.S standard arm/arm/exception.S standard arm/arm/fiq.c standard arm/arm/fiq_subr.S standard From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 15:11:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74C08F2E; Sat, 18 Oct 2014 15:11:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 610978E7; Sat, 18 Oct 2014 15:11:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IFBE7e093692; Sat, 18 Oct 2014 15:11:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IFBDpi093689; Sat, 18 Oct 2014 15:11:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410181511.s9IFBDpi093689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 18 Oct 2014 15:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273252 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 15:11:14 -0000 Author: hselasky Date: Sat Oct 18 15:11:13 2014 New Revision: 273252 URL: https://svnweb.freebsd.org/changeset/base/273252 Log: Add support for new USB 3G device. Submitted by: gabor@zahemszky.hu MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Sat Oct 18 13:38:04 2014 (r273251) +++ head/sys/dev/usb/serial/u3g.c Sat Oct 18 15:11:13 2014 (r273252) @@ -468,7 +468,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMMINC, SURFSTICK, 0), U3G_DEV(QUALCOMMINC, E2002, 0), U3G_DEV(QUALCOMMINC, E2003, 0), - U3G_DEV(QUALCOMMINC, K3772_Z, U3GINIT_SCSIEJECT), + U3G_DEV(QUALCOMMINC, K3772_Z, 0), + U3G_DEV(QUALCOMMINC, K3772_Z_INIT, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), U3G_DEV(QUALCOMMINC, MF633R, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sat Oct 18 13:38:04 2014 (r273251) +++ head/sys/dev/usb/usbdevs Sat Oct 18 15:11:13 2014 (r273252) @@ -3638,7 +3638,8 @@ product QUALCOMMINC E0078 0x0078 3G mode product QUALCOMMINC E0082 0x0082 3G modem product QUALCOMMINC E0086 0x0086 3G modem product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick -product QUALCOMMINC K3772_Z 0x1179 3G modem +product QUALCOMMINC K3772_Z_INIT 0x1179 K3772-Z Initial +product QUALCOMMINC K3772_Z 0x1181 K3772-Z product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 15:18:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE3411D6; Sat, 18 Oct 2014 15:18:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A03D39AD; Sat, 18 Oct 2014 15:18:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IFIVoo094602; Sat, 18 Oct 2014 15:18:31 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IFIVYM094601; Sat, 18 Oct 2014 15:18:31 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410181518.s9IFIVYM094601@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 18 Oct 2014 15:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273253 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 15:18:31 -0000 Author: melifaro Date: Sat Oct 18 15:18:31 2014 New Revision: 273253 URL: https://svnweb.freebsd.org/changeset/base/273253 Log: * Zero rule buffer. * Rename 'read' variable. Pointed by: luigi Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Sat Oct 18 15:11:13 2014 (r273252) +++ head/sbin/ipfw/ipfw2.c Sat Oct 18 15:18:31 2014 (r273253) @@ -2530,7 +2530,7 @@ ipfw_show_config(struct cmdline_opts *co int lac; char **lav; char *endptr; - size_t read; + size_t readsz; struct buf_pr bp; ipfw_obj_ctlv *ctlv, *tstate; ipfw_obj_tlv *rbase; @@ -2542,7 +2542,7 @@ ipfw_show_config(struct cmdline_opts *co rbase = NULL; dynbase = NULL; dynsz = 0; - read = sizeof(*cfg); + readsz = sizeof(*cfg); rcnt = 0; fo->set_mask = cfg->set_mask; @@ -2553,7 +2553,7 @@ ipfw_show_config(struct cmdline_opts *co /* We've requested static rules */ if (ctlv->head.type == IPFW_TLV_TBLNAME_LIST) { fo->tstate = ctlv; - read += ctlv->head.length; + readsz += ctlv->head.length; ctlv = (ipfw_obj_ctlv *)((caddr_t)ctlv + ctlv->head.length); } @@ -2561,15 +2561,15 @@ ipfw_show_config(struct cmdline_opts *co if (ctlv->head.type == IPFW_TLV_RULE_LIST) { rbase = (ipfw_obj_tlv *)(ctlv + 1); rcnt = ctlv->count; - read += ctlv->head.length; + readsz += ctlv->head.length; ctlv = (ipfw_obj_ctlv *)((caddr_t)ctlv + ctlv->head.length); } } - if ((cfg->flags & IPFW_CFG_GET_STATES) && (read != sz)) { + if ((cfg->flags & IPFW_CFG_GET_STATES) && (readsz != sz)) { /* We may have some dynamic states */ - dynsz = sz - read; + dynsz = sz - readsz; /* Skip empty header */ if (dynsz != sizeof(ipfw_obj_ctlv)) dynbase = (caddr_t)ctlv; @@ -4686,6 +4686,7 @@ ipfw_add(char *av[]) ipfw_obj_ctlv *ctlv, *tstate; rbufsize = sizeof(rulebuf); + memset(rulebuf, 0, rbufsize); memset(&ts, 0, sizeof(ts)); /* Optimize case with no tables */ From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 16:34:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F8CAFBB; Sat, 18 Oct 2014 16:34:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BB51FFF; Sat, 18 Oct 2014 16:34:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IGYrc5032015; Sat, 18 Oct 2014 16:34:53 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IGYrEU032014; Sat, 18 Oct 2014 16:34:53 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201410181634.s9IGYrEU032014@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 18 Oct 2014 16:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273256 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 16:34:53 -0000 Author: rpaulo Date: Sat Oct 18 16:34:52 2014 New Revision: 273256 URL: https://svnweb.freebsd.org/changeset/base/273256 Log: AM335X FDT: use the oma3-wdt string for compatibility with Linux. Submitted by: andrew MFC after: 1 week Modified: head/sys/boot/fdt/dts/arm/am335x.dtsi Modified: head/sys/boot/fdt/dts/arm/am335x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/am335x.dtsi Sat Oct 18 15:31:53 2014 (r273255) +++ head/sys/boot/fdt/dts/arm/am335x.dtsi Sat Oct 18 16:34:52 2014 (r273256) @@ -83,7 +83,7 @@ }; wdt1@44E35000 { - compatible = "ti,wdt"; + compatible = "ti,omap3-wdt"; reg = <0x44E35000 0x1000>; interrupts = <91>; interrupt-parent = <&AINTC>; From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 16:59:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB07F4D5; Sat, 18 Oct 2014 16:59:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C1E6243; Sat, 18 Oct 2014 16:59:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IGxNSr042080; Sat, 18 Oct 2014 16:59:23 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IGxMNR042071; Sat, 18 Oct 2014 16:59:22 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201410181659.s9IGxMNR042071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 18 Oct 2014 16:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273257 - in head/sys/arm: conf ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 16:59:23 -0000 Author: rpaulo Date: Sat Oct 18 16:59:21 2014 New Revision: 273257 URL: https://svnweb.freebsd.org/changeset/base/273257 Log: Add a driver for the TI watchdog. The TI watchdog timer is present on BeagleBone's. Since 2014, U-Boot has been booting the BeagleBone with the watchdog enabled. We need to disable it on boot to avoid a spurious reset. The timer isn't exactly precise, but it will do as a watchdog. This is also a reflection of the watchdog(9) API. In the future, we could handle interrupts, but the watchdog(9) API needs to be a bit smarter before that can happen. Differential Revision: https://reviews.freebsd.org/D965 Reviewed by: andrew MFC after: 1 week Relnotes: yes Added: head/sys/arm/ti/ti_wdt.c (contents, props changed) head/sys/arm/ti/ti_wdt.h (contents, props changed) Modified: head/sys/arm/conf/BEAGLEBONE head/sys/arm/ti/files.ti Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sat Oct 18 16:34:52 2014 (r273256) +++ head/sys/arm/conf/BEAGLEBONE Sat Oct 18 16:59:21 2014 (r273257) @@ -108,6 +108,12 @@ device gpioled # ADC support device ti_adc +# Watchdog support +# If we don't enable the watchdog driver, the system could potentially +# reboot automatically because the boot loader might have enabled the +# watchdog. +device ti_wdt + # USB support device usb options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Sat Oct 18 16:34:52 2014 (r273256) +++ head/sys/arm/ti/files.ti Sat Oct 18 16:59:21 2014 (r273257) @@ -19,6 +19,8 @@ dev/mbox/mbox_if.m standard arm/ti/ti_mbox.c standard arm/ti/ti_pruss.c standard +arm/ti/ti_wdt.c optional ti_wdt + arm/ti/ti_adc.c optional ti_adc arm/ti/ti_gpio.c optional gpio arm/ti/ti_i2c.c optional ti_i2c Added: head/sys/arm/ti/ti_wdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/ti_wdt.c Sat Oct 18 16:59:21 2014 (r273257) @@ -0,0 +1,275 @@ +/*- + * Copyright (c) 2014 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#ifdef DEBUG +#define DPRINTF(fmt, ...) do { \ + printf("%s: ", __func__); \ + printf(fmt, __VA_ARGS__); \ +} while (0) +#else +#define DPRINTF(fmt, ...) +#endif + +static device_probe_t ti_wdt_probe; +static device_attach_t ti_wdt_attach; +static device_detach_t ti_wdt_detach; +static void ti_wdt_intr(void *); +static void ti_wdt_event(void *, unsigned int, int *); + +struct ti_wdt_softc { + struct mtx sc_mtx; + struct resource *sc_mem_res; + struct resource *sc_irq_res; + void *sc_intr; + bus_space_tag_t sc_bt; + bus_space_handle_t sc_bh; + eventhandler_tag sc_ev_tag; +}; + +static device_method_t ti_wdt_methods[] = { + DEVMETHOD(device_probe, ti_wdt_probe), + DEVMETHOD(device_attach, ti_wdt_attach), + DEVMETHOD(device_detach, ti_wdt_detach), + + DEVMETHOD_END +}; + +static driver_t ti_wdt_driver = { + "ti_wdt", + ti_wdt_methods, + sizeof(struct ti_wdt_softc) +}; + +static devclass_t ti_wdt_devclass; + +DRIVER_MODULE(ti_wdt, simplebus, ti_wdt_driver, ti_wdt_devclass, 0, 0); + +static volatile __inline uint32_t +ti_wdt_reg_read(struct ti_wdt_softc *sc, uint32_t reg) +{ + return (bus_space_read_4(sc->sc_bt, sc->sc_bh, reg)); +} + +static __inline void +ti_wdt_reg_write(struct ti_wdt_softc *sc, uint32_t reg, uint32_t val) +{ + bus_space_write_4(sc->sc_bt, sc->sc_bh, reg, val); +} + +/* + * Wait for the write to a specific synchronised register to complete. + */ +static __inline void +ti_wdt_reg_wait(struct ti_wdt_softc *sc, uint32_t bit) +{ + while (ti_wdt_reg_read(sc, TI_WDT_WWPS) & bit) + DELAY(10); + +} + +static __inline void +ti_wdt_disable(struct ti_wdt_softc *sc) +{ + DPRINTF("disabling watchdog %p\n", sc); + ti_wdt_reg_write(sc, TI_WDT_WSPR, 0xAAAA); + ti_wdt_reg_wait(sc, TI_W_PEND_WSPR); + ti_wdt_reg_write(sc, TI_WDT_WSPR, 0x5555); + ti_wdt_reg_wait(sc, TI_W_PEND_WSPR); +} + +static __inline void +ti_wdt_enable(struct ti_wdt_softc *sc) +{ + DPRINTF("enabling watchdog %p\n", sc); + ti_wdt_reg_write(sc, TI_WDT_WSPR, 0xBBBB); + ti_wdt_reg_wait(sc, TI_W_PEND_WSPR); + ti_wdt_reg_write(sc, TI_WDT_WSPR, 0x4444); + ti_wdt_reg_wait(sc, TI_W_PEND_WSPR); +} + +static int +ti_wdt_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "ti,omap3-wdt")) { + device_set_desc(dev, "TI Watchdog Timer"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +ti_wdt_attach(device_t dev) +{ + struct ti_wdt_softc *sc; + int rid; + + sc = device_get_softc(dev); + rid = 0; + mtx_init(&sc->sc_mtx, "TI WDT", NULL, MTX_DEF); + sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->sc_mem_res == NULL) { + device_printf(dev, "could not allocate memory resource\n"); + return (ENXIO); + } + sc->sc_bt = rman_get_bustag(sc->sc_mem_res); + sc->sc_bh = rman_get_bushandle(sc->sc_mem_res); + sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); + if (sc->sc_irq_res == NULL) { + device_printf(dev, "could not allocate interrupt resource\n"); + ti_wdt_detach(dev); + return (ENXIO); + } + if (bus_setup_intr(dev, sc->sc_irq_res, INTR_MPSAFE | INTR_TYPE_MISC, + NULL, ti_wdt_intr, sc, &sc->sc_intr) != 0) { + device_printf(dev, + "unable to setup the interrupt handler\n"); + ti_wdt_detach(dev); + return (ENXIO); + } + /* Reset, enable interrupts and stop the watchdog. */ + ti_wdt_reg_write(sc, TI_WDT_WDSC, + ti_wdt_reg_read(sc, TI_WDT_WDSC) | TI_WDSC_SR); + while (ti_wdt_reg_read(sc, TI_WDT_WDSC) & TI_WDSC_SR) + DELAY(10); + ti_wdt_reg_write(sc, TI_WDT_WIRQENSET, TI_IRQ_EN_OVF | TI_IRQ_EN_DLY); + ti_wdt_disable(sc); + if (bootverbose) + device_printf(dev, "revision: 0x%x\n", + ti_wdt_reg_read(sc, TI_WDT_WIDR)); + sc->sc_ev_tag = EVENTHANDLER_REGISTER(watchdog_list, ti_wdt_event, sc, + 0); + + return (0); +} + +static int +ti_wdt_detach(device_t dev) +{ + struct ti_wdt_softc *sc; + + sc = device_get_softc(dev); + if (sc->sc_ev_tag) + EVENTHANDLER_DEREGISTER(watchdog_list, sc->sc_ev_tag); + if (sc->sc_intr) + bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intr); + if (sc->sc_irq_res) + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(sc->sc_irq_res), sc->sc_irq_res); + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->sc_mem_res), sc->sc_mem_res); + + return (0); +} + +static void +ti_wdt_intr(void *arg) +{ + struct ti_wdt_softc *sc; + + sc = arg; + DPRINTF("interrupt %p", sc); + ti_wdt_reg_write(sc, TI_WDT_WIRQSTAT, TI_IRQ_EV_OVF | TI_IRQ_EV_DLY); + /* TODO: handle interrupt */ +} + +static void +ti_wdt_event(void *arg, unsigned int cmd, int *error) +{ + struct ti_wdt_softc *sc; + uint8_t s; + uint32_t wldr; + uint32_t ptv; + + sc = arg; + ti_wdt_disable(sc); + if (cmd == WD_TO_NEVER) { + *error = 0; + return; + } + DPRINTF("cmd 0x%x\n", cmd); + cmd &= WD_INTERVAL; + if (cmd < WD_TO_1SEC) { + *error = EINVAL; + return; + } + s = 1 << (cmd - WD_TO_1SEC); + DPRINTF("seconds %u\n", s); + /* + * Leave the pre-scaler with its default values: + * PTV = 0 == 2**0 == 1 + * PRE = 1 (enabled) + * + * Compute the load register value assuming a 32kHz clock. + * See OVF_Rate in the WDT section of the AM335x TRM. + */ + ptv = 0; + wldr = 0xffffffff - (s * (32768 / (1 << ptv))) + 1; + DPRINTF("wldr 0x%x\n", wldr); + ti_wdt_reg_write(sc, TI_WDT_WLDR, wldr); + /* + * Trigger a timer reload. + */ + ti_wdt_reg_write(sc, TI_WDT_WTGR, + ti_wdt_reg_read(sc, TI_WDT_WTGR) + 1); + ti_wdt_reg_wait(sc, TI_W_PEND_WTGR); + ti_wdt_enable(sc); + *error = 0; +} Added: head/sys/arm/ti/ti_wdt.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/ti_wdt.h Sat Oct 18 16:59:21 2014 (r273257) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2014 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ +#ifndef _TI_WDT_H_ +#define _TI_WDT_H_ + +/* TI WDT registers */ +#define TI_WDT_WIDR 0x00 /* Watchdog Identification Register */ +#define TI_WDT_WDSC 0x10 /* Watchdog System Control Register */ +#define TI_WDT_WDST 0x14 /* Watchdog Status Register */ +#define TI_WDT_WISR 0x18 /* Watchdog Interrupt Status Register */ +#define TI_WDT_WIER 0x1c /* Watchdog Interrupt Enable Register */ +#define TI_WDT_WCLR 0x24 /* Watchdog Control Register */ +#define TI_WDT_WCRR 0x28 /* Watchdog Counter Register */ +#define TI_WDT_WLDR 0x2c /* Watchdog Load Register */ +#define TI_WDT_WTGR 0x30 /* Watchdog Trigger Register */ +#define TI_WDT_WWPS 0x34 /* Watchdog Write Posting Register */ +#define TI_WDT_WDLY 0x44 /* Watchdog Delay Configuration Reg */ +#define TI_WDT_WSPR 0x48 /* Watchdog Start/Stop Register */ +#define TI_WDT_WIRQSTATRAW 0x54 /* Watchdog Raw Interrupt Status Reg. */ +#define TI_WDT_WIRQSTAT 0x58 /* Watchdog Int. Status Register */ +#define TI_WDT_WIRQENSET 0x5c /* Watchdog Int. Enable Set Register */ +#define TI_WDT_WIRQENCLR 0x60 /* Watchdog Int. Enable Clear Reg. */ + +/* WDT_WDSC Register */ +#define TI_WDSC_SR (1 << 1) /* Soft reset */ + +/* + * WDT_WWPS Register + * + * Writes to some registers require synchronisation with a different clock + * domain. The WDT_WWPS register is the place where this synchronisation + * happens. + */ +#define TI_W_PEND_WCLR (1 << 0) +#define TI_W_PEND_WCRR (1 << 1) +#define TI_W_PEND_WLDR (1 << 2) +#define TI_W_PEND_WTGR (1 << 3) +#define TI_W_PEND_WSPR (1 << 4) +#define TI_W_PEND_WDLY (1 << 5) + +/* WDT_WIRQENSET Register */ +#define TI_IRQ_EN_OVF (1 << 0) /* Overflow interrupt */ +#define TI_IRQ_EN_DLY (1 << 1) /* Delay interrupt */ + +/* WDT_WIRQSTAT Register */ +#define TI_IRQ_EV_OVF (1 << 0) /* Overflow event */ +#define TI_IRQ_EV_DLY (1 << 1) /* Delay event */ + +#endif /* _TI_WDT_H_ */ From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 17:00:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50031628; Sat, 18 Oct 2014 17:00:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C2D5259; Sat, 18 Oct 2014 17:00:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IH0uMo043605; Sat, 18 Oct 2014 17:00:56 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IH0tOw043602; Sat, 18 Oct 2014 17:00:55 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201410181700.s9IH0tOw043602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 18 Oct 2014 17:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273258 - in head/sys/arm: conf ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 17:00:56 -0000 Author: rpaulo Date: Sat Oct 18 17:00:55 2014 New Revision: 273258 URL: https://svnweb.freebsd.org/changeset/base/273258 Log: Make the ti_mbox and ti_pruss drivers optional. MFC after: 1 week Modified: head/sys/arm/conf/BEAGLEBONE head/sys/arm/ti/files.ti Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sat Oct 18 16:59:21 2014 (r273257) +++ head/sys/arm/conf/BEAGLEBONE Sat Oct 18 17:00:55 2014 (r273258) @@ -114,6 +114,12 @@ device ti_adc # watchdog. device ti_wdt +# TI Programmable Realtime Unit support +device ti_pruss + +# Mailbox support +device ti_mbox + # USB support device usb options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Sat Oct 18 16:59:21 2014 (r273257) +++ head/sys/arm/ti/files.ti Sat Oct 18 17:00:55 2014 (r273258) @@ -15,12 +15,10 @@ arm/ti/ti_cpuid.c standard arm/ti/ti_machdep.c standard arm/ti/ti_prcm.c standard arm/ti/ti_scm.c standard -dev/mbox/mbox_if.m standard -arm/ti/ti_mbox.c standard -arm/ti/ti_pruss.c standard - +dev/mbox/mbox_if.m optional ti_mbox +arm/ti/ti_mbox.c optional ti_mbox +arm/ti/ti_pruss.c optional ti_pruss arm/ti/ti_wdt.c optional ti_wdt - arm/ti/ti_adc.c optional ti_adc arm/ti/ti_gpio.c optional gpio arm/ti/ti_i2c.c optional ti_i2c From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 17:11:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AE7A8CF; Sat, 18 Oct 2014 17:11:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1938359; Sat, 18 Oct 2014 17:11:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IHB2DN048622; Sat, 18 Oct 2014 17:11:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IHB2FF048621; Sat, 18 Oct 2014 17:11:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410181711.s9IHB2FF048621@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 18 Oct 2014 17:11:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273259 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 17:11:03 -0000 Author: mav Date: Sat Oct 18 17:11:02 2014 New Revision: 273259 URL: https://svnweb.freebsd.org/changeset/base/273259 Log: Make VPD 80h (Serial Number) transfer length match serial number length. MFC after: 1 week Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Oct 18 17:00:55 2014 (r273258) +++ head/sys/cam/ctl/ctl.c Sat Oct 18 17:11:02 2014 (r273259) @@ -9705,17 +9705,17 @@ ctl_inquiry_evpd_serial(struct ctl_scsii { struct scsi_vpd_unit_serial_number *sn_ptr; struct ctl_lun *lun; + int data_len; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - ctsio->kern_data_ptr = malloc(sizeof(*sn_ptr), M_CTL, M_WAITOK | M_ZERO); + data_len = 4 + CTL_SN_LEN; + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); sn_ptr = (struct scsi_vpd_unit_serial_number *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (sizeof(*sn_ptr) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*sn_ptr); - ctsio->kern_data_len = sizeof(*sn_ptr); - ctsio->kern_total_len = sizeof(*sn_ptr); + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; } else { ctsio->residual = 0; ctsio->kern_data_len = alloc_len; @@ -9737,16 +9737,16 @@ ctl_inquiry_evpd_serial(struct ctl_scsii sn_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; sn_ptr->page_code = SVPD_UNIT_SERIAL_NUMBER; - sn_ptr->length = ctl_min(sizeof(*sn_ptr) - 4, CTL_SN_LEN); + sn_ptr->length = CTL_SN_LEN; /* * If we don't have a LUN, we just leave the serial number as * all spaces. */ - memset(sn_ptr->serial_num, 0x20, sizeof(sn_ptr->serial_num)); if (lun != NULL) { strncpy((char *)sn_ptr->serial_num, (char *)lun->be_lun->serial_num, CTL_SN_LEN); - } + } else + memset(sn_ptr->serial_num, 0x20, CTL_SN_LEN); ctsio->scsi_status = SCSI_STATUS_OK; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 17:23:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06ABDC5B; Sat, 18 Oct 2014 17:23:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6AB86C1; Sat, 18 Oct 2014 17:23:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IHNgoK055976; Sat, 18 Oct 2014 17:23:42 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IHNg1A055974; Sat, 18 Oct 2014 17:23:42 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410181723.s9IHNg1A055974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 18 Oct 2014 17:23:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273260 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 17:23:43 -0000 Author: melifaro Date: Sat Oct 18 17:23:41 2014 New Revision: 273260 URL: https://svnweb.freebsd.org/changeset/base/273260 Log: Use IPFW_RULE_CNTR_SIZE macro instead of non-relevant ip_fw_cntr structure. Found by: luigi Modified: head/sys/netpfil/ipfw/ip_fw_private.h head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Sat Oct 18 17:11:02 2014 (r273259) +++ head/sys/netpfil/ipfw/ip_fw_private.h Sat Oct 18 17:23:41 2014 (r273260) @@ -226,12 +226,6 @@ VNET_DECLARE(unsigned int, fw_tables_set struct tables_config; #ifdef _KERNEL -typedef struct ip_fw_cntr { - uint64_t pcnt; /* Packet counter */ - uint64_t bcnt; /* Byte counter */ - uint64_t timestamp; /* tv_sec of last match */ -} ip_fw_cntr; - /* * Here we have the structure representing an ipfw rule. * @@ -261,6 +255,8 @@ struct ip_fw { ipfw_insn cmd[1]; /* storage for commands */ }; +#define IPFW_RULE_CNTR_SIZE (2 * sizeof(counter_u64_t)) + #endif struct ip_fw_chain { Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Sat Oct 18 17:11:02 2014 (r273259) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Sat Oct 18 17:23:41 2014 (r273260) @@ -162,7 +162,7 @@ ipfw_init_counters() { V_ipfw_cntr_zone = uma_zcreate("IPFW counters", - sizeof(ip_fw_cntr), NULL, NULL, NULL, NULL, + IPFW_RULE_CNTR_SIZE, NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); } From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 17:36:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24F1CF30; Sat, 18 Oct 2014 17:36:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 118FF7FB; Sat, 18 Oct 2014 17:36:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IHavph060994; Sat, 18 Oct 2014 17:36:57 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IHavh6060993; Sat, 18 Oct 2014 17:36:57 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201410181736.s9IHavh6060993@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 18 Oct 2014 17:36:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273261 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 17:36:58 -0000 Author: rpaulo Date: Sat Oct 18 17:36:57 2014 New Revision: 273261 URL: https://svnweb.freebsd.org/changeset/base/273261 Log: Remove an unused mutex. MFC after: 1 week Modified: head/sys/arm/ti/ti_wdt.c Modified: head/sys/arm/ti/ti_wdt.c ============================================================================== --- head/sys/arm/ti/ti_wdt.c Sat Oct 18 17:23:41 2014 (r273260) +++ head/sys/arm/ti/ti_wdt.c Sat Oct 18 17:36:57 2014 (r273261) @@ -69,7 +69,6 @@ static void ti_wdt_intr(void *); static void ti_wdt_event(void *, unsigned int, int *); struct ti_wdt_softc { - struct mtx sc_mtx; struct resource *sc_mem_res; struct resource *sc_irq_res; void *sc_intr; @@ -161,7 +160,6 @@ ti_wdt_attach(device_t dev) sc = device_get_softc(dev); rid = 0; - mtx_init(&sc->sc_mtx, "TI WDT", NULL, MTX_DEF); sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->sc_mem_res == NULL) { From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 17:51:37 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0920669; Sat, 18 Oct 2014 17:51:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA1BD981; Sat, 18 Oct 2014 17:51:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IHpag5070161; Sat, 18 Oct 2014 17:51:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IHpZr0070148; Sat, 18 Oct 2014 17:51:35 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410181751.s9IHpZr0070148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 18 Oct 2014 17:51:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273262 - in head/sys/arm/ti: . am335x omap4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 17:51:37 -0000 Author: andrew Date: Sat Oct 18 17:51:34 2014 New Revision: 273262 URL: https://svnweb.freebsd.org/changeset/base/273262 Log: Rework the Ti GPIO code to allow for both the OMAP4 and AM335X attachments to be present. Thsi creates a new per-SoC driver that handles probe and setting/getting the gpio flags. Differential Revision: https://reviews.freebsd.org/D943 Reviewed by: loos, rpaulo MFC after: 1 week Added: head/sys/arm/ti/am335x/am335x_gpio.c - copied, changed from r273259, head/sys/arm/ti/am335x/am335x_scm_padconf.c head/sys/arm/ti/am335x/am335x_scm_padconf.h - copied, changed from r273259, head/sys/arm/ti/am335x/am335x_scm_padconf.c head/sys/arm/ti/omap4/omap4_gpio.c - copied, changed from r273259, head/sys/arm/ti/omap4/omap4_scm_padconf.c head/sys/arm/ti/omap4/omap4_scm_padconf.h - copied, changed from r273259, head/sys/arm/ti/omap4/omap4_scm_padconf.c head/sys/arm/ti/ti_gpio.h - copied, changed from r273259, head/sys/arm/ti/ti_gpio.c head/sys/arm/ti/ti_gpio_if.m (contents, props changed) Modified: head/sys/arm/ti/am335x/am335x_scm_padconf.c head/sys/arm/ti/am335x/files.am335x head/sys/arm/ti/files.ti head/sys/arm/ti/omap4/files.omap4 head/sys/arm/ti/omap4/omap4_scm_padconf.c head/sys/arm/ti/ti_gpio.c head/sys/arm/ti/ti_scm.h Copied and modified: head/sys/arm/ti/am335x/am335x_gpio.c (from r273259, head/sys/arm/ti/am335x/am335x_scm_padconf.c) ============================================================================== --- head/sys/arm/ti/am335x/am335x_scm_padconf.c Sat Oct 18 17:11:02 2014 (r273259, copy source) +++ head/sys/arm/ti/am335x/am335x_gpio.c Sat Oct 18 17:51:34 2014 (r273262) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2012 Damjan Marion + * Copyright (c) 2014 Andrew Turner * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,276 +45,45 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include +#include +#include + +#include +#include #include -#define _PIN(r, b, gp, gm, m0, m1, m2, m3, m4, m5, m6, m7) \ - { .reg_off = r, \ - .gpio_pin = gp, \ - .gpio_mode = gm, \ - .ballname = b, \ - .muxmodes[0] = m0, \ - .muxmodes[1] = m1, \ - .muxmodes[2] = m2, \ - .muxmodes[3] = m3, \ - .muxmodes[4] = m4, \ - .muxmodes[5] = m5, \ - .muxmodes[6] = m6, \ - .muxmodes[7] = m7, \ - } +#include -#define SLEWCTRL (0x01 << 6) /* faster(0) or slower(1) slew rate. */ -#define RXACTIVE (0x01 << 5) /* Input enable value for the Pad */ -#define PULLTYPESEL (0x01 << 4) /* Pad pullup/pulldown type selection */ -#define PULLUDEN (0x01 << 3) /* Pullup/pulldown disabled */ - -#define PADCONF_OUTPUT (0) -#define PADCONF_OUTPUT_PULLUP (PULLTYPESEL) -#define PADCONF_INPUT (RXACTIVE | PULLUDEN) -#define PADCONF_INPUT_PULLUP (RXACTIVE | PULLTYPESEL) -#define PADCONF_INPUT_PULLDOWN (RXACTIVE) -#define PADCONF_INPUT_PULLUP_SLOW (PADCONF_INPUT_PULLUP | SLEWCTRL) - -const static struct ti_scm_padstate ti_padstate_devmap[] = { - {"output", PADCONF_OUTPUT }, - {"output_pullup", PADCONF_OUTPUT_PULLUP }, - {"input", PADCONF_INPUT }, - {"input_pulldown", PADCONF_INPUT_PULLDOWN }, - {"input_pullup", PADCONF_INPUT_PULLUP }, - {"i2c", PADCONF_INPUT_PULLUP_SLOW }, - { .state = NULL } -}; +#include "ti_gpio_if.h" -const static struct ti_scm_padconf ti_padconf_devmap[] = { - _PIN(0x800, "GPMC_AD0", 32, 7,"gpmc_ad0", "mmc1_dat0", NULL, NULL, NULL, NULL, NULL, "gpio1_0"), - _PIN(0x804, "GPMC_AD1", 33, 7,"gpmc_ad1", "mmc1_dat1", NULL, NULL, NULL, NULL, NULL, "gpio1_1"), - _PIN(0x808, "GPMC_AD2", 34, 7,"gpmc_ad2", "mmc1_dat2", NULL, NULL, NULL, NULL, NULL, "gpio1_2"), - _PIN(0x80C, "GPMC_AD3", 35, 7,"gpmc_ad3", "mmc1_dat3", NULL, NULL, NULL, NULL, NULL, "gpio1_3"), - _PIN(0x810, "GPMC_AD4", 36, 7,"gpmc_ad4", "mmc1_dat4", NULL, NULL, NULL, NULL, NULL, "gpio1_4"), - _PIN(0x814, "GPMC_AD5", 37, 7,"gpmc_ad5", "mmc1_dat5", NULL, NULL, NULL, NULL, NULL, "gpio1_5"), - _PIN(0x818, "GPMC_AD6", 38, 7,"gpmc_ad6", "mmc1_dat6", NULL, NULL, NULL, NULL, NULL, "gpio1_6"), - _PIN(0x81C, "GPMC_AD7", 39, 7,"gpmc_ad7", "mmc1_dat7", NULL, NULL, NULL, NULL, NULL, "gpio1_7"), - _PIN(0x820, "GPMC_AD8", 22, 7, "gpmc_ad8", "lcd_data23", "mmc1_dat0", "mmc2_dat4", "ehrpwm2A", NULL, NULL, "gpio0_22"), - _PIN(0x824, "GPMC_AD9", 23, 7, "gpmc_ad9", "lcd_data22", "mmc1_dat1", "mmc2_dat5", "ehrpwm2B", NULL, NULL, "gpio0_23"), - _PIN(0x828, "GPMC_AD10", 26, 7, "gpmc_ad10", "lcd_data21", "mmc1_dat2", "mmc2_dat6", "ehrpwm2_tripzone_in", NULL, NULL, "gpio0_26"), - _PIN(0x82C, "GPMC_AD11", 27, 7, "gpmc_ad11", "lcd_data20", "mmc1_dat3", "mmc2_dat7", "ehrpwm0_synco", NULL, NULL, "gpio0_27"), - _PIN(0x830, "GPMC_AD12", 44, 7, "gpmc_ad12", "lcd_data19", "mmc1_dat4", "mmc2_dat0", "eQEP2A_in", "pr1_mii0_txd2", "pr1_pru0_pru_r30_14", "gpio1_12"), - _PIN(0x834, "GPMC_AD13", 45, 7, "gpmc_ad13", "lcd_data18", "mmc1_dat5", "mmc2_dat1", "eQEP2B_in", "pr1_mii0_txd1", "pr1_pru0_pru_r30_15", "gpio1_13"), - _PIN(0x838, "GPMC_AD14", 46, 7, "gpmc_ad14", "lcd_data17", "mmc1_dat6", "mmc2_dat2", "eQEP2_index", "pr1_mii0_txd0", "pr1_pru0_pru_r31_14", "gpio1_14"), - _PIN(0x83C, "GPMC_AD15", 47, 7, "gpmc_ad15", "lcd_data16", "mmc1_dat7", "mmc2_dat3", "eQEP2_strobe", "pr1_ecap0_ecap_capin_apwm_o", "pr1_pru0_pru_r31_15", "gpio1_15"), - _PIN(0x840, "GPMC_A0", 48, 7, "gpmc_a0", "gmii2_txen", "rgmii2_tctl", "rmii2_txen", "gpmc_a16", "pr1_mii_mt1_clk", "ehrpwm1_tripzone_input", "gpio1_16"), - _PIN(0x844, "GPMC_A1", 49, 7, "gpmc_a1", "gmii2_rxdv", "rgmii2_rctl", "mmc2_dat0", "gpmc_a17", "pr1_mii1_txd3", "ehrpwm0_synco", "gpio1_17"), - _PIN(0x848, "GPMC_A2", 50, 7, "gpmc_a2", "gmii2_txd3", "rgmii2_td3", "mmc2_dat1", "gpmc_a18", "pr1_mii1_txd2", "ehrpwm1A", "gpio1_18"), - _PIN(0x84C, "GPMC_A3", 51, 7, "gpmc_a3", "gmii2_txd2", "rgmii2_td2", "mmc2_dat2", "gpmc_a19", "pr1_mii1_txd1", "ehrpwm1B", "gpio1_19"), - _PIN(0x850, "GPMC_A4", 52, 7, "gpmc_a4", "gmii2_txd1", "rgmii2_td1", "rmii2_tdx1", "gpmc_a20", "pr1_mii1_txd0", "eQEP1A_in", "gpio1_20"), - _PIN(0x854, "GPMC_A5", 53, 7, "gpmc_a5", "gmii2_txd0", "rgmii2_td0", "rmii2_txd0", "gpmc_a21", "pr1_mii1_rxd3", "eQEP1B_in", "gpio1_21"), - _PIN(0x858, "GPMC_A6", 54, 7, "gpmc_a6", "gmii2_txclk", "rgmii2_tclk", "mmc2_dat4", "gpmc_a22", "pr1_mii1_rxd2", "eQEP1_index", "gpio1_22"), - _PIN(0x85C, "GPMC_A7", 55, 7, "gpmc_a7", "gmii2_rxclk", "rgmii2_rclk", "mmc2_dat5", "gpmc_a23", "pr1_mii1_rxd1", "eQEP1_strobe", "gpio1_23"), - _PIN(0x860, "GPMC_A8", 56, 7, "gpmc_a8", "gmii2_rxd3", "rgmii2_rd3", "mmc2_dat6", "gpmc_a24", "pr1_mii1_rxd0", "mcasp0_aclkx", "gpio1_24"), - _PIN(0x864, "GPMC_A9", 57, 7, "gmpc_a9", "gmii2_rxd2", "rgmii2_rd2", "mmc2_dat7 / rmii2_crs_dv", "gpmc_a25", "pr1_mii_mr1_clk", "mcasp0_fsx", "gpio1_25"), - _PIN(0x868, "GPMC_A10", 58, 7, "gmpc_a10", "gmii2_rxd1", "rgmii2_rd1", "rmii2_rxd1", "gpmc_a26", "pr1_mii1_rxdv", "mcasp0_arx0", "gpio1_26"), - _PIN(0x86C, "GPMC_A11", 59, 7, "gmpc_a11", "gmii2_rxd0", "rgmii2_rd0", "rmii2_rxd0", "gpmc_a27", "pr1_mii1_rxer", "mcasp0_axr1", "gpio1_27"), - _PIN(0x870, "GPMC_WAIT0", 30, 7, "gpmc_wait0", "gmii2_crs", "gpmc_csn4", "rmii2_crs_dv", "mmc1_sdcd", "pr1_mii1_col", "uart4_rxd", "gpio0_30"), - _PIN(0x874, "GPMC_WPn", 31, 7, "gpmc_wpn", "gmii2_rxerr", "gpmc_csn5", "rmii2_rxerr", "mmc2_sdcd", "pr1_mii1_txen", "uart4_txd", "gpio0_31"), - _PIN(0x878, "GPMC_BEn1", 60, 7, "gpmc_be1n", "gmii2_col", "gmpc_csn6","mmc2_dat3", "gpmc_dir", "pr1_mii1_rxlink", "mcasp0_aclkr", "gpio1_28"), - _PIN(0x87c, "GPMC_CSn0", 61, 7, "gpmc_csn0", NULL, NULL, NULL, NULL, NULL, NULL, "gpio1_29"), - _PIN(0x880, "GPMC_CSn1", 62, 7, "gpmc_csn1", "gpmc_clk", "mmc1_clk", "pr1_edio_data_in6", "pr1_edio_data_out6", "pr1_pru1_pru_r30_12", "pr1_pru1_pru_r31_12", "gpio1_30"), - _PIN(0x884, "GPMC_CSn2", 63, 7, "gpmc_csn2", "gpmc_be1n", "mmc1_cmd", "pr1_edio_data_in7", "pr1_edio_data_out7", "pr1_pru1_pru_r30_13", "pr1_pru1_pru_r31_13", "gpio1_31"), - _PIN(0x888, "GPMC_CSn3", 64, 7, "gpmc_csn3", "gpmc_a3", "rmii2_crs_dv", "mmc2_cmd", "pr1_mii0_crs", "pr1_mdio_data", "EMU4", "gpio2_0"), - _PIN(0x88c, "GPMC_CLK", 65, 7, "gpmc_clk", "lcd_memory_clk", "gpmc_wait1", "mmc2_clk", "pr1_mii1_crs", "pr1_mdio_mdclk", "mcasp0_fsr", "gpio2_1"), - _PIN(0x890, "GPMC_ADVn_ALE", 66, 7, "gpmc_advn_ale", NULL, "timer4", NULL, NULL, NULL, NULL, "gpio2_2"), - _PIN(0x894, "GPMC_OEn_REn", 67, 7, "gpmc_oen_ren", NULL, "timer7", NULL, NULL, NULL, NULL, "gpio2_3"), - _PIN(0x898, "GPMC_WEn", 68, 7, "gpmc_wen", NULL, "timer6", NULL, NULL, NULL, NULL, "gpio2_4"), - _PIN(0x89c, "GPMC_BEn0_CLE", 67, 7, "gpmc_ben0_cle", NULL, "timer5", NULL, NULL, NULL, NULL, "gpio2_5"), - _PIN(0x8a0, "LCD_DATA0", 68, 7, "lcd_data0", "gpmc_a0", "pr1_mii_mt0_clk", "ehrpwm2A", NULL, "pr1_pru1_pru_r30_0", "pr1_pru1_pru_r31_0", "gpio2_6"), - _PIN(0x8a4, "LCD_DATA1", 69, 7, "lcd_data1", "gpmc_a1", "pr1_mii0_txen", "ehrpwm2B", NULL, "pr1_pru1_pru_r30_1", "pr1_pru1_pru_r31_1", "gpio2_7"), - _PIN(0x8a8, "LCD_DATA2", 70, 7, "lcd_data2", "gpmc_a2", "pr1_mii0_txd3", "ehrpwm2_tripzone_input", NULL, "pr1_pru1_pru_r30_2", "pr1_pru1_pru_r31_2", "gpio2_8"), - _PIN(0x8ac, "LCD_DATA3", 71, 7, "lcd_data3", "gpmc_a3", "pr1_mii0_txd2", "ehrpwm0_synco", NULL, "pr1_pru1_pru_r30_3", "pr1_pru1_pru_r31_3", "gpio2_9"), - _PIN(0x8b0, "LCD_DATA4", 72, 7, "lcd_data4", "gpmc_a4", "pr1_mii0_txd1", "eQEP2A_in", NULL, "pr1_pru1_pru_r30_4", "pr1_pru1_pru_r31_4", "gpio2_10"), - _PIN(0x8b4, "LCD_DATA5", 73, 7, "lcd_data5", "gpmc_a5", "pr1_mii0_txd0", "eQEP2B_in", NULL, "pr1_pru1_pru_r30_5", "pr1_pru1_pru_r31_5", "gpio2_11"), - _PIN(0x8b8, "LCD_DATA6", 74, 7, "lcd_data6", "gpmc_a6", "pr1_edio_data_in6", "eQEP2_index", "pr1_edio_data_out6", "pr1_pru1_pru_r30_6", "pr1_pru1_pru_r31_6", "gpio2_12"), - _PIN(0x8bc, "LCD_DATA7", 75, 7, "lcd_data7", "gpmc_a7", "pr1_edio_data_in7", "eQEP2_strobe", "pr1_edio_data_out7", "pr1_pru1_pru_r30_7", "pr1_pru1_pru_r31_7", "gpio2_13"), - _PIN(0x8c0, "LCD_DATA8", 76, 7, "lcd_data8", "gpmc_a12", "ehrpwm1_tripzone_input", "mcasp0_aclkx", "uart5_txd", "pr1_mii0_rxd3", "uart2_ctsn", "gpio2_14"), - _PIN(0x8c4, "LCD_DATA9", 76, 7, "lcd_data9", "gpmc_a13", "ehrpwm0_synco", "mcasp0_fsx", "uart5_rxd", "pr1_mii0_rxd2", "uart2_rtsn", "gpio2_15"), - _PIN(0x8c8, "LCD_DATA10", 77, 7, "lcd_data10", "gpmc_a14", "ehrpwm1A", "mcasp0_axr0", NULL, "pr1_mii0_rxd1", "uart3_ctsn", "gpio2_16"), - _PIN(0x8cc, "LCD_DATA11", 78, 7, "lcd_data11", "gpmc_a15", "ehrpwm1B", "mcasp0_ahclkr", "mcasp0_axr2", "pr1_mii0_rxd0", "uart3_rtsn", "gpio2_17"), - _PIN(0x8d0, "LCD_DATA12", 8, 7, "lcd_data12", "gpmc_a16", "eQEP1A_in", "mcasp0_aclkr", "mcasp0_axr2", "pr1_mii0_rxlink", "uart4_ctsn", "gpio0_8"), - _PIN(0x8d4, "LCD_DATA13", 9, 7, "lcd_data13", "gpmc_a17", "eQEP1B_in", "mcasp0_fsr", "mcasp0_axr3", "pr1_mii0_rxer", "uart4_rtsn", "gpio0_9"), - _PIN(0x8d8, "LCD_DATA14", 10, 7, "lcd_data14", "gpmc_a18", "eQEP1_index", "mcasp0_axr1", "uart5_rxd", "pr1_mii_mr0_clk", "uart5_ctsn", "gpio0_10"), - _PIN(0x8dc, "LCD_DATA15", 11, 7, "lcd_data15", "gpmc_a19", "eQEP1_strobe", "mcasp0_ahclkx", "mcasp0_axr3", "pr1_mii0_rxdv", "uart5_rtsn", "gpio0_11"), - _PIN(0x8e0, "LCD_VSYNC", 86, 7, "lcd_vsync", "gpmc_a8", "gpmc_a1", "pr1_edio_data_in2", "pr1_edio_data_out2", "pr1_pru1_pru_r30_8", "pr1_pru1_pru_r31_8", "gpio2_22"), - _PIN(0x8e4, "LCD_HSYNC", 87, 7, "lcd_hsync", "gmpc_a9", "gpmc_a2", "pr1_edio_data_in3", "pr1_edio_data_out3", "pr1_pru1_pru_r30_9", "pr1_pru1_pru_r31_9", "gpio2_23"), - _PIN(0x8e8, "LCD_PCLK", 88, 7, "lcd_pclk", "gpmc_a10", "pr1_mii0_crs", "pr1_edio_data_in4", "pr1_edio_data_out4", "pr1_pru1_pru_r30_10", "pr1_pru1_pru_r31_10", "gpio2_24"), - _PIN(0x8ec, "LCD_AC_BIAS_EN", 89, 7, "lcd_ac_bias_en", "gpmc_a11", "pr1_mii1_crs", "pr1_edio_data_in5", "pr1_edio_data_out5", "pr1_pru1_pru_r30_11", "pr1_pru1_pru_r31_11", "gpio2_25"), - _PIN(0x8f0, "MMC0_DAT3", 90, 7, "mmc0_dat3", "gpmc_a20", "uart4_ctsn", "timer5", "uart1_dcdn", "pr1_pru0_pru_r30_8", "pr1_pru0_pru_r31_8", "gpio2_26"), - _PIN(0x8f4, "MMC0_DAT2", 91, 7, "mmc0_dat2", "gpmc_a21", "uart4_rtsn", "timer6", "uart1_dsrn", "pr1_pru0_pru_r30_9", "pr1_pru0_pru_r31_9", "gpio2_27"), - _PIN(0x8f8, "MMC0_DAT1", 92, 7, "mmc0_dat1", "gpmc_a22", "uart5_ctsn", "uart3_rxd", "uart1_dtrn", "pr1_pru0_pru_r30_10", "pr1_pru0_pru_r31_10", "gpio2_28"), - _PIN(0x8fc, "MMC0_DAT0", 93, 7, "mmc0_dat0", "gpmc_a23", "uart5_rtsn", "uart3_txd", "uart1_rin", "pr1_pru0_pru_r30_11", "pr1_pru0_pru_r31_11", "gpio2_29"), - _PIN(0x900, "MMC0_CLK", 94, 7, "mmc0_clk", "gpmc_a24", "uart3_ctsn", "uart2_rxd", "dcan1_tx", "pr1_pru0_pru_r30_12", "pr1_pru0_pru_r31_12", "gpio2_30"), - _PIN(0x904, "MMC0_CMD", 95, 7, "mmc0_cmd", "gpmc_a25", "uart3_rtsn", "uart2_txd", "dcan1_rx", "pr1_pru0_pru_r30_13", "pr1_pru0_pru_r31_13", "gpio2_31"), - _PIN(0x908, "MII1_COL", 96, 7, "gmii1_col", "rmii2_refclk", "spi1_sclk", "uart5_rxd", "mcasp1_axr2", "mmc2_dat3", "mcasp0_axr2", "gpio3_0"), - _PIN(0x90c, "MII1_CRS", 97, 7, "gmii1_crs", "rmii1_crs_dv", "spi1_d0", "I2C1_SDA", "mcasp1_aclkx", "uart5_ctsn", "uart2_rxd", "gpio3_1"), - _PIN(0x910, "MII1_RX_ER", 98, 7, "gmii1_rxerr", "rmii1_rxerr", "spi1_d1", "I2C1_SCL", "mcasp1_fsx", "uart5_rtsn", "uart2_txd", "gpio3_2"), - _PIN(0x914, "MII1_TX_EN", 99, 7, "gmii1_txen", "rmii1_txen", "rgmii1_tctl", "timer4", "mcasp1_axr0", "eQEP0_index", "mmc2_cmd", "gpio3_3"), - _PIN(0x918, "MII1_RX_DV", 100, 7, "gmii1_rxdv", "cd_memory_clk", "rgmii1_rctl", "uart5_txd", "mcasp1_aclkx", "mmc2_dat0", "mcasp0_aclkr", "gpio3_4"), - _PIN(0x91c, "MII1_TXD3", 16, 7, "gmii1_txd3", "dcan0_tx", "rgmii1_td3", "uart4_rxd", "mcasp1_fsx", "mmc2_dat1", "mcasp0_fsr", "gpio0_16"), - _PIN(0x920, "MII1_TXD2", 17, 7, "gmii1_txd2", "dcan0_rx", "rgmii1_td2", "uart4_txd", "mcasp1_axr0", "mmc2_dat2", "mcasp0_ahclkx", "gpio0_17"), - _PIN(0x924, "MII1_TXD1", 21, 7, "gmii1_txd1", "rmii1_txd1", "rgmii1_td1", "mcasp1_fsr", "mcasp1_axr1", "eQEP0A_in", "mmc1_cmd", "gpio0_21"), - _PIN(0x928, "MII1_TXD0", 28, 7, "gmii1_txd0", "rmii1_txd0", "rgmii1_td0", "mcasp1_axr2", "mcasp1_aclkr", "eQEP0B_in", "mmc1_clk", "gpio0_28"), - _PIN(0x92c, "MII1_TX_CLK", 105, 7, "gmii1_txclk", "uart2_rxd", "rgmii1_tclk", "mmc0_dat7", "mmc1_dat0", "uart1_dcdn", "mcasp0_aclkx", "gpio3_9"), - _PIN(0x930, "MII1_RX_CLK", 106, 7, "gmii1_rxclk", "uart2_txd", "rgmii1_rclk", "mmc0_dat6", "mmc1_dat1", "uart1_dsrn", "mcasp0_fsx", "gpio3_10"), - _PIN(0x934, "MII1_RXD3", 82, 7, "gmii1_rxd3", "uart3_rxd", "rgmii1_rd3", "mmc0_dat5", "mmc1_dat2", "uart1_dtrn", "mcasp0_axr0", "gpio2_18"), - _PIN(0x938, "MII1_RXD2", 83, 7, "gmii1_rxd2", "uart3_txd", "rgmii1_rd2", "mmc0_dat4", "mmc1_dat3", "uart1_rin", "mcasp0_axr1", "gpio2_19"), - _PIN(0x93c, "MII1_RXD1", 84, 7, "gmii1_rxd1", "rmii1_rxd1", "rgmii1_rd1", "mcasp1_axr3", "mcasp1_fsr", "eQEP0_strobe", "mmc2_clk", "gpio2_20"), - _PIN(0x940, "MII1_RXD0", 85, 7, "gmii1_rxd0", "rmii1_rxd0", "rgmii1_rd0", "mcasp1_ahclkx", "mcasp1_ahclkr", "mcasp1_aclkr", "mcasp0_axr3", "gpio2_21"), - _PIN(0x944, "RMII1_REF_CLK", 29, 7, "rmii1_refclk", "xdma_event_intr2", "spi1_cs0", "uart5_txd", "mcasp1_axr3", "mmc0_pow", "mcasp1_ahclkx", "gpio0_29"), - _PIN(0x948, "MDIO", 0, 7, "mdio_data", "timer6", "uart5_rxd", "uart3_ctsn", "mmc0_sdcd","mmc1_cmd", "mmc2_cmd","gpio0_0"), - _PIN(0x94c, "MDC", 1, 7, "mdio_clk", "timer5", "uart5_txd", "uart3_rtsn", "mmc0_sdwp", "mmc1_clk", "mmc2_clk", "gpio0_1"), - _PIN(0x950, "SPI0_SCLK", 2, 7, "spi0_sclk", "uart2_rxd", "I2C2_SDA", "ehrpwm0A", "pr1_uart0_cts_n", "pr1_edio_sof", "EMU2", "gpio0_2"), - _PIN(0x954, "SPI0_D0", 3, 7, "spi0_d0", "uart2_txd", "I2C2_SCL", "ehrpwm0B", "pr1_uart0_rts_n", "pr1_edio_latch_in", "EMU3", "gpio0_3"), - _PIN(0x958, "SPI0_D1", 4, 7, "spi0_d1", "mmc1_sdwp", "I2C1_SDA", "ehrpwm0_tripzone_input", "pr1_uart0_rxd", "pr1_edio_data_in0", "pr1_edio_data_out0", "gpio0_4"), - _PIN(0x95c, "SPI0_CS0", 5, 7, "spi0_cs0", "mmc2_sdwp", "I2C1_SCL", "ehrpwm0_synci", "pr1_uart0_txd", "pr1_edio_data_in1", "pr1_edio_data_out1", "gpio0_5"), - _PIN(0x960, "SPI0_CS1", 6, 7, "spi0_cs1", "uart3_rxd", "eCAP1_in_PWM1_out", "mcc0_pow", "xdm_event_intr2", "mmc0_sdcd", "EMU4", "gpio0_6"), - _PIN(0x964, "ECAP0_IN_PWM0_OUT",7, 7, "eCAP0_in_PWM0_out", "uart3_txd", "spi1_cs1", "pr1_ecap0_ecap_capin_apwm_o", "spi1_sclk", "mmc0_sdwp", "xdma_event_intr2", "gpio0_7"), - _PIN(0x968, "UART0_CTSn", 40, 7, "uart0_ctsn", "uart4_rxd", "dcan1_tx", "I2C1_SDA", "spi1_d0", "timer7", "pr1_edc_sync0_out", "gpio1_8"), - _PIN(0x96c, "UART0_RTSn", 41, 7, "uart0_rtsn", "uart4_txd", "dcan1_rx", "I2C1_SCL", "spi1_d1", "spi1_cs0", "pr1_edc_sync1_out", "gpio1_9"), - _PIN(0x970, "UART0_rxd", 42, 7, "uart0_rxd", "spi1_cs0", "dcan0_tx", "I2C2_SDA", "eCAP2_in_PWM2_out", "pr1_pru1_pru_r30_14", "pr1_pru1_pru_r31_14", "gpio1_10"), - _PIN(0x974, "UART0_txd", 43, 7, "uart0_txd", "spi1_cs1", "dcan0_rx", "I2C2_SCL", "eCAP1_in_PWM1_out", "pr1_pru1_pru_r30_15", "pr1_pru1_pru_r31_15", "gpio1_11"), - _PIN(0x978, "UART1_CTSn", 12, 7, "uart1_ctsn", "timer6_mux1", "dcan0_tx", "I2C2_SDA", "spi1_cs0", "pr1_uart0_cts_n", "pr1_edc_latch0_in", "gpio0_12"), - _PIN(0x97c, "UART1_RTSn", 13, 7, "uart1_rtsn", "timer5_mux1", "dcan0_rx", "I2C2_SCL", "spi1_cs1", "pr1_uart0_rts_n", "pr1_edc_latch1_in", "gpio0_13"), - _PIN(0x980, "UART1_RXD", 14, 7, "uart1_rxd", "mmc1_sdwp", "dcan1_tx", "I2C1_SDA", NULL, "pr1_uart0_rxd", "pr1_pru1_pru_r31_16", "gpio0_14"), - _PIN(0x984, "UART1_TXD", 15, 7, "uart1_txd", "mmc2_sdwp", "dcan1_rx", "I2C1_SCL", NULL, "pr1_uart0_txd", "pr1_pru0_pru_r31_16", "gpio0_15"), - _PIN(0x988, "I2C0_SDA", 101, 7, "I2C0_SDA", "timer4", "uart2_ctsn", "eCAP2_in_PWM2_out", NULL, NULL, NULL, "gpio3_5"), - _PIN(0x98c, "I2C0_SCL", 102, 7, "I2C0_SCL", "timer7", "uart2_rtsn", "eCAP1_in_PWM1_out", NULL, NULL, NULL, "gpio3_6"), - _PIN(0x990, "MCASP0_ACLKX", 110, 7, "mcasp0_aclkx", "ehrpwm0A", NULL, "spi1_sclk", "mmc0_sdcd", "pr1_pru0_pru_r30_0", "pr1_pru0_pru_r31_0", "gpio3_14"), - _PIN(0x994, "MCASP0_FSX", 111, 7, "mcasp0_fsx", "ehrpwm0B", NULL, "spi1_d0", "mmc1_sdcd", "pr1_pru0_pru_r30_1", "pr1_pru0_pru_r31_1", "gpio3_15"), - _PIN(0x998, "MCASP0_AXR0", 112, 7, "mcasp0_axr0", "ehrpwm0_tripzone_input", NULL, "spi1_d1", "mmc2_sdcd", "pr1_pru0_pru_r30_2", "pr1_pru0_pru_r31_2", "gpio3_16"), - _PIN(0x99c, "MCASP0_AHCLKR", 113, 7, "mcasp0_ahclkr", "ehrpwm0_synci", "mcasp0_axr2", "spi1_cs0", "eCAP2_in_PWM2_out", "pr1_pru0_pru_r30_3", "pr1_pru0_pru_r31_3", "gpio3_17"), - _PIN(0x9a0, "MCASP0_ACLKR", 114, 7, "mcasp0_aclkr", "eQEP0A_in", "mcasp0_axr2", "mcasp1_aclkx", "mmc0_sdwp", "pr1_pru0_pru_r30_4", "pr1_pru0_pru_r31_4", "gpio3_18"), - _PIN(0x9a4, "MCASP0_FSR", 115, 7, "mcasp0_fsr", "eQEP0B_in", "mcasp0_axr3", "mcasp1_fsx", "EMU2", "pr1_pru0_pru_r30_5", "pr1_pru0_pru_r31_5", "gpio3_19"), - _PIN(0x9a8, "MCASP0_AXR1", 116, 7, "mcasp0_axr1", "eQEP0_index", NULL, "mcasp1_axr0", "EMU3", "pr1_pru0_pru_r30_6", "pr1_pru0_pru_r31_6", "gpio3_20"), - _PIN(0x9ac, "MCASP0_AHCLKX", 117, 7, "mcasp0_ahclkx", "eQEP0_strobe", "mcasp0_axr3", "mcasp1_axr1", "EMU4", "pr1_pru0_pru_r30_7", "pr1_pru0_pru_r31_7", "gpio3_21"), - _PIN(0x9b0, "XDMA_EVENT_INTR0", 19, 7, "xdma_event_intr0", NULL, "timer4", "clkout1", "spi1_cs1", "pr1_pru1_pru_r31_16", "EMU2", "gpio0_19"), - _PIN(0x9b4, "XDMA_EVENT_INTR1", 20, 7, "xdma_event_intr1", NULL, "tclkin", "clkout2", "timer7", "pr1_pru0_pru_r31_16", "EMU3", "gpio0_20"), -#if 0 - _PIN(0x9b8, "nresetin_out", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9bc, "porz", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9c0, "nnmi", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9c4, "osc0_in", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9c8, "osc0_out", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9cc, "osc0_vss", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9d0, "tms", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9d4, "tdi", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9d8, "tdo", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9dc, "tck", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9e0, "ntrst", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), -#endif - _PIN(0x9e4, "EMU0", 103, 7, "EMU0", NULL, NULL, NULL, NULL, NULL, NULL, "gpio3_7"), - _PIN(0x9e8, "EMU1", 104, 0, "EMU1", NULL, NULL, NULL, NULL, NULL, NULL, "gpio3_8"), -#if 0 - _PIN(0x9ec, "osc1_in", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9f0, "osc1_out", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9f4, "osc1_vss", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9f8, "rtc_porz", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9fc, "pmic_power_en", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa00, "ext_wakeup", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa04, "enz_kaldo_1p8v", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), -#endif - _PIN(0xa08, "USB0_DM", 0, 0, "USB0_DM", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa0c, "USB0_DP", 0, 0, "USB0_DP", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa10, "USB0_CE", 0, 0, "USB0_CE", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa14, "USB0_ID", 0, 0, "USB0_ID", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa18, "USB0_VBUS", 0, 0, "USB0_VBUS", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa1c, "USB0_DRVVBUS", 18, 7, "USB0_DRVVBUS", NULL, NULL, NULL, NULL, NULL, NULL, "gpio0_18"), - _PIN(0xa20, "USB1_DM", 0, 0, "USB1_DM", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa24, "USB1_DP", 0, 0, "USB1_DP", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa28, "USB1_CE", 0, 0, "USB1_CE", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa2c, "USB1_ID", 0, 0, "USB1_ID", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa30, "USB1_VBUS", 0, 0, "USB1_VBUS", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa34, "USB1_DRVVBUS", 109, 7, "USB1_DRVVBUS", NULL, NULL, NULL, NULL, NULL, NULL, "gpio3_13"), -#if 0 - _PIN(0xa38, "ddr_resetn", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa3c, "ddr_csn0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa40, "ddr_cke", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa44, "ddr_ck", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa48, "ddr_nck", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa4c, "ddr_casn", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa50, "ddr_rasn", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa54, "ddr_wen", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa58, "ddr_ba0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa5c, "ddr_ba1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa60, "ddr_ba2", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa64, "ddr_a0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa68, "ddr_a1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa6c, "ddr_a2", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa70, "ddr_a3", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa74, "ddr_a4", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa78, "ddr_a5", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa7c, "ddr_a6", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa80, "ddr_a7", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa84, "ddr_a8", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa88, "ddr_a9", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa8c, "ddr_a10", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa90, "ddr_a11", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa94, "ddr_a12", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa98, "ddr_a13", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa9c, "ddr_a14", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaa0, "ddr_a15", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaa4, "ddr_odt", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaa8, "ddr_d0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaac, "ddr_d1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xab0, "ddr_d2", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xab4, "ddr_d3", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xab8, "ddr_d4", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xabc, "ddr_d5", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xac0, "ddr_d6", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xac4, "ddr_d7", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xac8, "ddr_d8", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xacc, "ddr_d9", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xad0, "ddr_d10", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xad4, "ddr_d11", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xad8, "ddr_d12", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xadc, "ddr_d13", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xae0, "ddr_d14", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xae4, "ddr_d15", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xae8, "ddr_dqm0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaec, "ddr_dqm1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaf0, "ddr_dqs0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaf4, "ddr_dqsn0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaf8, "ddr_dqs1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xafc, "ddr_dqsn1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb00, "ddr_vref", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb04, "ddr_vtp", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb08, "ddr_strben0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb0c, "ddr_strben1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb2c, "ain0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb28, "ain1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb24, "ain2", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb20, "ain3", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb1c, "ain4", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb18, "ain5", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb14, "ain6", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb10, "ain7", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb30, "vrefp", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb34, "vrefn", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb38, "avdd", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb3c, "avss", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb40, "iforce", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb44, "vsense", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb48, "testout", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), -#endif - { .ballname = NULL }, +static struct ofw_compat_data compat_data[] = { + {"ti,am335x-gpio", 1}, + /* Linux uses ti,omap4-gpio on am335x so we need to support it */ + {"ti,omap4-gpio", 1}, + {"ti,gpio", 1}, + {NULL, 0}, }; -const struct ti_scm_device ti_scm_dev = { - .padconf_muxmode_mask = 0x7, - .padconf_sate_mask = 0x78, - .padstate = (struct ti_scm_padstate *) &ti_padstate_devmap, - .padconf = (struct ti_scm_padconf *) &ti_padconf_devmap, -}; +static int +am335x_gpio_probe(device_t dev) +{ + if (ti_chip() != CHIP_AM335X) + return (ENXIO); + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Ti AM335x General Purpose I/O (GPIO)"); -int -ti_scm_padconf_set_gpioflags(uint32_t gpio, uint32_t flags) + return (0); +} + +static int +am335x_gpio_set_flags(device_t dev, uint32_t gpio, uint32_t flags) { unsigned int state = 0; if (flags & GPIO_PIN_OUTPUT) { @@ -332,13 +102,15 @@ ti_scm_padconf_set_gpioflags(uint32_t gp return ti_scm_padconf_set_gpiomode(gpio, state); } -void -ti_scm_padconf_get_gpioflags(uint32_t gpio, uint32_t *flags) +static int +am335x_gpio_get_flags(device_t dev, uint32_t gpio, uint32_t *flags) { unsigned int state; - if (ti_scm_padconf_get_gpiomode(gpio, &state) != 0) + + if (ti_scm_padconf_get_gpiomode(gpio, &state) != 0) { *flags = 0; - else { + return (EINVAL); + } else { switch (state) { case PADCONF_OUTPUT: *flags = GPIO_PIN_OUTPUT; @@ -360,5 +132,25 @@ ti_scm_padconf_get_gpioflags(uint32_t gp break; } } + + return (0); } +static device_method_t am335x_gpio_methods[] = { + /* bus interface */ + DEVMETHOD(device_probe, am335x_gpio_probe), + + /* ti_gpio interface */ + DEVMETHOD(ti_gpio_set_flags, am335x_gpio_set_flags), + DEVMETHOD(ti_gpio_get_flags, am335x_gpio_get_flags), + + DEVMETHOD_END +}; + +extern driver_t ti_gpio_driver; +static devclass_t am335x_gpio_devclass; + +DEFINE_CLASS_1(gpio, am335x_gpio_driver, am335x_gpio_methods, + sizeof(struct ti_gpio_softc), ti_gpio_driver); +DRIVER_MODULE(am335x_gpio, simplebus, am335x_gpio_driver, am335x_gpio_devclass, + 0, 0); Modified: head/sys/arm/ti/am335x/am335x_scm_padconf.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_scm_padconf.c Sat Oct 18 17:36:57 2014 (r273261) +++ head/sys/arm/ti/am335x/am335x_scm_padconf.c Sat Oct 18 17:51:34 2014 (r273262) @@ -47,6 +47,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #define _PIN(r, b, gp, gm, m0, m1, m2, m3, m4, m5, m6, m7) \ { .reg_off = r, \ .gpio_pin = gp, \ @@ -62,18 +64,6 @@ __FBSDID("$FreeBSD$"); .muxmodes[7] = m7, \ } -#define SLEWCTRL (0x01 << 6) /* faster(0) or slower(1) slew rate. */ -#define RXACTIVE (0x01 << 5) /* Input enable value for the Pad */ -#define PULLTYPESEL (0x01 << 4) /* Pad pullup/pulldown type selection */ -#define PULLUDEN (0x01 << 3) /* Pullup/pulldown disabled */ - -#define PADCONF_OUTPUT (0) -#define PADCONF_OUTPUT_PULLUP (PULLTYPESEL) -#define PADCONF_INPUT (RXACTIVE | PULLUDEN) -#define PADCONF_INPUT_PULLUP (RXACTIVE | PULLTYPESEL) -#define PADCONF_INPUT_PULLDOWN (RXACTIVE) -#define PADCONF_INPUT_PULLUP_SLOW (PADCONF_INPUT_PULLUP | SLEWCTRL) - const static struct ti_scm_padstate ti_padstate_devmap[] = { {"output", PADCONF_OUTPUT }, {"output_pullup", PADCONF_OUTPUT_PULLUP }, @@ -311,54 +301,3 @@ const struct ti_scm_device ti_scm_dev = .padstate = (struct ti_scm_padstate *) &ti_padstate_devmap, .padconf = (struct ti_scm_padconf *) &ti_padconf_devmap, }; - -int -ti_scm_padconf_set_gpioflags(uint32_t gpio, uint32_t flags) -{ - unsigned int state = 0; - if (flags & GPIO_PIN_OUTPUT) { - if (flags & GPIO_PIN_PULLUP) - state = PADCONF_OUTPUT_PULLUP; - else - state = PADCONF_OUTPUT; - } else if (flags & GPIO_PIN_INPUT) { - if (flags & GPIO_PIN_PULLUP) - state = PADCONF_INPUT_PULLUP; - else if (flags & GPIO_PIN_PULLDOWN) - state = PADCONF_INPUT_PULLDOWN; - else - state = PADCONF_INPUT; - } - return ti_scm_padconf_set_gpiomode(gpio, state); -} - -void -ti_scm_padconf_get_gpioflags(uint32_t gpio, uint32_t *flags) -{ - unsigned int state; - if (ti_scm_padconf_get_gpiomode(gpio, &state) != 0) - *flags = 0; - else { - switch (state) { - case PADCONF_OUTPUT: - *flags = GPIO_PIN_OUTPUT; - break; - case PADCONF_OUTPUT_PULLUP: - *flags = GPIO_PIN_OUTPUT | GPIO_PIN_PULLUP; - break; - case PADCONF_INPUT: - *flags = GPIO_PIN_INPUT; - break; - case PADCONF_INPUT_PULLUP: - *flags = GPIO_PIN_INPUT | GPIO_PIN_PULLUP; - break; - case PADCONF_INPUT_PULLDOWN: - *flags = GPIO_PIN_INPUT | GPIO_PIN_PULLDOWN; - break; - default: - *flags = 0; - break; - } - } -} - Copied and modified: head/sys/arm/ti/am335x/am335x_scm_padconf.h (from r273259, head/sys/arm/ti/am335x/am335x_scm_padconf.c) ============================================================================== --- head/sys/arm/ti/am335x/am335x_scm_padconf.c Sat Oct 18 17:11:02 2014 (r273259, copy source) +++ head/sys/arm/ti/am335x/am335x_scm_padconf.h Sat Oct 18 17:51:34 2014 (r273262) @@ -22,45 +22,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#define _PIN(r, b, gp, gm, m0, m1, m2, m3, m4, m5, m6, m7) \ - { .reg_off = r, \ - .gpio_pin = gp, \ - .gpio_mode = gm, \ - .ballname = b, \ - .muxmodes[0] = m0, \ - .muxmodes[1] = m1, \ - .muxmodes[2] = m2, \ - .muxmodes[3] = m3, \ - .muxmodes[4] = m4, \ - .muxmodes[5] = m5, \ - .muxmodes[6] = m6, \ - .muxmodes[7] = m7, \ - } +#ifndef AM335X_SCM_PADCONF_H +#define AM335X_SCM_PADCONF_H #define SLEWCTRL (0x01 << 6) /* faster(0) or slower(1) slew rate. */ #define RXACTIVE (0x01 << 5) /* Input enable value for the Pad */ @@ -74,291 +41,4 @@ __FBSDID("$FreeBSD$"); #define PADCONF_INPUT_PULLDOWN (RXACTIVE) #define PADCONF_INPUT_PULLUP_SLOW (PADCONF_INPUT_PULLUP | SLEWCTRL) -const static struct ti_scm_padstate ti_padstate_devmap[] = { - {"output", PADCONF_OUTPUT }, - {"output_pullup", PADCONF_OUTPUT_PULLUP }, - {"input", PADCONF_INPUT }, - {"input_pulldown", PADCONF_INPUT_PULLDOWN }, - {"input_pullup", PADCONF_INPUT_PULLUP }, - {"i2c", PADCONF_INPUT_PULLUP_SLOW }, - { .state = NULL } -}; - -const static struct ti_scm_padconf ti_padconf_devmap[] = { - _PIN(0x800, "GPMC_AD0", 32, 7,"gpmc_ad0", "mmc1_dat0", NULL, NULL, NULL, NULL, NULL, "gpio1_0"), - _PIN(0x804, "GPMC_AD1", 33, 7,"gpmc_ad1", "mmc1_dat1", NULL, NULL, NULL, NULL, NULL, "gpio1_1"), - _PIN(0x808, "GPMC_AD2", 34, 7,"gpmc_ad2", "mmc1_dat2", NULL, NULL, NULL, NULL, NULL, "gpio1_2"), - _PIN(0x80C, "GPMC_AD3", 35, 7,"gpmc_ad3", "mmc1_dat3", NULL, NULL, NULL, NULL, NULL, "gpio1_3"), - _PIN(0x810, "GPMC_AD4", 36, 7,"gpmc_ad4", "mmc1_dat4", NULL, NULL, NULL, NULL, NULL, "gpio1_4"), - _PIN(0x814, "GPMC_AD5", 37, 7,"gpmc_ad5", "mmc1_dat5", NULL, NULL, NULL, NULL, NULL, "gpio1_5"), - _PIN(0x818, "GPMC_AD6", 38, 7,"gpmc_ad6", "mmc1_dat6", NULL, NULL, NULL, NULL, NULL, "gpio1_6"), - _PIN(0x81C, "GPMC_AD7", 39, 7,"gpmc_ad7", "mmc1_dat7", NULL, NULL, NULL, NULL, NULL, "gpio1_7"), - _PIN(0x820, "GPMC_AD8", 22, 7, "gpmc_ad8", "lcd_data23", "mmc1_dat0", "mmc2_dat4", "ehrpwm2A", NULL, NULL, "gpio0_22"), - _PIN(0x824, "GPMC_AD9", 23, 7, "gpmc_ad9", "lcd_data22", "mmc1_dat1", "mmc2_dat5", "ehrpwm2B", NULL, NULL, "gpio0_23"), - _PIN(0x828, "GPMC_AD10", 26, 7, "gpmc_ad10", "lcd_data21", "mmc1_dat2", "mmc2_dat6", "ehrpwm2_tripzone_in", NULL, NULL, "gpio0_26"), - _PIN(0x82C, "GPMC_AD11", 27, 7, "gpmc_ad11", "lcd_data20", "mmc1_dat3", "mmc2_dat7", "ehrpwm0_synco", NULL, NULL, "gpio0_27"), - _PIN(0x830, "GPMC_AD12", 44, 7, "gpmc_ad12", "lcd_data19", "mmc1_dat4", "mmc2_dat0", "eQEP2A_in", "pr1_mii0_txd2", "pr1_pru0_pru_r30_14", "gpio1_12"), - _PIN(0x834, "GPMC_AD13", 45, 7, "gpmc_ad13", "lcd_data18", "mmc1_dat5", "mmc2_dat1", "eQEP2B_in", "pr1_mii0_txd1", "pr1_pru0_pru_r30_15", "gpio1_13"), - _PIN(0x838, "GPMC_AD14", 46, 7, "gpmc_ad14", "lcd_data17", "mmc1_dat6", "mmc2_dat2", "eQEP2_index", "pr1_mii0_txd0", "pr1_pru0_pru_r31_14", "gpio1_14"), - _PIN(0x83C, "GPMC_AD15", 47, 7, "gpmc_ad15", "lcd_data16", "mmc1_dat7", "mmc2_dat3", "eQEP2_strobe", "pr1_ecap0_ecap_capin_apwm_o", "pr1_pru0_pru_r31_15", "gpio1_15"), - _PIN(0x840, "GPMC_A0", 48, 7, "gpmc_a0", "gmii2_txen", "rgmii2_tctl", "rmii2_txen", "gpmc_a16", "pr1_mii_mt1_clk", "ehrpwm1_tripzone_input", "gpio1_16"), - _PIN(0x844, "GPMC_A1", 49, 7, "gpmc_a1", "gmii2_rxdv", "rgmii2_rctl", "mmc2_dat0", "gpmc_a17", "pr1_mii1_txd3", "ehrpwm0_synco", "gpio1_17"), - _PIN(0x848, "GPMC_A2", 50, 7, "gpmc_a2", "gmii2_txd3", "rgmii2_td3", "mmc2_dat1", "gpmc_a18", "pr1_mii1_txd2", "ehrpwm1A", "gpio1_18"), - _PIN(0x84C, "GPMC_A3", 51, 7, "gpmc_a3", "gmii2_txd2", "rgmii2_td2", "mmc2_dat2", "gpmc_a19", "pr1_mii1_txd1", "ehrpwm1B", "gpio1_19"), - _PIN(0x850, "GPMC_A4", 52, 7, "gpmc_a4", "gmii2_txd1", "rgmii2_td1", "rmii2_tdx1", "gpmc_a20", "pr1_mii1_txd0", "eQEP1A_in", "gpio1_20"), - _PIN(0x854, "GPMC_A5", 53, 7, "gpmc_a5", "gmii2_txd0", "rgmii2_td0", "rmii2_txd0", "gpmc_a21", "pr1_mii1_rxd3", "eQEP1B_in", "gpio1_21"), - _PIN(0x858, "GPMC_A6", 54, 7, "gpmc_a6", "gmii2_txclk", "rgmii2_tclk", "mmc2_dat4", "gpmc_a22", "pr1_mii1_rxd2", "eQEP1_index", "gpio1_22"), - _PIN(0x85C, "GPMC_A7", 55, 7, "gpmc_a7", "gmii2_rxclk", "rgmii2_rclk", "mmc2_dat5", "gpmc_a23", "pr1_mii1_rxd1", "eQEP1_strobe", "gpio1_23"), - _PIN(0x860, "GPMC_A8", 56, 7, "gpmc_a8", "gmii2_rxd3", "rgmii2_rd3", "mmc2_dat6", "gpmc_a24", "pr1_mii1_rxd0", "mcasp0_aclkx", "gpio1_24"), - _PIN(0x864, "GPMC_A9", 57, 7, "gmpc_a9", "gmii2_rxd2", "rgmii2_rd2", "mmc2_dat7 / rmii2_crs_dv", "gpmc_a25", "pr1_mii_mr1_clk", "mcasp0_fsx", "gpio1_25"), - _PIN(0x868, "GPMC_A10", 58, 7, "gmpc_a10", "gmii2_rxd1", "rgmii2_rd1", "rmii2_rxd1", "gpmc_a26", "pr1_mii1_rxdv", "mcasp0_arx0", "gpio1_26"), - _PIN(0x86C, "GPMC_A11", 59, 7, "gmpc_a11", "gmii2_rxd0", "rgmii2_rd0", "rmii2_rxd0", "gpmc_a27", "pr1_mii1_rxer", "mcasp0_axr1", "gpio1_27"), - _PIN(0x870, "GPMC_WAIT0", 30, 7, "gpmc_wait0", "gmii2_crs", "gpmc_csn4", "rmii2_crs_dv", "mmc1_sdcd", "pr1_mii1_col", "uart4_rxd", "gpio0_30"), - _PIN(0x874, "GPMC_WPn", 31, 7, "gpmc_wpn", "gmii2_rxerr", "gpmc_csn5", "rmii2_rxerr", "mmc2_sdcd", "pr1_mii1_txen", "uart4_txd", "gpio0_31"), - _PIN(0x878, "GPMC_BEn1", 60, 7, "gpmc_be1n", "gmii2_col", "gmpc_csn6","mmc2_dat3", "gpmc_dir", "pr1_mii1_rxlink", "mcasp0_aclkr", "gpio1_28"), - _PIN(0x87c, "GPMC_CSn0", 61, 7, "gpmc_csn0", NULL, NULL, NULL, NULL, NULL, NULL, "gpio1_29"), - _PIN(0x880, "GPMC_CSn1", 62, 7, "gpmc_csn1", "gpmc_clk", "mmc1_clk", "pr1_edio_data_in6", "pr1_edio_data_out6", "pr1_pru1_pru_r30_12", "pr1_pru1_pru_r31_12", "gpio1_30"), - _PIN(0x884, "GPMC_CSn2", 63, 7, "gpmc_csn2", "gpmc_be1n", "mmc1_cmd", "pr1_edio_data_in7", "pr1_edio_data_out7", "pr1_pru1_pru_r30_13", "pr1_pru1_pru_r31_13", "gpio1_31"), - _PIN(0x888, "GPMC_CSn3", 64, 7, "gpmc_csn3", "gpmc_a3", "rmii2_crs_dv", "mmc2_cmd", "pr1_mii0_crs", "pr1_mdio_data", "EMU4", "gpio2_0"), - _PIN(0x88c, "GPMC_CLK", 65, 7, "gpmc_clk", "lcd_memory_clk", "gpmc_wait1", "mmc2_clk", "pr1_mii1_crs", "pr1_mdio_mdclk", "mcasp0_fsr", "gpio2_1"), - _PIN(0x890, "GPMC_ADVn_ALE", 66, 7, "gpmc_advn_ale", NULL, "timer4", NULL, NULL, NULL, NULL, "gpio2_2"), - _PIN(0x894, "GPMC_OEn_REn", 67, 7, "gpmc_oen_ren", NULL, "timer7", NULL, NULL, NULL, NULL, "gpio2_3"), - _PIN(0x898, "GPMC_WEn", 68, 7, "gpmc_wen", NULL, "timer6", NULL, NULL, NULL, NULL, "gpio2_4"), - _PIN(0x89c, "GPMC_BEn0_CLE", 67, 7, "gpmc_ben0_cle", NULL, "timer5", NULL, NULL, NULL, NULL, "gpio2_5"), - _PIN(0x8a0, "LCD_DATA0", 68, 7, "lcd_data0", "gpmc_a0", "pr1_mii_mt0_clk", "ehrpwm2A", NULL, "pr1_pru1_pru_r30_0", "pr1_pru1_pru_r31_0", "gpio2_6"), - _PIN(0x8a4, "LCD_DATA1", 69, 7, "lcd_data1", "gpmc_a1", "pr1_mii0_txen", "ehrpwm2B", NULL, "pr1_pru1_pru_r30_1", "pr1_pru1_pru_r31_1", "gpio2_7"), - _PIN(0x8a8, "LCD_DATA2", 70, 7, "lcd_data2", "gpmc_a2", "pr1_mii0_txd3", "ehrpwm2_tripzone_input", NULL, "pr1_pru1_pru_r30_2", "pr1_pru1_pru_r31_2", "gpio2_8"), - _PIN(0x8ac, "LCD_DATA3", 71, 7, "lcd_data3", "gpmc_a3", "pr1_mii0_txd2", "ehrpwm0_synco", NULL, "pr1_pru1_pru_r30_3", "pr1_pru1_pru_r31_3", "gpio2_9"), - _PIN(0x8b0, "LCD_DATA4", 72, 7, "lcd_data4", "gpmc_a4", "pr1_mii0_txd1", "eQEP2A_in", NULL, "pr1_pru1_pru_r30_4", "pr1_pru1_pru_r31_4", "gpio2_10"), - _PIN(0x8b4, "LCD_DATA5", 73, 7, "lcd_data5", "gpmc_a5", "pr1_mii0_txd0", "eQEP2B_in", NULL, "pr1_pru1_pru_r30_5", "pr1_pru1_pru_r31_5", "gpio2_11"), - _PIN(0x8b8, "LCD_DATA6", 74, 7, "lcd_data6", "gpmc_a6", "pr1_edio_data_in6", "eQEP2_index", "pr1_edio_data_out6", "pr1_pru1_pru_r30_6", "pr1_pru1_pru_r31_6", "gpio2_12"), - _PIN(0x8bc, "LCD_DATA7", 75, 7, "lcd_data7", "gpmc_a7", "pr1_edio_data_in7", "eQEP2_strobe", "pr1_edio_data_out7", "pr1_pru1_pru_r30_7", "pr1_pru1_pru_r31_7", "gpio2_13"), - _PIN(0x8c0, "LCD_DATA8", 76, 7, "lcd_data8", "gpmc_a12", "ehrpwm1_tripzone_input", "mcasp0_aclkx", "uart5_txd", "pr1_mii0_rxd3", "uart2_ctsn", "gpio2_14"), - _PIN(0x8c4, "LCD_DATA9", 76, 7, "lcd_data9", "gpmc_a13", "ehrpwm0_synco", "mcasp0_fsx", "uart5_rxd", "pr1_mii0_rxd2", "uart2_rtsn", "gpio2_15"), - _PIN(0x8c8, "LCD_DATA10", 77, 7, "lcd_data10", "gpmc_a14", "ehrpwm1A", "mcasp0_axr0", NULL, "pr1_mii0_rxd1", "uart3_ctsn", "gpio2_16"), - _PIN(0x8cc, "LCD_DATA11", 78, 7, "lcd_data11", "gpmc_a15", "ehrpwm1B", "mcasp0_ahclkr", "mcasp0_axr2", "pr1_mii0_rxd0", "uart3_rtsn", "gpio2_17"), - _PIN(0x8d0, "LCD_DATA12", 8, 7, "lcd_data12", "gpmc_a16", "eQEP1A_in", "mcasp0_aclkr", "mcasp0_axr2", "pr1_mii0_rxlink", "uart4_ctsn", "gpio0_8"), - _PIN(0x8d4, "LCD_DATA13", 9, 7, "lcd_data13", "gpmc_a17", "eQEP1B_in", "mcasp0_fsr", "mcasp0_axr3", "pr1_mii0_rxer", "uart4_rtsn", "gpio0_9"), - _PIN(0x8d8, "LCD_DATA14", 10, 7, "lcd_data14", "gpmc_a18", "eQEP1_index", "mcasp0_axr1", "uart5_rxd", "pr1_mii_mr0_clk", "uart5_ctsn", "gpio0_10"), - _PIN(0x8dc, "LCD_DATA15", 11, 7, "lcd_data15", "gpmc_a19", "eQEP1_strobe", "mcasp0_ahclkx", "mcasp0_axr3", "pr1_mii0_rxdv", "uart5_rtsn", "gpio0_11"), - _PIN(0x8e0, "LCD_VSYNC", 86, 7, "lcd_vsync", "gpmc_a8", "gpmc_a1", "pr1_edio_data_in2", "pr1_edio_data_out2", "pr1_pru1_pru_r30_8", "pr1_pru1_pru_r31_8", "gpio2_22"), - _PIN(0x8e4, "LCD_HSYNC", 87, 7, "lcd_hsync", "gmpc_a9", "gpmc_a2", "pr1_edio_data_in3", "pr1_edio_data_out3", "pr1_pru1_pru_r30_9", "pr1_pru1_pru_r31_9", "gpio2_23"), - _PIN(0x8e8, "LCD_PCLK", 88, 7, "lcd_pclk", "gpmc_a10", "pr1_mii0_crs", "pr1_edio_data_in4", "pr1_edio_data_out4", "pr1_pru1_pru_r30_10", "pr1_pru1_pru_r31_10", "gpio2_24"), - _PIN(0x8ec, "LCD_AC_BIAS_EN", 89, 7, "lcd_ac_bias_en", "gpmc_a11", "pr1_mii1_crs", "pr1_edio_data_in5", "pr1_edio_data_out5", "pr1_pru1_pru_r30_11", "pr1_pru1_pru_r31_11", "gpio2_25"), - _PIN(0x8f0, "MMC0_DAT3", 90, 7, "mmc0_dat3", "gpmc_a20", "uart4_ctsn", "timer5", "uart1_dcdn", "pr1_pru0_pru_r30_8", "pr1_pru0_pru_r31_8", "gpio2_26"), - _PIN(0x8f4, "MMC0_DAT2", 91, 7, "mmc0_dat2", "gpmc_a21", "uart4_rtsn", "timer6", "uart1_dsrn", "pr1_pru0_pru_r30_9", "pr1_pru0_pru_r31_9", "gpio2_27"), - _PIN(0x8f8, "MMC0_DAT1", 92, 7, "mmc0_dat1", "gpmc_a22", "uart5_ctsn", "uart3_rxd", "uart1_dtrn", "pr1_pru0_pru_r30_10", "pr1_pru0_pru_r31_10", "gpio2_28"), - _PIN(0x8fc, "MMC0_DAT0", 93, 7, "mmc0_dat0", "gpmc_a23", "uart5_rtsn", "uart3_txd", "uart1_rin", "pr1_pru0_pru_r30_11", "pr1_pru0_pru_r31_11", "gpio2_29"), - _PIN(0x900, "MMC0_CLK", 94, 7, "mmc0_clk", "gpmc_a24", "uart3_ctsn", "uart2_rxd", "dcan1_tx", "pr1_pru0_pru_r30_12", "pr1_pru0_pru_r31_12", "gpio2_30"), - _PIN(0x904, "MMC0_CMD", 95, 7, "mmc0_cmd", "gpmc_a25", "uart3_rtsn", "uart2_txd", "dcan1_rx", "pr1_pru0_pru_r30_13", "pr1_pru0_pru_r31_13", "gpio2_31"), - _PIN(0x908, "MII1_COL", 96, 7, "gmii1_col", "rmii2_refclk", "spi1_sclk", "uart5_rxd", "mcasp1_axr2", "mmc2_dat3", "mcasp0_axr2", "gpio3_0"), - _PIN(0x90c, "MII1_CRS", 97, 7, "gmii1_crs", "rmii1_crs_dv", "spi1_d0", "I2C1_SDA", "mcasp1_aclkx", "uart5_ctsn", "uart2_rxd", "gpio3_1"), - _PIN(0x910, "MII1_RX_ER", 98, 7, "gmii1_rxerr", "rmii1_rxerr", "spi1_d1", "I2C1_SCL", "mcasp1_fsx", "uart5_rtsn", "uart2_txd", "gpio3_2"), - _PIN(0x914, "MII1_TX_EN", 99, 7, "gmii1_txen", "rmii1_txen", "rgmii1_tctl", "timer4", "mcasp1_axr0", "eQEP0_index", "mmc2_cmd", "gpio3_3"), - _PIN(0x918, "MII1_RX_DV", 100, 7, "gmii1_rxdv", "cd_memory_clk", "rgmii1_rctl", "uart5_txd", "mcasp1_aclkx", "mmc2_dat0", "mcasp0_aclkr", "gpio3_4"), - _PIN(0x91c, "MII1_TXD3", 16, 7, "gmii1_txd3", "dcan0_tx", "rgmii1_td3", "uart4_rxd", "mcasp1_fsx", "mmc2_dat1", "mcasp0_fsr", "gpio0_16"), - _PIN(0x920, "MII1_TXD2", 17, 7, "gmii1_txd2", "dcan0_rx", "rgmii1_td2", "uart4_txd", "mcasp1_axr0", "mmc2_dat2", "mcasp0_ahclkx", "gpio0_17"), - _PIN(0x924, "MII1_TXD1", 21, 7, "gmii1_txd1", "rmii1_txd1", "rgmii1_td1", "mcasp1_fsr", "mcasp1_axr1", "eQEP0A_in", "mmc1_cmd", "gpio0_21"), - _PIN(0x928, "MII1_TXD0", 28, 7, "gmii1_txd0", "rmii1_txd0", "rgmii1_td0", "mcasp1_axr2", "mcasp1_aclkr", "eQEP0B_in", "mmc1_clk", "gpio0_28"), - _PIN(0x92c, "MII1_TX_CLK", 105, 7, "gmii1_txclk", "uart2_rxd", "rgmii1_tclk", "mmc0_dat7", "mmc1_dat0", "uart1_dcdn", "mcasp0_aclkx", "gpio3_9"), - _PIN(0x930, "MII1_RX_CLK", 106, 7, "gmii1_rxclk", "uart2_txd", "rgmii1_rclk", "mmc0_dat6", "mmc1_dat1", "uart1_dsrn", "mcasp0_fsx", "gpio3_10"), - _PIN(0x934, "MII1_RXD3", 82, 7, "gmii1_rxd3", "uart3_rxd", "rgmii1_rd3", "mmc0_dat5", "mmc1_dat2", "uart1_dtrn", "mcasp0_axr0", "gpio2_18"), - _PIN(0x938, "MII1_RXD2", 83, 7, "gmii1_rxd2", "uart3_txd", "rgmii1_rd2", "mmc0_dat4", "mmc1_dat3", "uart1_rin", "mcasp0_axr1", "gpio2_19"), - _PIN(0x93c, "MII1_RXD1", 84, 7, "gmii1_rxd1", "rmii1_rxd1", "rgmii1_rd1", "mcasp1_axr3", "mcasp1_fsr", "eQEP0_strobe", "mmc2_clk", "gpio2_20"), - _PIN(0x940, "MII1_RXD0", 85, 7, "gmii1_rxd0", "rmii1_rxd0", "rgmii1_rd0", "mcasp1_ahclkx", "mcasp1_ahclkr", "mcasp1_aclkr", "mcasp0_axr3", "gpio2_21"), - _PIN(0x944, "RMII1_REF_CLK", 29, 7, "rmii1_refclk", "xdma_event_intr2", "spi1_cs0", "uart5_txd", "mcasp1_axr3", "mmc0_pow", "mcasp1_ahclkx", "gpio0_29"), - _PIN(0x948, "MDIO", 0, 7, "mdio_data", "timer6", "uart5_rxd", "uart3_ctsn", "mmc0_sdcd","mmc1_cmd", "mmc2_cmd","gpio0_0"), - _PIN(0x94c, "MDC", 1, 7, "mdio_clk", "timer5", "uart5_txd", "uart3_rtsn", "mmc0_sdwp", "mmc1_clk", "mmc2_clk", "gpio0_1"), - _PIN(0x950, "SPI0_SCLK", 2, 7, "spi0_sclk", "uart2_rxd", "I2C2_SDA", "ehrpwm0A", "pr1_uart0_cts_n", "pr1_edio_sof", "EMU2", "gpio0_2"), - _PIN(0x954, "SPI0_D0", 3, 7, "spi0_d0", "uart2_txd", "I2C2_SCL", "ehrpwm0B", "pr1_uart0_rts_n", "pr1_edio_latch_in", "EMU3", "gpio0_3"), - _PIN(0x958, "SPI0_D1", 4, 7, "spi0_d1", "mmc1_sdwp", "I2C1_SDA", "ehrpwm0_tripzone_input", "pr1_uart0_rxd", "pr1_edio_data_in0", "pr1_edio_data_out0", "gpio0_4"), - _PIN(0x95c, "SPI0_CS0", 5, 7, "spi0_cs0", "mmc2_sdwp", "I2C1_SCL", "ehrpwm0_synci", "pr1_uart0_txd", "pr1_edio_data_in1", "pr1_edio_data_out1", "gpio0_5"), - _PIN(0x960, "SPI0_CS1", 6, 7, "spi0_cs1", "uart3_rxd", "eCAP1_in_PWM1_out", "mcc0_pow", "xdm_event_intr2", "mmc0_sdcd", "EMU4", "gpio0_6"), - _PIN(0x964, "ECAP0_IN_PWM0_OUT",7, 7, "eCAP0_in_PWM0_out", "uart3_txd", "spi1_cs1", "pr1_ecap0_ecap_capin_apwm_o", "spi1_sclk", "mmc0_sdwp", "xdma_event_intr2", "gpio0_7"), - _PIN(0x968, "UART0_CTSn", 40, 7, "uart0_ctsn", "uart4_rxd", "dcan1_tx", "I2C1_SDA", "spi1_d0", "timer7", "pr1_edc_sync0_out", "gpio1_8"), - _PIN(0x96c, "UART0_RTSn", 41, 7, "uart0_rtsn", "uart4_txd", "dcan1_rx", "I2C1_SCL", "spi1_d1", "spi1_cs0", "pr1_edc_sync1_out", "gpio1_9"), - _PIN(0x970, "UART0_rxd", 42, 7, "uart0_rxd", "spi1_cs0", "dcan0_tx", "I2C2_SDA", "eCAP2_in_PWM2_out", "pr1_pru1_pru_r30_14", "pr1_pru1_pru_r31_14", "gpio1_10"), - _PIN(0x974, "UART0_txd", 43, 7, "uart0_txd", "spi1_cs1", "dcan0_rx", "I2C2_SCL", "eCAP1_in_PWM1_out", "pr1_pru1_pru_r30_15", "pr1_pru1_pru_r31_15", "gpio1_11"), - _PIN(0x978, "UART1_CTSn", 12, 7, "uart1_ctsn", "timer6_mux1", "dcan0_tx", "I2C2_SDA", "spi1_cs0", "pr1_uart0_cts_n", "pr1_edc_latch0_in", "gpio0_12"), - _PIN(0x97c, "UART1_RTSn", 13, 7, "uart1_rtsn", "timer5_mux1", "dcan0_rx", "I2C2_SCL", "spi1_cs1", "pr1_uart0_rts_n", "pr1_edc_latch1_in", "gpio0_13"), - _PIN(0x980, "UART1_RXD", 14, 7, "uart1_rxd", "mmc1_sdwp", "dcan1_tx", "I2C1_SDA", NULL, "pr1_uart0_rxd", "pr1_pru1_pru_r31_16", "gpio0_14"), - _PIN(0x984, "UART1_TXD", 15, 7, "uart1_txd", "mmc2_sdwp", "dcan1_rx", "I2C1_SCL", NULL, "pr1_uart0_txd", "pr1_pru0_pru_r31_16", "gpio0_15"), - _PIN(0x988, "I2C0_SDA", 101, 7, "I2C0_SDA", "timer4", "uart2_ctsn", "eCAP2_in_PWM2_out", NULL, NULL, NULL, "gpio3_5"), - _PIN(0x98c, "I2C0_SCL", 102, 7, "I2C0_SCL", "timer7", "uart2_rtsn", "eCAP1_in_PWM1_out", NULL, NULL, NULL, "gpio3_6"), - _PIN(0x990, "MCASP0_ACLKX", 110, 7, "mcasp0_aclkx", "ehrpwm0A", NULL, "spi1_sclk", "mmc0_sdcd", "pr1_pru0_pru_r30_0", "pr1_pru0_pru_r31_0", "gpio3_14"), - _PIN(0x994, "MCASP0_FSX", 111, 7, "mcasp0_fsx", "ehrpwm0B", NULL, "spi1_d0", "mmc1_sdcd", "pr1_pru0_pru_r30_1", "pr1_pru0_pru_r31_1", "gpio3_15"), - _PIN(0x998, "MCASP0_AXR0", 112, 7, "mcasp0_axr0", "ehrpwm0_tripzone_input", NULL, "spi1_d1", "mmc2_sdcd", "pr1_pru0_pru_r30_2", "pr1_pru0_pru_r31_2", "gpio3_16"), - _PIN(0x99c, "MCASP0_AHCLKR", 113, 7, "mcasp0_ahclkr", "ehrpwm0_synci", "mcasp0_axr2", "spi1_cs0", "eCAP2_in_PWM2_out", "pr1_pru0_pru_r30_3", "pr1_pru0_pru_r31_3", "gpio3_17"), - _PIN(0x9a0, "MCASP0_ACLKR", 114, 7, "mcasp0_aclkr", "eQEP0A_in", "mcasp0_axr2", "mcasp1_aclkx", "mmc0_sdwp", "pr1_pru0_pru_r30_4", "pr1_pru0_pru_r31_4", "gpio3_18"), - _PIN(0x9a4, "MCASP0_FSR", 115, 7, "mcasp0_fsr", "eQEP0B_in", "mcasp0_axr3", "mcasp1_fsx", "EMU2", "pr1_pru0_pru_r30_5", "pr1_pru0_pru_r31_5", "gpio3_19"), - _PIN(0x9a8, "MCASP0_AXR1", 116, 7, "mcasp0_axr1", "eQEP0_index", NULL, "mcasp1_axr0", "EMU3", "pr1_pru0_pru_r30_6", "pr1_pru0_pru_r31_6", "gpio3_20"), - _PIN(0x9ac, "MCASP0_AHCLKX", 117, 7, "mcasp0_ahclkx", "eQEP0_strobe", "mcasp0_axr3", "mcasp1_axr1", "EMU4", "pr1_pru0_pru_r30_7", "pr1_pru0_pru_r31_7", "gpio3_21"), - _PIN(0x9b0, "XDMA_EVENT_INTR0", 19, 7, "xdma_event_intr0", NULL, "timer4", "clkout1", "spi1_cs1", "pr1_pru1_pru_r31_16", "EMU2", "gpio0_19"), - _PIN(0x9b4, "XDMA_EVENT_INTR1", 20, 7, "xdma_event_intr1", NULL, "tclkin", "clkout2", "timer7", "pr1_pru0_pru_r31_16", "EMU3", "gpio0_20"), -#if 0 - _PIN(0x9b8, "nresetin_out", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9bc, "porz", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9c0, "nnmi", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9c4, "osc0_in", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9c8, "osc0_out", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9cc, "osc0_vss", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9d0, "tms", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9d4, "tdi", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9d8, "tdo", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9dc, "tck", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9e0, "ntrst", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), -#endif - _PIN(0x9e4, "EMU0", 103, 7, "EMU0", NULL, NULL, NULL, NULL, NULL, NULL, "gpio3_7"), - _PIN(0x9e8, "EMU1", 104, 0, "EMU1", NULL, NULL, NULL, NULL, NULL, NULL, "gpio3_8"), -#if 0 - _PIN(0x9ec, "osc1_in", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9f0, "osc1_out", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9f4, "osc1_vss", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9f8, "rtc_porz", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0x9fc, "pmic_power_en", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa00, "ext_wakeup", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa04, "enz_kaldo_1p8v", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), -#endif - _PIN(0xa08, "USB0_DM", 0, 0, "USB0_DM", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa0c, "USB0_DP", 0, 0, "USB0_DP", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa10, "USB0_CE", 0, 0, "USB0_CE", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa14, "USB0_ID", 0, 0, "USB0_ID", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa18, "USB0_VBUS", 0, 0, "USB0_VBUS", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa1c, "USB0_DRVVBUS", 18, 7, "USB0_DRVVBUS", NULL, NULL, NULL, NULL, NULL, NULL, "gpio0_18"), - _PIN(0xa20, "USB1_DM", 0, 0, "USB1_DM", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa24, "USB1_DP", 0, 0, "USB1_DP", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa28, "USB1_CE", 0, 0, "USB1_CE", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa2c, "USB1_ID", 0, 0, "USB1_ID", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa30, "USB1_VBUS", 0, 0, "USB1_VBUS", NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa34, "USB1_DRVVBUS", 109, 7, "USB1_DRVVBUS", NULL, NULL, NULL, NULL, NULL, NULL, "gpio3_13"), -#if 0 - _PIN(0xa38, "ddr_resetn", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa3c, "ddr_csn0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa40, "ddr_cke", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa44, "ddr_ck", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa48, "ddr_nck", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa4c, "ddr_casn", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa50, "ddr_rasn", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa54, "ddr_wen", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa58, "ddr_ba0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa5c, "ddr_ba1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa60, "ddr_ba2", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa64, "ddr_a0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa68, "ddr_a1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa6c, "ddr_a2", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa70, "ddr_a3", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa74, "ddr_a4", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa78, "ddr_a5", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa7c, "ddr_a6", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa80, "ddr_a7", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa84, "ddr_a8", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa88, "ddr_a9", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa8c, "ddr_a10", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa90, "ddr_a11", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa94, "ddr_a12", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa98, "ddr_a13", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xa9c, "ddr_a14", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaa0, "ddr_a15", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaa4, "ddr_odt", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaa8, "ddr_d0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaac, "ddr_d1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xab0, "ddr_d2", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xab4, "ddr_d3", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xab8, "ddr_d4", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xabc, "ddr_d5", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xac0, "ddr_d6", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xac4, "ddr_d7", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xac8, "ddr_d8", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xacc, "ddr_d9", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xad0, "ddr_d10", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xad4, "ddr_d11", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xad8, "ddr_d12", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xadc, "ddr_d13", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xae0, "ddr_d14", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xae4, "ddr_d15", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xae8, "ddr_dqm0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaec, "ddr_dqm1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaf0, "ddr_dqs0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaf4, "ddr_dqsn0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xaf8, "ddr_dqs1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xafc, "ddr_dqsn1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb00, "ddr_vref", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb04, "ddr_vtp", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb08, "ddr_strben0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb0c, "ddr_strben1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb2c, "ain0", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb28, "ain1", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb24, "ain2", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb20, "ain3", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb1c, "ain4", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb18, "ain5", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb14, "ain6", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb10, "ain7", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb30, "vrefp", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb34, "vrefn", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb38, "avdd", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb3c, "avss", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb40, "iforce", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb44, "vsense", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - _PIN(0xb48, "testout", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), -#endif - { .ballname = NULL }, -}; - -const struct ti_scm_device ti_scm_dev = { - .padconf_muxmode_mask = 0x7, - .padconf_sate_mask = 0x78, - .padstate = (struct ti_scm_padstate *) &ti_padstate_devmap, - .padconf = (struct ti_scm_padconf *) &ti_padconf_devmap, -}; - -int -ti_scm_padconf_set_gpioflags(uint32_t gpio, uint32_t flags) -{ - unsigned int state = 0; - if (flags & GPIO_PIN_OUTPUT) { - if (flags & GPIO_PIN_PULLUP) - state = PADCONF_OUTPUT_PULLUP; - else - state = PADCONF_OUTPUT; - } else if (flags & GPIO_PIN_INPUT) { - if (flags & GPIO_PIN_PULLUP) - state = PADCONF_INPUT_PULLUP; - else if (flags & GPIO_PIN_PULLDOWN) - state = PADCONF_INPUT_PULLDOWN; - else - state = PADCONF_INPUT; - } - return ti_scm_padconf_set_gpiomode(gpio, state); -} - -void -ti_scm_padconf_get_gpioflags(uint32_t gpio, uint32_t *flags) -{ - unsigned int state; - if (ti_scm_padconf_get_gpiomode(gpio, &state) != 0) - *flags = 0; - else { - switch (state) { - case PADCONF_OUTPUT: - *flags = GPIO_PIN_OUTPUT; - break; - case PADCONF_OUTPUT_PULLUP: - *flags = GPIO_PIN_OUTPUT | GPIO_PIN_PULLUP; - break; - case PADCONF_INPUT: - *flags = GPIO_PIN_INPUT; - break; - case PADCONF_INPUT_PULLUP: - *flags = GPIO_PIN_INPUT | GPIO_PIN_PULLUP; - break; - case PADCONF_INPUT_PULLDOWN: - *flags = GPIO_PIN_INPUT | GPIO_PIN_PULLDOWN; - break; - default: - *flags = 0; - break; - } - } -} - +#endif /* AM335X_SCM_PADCONF_H */ Modified: head/sys/arm/ti/am335x/files.am335x ============================================================================== --- head/sys/arm/ti/am335x/files.am335x Sat Oct 18 17:36:57 2014 (r273261) +++ head/sys/arm/ti/am335x/files.am335x Sat Oct 18 17:51:34 2014 (r273262) @@ -3,6 +3,7 @@ arm/ti/aintc.c standard arm/ti/am335x/am335x_dmtimer.c standard +arm/ti/am335x/am335x_gpio.c optional gpio arm/ti/am335x/am335x_lcd.c optional sc arm/ti/am335x/am335x_lcd_syscons.c optional sc arm/ti/am335x/am335x_pmic.c optional am335x_pmic Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Sat Oct 18 17:36:57 2014 (r273261) +++ head/sys/arm/ti/files.ti Sat Oct 18 17:51:34 2014 (r273262) @@ -21,6 +21,7 @@ arm/ti/ti_pruss.c optional ti_pruss arm/ti/ti_wdt.c optional ti_wdt arm/ti/ti_adc.c optional ti_adc arm/ti/ti_gpio.c optional gpio +arm/ti/ti_gpio_if.m optional gpio arm/ti/ti_i2c.c optional ti_i2c arm/ti/ti_sdhci.c optional sdhci Modified: head/sys/arm/ti/omap4/files.omap4 ============================================================================== --- head/sys/arm/ti/omap4/files.omap4 Sat Oct 18 17:36:57 2014 (r273261) +++ head/sys/arm/ti/omap4/files.omap4 Sat Oct 18 17:51:34 2014 (r273262) @@ -7,6 +7,7 @@ arm/ti/ti_smc.S standard arm/ti/usb/omap_ehci.c optional usb ehci arm/ti/ti_sdma.c optional ti_sdma +arm/ti/omap4/omap4_gpio.c optional gpio arm/ti/omap4/omap4_l2cache.c optional pl310 arm/ti/omap4/omap4_prcm_clks.c standard arm/ti/omap4/omap4_scm_padconf.c standard Copied and modified: head/sys/arm/ti/omap4/omap4_gpio.c (from r273259, head/sys/arm/ti/omap4/omap4_scm_padconf.c) ============================================================================== --- head/sys/arm/ti/omap4/omap4_scm_padconf.c Sat Oct 18 17:11:02 2014 (r273259, copy source) +++ head/sys/arm/ti/omap4/omap4_gpio.c Sat Oct 18 17:51:34 2014 (r273262) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2011 - * Ben Gray . + * Copyright (c) 2011 Ben Gray . + * Copyright (c) 2014 Andrew Turner * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,330 +34,47 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include -#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -/* - * This file defines the pin mux configuration for the OMAP4xxx series of - * devices. - * - * How This is Suppose to Work - * =========================== - * - There is a top level ti_scm module (System Control Module) that is - * the interface for all omap drivers, which can use it to change the mux - * settings for individual pins. (That said, typically the pin mux settings - * are set to defaults by the 'hints' and then not altered by the driver). - * - * - For this to work the top level driver needs all the pin info, and hence - * this is where this file comes in. Here we define all the pin information - * that is supplied to the top level driver. - * - */ +#include -#define CONTROL_PADCONF_WAKEUP_EVENT (1UL << 15) -#define CONTROL_PADCONF_WAKEUP_ENABLE (1UL << 14) -#define CONTROL_PADCONF_OFF_PULL_UP (1UL << 13) -#define CONTROL_PADCONF_OFF_PULL_ENABLE (1UL << 12) -#define CONTROL_PADCONF_OFF_OUT_HIGH (1UL << 11) -#define CONTROL_PADCONF_OFF_OUT_ENABLE (1UL << 10) -#define CONTROL_PADCONF_OFF_ENABLE (1UL << 9) -#define CONTROL_PADCONF_INPUT_ENABLE (1UL << 8) -#define CONTROL_PADCONF_PULL_UP (1UL << 4) -#define CONTROL_PADCONF_PULL_ENABLE (1UL << 3) -#define CONTROL_PADCONF_MUXMODE_MASK (0x7) - -#define CONTROL_PADCONF_SATE_MASK ( CONTROL_PADCONF_WAKEUP_EVENT \ - | CONTROL_PADCONF_WAKEUP_ENABLE \ - | CONTROL_PADCONF_OFF_PULL_UP \ - | CONTROL_PADCONF_OFF_PULL_ENABLE \ - | CONTROL_PADCONF_OFF_OUT_HIGH \ - | CONTROL_PADCONF_OFF_OUT_ENABLE \ - | CONTROL_PADCONF_OFF_ENABLE \ - | CONTROL_PADCONF_INPUT_ENABLE \ - | CONTROL_PADCONF_PULL_UP \ - | CONTROL_PADCONF_PULL_ENABLE ) - -/* Active pin states */ -#define PADCONF_PIN_OUTPUT 0 -#define PADCONF_PIN_INPUT CONTROL_PADCONF_INPUT_ENABLE -#define PADCONF_PIN_INPUT_PULLUP ( CONTROL_PADCONF_INPUT_ENABLE \ - | CONTROL_PADCONF_PULL_ENABLE \ - | CONTROL_PADCONF_PULL_UP) -#define PADCONF_PIN_INPUT_PULLDOWN ( CONTROL_PADCONF_INPUT_ENABLE \ - | CONTROL_PADCONF_PULL_ENABLE ) - -/* Off mode states */ -#define PADCONF_PIN_OFF_NONE 0 -#define PADCONF_PIN_OFF_OUTPUT_HIGH ( CONTROL_PADCONF_OFF_ENABLE \ - | CONTROL_PADCONF_OFF_OUT_ENABLE \ - | CONTROL_PADCONF_OFF_OUT_HIGH) -#define PADCONF_PIN_OFF_OUTPUT_LOW ( CONTROL_PADCONF_OFF_ENABLE \ - | CONTROL_PADCONF_OFF_OUT_ENABLE) -#define PADCONF_PIN_OFF_INPUT_PULLUP ( CONTROL_PADCONF_OFF_ENABLE \ - | CONTROL_PADCONF_OFF_PULL_ENABLE \ - | CONTROL_PADCONF_OFF_PULL_UP) -#define PADCONF_PIN_OFF_INPUT_PULLDOWN ( CONTROL_PADCONF_OFF_ENABLE \ - | CONTROL_PADCONF_OFF_PULL_ENABLE) -#define PADCONF_PIN_OFF_WAKEUPENABLE CONTROL_PADCONF_WAKEUP_ENABLE - - -#define _PINDEF(r, b, gp, gm, m0, m1, m2, m3, m4, m5, m6, m7) \ - { .reg_off = r, \ - .gpio_pin = gp, \ - .gpio_mode = gm, \ - .ballname = b, \ - .muxmodes[0] = m0, \ - .muxmodes[1] = m1, \ - .muxmodes[2] = m2, \ - .muxmodes[3] = m3, \ - .muxmodes[4] = m4, \ - .muxmodes[5] = m5, \ - .muxmodes[6] = m6, \ - .muxmodes[7] = m7, \ - } +#include "ti_gpio_if.h" -const static struct ti_scm_padstate ti_padstate_devmap[] = { - {"output", PADCONF_PIN_OUTPUT}, - {"input", PADCONF_PIN_INPUT}, - {"input_pullup", PADCONF_PIN_INPUT_PULLUP}, - {"input_pulldown", PADCONF_PIN_INPUT_PULLDOWN}, - { .state = NULL } +static struct ofw_compat_data compat_data[] = { + {"ti,omap4-gpio", 1}, + {"ti,gpio", 1}, + {NULL, 0}, }; -/* - * Table 18-10, p. 3470 - */ -const static struct ti_scm_padconf ti_padconf_devmap[] = { - _PINDEF(0x0040, "c12", 0, 0, "gpmc_ad0", "sdmmc2_dat0", NULL, NULL, NULL, NULL, NULL, NULL), - _PINDEF(0x0042, "d12", 0, 0, "gpmc_ad1", "sdmmc2_dat1", NULL, NULL, NULL, NULL, NULL, NULL), - _PINDEF(0x0044, "c13", 0, 0, "gpmc_ad2", "sdmmc2_dat2", NULL, NULL, NULL, NULL, NULL, NULL), - _PINDEF(0x0046, "d13", 0, 0, "gpmc_ad3", "sdmmc2_dat3", NULL, NULL, NULL, NULL, NULL, NULL), - _PINDEF(0x0048, "c15", 0, 0, "gpmc_ad4", "sdmmc2_dat4", "sdmmc2_dir_dat0", NULL, NULL, NULL, NULL, NULL), - _PINDEF(0x004a, "d15", 0, 0, "gpmc_ad5", "sdmmc2_dat5", "sdmmc2_dir_dat1", NULL, NULL, NULL, NULL, NULL), - _PINDEF(0x004c, "a16", 0, 0, "gpmc_ad6", "sdmmc2_dat6", "sdmmc2_dir_cmd", NULL, NULL, NULL, NULL, NULL), - _PINDEF(0x004e, "b16", 0, 0, "gpmc_ad7", "sdmmc2_dat7", "sdmmc2_clk_fdbk", NULL, NULL, NULL, NULL, NULL), - _PINDEF(0x0050, "c16", 32, 3, "gpmc_ad8", "kpd_row0", "c2c_data15", "gpio_32", NULL, "sdmmc1_dat0", NULL, NULL), - _PINDEF(0x0052, "d16", 33, 3, "gpmc_ad9", "kpd_row1", "c2c_data14", "gpio_33", NULL, "sdmmc1_dat1", NULL, NULL), - _PINDEF(0x0054, "c17", 34, 3, "gpmc_ad10", "kpd_row2", "c2c_data13", "gpio_34", NULL, "sdmmc1_dat2", NULL, NULL), - _PINDEF(0x0056, "d17", 35, 3, "gpmc_ad11", "kpd_row3", "c2c_data12", "gpio_35", NULL, "sdmmc1_dat3", NULL, NULL), - _PINDEF(0x0058, "c18", 36, 3, "gpmc_ad12", "kpd_col0", "c2c_data11", "gpio_36", NULL, "sdmmc1_dat4", NULL, NULL), - _PINDEF(0x005a, "d18", 37, 3, "gpmc_ad13", "kpd_col1", "c2c_data10", "gpio_37", NULL, "sdmmc1_dat5", NULL, NULL), - _PINDEF(0x005c, "c19", 38, 3, "gpmc_ad14", "kpd_col2", "c2c_data9", "gpio_38", NULL, "sdmmc1_dat6", NULL, NULL), - _PINDEF(0x005e, "d19", 39, 3, "gpmc_ad15", "kpd_col3", "c2c_data8", "gpio_39", NULL, "sdmmc1_dat7", NULL, NULL), - _PINDEF(0x0060, "b17", 40, 3, "gpmc_a16", "kpd_row4", "c2c_datain0", "gpio_40", "venc_656_data0", NULL, NULL, "safe_mode"), - _PINDEF(0x0062, "a18", 41, 3, "gpmc_a17", "kpd_row5", "c2c_datain1", "gpio_41", "venc_656_data1", NULL, NULL, "safe_mode"), - _PINDEF(0x0064, "b18", 42, 3, "gpmc_a18", "kpd_row6", "c2c_datain2", "gpio_42", "venc_656_data2", NULL, NULL, "safe_mode"), - _PINDEF(0x0066, "a19", 43, 3, "gpmc_a19", "kpd_row7", "c2c_datain3", "gpio_43", "venc_656_data3", NULL, NULL, "safe_mode"), - _PINDEF(0x0068, "b19", 44, 3, "gpmc_a20", "kpd_col4", "c2c_datain4", "gpio_44", "venc_656_data4", NULL, NULL, "safe_mode"), - _PINDEF(0x006a, "b20", 45, 3, "gpmc_a21", "kpd_col5", "c2c_datain5", "gpio_45", "venc_656_data5", NULL, NULL, "safe_mode"), - _PINDEF(0x006c, "a21", 46, 3, "gpmc_a22", "kpd_col6", "c2c_datain6", "gpio_46", "venc_656_data6", NULL, NULL, "safe_mode"), - _PINDEF(0x006e, "b21", 47, 3, "gpmc_a23", "kpd_col7", "c2c_datain7", "gpio_47", "venc_656_data7", NULL, NULL, "safe_mode"), - _PINDEF(0x0070, "c20", 48, 3, "gpmc_a24", "kpd_col8", "c2c_clkout0", "gpio_48", NULL, NULL, NULL, "safe_mode"), - _PINDEF(0x0072, "d20", 49, 3, "gpmc_a25", NULL, "c2c_clkout1", "gpio_49", NULL, NULL, NULL, "safe_mode"), - _PINDEF(0x0074, "b25", 50, 3, "gpmc_ncs0", NULL, NULL, "gpio_50", "sys_ndmareq0", NULL, NULL, NULL), - _PINDEF(0x0076, "c21", 51, 3, "gpmc_ncs1", NULL, "c2c_dataout6", "gpio_51", NULL, NULL, NULL, "safe_mode"), - _PINDEF(0x0078, "d21", 52, 3, "gpmc_ncs2", "kpd_row8", "c2c_dataout7", "gpio_52", NULL, NULL, NULL, "safe_mode"), - _PINDEF(0x007a, "c22", 53, 3, "gpmc_ncs3", "gpmc_dir", "c2c_dataout4", "gpio_53", NULL, NULL, NULL, "safe_mode"), - _PINDEF(0x007c, "c25", 54, 3, "gpmc_nwp", "dsi1_te0", NULL, "gpio_54", "sys_ndmareq1", NULL, NULL, NULL), - _PINDEF(0x007e, "b22", 55, 3, "gpmc_clk", NULL, NULL, "gpio_55", "sys_ndmareq2", "sdmmc1_cmd", NULL, NULL), - _PINDEF(0x0080, "d25", 56, 3, "gpmc_nadv_ale", "dsi1_te1", NULL, "gpio_56", "sys_ndmareq3", "sdmmc1_clk", NULL, NULL), - _PINDEF(0x0082, "b11", 0, 0, "gpmc_noe", "sdmmc2_clk", NULL, NULL, NULL, NULL, NULL, NULL), - _PINDEF(0x0084, "b12", 0, 0, "gpmc_nwe", "sdmmc2_cmd", NULL, NULL, NULL, NULL, NULL, NULL), - _PINDEF(0x0086, "c23", 59, 3, "gpmc_nbe0_cle", "dsi2_te0", NULL, "gpio_59", NULL, NULL, NULL, NULL), - _PINDEF(0x0088, "d22", 60, 3, "gpmc_nbe1", NULL, "c2c_dataout5", "gpio_60", NULL, NULL, NULL, "safe_mode"), - _PINDEF(0x008a, "b26", 61, 3, "gpmc_wait0", "dsi2_te1", NULL, "gpio_61", NULL, NULL, NULL, NULL), - _PINDEF(0x008c, "b23", 62, 3, "gpmc_wait1", NULL, "c2c_dataout2", "gpio_62", NULL, NULL, NULL, "safe_mode"), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 18:27:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CA1317F; Sat, 18 Oct 2014 18:27:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38FE4C56; Sat, 18 Oct 2014 18:27:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IIRPji085850; Sat, 18 Oct 2014 18:27:25 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IIRPMW085849; Sat, 18 Oct 2014 18:27:25 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201410181827.s9IIRPMW085849@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 18 Oct 2014 18:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273263 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 18:27:25 -0000 Author: loos Date: Sat Oct 18 18:27:24 2014 New Revision: 273263 URL: https://svnweb.freebsd.org/changeset/base/273263 Log: Fix the chan address for mtx_sleep() on bus wait. Without this fix the threads waiting for the bus would never wake. X-MFC-With: r270230 Modified: head/sys/arm/ti/ti_i2c.c Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Sat Oct 18 17:51:34 2014 (r273262) +++ head/sys/arm/ti/ti_i2c.c Sat Oct 18 18:27:24 2014 (r273263) @@ -380,7 +380,7 @@ ti_i2c_transfer(device_t dev, struct iic /* If the controller is busy wait until it is available. */ while (sc->sc_bus_inuse == 1) - mtx_sleep(dev, &sc->sc_mtx, 0, "i2cbuswait", 0); + mtx_sleep(sc, &sc->sc_mtx, 0, "i2cbuswait", 0); /* Now we have control over the I2C controller. */ sc->sc_bus_inuse = 1; From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 19:01:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E639047A; Sat, 18 Oct 2014 19:01:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8656F10; Sat, 18 Oct 2014 19:01:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IJ17pb003708; Sat, 18 Oct 2014 19:01:07 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IJ17LF003707; Sat, 18 Oct 2014 19:01:07 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201410181901.s9IJ17LF003707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 18 Oct 2014 19:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273264 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 19:01:08 -0000 Author: loos Date: Sat Oct 18 19:01:07 2014 New Revision: 273264 URL: https://svnweb.freebsd.org/changeset/base/273264 Log: Add a workaround needed to fix a bug of Arasan Host Controller where it may lose the contents of consecutive writes (that happens within two SD card clock cycles). This fixes the causes of instability during the SD card detection and identification on Raspberry Pi (which happens at 400 kHz and so was much more vulnerable to this issue). Remove the previous workaround which clearly can't provide the same effect. MFC after: 1 week Relnotes: yes Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Oct 18 18:27:24 2014 (r273263) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Oct 18 19:01:07 2014 (r273264) @@ -312,21 +312,15 @@ RD4(struct bcm_sdhci_softc *sc, bus_size static inline void WR4(struct bcm_sdhci_softc *sc, bus_size_t off, uint32_t val) { - bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); - if ((off != SDHCI_BUFFER && off != SDHCI_INT_STATUS && off != SDHCI_CLOCK_CONTROL)) - { - int timeout = 100000; - while (val != bus_space_read_4(sc->sc_bst, sc->sc_bsh, off) - && --timeout > 0) - continue; - - if (timeout <= 0) - printf("sdhci_brcm: writing 0x%X to reg 0x%X " - "always gives 0x%X\n", - val, (uint32_t)off, - bus_space_read_4(sc->sc_bst, sc->sc_bsh, off)); - } + bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); + /* + * The Arasan HC has a bug where it may lose the content of + * consecutive writes to registers that are within two SD-card + * clock cycles of each other (a clock domain crossing problem). + */ + if (sc->sc_slot.clock > 0) + DELAY(((2 * 1000000) / sc->sc_slot.clock) + 1); } static uint8_t From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 19:25:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49351DD5; Sat, 18 Oct 2014 19:25:52 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 05789172; Sat, 18 Oct 2014 19:25:51 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id C5BC7C596; Sat, 18 Oct 2014 19:25:43 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 3A7045113; Sat, 18 Oct 2014 21:25:30 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Gleb Smirnoff Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> <86wq81y9fz.fsf@nine.des.no> <20141016225955.GE73266@FreeBSD.org> <86wq7zwq1w.fsf@nine.des.no> <20141017000857.GH73266@FreeBSD.org> Date: Sat, 18 Oct 2014 21:25:29 +0200 In-Reply-To: <20141017000857.GH73266@FreeBSD.org> (Gleb Smirnoff's message of "Fri, 17 Oct 2014 04:08:57 +0400") Message-ID: <86a94t41ue.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers , Ed Maste , svn-src-all , "George V. Neville-Neil" , Olivier =?utf-8?Q?Cochard-Labb=C3=A9?= , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 19:25:52 -0000 Gleb Smirnoff writes: > Dag-Erling Sm=C3=B8rgrav writes: > > It's not intended as a "general kernel hashing function". It is > > intended solely for pf. > Why? If so, it should live in pf and not compiled uncoditionally into > all kernels. Anyway, I don't see reason for doing it non-generic. OK. I will add a generic (unaligned) implementation and a man page. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 19:36:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06928E9; Sat, 18 Oct 2014 19:36:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E546722A; Sat, 18 Oct 2014 19:36:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IJaD9q018936; Sat, 18 Oct 2014 19:36:13 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IJaCwu018930; Sat, 18 Oct 2014 19:36:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201410181936.s9IJaCwu018930@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 18 Oct 2014 19:36:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273266 - in head: lib/libkvm sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 19:36:14 -0000 Author: adrian Date: Sat Oct 18 19:36:11 2014 New Revision: 273266 URL: https://svnweb.freebsd.org/changeset/base/273266 Log: Update the ULE scheduler + thread and kinfo structs to use int for cpuid rather than u_char. To try and play nice with the ABI, the u_char CPU ID values are clamped at 254. The new fields now contain the full CPU ID, or -1 for no cpu. Differential Revision: D955 Reviewed by: jhb, kib Sponsored by: Norse Corp, Inc. Modified: head/lib/libkvm/kvm_proc.c head/sys/compat/freebsd32/freebsd32.h head/sys/kern/kern_proc.c head/sys/kern/sched_ule.c head/sys/sys/proc.h head/sys/sys/user.h Modified: head/lib/libkvm/kvm_proc.c ============================================================================== --- head/lib/libkvm/kvm_proc.c Sat Oct 18 19:22:59 2014 (r273265) +++ head/lib/libkvm/kvm_proc.c Sat Oct 18 19:36:11 2014 (r273266) @@ -431,6 +431,24 @@ nopgrp: strlcpy(kp->ki_tdname, mtd.td_name, sizeof(kp->ki_tdname)); kp->ki_pctcpu = 0; kp->ki_rqindex = 0; + + /* + * Note: legacy fields; wraps at NO_CPU_OLD or the + * old max CPU value as appropriate + */ + if (mtd.td_lastcpu == NOCPU) + kp->ki_lastcpu_old = NOCPU_OLD; + else if (mtd.td_lastcpu > MAXCPU_OLD) + kp->ki_lastcpu_old = MAXCPU_OLD; + else + kp->ki_lastcpu_old = mtd.td_lastcpu; + + if (mtd.td_oncpu == NOCPU) + kp->ki_oncpu_old = NOCPU_OLD; + else if (mtd.td_oncpu > MAXCPU_OLD) + kp->ki_oncpu_old = MAXCPU_OLD; + else + kp->ki_oncpu_old = mtd.td_oncpu; } else { kp->ki_stat = SZOMB; } Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Sat Oct 18 19:22:59 2014 (r273265) +++ head/sys/compat/freebsd32/freebsd32.h Sat Oct 18 19:36:11 2014 (r273266) @@ -332,8 +332,8 @@ struct kinfo_proc32 { signed char ki_nice; char ki_lock; char ki_rqindex; - u_char ki_oncpu; - u_char ki_lastcpu; + u_char ki_oncpu_old; + u_char ki_lastcpu_old; char ki_tdname[TDNAMLEN+1]; char ki_wmesg[WMESGLEN+1]; char ki_login[LOGNAMELEN+1]; @@ -343,6 +343,8 @@ struct kinfo_proc32 { char ki_loginclass[LOGINCLASSLEN+1]; char ki_sparestrings[50]; int ki_spareints[KI_NSPARE_INT]; + int ki_oncpu; + int ki_lastcpu; int ki_tracer; int ki_flag2; int ki_fibnum; Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sat Oct 18 19:22:59 2014 (r273265) +++ head/sys/kern/kern_proc.c Sat Oct 18 19:36:11 2014 (r273266) @@ -984,6 +984,25 @@ fill_kinfo_thread(struct thread *td, str kp->ki_wchan = td->td_wchan; kp->ki_pri.pri_level = td->td_priority; kp->ki_pri.pri_native = td->td_base_pri; + + /* + * Note: legacy fields; clamp at the old NOCPU value and/or + * the maximum u_char CPU value. + */ + if (td->td_lastcpu == NOCPU) + kp->ki_lastcpu_old = NOCPU_OLD; + else if (td->td_lastcpu > MAXCPU_OLD) + kp->ki_lastcpu_old = MAXCPU_OLD; + else + kp->ki_lastcpu_old = td->td_lastcpu; + + if (td->td_oncpu == NOCPU) + kp->ki_oncpu_old = NOCPU_OLD; + else if (td->td_oncpu > MAXCPU_OLD) + kp->ki_oncpu_old = MAXCPU_OLD; + else + kp->ki_oncpu_old = td->td_oncpu; + kp->ki_lastcpu = td->td_lastcpu; kp->ki_oncpu = td->td_oncpu; kp->ki_tdflags = td->td_flags; @@ -1164,6 +1183,11 @@ freebsd32_kinfo_proc_out(const struct ki CP(*ki, *ki32, ki_rqindex); CP(*ki, *ki32, ki_oncpu); CP(*ki, *ki32, ki_lastcpu); + + /* XXX TODO: wrap cpu value as appropriate */ + CP(*ki, *ki32, ki_oncpu_old); + CP(*ki, *ki32, ki_lastcpu_old); + bcopy(ki->ki_tdname, ki32->ki_tdname, TDNAMLEN + 1); bcopy(ki->ki_wmesg, ki32->ki_wmesg, WMESGLEN + 1); bcopy(ki->ki_login, ki32->ki_login, LOGNAMELEN + 1); Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sat Oct 18 19:22:59 2014 (r273265) +++ head/sys/kern/sched_ule.c Sat Oct 18 19:36:11 2014 (r273266) @@ -90,7 +90,7 @@ dtrace_vtime_switch_func_t dtrace_vtime_ struct td_sched { struct runq *ts_runq; /* Run-queue we're queued on. */ short ts_flags; /* TSF_* flags. */ - u_char ts_cpu; /* CPU that we have affinity for. */ + int ts_cpu; /* CPU that we have affinity for. */ int ts_rltick; /* Real last tick, for affinity. */ int ts_slice; /* Ticks of slice remaining. */ u_int ts_slptime; /* Number of ticks we vol. slept */ Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Oct 18 19:22:59 2014 (r273265) +++ head/sys/sys/proc.h Sat Oct 18 19:36:11 2014 (r273266) @@ -229,8 +229,8 @@ struct thread { int td_sqqueue; /* (t) Sleepqueue queue blocked on. */ void *td_wchan; /* (t) Sleep address. */ const char *td_wmesg; /* (t) Reason for sleep. */ - u_char td_lastcpu; /* (t) Last cpu we were on. */ - u_char td_oncpu; /* (t) Which cpu we are on. */ + int td_lastcpu; /* (t) Last cpu we were on. */ + int td_oncpu; /* (t) Which cpu we are on. */ volatile u_char td_owepreempt; /* (k*) Preempt on last critical_exit */ u_char td_tsqueue; /* (t) Turnstile queue blocked on. */ short td_locks; /* (k) Count of non-spin locks. */ @@ -601,7 +601,9 @@ struct proc { #define p_session p_pgrp->pg_session #define p_pgid p_pgrp->pg_id -#define NOCPU 0xff /* For when we aren't on a CPU. */ +#define NOCPU (-1) /* For when we aren't on a CPU. */ +#define NOCPU_OLD (255) +#define MAXCPU_OLD (254) #define PROC_SLOCK(p) mtx_lock_spin(&(p)->p_slock) #define PROC_SUNLOCK(p) mtx_unlock_spin(&(p)->p_slock) Modified: head/sys/sys/user.h ============================================================================== --- head/sys/sys/user.h Sat Oct 18 19:22:59 2014 (r273265) +++ head/sys/sys/user.h Sat Oct 18 19:36:11 2014 (r273266) @@ -84,7 +84,7 @@ * it in two places: function fill_kinfo_proc in sys/kern/kern_proc.c and * function kvm_proclist in lib/libkvm/kvm_proc.c . */ -#define KI_NSPARE_INT 6 +#define KI_NSPARE_INT 4 #define KI_NSPARE_LONG 12 #define KI_NSPARE_PTR 6 @@ -171,8 +171,8 @@ struct kinfo_proc { signed char ki_nice; /* Process "nice" value */ char ki_lock; /* Process lock (prevent swap) count */ char ki_rqindex; /* Run queue index */ - u_char ki_oncpu; /* Which cpu we are on */ - u_char ki_lastcpu; /* Last cpu we were on */ + u_char ki_oncpu_old; /* Which cpu we are on (legacy) */ + u_char ki_lastcpu_old; /* Last cpu we were on (legacy) */ char ki_tdname[TDNAMLEN+1]; /* thread name */ char ki_wmesg[WMESGLEN+1]; /* wchan message */ char ki_login[LOGNAMELEN+1]; /* setlogin name */ @@ -187,6 +187,8 @@ struct kinfo_proc { */ char ki_sparestrings[50]; /* spare string space */ int ki_spareints[KI_NSPARE_INT]; /* spare room for growth */ + int ki_oncpu; /* Which cpu we are on */ + int ki_lastcpu; /* Last cpu we were on */ int ki_tracer; /* Pid of tracing process */ int ki_flag2; /* P2_* flags */ int ki_fibnum; /* Default FIB number */ From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 22:11:11 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 884E950F; Sat, 18 Oct 2014 22:11:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73D1C12D; Sat, 18 Oct 2014 22:11:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IMBB2L090623; Sat, 18 Oct 2014 22:11:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IMBBUr090622; Sat, 18 Oct 2014 22:11:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410182211.s9IMBBUr090622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 18 Oct 2014 22:11:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273267 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 22:11:11 -0000 Author: delphij Date: Sat Oct 18 22:11:10 2014 New Revision: 273267 URL: https://svnweb.freebsd.org/changeset/base/273267 Log: Add tunable vfs.zfs.space_map_blksz for space map's maximum block size. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Sat Oct 18 19:36:11 2014 (r273266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Sat Oct 18 22:11:10 2014 (r273267) @@ -37,6 +37,8 @@ #include #include +SYSCTL_DECL(_vfs_zfs); + /* * The data for a given space map can be kept on blocks of any size. * Larger blocks entail fewer i/o operations, but they also cause the @@ -44,6 +46,8 @@ * when only a few blocks have changed since the last transaction group. */ int space_map_blksz = (1 << 12); +SYSCTL_INT(_vfs_zfs, OID_AUTO, space_map_blksz, CTLFLAG_RDTUN, &space_map_blksz, 0, + "Maximum block size for space map. Must be power of 2 and greater than 4096."); /* * Load the space map disk into the specified range tree. Segments of maptype From owner-svn-src-head@FreeBSD.ORG Sat Oct 18 22:15:13 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76B02682; Sat, 18 Oct 2014 22:15:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 615BD156; Sat, 18 Oct 2014 22:15:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9IMFDeI093528; Sat, 18 Oct 2014 22:15:13 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9IMFC4F093524; Sat, 18 Oct 2014 22:15:12 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410182215.s9IMFC4F093524@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 18 Oct 2014 22:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273268 - in head: share/man/man9 sys/libkern sys/netpfil/pf sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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, 18 Oct 2014 22:15:13 -0000 Author: des Date: Sat Oct 18 22:15:11 2014 New Revision: 273268 URL: https://svnweb.freebsd.org/changeset/base/273268 Log: Add a complete implementation of MurmurHash3. Tweak both implementations so they match the established idiom. Document them in hash(9). MFC after: 1 month MFC with: r272906 Modified: head/share/man/man9/hash.9 head/sys/libkern/murmur3_32.c head/sys/netpfil/pf/pf.c head/sys/sys/hash.h Modified: head/share/man/man9/hash.9 ============================================================================== --- head/share/man/man9/hash.9 Sat Oct 18 22:11:10 2014 (r273267) +++ head/share/man/man9/hash.9 Sat Oct 18 22:15:11 2014 (r273268) @@ -26,7 +26,7 @@ .\" $OpenBSD: hash.9,v 1.5 2003/04/17 05:08:39 jmc Exp $ .\" $FreeBSD$ .\" -.Dd September 4, 2012 +.Dd October 18, 2014 .Dt HASH 9 .Os .Sh NAME @@ -37,8 +37,10 @@ .Nm hash32_strn , .Nm hash32_stre , .Nm hash32_strne , +.Nm jenkins_hash , .Nm jenkins_hash32 , -.Nm jenkins_hash +.Nm murmur3_32_hash , +.Nm murmur3_32_hash32 .Nd general kernel hashing functions .Sh SYNOPSIS .In sys/hash.h @@ -56,6 +58,10 @@ .Fn jenkins_hash "const void *buf" "size_t len" "uint32_t hash" .Ft uint32_t .Fn jenkins_hash32 "const uint32_t *buf" "size_t count" "uint32_t hash" +.Ft uint32_t +.Fn murmur3_32_hash "const void *buf" "size_t len" "uint32_t hash" +.Ft uint32_t +.Fn murmur3_32_hash32 "const uint32_t *buf" "size_t count" "uint32_t hash" .Sh DESCRIPTION The .Fn hash32 @@ -130,6 +136,16 @@ sized arrays, thus is simplier and faste It accepts an array of .Ft uint32_t values in its first argument and size of this array in the second argument. +.Pp +The +.Fn murmur3_32_hash +and +.Fn murmur3_32_hash32 +functions are similar to +.Fn jenkins_hash +and +.Fn jenkins_hash32 , +but implement the 32-bit version of MurmurHash3. .Sh RETURN VALUES The .Fn hash32 @@ -185,6 +201,10 @@ The .Nm jenkins_hash functions were added in .Fx 10.0 . +The +.Nm murmur3_32_hash +functions were added in +.Fx 10.1 . .Sh AUTHORS The .Nm hash32 @@ -192,5 +212,9 @@ functions were written by .An Tobias Weingartner . The .Nm jenkins_hash -functions was written by -Bob Jenkins . +functions were written by +.An Bob Jenkins . +The +.Nm murmur3_32_hash +functions were written by +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . Modified: head/sys/libkern/murmur3_32.c ============================================================================== --- head/sys/libkern/murmur3_32.c Sat Oct 18 22:11:10 2014 (r273267) +++ head/sys/libkern/murmur3_32.c Sat Oct 18 22:15:11 2014 (r273268) @@ -22,6 +22,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #include @@ -32,27 +34,31 @@ #define rol32(i32, n) ((i32) << (n) | (i32) >> (32 - (n))) /* - * $FreeBSD$ - * Simple implementation of the Murmur3-32 hash function optimized for - * aligned sequences of 32-bit words. If len is not a multiple of 4, it - * will be rounded down, droping trailer bytes. + * Simple implementation of the Murmur3-32 hash function. + * + * This implementation is slow but safe. It can be made significantly + * faster if the caller guarantees that the input is correctly aligned for + * 32-bit reads, and slightly faster yet if the caller guarantees that the + * length of the input is always a multiple of 4 bytes. */ uint32_t -murmur3_aligned_32(const void *data, size_t len, uint32_t seed) +murmur3_32_hash(const void *data, size_t len, uint32_t seed) { - const uint32_t *data32; + const uint8_t *bytes; uint32_t hash, k; size_t res; - /* initialize */ - len -= len % sizeof(*data32); + /* initialization */ + bytes = data; res = len; - data32 = data; hash = seed; - /* iterate */ - for (res = 0; res < len; res += sizeof(*data32), data32++) { - k = le32toh(*data32); + /* main loop */ + while (res >= 4) { + /* replace with le32toh() if input is aligned */ + k = le32dec(bytes); + bytes += 4; + res -= 4; k *= 0xcc9e2d51; k = rol32(k, 15); k *= 0x1b873593; @@ -62,6 +68,25 @@ murmur3_aligned_32(const void *data, siz hash += 0xe6546b64; } + /* remainder */ + /* remove if input length is a multiple of 4 */ + if (res > 0) { + k = 0; + switch (res) { + case 3: + k |= bytes[2] << 16; + case 2: + k |= bytes[1] << 8; + case 1: + k |= bytes[0]; + k *= 0xcc9e2d51; + k = rol32(k, 15); + k *= 0x1b873593; + hash ^= k; + break; + } + } + /* finalize */ hash ^= (uint32_t)len; hash ^= hash >> 16; @@ -72,3 +97,36 @@ murmur3_aligned_32(const void *data, siz return (hash); } +/* + * Simplified version of the above optimized for aligned sequences of + * 32-bit words. The count argument is the number of words, not the + * length in bytes. + */ +uint32_t +murmur3_32_hash32(const uint32_t *data, size_t count, uint32_t seed) +{ + uint32_t hash, k; + size_t res; + + /* iterate */ + for (res = count, hash = seed; res > 0; res--, data++) { + k = le32toh(*data); + k *= 0xcc9e2d51; + k = rol32(k, 15); + k *= 0x1b873593; + hash ^= k; + hash = rol32(hash, 13); + hash *= 5; + hash += 0xe6546b64; + } + + /* finalize */ + hash ^= (uint32_t)count; + hash ^= hash >> 16; + hash *= 0x85ebca6b; + hash ^= hash >> 13; + hash *= 0xc2b2ae35; + hash ^= hash >> 16; + return (hash); +} + Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sat Oct 18 22:11:10 2014 (r273267) +++ head/sys/netpfil/pf/pf.c Sat Oct 18 22:15:11 2014 (r273268) @@ -374,9 +374,9 @@ pf_hashkey(struct pf_state_key *sk) { uint32_t h; - h = murmur3_aligned_32((uint32_t *)sk, - sizeof(struct pf_state_key_cmp), - V_pf_hashseed); + h = murmur3_32_hash32((uint32_t *)sk, + sizeof(struct pf_state_key_cmp)/sizeof(uint32_t), + V_pf_hashseed); return (h & pf_hashmask); } @@ -388,12 +388,12 @@ pf_hashsrc(struct pf_addr *addr, sa_fami switch (af) { case AF_INET: - h = murmur3_aligned_32((uint32_t *)&addr->v4, - sizeof(addr->v4), V_pf_hashseed); + h = murmur3_32_hash32((uint32_t *)&addr->v4, + sizeof(addr->v4)/sizeof(uint32_t), V_pf_hashseed); break; case AF_INET6: - h = murmur3_aligned_32((uint32_t *)&addr->v6, - sizeof(addr->v6), V_pf_hashseed); + h = murmur3_32_hash32((uint32_t *)&addr->v6, + sizeof(addr->v6)/sizeof(uint32_t), V_pf_hashseed); break; default: panic("%s: unknown address family %u", __func__, af); Modified: head/sys/sys/hash.h ============================================================================== --- head/sys/sys/hash.h Sat Oct 18 22:11:10 2014 (r273267) +++ head/sys/sys/hash.h Sat Oct 18 22:15:11 2014 (r273268) @@ -126,7 +126,8 @@ hash32_strne(const void *buf, size_t len uint32_t jenkins_hash(const void *, size_t, uint32_t); uint32_t jenkins_hash32(const uint32_t *, size_t, uint32_t); -uint32_t murmur3_aligned_32(const void *data, size_t len, uint32_t seed); +uint32_t murmur3_32_hash(const void *, size_t, uint32_t); +uint32_t murmur3_32_hash32(const uint32_t *, size_t, uint32_t); #endif /* _KERNEL */