From owner-svn-src-stable-10@FreeBSD.ORG Sun Apr 5 01:03:12 2015 Return-Path: Delivered-To: svn-src-stable-10@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 4803182D; Sun, 5 Apr 2015 01:03: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 33265C3C; Sun, 5 Apr 2015 01:03: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 t3513CHj082103; Sun, 5 Apr 2015 01:03:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3513CJf082102; Sun, 5 Apr 2015 01:03:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504050103.t3513CJf082102@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 5 Apr 2015 01:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281095 - stable/10/sys/fs/msdosfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 01:03:12 -0000 Author: kib Date: Sun Apr 5 01:03:11 2015 New Revision: 281095 URL: https://svnweb.freebsd.org/changeset/base/281095 Log: MFC r280342: msdosfs: mark unused compat-mount fields. Modified: stable/10/sys/fs/msdosfs/msdosfsmount.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/msdosfs/msdosfsmount.h ============================================================================== --- stable/10/sys/fs/msdosfs/msdosfsmount.h Sat Apr 4 23:56:38 2015 (r281094) +++ stable/10/sys/fs/msdosfs/msdosfsmount.h Sun Apr 5 01:03:11 2015 (r281095) @@ -239,8 +239,8 @@ struct msdosfs_args { gid_t gid; /* gid that owns msdosfs files */ mode_t mask; /* file mask to be applied for msdosfs perms */ int flags; /* see below */ - int magic; /* version number */ - u_int16_t u2w[128]; /* Local->Unicode table */ + int unused1; /* unused, was version number */ + u_int16_t unused2[128]; /* no longer used, was Local->Unicode table */ char *cs_win; /* Windows(Unicode) Charset */ char *cs_dos; /* DOS Charset */ char *cs_local; /* Local Charset */ @@ -264,6 +264,4 @@ struct msdosfs_args { #define MSDOSFS_LARGEFS 0x10000000 /* perform fileno mapping */ #define MSDOSFS_FSIMOD 0x01000000 -#define MSDOSFS_ARGSMAGIC 0xe4eff300 - #endif /* !_MSDOSFS_MSDOSFSMOUNT_H_ */ From owner-svn-src-stable-10@FreeBSD.ORG Sun Apr 5 06:53:31 2015 Return-Path: Delivered-To: svn-src-stable-10@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 33F092A3; Sun, 5 Apr 2015 06:53: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 1E20E26C; Sun, 5 Apr 2015 06:53: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 t356rU2r047295; Sun, 5 Apr 2015 06:53:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t356rUaw047294; Sun, 5 Apr 2015 06:53:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504050653.t356rUaw047294@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 5 Apr 2015 06:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281104 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 06:53:31 -0000 Author: mav Date: Sun Apr 5 06:53:29 2015 New Revision: 281104 URL: https://svnweb.freebsd.org/changeset/base/281104 Log: MFC r280822: Some cosmetic polishing. No functional change. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 5 05:18:14 2015 (r281103) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 5 06:53:29 2015 (r281104) @@ -4152,10 +4152,10 @@ arc_init(void) #endif #endif /* sun */ /* set min cache to 1/32 of all memory, or 16MB, whichever is more */ - arc_c_min = MAX(arc_c / 4, 64<<18); + arc_c_min = MAX(arc_c / 4, 16 << 20); /* set max to 1/2 of all memory, or all but 1GB, whichever is more */ - if (arc_c * 8 >= 1<<30) - arc_c_max = (arc_c * 8) - (1<<30); + if (arc_c * 8 >= 1 << 30) + arc_c_max = (arc_c * 8) - (1 << 30); else arc_c_max = arc_c_min; arc_c_max = MAX(arc_c * 5, arc_c_max); @@ -4165,9 +4165,9 @@ arc_init(void) * Allow the tunables to override our calculations if they are * reasonable (ie. over 16MB) */ - if (zfs_arc_max > 64<<18 && zfs_arc_max < kmem_size()) + if (zfs_arc_max > 16 << 20 && zfs_arc_max < kmem_size()) arc_c_max = zfs_arc_max; - if (zfs_arc_min > 64<<18 && zfs_arc_min <= arc_c_max) + if (zfs_arc_min > 16 << 20 && zfs_arc_min <= arc_c_max) arc_c_min = zfs_arc_min; #endif From owner-svn-src-stable-10@FreeBSD.ORG Sun Apr 5 15:27:57 2015 Return-Path: Delivered-To: svn-src-stable-10@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 341516DF; Sun, 5 Apr 2015 15:27:57 +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 1F04B905; Sun, 5 Apr 2015 15:27:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35FRumm088165; Sun, 5 Apr 2015 15:27:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35FRuvK088164; Sun, 5 Apr 2015 15:27:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504051527.t35FRuvK088164@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Apr 2015 15:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281110 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 15:27:57 -0000 Author: dim Date: Sun Apr 5 15:27:56 2015 New Revision: 281110 URL: https://svnweb.freebsd.org/changeset/base/281110 Log: Ensure yacc is built during bootstrap-tools for __FreeBSD_version 1001506 and earlier, since some of the ACPI tools now reach yacc's old maximum table limit. This should fix the Jenkins buildbot, which apparently runs 10.1-RELEASE. Modified: stable/10/Makefile.inc1 Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun Apr 5 14:45:52 2015 (r281109) +++ stable/10/Makefile.inc1 Sun Apr 5 15:27:56 2015 (r281110) @@ -1252,7 +1252,7 @@ _sed= usr.bin/sed _m4= usr.bin/m4 .endif -.if ${BOOTSTRAPPING} < 1000013 +.if ${BOOTSTRAPPING} < 1001506 _yacc= lib/liby \ usr.bin/yacc From owner-svn-src-stable-10@FreeBSD.ORG Mon Apr 6 03:16:21 2015 Return-Path: Delivered-To: svn-src-stable-10@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 7DD3FB9C; Mon, 6 Apr 2015 03:16:21 +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 67D54693; Mon, 6 Apr 2015 03:16:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t363GLKX037031; Mon, 6 Apr 2015 03:16:21 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t363GLNa037030; Mon, 6 Apr 2015 03:16:21 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201504060316.t363GLNa037030@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Mon, 6 Apr 2015 03:16:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281134 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 03:16:21 -0000 Author: neel Date: Mon Apr 6 03:16:20 2015 New Revision: 281134 URL: https://svnweb.freebsd.org/changeset/base/281134 Log: MFC r272481. Add new fields in the FADT, required by IASL 20140926-64. Modified: stable/10/usr.sbin/bhyve/acpi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/acpi.c ============================================================================== --- stable/10/usr.sbin/bhyve/acpi.c Mon Apr 6 03:02:20 2015 (r281133) +++ stable/10/usr.sbin/bhyve/acpi.c Mon Apr 6 03:16:20 2015 (r281134) @@ -430,7 +430,10 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, "\n"); EFPRINTF(fp, "[0001]\t\tValue to cause reset : 06\n"); - EFPRINTF(fp, "[0003]\t\tReserved : 000000\n"); + EFPRINTF(fp, "[0002]\t\tARM Flags (decoded below): 0000\n"); + EFPRINTF(fp, "\t\t\tPSCI Compliant : 0\n"); + EFPRINTF(fp, "\t\t\tMust use HVC for PSCI : 0\n"); + EFPRINTF(fp, "[0001]\t\tFADT Minor Revision : 01\n"); EFPRINTF(fp, "[0008]\t\tFACS Address : 00000000%08X\n", basl_acpi_base + FACS_OFFSET); EFPRINTF(fp, "[0008]\t\tDSDT Address : 00000000%08X\n", From owner-svn-src-stable-10@FreeBSD.ORG Mon Apr 6 08:23:19 2015 Return-Path: Delivered-To: svn-src-stable-10@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 103F9692; Mon, 6 Apr 2015 08:23: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 ED4CB6C8; Mon, 6 Apr 2015 08:23: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 t368NIQS082791; Mon, 6 Apr 2015 08:23:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t368N7Zf082734; Mon, 6 Apr 2015 08:23:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504060823.t368N7Zf082734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Apr 2015 08:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281140 - in stable/10/sys/dev: ahci ata ata/chipsets mvs siis X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 08:23:19 -0000 Author: mav Date: Mon Apr 6 08:23:06 2015 New Revision: 281140 URL: https://svnweb.freebsd.org/changeset/base/281140 Log: MFC r280393: Reduce priority of ATA/SATA drivers. Legacy ata(4) -> BUS_PROBE_LOW_PRIORITY; more functional ahci(4), siis(4), mvs(4) -> BUS_PROBE_DEFAULT; BUS_PROBE_VENDOR leave for vendor drivers. Modified: stable/10/sys/dev/ahci/ahci.c stable/10/sys/dev/ahci/ahci_pci.c stable/10/sys/dev/ahci/ahciem.c stable/10/sys/dev/ata/ata-all.c stable/10/sys/dev/ata/chipsets/ata-acard.c stable/10/sys/dev/ata/chipsets/ata-acerlabs.c stable/10/sys/dev/ata/chipsets/ata-adaptec.c stable/10/sys/dev/ata/chipsets/ata-amd.c stable/10/sys/dev/ata/chipsets/ata-ati.c stable/10/sys/dev/ata/chipsets/ata-cenatek.c stable/10/sys/dev/ata/chipsets/ata-cypress.c stable/10/sys/dev/ata/chipsets/ata-cyrix.c stable/10/sys/dev/ata/chipsets/ata-fsl.c stable/10/sys/dev/ata/chipsets/ata-highpoint.c stable/10/sys/dev/ata/chipsets/ata-intel.c stable/10/sys/dev/ata/chipsets/ata-ite.c stable/10/sys/dev/ata/chipsets/ata-jmicron.c stable/10/sys/dev/ata/chipsets/ata-marvell.c stable/10/sys/dev/ata/chipsets/ata-micron.c stable/10/sys/dev/ata/chipsets/ata-national.c stable/10/sys/dev/ata/chipsets/ata-netcell.c stable/10/sys/dev/ata/chipsets/ata-nvidia.c stable/10/sys/dev/ata/chipsets/ata-promise.c stable/10/sys/dev/ata/chipsets/ata-serverworks.c stable/10/sys/dev/ata/chipsets/ata-siliconimage.c stable/10/sys/dev/ata/chipsets/ata-sis.c stable/10/sys/dev/ata/chipsets/ata-via.c stable/10/sys/dev/mvs/mvs.c stable/10/sys/dev/mvs/mvs_pci.c stable/10/sys/dev/mvs/mvs_soc.c stable/10/sys/dev/siis/siis.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ahci/ahci.c Mon Apr 6 08:23:06 2015 (r281140) @@ -610,7 +610,7 @@ ahci_ch_probe(device_t dev) { device_set_desc_copy(dev, "AHCI channel"); - return (0); + return (BUS_PROBE_DEFAULT); } static int Modified: stable/10/sys/dev/ahci/ahci_pci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci_pci.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ahci/ahci_pci.c Mon Apr 6 08:23:06 2015 (r281140) @@ -339,13 +339,13 @@ ahci_probe(device_t dev) snprintf(buf, sizeof(buf), "%s AHCI SATA controller", ahci_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } if (!valid) return (ENXIO); device_set_desc_copy(dev, "AHCI SATA controller"); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } static int @@ -365,11 +365,11 @@ ahci_ata_probe(device_t dev) snprintf(buf, sizeof(buf), "%s AHCI SATA controller", ahci_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } device_set_desc_copy(dev, "AHCI SATA controller"); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } static int Modified: stable/10/sys/dev/ahci/ahciem.c ============================================================================== --- stable/10/sys/dev/ahci/ahciem.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ahci/ahciem.c Mon Apr 6 08:23:06 2015 (r281140) @@ -65,7 +65,7 @@ ahci_em_probe(device_t dev) { device_set_desc_copy(dev, "AHCI enclosure management bridge"); - return (0); + return (BUS_PROBE_DEFAULT); } static int Modified: stable/10/sys/dev/ata/ata-all.c ============================================================================== --- stable/10/sys/dev/ata/ata-all.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/ata-all.c Mon Apr 6 08:23:06 2015 (r281140) @@ -92,7 +92,7 @@ FEATURE(ata_cam, "ATA devices are access int ata_probe(device_t dev) { - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } int Modified: stable/10/sys/dev/ata/chipsets/ata-acard.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-acard.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-acard.c Mon Apr 6 08:23:06 2015 (r281140) @@ -83,7 +83,7 @@ ata_acard_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_acard_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-acerlabs.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-acerlabs.c Mon Apr 6 08:23:06 2015 (r281140) @@ -96,7 +96,7 @@ ata_ali_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_ali_chipinit; ctlr->chipdeinit = ata_ali_chipdeinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-adaptec.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-adaptec.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-adaptec.c Mon Apr 6 08:23:06 2015 (r281140) @@ -75,7 +75,7 @@ ata_adaptec_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_marvell_edma_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } ATA_DECLARE_DRIVER(ata_adaptec); Modified: stable/10/sys/dev/ata/chipsets/ata-amd.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-amd.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-amd.c Mon Apr 6 08:23:06 2015 (r281140) @@ -82,7 +82,7 @@ ata_amd_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_amd_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-ati.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-ati.c Mon Apr 6 08:23:06 2015 (r281140) @@ -123,7 +123,7 @@ ata_ati_probe(device_t dev) ctlr->chipinit = ata_ati_chipinit; break; } - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-cenatek.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-cenatek.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-cenatek.c Mon Apr 6 08:23:06 2015 (r281140) @@ -63,7 +63,7 @@ ata_cenatek_probe(device_t dev) ctlr->chipinit = ata_generic_chipinit; device_set_desc(dev, "Cenatek Rocket Drive controller"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } ATA_DECLARE_DRIVER(ata_cenatek); Modified: stable/10/sys/dev/ata/chipsets/ata-cypress.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-cypress.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-cypress.c Mon Apr 6 08:23:06 2015 (r281140) @@ -75,7 +75,7 @@ ata_cypress_probe(device_t dev) pci_get_subclass(dev) == PCIS_STORAGE_IDE) { device_set_desc(dev, "Cypress 82C693 ATA controller"); ctlr->chipinit = ata_cypress_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: stable/10/sys/dev/ata/chipsets/ata-cyrix.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-cyrix.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-cyrix.c Mon Apr 6 08:23:06 2015 (r281140) @@ -66,7 +66,7 @@ ata_cyrix_probe(device_t dev) if (pci_get_devid(dev) == ATA_CYRIX_5530) { device_set_desc(dev, "Cyrix 5530 ATA33 controller"); ctlr->chipinit = ata_cyrix_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: stable/10/sys/dev/ata/chipsets/ata-fsl.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-fsl.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-fsl.c Mon Apr 6 08:23:06 2015 (r281140) @@ -79,7 +79,7 @@ imx_ata_probe(device_t dev) ctrl = device_get_softc(dev); device_set_desc(dev, "Freescale Integrated PATA Controller"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static void Modified: stable/10/sys/dev/ata/chipsets/ata-highpoint.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-highpoint.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-highpoint.c Mon Apr 6 08:23:06 2015 (r281140) @@ -103,7 +103,7 @@ ata_highpoint_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_highpoint_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-intel.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-intel.c Mon Apr 6 08:23:06 2015 (r281140) @@ -264,7 +264,7 @@ ata_intel_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_intel_chipinit; ctlr->chipdeinit = ata_intel_chipdeinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-ite.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-ite.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-ite.c Mon Apr 6 08:23:06 2015 (r281140) @@ -77,7 +77,7 @@ ata_ite_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_ite_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-jmicron.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-jmicron.c Mon Apr 6 08:23:06 2015 (r281140) @@ -86,7 +86,7 @@ ata_jmicron_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_jmicron_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-marvell.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-marvell.c Mon Apr 6 08:23:06 2015 (r281140) @@ -139,7 +139,7 @@ ata_marvell_probe(device_t dev) ctlr->chipinit = ata_marvell_dummy_chipinit; break; } - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-micron.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-micron.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-micron.c Mon Apr 6 08:23:06 2015 (r281140) @@ -63,7 +63,7 @@ ata_micron_probe(device_t dev) device_set_desc(dev, "RZ 100? ATA controller !WARNING! data loss/corruption risk"); ctlr->chipinit = ata_generic_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return (ENXIO); } Modified: stable/10/sys/dev/ata/chipsets/ata-national.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-national.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-national.c Mon Apr 6 08:23:06 2015 (r281140) @@ -67,7 +67,7 @@ ata_national_probe(device_t dev) if (pci_get_devid(dev) == ATA_SC1100) { device_set_desc(dev, "National Geode SC1100 ATA33 controller"); ctlr->chipinit = ata_national_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: stable/10/sys/dev/ata/chipsets/ata-netcell.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-netcell.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-netcell.c Mon Apr 6 08:23:06 2015 (r281140) @@ -66,7 +66,7 @@ ata_netcell_probe(device_t dev) if (pci_get_devid(dev) == ATA_NETCELL_SR) { device_set_desc(dev, "Netcell SyncRAID SR3000/5000 RAID Controller"); ctlr->chipinit = ata_netcell_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: stable/10/sys/dev/ata/chipsets/ata-nvidia.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-nvidia.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-nvidia.c Mon Apr 6 08:23:06 2015 (r281140) @@ -187,7 +187,7 @@ ata_nvidia_probe(device_t dev) ctlr->chipinit = ata_ahci_chipinit; else ctlr->chipinit = ata_nvidia_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-promise.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-promise.c Mon Apr 6 08:23:06 2015 (r281140) @@ -209,7 +209,7 @@ ata_promise_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_promise_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-serverworks.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-serverworks.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-serverworks.c Mon Apr 6 08:23:06 2015 (r281140) @@ -96,7 +96,7 @@ ata_serverworks_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_serverworks_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-siliconimage.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-siliconimage.c Mon Apr 6 08:23:06 2015 (r281140) @@ -113,7 +113,7 @@ ata_sii_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_sii_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } int Modified: stable/10/sys/dev/ata/chipsets/ata-sis.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-sis.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-sis.c Mon Apr 6 08:23:06 2015 (r281140) @@ -154,7 +154,7 @@ ata_sis_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_sis_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-via.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-via.c Mon Apr 6 08:23:06 2015 (r281140) @@ -141,7 +141,7 @@ ata_via_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_via_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/mvs/mvs.c ============================================================================== --- stable/10/sys/dev/mvs/mvs.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/mvs/mvs.c Mon Apr 6 08:23:06 2015 (r281140) @@ -107,7 +107,7 @@ mvs_ch_probe(device_t dev) { device_set_desc_copy(dev, "Marvell SATA channel"); - return (0); + return (BUS_PROBE_DEFAULT); } static int Modified: stable/10/sys/dev/mvs/mvs_pci.c ============================================================================== --- stable/10/sys/dev/mvs/mvs_pci.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/mvs/mvs_pci.c Mon Apr 6 08:23:06 2015 (r281140) @@ -88,7 +88,7 @@ mvs_probe(device_t dev) snprintf(buf, sizeof(buf), "%s SATA controller", mvs_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } return (ENXIO); Modified: stable/10/sys/dev/mvs/mvs_soc.c ============================================================================== --- stable/10/sys/dev/mvs/mvs_soc.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/mvs/mvs_soc.c Mon Apr 6 08:23:06 2015 (r281140) @@ -91,7 +91,7 @@ mvs_probe(device_t dev) snprintf(buf, sizeof(buf), "%s SATA controller", mvs_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } return (ENXIO); Modified: stable/10/sys/dev/siis/siis.c ============================================================================== --- stable/10/sys/dev/siis/siis.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/siis/siis.c Mon Apr 6 08:23:06 2015 (r281140) @@ -129,7 +129,7 @@ siis_probe(device_t dev) snprintf(buf, sizeof(buf), "%s SATA controller", siis_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } return (ENXIO); @@ -451,7 +451,7 @@ siis_ch_probe(device_t dev) { device_set_desc_copy(dev, "SIIS channel"); - return (0); + return (BUS_PROBE_DEFAULT); } static int From owner-svn-src-stable-10@FreeBSD.ORG Mon Apr 6 14:45:42 2015 Return-Path: Delivered-To: svn-src-stable-10@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 0A6C27DE; Mon, 6 Apr 2015 14:45: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 E85C9156; Mon, 6 Apr 2015 14:45: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 t36Ejfed072227; Mon, 6 Apr 2015 14:45:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36EjfAe072226; Mon, 6 Apr 2015 14:45:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504061445.t36EjfAe072226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 6 Apr 2015 14:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281148 - in stable: 10/bin/expr 9/bin/expr X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 14:45:42 -0000 Author: dim Date: Mon Apr 6 14:45:40 2015 New Revision: 281148 URL: https://svnweb.freebsd.org/changeset/base/281148 Log: MFC r280357: Build expr with -fwrapv, since it relies on signed integer wrapping having defined behavior. Reported by: rodrigc Modified: stable/10/bin/expr/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/bin/expr/Makefile Directory Properties: stable/9/ (props changed) stable/9/bin/ (props changed) stable/9/bin/expr/ (props changed) Modified: stable/10/bin/expr/Makefile ============================================================================== --- stable/10/bin/expr/Makefile Mon Apr 6 13:55:33 2015 (r281147) +++ stable/10/bin/expr/Makefile Mon Apr 6 14:45:40 2015 (r281148) @@ -6,6 +6,9 @@ PROG= expr SRCS= expr.y YFLAGS= +# expr relies on signed integer wrapping +CFLAGS+= -fwrapv + NO_WMISSING_VARIABLE_DECLARATIONS= .if ${MK_TESTS} != "no" From owner-svn-src-stable-10@FreeBSD.ORG Mon Apr 6 14:50:55 2015 Return-Path: Delivered-To: svn-src-stable-10@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 CAB39CCF; Mon, 6 Apr 2015 14:50: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 AAD1724B; Mon, 6 Apr 2015 14:50: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 t36EotCP075638; Mon, 6 Apr 2015 14:50:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36EotRw075637; Mon, 6 Apr 2015 14:50:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504061450.t36EotRw075637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 6 Apr 2015 14:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281149 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 14:50:56 -0000 Author: dim Date: Mon Apr 6 14:50:54 2015 New Revision: 281149 URL: https://svnweb.freebsd.org/changeset/base/281149 Log: MFC r280864: Pull in r233552 from upstream libc++ trunk (by Eric Fiselier): [libcxx] Fix PR22771 - Support access control SFINAE in the library version of is_convertible. Summary: Currently the conversion check does not take place in a context where access control SFINAE is applied. This patch changes the context of the test expression so that SFINAE occurs if access control does not permit the conversion. Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771 Reviewers: mclow.lists, rsmith, dim Reviewed By: dim Subscribers: dim, rodrigc, emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D8461 This fixes building clang, and other programs using libc++, with newer versions of gcc (specifically, gcc 4.8 and higher). Reported by: rodrigc Modified: stable/10/contrib/libc++/include/type_traits Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libc++/include/type_traits Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libc++/ (props changed) Modified: stable/10/contrib/libc++/include/type_traits ============================================================================== --- stable/10/contrib/libc++/include/type_traits Mon Apr 6 14:45:40 2015 (r281148) +++ stable/10/contrib/libc++/include/type_traits Mon Apr 6 14:50:54 2015 (r281149) @@ -842,7 +842,16 @@ template struct _ namespace __is_convertible_imp { -template char __test(_Tp); +template void __test_convert(_Tp); + +template +struct __is_convertible_test : public false_type {}; + +template +struct __is_convertible_test<_From, _To, + decltype(__test_convert<_To>(_VSTD::declval<_From>()))> : public true_type +{}; + template __two __test(...); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template _Tp&& __source(); @@ -877,10 +886,8 @@ template ::value> struct __is_convertible : public integral_constant(__is_convertible_imp::__source<_T1>())) == 1 -#else - sizeof(__is_convertible_imp::__test<_T2>(__is_convertible_imp::__source<_T1>())) == 1 + __is_convertible_imp::__is_convertible_test<_T1, _T2>::value +#if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !(!is_function<_T1>::value && !is_reference<_T1>::value && is_reference<_T2>::value && (!is_const::type>::value || is_volatile::type>::value) From owner-svn-src-stable-10@FreeBSD.ORG Mon Apr 6 18:40:52 2015 Return-Path: Delivered-To: svn-src-stable-10@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 CF8F6A58; Mon, 6 Apr 2015 18:40: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 B0A71A3; Mon, 6 Apr 2015 18:40: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 t36IequM090469; Mon, 6 Apr 2015 18:40:52 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36Iep2j090462; Mon, 6 Apr 2015 18:40:51 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201504061840.t36Iep2j090462@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 6 Apr 2015 18:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281161 - in stable/10: sys/netinet usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 18:40:52 -0000 Author: hiren Date: Mon Apr 6 18:40:50 2015 New Revision: 281161 URL: https://svnweb.freebsd.org/changeset/base/281161 Log: MFC r266418, r266448 Add the flowtype to the inpcb. Add -R to netstat to dump RSS/flow information. Reviewed by: delphij Relnotes: yes (for r266448) Sponsored by: Limelight Networks Modified: stable/10/sys/netinet/in_pcb.h stable/10/usr.bin/netstat/inet.c stable/10/usr.bin/netstat/main.c stable/10/usr.bin/netstat/netstat.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in_pcb.h ============================================================================== --- stable/10/sys/netinet/in_pcb.h Mon Apr 6 18:03:35 2015 (r281160) +++ stable/10/sys/netinet/in_pcb.h Mon Apr 6 18:40:50 2015 (r281161) @@ -180,7 +180,8 @@ struct inpcb { uint32_t inp_flowid; /* (x) flow id / queue id */ u_int inp_refcount; /* (i) refcount */ void *inp_pspare[5]; /* (x) route caching / general use */ - u_int inp_ispare[6]; /* (x) route caching / user cookie / + uint32_t inp_flowtype; /* (x) M_HASHTYPE value */ + u_int inp_ispare[5]; /* (x) route caching / user cookie / * general use */ /* Local and foreign ports, local and foreign addr. */ Modified: stable/10/usr.bin/netstat/inet.c ============================================================================== --- stable/10/usr.bin/netstat/inet.c Mon Apr 6 18:03:35 2015 (r281160) +++ stable/10/usr.bin/netstat/inet.c Mon Apr 6 18:40:50 2015 (r281161) @@ -429,7 +429,7 @@ protopr(u_long off, const char *name, in "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s", "Proto", "Recv-Q", "Send-Q", "Local Address", "Foreign Address"); - if (!xflag) + if (!xflag && !Rflag) printf(" (state)"); } if (xflag) { @@ -441,6 +441,9 @@ protopr(u_long off, const char *name, in printf(" %7.7s %7.7s %7.7s %7.7s %7.7s %7.7s", "rexmt", "persist", "keep", "2msl", "delack", "rcvtime"); + } else if (Rflag) { + printf (" %8.8s %5.5s", + "flowid", "ftype"); } putchar('\n'); first = 0; @@ -549,7 +552,7 @@ protopr(u_long off, const char *name, in timer->tt_delack / 1000, (timer->tt_delack % 1000) / 10, timer->t_rcvtime / 1000, (timer->t_rcvtime % 1000) / 10); } - if (istcp && !Lflag && !xflag && !Tflag) { + if (istcp && !Lflag && !xflag && !Tflag && !Rflag) { if (tp->t_state < 0 || tp->t_state >= TCP_NSTATES) printf("%d", tp->t_state); else { @@ -560,7 +563,12 @@ protopr(u_long off, const char *name, in putchar('*'); #endif /* defined(TF_NEEDSYN) && defined(TF_NEEDFIN) */ } - } + } + if (Rflag) { + printf(" %08x %5d", + inp->inp_flowid, + inp->inp_flowtype); + } putchar('\n'); } if (xig != oxig && xig->xig_gen != oxig->xig_gen) { Modified: stable/10/usr.bin/netstat/main.c ============================================================================== --- stable/10/usr.bin/netstat/main.c Mon Apr 6 18:03:35 2015 (r281160) +++ stable/10/usr.bin/netstat/main.c Mon Apr 6 18:40:50 2015 (r281161) @@ -326,6 +326,7 @@ int numeric_port; /* show ports numerica static int pflag; /* show given protocol */ int Qflag; /* show netisr information */ int rflag; /* show routing tables (or routing stats) */ +int Rflag; /* show flow / RSS statistics */ int sflag; /* show protocol statistics */ int Wflag; /* wide display */ int Tflag; /* TCP Information */ @@ -350,7 +351,7 @@ main(int argc, char *argv[]) af = AF_UNSPEC; - while ((ch = getopt(argc, argv, "46AaBbdF:f:ghI:iLlM:mN:np:Qq:rSTsuWw:xz")) + while ((ch = getopt(argc, argv, "46AaBbdF:f:ghI:iLlM:mN:np:Qq:RrSTsuWw:xz")) != -1) switch(ch) { case '4': @@ -468,6 +469,9 @@ main(int argc, char *argv[]) case 'r': rflag = 1; break; + case 'R': + Rflag = 1; + break; case 's': ++sflag; break; @@ -864,7 +868,7 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: netstat [-46AaLnSTWx] [-f protocol_family | -p protocol]\n" +"usage: netstat [-46AaLnRSTWx] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -i | -I interface [-46abdhnW] [-f address_family]\n" " [-M core] [-N system]", Modified: stable/10/usr.bin/netstat/netstat.h ============================================================================== --- stable/10/usr.bin/netstat/netstat.h Mon Apr 6 18:03:35 2015 (r281160) +++ stable/10/usr.bin/netstat/netstat.h Mon Apr 6 18:40:50 2015 (r281161) @@ -45,6 +45,7 @@ extern int noutputs; /* how much outputs extern int numeric_addr; /* show addresses numerically */ extern int numeric_port; /* show ports numerically */ extern int rflag; /* show routing tables (or routing stats) */ +extern int Rflag; /* show flowid / RSS information */ extern int sflag; /* show protocol statistics */ extern int Tflag; /* show TCP control block info */ extern int Wflag; /* wide display */ From owner-svn-src-stable-10@FreeBSD.ORG Mon Apr 6 19:56:31 2015 Return-Path: Delivered-To: svn-src-stable-10@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 DA3B631C; Mon, 6 Apr 2015 19:56:30 +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 C24E5BBC; Mon, 6 Apr 2015 19:56:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36JuU40029282; Mon, 6 Apr 2015 19:56:30 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36JuSEx029266; Mon, 6 Apr 2015 19:56:28 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504061956.t36JuSEx029266@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 6 Apr 2015 19:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281168 - in stable/10/usr.bin/xlint: arch/sparc64 common lint1 lint2 xlint X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 19:56:31 -0000 Author: pfg Date: Mon Apr 6 19:56:27 2015 New Revision: 281168 URL: https://svnweb.freebsd.org/changeset/base/281168 Log: MFC r280387: xlint: update. Bring some important updates from NetBSD up to about 2008/04/25. The main feature is initial support for C99. Obtained from: NetBSD Modified: stable/10/usr.bin/xlint/arch/sparc64/targparam.h stable/10/usr.bin/xlint/common/lint.h stable/10/usr.bin/xlint/common/mem.c stable/10/usr.bin/xlint/lint1/cgram.y stable/10/usr.bin/xlint/lint1/decl.c stable/10/usr.bin/xlint/lint1/emit1.c stable/10/usr.bin/xlint/lint1/err.c stable/10/usr.bin/xlint/lint1/externs1.h stable/10/usr.bin/xlint/lint1/func.c stable/10/usr.bin/xlint/lint1/init.c stable/10/usr.bin/xlint/lint1/lint1.h stable/10/usr.bin/xlint/lint1/main1.c stable/10/usr.bin/xlint/lint1/makeman stable/10/usr.bin/xlint/lint1/scan.l stable/10/usr.bin/xlint/lint1/tree.c stable/10/usr.bin/xlint/lint2/read.c stable/10/usr.bin/xlint/xlint/lint.1 stable/10/usr.bin/xlint/xlint/xlint.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/xlint/arch/sparc64/targparam.h ============================================================================== --- stable/10/usr.bin/xlint/arch/sparc64/targparam.h Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/arch/sparc64/targparam.h Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:55:00 thorpej Exp $ */ +/* $NetBSD: targparam.h,v 1.3 2002/01/31 23:31:34 he Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -29,6 +29,8 @@ * 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$ */ /* Modified: stable/10/usr.bin/xlint/common/lint.h ============================================================================== --- stable/10/usr.bin/xlint/common/lint.h Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/common/lint.h Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: lint.h,v 1.5 2002/03/07 18:29:56 tv Exp $ */ +/* $NetBSD: lint.h,v 1.7 2003/10/27 00:12:44 lukem Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -29,6 +29,8 @@ * 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$ */ #if HAVE_CONFIG_H @@ -90,7 +92,7 @@ typedef struct { u_int tt_isftyp : 1; /* 1 if floating point type */ u_int tt_isatyp : 1; /* 1 if arithmetic type */ u_int tt_issclt : 1; /* 1 if scalar type */ - char *tt_name; /* Bezeichnung des Typs */ + const char *tt_name; /* Bezeichnung des Typs */ } ttab_t; #define size(t) (ttab[t].tt_sz) Modified: stable/10/usr.bin/xlint/common/mem.c ============================================================================== --- stable/10/usr.bin/xlint/common/mem.c Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/common/mem.c Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: mem.c,v 1.2 2002/01/21 19:49:51 tv Exp $ */ +/* $NetBSD: mem.c,v 1.4 2003/10/16 06:35:26 itojun Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -33,8 +33,9 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: mem.c,v 1.2 2002/01/21 19:49:51 tv Exp $"); +__RCSID("$NetBSD: mem.c,v 1.4 2003/10/16 06:35:26 itojun Exp $"); #endif +__FBSDID("$FreeBSD$"); #include #include @@ -64,9 +65,13 @@ xcalloc(size_t n, size_t s) void * xrealloc(void *p, size_t s) { + void *n; - if ((p = realloc(p, s)) == NULL) + if ((n = realloc(p, s)) == NULL) { + free(p); nomem(); + } + p = n; return (p); } Modified: stable/10/usr.bin/xlint/lint1/cgram.y ============================================================================== --- stable/10/usr.bin/xlint/lint1/cgram.y Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/lint1/cgram.y Mon Apr 6 19:56:27 2015 (r281168) @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.23 2002/01/31 19:36:53 tv Exp $ */ +/* $NetBSD: cgram.y,v 1.40 2008/04/25 17:18:24 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.23 2002/01/31 19:36:53 tv Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.40 2008/04/25 17:18:24 christos Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -65,13 +65,13 @@ int mblklev; */ static int onowarn = -1; -static int toicon(tnode_t *); +static int toicon(tnode_t *, int); static void idecl(sym_t *, int, sbuf_t *); static void ignuptorp(void); #ifdef DEBUG -static __inline void CLRWFLGS(void); -static __inline void CLRWFLGS(void) +static inline void CLRWFLGS(void); +static inline void CLRWFLGS(void) { printf("%s, %d: clear flags %s %d\n", curr_pos.p_file, curr_pos.p_line, __FILE__, __LINE__); @@ -79,8 +79,8 @@ static __inline void CLRWFLGS(void) onowarn = -1; } -static __inline void SAVE(void); -static __inline void SAVE(void) +static inline void SAVE(void); +static inline void SAVE(void) { if (onowarn != -1) abort(); @@ -89,8 +89,8 @@ static __inline void SAVE(void) onowarn = nowarn; } -static __inline void RESTORE(void); -static __inline void RESTORE(void) +static inline void RESTORE(void); +static inline void RESTORE(void) { if (onowarn != -1) { nowarn = onowarn; @@ -107,6 +107,8 @@ static __inline void RESTORE(void) #endif %} +%expect 1 + %union { int y_int; val_t *y_val; @@ -118,6 +120,7 @@ static __inline void RESTORE(void) tqual_t y_tqual; type_t *y_type; tnode_t *y_tnode; + range_t y_range; strg_t *y_strg; pqinf_t *y_pqinf; }; @@ -243,6 +246,8 @@ static __inline void RESTORE(void) %type parameter_type_list %type parameter_declaration %type expr +%type expr_stmnt_val +%type expr_stmnt_list %type term %type func_arg_list %type point_or_arrow @@ -253,6 +258,8 @@ static __inline void RESTORE(void) %type string %type string2 %type opt_asm_or_symbolrename +%type range +%type lorange %% @@ -682,12 +689,12 @@ notype_member_decl: $$ = $1; } | notype_decl T_COLON constant { - $$ = bitfield($1, toicon($3)); + $$ = bitfield($1, toicon($3, 1)); } | { symtyp = FVFT; } T_COLON constant { - $$ = bitfield(NULL, toicon($3)); + $$ = bitfield(NULL, toicon($3, 1)); } ; @@ -696,12 +703,12 @@ type_member_decl: $$ = $1; } | type_decl T_COLON constant { - $$ = bitfield($1, toicon($3)); + $$ = bitfield($1, toicon($3, 1)); } | { symtyp = FVFT; } T_COLON constant { - $$ = bitfield(NULL, toicon($3)); + $$ = bitfield(NULL, toicon($3, 1)); } ; @@ -784,7 +791,7 @@ enumerator: $$ = ename($1, enumval, 1); } | ename T_ASSIGN constant { - $$ = ename($1, toicon($3), 0); + $$ = ename($1, toicon($3, 1), 0); } ; @@ -849,7 +856,7 @@ notype_direct_decl: $$ = addarray($1, 0, 0); } | notype_direct_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | notype_direct_decl param_list { $$ = addfunc($1, $2); @@ -878,7 +885,7 @@ type_direct_decl: $$ = addarray($1, 0, 0); } | type_direct_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | type_direct_decl param_list { $$ = addfunc($1, $2); @@ -914,7 +921,7 @@ direct_param_decl: $$ = addarray($1, 0, 0); } | direct_param_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | direct_param_decl param_list { $$ = addfunc($1, $2); @@ -943,7 +950,7 @@ direct_notype_param_decl: $$ = addarray($1, 0, 0); } | direct_notype_param_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | direct_notype_param_decl param_list { $$ = addfunc($1, $2); @@ -1121,6 +1128,7 @@ init_expr: expr %prec T_COMMA { mkinit($1); } + | init_by_name init_expr %prec T_COMMA | init_lbrace init_expr_list init_rbrace | init_lbrace init_expr_list T_COMMA init_rbrace | error @@ -1131,6 +1139,38 @@ init_expr_list: | init_expr_list T_COMMA init_expr ; +lorange: + constant T_ELLIPSE { + $$.lo = toicon($1, 1); + } + ; +range: + constant { + $$.lo = toicon($1, 1); + $$.hi = $$.lo + 1; + } + | lorange constant { + $$.lo = $1.lo; + $$.hi = toicon($2, 1); + } + ; + +init_by_name: + T_LBRACK range T_RBRACK T_ASSIGN { + if (!Sflag) + warning(321); + } + | point identifier T_ASSIGN { + if (!Sflag) + warning(313); + memberpush($2); + } + | identifier T_COLON { + gnuism(315); + memberpush($1); + } + ; + init_lbrace: T_LBRACE { initlbr(); @@ -1187,13 +1227,13 @@ direct_abs_decl: $$ = addarray(aname(), 0, 0); } | T_LBRACK constant T_RBRACK { - $$ = addarray(aname(), 1, toicon($2)); + $$ = addarray(aname(), 1, toicon($2, 0)); } | direct_abs_decl T_LBRACK T_RBRACK { $$ = addarray($1, 0, 0); } | direct_abs_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | abs_decl_param_list { $$ = addfunc(aname(), $1); @@ -1207,9 +1247,8 @@ direct_abs_decl: } ; -stmnt: +non_expr_stmnt: labeled_stmnt - | expr_stmnt | comp_stmnt | selection_stmnt | iteration_stmnt @@ -1217,6 +1256,10 @@ stmnt: ftflg = 0; } | asm_stmnt + +stmnt: + expr_stmnt + | non_expr_stmnt ; labeled_stmnt: @@ -1231,7 +1274,12 @@ label: | T_CASE constant T_COLON { label(T_CASE, NULL, $2); ftflg = 1; - } + } + | T_CASE constant T_ELLIPSE constant T_COLON { + /* XXX: We don't fill all cases */ + label(T_CASE, NULL, $2); + ftflg = 1; + } | T_DEFAULT T_COLON { label(T_DEFAULT, NULL, NULL); ftflg = 1; @@ -1239,11 +1287,11 @@ label: ; comp_stmnt: - compstmnt_lbrace declaration_list opt_stmnt_list compstmnt_rbrace - | compstmnt_lbrace opt_stmnt_list compstmnt_rbrace + comp_stmnt_lbrace declaration_list opt_stmnt_list comp_stmnt_rbrace + | comp_stmnt_lbrace opt_stmnt_list comp_stmnt_rbrace ; -compstmnt_lbrace: +comp_stmnt_lbrace: T_LBRACE { blklev++; mblklev++; @@ -1251,7 +1299,7 @@ compstmnt_lbrace: } ; -compstmnt_rbrace: +comp_stmnt_rbrace: T_RBRACE { popdecl(); freeblk(); @@ -1276,7 +1324,7 @@ stmnt_list: expr_stmnt: expr T_SEMI { - expr($1, 0, 0); + expr($1, 0, 0, 1); ftflg = 0; } | T_SEMI { @@ -1284,6 +1332,34 @@ expr_stmnt: } ; +/* + * The following two productions are used to implement + * ({ [[decl-list] stmt-list] }). + * XXX: This is not well tested. + */ +expr_stmnt_val: + expr T_SEMI { + /* XXX: We should really do that only on the last name */ + if ($1->tn_op == NAME) + $1->tn_sym->s_used = 1; + $$ = $1; + expr($1, 0, 0, 0); + ftflg = 0; + } + | non_expr_stmnt { + $$ = getnode(); + $$->tn_type = gettyp(VOID); + } + ; + +expr_stmnt_list: + expr_stmnt_val + | expr_stmnt_list expr_stmnt_val { + $$ = $2; + } + | expr_stmnt_list expr_stmnt_val + ; + selection_stmnt: if_without_else { SAVE(); @@ -1525,6 +1601,26 @@ term: $2->tn_parn = 1; $$ = $2; } + | T_LPARN comp_stmnt_lbrace declaration_list expr_stmnt_list { + blklev--; + mblklev--; + initsym = mktempsym(duptyp($4->tn_type)); + mblklev++; + blklev++; + gnuism(320); + } comp_stmnt_rbrace T_RPARN { + $$ = getnnode(initsym, 0); + } + | T_LPARN comp_stmnt_lbrace expr_stmnt_list { + blklev--; + mblklev--; + initsym = mktempsym($3->tn_type); + mblklev++; + blklev++; + gnuism(320); + } comp_stmnt_rbrace T_RPARN { + $$ = getnnode(initsym, 0); + } | term T_INCDEC { $$ = build($2 == INC ? INCAFT : DECAFT, $1, NULL); } @@ -1580,6 +1676,14 @@ term: | T_LPARN type_name T_RPARN term %prec T_UNOP { $$ = cast($4, $2); } + | T_LPARN type_name T_RPARN %prec T_UNOP { + sym_t *tmp = mktempsym($2); + idecl(tmp, 1, NULL); + } init_lbrace init_expr_list init_rbrace { + if (!Sflag) + gnuism(319); + $$ = getnnode(initsym, 0); + } ; string: @@ -1620,6 +1724,13 @@ point_or_arrow: } ; +point: + T_STROP { + if ($1 != POINT) + error(249); + } + ; + identifier: T_NAME { $$ = $1; @@ -1635,7 +1746,6 @@ identifier: int yyerror(char *msg) { - error(249); if (++sytxerr >= 5) norecover(); @@ -1670,13 +1780,13 @@ q_gt(int64_t a, int64_t b) * expressions, it frees the memory used for the expression. */ static int -toicon(tnode_t *tn) +toicon(tnode_t *tn, int required) { int i; tspec_t t; val_t *v; - v = constant(tn); + v = constant(tn, required); /* * Abstract declarations are used inside expression. To free @@ -1721,7 +1831,7 @@ idecl(sym_t *decl, int initflg, sbuf_t * case EXTERN: if (rename != NULL) { if (decl->s_rename != NULL) - lerror("idecl() 1"); + LERROR("idecl()"); s = getlblk(1, rename->sb_len + 1); (void)memcpy(s, rename->sb_name, rename->sb_len + 1); @@ -1749,7 +1859,7 @@ idecl(sym_t *decl, int initflg, sbuf_t * decl1loc(decl, initflg); break; default: - lerror("idecl() 2"); + LERROR("idecl()"); } if (initflg && !initerr) Modified: stable/10/usr.bin/xlint/lint1/decl.c ============================================================================== --- stable/10/usr.bin/xlint/lint1/decl.c Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/lint1/decl.c Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $ */ +/* $NetBSD: decl.c,v 1.33 2004/06/20 22:20:16 jmc Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -34,7 +34,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $"); +__RCSID("$NetBSD: decl.c,v 1.33 2004/06/20 22:20:16 jmc Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -197,7 +197,7 @@ setcompl(type_t *tp, int ic) tp->t_str->sincompl = ic; } else { if (t != ENUM) - lerror("setcompl() 1"); + LERROR("setcompl()"); tp->t_enum->eincompl = ic; } } @@ -256,7 +256,7 @@ addtype(type_t *tp) * something like "typedef int a; int a b;" * This should not happen with current grammar. */ - lerror("addtype()"); + LERROR("addtype()"); } dcs->d_type = tp; return; @@ -297,7 +297,7 @@ addtype(type_t *tp) dcs->d_lmod = NOTSPEC; if (!quadflg) /* %s C does not support 'long long' */ - (void)gnuism(265, tflag ? "traditional" : "ANSI"); + (void)c99ism(265, tflag ? "traditional" : "c89"); } if (dcs->d_type != NULL && dcs->d_type->t_typedef) { @@ -466,7 +466,7 @@ addqual(tqual_t q) dcs->d_const = 1; } else { if (q != VOLATILE) - lerror("addqual() 1"); + LERROR("addqual()"); if (dcs->d_volatile) { /* duplicate "%s" */ warning(10, "volatile"); @@ -508,13 +508,13 @@ popdecl(void) (void)printf("popdecl(%d)\n", (int)dcs->d_ctx); if (dcs->d_nxt == NULL) - lerror("popdecl() 1"); + LERROR("popdecl()"); di = dcs; dcs = di->d_nxt; switch (di->d_ctx) { case EXTERN: /* there is nothing after external declarations */ - lerror("popdecl() 2"); + LERROR("popdecl()"); /* NOTREACHED */ case MOS: case MOU: @@ -562,7 +562,7 @@ popdecl(void) rmsyms(di->d_dlsyms); break; default: - lerror("popdecl() 3"); + LERROR("popdecl()"); } free(di); } @@ -635,7 +635,7 @@ deftyp(void) if (tp != NULL && (t != NOTSPEC || s != NOTSPEC || l != NOTSPEC)) { /* should never happen */ - lerror("deftyp() 1"); + LERROR("deftyp()"); } if (tp == NULL) { @@ -674,7 +674,7 @@ deftyp(void) case VOID: break; default: - lerror("deftyp() 2"); + LERROR("deftyp()"); } if (t != INT && t != CHAR && (s != NOTSPEC || l != NOTSPEC)) { dcs->d_terr = 1; @@ -712,13 +712,13 @@ deftyp(void) if (dcs->d_const && dcs->d_type->t_const) { if (!dcs->d_type->t_typedef) - lerror("deftyp() 3"); + LERROR("deftyp()"); /* typedef already qualified with "%s" */ warning(68, "const"); } if (dcs->d_volatile && dcs->d_type->t_volatile) { if (!dcs->d_type->t_typedef) - lerror("deftyp() 4"); + LERROR("deftyp()"); /* typedef already qualified with "%s" */ warning(68, "volatile"); } @@ -777,7 +777,7 @@ length(type_t *tp, const char *name) switch (tp->t_tspec) { case FUNC: /* compiler takes size of function */ - lerror("%s", msgs[12]); + LERROR("%s", msgs[12]); /* NOTREACHED */ case STRUCT: case UNION: @@ -796,7 +796,7 @@ length(type_t *tp, const char *name) default: elsz = size(tp->t_tspec); if (elsz <= 0) - lerror("length()"); + LERROR("length()"); break; } return (elem * elsz); @@ -831,7 +831,7 @@ getbound(type_t *tp) } } if (a < CHAR_BIT || a > LINT_ALIGN(1) * CHAR_BIT) - lerror("getbound() 1"); + LERROR("getbound()"); return (a); } @@ -925,7 +925,7 @@ chktyp(sym_t *sym) if (dcs->d_ctx == PARG) { if (sym->s_scl != ABSTRACT) { if (sym->s_name == unnamed) - lerror("chktyp()"); + LERROR("chktyp()"); /* void param cannot have name: %s */ error(61, sym->s_name); *tpp = gettyp(INT); @@ -963,12 +963,12 @@ decl1str(sym_t *dsym) scl_t sc; if ((sc = dsym->s_scl) != MOS && sc != MOU) - lerror("decl1str() 1"); + LERROR("decl1str()"); if (dcs->d_rdcsym != NULL) { if ((sc = dcs->d_rdcsym->s_scl) != MOS && sc != MOU) /* should be ensured by storesym() */ - lerror("decl1str() 2"); + LERROR("decl1str()"); if (dsym->s_styp == dcs->d_rdcsym->s_styp) { /* duplicate member name: %s */ error(33, dsym->s_name); @@ -991,11 +991,13 @@ decl1str(sym_t *dsym) t == SHORT || t == USHORT || t == ENUM) { if (bitfieldtype_ok == 0) { if (sflag) { + char buf[64]; /* * bit-field type '%s' invalid in * ANSI C */ - warning(273, tyname(tp)); + warning(273, + tyname(buf, sizeof(buf), tp)); } else if (pflag) { /* nonportable bit-field type */ warning(34); @@ -1051,7 +1053,7 @@ decl1str(sym_t *dsym) if ((sz = length(dsym->s_type, dsym->s_name)) == 0) { if (t == ARRAY && dsym->s_type->t_dim == 0) { /* illegal zero sized structure member: %s */ - warning(39, dsym->s_name); + c99ism(39, dsym->s_name); } } @@ -1221,12 +1223,12 @@ addarray(sym_t *decl, int dim, int n) tp->t_dim = n; if (n < 0) { - /* zero or negative array dimension */ - error(20); + /* negative array dimension */ + error(20, n); n = 0; } else if (n == 0 && dim) { - /* zero or negative array dimension */ - warning(20); + /* zero array dimension */ + c99ism(322, dim); } else if (n == 0 && !dim) { /* is incomplete type */ setcompl(tp, 1); @@ -1417,7 +1419,7 @@ dname(sym_t *sym) } else if (sc == EXTERN) { sym->s_def = DECL; } else { - lerror("dname() 1"); + LERROR("dname()"); } break; case PARG: @@ -1430,7 +1432,7 @@ dname(sym_t *sym) sym->s_reg = 1; sc = AUTO; } else { - lerror("dname() 2"); + LERROR("dname()"); } sym->s_def = DEF; break; @@ -1453,11 +1455,11 @@ dname(sym_t *sym) } else if (sc == EXTERN) { sym->s_def = DECL; } else { - lerror("dname() 3"); + LERROR("dname()"); } break; default: - lerror("dname() 4"); + LERROR("dname()"); } sym->s_scl = sc; @@ -1481,7 +1483,7 @@ iname(sym_t *sym) /* redeclaration of formal parameter %s */ error(21, sym->s_name); if (!sym->s_defarg) - lerror("iname()"); + LERROR("iname()"); } sym = pushdown(sym); } @@ -1514,7 +1516,7 @@ mktag(sym_t *tag, tspec_t kind, int decl } else if (kind == ENUM) { scl = ENUMTAG; } else { - lerror("mktag()"); + LERROR("mktag()"); } if (tag != NULL) { @@ -1636,7 +1638,7 @@ scltoa(scl_t sc) case STRTAG: s = "struct"; break; case UNIONTAG: s = "union"; break; case ENUMTAG: s = "enum"; break; - default: lerror("tagttoa()"); + default: LERROR("tagttoa()"); } return (s); } @@ -1664,7 +1666,7 @@ compltag(type_t *tp, sym_t *fmem) sp->memb = fmem; if (sp->size == 0) { /* zero sized %s */ - (void)gnuism(47, ttab[t].tt_name); + (void)c99ism(47, ttab[t].tt_name); } else { n = 0; for (mem = fmem; mem != NULL; mem = mem->s_nxt) { @@ -2143,7 +2145,7 @@ compltyp(sym_t *dsym, sym_t *ssym) while ((dst = *dstp) != NULL) { if (src == NULL || dst->t_tspec != src->t_tspec) - lerror("compltyp() 1"); + LERROR("compltyp()"); if (dst->t_tspec == ARRAY) { if (dst->t_dim == 0 && src->t_dim != 0) { *dstp = dst = duptyp(dst); @@ -2472,7 +2474,7 @@ decl1loc(sym_t *dsym, int initflg) */ break; default: - lerror("decl1loc() 1"); + LERROR("decl1loc()"); } } else if (dcs->d_rdcsym->s_blklev == blklev) { @@ -2621,7 +2623,7 @@ aname(void) sym_t *sym; if (dcs->d_ctx != ABSTRACT && dcs->d_ctx != PARG) - lerror("aname()"); + LERROR("aname()"); sym = getblk(sizeof (sym_t)); @@ -2791,7 +2793,7 @@ chkausg(int novar, sym_t *arg) { if (!arg->s_set) - lerror("chkausg() 1"); + LERROR("chkausg()"); if (novar) return; @@ -2810,7 +2812,7 @@ chkvusg(int novar, sym_t *sym) sym_t *xsym; if (blklev == 0 || sym->s_blklev == 0) - lerror("chkvusg() 1"); + LERROR("chkvusg()"); /* errors in expressions easily cause lots of these warnings */ if (nerr != 0) @@ -2875,7 +2877,7 @@ chklusg(sym_t *lab) { if (blklev != 1 || lab->s_blklev != 1) - lerror("chklusg() 1"); + LERROR("chklusg()"); if (lab->s_set && !lab->s_used) { STRUCT_ASSIGN(curr_pos, lab->s_spos); @@ -2914,7 +2916,7 @@ chktusg(sym_t *sym) warning(235, sym->s_name); break; default: - lerror("chktusg() 1"); + LERROR("chktusg()"); } } @@ -2946,7 +2948,7 @@ chkglsyms(void) chktusg(sym); } else { if (sym->s_kind != FMOS) - lerror("chkglsyms() 1"); + LERROR("chkglsyms()"); } } @@ -2961,7 +2963,7 @@ chkglvar(sym_t *sym) return; if (sym->s_scl != EXTERN && sym->s_scl != STATIC) - lerror("chkglvar() 1"); + LERROR("chkglvar()"); glchksz(sym); Modified: stable/10/usr.bin/xlint/lint1/emit1.c ============================================================================== --- stable/10/usr.bin/xlint/lint1/emit1.c Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/lint1/emit1.c Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: emit1.c,v 1.11 2002/01/31 19:36:54 tv Exp $ */ +/* $NetBSD: emit1.c,v 1.14 2004/06/20 22:20:16 jmc Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -34,7 +34,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: emit1.c,v 1.11 2002/01/31 19:36:54 tv Exp $"); +__RCSID("$NetBSD: emit1.c,v 1.14 2004/06/20 22:20:16 jmc Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -117,7 +117,7 @@ outtype(type_t *tp) case STRUCT: t = 'T'; s = 's'; break; case UNION: t = 'T'; s = 'u'; break; default: - lerror("outtyp() 1"); + LERROR("outtyp()"); } if (tp->t_const) outchar('c'); @@ -257,7 +257,7 @@ outsym(sym_t *sym, scl_t sc, def_t def) outchar('e'); break; default: - lerror("outsym() 2"); + LERROR("outsym()"); } if (llibflg && def != DECL) { /* @@ -485,7 +485,7 @@ outfstrg(strg_t *strg) u_char *cp; if (strg->st_tspec != CHAR) - lerror("outfstrg() 1"); + LERROR("outfstrg()"); cp = strg->st_cp; Modified: stable/10/usr.bin/xlint/lint1/err.c ============================================================================== --- stable/10/usr.bin/xlint/lint1/err.c Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/lint1/err.c Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.17 2002/01/31 19:36:54 tv Exp $ */ +/* $NetBSD: err.c,v 1.40 2009/04/15 01:20:57 christos Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -33,7 +33,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: err.c,v 1.17 2002/01/31 19:36:54 tv Exp $"); +__RCSID("$NetBSD: err.c,v 1.40 2009/04/15 01:20:57 christos Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -76,7 +76,7 @@ const char *msgs[] = { "null dimension", /* 17 */ "illegal use of 'void'", /* 18 */ "void type for %s", /* 19 */ - "zero or negative array dimension", /* 20 */ + "negative array dimension (%d)", /* 20 */ "redeclaration of formal parameter %s", /* 21 */ "incomplete or misplaced function definition", /* 22 */ "undefined label %s", /* 23 */ @@ -95,7 +95,7 @@ const char *msgs[] = { "illegal bit-field size", /* 36 */ "zero size bit-field", /* 37 */ "function illegal in structure or union", /* 38 */ - "illegal zero sized structure member: %s", /* 39 */ + "zero sized array in struct is a C99 extension: %s", /* 39 */ "unknown size: %s", /* 40 */ "illegal use of bit-field", /* 41 */ "forward reference to enum type", /* 42 */ @@ -103,7 +103,7 @@ const char *msgs[] = { "declaration introduces new type in ANSI C: %s %s", /* 44 */ "base type is really '%s %s'", /* 45 */ "(%s) tag redeclared", /* 46 */ - "zero sized %s", /* 47 */ + "zero sized %s is a C9X feature", /* 47 */ "overflow in enumeration values: %s", /* 48 */ "struct or union member must be named", /* 49 */ "a function is declared as an argument: %s", /* 50 */ @@ -188,7 +188,7 @@ const char *msgs[] = { "expression has null effect", /* 129 */ "enum type mismatch, op %s", /* 130 */ "conversion to '%s' may sign-extend incorrectly", /* 131 */ - "conversion from '%s' may lose accuracy", /* 132 */ + "conversion from '%s' to '%s' may lose accuracy", /* 132 */ "conversion of pointer to '%s' loses bits", /* 133 */ "conversion of pointer to '%s' may lose bits", /* 134 */ "possible pointer alignment problem", /* 135 */ @@ -232,7 +232,7 @@ const char *msgs[] = { "too many array initializers", /* 173 */ "too many initializers", /* 174 */ "initialisation of an incomplete type", /* 175 */ - "invalid initializer", /* 176 */ + "invalid initializer type %s", /* 176 */ "non-constant initializer", /* 177 */ "initializer does not fit", /* 178 */ "cannot initialize struct/union with no named member", /* 179 */ @@ -354,7 +354,7 @@ const char *msgs[] = { "conversion of '%s' to '%s' is out of range, arg #%d", /* 295 */ "conversion of negative constant to unsigned type, arg #%d", /* 296 */ "conversion to '%s' may sign-extend incorrectly, arg #%d", /* 297 */ - "conversion from '%s' may lose accuracy, arg #%d", /* 298 */ + "conversion from '%s' to '%s' may lose accuracy, arg #%d", /* 298 */ "prototype does not match old style definition, arg #%d", /* 299 */ "old style definition", /* 300 */ "array of incomplete type", /* 301 */ @@ -369,6 +369,16 @@ const char *msgs[] = { "symbol renaming can't be used on function arguments", /* 310 */ "symbol renaming can't be used on automatic variables", /* 311 */ "%s C does not support // comments", /* 312 */ + "struct or union member name in initializer is a C9X feature",/* 313 */ + "%s is not a structure or a union", /* 314 */ + "GCC style struct or union member name in initializer", /* 315 */ + "__FUNCTION__ is a GCC extension", /* 316 */ + "__func__ is a C9X feature", /* 317 */ + "variable array dimension is a C99/GCC extension", /* 318 */ + "compound literals are a C9X/GCC extension", /* 319 */ + "({ }) is a GCC extension", /* 320 */ + "array initializer with designators is a C9X feature", /* 321 */ + "zero sized array is a C99 extension", /* 322 */ }; /* @@ -377,10 +387,10 @@ const char *msgs[] = { void msglist(void) { - int i; + size_t i; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Mon Apr 6 22:41:15 2015 Return-Path: Delivered-To: svn-src-stable-10@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 1801EDFE; Mon, 6 Apr 2015 22: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 028AE11A; Mon, 6 Apr 2015 22: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 t36MfElD009410; Mon, 6 Apr 2015 22:41:14 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36MfECC009408; Mon, 6 Apr 2015 22:41:14 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201504062241.t36MfECC009408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 6 Apr 2015 22:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281174 - in stable/10: share/man/man4 sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 22:41:15 -0000 Author: hiren Date: Mon Apr 6 22:41:13 2015 New Revision: 281174 URL: https://svnweb.freebsd.org/changeset/base/281174 Log: MFC r280233, r280237, r280441 Add connection flowid and flowtype to siftr(4). Sponsored by: Limelight Networks Modified: stable/10/share/man/man4/siftr.4 stable/10/sys/netinet/siftr.c Modified: stable/10/share/man/man4/siftr.4 ============================================================================== --- stable/10/share/man/man4/siftr.4 Mon Apr 6 22:19:51 2015 (r281173) +++ stable/10/share/man/man4/siftr.4 Mon Apr 6 22:41:13 2015 (r281174) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2010 +.Dd March 18, 2015 .Dt SIFTR 4 .Os .Sh NAME @@ -335,6 +335,22 @@ Bytes acknowledged via SACK are not excl .It Va 26 The current number of segments in the reassembly queue. .El +.Bl -tag -offset indent -width Va +.It Va 27 +Flowid for the connection. +A caveat: Zero '0' either represents a valid flowid or a default value when it's +not being set. There is no easy way to differentiate without looking at actual +network interface card and drivers being used. +.El +.Bl -tag -offset indent -width Va +.It Va 28 +Flow type for the connection. +Flowtype defines which protocol fields are hashed to produce the flowid. +A complete listing is available in +.Pa sys/mbuf.h +under +.Dv M_HASHTYPE_* . +.El .Pp The third type of log message is written to the file when the module is disabled and ceases collecting data from the running kernel. Modified: stable/10/sys/netinet/siftr.c ============================================================================== --- stable/10/sys/netinet/siftr.c Mon Apr 6 22:19:51 2015 (r281173) +++ stable/10/sys/netinet/siftr.c Mon Apr 6 22:41:13 2015 (r281174) @@ -225,6 +225,10 @@ struct pkt_node { u_int sent_inflight_bytes; /* Number of segments currently in the reassembly queue. */ int t_segqlen; + /* Flowid for the connection. */ + u_int flowid; + /* Flow type for the connection. */ + u_int flowtype; /* Link to next pkt_node in the list. */ STAILQ_ENTRY(pkt_node) nodes; }; @@ -442,7 +446,7 @@ siftr_process_pkt(struct pkt_node * pkt_ MAX_LOG_MSG_LEN, "%c,0x%08x,%zd.%06ld,%x:%x:%x:%x:%x:%x:%x:%x,%u,%x:%x:%x:" "%x:%x:%x:%x:%x,%u,%ld,%ld,%ld,%ld,%ld,%u,%u,%u,%u,%u,%u," - "%u,%d,%u,%u,%u,%u,%u,%u\n", + "%u,%d,%u,%u,%u,%u,%u,%u,%u,%u\n", direction[pkt_node->direction], pkt_node->hash, pkt_node->tval.tv_sec, @@ -483,7 +487,9 @@ siftr_process_pkt(struct pkt_node * pkt_ pkt_node->rcv_buf_hiwater, pkt_node->rcv_buf_cc, pkt_node->sent_inflight_bytes, - pkt_node->t_segqlen); + pkt_node->t_segqlen, + pkt_node->flowid, + pkt_node->flowtype); } else { /* IPv4 packet */ pkt_node->ip_laddr[0] = FIRST_OCTET(pkt_node->ip_laddr[3]); pkt_node->ip_laddr[1] = SECOND_OCTET(pkt_node->ip_laddr[3]); @@ -499,7 +505,7 @@ siftr_process_pkt(struct pkt_node * pkt_ log_buf->ae_bytesused = snprintf(log_buf->ae_data, MAX_LOG_MSG_LEN, "%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld," - "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u\n", + "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u,%u\n", direction[pkt_node->direction], pkt_node->hash, (intmax_t)pkt_node->tval.tv_sec, @@ -532,7 +538,9 @@ siftr_process_pkt(struct pkt_node * pkt_ pkt_node->rcv_buf_hiwater, pkt_node->rcv_buf_cc, pkt_node->sent_inflight_bytes, - pkt_node->t_segqlen); + pkt_node->t_segqlen, + pkt_node->flowid, + pkt_node->flowtype); #ifdef SIFTR_IPV6 } #endif @@ -785,6 +793,8 @@ siftr_siftdata(struct pkt_node *pn, stru pn->rcv_buf_cc = inp->inp_socket->so_rcv.sb_cc; pn->sent_inflight_bytes = tp->snd_max - tp->snd_una; pn->t_segqlen = tp->t_segqlen; + pn->flowid = inp->inp_flowid; + pn->flowtype = inp->inp_flowtype; /* We've finished accessing the tcb so release the lock. */ if (inp_locally_locked) From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 02:53:16 2015 Return-Path: Delivered-To: svn-src-stable-10@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 53160748; Tue, 7 Apr 2015 02:53: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 3E026DB3; Tue, 7 Apr 2015 02:53: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 t372rGMg030565; Tue, 7 Apr 2015 02:53:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t372rFDV030562; Tue, 7 Apr 2015 02:53:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504070253.t372rFDV030562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 7 Apr 2015 02:53:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281185 - stable/10/crypto/openssh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 02:53:16 -0000 Author: bdrewery Date: Tue Apr 7 02:53:14 2015 New Revision: 281185 URL: https://svnweb.freebsd.org/changeset/base/281185 Log: MFC r280360: Document "none" for VersionAddendum. Modified: stable/10/crypto/openssh/ssh_config.5 stable/10/crypto/openssh/sshd_config.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssh/ssh_config.5 ============================================================================== --- stable/10/crypto/openssh/ssh_config.5 Tue Apr 7 02:18:52 2015 (r281184) +++ stable/10/crypto/openssh/ssh_config.5 Tue Apr 7 02:53:14 2015 (r281185) @@ -35,7 +35,7 @@ .\" .\" $OpenBSD: ssh_config.5,v 1.185 2014/02/23 20:11:36 djm Exp $ .\" $FreeBSD$ -.Dd February 23, 2014 +.Dd March 22, 2015 .Dt SSH_CONFIG 5 .Os .Sh NAME @@ -1424,6 +1424,9 @@ Specifies a string to append to the regu OS- or site-specific modifications. The default is .Dq FreeBSD-20140420 . +The value +.Dq none +may be used to disable this. .It Cm VisualHostKey If this flag is set to .Dq yes , Modified: stable/10/crypto/openssh/sshd_config.5 ============================================================================== --- stable/10/crypto/openssh/sshd_config.5 Tue Apr 7 02:18:52 2015 (r281184) +++ stable/10/crypto/openssh/sshd_config.5 Tue Apr 7 02:53:14 2015 (r281185) @@ -35,7 +35,7 @@ .\" .\" $OpenBSD: sshd_config.5,v 1.172 2014/02/27 22:47:07 djm Exp $ .\" $FreeBSD$ -.Dd February 27, 2014 +.Dd March 22, 2015 .Dt SSHD_CONFIG 5 .Os .Sh NAME @@ -1254,6 +1254,9 @@ Optionally specifies additional text to sent by the server upon connection. The default is .Dq FreeBSD-20140420 . +The value +.Dq none +may be used to disable this. .It Cm X11DisplayOffset Specifies the first display number available for .Xr sshd 8 Ns 's From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 04:21:37 2015 Return-Path: Delivered-To: svn-src-stable-10@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 60DAE67C; Tue, 7 Apr 2015 04:21: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 4B94A9B7; Tue, 7 Apr 2015 04:21: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 t374LaBU073021; Tue, 7 Apr 2015 04:21:36 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t374LaLI073020; Tue, 7 Apr 2015 04:21:36 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201504070421.t374LaLI073020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Tue, 7 Apr 2015 04:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281187 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 04:21:37 -0000 Author: jpaetzel Date: Tue Apr 7 04:21:36 2015 New Revision: 281187 URL: https://svnweb.freebsd.org/changeset/base/281187 Log: MFC 281084 Fix thinko/copypaste error. When checking the length of the mutual secret password the variable for the secret password was used by mistake. This resulted in ctld never warning about the length of the mutual secret being wrong even if it was. Sponsored by: iXsystems Modified: stable/10/usr.sbin/ctld/ctld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Tue Apr 7 02:55:22 2015 (r281186) +++ stable/10/usr.sbin/ctld/ctld.c Tue Apr 7 04:21:36 2015 (r281187) @@ -203,7 +203,7 @@ auth_check_secret_length(struct auth *au } if (auth->a_mutual_secret != NULL) { - len = strlen(auth->a_secret); + len = strlen(auth->a_mutual_secret); if (len > 16) { if (auth->a_auth_group->ag_name != NULL) log_warnx("mutual secret for user \"%s\", " From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 07:08:36 2015 Return-Path: Delivered-To: svn-src-stable-10@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 676A1FB7; Tue, 7 Apr 2015 07:08: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 51FFBC5F; Tue, 7 Apr 2015 07:08: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 t3778aJa048520; Tue, 7 Apr 2015 07:08:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3778abn048519; Tue, 7 Apr 2015 07:08:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504070708.t3778abn048519@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 7 Apr 2015 07:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281194 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 07:08:36 -0000 Author: kib Date: Tue Apr 7 07:08:35 2015 New Revision: 281194 URL: https://svnweb.freebsd.org/changeset/base/281194 Log: MFC r281071: Remove useless initialization. Modified: stable/10/sys/kern/sysv_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sysv_shm.c ============================================================================== --- stable/10/sys/kern/sysv_shm.c Tue Apr 7 06:25:29 2015 (r281193) +++ stable/10/sys/kern/sysv_shm.c Tue Apr 7 07:08:35 2015 (r281194) @@ -327,7 +327,7 @@ kern_shmat_locked(struct thread *td, int { struct proc *p = td->td_proc; struct shmid_kernel *shmseg; - struct shmmap_state *shmmap_s = NULL; + struct shmmap_state *shmmap_s; vm_offset_t attach_va; vm_prot_t prot; vm_size_t size; From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 07:10:45 2015 Return-Path: Delivered-To: svn-src-stable-10@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 793FC1A8; Tue, 7 Apr 2015 07:10: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 643FCD17; Tue, 7 Apr 2015 07:10: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 t377AiVI051220; Tue, 7 Apr 2015 07:10:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t377AikA051219; Tue, 7 Apr 2015 07:10:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504070710.t377AikA051219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 7 Apr 2015 07:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281195 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 07:10:45 -0000 Author: kib Date: Tue Apr 7 07:10:44 2015 New Revision: 281195 URL: https://svnweb.freebsd.org/changeset/base/281195 Log: MFC r281094: Restore proper error from oshmctl(2), broken by r280323. Modified: stable/10/sys/kern/sysv_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sysv_shm.c ============================================================================== --- stable/10/sys/kern/sysv_shm.c Tue Apr 7 07:08:35 2015 (r281194) +++ stable/10/sys/kern/sysv_shm.c Tue Apr 7 07:10:44 2015 (r281195) @@ -971,7 +971,7 @@ oshmctl(struct thread *td, struct oshmct shmseg = shm_find_segment(uap->shmid, true); if (shmseg == NULL) { SYSVSHM_UNLOCK(); - return (error); + return (EINVAL); } switch (uap->cmd) { case IPC_STAT: From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 15:24:38 2015 Return-Path: Delivered-To: svn-src-stable-10@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 BFE923DC; Tue, 7 Apr 2015 15:24: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 AA6E93A1; Tue, 7 Apr 2015 15:24: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 t37FOcVZ086845; Tue, 7 Apr 2015 15:24:38 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37FOcDE086844; Tue, 7 Apr 2015 15:24:38 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201504071524.t37FOcDE086844@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Tue, 7 Apr 2015 15:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281205 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:24:38 -0000 Author: brueffer Date: Tue Apr 7 15:24:37 2015 New Revision: 281205 URL: https://svnweb.freebsd.org/changeset/base/281205 Log: MFH: r280765 Mention support for 16h family processors, added in r263169. PR: 198933 Submitted by: isoa@kapsi.fi Modified: stable/10/share/man/man4/amdtemp.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/amdtemp.4 ============================================================================== --- stable/10/share/man/man4/amdtemp.4 Tue Apr 7 15:12:03 2015 (r281204) +++ stable/10/share/man/man4/amdtemp.4 Tue Apr 7 15:24:37 2015 (r281205) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2012 +.Dd March 27, 2015 .Dt AMDTEMP 4 .Os .Sh NAME @@ -53,7 +53,7 @@ The driver provides support for the on-die digital thermal sensor present in .Tn AMD -Family 0Fh, 10h, 11h, 12h, 14h, and 15h processors. +Family 0Fh, 10h, 11h, 12h, 14h, 15h, and 16h processors. .Pp For Family 0Fh processors, the .Nm @@ -64,7 +64,7 @@ The driver also creates in the corresponding CPU device's sysctl tree, displaying the maximum temperature of the two sensors located in each CPU core. .Pp -For Family 10h, 11h, 12h, 14h, and 15h processors, the driver reports each +For Family 10h, 11h, 12h, 14h, 15h and 16h processors, the driver reports each package's temperature through a sysctl node, named .Va dev.amdtemp.%d.core0.sensor0 . The driver also creates From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 15:28:24 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 36A60631; Tue, 7 Apr 2015 15:28:24 +0000 (UTC) Date: Tue, 7 Apr 2015 15:28:24 +0000 From: Alexey Dokuchaev To: Christian Brueffer Subject: Re: svn commit: r281205 - stable/10/share/man/man4 Message-ID: <20150407152824.GA21492@FreeBSD.org> References: <201504071524.t37FOcDE086844@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504071524.t37FOcDE086844@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:28:24 -0000 On Tue, Apr 07, 2015 at 03:24:38PM +0000, Christian Brueffer wrote: > New Revision: 281205 > URL: https://svnweb.freebsd.org/changeset/base/281205 > > [...] > -Family 0Fh, 10h, 11h, 12h, 14h, and 15h processors. > +Family 0Fh, 10h, 11h, 12h, 14h, 15h, and 16h processors. Note that Oxford comma is (correctly) retained here... > -For Family 10h, 11h, 12h, 14h, and 15h processors, the driver reports each > +For Family 10h, 11h, 12h, 14h, 15h and 16h processors, the driver reports each ... but not here. ./danfe From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 15:32:44 2015 Return-Path: Delivered-To: svn-src-stable-10@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 AE6349E4; Tue, 7 Apr 2015 15:32: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 8FA4E75B; Tue, 7 Apr 2015 15:32:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37FWixU091427; Tue, 7 Apr 2015 15:32:44 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37FWi7o091425; Tue, 7 Apr 2015 15:32:44 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504071532.t37FWi7o091425@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 7 Apr 2015 15:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281207 - in stable/10/sys/dev/cxgbe: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:32:44 -0000 Author: np Date: Tue Apr 7 15:32:43 2015 New Revision: 281207 URL: https://svnweb.freebsd.org/changeset/base/281207 Log: MFC r274456: Fix some bad interaction between cxgbe(4) and lacp lagg(4) that could leave a port permanently disabled when a copper cable is unplugged and then plugged right back in. lacp_linkstate goes looking for the current ifmedia on a link state change and it could get stale information from cxgbe(4) on a module unplug followed by replug. The fix is to process module events before link-state events within the driver, and to always rebuild the ifmedia list on a module change event (instead of rebuilding it lazily). Thanks to asomers@ for the problem report and detailed analysis to go with it. Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Tue Apr 7 15:32:25 2015 (r281206) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Tue Apr 7 15:32:43 2015 (r281207) @@ -5417,6 +5417,10 @@ int t4_handle_fw_rpl(struct adapter *ada } lc = &pi->link_cfg; + if (mod != pi->mod_type) { + pi->mod_type = mod; + t4_os_portmod_changed(adap, i); + } if (link_ok != lc->link_ok || speed != lc->speed || fc != lc->fc) { /* something changed */ int reason; @@ -5432,10 +5436,6 @@ int t4_handle_fw_rpl(struct adapter *ada lc->supported = ntohs(p->u.info.pcap); t4_os_link_changed(adap, i, link_ok, reason); } - if (mod != pi->mod_type) { - pi->mod_type = mod; - t4_os_portmod_changed(adap, i); - } } else { CH_WARN_RATELIMIT(adap, "Unknown firmware reply 0x%x (0x%x)\n", opcode, action); Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Tue Apr 7 15:32:25 2015 (r281206) +++ stable/10/sys/dev/cxgbe/t4_main.c Tue Apr 7 15:32:43 2015 (r281207) @@ -1483,7 +1483,9 @@ cxgbe_media_status(struct ifnet *ifp, st struct ifmedia *media = NULL; struct ifmedia_entry *cur; int speed = pi->link_cfg.speed; +#ifdef INVARIANTS int data = (pi->port_type << 8) | pi->mod_type; +#endif if (ifp == pi->ifp) media = &pi->media; @@ -1494,10 +1496,7 @@ cxgbe_media_status(struct ifnet *ifp, st MPASS(media != NULL); cur = media->ifm_cur; - if (cur->ifm_data != data) { - build_medialist(pi, media); - cur = media->ifm_cur; - } + MPASS(cur->ifm_data == data); ifmr->ifm_status = IFM_AVALID; if (!pi->link_cfg.link_ok) @@ -7903,6 +7902,11 @@ t4_os_portmod_changed(const struct adapt NULL, "LR", "SR", "ER", "TWINAX", "active TWINAX", "LRM" }; + build_medialist(pi, &pi->media); +#ifdef DEV_NETMAP + build_medialist(pi, &pi->nm_media); +#endif + if (pi->mod_type == FW_PORT_MOD_TYPE_NONE) if_printf(pi->ifp, "transceiver unplugged.\n"); else if (pi->mod_type == FW_PORT_MOD_TYPE_UNKNOWN) From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 15:34:35 2015 Return-Path: Delivered-To: svn-src-stable-10@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 72388B5B; Tue, 7 Apr 2015 15:34: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 5C7CD780; Tue, 7 Apr 2015 15:34: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 t37FYY8H091736; Tue, 7 Apr 2015 15:34:34 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37FYYUL091735; Tue, 7 Apr 2015 15:34:34 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201504071534.t37FYYUL091735@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Tue, 7 Apr 2015 15:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281208 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:34:35 -0000 Author: brueffer Date: Tue Apr 7 15:34:34 2015 New Revision: 281208 URL: https://svnweb.freebsd.org/changeset/base/281208 Log: MFH: r281206 Add a missing comma. Modified: stable/10/share/man/man4/amdtemp.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/amdtemp.4 ============================================================================== --- stable/10/share/man/man4/amdtemp.4 Tue Apr 7 15:32:43 2015 (r281207) +++ stable/10/share/man/man4/amdtemp.4 Tue Apr 7 15:34:34 2015 (r281208) @@ -64,7 +64,7 @@ The driver also creates in the corresponding CPU device's sysctl tree, displaying the maximum temperature of the two sensors located in each CPU core. .Pp -For Family 10h, 11h, 12h, 14h, 15h and 16h processors, the driver reports each +For Family 10h, 11h, 12h, 14h, 15h, and 16h processors, the driver reports each package's temperature through a sysctl node, named .Va dev.amdtemp.%d.core0.sensor0 . The driver also creates From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 17:07:31 2015 Return-Path: Delivered-To: svn-src-stable-10@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 BD2BE6F2; Tue, 7 Apr 2015 17:07: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 A7C112EC; Tue, 7 Apr 2015 17:07: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 t37H7VPV035389; Tue, 7 Apr 2015 17:07:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37H7V3k035386; Tue, 7 Apr 2015 17:07:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504071707.t37H7V3k035386@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 7 Apr 2015 17:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281211 - in stable/10/sys/dev/cxgbe: . tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 17:07:31 -0000 Author: np Date: Tue Apr 7 17:07:30 2015 New Revision: 281211 URL: https://svnweb.freebsd.org/changeset/base/281211 Log: MFC r275733: Move KTR_CXGBE from t4_tom.h to adapter.h so that the base if_cxgbe code can use it too. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Tue Apr 7 16:48:23 2015 (r281210) +++ stable/10/sys/dev/cxgbe/adapter.h Tue Apr 7 17:07:30 2015 (r281211) @@ -51,6 +51,7 @@ #include "common/t4_msg.h" #include "firmware/t4fw_interface.h" +#define KTR_CXGBE KTR_SPARE3 MALLOC_DECLARE(M_CXGBE); #define CXGBE_UNIMPLEMENTED(s) \ panic("%s (%s, line %d) not implemented yet.", s, __FILE__, __LINE__) Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.h Tue Apr 7 16:48:23 2015 (r281210) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.h Tue Apr 7 17:07:30 2015 (r281211) @@ -31,7 +31,6 @@ #ifndef __T4_TOM_H__ #define __T4_TOM_H__ -#define KTR_CXGBE KTR_SPARE3 #define LISTEN_HASH_SIZE 32 /* From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 17:21:31 2015 Return-Path: Delivered-To: svn-src-stable-10@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 B0685C4D; Tue, 7 Apr 2015 17:21: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 99F836D0; Tue, 7 Apr 2015 17:21: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 t37HLVp6044073; Tue, 7 Apr 2015 17:21:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37HLVwk044071; Tue, 7 Apr 2015 17:21:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504071721.t37HLVwk044071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 7 Apr 2015 17:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281212 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 17:21:31 -0000 Author: np Date: Tue Apr 7 17:21:30 2015 New Revision: 281212 URL: https://svnweb.freebsd.org/changeset/base/281212 Log: MFC r275539, r275554. r275539: cxgbe(4): Allow for different pad and pack boundaries for different adapters. Set the pack boundary for T5 cards to be the same as the PCIe max payload size. The chip likes it this way. In this revision the driver allocate rx buffers that align on both boundaries. This is not a strict requirement and a followup commit will switch the driver to a more relaxed allocation strategy. r275554: cxgbe(4): allow the driver to use rx buffers that do not end on a pack boundary. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Tue Apr 7 17:07:30 2015 (r281211) +++ stable/10/sys/dev/cxgbe/adapter.h Tue Apr 7 17:21:30 2015 (r281212) @@ -687,6 +687,7 @@ struct sge { struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ + int pad_boundary; int pack_boundary; int8_t safe_hwidx1; /* may not have room for metadata */ int8_t safe_hwidx2; /* with room for metadata and maybe more */ Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Tue Apr 7 17:07:30 2015 (r281211) +++ stable/10/sys/dev/cxgbe/t4_sge.c Tue Apr 7 17:21:30 2015 (r281212) @@ -119,19 +119,10 @@ TUNABLE_INT("hw.cxgbe.buffer_packing", & /* * Start next frame in a packed buffer at this boundary. * -1: driver should figure out a good value. - * T4: - * --- - * if fl_pad != 0 - * value specified here will be overridden by fl_pad. - * else - * power of 2 from 32 to 4096 (both inclusive) is a valid value here. - * T5: - * --- - * 16, or a power of 2 from 64 to 4096 (both inclusive) is a valid value. + * T4: driver will ignore this and use the same value as fl_pad above. + * T5: 16, or a power of 2 from 64 to 4096 (both inclusive) is a valid value. */ static int fl_pack = -1; -static int t4_fl_pack; -static int t5_fl_pack; TUNABLE_INT("hw.cxgbe.fl_pack", &fl_pack); /* @@ -174,8 +165,7 @@ static int service_iq(struct sge_iq *, i static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t); static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *); static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int); -static inline void init_fl(struct adapter *, struct sge_fl *, int, int, int, - char *); +static inline void init_fl(struct adapter *, struct sge_fl *, int, int, char *); static inline void init_eq(struct sge_eq *, int, int, uint8_t, uint16_t, char *); static int alloc_ring(struct adapter *, size_t, bus_dma_tag_t *, bus_dmamap_t *, @@ -263,15 +253,6 @@ static counter_u64_t extfree_rels; void t4_sge_modload(void) { - int pad; - - /* set pad to a reasonable powerof2 between 16 and 4096 (inclusive) */ -#if defined(__i386__) || defined(__amd64__) - pad = max(cpu_clflush_line_size, 16); -#else - pad = max(CACHE_LINE_SIZE, 16); -#endif - pad = min(pad, 4096); if (fl_pktshift < 0 || fl_pktshift > 7) { printf("Invalid hw.cxgbe.fl_pktshift value (%d)," @@ -279,35 +260,6 @@ t4_sge_modload(void) fl_pktshift = 2; } - if (fl_pad != 0 && - (fl_pad < 32 || fl_pad > 4096 || !powerof2(fl_pad))) { - - if (fl_pad != -1) { - printf("Invalid hw.cxgbe.fl_pad value (%d)," - " using %d instead.\n", fl_pad, max(pad, 32)); - } - fl_pad = max(pad, 32); - } - - /* - * T4 has the same pad and pack boundary. If a pad boundary is set, - * pack boundary must be set to the same value. Otherwise take the - * specified value or auto-calculate something reasonable. - */ - if (fl_pad) - t4_fl_pack = fl_pad; - else if (fl_pack < 32 || fl_pack > 4096 || !powerof2(fl_pack)) - t4_fl_pack = max(pad, 32); - else - t4_fl_pack = fl_pack; - - /* T5's pack boundary is independent of the pad boundary. */ - if (fl_pack < 16 || fl_pack == 32 || fl_pack > 4096 || - !powerof2(fl_pack)) - t5_fl_pack = max(pad, CACHE_LINE_SIZE); - else - t5_fl_pack = fl_pack; - if (spg_len != 64 && spg_len != 128) { int len; @@ -365,6 +317,71 @@ t4_init_sge_cpl_handlers(struct adapter t4_register_fw_msg_handler(sc, FW6_TYPE_CMD_RPL, t4_handle_fw_rpl); } +static inline void +setup_pad_and_pack_boundaries(struct adapter *sc) +{ + uint32_t v, m; + int pad, pack; + + pad = fl_pad; + if (fl_pad < 32 || fl_pad > 4096 || !powerof2(fl_pad)) { + /* + * If there is any chance that we might use buffer packing and + * the chip is a T4, then pick 64 as the pad/pack boundary. Set + * it to 32 in all other cases. + */ + pad = is_t4(sc) && buffer_packing ? 64 : 32; + + /* + * For fl_pad = 0 we'll still write a reasonable value to the + * register but all the freelists will opt out of padding. + * We'll complain here only if the user tried to set it to a + * value greater than 0 that was invalid. + */ + if (fl_pad > 0) { + device_printf(sc->dev, "Invalid hw.cxgbe.fl_pad value" + " (%d), using %d instead.\n", fl_pad, pad); + } + } + m = V_INGPADBOUNDARY(M_INGPADBOUNDARY); + v = V_INGPADBOUNDARY(ilog2(pad) - 5); + t4_set_reg_field(sc, A_SGE_CONTROL, m, v); + + if (is_t4(sc)) { + if (fl_pack != -1 && fl_pack != pad) { + /* Complain but carry on. */ + device_printf(sc->dev, "hw.cxgbe.fl_pack (%d) ignored," + " using %d instead.\n", fl_pack, pad); + } + return; + } + + pack = fl_pack; + if (fl_pack < 16 || fl_pack == 32 || fl_pack > 4096 || + !powerof2(fl_pack)) { + pack = max(sc->params.pci.mps, CACHE_LINE_SIZE); + MPASS(powerof2(pack)); + if (pack < 16) + pack = 16; + if (pack == 32) + pack = 64; + if (pack > 4096) + pack = 4096; + if (fl_pack != -1) { + device_printf(sc->dev, "Invalid hw.cxgbe.fl_pack value" + " (%d), using %d instead.\n", fl_pack, pack); + } + } + m = V_INGPACKBOUNDARY(M_INGPACKBOUNDARY); + if (pack == 16) + v = V_INGPACKBOUNDARY(0); + else + v = V_INGPACKBOUNDARY(ilog2(pack) - 5); + + MPASS(!is_t4(sc)); /* T4 doesn't have SGE_CONTROL2 */ + t4_set_reg_field(sc, A_SGE_CONTROL2, m, v); +} + /* * adap->params.vpd.cclk must be set up before this is called. */ @@ -397,24 +414,9 @@ t4_tweak_chip_settings(struct adapter *s m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | F_EGRSTATUSPAGESIZE; v = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | V_EGRSTATUSPAGESIZE(spg_len == 128); - if (is_t4(sc) && (fl_pad || buffer_packing)) { - /* t4_fl_pack has the correct value even when fl_pad = 0 */ - m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); - v |= V_INGPADBOUNDARY(ilog2(t4_fl_pack) - 5); - } else if (is_t5(sc) && fl_pad) { - m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); - v |= V_INGPADBOUNDARY(ilog2(fl_pad) - 5); - } t4_set_reg_field(sc, A_SGE_CONTROL, m, v); - if (is_t5(sc) && buffer_packing) { - m = V_INGPACKBOUNDARY(M_INGPACKBOUNDARY); - if (t5_fl_pack == 16) - v = V_INGPACKBOUNDARY(0); - else - v = V_INGPACKBOUNDARY(ilog2(t5_fl_pack) - 5); - t4_set_reg_field(sc, A_SGE_CONTROL2, m, v); - } + setup_pad_and_pack_boundaries(sc); v = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) | @@ -485,13 +487,16 @@ t4_tweak_chip_settings(struct adapter *s } /* - * SGE wants the buffer to be at least 64B and then a multiple of the pad - * boundary or 16, whichever is greater. + * SGE wants the buffer to be at least 64B and then a multiple of 16. If + * padding is is use the buffer's start and end need to be aligned to the pad + * boundary as well. We'll just make sure that the size is a multiple of the + * boundary here, it is up to the buffer allocation code to make sure the start + * of the buffer is aligned as well. */ static inline int -hwsz_ok(int hwsz) +hwsz_ok(struct adapter *sc, int hwsz) { - int mask = max(fl_pad, 16) - 1; + int mask = fl_pad ? sc->sge.pad_boundary - 1 : 16 - 1; return (hwsz >= 64 && (hwsz & mask) == 0); } @@ -520,33 +525,22 @@ t4_read_chip_settings(struct adapter *sc m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | F_EGRSTATUSPAGESIZE; v = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | V_EGRSTATUSPAGESIZE(spg_len == 128); - if (is_t4(sc) && (fl_pad || buffer_packing)) { - m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); - v |= V_INGPADBOUNDARY(ilog2(t4_fl_pack) - 5); - } else if (is_t5(sc) && fl_pad) { - m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); - v |= V_INGPADBOUNDARY(ilog2(fl_pad) - 5); - } r = t4_read_reg(sc, A_SGE_CONTROL); if ((r & m) != v) { device_printf(sc->dev, "invalid SGE_CONTROL(0x%x)\n", r); rc = EINVAL; } + s->pad_boundary = 1 << (G_INGPADBOUNDARY(r) + 5); - if (is_t5(sc) && buffer_packing) { - m = V_INGPACKBOUNDARY(M_INGPACKBOUNDARY); - if (t5_fl_pack == 16) - v = V_INGPACKBOUNDARY(0); - else - v = V_INGPACKBOUNDARY(ilog2(t5_fl_pack) - 5); + if (is_t4(sc)) + s->pack_boundary = s->pad_boundary; + else { r = t4_read_reg(sc, A_SGE_CONTROL2); - if ((r & m) != v) { - device_printf(sc->dev, - "invalid SGE_CONTROL2(0x%x)\n", r); - rc = EINVAL; - } + if (G_INGPACKBOUNDARY(r) == 0) + s->pack_boundary = 16; + else + s->pack_boundary = 1 << (G_INGPACKBOUNDARY(r) + 5); } - s->pack_boundary = is_t4(sc) ? t4_fl_pack : t5_fl_pack; v = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) | @@ -567,13 +561,22 @@ t4_read_chip_settings(struct adapter *sc for (i = 0; i < nitems(s->hw_buf_info); i++, hwb++) { r = t4_read_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i)); hwb->size = r; - hwb->zidx = hwsz_ok(r) ? -1 : -2; + hwb->zidx = hwsz_ok(sc, r) ? -1 : -2; hwb->next = -1; } /* * Create a sorted list in decreasing order of hw buffer sizes (and so * increasing order of spare area) for each software zone. + * + * If padding is enabled then the start and end of the buffer must align + * to the pad boundary; if packing is enabled then they must align with + * the pack boundary as well. Allocations from the cluster zones are + * aligned to min(size, 4K), so the buffer starts at that alignment and + * ends at hwb->size alignment. If mbuf inlining is allowed the + * starting alignment will be reduced to MSIZE and the driver will + * exercise appropriate caution when deciding on the best buffer layout + * to use. */ n = 0; /* no usable buffer size to begin with */ swz = &s->sw_zone_info[0]; @@ -585,6 +588,12 @@ t4_read_chip_settings(struct adapter *sc swz->zone = m_getzone(swz->size); swz->type = m_gettype(swz->size); + if (swz->size < PAGE_SIZE) { + MPASS(powerof2(swz->size)); + if (fl_pad && (swz->size % sc->sge.pad_boundary != 0)) + continue; + } + if (swz->size == safest_rx_cluster) safe_swz = swz; @@ -592,6 +601,10 @@ t4_read_chip_settings(struct adapter *sc for (j = 0; j < SGE_FLBUF_SIZES; j++, hwb++) { if (hwb->zidx != -1 || hwb->size > swz->size) continue; +#ifdef INVARIANTS + if (fl_pad) + MPASS(hwb->size % sc->sge.pad_boundary == 0); +#endif hwb->zidx = i; if (head == -1) head = tail = j; @@ -639,14 +652,15 @@ t4_read_chip_settings(struct adapter *sc int spare; hwb = &s->hw_buf_info[i]; +#ifdef INVARIANTS + if (fl_pad) + MPASS(hwb->size % sc->sge.pad_boundary == 0); +#endif spare = safe_swz->size - hwb->size; - if (spare < CL_METADATA_SIZE) - continue; - if (s->safe_hwidx2 == -1 || - spare == CL_METADATA_SIZE + MSIZE) + if (spare >= CL_METADATA_SIZE) { s->safe_hwidx2 = i; - if (spare >= CL_METADATA_SIZE + MSIZE) break; + } } } @@ -744,17 +758,6 @@ t4_create_dma_tag(struct adapter *sc) return (rc); } -static inline int -enable_buffer_packing(struct adapter *sc) -{ - - if (sc->flags & BUF_PACKING_OK && - ((is_t5(sc) && buffer_packing) || /* 1 or -1 both ok for T5 */ - (is_t4(sc) && buffer_packing == 1))) - return (1); - return (0); -} - void t4_sge_sysctls(struct adapter *sc, struct sysctl_ctx_list *ctx, struct sysctl_oid_list *children) @@ -768,7 +771,7 @@ t4_sge_sysctls(struct adapter *sc, struc NULL, fl_pktshift, "payload DMA offset in rx buffer (bytes)"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pad", CTLFLAG_RD, - NULL, fl_pad, "payload pad boundary (bytes)"); + NULL, sc->sge.pad_boundary, "payload pad boundary (bytes)"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "spg_len", CTLFLAG_RD, NULL, spg_len, "status page size (bytes)"); @@ -776,10 +779,6 @@ t4_sge_sysctls(struct adapter *sc, struc SYSCTL_ADD_INT(ctx, children, OID_AUTO, "cong_drop", CTLFLAG_RD, NULL, cong_drop, "congestion drop setting"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, "buffer_packing", CTLFLAG_RD, - NULL, enable_buffer_packing(sc), - "pack multiple frames in one fl buffer"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pack", CTLFLAG_RD, NULL, sc->sge.pack_boundary, "payload pack boundary (bytes)"); } @@ -957,7 +956,6 @@ mtu_to_max_payload(struct adapter *sc, i #ifdef TCP_OFFLOAD } #endif - payload = roundup2(payload, fl_pad); return (payload); } @@ -982,7 +980,7 @@ t4_setup_port_queues(struct port_info *p struct ifnet *ifp = pi->ifp; struct sysctl_oid *oid = device_get_sysctl_tree(pi->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); - int maxp, pack, mtu = ifp->if_mtu; + int maxp, mtu = ifp->if_mtu; /* Interrupt vector to start from (when using multiple vectors) */ intr_idx = first_vector(pi); @@ -993,7 +991,6 @@ t4_setup_port_queues(struct port_info *p * b) allocate queue iff it will take direct interrupts. */ maxp = mtu_to_max_payload(sc, mtu, 0); - pack = enable_buffer_packing(sc); if (pi->flags & INTR_RXQ) { oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "rxq", CTLFLAG_RD, NULL, "rx queues"); @@ -1004,7 +1001,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(sc, &rxq->fl, pi->qsize_rxq / 8, maxp, pack, name); + init_fl(sc, &rxq->fl, pi->qsize_rxq / 8, maxp, name); if (pi->flags & INTR_RXQ) { rxq->iq.flags |= IQ_INTR; @@ -1028,7 +1025,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s ofld_rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(sc, &ofld_rxq->fl, pi->qsize_rxq / 8, maxp, pack, name); + init_fl(sc, &ofld_rxq->fl, pi->qsize_rxq / 8, maxp, name); if (pi->flags & INTR_OFLD_RXQ) { ofld_rxq->iq.flags |= IQ_INTR; @@ -1561,7 +1558,8 @@ rxb_free(struct mbuf *m, void *arg1, voi * d) m_extaddref (cluster with metadata) zone_mbuf */ static struct mbuf * -get_scatter_segment(struct adapter *sc, struct sge_fl *fl, int total, int flags) +get_scatter_segment(struct adapter *sc, struct sge_fl *fl, int fr_offset, + int remaining) { struct mbuf *m; struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; @@ -1569,12 +1567,23 @@ get_scatter_segment(struct adapter *sc, struct sw_zone_info *swz = &sc->sge.sw_zone_info[cll->zidx]; struct hw_buf_info *hwb = &sc->sge.hw_buf_info[cll->hwidx]; struct cluster_metadata *clm = cl_metadata(sc, fl, cll, sd->cl); - int len, padded_len; + int len, blen; caddr_t payload; - len = min(total, hwb->size - fl->rx_offset); - padded_len = roundup2(len, fl->buf_boundary); + blen = hwb->size - fl->rx_offset; /* max possible in this buf */ + len = min(remaining, blen); payload = sd->cl + cll->region1 + fl->rx_offset; + if (fl->flags & FL_BUF_PACKING) { + const u_int l = fr_offset + len; + const u_int pad = roundup2(l, fl->buf_boundary) - l; + + if (fl->rx_offset + len + pad < hwb->size) + blen = len + pad; + MPASS(fl->rx_offset + blen <= hwb->size); + } else { + MPASS(fl->rx_offset == 0); /* not packing */ + } + if (sc->sc_do_rxcopy && len < RX_COPY_THRESHOLD) { @@ -1582,7 +1591,7 @@ get_scatter_segment(struct adapter *sc, * Copy payload into a freshly allocated mbuf. */ - m = flags & M_PKTHDR ? + m = fr_offset == 0 ? m_gethdr(M_NOWAIT, MT_DATA) : m_get(M_NOWAIT, MT_DATA); if (m == NULL) return (NULL); @@ -1604,10 +1613,11 @@ get_scatter_segment(struct adapter *sc, MPASS(clm != NULL); m = (struct mbuf *)(sd->cl + sd->nmbuf * MSIZE); /* No bzero required */ - if (m_init(m, NULL, 0, M_NOWAIT, MT_DATA, flags | M_NOFREE)) + if (m_init(m, NULL, 0, M_NOWAIT, MT_DATA, + fr_offset == 0 ? M_PKTHDR | M_NOFREE : M_NOFREE)) return (NULL); fl->mbuf_inlined++; - m_extaddref(m, payload, padded_len, &clm->refcount, rxb_free, + m_extaddref(m, payload, blen, &clm->refcount, rxb_free, swz->zone, sd->cl); if (sd->nmbuf++ == 0) counter_u64_add(extfree_refs, 1); @@ -1619,13 +1629,13 @@ get_scatter_segment(struct adapter *sc, * payload in the cluster. */ - m = flags & M_PKTHDR ? + m = fr_offset == 0 ? m_gethdr(M_NOWAIT, MT_DATA) : m_get(M_NOWAIT, MT_DATA); if (m == NULL) return (NULL); fl->mbuf_allocated++; if (clm != NULL) { - m_extaddref(m, payload, padded_len, &clm->refcount, + m_extaddref(m, payload, blen, &clm->refcount, rxb_free, swz->zone, sd->cl); if (sd->nmbuf++ == 0) counter_u64_add(extfree_refs, 1); @@ -1634,12 +1644,12 @@ get_scatter_segment(struct adapter *sc, sd->cl = NULL; /* consumed, not a recycle candidate */ } } - if (flags & M_PKTHDR) - m->m_pkthdr.len = total; + if (fr_offset == 0) + m->m_pkthdr.len = remaining; m->m_len = len; if (fl->flags & FL_BUF_PACKING) { - fl->rx_offset += padded_len; + fl->rx_offset += blen; MPASS(fl->rx_offset <= hwb->size); if (fl->rx_offset < hwb->size) return (m); /* without advancing the cidx */ @@ -1661,17 +1671,17 @@ static struct mbuf * get_fl_payload(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf) { struct mbuf *m0, *m, **pnext; - u_int len; + u_int remaining; + const u_int total = G_RSPD_LEN(len_newbuf); - len = G_RSPD_LEN(len_newbuf); if (__predict_false(fl->flags & FL_BUF_RESUME)) { M_ASSERTPKTHDR(fl->m0); - MPASS(len == fl->m0->m_pkthdr.len); - MPASS(fl->remaining < len); + MPASS(fl->m0->m_pkthdr.len == total); + MPASS(fl->remaining < total); m0 = fl->m0; pnext = fl->pnext; - len = fl->remaining; + remaining = fl->remaining; fl->flags &= ~FL_BUF_RESUME; goto get_segment; } @@ -1692,25 +1702,25 @@ get_fl_payload(struct adapter *sc, struc * 'len' and it may span multiple hw buffers. */ - m0 = get_scatter_segment(sc, fl, len, M_PKTHDR); + m0 = get_scatter_segment(sc, fl, 0, total); if (m0 == NULL) return (NULL); - len -= m0->m_len; + remaining = total - m0->m_len; pnext = &m0->m_next; - while (len > 0) { + while (remaining > 0) { get_segment: MPASS(fl->rx_offset == 0); - m = get_scatter_segment(sc, fl, len, 0); + m = get_scatter_segment(sc, fl, total - remaining, remaining); if (__predict_false(m == NULL)) { fl->m0 = m0; fl->pnext = pnext; - fl->remaining = len; + fl->remaining = remaining; fl->flags |= FL_BUF_RESUME; return (NULL); } *pnext = m; pnext = &m->m_next; - len -= m->m_len; + remaining -= m->m_len; } *pnext = NULL; @@ -2122,14 +2132,15 @@ init_iq(struct sge_iq *iq, struct adapte } static inline void -init_fl(struct adapter *sc, struct sge_fl *fl, int qsize, int maxp, int pack, - char *name) +init_fl(struct adapter *sc, struct sge_fl *fl, int qsize, int maxp, char *name) { fl->qsize = qsize; fl->sidx = qsize - spg_len / EQ_ESIZE; strlcpy(fl->lockname, name, sizeof(fl->lockname)); - if (pack) + if (sc->flags & BUF_PACKING_OK && + ((!is_t4(sc) && buffer_packing) || /* T5+: enabled unless 0 */ + (is_t4(sc) && buffer_packing == 1)))/* T4: disabled unless 1 */ fl->flags |= FL_BUF_PACKING; find_best_refill_source(sc, fl, maxp); find_safe_refill_source(sc, fl); @@ -2278,11 +2289,13 @@ alloc_iq_fl(struct port_info *pi, struct if (fl->flags & FL_BUF_PACKING) { fl->lowat = roundup2(sc->sge.fl_starve_threshold2, 8); - fl->buf_boundary = max(fl_pad, sc->sge.pack_boundary); + fl->buf_boundary = sc->sge.pack_boundary; } else { fl->lowat = roundup2(sc->sge.fl_starve_threshold, 8); - fl->buf_boundary = fl_pad; + fl->buf_boundary = 16; } + if (fl_pad && fl->buf_boundary < sc->sge.pad_boundary) + fl->buf_boundary = sc->sge.pad_boundary; c.iqns_to_fl0congen |= htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE) | @@ -2453,6 +2466,10 @@ add_fl_sysctls(struct sysctl_ctx_list *c SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cntxt_id", CTLTYPE_INT | CTLFLAG_RD, &fl->cntxt_id, 0, sysctl_uint16, "I", "SGE context id of the freelist"); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "padding", CTLFLAG_RD, NULL, + fl_pad ? 1 : 0, "padding enabled"); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "packing", CTLFLAG_RD, NULL, + fl->flags & FL_BUF_PACKING ? 1 : 0, "packing enabled"); SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "cidx", CTLFLAG_RD, &fl->cidx, 0, "consumer index"); if (fl->flags & FL_BUF_PACKING) { @@ -4368,6 +4385,17 @@ done: if (allow_mbufs_in_cluster == 0 || hwb->size < maxp) break; + + /* + * Do not inline mbufs if doing so would violate the pad/pack + * boundary alignment requirement. + */ + if (fl_pad && (MSIZE % sc->sge.pad_boundary) != 0) + continue; + if (fl->flags & FL_BUF_PACKING && + (MSIZE % sc->sge.pack_boundary) != 0) + continue; + if (spare < CL_METADATA_SIZE + MSIZE) continue; n = (spare - CL_METADATA_SIZE) / MSIZE; @@ -4450,7 +4478,8 @@ find_safe_refill_source(struct adapter * spare = swz->size - hwb->size; fl->cll_alt.hwidx = hwidx; fl->cll_alt.zidx = hwb->zidx; - if (allow_mbufs_in_cluster) + if (allow_mbufs_in_cluster && + (fl_pad == 0 || (MSIZE % sc->sge.pad_boundary) == 0)) fl->cll_alt.region1 = ((spare - CL_METADATA_SIZE) / MSIZE) * MSIZE; else fl->cll_alt.region1 = 0; From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 17:33:52 2015 Return-Path: Delivered-To: svn-src-stable-10@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 98D82F7C; Tue, 7 Apr 2015 17:33: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 8398D87D; Tue, 7 Apr 2015 17:33: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 t37HXqkB049184; Tue, 7 Apr 2015 17:33:52 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37HXqQK049183; Tue, 7 Apr 2015 17:33:52 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504071733.t37HXqQK049183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 7 Apr 2015 17:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281213 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 17:33:52 -0000 Author: np Date: Tue Apr 7 17:33:51 2015 New Revision: 281213 URL: https://svnweb.freebsd.org/changeset/base/281213 Log: MFC r276570: cxgbe/tom: log some more details in send_flowc_wr. Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Apr 7 17:21:30 2015 (r281212) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Apr 7 17:33:51 2015 (r281213) @@ -111,8 +111,6 @@ send_flowc_wr(struct toepcb *toep, struc KASSERT(!(toep->flags & TPF_FLOWC_WR_SENT), ("%s: flowc for tid %u sent already", __func__, toep->tid)); - CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid); - flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq); @@ -147,11 +145,18 @@ send_flowc_wr(struct toepcb *toep, struc flowc->mnemval[6].val = htobe32(sndbuf); flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS; flowc->mnemval[7].val = htobe32(ftxp->mss); + + CTR6(KTR_CXGBE, + "%s: tid %u, mss %u, sndbuf %u, snd_nxt 0x%x, rcv_nxt 0x%x", + __func__, toep->tid, ftxp->mss, sndbuf, ftxp->snd_nxt, + ftxp->rcv_nxt); } else { flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; flowc->mnemval[4].val = htobe32(512); flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; flowc->mnemval[5].val = htobe32(512); + + CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid); } txsd->tx_credits = howmany(flowclen, 16); From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 17:40:36 2015 Return-Path: Delivered-To: svn-src-stable-10@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 8AB26230; Tue, 7 Apr 2015 17:40: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 7463C8D7; Tue, 7 Apr 2015 17:40: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 t37HeaLX050113; Tue, 7 Apr 2015 17:40:36 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37HeaPk050112; Tue, 7 Apr 2015 17:40:36 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504071740.t37HeaPk050112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 7 Apr 2015 17:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281214 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 17:40:36 -0000 Author: np Date: Tue Apr 7 17:40:35 2015 New Revision: 281214 URL: https://svnweb.freebsd.org/changeset/base/281214 Log: MFC r276574: cxgbe/tom: fix the MSS calculation for IPv6 connections handled by the TOE. Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Apr 7 17:33:51 2015 (r281213) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Apr 7 17:40:35 2015 (r281214) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define TCPSTATES #include @@ -236,11 +237,20 @@ static void assign_rxopt(struct tcpcb *tp, unsigned int opt) { struct toepcb *toep = tp->t_toe; + struct inpcb *inp = tp->t_inpcb; struct adapter *sc = td_adapter(toep->td); + int n; + + INP_LOCK_ASSERT(inp); - INP_LOCK_ASSERT(tp->t_inpcb); + if (inp->inp_inc.inc_flags & INC_ISIPV6) + n = sizeof(struct ip6_hdr) + sizeof(struct tcphdr); + else + n = sizeof(struct ip) + sizeof(struct tcphdr); + tp->t_maxseg = tp->t_maxopd = sc->params.mtus[G_TCPOPT_MSS(opt)] - n; - tp->t_maxseg = tp->t_maxopd = sc->params.mtus[G_TCPOPT_MSS(opt)] - 40; + CTR4(KTR_CXGBE, "%s: tid %d, mtu_idx %u (%u)", __func__, toep->tid, + G_TCPOPT_MSS(opt), sc->params.mtus[G_TCPOPT_MSS(opt)]); if (G_TCPOPT_TSTAMP(opt)) { tp->t_flags |= TF_RCVD_TSTMP; /* timestamps ok */ From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 18:04:19 2015 Return-Path: Delivered-To: svn-src-stable-10@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 8F2C3E32; Tue, 7 Apr 2015 18:04: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 796FDC1B; Tue, 7 Apr 2015 18:04: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 t37I4J4r064498; Tue, 7 Apr 2015 18:04:19 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37I4JaU064496; Tue, 7 Apr 2015 18:04:19 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201504071804.t37I4JaU064496@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 7 Apr 2015 18:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281215 - stable/10/sys/dev/bxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:04:19 -0000 Author: davidcs Date: Tue Apr 7 18:04:18 2015 New Revision: 281215 URL: https://svnweb.freebsd.org/changeset/base/281215 Log: MFC r281006 When an mbuf allocation fails in the receive path, the mbuf containing the received packet is not sent to the host network stack and is reused again on the receive ring. Remaining received packets in the ring are not processed in that invocation of bxe_rxeof() and defered to the task thread Modified: stable/10/sys/dev/bxe/bxe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Tue Apr 7 17:40:35 2015 (r281214) +++ stable/10/sys/dev/bxe/bxe.c Tue Apr 7 18:04:18 2015 (r281215) @@ -3257,7 +3257,7 @@ bxe_rxeof(struct bxe_softc *sc, uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons; uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod; int rx_pkts = 0; - int rc; + int rc = 0; BXE_FP_RX_LOCK(fp); @@ -3399,6 +3399,10 @@ bxe_rxeof(struct bxe_softc *sc, (sc->max_rx_bufs != RX_BD_USABLE) ? bd_prod : bd_cons); if (rc != 0) { + + /* we simply reuse the received mbuf and don't post it to the stack */ + m = NULL; + BLOGE(sc, "mbuf alloc fail for fp[%02d] rx chain (%d)\n", fp->index, rc); fp->eth_q_stats.rx_soft_errors++; @@ -3487,6 +3491,9 @@ next_cqe: sw_cq_cons = RCQ_NEXT(sw_cq_cons); /* limit spinning on the queue */ + if (rc != 0) + break; + if (rx_pkts == sc->rx_budget) { fp->eth_q_stats.rx_budget_reached++; break; From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 20:20:27 2015 Return-Path: Delivered-To: svn-src-stable-10@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 6A83B2D1; Tue, 7 Apr 2015 20:20: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 52FC1DFB; Tue, 7 Apr 2015 20:20: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 t37KKRap029562; Tue, 7 Apr 2015 20:20:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KKPiR029555; Tue, 7 Apr 2015 20:20:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504072020.t37KKPiR029555@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 7 Apr 2015 20:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281230 - in stable/10: contrib/ntp/ntpd sys/netinet sys/netinet6 usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:20:27 -0000 Author: delphij Date: Tue Apr 7 20:20:24 2015 New Revision: 281230 URL: https://svnweb.freebsd.org/changeset/base/281230 Log: Improve patch for SA-15:04.igmp to solve a potential buffer overflow. Fix multiple vulnerabilities of ntp. [SA-15:07] Fix bsdinstall(8) insecure default GELI keyfile permissions. [SA-15:08] Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] Modified: stable/10/contrib/ntp/ntpd/ntp_crypto.c stable/10/contrib/ntp/ntpd/ntp_proto.c stable/10/sys/netinet/igmp.c stable/10/sys/netinet6/nd6_rtr.c stable/10/usr.sbin/bsdinstall/scripts/zfsboot Modified: stable/10/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:09 2015 (r281229) +++ stable/10/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:24 2015 (r281230) @@ -93,6 +93,7 @@ #define TAI_1972 10 /* initial TAI offset (s) */ #define MAX_LEAP 100 /* max UTC leapseconds (s) */ #define VALUE_LEN (6 * 4) /* min response field length */ +#define MAX_VALLEN (65535 - VALUE_LEN) #define YEAR (60 * 60 * 24 * 365) /* seconds in year */ /* @@ -137,8 +138,8 @@ static u_int ident_scheme = 0; /* server */ static int crypto_verify P((struct exten *, struct value *, struct peer *)); -static int crypto_encrypt P((struct exten *, struct value *, - keyid_t *)); +static int crypto_encrypt P((const u_char *, u_int, keyid_t *, + struct value *)); static int crypto_alice P((struct peer *, struct value *)); static int crypto_alice2 P((struct peer *, struct value *)); static int crypto_alice3 P((struct peer *, struct value *)); @@ -446,6 +447,12 @@ crypto_recv( tstamp = ntohl(ep->tstamp); fstamp = ntohl(ep->fstamp); vallen = ntohl(ep->vallen); + /* + * Bug 2761: I hope this isn't too early... + */ + if ( vallen == 0 + || len - VALUE_LEN < vallen) + return XEVNT_LEN; } switch (code) { @@ -488,7 +495,7 @@ crypto_recv( break; if (vallen == 0 || vallen > MAXHOSTNAME || - len < VALUE_LEN + vallen) { + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; } @@ -1250,7 +1257,8 @@ crypto_xmit( vallen = ntohl(ep->vallen); if (vallen == 8) { strcpy(certname, sys_hostname); - } else if (vallen == 0 || vallen > MAXHOSTNAME) { + } else if (vallen == 0 || vallen > MAXHOSTNAME || + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; @@ -1407,7 +1415,10 @@ crypto_xmit( * anything goes wrong. */ case CRYPTO_COOK | CRYPTO_RESP: - if ((opcode & 0xffff) < VALUE_LEN) { + vallen = ntohl(ep->vallen); /* Must be <64k */ + if ( vallen == 0 + || (vallen >= MAX_VALLEN) + || (opcode & 0x0000ffff) < VALUE_LEN + vallen) { rval = XEVNT_LEN; break; } @@ -1420,10 +1431,11 @@ crypto_xmit( } tcookie = peer->pcookie; } - if ((rval = crypto_encrypt(ep, &vtemp, &tcookie)) == - XEVNT_OK) + if ((rval = crypto_encrypt((const u_char *)ep->pkt, vallen, &tcookie, &vtemp)) + == XEVNT_OK) { len += crypto_send(fp, &vtemp); - value_free(&vtemp); + value_free(&vtemp); + } break; /* @@ -1558,10 +1570,15 @@ crypto_verify( * are rounded up to the next word. */ vallen = ntohl(ep->vallen); + if ( vallen == 0 + || vallen > MAX_VALLEN) + return (XEVNT_LEN); i = (vallen + 3) / 4; siglen = ntohl(ep->pkt[i++]); - if (len < VALUE_LEN + ((vallen + 3) / 4) * 4 + ((siglen + 3) / - 4) * 4) + if ( siglen > MAX_VALLEN + || len - VALUE_LEN < ((vallen + 3) / 4) * 4 + || len - VALUE_LEN - ((vallen + 3) / 4) * 4 + < ((siglen + 3) / 4) * 4) return (XEVNT_LEN); /* @@ -1627,6 +1644,7 @@ crypto_verify( * avoid doing the sign exchange. */ EVP_VerifyInit(&ctx, peer->digest); + /* XXX: the "+ 12" needs to be at least documented... */ EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12); if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey) <= 0) return (XEVNT_SIG); @@ -1641,10 +1659,10 @@ crypto_verify( /* - * crypto_encrypt - construct encrypted cookie and signature from - * extension field and cookie + * crypto_encrypt - construct vp (encrypted cookie and signature) from + * the public key and cookie. * - * Returns + * Returns: * XEVNT_OK success * XEVNT_PUB bad or missing public key * XEVNT_CKY bad or missing cookie @@ -1652,24 +1670,21 @@ crypto_verify( */ static int crypto_encrypt( - struct exten *ep, /* extension pointer */ - struct value *vp, /* value pointer */ - keyid_t *cookie /* server cookie */ + const u_char *ptr, /* Public Key */ + u_int vallen, /* Length of Public Key */ + keyid_t *cookie, /* server cookie */ + struct value *vp /* value pointer */ ) { EVP_PKEY *pkey; /* public key */ EVP_MD_CTX ctx; /* signature context */ tstamp_t tstamp; /* NTP timestamp */ u_int32 temp32; - u_int len; - u_char *ptr; /* * Extract the public key from the request. */ - len = ntohl(ep->vallen); - ptr = (u_char *)ep->pkt; - pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len); + pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, vallen); if (pkey == NULL) { msyslog(LOG_ERR, "crypto_encrypt %s\n", ERR_error_string(ERR_get_error(), NULL)); @@ -1683,9 +1698,9 @@ crypto_encrypt( memset(vp, 0, sizeof(struct value)); vp->tstamp = htonl(tstamp); vp->fstamp = hostval.tstamp; - len = EVP_PKEY_size(pkey); - vp->vallen = htonl(len); - vp->ptr = emalloc(len); + vallen = EVP_PKEY_size(pkey); + vp->vallen = htonl(vallen); + vp->ptr = emalloc(vallen); temp32 = htonl(*cookie); if (!RSA_public_encrypt(4, (u_char *)&temp32, vp->ptr, pkey->pkey.rsa, RSA_PKCS1_OAEP_PADDING)) { @@ -1705,9 +1720,9 @@ crypto_encrypt( vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) - vp->siglen = htonl(len); + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) + vp->siglen = htonl(sign_siglen); return (XEVNT_OK); } @@ -1794,6 +1809,9 @@ crypto_ident( * call in the protocol module. * * Returns extension field pointer (no errors). + * + * XXX: opcode and len should really be 32-bit quantities and + * we should make sure that str is not too big. */ struct exten * crypto_args( @@ -1805,11 +1823,14 @@ crypto_args( tstamp_t tstamp; /* NTP timestamp */ struct exten *ep; /* extension field pointer */ u_int len; /* extension field length */ + size_t slen; tstamp = crypto_time(); len = sizeof(struct exten); - if (str != NULL) - len += strlen(str); + if (str != NULL) { + slen = strlen(str); + len += slen; + } ep = emalloc(len); memset(ep, 0, len); if (opcode == 0) @@ -1829,8 +1850,8 @@ crypto_args( ep->fstamp = hostval.tstamp; ep->vallen = 0; if (str != NULL) { - ep->vallen = htonl(strlen(str)); - memcpy((char *)ep->pkt, str, strlen(str)); + ep->vallen = htonl(slen); + memcpy((char *)ep->pkt, str, slen); } else { ep->pkt[0] = peer->associd; } @@ -1844,6 +1865,8 @@ crypto_args( * Returns extension field length. Note: it is not polite to send a * nonempty signature with zero timestamp or a nonzero timestamp with * empty signature, but these rules are not enforced here. + * + * XXX This code won't work on a box with 16-bit ints. */ u_int crypto_send( @@ -2212,7 +2235,8 @@ crypto_bob( tstamp_t tstamp; /* NTP timestamp */ BIGNUM *bn, *bk, *r; u_char *ptr; - u_int len; + u_int len; /* extension field length */ + u_int vallen = 0; /* value length */ /* * If the IFF parameters are not valid, something awful @@ -2227,8 +2251,11 @@ crypto_bob( /* * Extract r from the challenge. */ - len = ntohl(ep->vallen); - if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) { + vallen = ntohl(ep->vallen); + len = ntohl(ep->opcode) & 0x0000ffff; + if (vallen == 0 || len < VALUE_LEN || len - VALUE_LEN < vallen) + return XEVNT_LEN; + if ((r = BN_bin2bn((u_char *)ep->pkt, vallen, NULL)) == NULL) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); return (XEVNT_ERR); @@ -2240,7 +2267,7 @@ crypto_bob( */ bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new(); sdsa = DSA_SIG_new(); - BN_rand(bk, len * 8, -1, 1); /* k */ + BN_rand(bk, vallen * 8, -1, 1); /* k */ BN_mod_mul(bn, dsa->priv_key, r, dsa->q, bctx); /* b r mod q */ BN_add(bn, bn, bk); BN_mod(bn, bn, dsa->q, bctx); /* k + b r mod q */ @@ -2254,19 +2281,25 @@ crypto_bob( /* * Encode the values in ASN.1 and sign. */ - tstamp = crypto_time(); - memset(vp, 0, sizeof(struct value)); - vp->tstamp = htonl(tstamp); - vp->fstamp = htonl(if_fstamp); - len = i2d_DSA_SIG(sdsa, NULL); - if (len <= 0) { + vallen = i2d_DSA_SIG(sdsa, NULL); + if (vallen == 0) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); DSA_SIG_free(sdsa); return (XEVNT_ERR); } - vp->vallen = htonl(len); - ptr = emalloc(len); + if (vallen > MAX_VALLEN) { + msyslog(LOG_ERR, "crypto_bob: signature is too big: %d", + vallen); + DSA_SIG_free(sdsa); + return (XEVNT_LEN); + } + memset(vp, 0, sizeof(struct value)); + tstamp = crypto_time(); + vp->tstamp = htonl(tstamp); + vp->fstamp = htonl(if_fstamp); + vp->vallen = htonl(vallen); + ptr = emalloc(vallen); vp->ptr = ptr; i2d_DSA_SIG(sdsa, &ptr); DSA_SIG_free(sdsa); @@ -2277,11 +2310,12 @@ crypto_bob( if (tstamp < cinfo->first || tstamp > cinfo->last) return (XEVNT_PER); + /* XXX: more validation to make sure the sign fits... */ vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) vp->siglen = htonl(len); return (XEVNT_OK); } Modified: stable/10/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:09 2015 (r281229) +++ stable/10/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:24 2015 (r281230) @@ -459,7 +459,7 @@ receive( while (has_mac > 0) { int temp; - if (has_mac % 4 != 0 || has_mac < 0) { + if (has_mac % 4 != 0 || has_mac < MIN_MAC_LEN) { sys_badlength++; return; /* bad MAC length */ } @@ -483,6 +483,13 @@ receive( return; /* bad MAC length */ } } + /* + * If has_mac is < 0 we had a malformed packet. + */ + if (has_mac < 0) { + sys_badlength++; + return; /* bad length */ + } #ifdef OPENSSL pkeyid = tkeyid = 0; #endif /* OPENSSL */ @@ -942,12 +949,9 @@ receive( } /* - * Update the origin and destination timestamps. If - * unsynchronized or bogus abandon ship. If the crypto machine + * If unsynchronized or bogus abandon ship. If the crypto machine * breaks, light the crypto bit and plaint the log. */ - peer->org = p_xmt; - peer->rec = rbufp->recv_time; if (peer->flash & PKT_TEST_MASK) { #ifdef OPENSSL if (crypto_flags && (peer->flags & FLAG_SKEY)) { @@ -978,10 +982,11 @@ receive( * versions. If symmetric modes, return a crypto-NAK. The peer * should restart the protocol. */ - } else if (!AUTH(peer->keyid || (restrict_mask & RES_DONTTRUST), - is_authentic)) { + } else if (!AUTH(peer->keyid || has_mac || + (restrict_mask & RES_DONTTRUST), is_authentic)) { peer->flash |= TEST5; - if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE) + if (has_mac && + (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)) fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask); return; /* bad auth */ } @@ -989,7 +994,12 @@ receive( /* * That was hard and I am sweaty, but the packet is squeaky * clean. Get on with real work. + * + * Update the origin and destination timestamps. */ + peer->org = p_xmt; + peer->rec = rbufp->recv_time; + peer->received++; peer->timereceived = current_time; if (is_authentic == AUTH_OK) Modified: stable/10/sys/netinet/igmp.c ============================================================================== --- stable/10/sys/netinet/igmp.c Tue Apr 7 20:20:09 2015 (r281229) +++ stable/10/sys/netinet/igmp.c Tue Apr 7 20:20:24 2015 (r281230) @@ -1534,7 +1534,6 @@ igmp_input(struct mbuf *m, int off) struct igmpv3 *igmpv3; uint16_t igmpv3len; uint16_t nsrc; - int srclen; IGMPSTAT_INC(igps_rcv_v3_queries); igmpv3 = (struct igmpv3 *)igmp; @@ -1542,8 +1541,8 @@ igmp_input(struct mbuf *m, int off) * Validate length based on source count. */ nsrc = ntohs(igmpv3->igmp_numsrc); - srclen = sizeof(struct in_addr) * nsrc; - if (nsrc * sizeof(in_addr_t) > srclen) { + if (nsrc * sizeof(in_addr_t) > + UINT16_MAX - iphlen - IGMP_V3_QUERY_MINLEN) { IGMPSTAT_INC(igps_rcv_tooshort); return; } @@ -1552,7 +1551,7 @@ igmp_input(struct mbuf *m, int off) * this scope. */ igmpv3len = iphlen + IGMP_V3_QUERY_MINLEN + - srclen; + sizeof(struct in_addr) * nsrc; if ((m->m_flags & M_EXT || m->m_len < igmpv3len) && (m = m_pullup(m, igmpv3len)) == NULL) { Modified: stable/10/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/10/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:09 2015 (r281229) +++ stable/10/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:24 2015 (r281230) @@ -296,8 +296,16 @@ nd6_ra_input(struct mbuf *m, int off, in } if (nd_ra->nd_ra_retransmit) ndi->retrans = ntohl(nd_ra->nd_ra_retransmit); - if (nd_ra->nd_ra_curhoplimit) - ndi->chlim = nd_ra->nd_ra_curhoplimit; + if (nd_ra->nd_ra_curhoplimit) { + if (ndi->chlim < nd_ra->nd_ra_curhoplimit) + ndi->chlim = nd_ra->nd_ra_curhoplimit; + else if (ndi->chlim != nd_ra->nd_ra_curhoplimit) { + log(LOG_ERR, "RA with a lower CurHopLimit sent from " + "%s on %s (current = %d, received = %d). " + "Ignored.\n", ip6_sprintf(ip6bufs, &ip6->ip6_src), + if_name(ifp), ndi->chlim, nd_ra->nd_ra_curhoplimit); + } + } dr = defrtrlist_update(&dr0); } Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Tue Apr 7 20:20:09 2015 (r281229) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Tue Apr 7 20:20:24 2015 (r281230) @@ -1125,6 +1125,9 @@ zfs_create_boot() f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ /dev/random "$bootpool/$zroot_key" \ "bs=4096 count=1" || return $FAILURE + f_eval_catch $funcname chmod "$CHMOD_MODE" \ + go-wrx "$bootpool/$zroot_key" || + return $FAILURE else # Clean up f_eval_catch $funcname zfs "$ZFS_UNMOUNT" \ From owner-svn-src-stable-10@FreeBSD.ORG Tue Apr 7 21:05:54 2015 Return-Path: Delivered-To: svn-src-stable-10@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 610E3E37; Tue, 7 Apr 2015 21:05: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 4B99AAAD; Tue, 7 Apr 2015 21:05: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 t37L5s2e052974; Tue, 7 Apr 2015 21:05:54 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37L5r4D052971; Tue, 7 Apr 2015 21:05:53 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201504072105.t37L5r4D052971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Tue, 7 Apr 2015 21:05:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281235 - stable/10/usr.sbin/pmcstudy X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 21:05:54 -0000 Author: rrs Date: Tue Apr 7 21:05:52 2015 New Revision: 281235 URL: https://svnweb.freebsd.org/changeset/base/281235 Log: MFC of r280697 and r280698 Sponsored by: Netflix Inc. Added: stable/10/usr.sbin/pmcstudy/pmcstudy.8 - copied, changed from r280697, head/usr.sbin/pmcstudy/pmcstudy.8 Deleted: stable/10/usr.sbin/pmcstudy/pmcstudy.1 Modified: stable/10/usr.sbin/pmcstudy/Makefile stable/10/usr.sbin/pmcstudy/pmcstudy.c Modified: stable/10/usr.sbin/pmcstudy/Makefile ============================================================================== --- stable/10/usr.sbin/pmcstudy/Makefile Tue Apr 7 20:29:03 2015 (r281234) +++ stable/10/usr.sbin/pmcstudy/Makefile Tue Apr 7 21:05:52 2015 (r281235) @@ -2,6 +2,7 @@ # $FreeBSD$ PROG= pmcstudy +MAN= pmcstudy.8 SRCS= pmcstudy.c eval_expr.c CFLAGS+= -Wall -Werror Copied and modified: stable/10/usr.sbin/pmcstudy/pmcstudy.8 (from r280697, head/usr.sbin/pmcstudy/pmcstudy.8) ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:40:47 2015 (r280697, copy source) +++ stable/10/usr.sbin/pmcstudy/pmcstudy.8 Tue Apr 7 21:05:52 2015 (r281235) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd Mar 26, 2015 -.Dt PMCSTUDY 1 +.Dt PMCSTUDY 8 .Os .Sh NAME .Nm pmcstudy Modified: stable/10/usr.sbin/pmcstudy/pmcstudy.c ============================================================================== --- stable/10/usr.sbin/pmcstudy/pmcstudy.c Tue Apr 7 20:29:03 2015 (r281234) +++ stable/10/usr.sbin/pmcstudy/pmcstudy.c Tue Apr 7 21:05:52 2015 (r281235) @@ -2130,7 +2130,11 @@ test_for_a_pmc(const char *pmc, int out_ printf(" "); } } - printf("%s", &line[j]); + if (len) { + printf("%s", &line[j]); + } else { + printf("\n"); + } goto out; } } From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 00:13:18 2015 Return-Path: Delivered-To: svn-src-stable-10@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 6BFFEFA8; Wed, 8 Apr 2015 00: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 5652C2B1; Wed, 8 Apr 2015 00: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 t380DI6C045071; Wed, 8 Apr 2015 00:13:18 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t380DIlR045070; Wed, 8 Apr 2015 00:13:18 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080013.t380DIlR045070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 00:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281241 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 00:13:18 -0000 Author: np Date: Wed Apr 8 00:13:17 2015 New Revision: 281241 URL: https://svnweb.freebsd.org/changeset/base/281241 Log: MFC r276728: cxgbe(4): fix the description of a strange bunch of counters. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Tue Apr 7 23:31:49 2015 (r281240) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 00:13:17 2015 (r281241) @@ -4587,7 +4587,7 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "ddp_stats", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, - sysctl_ddp_stats, "A", "DDP statistics"); + sysctl_ddp_stats, "A", "non-TCP DDP statistics"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "devlog", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 00:35:14 2015 Return-Path: Delivered-To: svn-src-stable-10@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 61EA268D; Wed, 8 Apr 2015 00:35: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 4C14D6D1; Wed, 8 Apr 2015 00:35: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 t380ZEBA054882; Wed, 8 Apr 2015 00:35:14 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t380ZD0r054878; Wed, 8 Apr 2015 00:35:13 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080035.t380ZD0r054878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 00:35:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281244 - in stable/10/sys/dev/cxgbe: . tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 00:35:14 -0000 Author: np Date: Wed Apr 8 00:35:12 2015 New Revision: 281244 URL: https://svnweb.freebsd.org/changeset/base/281244 Log: MFC r276597: cxgbe/tom: do not engage the TOE's payload chopper for payload < 2 MSS or for 10Gbps ports. Modified: stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/offload.h ============================================================================== --- stable/10/sys/dev/cxgbe/offload.h Wed Apr 8 00:32:39 2015 (r281243) +++ stable/10/sys/dev/cxgbe/offload.h Wed Apr 8 00:35:12 2015 (r281244) @@ -147,6 +147,7 @@ struct tom_tunables { int indsz; int ddp_thres; int rx_coalesce; + int tx_align; }; int t4_register_uld(struct uld_info *); Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 00:32:39 2015 (r281243) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 00:35:12 2015 (r281244) @@ -4689,6 +4689,10 @@ t4_sysctls(struct adapter *sc) sc->tt.rx_coalesce = 1; SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_coalesce", CTLFLAG_RW, &sc->tt.rx_coalesce, 0, "receive coalescing"); + + sc->tt.tx_align = 1; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_align", + CTLFLAG_RW, &sc->tt.tx_align, 0, "chop and align payload"); } #endif Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Apr 8 00:32:39 2015 (r281243) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Apr 8 00:35:12 2015 (r281244) @@ -491,7 +491,7 @@ max_dsgl_nsegs(int tx_credits) static inline void write_tx_wr(void *dst, struct toepcb *toep, unsigned int immdlen, - unsigned int plen, uint8_t credits, int shove, int ulp_mode) + unsigned int plen, uint8_t credits, int shove, int ulp_mode, int txalign) { struct fw_ofld_tx_data_wr *txwr = dst; unsigned int wr_ulp_mode; @@ -513,6 +513,19 @@ write_tx_wr(void *dst, struct toepcb *to V_FW_OFLD_TX_DATA_WR_URGENT(0) | /* XXX */ V_FW_OFLD_TX_DATA_WR_SHOVE(shove)); txwr->plen = htobe32(plen); + + if (txalign > 0) { + struct tcpcb *tp = intotcpcb(toep->inp); + + if (plen < 2 * tp->t_maxseg || is_10G_port(toep->port)) + txwr->lsodisable_to_proxy |= + htobe32(F_FW_OFLD_TX_DATA_WR_LSODISABLE); + else + txwr->lsodisable_to_proxy |= + htobe32(F_FW_OFLD_TX_DATA_WR_ALIGNPLD | + (tp->t_flags & TF_NODELAY ? 0 : + F_FW_OFLD_TX_DATA_WR_ALIGNPLDSHOVE)); + } } /* @@ -716,7 +729,8 @@ t4_push_frames(struct adapter *sc, struc } txwr = wrtod(wr); credits = howmany(wr->wr_len, 16); - write_tx_wr(txwr, toep, plen, plen, credits, shove, 0); + write_tx_wr(txwr, toep, plen, plen, credits, shove, 0, + sc->tt.tx_align); m_copydata(sndptr, 0, plen, (void *)(txwr + 1)); nsegs = 0; } else { @@ -734,7 +748,8 @@ t4_push_frames(struct adapter *sc, struc } txwr = wrtod(wr); credits = howmany(wr_len, 16); - write_tx_wr(txwr, toep, 0, plen, credits, shove, 0); + write_tx_wr(txwr, toep, 0, plen, credits, shove, 0, + sc->tt.tx_align); write_tx_sgl(txwr + 1, sndptr, m, nsegs, max_nsegs_1mbuf); if (wr_len & 0xf) { @@ -890,7 +905,7 @@ t4_ulp_push_frames(struct adapter *sc, s txwr = wrtod(wr); credits = howmany(wr->wr_len, 16); write_tx_wr(txwr, toep, plen, ulp_len, credits, shove, - ulp_mode); + ulp_mode, 0); m_copydata(sndptr, 0, plen, (void *)(txwr + 1)); } else { int wr_len; @@ -907,7 +922,7 @@ t4_ulp_push_frames(struct adapter *sc, s txwr = wrtod(wr); credits = howmany(wr_len, 16); write_tx_wr(txwr, toep, 0, ulp_len, credits, shove, - ulp_mode); + ulp_mode, 0); write_tx_sgl(txwr + 1, sndptr, m, nsegs, max_nsegs_1mbuf); if (wr_len & 0xf) { From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 00:49:55 2015 Return-Path: Delivered-To: svn-src-stable-10@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 2DA779F0; Wed, 8 Apr 2015 00: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 0E9D4855; Wed, 8 Apr 2015 00: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 t380nsYC060210; Wed, 8 Apr 2015 00:49:54 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t380ns2Y060208; Wed, 8 Apr 2015 00:49:54 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080049.t380ns2Y060208@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 00:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281245 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 00:49:55 -0000 Author: np Date: Wed Apr 8 00:49:53 2015 New Revision: 281245 URL: https://svnweb.freebsd.org/changeset/base/281245 Log: MFC r276729, r276775. r276729: cxgbe/tom: use vmem(9) as the DDP page pod allocator. r276775: cxgbe/tom: allocate page pod addresses instead of ppod#. Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c stable/10/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_ddp.c Wed Apr 8 00:35:12 2015 (r281244) +++ stable/10/sys/dev/cxgbe/tom/t4_ddp.c Wed Apr 8 00:49:53 2015 (r281245) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #define PPOD_SZ(n) ((n) * sizeof(struct pagepod)) #define PPOD_SIZE (PPOD_SZ(1)) -/* XXX: must match A_ULP_RX_TDDP_PSZ */ +/* XXX: must match A_ULP_RX_TDDP_PSZ */ static int t4_ddp_pgsz[] = {4096, 4096 << 2, 4096 << 4, 4096 << 6}; #if 0 @@ -98,74 +98,26 @@ t4_dump_tcb(struct adapter *sc, int tid) #define MAX_DDP_BUFFER_SIZE (M_TCB_RX_DDP_BUF0_LEN) static int -alloc_ppods(struct tom_data *td, int n, struct ppod_region *pr) +alloc_ppods(struct tom_data *td, int n, u_int *ppod_addr) { - int ppod; + vmem_addr_t v; + int rc; - KASSERT(n > 0, ("%s: nonsense allocation (%d)", __func__, n)); + MPASS(n > 0); - mtx_lock(&td->ppod_lock); - if (n > td->nppods_free) { - mtx_unlock(&td->ppod_lock); - return (-1); - } - - if (td->nppods_free_head >= n) { - td->nppods_free_head -= n; - ppod = td->nppods_free_head; - TAILQ_INSERT_HEAD(&td->ppods, pr, link); - } else { - struct ppod_region *p; - - ppod = td->nppods_free_head; - TAILQ_FOREACH(p, &td->ppods, link) { - ppod += p->used + p->free; - if (n <= p->free) { - ppod -= n; - p->free -= n; - TAILQ_INSERT_AFTER(&td->ppods, p, pr, link); - goto allocated; - } - } - - if (__predict_false(ppod != td->nppods)) { - panic("%s: ppods TAILQ (%p) corrupt." - " At %d instead of %d at the end of the queue.", - __func__, &td->ppods, ppod, td->nppods); - } + rc = vmem_alloc(td->ppod_arena, PPOD_SZ(n), M_NOWAIT | M_FIRSTFIT, &v); + *ppod_addr = (u_int)v; - mtx_unlock(&td->ppod_lock); - return (-1); - } - -allocated: - pr->used = n; - pr->free = 0; - td->nppods_free -= n; - mtx_unlock(&td->ppod_lock); - - return (ppod); + return (rc); } static void -free_ppods(struct tom_data *td, struct ppod_region *pr) +free_ppods(struct tom_data *td, u_int ppod_addr, int n) { - struct ppod_region *p; - KASSERT(pr->used > 0, ("%s: nonsense free (%d)", __func__, pr->used)); + MPASS(n > 0); - mtx_lock(&td->ppod_lock); - p = TAILQ_PREV(pr, ppod_head, link); - if (p != NULL) - p->free += pr->used + pr->free; - else - td->nppods_free_head += pr->used + pr->free; - td->nppods_free += pr->used; - KASSERT(td->nppods_free <= td->nppods, - ("%s: nppods_free (%d) > nppods (%d). %d freed this time.", - __func__, td->nppods_free, td->nppods, pr->used)); - TAILQ_REMOVE(&td->ppods, pr, link); - mtx_unlock(&td->ppod_lock); + vmem_free(td->ppod_arena, (vmem_addr_t)ppod_addr, PPOD_SZ(n)); } static inline int @@ -187,7 +139,7 @@ free_ddp_buffer(struct tom_data *td, str free(db->pages, M_CXGBE); if (db->nppods > 0) - free_ppods(td, &db->ppod_region); + free_ppods(td, db->ppod_addr, db->nppods); free(db, M_CXGBE); } @@ -702,6 +654,7 @@ alloc_ddp_buffer(struct tom_data *td, vm break; } have_pgsz: + MPASS(idx <= M_PPOD_PGSZ); db = malloc(sizeof(*db), M_CXGBE, M_NOWAIT); if (db == NULL) { @@ -710,16 +663,13 @@ have_pgsz: } nppods = pages_to_nppods(npages, t4_ddp_pgsz[idx]); - ppod = alloc_ppods(td, nppods, &db->ppod_region); - if (ppod < 0) { + if (alloc_ppods(td, nppods, &db->ppod_addr) != 0) { free(db, M_CXGBE); CTR4(KTR_CXGBE, "%s: no pods, nppods %d, resid %d, pgsz %d", __func__, nppods, len, t4_ddp_pgsz[idx]); return (NULL); } - - KASSERT(idx <= M_PPOD_PGSZ && ppod <= M_PPOD_TAG, - ("%s: DDP pgsz_idx = %d, ppod = %d", __func__, idx, ppod)); + ppod = (db->ppod_addr - td->ppod_start) / PPOD_SIZE; db->tag = V_PPOD_PGSZ(idx) | V_PPOD_TAG(ppod); db->nppods = nppods; @@ -745,7 +695,8 @@ write_page_pods(struct adapter *sc, stru struct ulp_mem_io *ulpmc; struct ulptx_idata *ulpsc; struct pagepod *ppod; - int i, j, k, n, chunk, len, ddp_pgsz, idx, ppod_addr; + int i, j, k, n, chunk, len, ddp_pgsz, idx; + u_int ppod_addr; uint32_t cmd; cmd = htobe32(V_ULPTX_CMD(ULP_TX_MEM_WRITE)); @@ -754,7 +705,7 @@ write_page_pods(struct adapter *sc, stru else cmd |= htobe32(F_T5_ULP_MEMIO_IMM); ddp_pgsz = t4_ddp_pgsz[G_PPOD_PGSZ(db->tag)]; - ppod_addr = sc->vres.ddp.start + G_PPOD_TAG(db->tag) * PPOD_SIZE; + ppod_addr = db->ppod_addr; for (i = 0; i < db->nppods; ppod_addr += chunk) { /* How many page pods are we writing in this cycle */ @@ -986,13 +937,10 @@ no_ddp: void t4_init_ddp(struct adapter *sc, struct tom_data *td) { - int nppods = sc->vres.ddp.size / PPOD_SIZE; - td->nppods = nppods; - td->nppods_free = nppods; - td->nppods_free_head = nppods; - TAILQ_INIT(&td->ppods); - mtx_init(&td->ppod_lock, "page pods", NULL, MTX_DEF); + td->ppod_start = sc->vres.ddp.start; + td->ppod_arena = vmem_create("DDP page pods", sc->vres.ddp.start, + sc->vres.ddp.size, 1, 32, M_FIRSTFIT | M_NOWAIT); t4_register_cpl_handler(sc, CPL_RX_DATA_DDP, do_rx_data_ddp); t4_register_cpl_handler(sc, CPL_RX_DDP_COMPLETE, do_rx_ddp_complete); @@ -1002,12 +950,10 @@ void t4_uninit_ddp(struct adapter *sc __unused, struct tom_data *td) { - KASSERT(td->nppods == td->nppods_free, - ("%s: page pods still in use, nppods = %d, free = %d", - __func__, td->nppods, td->nppods_free)); - - if (mtx_initialized(&td->ppod_lock)) - mtx_destroy(&td->ppod_lock); + if (td->ppod_arena != NULL) { + vmem_destroy(td->ppod_arena); + td->ppod_arena = NULL; + } } #define VNET_SO_ASSERT(so) \ Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.h Wed Apr 8 00:35:12 2015 (r281244) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.h Wed Apr 8 00:49:53 2015 (r281245) @@ -30,6 +30,7 @@ #ifndef __T4_TOM_H__ #define __T4_TOM_H__ +#include #define LISTEN_HASH_SIZE 32 @@ -80,18 +81,12 @@ struct ofld_tx_sdesc { uint8_t tx_credits; /* firmware tx credits (unit is 16B) */ }; -struct ppod_region { - TAILQ_ENTRY(ppod_region) link; - int used; /* # of pods used by this region */ - int free; /* # of contiguous pods free right after this region */ -}; - struct ddp_buffer { uint32_t tag; /* includes color, page pod addr, and DDP page size */ + u_int ppod_addr; int nppods; int offset; int len; - struct ppod_region ppod_region; int npages; vm_page_t *pages; }; @@ -179,8 +174,6 @@ struct listen_ctx { TAILQ_HEAD(, synq_entry) synq; }; -TAILQ_HEAD(ppod_head, ppod_region); - struct clip_entry { TAILQ_ENTRY(clip_entry) link; struct in6_addr lip; /* local IPv6 address */ @@ -200,11 +193,8 @@ struct tom_data { u_long listen_mask; int lctx_count; /* # of lctx in the hash table */ - struct mtx ppod_lock; - int nppods; - int nppods_free; /* # of available ppods */ - int nppods_free_head; /* # of available ppods at the begining */ - struct ppod_head ppods; + u_int ppod_start; + vmem_t *ppod_arena; struct mtx clip_table_lock; struct clip_head clip_table; From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 00:52:47 2015 Return-Path: Delivered-To: svn-src-stable-10@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 22642B31; Wed, 8 Apr 2015 00:52: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 0341A900; Wed, 8 Apr 2015 00:52: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 t380qkXc064097; Wed, 8 Apr 2015 00:52:46 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t380qkgt064095; Wed, 8 Apr 2015 00:52:46 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080052.t380qkgt064095@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 00:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281246 - stable/10/tools/tools/cxgbetool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 00:52:47 -0000 Author: np Date: Wed Apr 8 00:52:45 2015 New Revision: 281246 URL: https://svnweb.freebsd.org/changeset/base/281246 Log: MFC r276598, r276607. r276598: Add a manual page for cxgbetool. It is incomplete but definitely better than nothing. r276607: Fix all nits reported by mandoc -Tlint. Added: stable/10/tools/tools/cxgbetool/cxgbetool.8 - copied, changed from r276598, head/tools/tools/cxgbetool/cxgbetool.8 Modified: stable/10/tools/tools/cxgbetool/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/cxgbetool/Makefile ============================================================================== --- stable/10/tools/tools/cxgbetool/Makefile Wed Apr 8 00:49:53 2015 (r281245) +++ stable/10/tools/tools/cxgbetool/Makefile Wed Apr 8 00:52:45 2015 (r281246) @@ -2,7 +2,7 @@ PROG= cxgbetool SRCS= cxgbetool.c -MAN= +MAN= cxgbetool.8 CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I${.CURDIR}/../../../sys -I. BINDIR?= /usr/sbin Copied and modified: stable/10/tools/tools/cxgbetool/cxgbetool.8 (from r276598, head/tools/tools/cxgbetool/cxgbetool.8) ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.8 Sat Jan 3 00:26:21 2015 (r276598, copy source) +++ stable/10/tools/tools/cxgbetool/cxgbetool.8 Wed Apr 8 00:52:45 2015 (r281246) @@ -1,4 +1,4 @@ -." Copyright (c) 2015, Chelsio Inc +.\" Copyright (c) 2015, Chelsio Inc .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -93,7 +93,7 @@ The rest consists of a command and any p .It Cm clearstats Ar port_id Clear all transmit, receive, and error statistics of all queues associated with a port. -The total number of ports attached to a nexus is listed in +The total number of ports attached to a nexus is listed in .Va dev.t4nex.%d.nports and the 0 based .Ar port_id @@ -407,7 +407,6 @@ Class Weighted Round Robin. .It Sy cl-wrr Channel Rate Limiting. .El -.Pp .It Sy mode Ar scheduler-mode The mode in which the scheduling class is going to operate: .Pp @@ -425,7 +424,6 @@ mode, all of the "flows" bound to the cl aggregate bandwidth of 10Mb/s; but in .Cm flow mode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s. -.Pp .It Sy rate-unit Ar scheduler-rate-unit The units of the scheduler rate constraints: .Pp @@ -446,19 +444,14 @@ percent of port rate. .It Sy absolute Kb/s. .El -.Pp .It Sy channel Ar scheduler-channel-index The scheduling channel to which the scheduling class will be bound. -.Pp .It Sy class Ar scheduler-class-index The scheduling class being programmed. -.Pp .It Sy min-rate Ar minimum-rate The minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access. -.Pp .It Sy max-rate Ar maximum-rate The maximum rate for a rate-limiting scheduling class hierarchy. -.Pp .It Sy weight Ar round-robin-weight The weight to be used for a weighted-round-robin scheduling hierarchy. .It Sy pkt-size Ar average-packet-size From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 01:02:12 2015 Return-Path: Delivered-To: svn-src-stable-10@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 9A358DD5; Wed, 8 Apr 2015 01:02: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 843EF9F1; Wed, 8 Apr 2015 01:02: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 t3812CgM068884; Wed, 8 Apr 2015 01:02:12 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3812CNi068883; Wed, 8 Apr 2015 01:02:12 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080102.t3812CNi068883@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281247 - stable/10/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:02:12 -0000 Author: np Date: Wed Apr 8 01:02:11 2015 New Revision: 281247 URL: https://svnweb.freebsd.org/changeset/base/281247 Log: MFC r277102, r277135. r277102: cxgbe/iw_cxgbe: allow any size during the initial MPA exchange. r277135: cxgbe/iw_cxgbe: fix whitespace nit in r277102. Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Apr 8 00:52:45 2015 (r281246) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Apr 8 01:02:11 2015 (r281247) @@ -971,18 +971,14 @@ send_mpa_req(struct c4iw_ep *ep) if (mpa_rev_to_use == 2) mpalen += sizeof(struct mpa_v2_conn_params); - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) { +failed: connect_reply_upcall(ep, -ENOMEM); return; } - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; + memset(mpa, 0, mpalen); memcpy(mpa->key, MPA_KEY_REQ, sizeof(mpa->key)); mpa->flags = (crc_enabled ? MPA_CRC : 0) | (markers_enabled ? MPA_MARKERS : 0) | @@ -1029,11 +1025,18 @@ send_mpa_req(struct c4iw_ep *ep) CTR2(KTR_IW_CXGBE, "%s:smr7 %p", __func__, ep); } - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); - if (err) { - connect_reply_upcall(ep, -ENOMEM); - return; + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + goto failed; } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, + ep->com.thread); + if (err) + goto failed; START_EP_TIMER(ep); state_set(&ep->com, MPA_REQ_SENT); @@ -1060,22 +1063,11 @@ static int send_mpa_reject(struct c4iw_e ep->mpa_attr.version, mpalen); } - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { - - printf("%s - cannot alloc mbuf!\n", __func__); - CTR2(KTR_IW_CXGBE, "%s:smrej2 %p", __func__, ep); + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) return (-ENOMEM); - } - - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; - memset(mpa, 0, sizeof(*mpa)); + memset(mpa, 0, mpalen); memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); mpa->flags = MPA_REJECT; mpa->revision = mpa_rev; @@ -1107,7 +1099,15 @@ static int send_mpa_reject(struct c4iw_e if (plen) memcpy(mpa->private_data, pdata, plen); - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + return (-ENOMEM); + } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + err = -sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); if (!err) ep->snd_seq += mpalen; CTR4(KTR_IW_CXGBE, "%s:smrejE %p %u %d", __func__, ep, ep->hwtid, err); @@ -1133,21 +1133,10 @@ static int send_mpa_reply(struct c4iw_ep mpalen += sizeof(struct mpa_v2_conn_params); } - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { - - CTR2(KTR_IW_CXGBE, "%s:smrep2 %p", __func__, ep); - printf("%s - cannot alloc mbuf!\n", __func__); + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) return (-ENOMEM); - } - - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; memset(mpa, 0, sizeof(*mpa)); memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); mpa->flags = (ep->mpa_attr.crc_enabled ? MPA_CRC : 0) | @@ -1198,9 +1187,18 @@ static int send_mpa_reply(struct c4iw_ep if (plen) memcpy(mpa->private_data, pdata, plen); + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + return (-ENOMEM); + } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + state_set(&ep->com, MPA_REP_SENT); ep->snd_seq += mpalen; - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, + err = -sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); CTR3(KTR_IW_CXGBE, "%s:smrepE %p %d", __func__, ep, err); return err; From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 01:05:51 2015 Return-Path: Delivered-To: svn-src-stable-10@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 5DDD8F40; Wed, 8 Apr 2015 01:05: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 487B3A16; Wed, 8 Apr 2015 01:05: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 t3815plU069389; Wed, 8 Apr 2015 01:05:51 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3815pkp069388; Wed, 8 Apr 2015 01:05:51 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080105.t3815pkp069388@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281248 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:05:51 -0000 Author: np Date: Wed Apr 8 01:05:50 2015 New Revision: 281248 URL: https://svnweb.freebsd.org/changeset/base/281248 Log: MFC r278342: cxgbe(4): fix a test made while enabling TOE. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:02:11 2015 (r281247) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:05:50 2015 (r281248) @@ -8157,7 +8157,12 @@ toe_capability(struct port_info *pi, int return (ENODEV); if (enable) { - if (!(sc->flags & FULL_INIT_DONE)) { + /* + * We need the port's queues around so that we're able to send + * and receive CPLs to/from the TOE even if the ifnet for this + * port has never been UP'd administratively. + */ + if (!(pi->flags & PORT_INIT_DONE)) { rc = cxgbe_init_synchronized(pi); if (rc) return (rc); From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 01:07:52 2015 Return-Path: Delivered-To: svn-src-stable-10@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 B1C96141; Wed, 8 Apr 2015 01:07: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 9BF3AA39; Wed, 8 Apr 2015 01:07: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 t3817qIA069670; Wed, 8 Apr 2015 01:07:52 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3817qa2069668; Wed, 8 Apr 2015 01:07:52 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080107.t3817qa2069668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281249 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:07:52 -0000 Author: np Date: Wed Apr 8 01:07:51 2015 New Revision: 281249 URL: https://svnweb.freebsd.org/changeset/base/281249 Log: MFC r278371: cxgbe(4): a change to the synchronization rules within the the driver. This is purely cosmetic because the new rules are already followed. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Wed Apr 8 01:05:50 2015 (r281248) +++ stable/10/sys/dev/cxgbe/adapter.h Wed Apr 8 01:07:51 2015 (r281249) @@ -803,7 +803,6 @@ struct adapter { #define ADAPTER_LOCK_ASSERT_OWNED(sc) mtx_assert(&(sc)->sc_lock, MA_OWNED) #define ADAPTER_LOCK_ASSERT_NOTOWNED(sc) mtx_assert(&(sc)->sc_lock, MA_NOTOWNED) -/* XXX: not bulletproof, but much better than nothing */ #define ASSERT_SYNCHRONIZED_OP(sc) \ KASSERT(IS_BUSY(sc) && \ (mtx_owned(&(sc)->sc_lock) || sc->last_op_thr == curthread), \ Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:05:50 2015 (r281248) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:07:51 2015 (r281249) @@ -3049,6 +3049,9 @@ mcfail: return (rc); } +/* + * {begin|end}_synchronized_op must be called from the same thread. + */ int begin_synchronized_op(struct adapter *sc, struct port_info *pi, int flags, char *wmesg) @@ -3104,6 +3107,9 @@ done: return (rc); } +/* + * {begin|end}_synchronized_op must be called from the same thread. + */ void end_synchronized_op(struct adapter *sc, int flags) { From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 01:09:37 2015 Return-Path: Delivered-To: svn-src-stable-10@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 E52192D3; Wed, 8 Apr 2015 01:09: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 CF889A52; Wed, 8 Apr 2015 01:09: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 t3819bBx069929; Wed, 8 Apr 2015 01:09:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3819bGG069928; Wed, 8 Apr 2015 01:09:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080109.t3819bGG069928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281250 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:09:38 -0000 Author: np Date: Wed Apr 8 01:09:36 2015 New Revision: 281250 URL: https://svnweb.freebsd.org/changeset/base/281250 Log: MFC r278372: cxgbe(4): adapter_full_init is always a synchronized operation. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:07:51 2015 (r281249) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:09:36 2015 (r281250) @@ -3317,6 +3317,7 @@ adapter_full_init(struct adapter *sc) { int rc, i; + ASSERT_SYNCHRONIZED_OP(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); KASSERT((sc->flags & FULL_INIT_DONE) == 0, ("%s: FULL_INIT_DONE already", __func__)); From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 01:16:20 2015 Return-Path: Delivered-To: svn-src-stable-10@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 3D43C584; Wed, 8 Apr 2015 01:16: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 27E33B85; Wed, 8 Apr 2015 01:16: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 t381GKa2074275; Wed, 8 Apr 2015 01:16:20 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t381GKBR074274; Wed, 8 Apr 2015 01:16:20 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080116.t381GKBR074274@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281251 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:16:20 -0000 Author: np Date: Wed Apr 8 01:16:19 2015 New Revision: 281251 URL: https://svnweb.freebsd.org/changeset/base/281251 Log: MFC r279969: cxgbe(4): fix if_media handling for T520-BT cards. 1Gbps and 100Mbps are valid for this card. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:09:36 2015 (r281250) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:16:19 2015 (r281251) @@ -2807,9 +2807,6 @@ build_medialist(struct port_info *pi, st switch(pi->port_type) { case FW_PORT_TYPE_BT_XFI: - ifmedia_add(media, m | IFM_10G_T, data, NULL); - break; - case FW_PORT_TYPE_BT_XAUI: ifmedia_add(media, m | IFM_10G_T, data, NULL); /* fall through */ From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 01:25:27 2015 Return-Path: Delivered-To: svn-src-stable-10@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 6ED8776E; Wed, 8 Apr 2015 01:25: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 595C7C83; Wed, 8 Apr 2015 01:25: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 t381PRX4078869; Wed, 8 Apr 2015 01:25:27 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t381PRdH078868; Wed, 8 Apr 2015 01:25:27 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080125.t381PRdH078868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281252 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:25:27 -0000 Author: np Date: Wed Apr 8 01:25:26 2015 New Revision: 281252 URL: https://svnweb.freebsd.org/changeset/base/281252 Log: MFC r280403: cxgbe(4): Do not call sbuf_trim on an sbuf with a drain function. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:16:19 2015 (r281251) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:25:26 2015 (r281252) @@ -4951,13 +4951,16 @@ cxgbe_sysctls(struct port_info *pi) static int sysctl_int_array(SYSCTL_HANDLER_ARGS) { - int rc, *i; + int rc, *i, space = 0; struct sbuf sb; sbuf_new(&sb, NULL, 32, SBUF_AUTOEXTEND); - for (i = arg1; arg2; arg2 -= sizeof(int), i++) - sbuf_printf(&sb, "%d ", *i); - sbuf_trim(&sb); + for (i = arg1; arg2; arg2 -= sizeof(int), i++) { + if (space) + sbuf_printf(&sb, " "); + sbuf_printf(&sb, "%d", *i); + space = 1; + } sbuf_finish(&sb); rc = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); sbuf_delete(&sb); From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 01:43:31 2015 Return-Path: Delivered-To: svn-src-stable-10@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 2589CCE3; Wed, 8 Apr 2015 01:43: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 0F3F2EAE; Wed, 8 Apr 2015 01:43: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 t381hUE9087990; Wed, 8 Apr 2015 01:43:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t381hT0P087984; Wed, 8 Apr 2015 01:43:29 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080143.t381hT0P087984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281253 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:43:31 -0000 Author: np Date: Wed Apr 8 01:43:29 2015 New Revision: 281253 URL: https://svnweb.freebsd.org/changeset/base/281253 Log: MFC r279243-r279246, r279251, r279691, r279700, and r279701. r279243: cxgbe(4): request an automatic tx update when a netmap txq idles. r279244: cxgbe(4): wait for the hardware to catch up before destroying a netmap txq. r279245: cxgbe(4): do not set the netmap rxq interrupts on a hair-trigger. r279246: cxgbe(4): set up congestion management for netmap rx queues. The hw.cxgbe.cong_drop knob controls the response of the chip when netmap queues are congested. r279251: cxgbe(4): allow tx hardware checksumming on the netmap interface. It is disabled by default but users can set IFCAP_TXCSUM on the netmap ifnet (ifconfig ncxl0 txcsum) to override netmap and force the hardware to calculate and insert proper IP and L4 checksums in outbound frames. r279691: cxgbe(4): provide the correct size of freelists associated with netmap rx queues to the chip. This will fix many problems with native netmap rx on ncxl/ncxgbe interfaces. r279700: cxgbe(4): knobs to experiment with the interrupt coalescing timer for netmap rx queues, and the "batchiness" of rx updates sent to the chip. These knobs will probably become per-rxq in the near future and will be documented only after their final form is decided. r279701: cxgbe(4): experimental rx packet sink for netmap queues. This is not intended for general use. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_netmap.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Wed Apr 8 01:25:26 2015 (r281252) +++ stable/10/sys/dev/cxgbe/adapter.h Wed Apr 8 01:43:29 2015 (r281253) @@ -1022,6 +1022,7 @@ void t4_wrq_tx_locked(struct adapter *, int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); void t4_update_fl_bufsize(struct ifnet *); int can_resume_tx(struct sge_eq *); +int tnl_cong(struct port_info *); /* t4_tracer.c */ struct t4_tracer; Modified: stable/10/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_netmap.c Wed Apr 8 01:25:26 2015 (r281252) +++ stable/10/sys/dev/cxgbe/t4_netmap.c Wed Apr 8 01:43:29 2015 (r281253) @@ -58,6 +58,25 @@ extern int fl_pad; /* XXXNM */ extern int spg_len; /* XXXNM */ extern int fl_pktshift; /* XXXNM */ +SYSCTL_NODE(_hw, OID_AUTO, cxgbe, CTLFLAG_RD, 0, "cxgbe netmap parameters"); + +/* + * 0 = normal netmap rx + * 1 = black hole + * 2 = supermassive black hole (buffer packing enabled) + */ +int black_hole = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_black_hole, CTLFLAG_RDTUN, &black_hole, 0, + "Sink incoming packets."); + +int rx_ndesc = 256; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_rx_ndesc, CTLFLAG_RWTUN, + &rx_ndesc, 0, "# of rx descriptors after which the hw cidx is updated."); + +int holdoff_tmr_idx = 2; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_holdoff_tmr_idx, CTLFLAG_RWTUN, + &holdoff_tmr_idx, 0, "Holdoff timer index for netmap rx queues."); + /* netmap ifnet routines */ static void cxgbe_nm_init(void *); static int cxgbe_nm_ioctl(struct ifnet *, unsigned long, caddr_t); @@ -226,9 +245,9 @@ cxgbe_nm_qflush(struct ifnet *ifp) } static int -alloc_nm_rxq_hwq(struct port_info *pi, struct sge_nm_rxq *nm_rxq) +alloc_nm_rxq_hwq(struct port_info *pi, struct sge_nm_rxq *nm_rxq, int cong) { - int rc, cntxt_id; + int rc, cntxt_id, i; __be32 v; struct adapter *sc = pi->adapter; struct netmap_adapter *na = NA(pi->nm_ifp); @@ -267,14 +286,20 @@ alloc_nm_rxq_hwq(struct port_info *pi, s V_FW_IQ_CMD_IQESIZE(ilog2(IQ_ESIZE) - 4)); c.iqsize = htobe16(pi->qsize_rxq); c.iqaddr = htobe64(nm_rxq->iq_ba); + if (cong >= 0) { + c.iqns_to_fl0congen = htobe32(F_FW_IQ_CMD_IQFLINTCONGEN | + V_FW_IQ_CMD_FL0CNGCHMAP(cong) | F_FW_IQ_CMD_FL0CONGCIF | + F_FW_IQ_CMD_FL0CONGEN); + } c.iqns_to_fl0congen |= htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE) | F_FW_IQ_CMD_FL0FETCHRO | F_FW_IQ_CMD_FL0DATARO | - (fl_pad ? F_FW_IQ_CMD_FL0PADEN : 0)); + (fl_pad ? F_FW_IQ_CMD_FL0PADEN : 0) | + (black_hole == 2 ? F_FW_IQ_CMD_FL0PACKEN : 0)); c.fl0dcaen_to_fl0cidxfthresh = htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_64B) | V_FW_IQ_CMD_FL0FBMAX(X_FETCHBURSTMAX_512B)); - c.fl0size = htobe16(na->num_rx_desc + spg_len / EQ_ESIZE); + c.fl0size = htobe16(na->num_rx_desc / 8 + spg_len / EQ_ESIZE); c.fl0addr = htobe64(nm_rxq->fl_ba); rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c); @@ -310,8 +335,37 @@ alloc_nm_rxq_hwq(struct port_info *pi, s if (is_t5(sc)) nm_rxq->fl_db_val |= F_DBTYPE; - t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_SEINTARM(F_QINTR_CNT_EN) | - V_INGRESSQID(nm_rxq->iq_cntxt_id)); + if (is_t5(sc) && cong >= 0) { + uint32_t param, val; + + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | + V_FW_PARAMS_PARAM_YZ(nm_rxq->iq_cntxt_id); + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | + V_FW_PARAMS_PARAM_YZ(nm_rxq->iq_cntxt_id); + if (cong == 0) + val = 1 << 19; + else { + val = 2 << 19; + for (i = 0; i < 4; i++) { + if (cong & (1 << i)) + val |= 1 << (i << 2); + } + } + + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + if (rc != 0) { + /* report error but carry on */ + device_printf(sc->dev, + "failed to set congestion manager context for " + "ingress queue %d: %d\n", nm_rxq->iq_cntxt_id, rc); + } + } + + t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), + V_INGRESSQID(nm_rxq->iq_cntxt_id) | + V_SEINTARM(V_QINTR_TIMER_IDX(holdoff_tmr_idx))); return (rc); } @@ -351,7 +405,8 @@ alloc_nm_txq_hwq(struct port_info *pi, s V_FW_EQ_ETH_CMD_VFN(0)); c.alloc_to_len16 = htobe32(F_FW_EQ_ETH_CMD_ALLOC | F_FW_EQ_ETH_CMD_EQSTART | FW_LEN16(c)); - c.autoequiqe_to_viid = htobe32(V_FW_EQ_ETH_CMD_VIID(pi->nm_viid)); + c.autoequiqe_to_viid = htobe32(F_FW_EQ_ETH_CMD_AUTOEQUEQE | + V_FW_EQ_ETH_CMD_VIID(pi->nm_viid)); c.fetchszm_to_iqid = htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | V_FW_EQ_ETH_CMD_PCIECHN(pi->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO | @@ -448,7 +503,7 @@ cxgbe_netmap_on(struct adapter *sc, stru nm_set_native_flags(na); for_each_nm_rxq(pi, i, nm_rxq) { - alloc_nm_rxq_hwq(pi, nm_rxq); + alloc_nm_rxq_hwq(pi, nm_rxq, tnl_cong(pi)); nm_rxq->fl_hwidx = hwidx; slot = netmap_reset(na, NR_RX, i, 0); MPASS(slot != NULL); /* XXXNM: error check, not assert */ @@ -456,13 +511,14 @@ cxgbe_netmap_on(struct adapter *sc, stru /* We deal with 8 bufs at a time */ MPASS((na->num_rx_desc & 7) == 0); MPASS(na->num_rx_desc == nm_rxq->fl_sidx); - for (j = 0; j < nm_rxq->fl_sidx - 8; j++) { + for (j = 0; j < nm_rxq->fl_sidx; j++) { uint64_t ba; PNMB(na, &slot[j], &ba); + MPASS(ba != 0); nm_rxq->fl_desc[j] = htobe64(ba | hwidx); } - nm_rxq->fl_pidx = j; + j = nm_rxq->fl_pidx = nm_rxq->fl_sidx - 8; MPASS((j & 7) == 0); j /= 8; /* driver pidx to hardware pidx */ wmb(); @@ -513,12 +569,17 @@ cxgbe_netmap_off(struct adapter *sc, str if_printf(ifp, "netmap disable_vi failed: %d\n", rc); nm_clear_native_flags(na); - /* - * XXXNM: We need to make sure that the tx queues are quiet and won't - * request any more SGE_EGR_UPDATEs. - */ - for_each_nm_txq(pi, i, nm_txq) { + struct sge_qstat *spg = (void *)&nm_txq->desc[nm_txq->sidx]; + + /* Wait for hw pidx to catch up ... */ + while (be16toh(nm_txq->pidx) != spg->pidx) + pause("nmpidx", 1); + + /* ... and then for the cidx. */ + while (spg->pidx != spg->cidx) + pause("nmcidx", 1); + free_nm_txq_hwq(pi, nm_txq); } for_each_nm_rxq(pi, i, nm_rxq) { @@ -641,7 +702,7 @@ int lazy_tx_credit_flush = 1; */ static void cxgbe_nm_tx(struct adapter *sc, struct sge_nm_txq *nm_txq, - struct netmap_kring *kring, int npkt, int npkt_remaining) + struct netmap_kring *kring, int npkt, int npkt_remaining, int txcsum) { struct netmap_ring *ring = kring->ring; struct netmap_slot *slot; @@ -668,6 +729,7 @@ cxgbe_nm_tx(struct adapter *sc, struct s for (i = 0; i < n; i++) { slot = &ring->slot[kring->nr_hwcur]; PNMB(kring->na, slot, &ba); + MPASS(ba != 0); cpl->ctrl0 = nm_txq->cpl_ctrl0; cpl->pack = 0; @@ -677,10 +739,12 @@ cxgbe_nm_tx(struct adapter *sc, struct s * checksum offloading, TCP segmentation offloading, * encryption, VLAN encapsulation/decapsulation, etc." * - * XXXNM: it makes sense to enable checksum offload. + * So the ncxl interfaces have tx hardware checksumming + * disabled by default. But you can override netmap by + * enabling IFCAP_TXCSUM on the interface manully. */ - cpl->ctrl1 = htobe64(F_TXPKT_IPCSUM_DIS | - F_TXPKT_L4CSUM_DIS); + cpl->ctrl1 = txcsum ? 0 : + htobe64(F_TXPKT_IPCSUM_DIS | F_TXPKT_L4CSUM_DIS); usgl = (void *)(cpl + 1); usgl->cmd_nsge = htobe32(V_ULPTX_CMD(ULP_TX_SC_DSGL) | @@ -793,7 +857,7 @@ cxgbe_netmap_txsync(struct netmap_kring struct sge_nm_txq *nm_txq = &sc->sge.nm_txq[pi->first_nm_txq + kring->ring_id]; const u_int head = kring->rhead; u_int reclaimed = 0; - int n, d, npkt_remaining, ndesc_remaining; + int n, d, npkt_remaining, ndesc_remaining, txcsum; /* * Tx was at kring->nr_hwcur last time around and now we need to advance @@ -804,6 +868,7 @@ cxgbe_netmap_txsync(struct netmap_kring npkt_remaining = head >= kring->nr_hwcur ? head - kring->nr_hwcur : kring->nkr_num_slots - kring->nr_hwcur + head; + txcsum = ifp->if_capenable & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); while (npkt_remaining) { reclaimed += reclaim_nm_tx_desc(nm_txq); ndesc_remaining = contiguous_ndesc_available(nm_txq); @@ -827,7 +892,7 @@ cxgbe_netmap_txsync(struct netmap_kring /* Send n packets and update nm_txq->pidx and kring->nr_hwcur */ npkt_remaining -= n; - cxgbe_nm_tx(sc, nm_txq, kring, n, npkt_remaining); + cxgbe_nm_tx(sc, nm_txq, kring, n, npkt_remaining, txcsum); } MPASS(npkt_remaining == 0); MPASS(kring->nr_hwcur == head); @@ -861,6 +926,9 @@ cxgbe_netmap_rxsync(struct netmap_kring u_int n; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; + if (black_hole) + return (0); /* No updates ever. */ + if (netmap_no_pendintr || force_update) { kring->nr_hwtail = atomic_load_acq_32(&nm_rxq->fl_cidx); kring->nr_kflags &= ~NKR_PENDINTR; @@ -890,6 +958,7 @@ cxgbe_netmap_rxsync(struct netmap_kring while (n > 0) { for (i = 0; i < 8; i++, fl_pidx++, slot++) { PNMB(na, slot, &ba); + MPASS(ba != 0); nm_rxq->fl_desc[fl_pidx] = htobe64(ba | hwidx); slot->flags &= ~NS_BUF_CHANGED; MPASS(fl_pidx <= nm_rxq->fl_sidx); @@ -1064,10 +1133,10 @@ t4_nm_intr(void *arg) struct netmap_ring *ring = kring->ring; struct iq_desc *d = &nm_rxq->iq_desc[nm_rxq->iq_cidx]; uint32_t lq; - u_int n = 0; - int processed = 0; + u_int n = 0, work = 0; uint8_t opcode; uint32_t fl_cidx = atomic_load_acq_32(&nm_rxq->fl_cidx); + u_int fl_credits = fl_cidx & 7; while ((d->rsp.u.type_gen & F_RSPD_GEN) == nm_rxq->iq_gen) { @@ -1078,8 +1147,10 @@ t4_nm_intr(void *arg) switch (G_RSPD_TYPE(d->rsp.u.type_gen)) { case X_RSPD_TYPE_FLBUF: - /* No buffer packing so new buf every time */ - MPASS(lq & F_RSPD_NEWBUF); + if (black_hole != 2) { + /* No buffer packing so new buf every time */ + MPASS(lq & F_RSPD_NEWBUF); + } /* fall through */ @@ -1095,7 +1166,9 @@ t4_nm_intr(void *arg) case CPL_RX_PKT: ring->slot[fl_cidx].len = G_RSPD_LEN(lq) - fl_pktshift; ring->slot[fl_cidx].flags = kring->nkr_slot_flags; - if (__predict_false(++fl_cidx == nm_rxq->fl_sidx)) + fl_cidx += (lq & F_RSPD_NEWBUF) ? 1 : 0; + fl_credits += (lq & F_RSPD_NEWBUF) ? 1 : 0; + if (__predict_false(fl_cidx == nm_rxq->fl_sidx)) fl_cidx = 0; break; default: @@ -1121,18 +1194,37 @@ t4_nm_intr(void *arg) nm_rxq->iq_gen ^= F_RSPD_GEN; } - if (__predict_false(++n == 64)) { /* XXXNM: tune */ + if (__predict_false(++n == rx_ndesc)) { + atomic_store_rel_32(&nm_rxq->fl_cidx, fl_cidx); + if (black_hole && fl_credits >= 8) { + fl_credits /= 8; + IDXINCR(nm_rxq->fl_pidx, fl_credits * 8, + nm_rxq->fl_sidx); + t4_write_reg(sc, MYPF_REG(A_SGE_PF_KDOORBELL), + nm_rxq->fl_db_val | V_PIDX(fl_credits)); + fl_credits = fl_cidx & 7; + } else if (!black_hole) { + netmap_rx_irq(ifp, nm_rxq->nid, &work); + MPASS(work != 0); + } t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_CIDXINC(n) | V_INGRESSQID(nm_rxq->iq_cntxt_id) | V_SEINTARM(V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX))); n = 0; } } - if (fl_cidx != nm_rxq->fl_cidx) { - atomic_store_rel_32(&nm_rxq->fl_cidx, fl_cidx); - netmap_rx_irq(ifp, nm_rxq->nid, &processed); - } + + atomic_store_rel_32(&nm_rxq->fl_cidx, fl_cidx); + if (black_hole) { + fl_credits /= 8; + IDXINCR(nm_rxq->fl_pidx, fl_credits * 8, nm_rxq->fl_sidx); + t4_write_reg(sc, MYPF_REG(A_SGE_PF_KDOORBELL), + nm_rxq->fl_db_val | V_PIDX(fl_credits)); + } else + netmap_rx_irq(ifp, nm_rxq->nid, &work); + t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_CIDXINC(n) | - V_INGRESSQID((u32)nm_rxq->iq_cntxt_id) | V_SEINTARM(F_QINTR_CNT_EN)); + V_INGRESSQID((u32)nm_rxq->iq_cntxt_id) | + V_SEINTARM(V_QINTR_TIMER_IDX(holdoff_tmr_idx))); } #endif Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Wed Apr 8 01:25:26 2015 (r281252) +++ stable/10/sys/dev/cxgbe/t4_sge.c Wed Apr 8 01:43:29 2015 (r281253) @@ -2563,7 +2563,7 @@ free_mgmtq(struct adapter *sc) return free_wrq(sc, &sc->sge.mgmtq); } -static inline int +int tnl_cong(struct port_info *pi) { From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 02:15:14 2015 Return-Path: Delivered-To: svn-src-stable-10@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 B49784E0; Wed, 8 Apr 2015 02:15: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 951592FF; Wed, 8 Apr 2015 02:15: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 t382FEIS002606; Wed, 8 Apr 2015 02:15:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t382FDC0002604; Wed, 8 Apr 2015 02:15:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504080215.t382FDC0002604@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 8 Apr 2015 02:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281255 - stable/10/sys/fs/devfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 02:15:14 -0000 Author: kib Date: Wed Apr 8 02:15:13 2015 New Revision: 281255 URL: https://svnweb.freebsd.org/changeset/base/281255 Log: MFC r280308 (by delphij): Disable timestamping on devfs read/write operations by default. MFC r280949: Refine r280308. Use seconds precision for devfs timestamps by default. Modified: stable/10/sys/fs/devfs/devfs_devs.c stable/10/sys/fs/devfs/devfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_devs.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_devs.c Wed Apr 8 01:55:22 2015 (r281254) +++ stable/10/sys/fs/devfs/devfs_devs.c Wed Apr 8 02:15:13 2015 (r281255) @@ -61,7 +61,7 @@ static MALLOC_DEFINE(M_DEVFS2, "DEVFS2", static MALLOC_DEFINE(M_DEVFS3, "DEVFS3", "DEVFS data 3"); static MALLOC_DEFINE(M_CDEVP, "DEVFS1", "DEVFS cdev_priv storage"); -static SYSCTL_NODE(_vfs, OID_AUTO, devfs, CTLFLAG_RW, 0, "DEVFS filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, devfs, CTLFLAG_RW, 0, "DEVFS filesystem"); static unsigned devfs_generation; SYSCTL_UINT(_vfs_devfs, OID_AUTO, generation, CTLFLAG_RD, Modified: stable/10/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_vnops.c Wed Apr 8 01:55:22 2015 (r281254) +++ stable/10/sys/fs/devfs/devfs_vnops.c Wed Apr 8 02:15:13 2015 (r281255) @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -79,6 +80,32 @@ SX_SYSINIT(clone_drain_lock, &clone_drai struct mtx cdevpriv_mtx; MTX_SYSINIT(cdevpriv_mtx, &cdevpriv_mtx, "cdevpriv lock", MTX_DEF); +SYSCTL_DECL(_vfs_devfs); + +static int devfs_dotimes; +SYSCTL_INT(_vfs_devfs, OID_AUTO, dotimes, CTLFLAG_RW, + &devfs_dotimes, 0, "Update timestamps on DEVFS with default precision"); + +/* + * Update devfs node timestamp. Note that updates are unlocked and + * stat(2) could see partially updated times. + */ +static void +devfs_timestamp(struct timespec *tsp) +{ + time_t ts; + + if (devfs_dotimes) { + vfs_timestamp(tsp); + } else { + ts = time_second; + if (tsp->tv_sec != ts) { + tsp->tv_sec = ts; + tsp->tv_nsec = 0; + } + } +} + static int devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp, int *ref) @@ -1200,7 +1227,7 @@ devfs_read_f(struct file *fp, struct uio foffset_lock_uio(fp, uio, flags | FOF_NOLOCK); error = dsw->d_read(dev, uio, ioflag); if (uio->uio_resid != resid || (error == 0 && resid != 0)) - vfs_timestamp(&dev->si_atime); + devfs_timestamp(&dev->si_atime); td->td_fpop = fpop; dev_relthread(dev, ref); @@ -1679,7 +1706,7 @@ devfs_write_f(struct file *fp, struct ui error = dsw->d_write(dev, uio, ioflag); if (uio->uio_resid != resid || (error == 0 && resid != 0)) { - vfs_timestamp(&dev->si_ctime); + devfs_timestamp(&dev->si_ctime); dev->si_mtime = dev->si_ctime; } td->td_fpop = fpop; From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 02:21:46 2015 Return-Path: Delivered-To: svn-src-stable-10@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 45AAB8DE; Wed, 8 Apr 2015 02:21: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 2FCC33EF; Wed, 8 Apr 2015 02:21: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 t382Lk5p006856; Wed, 8 Apr 2015 02:21:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t382Ljt0006854; Wed, 8 Apr 2015 02:21:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504080221.t382Ljt0006854@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 8 Apr 2015 02:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281256 - in stable/10/lib/libc: include sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 02:21:46 -0000 Author: kib Date: Wed Apr 8 02:21:44 2015 New Revision: 281256 URL: https://svnweb.freebsd.org/changeset/base/281256 Log: MFC r280959: Correctly handle __fcntl_compat symbol for the !SYSCALL_COMPAT case. Modified: stable/10/lib/libc/include/compat.h stable/10/lib/libc/sys/fcntl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/include/compat.h ============================================================================== --- stable/10/lib/libc/include/compat.h Wed Apr 8 02:15:13 2015 (r281255) +++ stable/10/lib/libc/include/compat.h Wed Apr 8 02:21:44 2015 (r281256) @@ -44,5 +44,14 @@ __sym_compat(shmctl, freebsd7_shmctl, FB #undef __sym_compat +#define __weak_reference(sym,alias) \ + .weak alias;.equ alias,sym + +#ifndef SYSCALL_COMPAT +__weak_reference(__sys_fcntl,__fcntl_compat) +#endif + +#undef __weak_reference + #endif /* __LIBC_COMPAT_H__ */ Modified: stable/10/lib/libc/sys/fcntl.c ============================================================================== --- stable/10/lib/libc/sys/fcntl.c Wed Apr 8 02:15:13 2015 (r281255) +++ stable/10/lib/libc/sys/fcntl.c Wed Apr 8 02:21:44 2015 (r281256) @@ -103,7 +103,4 @@ __fcntl_compat(int fd, int cmd, ...) return (__sys_fcntl(fd, cmd, arg)); } } -#else -__weak_reference(__sys_fcntl, __fcntl_compat); -__weak_reference(__sys_fcntl, __fcntl); #endif From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 03:55:04 2015 Return-Path: Delivered-To: svn-src-stable-10@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 B4F5BDC7; Wed, 8 Apr 2015 03:55: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 9F349FC0; Wed, 8 Apr 2015 03:55: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 t383t3Bk050155; Wed, 8 Apr 2015 03:55:03 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t383t3Db050153; Wed, 8 Apr 2015 03:55:03 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080355.t383t3Db050153@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 03:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281259 - in stable/10/sys/dev/cxgbe: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 03:55:04 -0000 Author: np Date: Wed Apr 8 03:55:02 2015 New Revision: 281259 URL: https://svnweb.freebsd.org/changeset/base/281259 Log: MFC r278485: cxgbe(4): allow the SET_FILTER_MODE ioctl to change the mode when it's safe to do so. Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Wed Apr 8 02:43:05 2015 (r281258) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Wed Apr 8 03:55:02 2015 (r281259) @@ -3108,6 +3108,31 @@ void t4_write_rss_pf_mask(struct adapter &pfmask, 1, A_TP_RSS_PF_MSK); } +static void refresh_vlan_pri_map(struct adapter *adap) +{ + + t4_read_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, + &adap->params.tp.vlan_pri_map, 1, + A_TP_VLAN_PRI_MAP); + + /* + * Now that we have TP_VLAN_PRI_MAP cached, we can calculate the field + * shift positions of several elements of the Compressed Filter Tuple + * for this adapter which we need frequently ... + */ + adap->params.tp.vlan_shift = t4_filter_field_shift(adap, F_VLAN); + adap->params.tp.vnic_shift = t4_filter_field_shift(adap, F_VNIC_ID); + adap->params.tp.port_shift = t4_filter_field_shift(adap, F_PORT); + adap->params.tp.protocol_shift = t4_filter_field_shift(adap, F_PROTOCOL); + + /* + * If TP_INGRESS_CONFIG.VNID == 0, then TP_VLAN_PRI_MAP.VNIC_ID + * represents the presense of an Outer VLAN instead of a VNIC ID. + */ + if ((adap->params.tp.ingress_config & F_VNIC) == 0) + adap->params.tp.vnic_shift = -1; +} + /** * t4_set_filter_mode - configure the optional components of filter tuples * @adap: the adapter @@ -3131,6 +3156,8 @@ int t4_set_filter_mode(struct adapter *a return -EINVAL; t4_write_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, &mode_map, 1, A_TP_VLAN_PRI_MAP); + refresh_vlan_pri_map(adap); + return 0; } @@ -5615,33 +5642,10 @@ int __devinit t4_init_tp_params(struct a for (chan = 0; chan < NCHAN; chan++) adap->params.tp.tx_modq[chan] = chan; - /* - * Cache the adapter's Compressed Filter Mode and global Incress - * Configuration. - */ - t4_read_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, - &adap->params.tp.vlan_pri_map, 1, - A_TP_VLAN_PRI_MAP); t4_read_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, &adap->params.tp.ingress_config, 1, A_TP_INGRESS_CONFIG); - - /* - * Now that we have TP_VLAN_PRI_MAP cached, we can calculate the field - * shift positions of several elements of the Compressed Filter Tuple - * for this adapter which we need frequently ... - */ - adap->params.tp.vlan_shift = t4_filter_field_shift(adap, F_VLAN); - adap->params.tp.vnic_shift = t4_filter_field_shift(adap, F_VNIC_ID); - adap->params.tp.port_shift = t4_filter_field_shift(adap, F_PORT); - adap->params.tp.protocol_shift = t4_filter_field_shift(adap, F_PROTOCOL); - - /* - * If TP_INGRESS_CONFIG.VNID == 0, then TP_VLAN_PRI_MAP.VNIC_ID - * represents the presense of an Outer VLAN instead of a VNIC ID. - */ - if ((adap->params.tp.ingress_config & F_VNIC) == 0) - adap->params.tp.vnic_shift = -1; + refresh_vlan_pri_map(adap); return 0; } Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 02:43:05 2015 (r281258) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 03:55:02 2015 (r281259) @@ -7056,10 +7056,9 @@ get_filter_mode(struct adapter *sc, uint log(LOG_WARNING, "%s: cached filter mode out of sync %x %x.\n", device_get_nameunit(sc->dev), sc->params.tp.vlan_pri_map, fconf); - sc->params.tp.vlan_pri_map = fconf; } - *mode = fconf_to_mode(sc->params.tp.vlan_pri_map); + *mode = fconf_to_mode(fconf); end_synchronized_op(sc, LOCK_HELD); return (0); @@ -7090,14 +7089,7 @@ set_filter_mode(struct adapter *sc, uint } #endif -#ifdef notyet rc = -t4_set_filter_mode(sc, fconf); - if (rc == 0) - sc->filter_mode = fconf; -#else - rc = ENOTSUP; -#endif - done: end_synchronized_op(sc, LOCK_HELD); return (rc); From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 04:40:05 2015 Return-Path: Delivered-To: svn-src-stable-10@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 AFF5A702; Wed, 8 Apr 2015 04:40: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 9A64C3D9; Wed, 8 Apr 2015 04:40: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 t384e5g2069759; Wed, 8 Apr 2015 04:40:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t384e5LR069755; Wed, 8 Apr 2015 04:40:05 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080440.t384e5LR069755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 04:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281263 - in stable/10/sys: dev/cxgbe modules/cxgbe modules/cxgbe/if_cxl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 04:40:05 -0000 Author: np Date: Wed Apr 8 04:40:04 2015 New Revision: 281263 URL: https://svnweb.freebsd.org/changeset/base/281263 Log: MFC r278303: cxgbe(4): Add a minimal if_cxl module that pulls in the real driver as a dependency. This ensures "ifconfig cxl ..." does the right thing even when it's run with no driver loaded. if_cxl.ko is the tiniest module in /boot/kernel. Added: stable/10/sys/dev/cxgbe/if_cxl.c - copied unchanged from r278303, head/sys/dev/cxgbe/if_cxl.c stable/10/sys/modules/cxgbe/if_cxl/ - copied from r278303, head/sys/modules/cxgbe/if_cxl/ Modified: stable/10/sys/modules/cxgbe/Makefile Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/dev/cxgbe/if_cxl.c (from r278303, head/sys/dev/cxgbe/if_cxl.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/cxgbe/if_cxl.c Wed Apr 8 04:40:04 2015 (r281263, copy of r278303, head/sys/dev/cxgbe/if_cxl.c) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2015 Chelsio Communications, Inc. + * All rights reserved. + * Written by: Navdeep Parhar + * + * 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 +#include + +static int +mod_event(module_t mod, int cmd, void *arg) +{ + + return (0); +} +static moduledata_t if_cxl_mod = {"if_cxl", mod_event}; +DECLARE_MODULE(if_cxl, if_cxl_mod, SI_SUB_EXEC, SI_ORDER_ANY); +MODULE_VERSION(if_cxl, 1); +MODULE_DEPEND(if_cxl, cxl, 1, 1, 1); Modified: stable/10/sys/modules/cxgbe/Makefile ============================================================================== --- stable/10/sys/modules/cxgbe/Makefile Wed Apr 8 04:37:11 2015 (r281262) +++ stable/10/sys/modules/cxgbe/Makefile Wed Apr 8 04:40:04 2015 (r281263) @@ -3,6 +3,7 @@ # SUBDIR= if_cxgbe +SUBDIR+= if_cxl SUBDIR+= t4_firmware SUBDIR+= t5_firmware SUBDIR+= ${_tom} From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 05:02:22 2015 Return-Path: Delivered-To: svn-src-stable-10@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 D96169DD; Wed, 8 Apr 2015 05:02: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 C527585B; Wed, 8 Apr 2015 05:02: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 t3852Mco082755; Wed, 8 Apr 2015 05:02:22 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3852MHU082754; Wed, 8 Apr 2015 05:02:22 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080502.t3852MHU082754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 05:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281264 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 05:02:23 -0000 Author: np Date: Wed Apr 8 05:02:21 2015 New Revision: 281264 URL: https://svnweb.freebsd.org/changeset/base/281264 Log: MFC r279092: cxgbe(4): there is no need to force an "unimplemented" panic needlessly. The calls to free_nm_txq and free_nm_rxq are made just a few lines prior to the panic. Modified: stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Wed Apr 8 04:40:04 2015 (r281263) +++ stable/10/sys/dev/cxgbe/t4_sge.c Wed Apr 8 05:02:21 2015 (r281264) @@ -1244,9 +1244,6 @@ t4_teardown_port_queues(struct port_info free_ofld_rxq(pi, ofld_rxq); } #endif -#ifdef DEV_NETMAP - CXGBE_UNIMPLEMENTED(__func__); -#endif return (0); } From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 22:02:18 2015 Return-Path: Delivered-To: svn-src-stable-10@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 424E7AB2; Wed, 8 Apr 2015 22:02: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 24424FB7; Wed, 8 Apr 2015 22:02: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 t38M2Il0067984; Wed, 8 Apr 2015 22:02:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38M2G3P067977; Wed, 8 Apr 2015 22:02:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504082202.t38M2G3P067977@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 8 Apr 2015 22:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281284 - stable/10/release/tools/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 22:02:18 -0000 Author: gjb Date: Wed Apr 8 22:02:15 2015 New Revision: 281284 URL: https://svnweb.freebsd.org/changeset/base/281284 Log: MFC r280861: s/AutoSize/Growfs/ following upstream commit r761. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/arm/crochet-BEAGLEBONE.conf stable/10/release/tools/arm/crochet-PANDABOARD.conf stable/10/release/tools/arm/crochet-RPI-B.conf stable/10/release/tools/arm/crochet-WANDBOARD-QUAD.conf stable/10/release/tools/arm/crochet-ZEDBOARD.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/release/tools/arm/crochet-BEAGLEBONE.conf ============================================================================== --- stable/10/release/tools/arm/crochet-BEAGLEBONE.conf Wed Apr 8 21:52:06 2015 (r281283) +++ stable/10/release/tools/arm/crochet-BEAGLEBONE.conf Wed Apr 8 22:02:15 2015 (r281284) @@ -7,7 +7,7 @@ board_setup BeagleBone option ImageSize 1gb -option AutoSize +option Growfs export MAKEOBJDIRPREFIX=/usr/obj FREEBSD_SRC=/usr/src Modified: stable/10/release/tools/arm/crochet-PANDABOARD.conf ============================================================================== --- stable/10/release/tools/arm/crochet-PANDABOARD.conf Wed Apr 8 21:52:06 2015 (r281283) +++ stable/10/release/tools/arm/crochet-PANDABOARD.conf Wed Apr 8 22:02:15 2015 (r281284) @@ -7,7 +7,7 @@ board_setup PandaBoard option ImageSize 1gb -option AutoSize +option Growfs export MAKEOBJDIRPREFIX=/usr/obj FREEBSD_SRC=/usr/src Modified: stable/10/release/tools/arm/crochet-RPI-B.conf ============================================================================== --- stable/10/release/tools/arm/crochet-RPI-B.conf Wed Apr 8 21:52:06 2015 (r281283) +++ stable/10/release/tools/arm/crochet-RPI-B.conf Wed Apr 8 22:02:15 2015 (r281284) @@ -7,7 +7,7 @@ board_setup RaspberryPi option ImageSize 1gb -option AutoSize +option Growfs export MAKEOBJDIRPREFIX=/usr/obj FREEBSD_SRC=/usr/src Modified: stable/10/release/tools/arm/crochet-WANDBOARD-QUAD.conf ============================================================================== --- stable/10/release/tools/arm/crochet-WANDBOARD-QUAD.conf Wed Apr 8 21:52:06 2015 (r281283) +++ stable/10/release/tools/arm/crochet-WANDBOARD-QUAD.conf Wed Apr 8 22:02:15 2015 (r281284) @@ -7,7 +7,7 @@ board_setup Wandboard option ImageSize 1gb -option AutoSize +option Growfs export MAKEOBJDIRPREFIX=/usr/obj FREEBSD_SRC=/usr/src Modified: stable/10/release/tools/arm/crochet-ZEDBOARD.conf ============================================================================== --- stable/10/release/tools/arm/crochet-ZEDBOARD.conf Wed Apr 8 21:52:06 2015 (r281283) +++ stable/10/release/tools/arm/crochet-ZEDBOARD.conf Wed Apr 8 22:02:15 2015 (r281284) @@ -7,7 +7,7 @@ board_setup ZedBoard option ImageSize 1gb -option AutoSize +option Growfs export MAKEOBJDIRPREFIX=/usr/obj FREEBSD_SRC=/usr/src From owner-svn-src-stable-10@FreeBSD.ORG Wed Apr 8 23:21:34 2015 Return-Path: Delivered-To: svn-src-stable-10@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 66B3EFFE; Wed, 8 Apr 2015 23:21:34 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 1B7F9A55; Wed, 8 Apr 2015 23:21:34 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YfzHn-0002fq-3N; Thu, 09 Apr 2015 02:21:31 +0300 Date: Thu, 9 Apr 2015 02:21:31 +0300 From: Slawa Olhovchenkov To: Dimitry Andric Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Message-ID: <20150408232131.GB1394@zxy.spb.ru> References: <201504041017.t34AHr5R059717@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504041017.t34AHr5R059717@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 23:21:34 -0000 On Sat, Apr 04, 2015 at 10:17:53AM +0000, Dimitry Andric wrote: > Author: dim > Date: Sat Apr 4 10:17:51 2015 > New Revision: 281075 > URL: https://svnweb.freebsd.org/changeset/base/281075 > > Log: > MFC r272444 (by jkim): > > Merge ACPICA 20140926. > > MFC r278970 (by jkim): > > Merge ACPICA 20141107 and 20150204. > > Approved by: jkim > Relnotes: yes > Some time ago `acpidump -dt` was broken for me: # acpidump -dt /* RSD PTR: OEM=ALASKA, ACPI_Rev=2.0x (2) XSDT=0x7f1e6080, length=36, cksum=95 */ /* XSDT: Length=132, Revision=1, Checksum=106, OEMID=ALASKA, OEM Table ID=A M I, OEM Revision=0x1072009, Creator ID=AMI, Creator Revision=0x10013 Assertion failed: (addr != 0), function acpi_print_rsdt, file /usr/src/usr.sbin/acpi/acpidump/acpi.c, line 1097. Entries={ 0x7f1efe90, 0x7f1eff88, 0x7f1f0098, 0x7f1f00d8, 0x7f1f0448, 0x7f1f0478, 0x7f1f04b0, 0x7f1f0570, 0x7f1f05b0, 0x7f2606b8, 0x7f260708, Abort (core dumped) From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 03:30:06 2015 Return-Path: Delivered-To: svn-src-stable-10@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 DEC005D5; Thu, 9 Apr 2015 03:30: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 AFF228BB; Thu, 9 Apr 2015 03:30: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 t393U6sc021162; Thu, 9 Apr 2015 03:30:06 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t393U6dn021161; Thu, 9 Apr 2015 03:30:06 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201504090330.t393U6dn021161@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Thu, 9 Apr 2015 03:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281286 - stable/10/sbin/ggate/ggatec X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 03:30:07 -0000 Author: wblock (doc committer) Date: Thu Apr 9 03:30:05 2015 New Revision: 281286 URL: https://svnweb.freebsd.org/changeset/base/281286 Log: MFC 280988: Add articles, avoid use of "you", simplify a few sentences. Modified: stable/10/sbin/ggate/ggatec/ggatec.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ggate/ggatec/ggatec.8 ============================================================================== --- stable/10/sbin/ggate/ggatec/ggatec.8 Thu Apr 9 00:37:55 2015 (r281285) +++ stable/10/sbin/ggate/ggatec/ggatec.8 Thu Apr 9 03:30:05 2015 (r281286) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2004 +.Dd April 2, 2015 .Dt GGATEC 8 .Os .Sh NAME @@ -67,29 +67,29 @@ .Sh DESCRIPTION The .Nm -utility is a network client for GEOM Gate class. -It is responsible for creation of +utility is a network client for the GEOM Gate class. +It is responsible for the creation of .Nm ggate -devices and forwarding I/O requests between +devices and forwarding I/O requests between the .Nm geom_gate.ko -kernel module and +kernel module and the .Xr ggated 8 network daemon. Available commands: .Bl -tag -width ".Cm destroy" .It Cm create -Connect to given +Connect to a .Xr ggated 8 -daemon and create a +daemon on the specified host and create a .Nm ggate -provider related to the given remote file or device. +provider for the specified remote file or device. .It Cm rescue -If +Create a new connection after the .Nm -process died/has been killed, you can save situation with this -command, which creates new connection to the +process has died or been killed. +The new connection to the .Xr ggated 8 -daemon and will handle pending and future requests. +daemon handles pending and future requests. .It Cm destroy Destroy the given .Nm ggate @@ -139,12 +139,11 @@ provider. If not specified, it is taken from device, or set to 512 bytes for files. .It Fl t Ar timeout Number of seconds to wait before an I/O request will be canceled. -0 means no timeout. -Default is 0. +Default is 0, which means no timeout. .It Fl u Ar unit Unit number to use. .It Fl v -Do not fork, run in foreground and print debug informations on standard +Do not fork, run in foreground and print debug information on standard output. .It Ar host Remote host to connect to. @@ -159,7 +158,7 @@ should be called with the .Fl v option. .Sh EXAMPLES -Make use of CD-ROM device from remote host. +Use a CD-ROM device on a remote host. .Bd -literal -offset indent server# cat /etc/gg.exports client RO /dev/acd0 From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 06:24:42 2015 Return-Path: Delivered-To: svn-src-stable-10@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 100387D7; Thu, 9 Apr 2015 06:24:42 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BBD32CB7; Thu, 9 Apr 2015 06:24:41 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::2064:6a8f:adb3:8b79] (unknown [IPv6:2001:7b8:3a7:0:2064:6a8f:adb3:8b79]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DFB315C37; Thu, 9 Apr 2015 08:24:30 +0200 (CEST) Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BD3EB39D-782A-4FE8-9302-B96F6A1553A7"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b6 From: Dimitry Andric In-Reply-To: <20150408232131.GB1394@zxy.spb.ru> Date: Thu, 9 Apr 2015 08:24:19 +0200 Message-Id: References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 06:24:42 -0000 --Apple-Mail=_BD3EB39D-782A-4FE8-9302-B96F6A1553A7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 09 Apr 2015, at 01:21, Slawa Olhovchenkov wrote: >=20 > On Sat, Apr 04, 2015 at 10:17:53AM +0000, Dimitry Andric wrote: >=20 >> Author: dim >> Date: Sat Apr 4 10:17:51 2015 >> New Revision: 281075 >> URL: https://svnweb.freebsd.org/changeset/base/281075 >>=20 >> Log: >> MFC r272444 (by jkim): >>=20 >> Merge ACPICA 20140926. >>=20 >> MFC r278970 (by jkim): >>=20 >> Merge ACPICA 20141107 and 20150204. >>=20 >> Approved by: jkim >> Relnotes: yes >>=20 >=20 > Some time ago `acpidump -dt` was broken for me: >=20 > # acpidump -dt > /* > RSD PTR: OEM=3DALASKA, ACPI_Rev=3D2.0x (2) > XSDT=3D0x7f1e6080, length=3D36, cksum=3D95 > */ > /* > XSDT: Length=3D132, Revision=3D1, Checksum=3D106, > OEMID=3DALASKA, OEM Table ID=3DA M I, OEM Revision=3D0x1072009, > Creator ID=3DAMI, Creator Revision=3D0x10013 > Assertion failed: (addr !=3D 0), function acpi_print_rsdt, file = /usr/src/usr.sbin/acpi/acpidump/acpi.c, line 1097. > Entries=3D{ 0x7f1efe90, 0x7f1eff88, 0x7f1f0098, 0x7f1f00d8, = 0x7f1f0448, 0x7f1f0478, 0x7f1f04b0, 0x7f1f0570, 0x7f1f05b0, 0x7f2606b8, = 0x7f260708, Abort (core dumped) Hi Slawa, Is there a PR for this? And a core dump or (preferably) a reproduction scenario? =46rom a quick look, it seems that your RSDT contains an entry with an address size which is neither 4 nor 8, and that leads to the assertion failure. I am unsure whether there is any upstream fix for it. -Dimitry --Apple-Mail=_BD3EB39D-782A-4FE8-9302-B96F6A1553A7 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----- Version: GnuPG/MacGPG2 v2.0.27 iEYEARECAAYFAlUmGx0ACgkQsF6jCi4glqMlgwCg/10j4wpjTR5LJZgtCfJOv8wf r/0AoPIXnLMXi3teaDRq6+cY0ehYmEaw =wGtn -----END PGP SIGNATURE----- --Apple-Mail=_BD3EB39D-782A-4FE8-9302-B96F6A1553A7-- From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 06:38:37 2015 Return-Path: Delivered-To: svn-src-stable-10@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 211ADB63; Thu, 9 Apr 2015 06:38: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 02A22DCF; Thu, 9 Apr 2015 06:38: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 t396ca4A009542; Thu, 9 Apr 2015 06:38:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t396cXhv009529; Thu, 9 Apr 2015 06:38:33 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504090638.t396cXhv009529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 9 Apr 2015 06:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281289 - in stable/10: . lib/csu/i386-elf sys/boot/i386/boot2 sys/boot/i386/gptboot sys/boot/i386/gptzfsboot sys/boot/i386/zfsboot sys/boot/pc98/boot0 sys/boot/pc98/boot0.5 sys/boot/pc... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 06:38:37 -0000 Author: dim Date: Thu Apr 9 06:38:32 2015 New Revision: 281289 URL: https://svnweb.freebsd.org/changeset/base/281289 Log: MFC r280980: Ensure the cross assembler, linker and objcopy are used for the build32 stage, just like for the regular world stage. Reviewed by: rodrigc, imp, bapt, emaste Differential Revision: https://reviews.freebsd.org/D2187 Modified: stable/10/Makefile.inc1 stable/10/lib/csu/i386-elf/Makefile stable/10/sys/boot/i386/boot2/Makefile stable/10/sys/boot/i386/gptboot/Makefile stable/10/sys/boot/i386/gptzfsboot/Makefile stable/10/sys/boot/i386/zfsboot/Makefile stable/10/sys/boot/pc98/boot0.5/Makefile stable/10/sys/boot/pc98/boot0/Makefile stable/10/sys/boot/pc98/boot2/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Thu Apr 9 04:56:24 2015 (r281288) +++ stable/10/Makefile.inc1 Thu Apr 9 06:38:32 2015 (r281289) @@ -375,8 +375,9 @@ LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ MACHINE_CPU="i686 mmx sse sse2" LIB32WMAKEFLAGS= \ - AS="${AS} --32" \ - LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" + AS="${XAS} --32" \ + LD="${XLD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ + OBJCOPY="${XOBJCOPY}" .elif ${TARGET_ARCH} == "powerpc64" .if empty(TARGET_CPUTYPE) @@ -386,7 +387,8 @@ LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} .endif LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc LIB32WMAKEFLAGS= \ - LD="${LD} -m elf32ppc_fbsd" + LD="${XLD} -m elf32ppc_fbsd" \ + OBJCOPY="${XOBJCOPY}" .endif Modified: stable/10/lib/csu/i386-elf/Makefile ============================================================================== --- stable/10/lib/csu/i386-elf/Makefile Thu Apr 9 04:56:24 2015 (r281288) +++ stable/10/lib/csu/i386-elf/Makefile Thu Apr 9 06:38:32 2015 (r281289) @@ -35,7 +35,7 @@ crt1_c.o: crt1_c.s crt1.o: crt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o - objcopy --localize-symbol _start1 crt1.o + ${OBJCOPY} --localize-symbol _start1 crt1.o Scrt1_c.s: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1_c.c @@ -46,6 +46,6 @@ Scrt1_c.o: Scrt1_c.s Scrt1.o: Scrt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o - objcopy --localize-symbol _start1 Scrt1.o + ${OBJCOPY} --localize-symbol _start1 Scrt1.o .include Modified: stable/10/sys/boot/i386/boot2/Makefile ============================================================================== --- stable/10/sys/boot/i386/boot2/Makefile Thu Apr 9 04:56:24 2015 (r281288) +++ stable/10/sys/boot/i386/boot2/Makefile Thu Apr 9 06:38:32 2015 (r281289) @@ -60,7 +60,7 @@ boot: boot1 boot2 CLEANFILES+= boot1 boot1.out boot1.o boot1: boot1.out - objcopy -S -O binary boot1.out ${.TARGET} + ${OBJCOPY} -S -O binary boot1.out ${.TARGET} boot1.out: boot1.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o @@ -81,7 +81,7 @@ boot2.ldr: dd if=/dev/zero of=${.TARGET} bs=512 count=1 boot2.bin: boot2.out - objcopy -S -O binary boot2.out ${.TARGET} + ${OBJCOPY} -S -O binary boot2.out ${.TARGET} boot2.out: ${BTXCRT} boot2.o sio.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} Modified: stable/10/sys/boot/i386/gptboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/gptboot/Makefile Thu Apr 9 04:56:24 2015 (r281288) +++ stable/10/sys/boot/i386/gptboot/Makefile Thu Apr 9 06:38:32 2015 (r281289) @@ -55,7 +55,7 @@ gptboot: gptldr.bin gptboot.bin ${BTXKER CLEANFILES+= gptldr.bin gptldr.out gptldr.o gptldr.bin: gptldr.out - objcopy -S -O binary gptldr.out ${.TARGET} + ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o @@ -64,7 +64,7 @@ CLEANFILES+= gptboot.bin gptboot.out gpt cons.o util.o gptboot.bin: gptboot.out - objcopy -S -O binary gptboot.out ${.TARGET} + ${OBJCOPY} -S -O binary gptboot.out ${.TARGET} gptboot.out: ${BTXCRT} gptboot.o sio.o gpt.o crc32.o drv.o cons.o util.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} Modified: stable/10/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/gptzfsboot/Makefile Thu Apr 9 04:56:24 2015 (r281288) +++ stable/10/sys/boot/i386/gptzfsboot/Makefile Thu Apr 9 06:38:32 2015 (r281289) @@ -53,7 +53,7 @@ gptzfsboot: gptldr.bin gptzfsboot.bin ${ CLEANFILES+= gptldr.bin gptldr.out gptldr.o gptldr.bin: gptldr.out - objcopy -S -O binary gptldr.out ${.TARGET} + ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o @@ -62,7 +62,7 @@ CLEANFILES+= gptzfsboot.bin gptzfsboot.o drv.o gpt.o util.o gptzfsboot.bin: gptzfsboot.out - objcopy -S -O binary gptzfsboot.out ${.TARGET} + ${OBJCOPY} -S -O binary gptzfsboot.out ${.TARGET} gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o util.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} Modified: stable/10/sys/boot/i386/zfsboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/zfsboot/Makefile Thu Apr 9 04:56:24 2015 (r281288) +++ stable/10/sys/boot/i386/zfsboot/Makefile Thu Apr 9 06:38:32 2015 (r281289) @@ -49,7 +49,7 @@ zfsboot: zfsboot1 zfsboot2 CLEANFILES+= zfsboot1 zfsldr.out zfsldr.o zfsboot1: zfsldr.out - objcopy -S -O binary zfsldr.out ${.TARGET} + ${OBJCOPY} -S -O binary zfsldr.out ${.TARGET} zfsldr.out: zfsldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} zfsldr.o @@ -75,7 +75,7 @@ zfsboot.ldr: cp /dev/null ${.TARGET} zfsboot.bin: zfsboot.out - objcopy -S -O binary zfsboot.out ${.TARGET} + ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o util.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} Modified: stable/10/sys/boot/pc98/boot0.5/Makefile ============================================================================== --- stable/10/sys/boot/pc98/boot0.5/Makefile Thu Apr 9 04:56:24 2015 (r281288) +++ stable/10/sys/boot/pc98/boot0.5/Makefile Thu Apr 9 06:38:32 2015 (r281289) @@ -21,6 +21,6 @@ ${BOOT}: ${BOOT}.bin cat ${BOOT}.bin /dev/zero | dd of=${BOOT} bs=1 count=7168 ${BOOT}.bin: ${BOOT}.out - objcopy -S -O binary ${BOOT}.out ${.TARGET} + ${OBJCOPY} -S -O binary ${BOOT}.out ${.TARGET} .include Modified: stable/10/sys/boot/pc98/boot0/Makefile ============================================================================== --- stable/10/sys/boot/pc98/boot0/Makefile Thu Apr 9 04:56:24 2015 (r281288) +++ stable/10/sys/boot/pc98/boot0/Makefile Thu Apr 9 06:38:32 2015 (r281289) @@ -16,6 +16,6 @@ BOOT_BOOT0_ORG?= 0x0000 LDFLAGS=-e start -Ttext ${BOOT_BOOT0_ORG} -Wl,-N ${BOOT}: ${BOOT}.out - objcopy -S -O binary ${BOOT}.out ${.TARGET} + ${OBJCOPY} -S -O binary ${BOOT}.out ${.TARGET} .include Modified: stable/10/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/10/sys/boot/pc98/boot2/Makefile Thu Apr 9 04:56:24 2015 (r281288) +++ stable/10/sys/boot/pc98/boot2/Makefile Thu Apr 9 06:38:32 2015 (r281289) @@ -66,7 +66,7 @@ boot: boot1 boot2 CLEANFILES+= boot1 boot1.out boot1.o boot1: boot1.out - objcopy -S -O binary boot1.out ${.TARGET} + ${OBJCOPY} -S -O binary boot1.out ${.TARGET} boot1.out: boot1.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o @@ -87,7 +87,7 @@ boot2.ldr: dd if=/dev/zero of=${.TARGET} bs=276 count=1 boot2.bin: boot2.out - objcopy -S -O binary boot2.out ${.TARGET} + ${OBJCOPY} -S -O binary boot2.out ${.TARGET} boot2.out: ${BTXCRT} boot2.o sio.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 07:55:42 2015 Return-Path: Delivered-To: svn-src-stable-10@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 10FF1167; Thu, 9 Apr 2015 07:55:42 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 B88A18A8; Thu, 9 Apr 2015 07:55:41 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yg7JK-000Am4-BF; Thu, 09 Apr 2015 10:55:38 +0300 Date: Thu, 9 Apr 2015 10:55:38 +0300 From: Slawa Olhovchenkov To: Dimitry Andric Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Message-ID: <20150409075538.GG8220@zxy.spb.ru> References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> 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) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 07:55:42 -0000 On Thu, Apr 09, 2015 at 08:24:19AM +0200, Dimitry Andric wrote: > On 09 Apr 2015, at 01:21, Slawa Olhovchenkov wrote: > > > > On Sat, Apr 04, 2015 at 10:17:53AM +0000, Dimitry Andric wrote: > > > >> Author: dim > >> Date: Sat Apr 4 10:17:51 2015 > >> New Revision: 281075 > >> URL: https://svnweb.freebsd.org/changeset/base/281075 > >> > >> Log: > >> MFC r272444 (by jkim): > >> > >> Merge ACPICA 20140926. > >> > >> MFC r278970 (by jkim): > >> > >> Merge ACPICA 20141107 and 20150204. > >> > >> Approved by: jkim > >> Relnotes: yes > >> > > > > Some time ago `acpidump -dt` was broken for me: > > > > # acpidump -dt > > /* > > RSD PTR: OEM=ALASKA, ACPI_Rev=2.0x (2) > > XSDT=0x7f1e6080, length=36, cksum=95 > > */ > > /* > > XSDT: Length=132, Revision=1, Checksum=106, > > OEMID=ALASKA, OEM Table ID=A M I, OEM Revision=0x1072009, > > Creator ID=AMI, Creator Revision=0x10013 > > Assertion failed: (addr != 0), function acpi_print_rsdt, file /usr/src/usr.sbin/acpi/acpidump/acpi.c, line 1097. > > Entries={ 0x7f1efe90, 0x7f1eff88, 0x7f1f0098, 0x7f1f00d8, 0x7f1f0448, 0x7f1f0478, 0x7f1f04b0, 0x7f1f0570, 0x7f1f05b0, 0x7f2606b8, 0x7f260708, Abort (core dumped) > > Hi Slawa, > > Is there a PR for this? And a core dump or (preferably) a reproduction > scenario? Currently no PR. This is always on may Supermicro X9SRL-F. `acpidump -d` work `acpidump -t` don't work > From a quick look, it seems that your RSDT contains an entry with an > address size which is neither 4 nor 8, and that leads to the assertion > failure. I am unsure whether there is any upstream fix for it. I am not sure how long acpidump -t don't work. From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 10:05:59 2015 Return-Path: Delivered-To: svn-src-stable-10@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 A40C93D6; Thu, 9 Apr 2015 10:05: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 8EC88C5C; Thu, 9 Apr 2015 10:05: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 t39A5xsv010765; Thu, 9 Apr 2015 10:05:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39A5x2X010764; Thu, 9 Apr 2015 10:05:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091005.t39A5x2X010764@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 9 Apr 2015 10:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281298 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:05:59 -0000 Author: mav Date: Thu Apr 9 10:05:58 2015 New Revision: 281298 URL: https://svnweb.freebsd.org/changeset/base/281298 Log: MFC r280685: When searching for provider by name, prefer non-withered one. Modified: stable/10/sys/geom/geom_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_subr.c ============================================================================== --- stable/10/sys/geom/geom_subr.c Thu Apr 9 10:00:26 2015 (r281297) +++ stable/10/sys/geom/geom_subr.c Thu Apr 9 10:05:58 2015 (r281298) @@ -683,21 +683,27 @@ g_provider_by_name(char const *arg) { struct g_class *cp; struct g_geom *gp; - struct g_provider *pp; + struct g_provider *pp, *wpp; if (strncmp(arg, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) arg += sizeof(_PATH_DEV) - 1; + wpp = NULL; LIST_FOREACH(cp, &g_classes, class) { LIST_FOREACH(gp, &cp->geom, geom) { LIST_FOREACH(pp, &gp->provider, provider) { - if (!strcmp(arg, pp->name)) + if (strcmp(arg, pp->name) != 0) + continue; + if ((gp->flags & G_GEOM_WITHER) == 0 && + (pp->flags & G_PF_WITHER) == 0) return (pp); + else + wpp = pp; } } } - return (NULL); + return (wpp); } void From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 10:08:12 2015 Return-Path: Delivered-To: svn-src-stable-10@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 59BD9661; Thu, 9 Apr 2015 10:08: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 44E57C85; Thu, 9 Apr 2015 10:08: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 t39A8CLU011299; Thu, 9 Apr 2015 10:08:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39A8C1J011298; Thu, 9 Apr 2015 10:08:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091008.t39A8C1J011298@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 9 Apr 2015 10:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281301 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:08:12 -0000 Author: mav Date: Thu Apr 9 10:08:11 2015 New Revision: 281301 URL: https://svnweb.freebsd.org/changeset/base/281301 Log: MFC r280686: Report withered providers as such alike to GEOMs. Modified: stable/10/sys/geom/geom_dump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_dump.c ============================================================================== --- stable/10/sys/geom/geom_dump.c Thu Apr 9 10:08:10 2015 (r281300) +++ stable/10/sys/geom/geom_dump.c Thu Apr 9 10:08:11 2015 (r281301) @@ -215,7 +215,9 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t %u\n", pp->sectorsize); sbuf_printf(sb, "\t %u\n", pp->stripesize); sbuf_printf(sb, "\t %u\n", pp->stripeoffset); - if (pp->geom->flags & G_GEOM_WITHER) + if (pp->flags & G_PF_WITHER) + sbuf_printf(sb, "\t \n"); + else if (pp->geom->flags & G_GEOM_WITHER) ; else if (pp->geom->dumpconf != NULL) { sbuf_printf(sb, "\t \n"); From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 10:10:07 2015 Return-Path: Delivered-To: svn-src-stable-10@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 90DD8B92; Thu, 9 Apr 2015 10:10: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 7ACBECAB; Thu, 9 Apr 2015 10:10: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 t39AA7oE011763; Thu, 9 Apr 2015 10:10:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39AA6UO011758; Thu, 9 Apr 2015 10:10:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091010.t39AA6UO011758@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 9 Apr 2015 10:10:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281303 - in stable/10: lib/libgeom sbin/geom/class/part sys/geom/part X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:10:07 -0000 Author: mav Date: Thu Apr 9 10:10:05 2015 New Revision: 281303 URL: https://svnweb.freebsd.org/changeset/base/281303 Log: MFC r280687: Make GEOM_PART work in presence of previous withered self. Modified: stable/10/lib/libgeom/geom_xml2tree.c stable/10/sbin/geom/class/part/geom_part.c stable/10/sys/geom/part/g_part.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libgeom/geom_xml2tree.c ============================================================================== --- stable/10/lib/libgeom/geom_xml2tree.c Thu Apr 9 10:08:49 2015 (r281302) +++ stable/10/lib/libgeom/geom_xml2tree.c Thu Apr 9 10:10:05 2015 (r281303) @@ -186,6 +186,7 @@ static void EndElement(void *userData, const char *name) { struct mystate *mt; + struct gconf *c; struct gconfig *gc; char *p; @@ -259,7 +260,14 @@ EndElement(void *userData, const char *n return; } - if (mt->config != NULL) { + if (mt->config != NULL || (!strcmp(name, "wither") && + (mt->provider != NULL || mt->geom != NULL))) { + if (mt->config != NULL) + c = mt->config; + else if (mt->provider != NULL) + c = &mt->provider->lg_config; + else + c = &mt->geom->lg_config; gc = calloc(1, sizeof *gc); if (gc == NULL) { mt->error = errno; @@ -270,14 +278,15 @@ EndElement(void *userData, const char *n } gc->lg_name = strdup(name); if (gc->lg_name == NULL) { + free(gc); mt->error = errno; XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; } - gc->lg_val = p; - LIST_INSERT_HEAD(mt->config, gc, lg_config); + gc->lg_val = p ? p : strdup("1"); + LIST_INSERT_HEAD(c, gc, lg_config); return; } Modified: stable/10/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/10/sbin/geom/class/part/geom_part.c Thu Apr 9 10:08:49 2015 (r281302) +++ stable/10/sbin/geom/class/part/geom_part.c Thu Apr 9 10:10:05 2015 (r281303) @@ -207,15 +207,20 @@ find_class(struct gmesh *mesh, const cha static struct ggeom * find_geom(struct gclass *classp, const char *name) { - struct ggeom *gp; + struct ggeom *gp, *wgp; if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) name += sizeof(_PATH_DEV) - 1; + wgp = NULL; LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { - if (strcmp(gp->lg_name, name) == 0) + if (strcmp(gp->lg_name, name) != 0) + continue; + if (find_geomcfg(gp, "wither") == NULL) return (gp); + else + wgp = gp; } - return (NULL); + return (wgp); } static const char * @@ -598,6 +603,8 @@ gpart_show_geom(struct ggeom *gp, const off_t length, secsz; int idx, wblocks, wname, wmax; + if (find_geomcfg(gp, "wither")) + return; scheme = find_geomcfg(gp, "scheme"); if (scheme == NULL) errx(EXIT_FAILURE, "Scheme not found for geom %s", gp->lg_name); Modified: stable/10/sys/geom/part/g_part.c ============================================================================== --- stable/10/sys/geom/part/g_part.c Thu Apr 9 10:08:49 2015 (r281302) +++ stable/10/sys/geom/part/g_part.c Thu Apr 9 10:10:05 2015 (r281303) @@ -451,7 +451,8 @@ g_part_find_geom(const char *name) { struct g_geom *gp; LIST_FOREACH(gp, &g_part_class.geom, geom) { - if (!strcmp(name, gp->name)) + if ((gp->flags & G_GEOM_WITHER) == 0 && + strcmp(name, gp->name) == 0) break; } return (gp); @@ -473,10 +474,6 @@ g_part_parm_geom(struct gctl_req *req, c gctl_error(req, "%d %s '%s'", EINVAL, name, gname); return (EINVAL); } - if ((gp->flags & G_GEOM_WITHER) != 0) { - gctl_error(req, "%d %s", ENXIO, gname); - return (ENXIO); - } *v = gp; return (0); } From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 10:11:48 2015 Return-Path: Delivered-To: svn-src-stable-10@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 29D1CE63; Thu, 9 Apr 2015 10: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 149C8D66; Thu, 9 Apr 2015 10: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 t39ABl0F015078; Thu, 9 Apr 2015 10:11:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39ABlP4015077; Thu, 9 Apr 2015 10:11:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091011.t39ABlP4015077@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 9 Apr 2015 10:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281305 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:11:48 -0000 Author: mav Date: Thu Apr 9 10:11:47 2015 New Revision: 281305 URL: https://svnweb.freebsd.org/changeset/base/281305 Log: MFC r280702: Make swapper release orphaned (lost) GEOM provider. Swap device is still reported as enabled, and system still may crash later if some swapped-out kernel pages were lost with the device, but at least GEOM and CAM can now release the lost disk, allowing it to be reconnected. Modified: stable/10/sys/vm/swap_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/swap_pager.c ============================================================================== --- stable/10/sys/vm/swap_pager.c Thu Apr 9 10:10:38 2015 (r281304) +++ stable/10/sys/vm/swap_pager.c Thu Apr 9 10:11:47 2015 (r281305) @@ -2527,18 +2527,42 @@ DECLARE_GEOM_CLASS(g_swap_class, g_class static void +swapgeom_close_ev(void *arg, int flags) +{ + struct g_consumer *cp; + + cp = arg; + g_access(cp, -1, -1, 0); + g_detach(cp); + g_destroy_consumer(cp); +} + +static void swapgeom_done(struct bio *bp2) { + struct swdevt *sp; struct buf *bp; + struct g_consumer *cp; + int destroy; bp = bp2->bio_caller2; + cp = bp2->bio_from; bp->b_ioflags = bp2->bio_flags; if (bp2->bio_error) bp->b_ioflags |= BIO_ERROR; bp->b_resid = bp->b_bcount - bp2->bio_completed; bp->b_error = bp2->bio_error; bufdone(bp); + mtx_lock(&sw_dev_mtx); + destroy = ((--cp->index) == 0 && cp->private); + if (destroy) { + sp = bp2->bio_caller1; + sp->sw_id = NULL; + } + mtx_unlock(&sw_dev_mtx); g_destroy_bio(bp2); + if (destroy) + g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } static void @@ -2547,13 +2571,17 @@ swapgeom_strategy(struct buf *bp, struct struct bio *bio; struct g_consumer *cp; + mtx_lock(&sw_dev_mtx); cp = sp->sw_id; if (cp == NULL) { + mtx_unlock(&sw_dev_mtx); bp->b_error = ENXIO; bp->b_ioflags |= BIO_ERROR; bufdone(bp); return; } + cp->index++; + mtx_unlock(&sw_dev_mtx); if (bp->b_iocmd == BIO_WRITE) bio = g_new_bio(); else @@ -2565,6 +2593,7 @@ swapgeom_strategy(struct buf *bp, struct return; } + bio->bio_caller1 = sp; bio->bio_caller2 = bp; bio->bio_cmd = bp->b_iocmd; bio->bio_offset = (bp->b_blkno - sp->sw_first) * PAGE_SIZE; @@ -2588,31 +2617,36 @@ static void swapgeom_orphan(struct g_consumer *cp) { struct swdevt *sp; + int destroy; mtx_lock(&sw_dev_mtx); - TAILQ_FOREACH(sp, &swtailq, sw_list) - if (sp->sw_id == cp) + TAILQ_FOREACH(sp, &swtailq, sw_list) { + if (sp->sw_id == cp) { sp->sw_flags |= SW_CLOSING; + break; + } + } + cp->private = (void *)(uintptr_t)1; + destroy = ((sp != NULL) && (cp->index == 0)); + if (destroy) + sp->sw_id = NULL; mtx_unlock(&sw_dev_mtx); -} - -static void -swapgeom_close_ev(void *arg, int flags) -{ - struct g_consumer *cp; - - cp = arg; - g_access(cp, -1, -1, 0); - g_detach(cp); - g_destroy_consumer(cp); + if (destroy) + swapgeom_close_ev(cp, 0); } static void swapgeom_close(struct thread *td, struct swdevt *sw) { + struct g_consumer *cp; + mtx_lock(&sw_dev_mtx); + cp = sw->sw_id; + sw->sw_id = NULL; + mtx_unlock(&sw_dev_mtx); /* XXX: direct call when Giant untangled */ - g_waitfor_event(swapgeom_close_ev, sw->sw_id, M_WAITOK, NULL); + if (cp != NULL) + g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } @@ -2653,6 +2687,8 @@ swapongeom_ev(void *arg, int flags) if (gp == NULL) gp = g_new_geomf(&g_swap_class, "swap"); cp = g_new_consumer(gp); + cp->index = 0; /* Number of active I/Os. */ + cp->private = NULL; /* Orphanization flag */ g_attach(cp, pp); /* * XXX: Everytime you think you can improve the margin for From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 17:56:27 2015 Return-Path: Delivered-To: svn-src-stable-10@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 3346B789; Thu, 9 Apr 2015 17:56: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 0473BDEA; Thu, 9 Apr 2015 17:56: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 t39HuQok037623; Thu, 9 Apr 2015 17:56:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39HuQsN037622; Thu, 9 Apr 2015 17:56:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091756.t39HuQsN037622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 17:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281315 - in stable: 10/sys/dev/cxgbe/tom 9/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 17:56:27 -0000 Author: jhb Date: Thu Apr 9 17:56:25 2015 New Revision: 281315 URL: https://svnweb.freebsd.org/changeset/base/281315 Log: MFC 279892: Resize receive socket buffers that support autosizing when receiving TCP data via direct data placement. Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/cxgbe/tom/t4_ddp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_ddp.c Thu Apr 9 16:52:53 2015 (r281314) +++ stable/10/sys/dev/cxgbe/tom/t4_ddp.c Thu Apr 9 17:56:25 2015 (r281315) @@ -65,6 +65,13 @@ __FBSDID("$FreeBSD$"); #include "common/t4_tcb.h" #include "tom/t4_tom.h" +VNET_DECLARE(int, tcp_do_autorcvbuf); +#define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) +VNET_DECLARE(int, tcp_autorcvbuf_inc); +#define V_tcp_autorcvbuf_inc VNET(tcp_autorcvbuf_inc) +VNET_DECLARE(int, tcp_autorcvbuf_max); +#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) + #define PPOD_SZ(n) ((n) * sizeof(struct pagepod)) #define PPOD_SIZE (PPOD_SZ(1)) @@ -411,6 +418,21 @@ handle_ddp_data(struct toepcb *toep, __b else discourage_ddp(toep); + /* receive buffer autosize */ + if (sb->sb_flags & SB_AUTOSIZE && + V_tcp_do_autorcvbuf && + sb->sb_hiwat < V_tcp_autorcvbuf_max && + len > (sbspace(sb) / 8 * 7)) { + unsigned int hiwat = sb->sb_hiwat; + unsigned int newsize = min(hiwat + V_tcp_autorcvbuf_inc, + V_tcp_autorcvbuf_max); + + if (!sbreserve_locked(sb, newsize, so, NULL)) + sb->sb_flags &= ~SB_AUTOSIZE; + else + toep->rx_credits += newsize - hiwat; + } + KASSERT(toep->sb_cc >= sb->sb_cc, ("%s: sb %p has more data (%d) than last time (%d).", __func__, sb, sb->sb_cc, toep->sb_cc)); From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 18:28:12 2015 Return-Path: Delivered-To: svn-src-stable-10@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 50BA113E; Thu, 9 Apr 2015 18:28:12 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 0252C1A3; Thu, 9 Apr 2015 18:28:12 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgHBP-0007W8-VJ; Thu, 09 Apr 2015 21:28:07 +0300 Date: Thu, 9 Apr 2015 21:28:07 +0300 From: Slawa Olhovchenkov To: Dimitry Andric Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Message-ID: <20150409182807.GF1394@zxy.spb.ru> References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409075538.GG8220@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 18:28:12 -0000 On Thu, Apr 09, 2015 at 10:55:38AM +0300, Slawa Olhovchenkov wrote: > On Thu, Apr 09, 2015 at 08:24:19AM +0200, Dimitry Andric wrote: > > > On 09 Apr 2015, at 01:21, Slawa Olhovchenkov wrote: > > > > > > On Sat, Apr 04, 2015 at 10:17:53AM +0000, Dimitry Andric wrote: > > > > > >> Author: dim > > >> Date: Sat Apr 4 10:17:51 2015 > > >> New Revision: 281075 > > >> URL: https://svnweb.freebsd.org/changeset/base/281075 > > >> > > >> Log: > > >> MFC r272444 (by jkim): > > >> > > >> Merge ACPICA 20140926. > > >> > > >> MFC r278970 (by jkim): > > >> > > >> Merge ACPICA 20141107 and 20150204. > > >> > > >> Approved by: jkim > > >> Relnotes: yes > > >> > > > > > > Some time ago `acpidump -dt` was broken for me: > > > > > > # acpidump -dt > > > /* > > > RSD PTR: OEM=ALASKA, ACPI_Rev=2.0x (2) > > > XSDT=0x7f1e6080, length=36, cksum=95 > > > */ > > > /* > > > XSDT: Length=132, Revision=1, Checksum=106, > > > OEMID=ALASKA, OEM Table ID=A M I, OEM Revision=0x1072009, > > > Creator ID=AMI, Creator Revision=0x10013 > > > Assertion failed: (addr != 0), function acpi_print_rsdt, file /usr/src/usr.sbin/acpi/acpidump/acpi.c, line 1097. > > > Entries={ 0x7f1efe90, 0x7f1eff88, 0x7f1f0098, 0x7f1f00d8, 0x7f1f0448, 0x7f1f0478, 0x7f1f04b0, 0x7f1f0570, 0x7f1f05b0, 0x7f2606b8, 0x7f260708, Abort (core dumped) > > > > Hi Slawa, > > > > Is there a PR for this? And a core dump or (preferably) a reproduction > > scenario? > > Currently no PR. > This is always on may Supermicro X9SRL-F. FIX: X9DRH-7F > `acpidump -d` work > `acpidump -t` don't work > > > From a quick look, it seems that your RSDT contains an entry with an > > address size which is neither 4 nor 8, and that leads to the assertion > > failure. I am unsure whether there is any upstream fix for it. > > I am not sure how long acpidump -t don't work. > _______________________________________________ > 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-stable-10@FreeBSD.ORG Thu Apr 9 18:45:04 2015 Return-Path: Delivered-To: svn-src-stable-10@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 A83B4519; Thu, 9 Apr 2015 18:45: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 92A6B3DE; Thu, 9 Apr 2015 18:45: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 t39Ij4jO061044; Thu, 9 Apr 2015 18:45:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Ij44S061043; Thu, 9 Apr 2015 18:45:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091845.t39Ij44S061043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 18:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281317 - in stable: 10/lib/libstand 9/lib/libstand X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 18:45:04 -0000 Author: jhb Date: Thu Apr 9 18:45:03 2015 New Revision: 281317 URL: https://svnweb.freebsd.org/changeset/base/281317 Log: MFC 279931: Spin the twiddle in dosfs to give visual feedback for disk I/O on FAT filesystems as is done for other filesystems in the loader. Modified: stable/10/lib/libstand/dosfs.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/libstand/dosfs.c Directory Properties: stable/9/lib/libstand/ (props changed) Modified: stable/10/lib/libstand/dosfs.c ============================================================================== --- stable/10/lib/libstand/dosfs.c Thu Apr 9 18:03:27 2015 (r281316) +++ stable/10/lib/libstand/dosfs.c Thu Apr 9 18:45:03 2015 (r281317) @@ -767,7 +767,8 @@ static int ioget(struct open_file *fd, u_int lsec, void *buf, u_int nsec) { int err; - + + twiddle(1); if ((err = (fd->f_dev->dv_strategy)(fd->f_devdata, F_READ, lsec, secbyt(nsec), buf, NULL))) return(err); From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 18:50:42 2015 Return-Path: Delivered-To: svn-src-stable-10@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 B3432848; Thu, 9 Apr 2015 18:50: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 9D1356A6; Thu, 9 Apr 2015 18:50: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 t39IogUt062399; Thu, 9 Apr 2015 18:50:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Iogre062397; Thu, 9 Apr 2015 18:50:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091850.t39Iogre062397@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 18:50:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281318 - in stable: 10/etc/defaults 10/share/man/man5 9/etc/defaults 9/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 18:50:42 -0000 Author: jhb Date: Thu Apr 9 18:50:41 2015 New Revision: 281318 URL: https://svnweb.freebsd.org/changeset/base/281318 Log: MFC 279952: - Align comment for df flags variable in periodic.conf. - Note default value of df flags variable in periodoc.conf(5). Modified: stable/10/etc/defaults/periodic.conf stable/10/share/man/man5/periodic.conf.5 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/etc/defaults/periodic.conf stable/9/share/man/man5/periodic.conf.5 Directory Properties: stable/9/etc/ (props changed) stable/9/share/man/man5/ (props changed) Modified: stable/10/etc/defaults/periodic.conf ============================================================================== --- stable/10/etc/defaults/periodic.conf Thu Apr 9 18:45:03 2015 (r281317) +++ stable/10/etc/defaults/periodic.conf Thu Apr 9 18:50:41 2015 (r281318) @@ -93,7 +93,7 @@ daily_news_expire_enable="YES" # Run # 400.status-disks daily_status_disks_enable="YES" # Check disk status -daily_status_disks_df_flags="-l -h" # df(1) flags for check +daily_status_disks_df_flags="-l -h" # df(1) flags for check # 401.status-graid daily_status_graid_enable="NO" # Check graid(8) Modified: stable/10/share/man/man5/periodic.conf.5 ============================================================================== --- stable/10/share/man/man5/periodic.conf.5 Thu Apr 9 18:45:03 2015 (r281317) +++ stable/10/share/man/man5/periodic.conf.5 Thu Apr 9 18:50:41 2015 (r281318) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2015 +.Dd March 13, 2015 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -335,6 +335,8 @@ utility when .Va daily_status_disks_enable is set to .Dq Li YES . +The default is +.Fl l Fl h . .It Va daily_status_zfs_enable .Pq Vt bool Set to From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 19:03:12 2015 Return-Path: Delivered-To: svn-src-stable-10@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 CB904EB1; Thu, 9 Apr 2015 19:03: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 B5C9784D; Thu, 9 Apr 2015 19:03: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 t39J3CuY070746; Thu, 9 Apr 2015 19:03:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39J3CcS070744; Thu, 9 Apr 2015 19:03:12 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091903.t39J3CcS070744@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 19:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281319 - stable/10/sys/boot/amd64/efi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:03:13 -0000 Author: jhb Date: Thu Apr 9 19:03:11 2015 New Revision: 281319 URL: https://svnweb.freebsd.org/changeset/base/281319 Log: MFC 279929: Allow the EFI loader to work with large kernels and/or modules (for example, a large mfsroot). Note that for EFI the kernel and modules (as well as other metadata files such as splash screens or memory disk images) are loaded into a statically-sized staging area. When the EFI loader exits it copies this staging area down to the location the kernel expects to run at. - Add bounds checking to the copy routines to fail attempts to access memory outside of the staging area. Previously loading a combined kernel + modules larger than the staging size (32MB) would overflow the staging area trashing whatever memory was afterwards. Under Intel's OVMF firmware for qemu this resulted in fatal faults in the firmware itself. Now the attempt will fail with ENOMEM. - Allow the staging area size to be configured at compile time via an EFI_STAGING_SIZE variable in src.conf or on the command line. It accepts the size of the staging area in MB. The default size remains 32MB. Modified: stable/10/sys/boot/amd64/efi/Makefile stable/10/sys/boot/amd64/efi/copy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/amd64/efi/Makefile ============================================================================== --- stable/10/sys/boot/amd64/efi/Makefile Thu Apr 9 18:50:41 2015 (r281318) +++ stable/10/sys/boot/amd64/efi/Makefile Thu Apr 9 19:03:11 2015 (r281319) @@ -44,6 +44,10 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a # Include bcache code. HAVE_BCACHE= yes +.if defined(EFI_STAGING_SIZE) +CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE} +.endif + # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" Modified: stable/10/sys/boot/amd64/efi/copy.c ============================================================================== --- stable/10/sys/boot/amd64/efi/copy.c Thu Apr 9 18:50:41 2015 (r281318) +++ stable/10/sys/boot/amd64/efi/copy.c Thu Apr 9 19:03:11 2015 (r281319) @@ -37,9 +37,13 @@ __FBSDID("$FreeBSD$"); #include #include -#define STAGE_PAGES 8192 /* 32MB */ +#ifndef EFI_STAGING_SIZE +#define EFI_STAGING_SIZE 32 +#endif -EFI_PHYSICAL_ADDRESS staging; +#define STAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096) + +EFI_PHYSICAL_ADDRESS staging, staging_end; int stage_offset_set = 0; ssize_t stage_offset; @@ -55,6 +59,7 @@ x86_efi_copy_init(void) (unsigned long)(status & EFI_ERROR_MASK)); return (status); } + staging_end = staging + STAGE_PAGES * 4096; return (0); } @@ -68,6 +73,11 @@ x86_efi_copyin(const void *src, vm_offse stage_offset_set = 1; } + /* XXX: Callers do not check for failure. */ + if (dest + stage_offset + len > staging_end) { + errno = ENOMEM; + return (-1); + } bcopy(src, (void *)(dest + stage_offset), len); return (len); } @@ -76,6 +86,11 @@ ssize_t x86_efi_copyout(const vm_offset_t src, void *dest, const size_t len) { + /* XXX: Callers do not check for failure. */ + if (src + stage_offset + len > staging_end) { + errno = ENOMEM; + return (-1); + } bcopy((void *)(src + stage_offset), dest, len); return (len); } @@ -85,6 +100,10 @@ ssize_t x86_efi_readin(const int fd, vm_offset_t dest, const size_t len) { + if (dest + stage_offset + len > staging_end) { + errno = ENOMEM; + return (-1); + } return (read(fd, (void *)(dest + stage_offset), len)); } From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 19:25:24 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D22872A; Thu, 9 Apr 2015 19:25:24 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 749244768; Thu, 9 Apr 2015 19:25:23 +0000 (UTC) Message-ID: <5526D222.8030100@FreeBSD.org> Date: Thu, 09 Apr 2015 15:25:22 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Slawa Olhovchenkov , Dimitry Andric Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> In-Reply-To: <20150409182807.GF1394@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:25:24 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 04/09/2015 14:28, Slawa Olhovchenkov wrote: > On Thu, Apr 09, 2015 at 10:55:38AM +0300, Slawa Olhovchenkov > wrote: >> On Thu, Apr 09, 2015 at 08:24:19AM +0200, Dimitry Andric wrote: >>> On 09 Apr 2015, at 01:21, Slawa Olhovchenkov >>> wrote: >>>> On Sat, Apr 04, 2015 at 10:17:53AM +0000, Dimitry Andric >>>> wrote: >>>> >>>>> Author: dim Date: Sat Apr 4 10:17:51 2015 New Revision: >>>>> 281075 URL: >>>>> https://svnweb.freebsd.org/changeset/base/281075 >>>>> >>>>> Log: MFC r272444 (by jkim): >>>>> >>>>> Merge ACPICA 20140926. >>>>> >>>>> MFC r278970 (by jkim): >>>>> >>>>> Merge ACPICA 20141107 and 20150204. >>>>> >>>>> Approved by: jkim Relnotes: yes >>>>> >>>> >>>> Some time ago `acpidump -dt` was broken for me: >>>> >>>> # acpidump -dt /* RSD PTR: OEM=ALASKA, ACPI_Rev=2.0x (2) >>>> XSDT=0x7f1e6080, length=36, cksum=95 */ /* XSDT: Length=132, >>>> Revision=1, Checksum=106, OEMID=ALASKA, OEM Table ID=A M I, >>>> OEM Revision=0x1072009, Creator ID=AMI, Creator >>>> Revision=0x10013 Assertion failed: (addr != 0), function >>>> acpi_print_rsdt, file /usr/src/usr.sbin/acpi/acpidump/acpi.c, >>>> line 1097. Entries={ 0x7f1efe90, 0x7f1eff88, 0x7f1f0098, >>>> 0x7f1f00d8, 0x7f1f0448, 0x7f1f0478, 0x7f1f04b0, 0x7f1f0570, >>>> 0x7f1f05b0, 0x7f2606b8, 0x7f260708, Abort (core dumped) >>> >>> Hi Slawa, >>> >>> Is there a PR for this? And a core dump or (preferably) a >>> reproduction scenario? >> >> Currently no PR. This is always on may Supermicro X9SRL-F. > > FIX: X9DRH-7F > >> `acpidump -d` work `acpidump -t` don't work >> >>> From a quick look, it seems that your RSDT contains an entry >>> with an address size which is neither 4 nor 8, and that leads >>> to the assertion failure. I am unsure whether there is any >>> upstream fix for it. >> >> I am not sure how long acpidump -t don't work. addr_size must be 4 or 8 here. Otherwise, something is corrupting memory. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVJtIdAAoJEHyflib82/FGotYH/RI2GSv02RLiZWfHM2KN5JUk 9Z/lzQb+nUtv88cGyfbEsuFDWgn1dHK8QYPIT7tH7owjvqZUIMYwHhIzPctwWiz+ YUHbiK+0WtV+7n1a+F+bcheeVnr4gL8F5gQZGlJGsNqfqWiM03TZ5w7k5j2PTVjM vyguEvxnSDa1c4TCbwtckYYARBRM3xyEPuSgcWLM/fRqr7NgCvA0JU5L7lqULCOe xJvJpTxCtGO0L75kMDbe0qSt95H6KH9cdCMc14TrXPWAjIdUCX76xKbFCAowvx3j xs9CFc+KDqf8n2zPHMncgsw7gD/FPqijHbHHxT9+iP52SCppJcO8sF0T8z8mD8o= =aF7o -----END PGP SIGNATURE----- From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 19:32:09 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1576CF9; Thu, 9 Apr 2015 19:32:09 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 2F501303D; Thu, 9 Apr 2015 19:32:09 +0000 (UTC) Message-ID: <5526D3B8.3060900@FreeBSD.org> Date: Thu, 09 Apr 2015 15:32:08 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Slawa Olhovchenkov , Dimitry Andric Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> <5526D222.8030100@FreeBSD.org> In-Reply-To: <5526D222.8030100@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:32:09 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 04/09/2015 15:25, Jung-uk Kim wrote: > On 04/09/2015 14:28, Slawa Olhovchenkov wrote: >> On Thu, Apr 09, 2015 at 10:55:38AM +0300, Slawa Olhovchenkov >> wrote: >>> On Thu, Apr 09, 2015 at 08:24:19AM +0200, Dimitry Andric >>> wrote: >>>> On 09 Apr 2015, at 01:21, Slawa Olhovchenkov >>>> wrote: >>>>> On Sat, Apr 04, 2015 at 10:17:53AM +0000, Dimitry Andric >>>>> wrote: >>>>> >>>>>> Author: dim Date: Sat Apr 4 10:17:51 2015 New Revision: >>>>>> 281075 URL: >>>>>> https://svnweb.freebsd.org/changeset/base/281075 >>>>>> >>>>>> Log: MFC r272444 (by jkim): >>>>>> >>>>>> Merge ACPICA 20140926. >>>>>> >>>>>> MFC r278970 (by jkim): >>>>>> >>>>>> Merge ACPICA 20141107 and 20150204. >>>>>> >>>>>> Approved by: jkim Relnotes: yes >>>>>> >>>>> >>>>> Some time ago `acpidump -dt` was broken for me: >>>>> >>>>> # acpidump -dt /* RSD PTR: OEM=ALASKA, ACPI_Rev=2.0x (2) >>>>> XSDT=0x7f1e6080, length=36, cksum=95 */ /* XSDT: >>>>> Length=132, Revision=1, Checksum=106, OEMID=ALASKA, OEM >>>>> Table ID=A M I, OEM Revision=0x1072009, Creator ID=AMI, >>>>> Creator Revision=0x10013 Assertion failed: (addr != 0), >>>>> function acpi_print_rsdt, file >>>>> /usr/src/usr.sbin/acpi/acpidump/acpi.c, line 1097. >>>>> Entries={ 0x7f1efe90, 0x7f1eff88, 0x7f1f0098, 0x7f1f00d8, >>>>> 0x7f1f0448, 0x7f1f0478, 0x7f1f04b0, 0x7f1f0570, 0x7f1f05b0, >>>>> 0x7f2606b8, 0x7f260708, Abort (core dumped) >>>> >>>> Hi Slawa, >>>> >>>> Is there a PR for this? And a core dump or (preferably) a >>>> reproduction scenario? >>> >>> Currently no PR. This is always on may Supermicro X9SRL-F. > >> FIX: X9DRH-7F > >>> `acpidump -d` work `acpidump -t` don't work >>> >>>> From a quick look, it seems that your RSDT contains an entry >>>> with an address size which is neither 4 nor 8, and that >>>> leads to the assertion failure. I am unsure whether there is >>>> any upstream fix for it. >>> >>> I am not sure how long acpidump -t don't work. > > addr_size must be 4 or 8 here. Otherwise, something is corrupting > memory. Sorry, I misread your message. Please install sysutils/acpica-tools from ports, then do /usr/local/bin/acpidump and send me the output. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVJtOyAAoJEHyflib82/FGfhQIAJ+kjYUGkq2psx6+oCMijM8S 5awuUvEPlMbWUYF4StKIO4MToxiyQMruCm+uPudKRmxOU0eJDSzUyr55MGlMplN1 cfTIlqjTFT6I2LlsjYnCDVF96H1oXiXG3T48/SgdvKAck7wwpDkjoXoS2HjmpA1/ jlJtFwNd/4HI4qGSMOqevkKYcjmrkfWo1PR40BEeO8AD0c0JDS07fhvnuKINufgv NtIJC5CIaLly2pND1z9JSDApF4umavr9LpTyFHxME0U2gU+jLYudC2z1uG7+dkv6 DvM7a/SQzYmFHBP2gBPi24oq2XfiWHxwYnGk6NufLWFTIUUISSvVUFzL6o5s7JA= =ySMD -----END PGP SIGNATURE----- From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 19:36:08 2015 Return-Path: Delivered-To: svn-src-stable-10@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 8AC1DDD; Thu, 9 Apr 2015 19:36: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 74637C5A; Thu, 9 Apr 2015 19:36: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 t39Ja88f085939; Thu, 9 Apr 2015 19:36:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Ja74I085931; Thu, 9 Apr 2015 19:36:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091936.t39Ja74I085931@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 19:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281321 - in stable/10: lib/libstand sys/boot/amd64 sys/boot/efi/libefi sys/boot/ficl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:36:08 -0000 Author: jhb Date: Thu Apr 9 19:36:06 2015 New Revision: 281321 URL: https://svnweb.freebsd.org/changeset/base/281321 Log: MFC 279949: The System V ABI for amd64 allows functions to use space in a 128 byte redzone below the stack pointer for scratch space and requires interrupt and signal frames to avoid overwriting it. However, EFI uses the Windows ABI which does not support this. As a result, interrupt handlers in EFI push their interrupt frames directly on top of the stack pointer. If the compiler used the red zone in a function in the EFI loader, then a device interrupt that occurred while that function was running could trash its local variables. In practice this happens fairly reliable when using gzipfs as an interrupt during decompression can trash the local variables in the inflate_table() function resulting in corrupted output or hangs. Fix this by disabling the redzone for amd64 EFI binaries. This requires building not only the loader but any libraries used by the loader without redzone support. Thanks to Jilles for pointing me at the redzone once I found the stack corruption. Modified: stable/10/lib/libstand/Makefile stable/10/sys/boot/amd64/Makefile.inc stable/10/sys/boot/efi/libefi/Makefile stable/10/sys/boot/ficl/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/Makefile ============================================================================== --- stable/10/lib/libstand/Makefile Thu Apr 9 19:07:01 2015 (r281320) +++ stable/10/lib/libstand/Makefile Thu Apr 9 19:36:06 2015 (r281321) @@ -27,7 +27,7 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -m CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif .if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -fPIC +CFLAGS+= -fPIC -mno-red-zone .endif .if ${MACHINE} == "pc98" CFLAGS+= -Os Modified: stable/10/sys/boot/amd64/Makefile.inc ============================================================================== --- stable/10/sys/boot/amd64/Makefile.inc Thu Apr 9 19:07:01 2015 (r281320) +++ stable/10/sys/boot/amd64/Makefile.inc Thu Apr 9 19:36:06 2015 (r281321) @@ -5,7 +5,7 @@ BINDIR?= /boot # See conf/kern.mk for the correct set of these -CFLAGS+= -ffreestanding +CFLAGS+= -ffreestanding -mno-red-zone CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float LDFLAGS+= -nostdlib Modified: stable/10/sys/boot/efi/libefi/Makefile ============================================================================== --- stable/10/sys/boot/efi/libefi/Makefile Thu Apr 9 19:07:01 2015 (r281320) +++ stable/10/sys/boot/efi/libefi/Makefile Thu Apr 9 19:36:06 2015 (r281321) @@ -9,7 +9,7 @@ SRCS= delay.c efi_console.c efinet.c efi SRCS+= nullconsole.c comconsole.c .if ${MACHINE_ARCH} == "amd64" -CFLAGS+= -fPIC +CFLAGS+= -fPIC -mno-red-zone .endif CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} Modified: stable/10/sys/boot/ficl/Makefile ============================================================================== --- stable/10/sys/boot/ficl/Makefile Thu Apr 9 19:07:01 2015 (r281320) +++ stable/10/sys/boot/ficl/Makefile Thu Apr 9 19:36:06 2015 (r281321) @@ -19,6 +19,9 @@ CFLAGS+= -ffreestanding CFLAGS+= -march=i386 CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif +.if ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -mno-red-zone +.endif .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 19:51:57 2015 Return-Path: Delivered-To: svn-src-stable-10@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 EF07CA1E; Thu, 9 Apr 2015 19:51: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 D92F4ECB; Thu, 9 Apr 2015 19:51: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 t39Jpunw094940; Thu, 9 Apr 2015 19:51:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Jpuui094938; Thu, 9 Apr 2015 19:51:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091951.t39Jpuui094938@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 19:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281323 - in stable/10/sys/boot: amd64/efi efi/libefi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:51:57 -0000 Author: jhb Date: Thu Apr 9 19:51:55 2015 New Revision: 281323 URL: https://svnweb.freebsd.org/changeset/base/281323 Log: MFC 279950: Enable bzipfs support in the EFI loader. - Add bzipfs to the list of supported filesystems in the EFI loader. - Increase the heap size allocated for the EFI loader from 2MB to 3MB. Modified: stable/10/sys/boot/amd64/efi/conf.c stable/10/sys/boot/efi/libefi/libefi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/amd64/efi/conf.c ============================================================================== --- stable/10/sys/boot/amd64/efi/conf.c Thu Apr 9 19:48:42 2015 (r281322) +++ stable/10/sys/boot/amd64/efi/conf.c Thu Apr 9 19:51:55 2015 (r281323) @@ -44,6 +44,7 @@ struct fs_ops *file_system[] = { &cd9660_fsops, &nfs_fsops, &gzipfs_fsops, + &bzipfs_fsops, NULL }; Modified: stable/10/sys/boot/efi/libefi/libefi.c ============================================================================== --- stable/10/sys/boot/efi/libefi/libefi.c Thu Apr 9 19:48:42 2015 (r281322) +++ stable/10/sys/boot/efi/libefi/libefi.c Thu Apr 9 19:51:55 2015 (r281323) @@ -102,7 +102,7 @@ efi_main(EFI_HANDLE image_handle, EFI_SY (void)console_control->SetMode(console_control, EfiConsoleControlScreenText); - heapsize = 2 * 1024 * 1024; + heapsize = 3 * 1024 * 1024; status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, EFI_SIZE_TO_PAGES(heapsize), &heap); if (status != EFI_SUCCESS) From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 20:56:50 2015 Return-Path: Delivered-To: svn-src-stable-10@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 1C996FDA; Thu, 9 Apr 2015 20:56:50 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 C31CC9E5; Thu, 9 Apr 2015 20:56:49 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgJV9-000Ce4-VJ; Thu, 09 Apr 2015 23:56:39 +0300 Date: Thu, 9 Apr 2015 23:56:39 +0300 From: Slawa Olhovchenkov To: Jung-uk Kim Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Message-ID: <20150409205639.GO8220@zxy.spb.ru> References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> <5526D222.8030100@FreeBSD.org> <5526D3B8.3060900@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5526D3B8.3060900@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 20:56:50 -0000 On Thu, Apr 09, 2015 at 03:32:08PM -0400, Jung-uk Kim wrote: > >>> `acpidump -d` work `acpidump -t` don't work > >>> > >>>> From a quick look, it seems that your RSDT contains an entry > >>>> with an address size which is neither 4 nor 8, and that > >>>> leads to the assertion failure. I am unsure whether there is > >>>> any upstream fix for it. > >>> > >>> I am not sure how long acpidump -t don't work. > > > > addr_size must be 4 or 8 here. Otherwise, something is corrupting > > memory. > > Sorry, I misread your message. Please install sysutils/acpica-tools > from ports, then do /usr/local/bin/acpidump and send me the output. Host crashed From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 21:06:52 2015 Return-Path: Delivered-To: svn-src-stable-10@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 E9DD68F3; Thu, 9 Apr 2015 21:06: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 D47B3B7F; Thu, 9 Apr 2015 21:06: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 t39L6quM029902; Thu, 9 Apr 2015 21:06:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39L6quP029901; Thu, 9 Apr 2015 21:06:52 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504092106.t39L6quP029901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 21:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281326 - in stable: 10/sbin/ifconfig 9/sbin/ifconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:06:53 -0000 Author: jhb Date: Thu Apr 9 21:06:51 2015 New Revision: 281326 URL: https://svnweb.freebsd.org/changeset/base/281326 Log: MFC 279951: Simplify string mangling in ifmaybeload(). - Use strlcpy() instead of strcpy(). - Use strlcat() instead of a strlcpy() with a magic number subtracted from the length. - Replace strncmp(..., strlen(foo) + 1) with strcmp(...). Modified: stable/10/sbin/ifconfig/ifconfig.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sbin/ifconfig/ifconfig.c Directory Properties: stable/9/sbin/ifconfig/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.c Thu Apr 9 21:05:48 2015 (r281325) +++ stable/10/sbin/ifconfig/ifconfig.c Thu Apr 9 21:06:51 2015 (r281326) @@ -1121,9 +1121,8 @@ ifmaybeload(const char *name) } /* turn interface and unit into module name */ - strcpy(ifkind, "if_"); - strlcpy(ifkind + MOD_PREFIX_LEN, ifname, - sizeof(ifkind) - MOD_PREFIX_LEN); + strlcpy(ifkind, "if_", sizeof(ifkind)); + strlcat(ifkind, ifname, sizeof(ifkind)); /* scan files in kernel */ mstat.version = sizeof(struct module_stat); @@ -1140,8 +1139,8 @@ ifmaybeload(const char *name) cp = mstat.name; } /* already loaded? */ - if (strncmp(ifname, cp, strlen(ifname) + 1) == 0 || - strncmp(ifkind, cp, strlen(ifkind) + 1) == 0) + if (strcmp(ifname, cp) == 0 || + strcmp(ifkind, cp) == 0) return; } } From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 21:11:23 2015 Return-Path: Delivered-To: svn-src-stable-10@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 D271FDDC; Thu, 9 Apr 2015 21:11:23 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 82137C64; Thu, 9 Apr 2015 21:11:23 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgJjN-000Cul-Em; Fri, 10 Apr 2015 00:11:21 +0300 Date: Fri, 10 Apr 2015 00:11:21 +0300 From: Slawa Olhovchenkov To: Jung-uk Kim Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Message-ID: <20150409211121.GP8220@zxy.spb.ru> References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> <5526D222.8030100@FreeBSD.org> <5526D3B8.3060900@FreeBSD.org> <20150409205639.GO8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409205639.GO8220@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:11:24 -0000 On Thu, Apr 09, 2015 at 11:56:39PM +0300, Slawa Olhovchenkov wrote: > On Thu, Apr 09, 2015 at 03:32:08PM -0400, Jung-uk Kim wrote: > > > >>> `acpidump -d` work `acpidump -t` don't work > > >>> > > >>>> From a quick look, it seems that your RSDT contains an entry > > >>>> with an address size which is neither 4 nor 8, and that > > >>>> leads to the assertion failure. I am unsure whether there is > > >>>> any upstream fix for it. > > >>> > > >>> I am not sure how long acpidump -t don't work. > > > > > > addr_size must be 4 or 8 here. Otherwise, something is corrupting > > > memory. > > > > Sorry, I misread your message. Please install sysutils/acpica-tools > > from ports, then do /usr/local/bin/acpidump and send me the output. > > Host crashed Captured inforamtion you can take here: http://zxy.spb.ru/acpi/ From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 21:36:49 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5605B5EB; Thu, 9 Apr 2015 21:36:49 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id C346069F19; Thu, 9 Apr 2015 21:36:48 +0000 (UTC) Message-ID: <5526F0F0.7060507@FreeBSD.org> Date: Thu, 09 Apr 2015 17:36:48 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Slawa Olhovchenkov Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> <5526D222.8030100@FreeBSD.org> <5526D3B8.3060900@FreeBSD.org> <20150409205639.GO8220@zxy.spb.ru> <20150409211121.GP8220@zxy.spb.ru> In-Reply-To: <20150409211121.GP8220@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:36:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 04/09/2015 17:11, Slawa Olhovchenkov wrote: > On Thu, Apr 09, 2015 at 11:56:39PM +0300, Slawa Olhovchenkov > wrote: > >> On Thu, Apr 09, 2015 at 03:32:08PM -0400, Jung-uk Kim wrote: >> >>>>>> `acpidump -d` work `acpidump -t` don't work >>>>>> >>>>>>> From a quick look, it seems that your RSDT contains an >>>>>>> entry with an address size which is neither 4 nor 8, >>>>>>> and that leads to the assertion failure. I am unsure >>>>>>> whether there is any upstream fix for it. >>>>>> >>>>>> I am not sure how long acpidump -t don't work. >>>> >>>> addr_size must be 4 or 8 here. Otherwise, something is >>>> corrupting memory. >>> >>> Sorry, I misread your message. Please install >>> sysutils/acpica-tools from ports, then do >>> /usr/local/bin/acpidump and send me the output. >> >> Host crashed > > Captured inforamtion you can take here: http://zxy.spb.ru/acpi/ The last entry in your XSDT is actually empty. Although it is not clearly defined in the specification, I believe it should be skipped. I just committed a workaround on head (r281331) and it will be merged to stable branches after 3 days. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVJvDrAAoJEHyflib82/FGkocH/idaHJNEMb2FmD8fhqJItWP3 lIxGpRXL5TfLbou8GHkPOE7TDiSwnI41oQs6Ir70/pLhtEb4TNGe+U2XiVXNJrDX 4+22/oEOqbm7xrlXGrvfXnNvY2gJYGRWijohdmjLq2ciMXiUEL1bG9YUQSd4IXFV EQIpVl5mw3AUUK7a22AOMSg2o/+BAuVDpPkgmZyHYDghAv6wb1kWx9GxAEsyVQUr g3P/pCACj1PoFAlEqY97jpQ3n+HagkqFxA6nbWCmxq5l21tCBMv4Tx+iyjs7N/FZ gQjLBQH5ocmhSrauSCaIhbsfTbArRXH7Kn42c3e79FNxwTn2lKDXKSESu0ioGPc= =6bWt -----END PGP SIGNATURE----- From owner-svn-src-stable-10@FreeBSD.ORG Thu Apr 9 21:47:46 2015 Return-Path: Delivered-To: svn-src-stable-10@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 11C8BAF8; Thu, 9 Apr 2015 21:47:46 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 B5D059; Thu, 9 Apr 2015 21:47:45 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgKIZ-000DYX-Mc; Fri, 10 Apr 2015 00:47:43 +0300 Date: Fri, 10 Apr 2015 00:47:43 +0300 From: Slawa Olhovchenkov To: Jung-uk Kim Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Message-ID: <20150409214743.GG1394@zxy.spb.ru> References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> <5526D222.8030100@FreeBSD.org> <5526D3B8.3060900@FreeBSD.org> <20150409205639.GO8220@zxy.spb.ru> <20150409211121.GP8220@zxy.spb.ru> <5526F0F0.7060507@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5526F0F0.7060507@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:47:46 -0000 On Thu, Apr 09, 2015 at 05:36:48PM -0400, Jung-uk Kim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On 04/09/2015 17:11, Slawa Olhovchenkov wrote: > > On Thu, Apr 09, 2015 at 11:56:39PM +0300, Slawa Olhovchenkov > > wrote: > > > >> On Thu, Apr 09, 2015 at 03:32:08PM -0400, Jung-uk Kim wrote: > >> > >>>>>> `acpidump -d` work `acpidump -t` don't work > >>>>>> > >>>>>>> From a quick look, it seems that your RSDT contains an > >>>>>>> entry with an address size which is neither 4 nor 8, > >>>>>>> and that leads to the assertion failure. I am unsure > >>>>>>> whether there is any upstream fix for it. > >>>>>> > >>>>>> I am not sure how long acpidump -t don't work. > >>>> > >>>> addr_size must be 4 or 8 here. Otherwise, something is > >>>> corrupting memory. > >>> > >>> Sorry, I misread your message. Please install > >>> sysutils/acpica-tools from ports, then do > >>> /usr/local/bin/acpidump and send me the output. > >> > >> Host crashed > > > > Captured inforamtion you can take here: http://zxy.spb.ru/acpi/ > > The last entry in your XSDT is actually empty. Although it is not > clearly defined in the specification, I believe it should be skipped. > I just committed a workaround on head (r281331) and it will be merged > to stable branches after 3 days. I am try some timr later. I never expect that 'Fatal trap 12: page fault while in user mode' may trigger kernel crash. From owner-svn-src-stable-10@FreeBSD.ORG Fri Apr 10 00:43:26 2015 Return-Path: Delivered-To: svn-src-stable-10@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 999DEA3B; Fri, 10 Apr 2015 00:43: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 840576EE; Fri, 10 Apr 2015 00:43: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 t3A0hPYJ034399; Fri, 10 Apr 2015 00:43:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A0hPLb034397; Fri, 10 Apr 2015 00:43:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504100043.t3A0hPLb034397@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 10 Apr 2015 00:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281346 - in stable/10/sys/geom: mirror raid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 00:43:26 -0000 Author: mav Date: Fri Apr 10 00:43:24 2015 New Revision: 281346 URL: https://svnweb.freebsd.org/changeset/base/281346 Log: MFC r280757: Remove request sorting from GEOM_MIRROR and GEOM_RAID. When CPU is not busy, those queues are typically empty. When CPU is busy, then one more extra sorting is the last thing it needs. If specific device (HDD) really needs sorting, then it will be done later by CAM. This supposed to fix livelock reported for mirror of two SSDs, when UFS fires zillion of BIO_DELETE requests, that totally blocks I/O subsystem by pointless sorting of requests and responses under single mutex lock. Modified: stable/10/sys/geom/mirror/g_mirror.c stable/10/sys/geom/raid/g_raid.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/10/sys/geom/mirror/g_mirror.c Thu Apr 9 23:09:47 2015 (r281345) +++ stable/10/sys/geom/mirror/g_mirror.c Fri Apr 10 00:43:24 2015 (r281346) @@ -894,7 +894,7 @@ g_mirror_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_REGULAR; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -981,7 +981,7 @@ g_mirror_regular_request(struct bio *bp) else { pbp->bio_error = 0; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, pbp); + bioq_insert_tail(&sc->sc_queue, pbp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); @@ -1021,7 +1021,7 @@ g_mirror_sync_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_SYNC; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -1150,7 +1150,7 @@ g_mirror_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); Modified: stable/10/sys/geom/raid/g_raid.c ============================================================================== --- stable/10/sys/geom/raid/g_raid.c Thu Apr 9 23:09:47 2015 (r281345) +++ stable/10/sys/geom/raid/g_raid.c Fri Apr 10 00:43:24 2015 (r281346) @@ -1143,7 +1143,7 @@ g_raid_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (!dumping) { G_RAID_DEBUG1(4, sc, "Waking up %p.", sc); @@ -1355,7 +1355,7 @@ g_raid_unlock_range(struct g_raid_volume (intmax_t)(lp->l_offset+lp->l_length)); mtx_lock(&sc->sc_queue_mtx); while ((bp = bioq_takefirst(&vol->v_locked)) != NULL) - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); free(lp, M_RAID); return (0); @@ -1449,7 +1449,7 @@ g_raid_disk_done(struct bio *bp) sd = bp->bio_caller1; sc = sd->sd_softc; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (!dumping) wakeup(sc); From owner-svn-src-stable-10@FreeBSD.ORG Fri Apr 10 02:23:46 2015 Return-Path: Delivered-To: svn-src-stable-10@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 2F78E1C9; Fri, 10 Apr 2015 02:23: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 19AEF127; Fri, 10 Apr 2015 02:23: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 t3A2Njio082264; Fri, 10 Apr 2015 02:23:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A2Njjp082262; Fri, 10 Apr 2015 02:23:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504100223.t3A2Njjp082262@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 10 Apr 2015 02:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281350 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 02:23:46 -0000 Author: kib Date: Fri Apr 10 02:23:44 2015 New Revision: 281350 URL: https://svnweb.freebsd.org/changeset/base/281350 Log: MFC r280760: Fix the hand after the immediate reboot after the init binary is unlinked. MFC r280763: Fix build (with gcc). Modified: stable/10/sys/ufs/ffs/ffs_softdep.c stable/10/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Fri Apr 10 01:29:29 2015 (r281349) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Fri Apr 10 02:23:44 2015 (r281350) @@ -738,6 +738,7 @@ static int softdep_process_worklist(stru static int softdep_waitidle(struct mount *, int); static void drain_output(struct vnode *); static struct buf *getdirtybuf(struct buf *, struct rwlock *, int); +static int check_inodedep_free(struct inodedep *); static void clear_remove(struct mount *); static void clear_inodedeps(struct mount *); static void unlinked_inodedep(struct mount *, struct inodedep *); @@ -1885,8 +1886,8 @@ softdep_flushworklist(oldmnt, countp, td struct thread *td; { struct vnode *devvp; - int count, error = 0; struct ufsmount *ump; + int count, error; /* * Alternately flush the block device associated with the mount @@ -1895,6 +1896,7 @@ softdep_flushworklist(oldmnt, countp, td * are found. */ *countp = 0; + error = 0; ump = VFSTOUFS(oldmnt); devvp = ump->um_devvp; while ((count = softdep_process_worklist(oldmnt, 1)) > 0) { @@ -1902,37 +1904,47 @@ softdep_flushworklist(oldmnt, countp, td vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(devvp, MNT_WAIT, td); VOP_UNLOCK(devvp, 0); - if (error) + if (error != 0) break; } return (error); } +#define SU_WAITIDLE_RETRIES 20 static int softdep_waitidle(struct mount *mp, int flags __unused) { struct ufsmount *ump; - int error; - int i; + struct vnode *devvp; + struct thread *td; + int error, i; ump = VFSTOUFS(mp); + devvp = ump->um_devvp; + td = curthread; + error = 0; ACQUIRE_LOCK(ump); - for (i = 0; i < 10 && ump->softdep_deps; i++) { + for (i = 0; i < SU_WAITIDLE_RETRIES && ump->softdep_deps != 0; i++) { ump->softdep_req = 1; KASSERT((flags & FORCECLOSE) == 0 || ump->softdep_on_worklist == 0, ("softdep_waitidle: work added after flush")); - msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM, "softdeps", 1); + msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM | PDROP, + "softdeps", 10 * hz); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_FSYNC(devvp, MNT_WAIT, td); + VOP_UNLOCK(devvp, 0); + if (error != 0) + break; + ACQUIRE_LOCK(ump); } ump->softdep_req = 0; - FREE_LOCK(ump); - error = 0; - if (i == 10) { + if (i == SU_WAITIDLE_RETRIES && error == 0 && ump->softdep_deps != 0) { error = EBUSY; printf("softdep_waitidle: Failed to flush worklist for %p\n", mp); } - + FREE_LOCK(ump); return (error); } @@ -7637,17 +7649,13 @@ check_inode_unwritten(inodedep) return (1); } -/* - * Try to free an inodedep structure. Return 1 if it could be freed. - */ static int -free_inodedep(inodedep) +check_inodedep_free(inodedep) struct inodedep *inodedep; { LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); - if ((inodedep->id_state & (ONWORKLIST | UNLINKED)) != 0 || - (inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE || + if ((inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE || !LIST_EMPTY(&inodedep->id_dirremhd) || !LIST_EMPTY(&inodedep->id_pendinghd) || !LIST_EMPTY(&inodedep->id_bufwait) || @@ -7662,6 +7670,21 @@ free_inodedep(inodedep) inodedep->id_nlinkdelta != 0 || inodedep->id_savedino1 != NULL) return (0); + return (1); +} + +/* + * Try to free an inodedep structure. Return 1 if it could be freed. + */ +static int +free_inodedep(inodedep) + struct inodedep *inodedep; +{ + + LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); + if ((inodedep->id_state & (ONWORKLIST | UNLINKED)) != 0 || + !check_inodedep_free(inodedep)) + return (0); if (inodedep->id_state & ONDEPLIST) LIST_REMOVE(inodedep, id_deps); LIST_REMOVE(inodedep, id_hash); @@ -13846,7 +13869,8 @@ softdep_check_suspend(struct mount *mp, { struct bufobj *bo; struct ufsmount *ump; - int error; + struct inodedep *inodedep; + int error, unlinked; bo = &devvp->v_bufobj; ASSERT_BO_WLOCKED(bo); @@ -13907,6 +13931,20 @@ softdep_check_suspend(struct mount *mp, break; } + unlinked = 0; + if (MOUNTEDSUJ(mp)) { + for (inodedep = TAILQ_FIRST(&ump->softdep_unlinked); + inodedep != NULL; + inodedep = TAILQ_NEXT(inodedep, id_unlinked)) { + if ((inodedep->id_state & (UNLINKED | UNLINKLINKS | + UNLINKONLIST)) != (UNLINKED | UNLINKLINKS | + UNLINKONLIST) || + !check_inodedep_free(inodedep)) + continue; + unlinked++; + } + } + /* * Reasons for needing more work before suspend: * - Dirty buffers on devvp. @@ -13916,8 +13954,8 @@ softdep_check_suspend(struct mount *mp, error = 0; if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0 || - softdep_depcnt != 0 || - ump->softdep_deps != 0 || + softdep_depcnt != unlinked || + ump->softdep_deps != unlinked || softdep_accdepcnt != ump->softdep_accdeps || secondary_writes != 0 || mp->mnt_secondary_writes != 0 || Modified: stable/10/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_vfsops.c Fri Apr 10 01:29:29 2015 (r281349) +++ stable/10/sys/ufs/ffs/ffs_vfsops.c Fri Apr 10 02:23:44 2015 (r281350) @@ -1502,8 +1502,11 @@ ffs_sync(mp, waitfor) if (fs->fs_fmod != 0 && fs->fs_ronly != 0 && ump->um_fsckpid == 0) panic("%s: ffs_sync: modification on read-only filesystem", fs->fs_fsmnt); - if (waitfor == MNT_LAZY) - return (ffs_sync_lazy(mp)); + if (waitfor == MNT_LAZY) { + if (!rebooting) + return (ffs_sync_lazy(mp)); + waitfor = MNT_NOWAIT; + } /* * Write back each (modified) inode. @@ -1560,7 +1563,7 @@ loop: /* * Force stale filesystem control information to be flushed. */ - if (waitfor == MNT_WAIT) { + if (waitfor == MNT_WAIT || rebooting) { if ((error = softdep_flushworklist(ump->um_mountp, &count, td))) allerror = error; /* Flushed work items may create new vnodes to clean */ @@ -1577,9 +1580,12 @@ loop: if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) { BO_UNLOCK(bo); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); - if ((error = VOP_FSYNC(devvp, waitfor, td)) != 0) - allerror = error; + error = VOP_FSYNC(devvp, waitfor, td); VOP_UNLOCK(devvp, 0); + if (MOUNTEDSOFTDEP(mp) && (error == 0 || error == EAGAIN)) + error = ffs_sbupdate(ump, waitfor, 0); + if (error != 0) + allerror = error; if (allerror == 0 && waitfor == MNT_WAIT) goto loop; } else if (suspend != 0) { From owner-svn-src-stable-10@FreeBSD.ORG Fri Apr 10 20:38:32 2015 Return-Path: Delivered-To: svn-src-stable-10@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 AC9C2155; Fri, 10 Apr 2015 20:38: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 97B41157; Fri, 10 Apr 2015 20:38: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 t3AKcWdZ019114; Fri, 10 Apr 2015 20:38:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AKcWQ5019113; Fri, 10 Apr 2015 20:38:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504102038.t3AKcWQ5019113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 10 Apr 2015 20:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281382 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 20:38:32 -0000 Author: dim Date: Fri Apr 10 20:38:31 2015 New Revision: 281382 URL: https://svnweb.freebsd.org/changeset/base/281382 Log: MFC r272814 (by bapt): Add OBJCOPY to the list of external tools MFC r272815 (by bapt): Fix typo This should fix the build troubles some people have been seeing after the MFC of r280980 (in r281289). Sorry for the breakage. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Fri Apr 10 19:26:45 2015 (r281381) +++ stable/10/Makefile.inc1 Fri Apr 10 20:38:31 2015 (r281382) @@ -311,7 +311,7 @@ X${COMPILER}?= ${CROSS_COMPILER_PREFIX}$ X${COMPILER}?= ${${COMPILER}} .endif .endfor -XBINUTILS= AS AR LD NM OBJDUMP RANLIB STRINGS +XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} @@ -322,7 +322,8 @@ X${BINUTIL}?= ${${BINUTIL}} WMAKEENV+= CC="${XCC} ${XFLAGS}" CXX="${XCXX} ${XFLAGS}" \ CPP="${XCPP} ${XFLAGS}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ - OBJDUMP=${XOBJDUMP} RANLIB=${XRANLIB} STRINGS=${XSTRINGS} + OBJDUMP=${XOBJDUMP} OBJCOPY="${XOBJCOPY}" \ + RANLIB=${XRANLIB} STRINGS=${XSTRINGS} .if ${XCC:T:Mgcc} == "gcc" WMAKE_COMPILER_TYPE= gcc From owner-svn-src-stable-10@FreeBSD.ORG Fri Apr 10 23:43:03 2015 Return-Path: Delivered-To: svn-src-stable-10@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 182D58DA; Fri, 10 Apr 2015 23:43: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 DCAC5989; Fri, 10 Apr 2015 23:43: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 t3ANh2XO024720; Fri, 10 Apr 2015 23:43:02 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ANh2CO024719; Fri, 10 Apr 2015 23:43:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201504102343.t3ANh2CO024719@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 10 Apr 2015 23:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281386 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 23:43:03 -0000 Author: rmacklem Date: Fri Apr 10 23:43:01 2015 New Revision: 281386 URL: https://svnweb.freebsd.org/changeset/base/281386 Log: MFC: r276347 r245508 modified the NFS client's Setattr RPC to use VA_UTIMES_NULL to indicate whether it should set the time to the current tod on the server. This had the side effect of making the NFS client use the client's timestamp for exclusive create, starting with FreeBSD9.2. Unfortunately a bug in some Solaris NFS servers causes these servers to return NFS_OK to the Setattr RPC done during exclusive create, but not actually set the file's mode, leaving the file's mode == 0. This patch restores the NFS client's behaviour to use the server's tod for the exclusive open's Setattr RPC, to avoid the Solaris server bug and to restore the pre-FreeBSD9.2 NFS behaviour. Modified: stable/10/sys/fs/nfsclient/nfs_clport.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clport.c Fri Apr 10 22:53:07 2015 (r281385) +++ stable/10/sys/fs/nfsclient/nfs_clport.c Fri Apr 10 23:43:01 2015 (r281386) @@ -1097,9 +1097,16 @@ nfscl_checksattr(struct vattr *vap, stru * us to do a SETATTR RPC. FreeBSD servers store the verifier * in atime, but we can't really assume that all servers will * so we ensure that our SETATTR sets both atime and mtime. + * Set the VA_UTIMES_NULL flag for this case, so that + * the server's time will be used. This is needed to + * work around a bug in some Solaris servers, where + * setting the time TOCLIENT causes the Setattr RPC + * to return NFS_OK, but not set va_mode. */ - if (vap->va_mtime.tv_sec == VNOVAL) + if (vap->va_mtime.tv_sec == VNOVAL) { vfs_timestamp(&vap->va_mtime); + vap->va_vaflags |= VA_UTIMES_NULL; + } if (vap->va_atime.tv_sec == VNOVAL) vap->va_atime = vap->va_mtime; return (1); From owner-svn-src-stable-10@FreeBSD.ORG Sat Apr 11 01:17:20 2015 Return-Path: Delivered-To: svn-src-stable-10@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 B85695A0; Sat, 11 Apr 2015 01:17: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 897901A2; Sat, 11 Apr 2015 01:17: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 t3B1HKfl068500; Sat, 11 Apr 2015 01:17:20 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B1HKEe068499; Sat, 11 Apr 2015 01:17:20 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504110117.t3B1HKEe068499@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 11 Apr 2015 01:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281389 - in stable: 10/usr.sbin/acpi/acpiconf 8/usr.sbin/acpi/acpiconf 9/usr.sbin/acpi/acpiconf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 01:17:20 -0000 Author: jkim Date: Sat Apr 11 01:17:19 2015 New Revision: 281389 URL: https://svnweb.freebsd.org/changeset/base/281389 Log: MFC: r281171 Tidy up battery status information. Remove a trailing white space. PR: 193671 Modified: stable/10/usr.sbin/acpi/acpiconf/acpiconf.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/usr.sbin/acpi/acpiconf/acpiconf.c stable/9/usr.sbin/acpi/acpiconf/acpiconf.c Directory Properties: stable/8/usr.sbin/acpi/acpiconf/ (props changed) stable/9/usr.sbin/acpi/acpiconf/ (props changed) Modified: stable/10/usr.sbin/acpi/acpiconf/acpiconf.c ============================================================================== --- stable/10/usr.sbin/acpi/acpiconf/acpiconf.c Sat Apr 11 01:06:59 2015 (r281388) +++ stable/10/usr.sbin/acpi/acpiconf/acpiconf.c Sat Apr 11 01:17:19 2015 (r281389) @@ -136,16 +136,30 @@ acpi_battinfo(int num) if (ioctl(acpifd, ACPIIO_BATT_GET_BATTINFO, &battio) == -1) err(EX_IOERR, "get battery user info (%d) failed", num); if (battio.battinfo.state != ACPI_BATT_STAT_NOT_PRESENT) { - printf("State:\t\t\t"); - if (battio.battinfo.state == 0) - printf("high "); - if (battio.battinfo.state & ACPI_BATT_STAT_CRITICAL) - printf("critical "); - if (battio.battinfo.state & ACPI_BATT_STAT_DISCHARG) - printf("discharging "); - if (battio.battinfo.state & ACPI_BATT_STAT_CHARGING) - printf("charging "); - printf("\n"); + const char *state; + switch (battio.battinfo.state & ACPI_BATT_STAT_BST_MASK) { + case 0: + state = "high"; + break; + case ACPI_BATT_STAT_DISCHARG: + state = "discharging"; + break; + case ACPI_BATT_STAT_CHARGING: + state = "charging"; + break; + case ACPI_BATT_STAT_CRITICAL: + state = "critical"; + break; + case ACPI_BATT_STAT_DISCHARG | ACPI_BATT_STAT_CRITICAL: + state = "critical discharging"; + break; + case ACPI_BATT_STAT_CHARGING | ACPI_BATT_STAT_CRITICAL: + state = "critical charging"; + break; + default: + state = "invalid"; + } + printf("State:\t\t\t%s\n", state); if (battio.battinfo.cap == -1) printf("Remaining capacity:\tunknown\n"); else From owner-svn-src-stable-10@FreeBSD.ORG Sat Apr 11 02:24:00 2015 Return-Path: Delivered-To: svn-src-stable-10@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 961D6FF8; Sat, 11 Apr 2015 02:24: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 80A4D9EA; Sat, 11 Apr 2015 02:24: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 t3B2O0lr000951; Sat, 11 Apr 2015 02:24:00 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B2O0tK000950; Sat, 11 Apr 2015 02:24:00 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504110224.t3B2O0tK000950@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 11 Apr 2015 02:24:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281390 - stable/10/sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 02:24:00 -0000 Author: rpaulo Date: Sat Apr 11 02:23:59 2015 New Revision: 281390 URL: https://svnweb.freebsd.org/changeset/base/281390 Log: MFC r281070: urtwn: blink the LED when scanning. Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_urtwn.c Sat Apr 11 01:17:19 2015 (r281389) +++ stable/10/sys/dev/usb/wlan/if_urtwn.c Sat Apr 11 02:23:59 2015 (r281390) @@ -1561,14 +1561,9 @@ urtwn_newstate(struct ieee80211vap *vap, urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(1), reg); } } - /* Make link LED blink during scan. */ - urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink); - /* Pause AC Tx queues. */ urtwn_write_1(sc, R92C_TXPAUSE, urtwn_read_1(sc, R92C_TXPAUSE) | 0x0f); - - urtwn_set_chan(sc, ic->ic_curchan, NULL); break; case IEEE80211_S_AUTH: /* Set initial gain under link. */ @@ -3124,8 +3119,13 @@ static void urtwn_set_channel(struct ieee80211com *ic) { struct urtwn_softc *sc = ic->ic_ifp->if_softc; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); URTWN_LOCK(sc); + if (vap->iv_state == IEEE80211_S_SCAN) { + /* Make link LED blink during scan. */ + urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink); + } urtwn_set_chan(sc, ic->ic_curchan, NULL); URTWN_UNLOCK(sc); }