From owner-svn-src-stable@FreeBSD.ORG Sun Apr 5 01:03:12 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Apr 5 06:53:31 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Apr 5 06:54:29 2015 Return-Path: Delivered-To: svn-src-stable@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 7D2B73D5; Sun, 5 Apr 2015 06:54:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67DC8273; Sun, 5 Apr 2015 06:54:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t356sTcM047481; Sun, 5 Apr 2015 06:54:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t356sTH0047480; Sun, 5 Apr 2015 06:54:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504050654.t356sTH0047480@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:54:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281105 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 06:54:29 -0000 Author: mav Date: Sun Apr 5 06:54:28 2015 New Revision: 281105 URL: https://svnweb.freebsd.org/changeset/base/281105 Log: MFC r280822: Some cosmetic polishing. No functional change. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 5 06:53:29 2015 (r281104) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 5 06:54:28 2015 (r281105) @@ -4027,10 +4027,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); @@ -4040,9 +4040,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@FreeBSD.ORG Sun Apr 5 15:27:57 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Mon Apr 6 03:16:21 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Mon Apr 6 08:23:19 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Mon Apr 6 12:49:39 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 77879EE1; Mon, 6 Apr 2015 12:49:39 +0000 (UTC) Date: Mon, 6 Apr 2015 12:49:39 +0000 From: Alexey Dokuchaev To: John Baldwin Subject: Re: svn commit: r280973 - in stable: 10/sys/amd64/amd64 10/sys/dev/acpica 10/sys/i386/i386 10/sys/kern 10/sys/sys 10/sys/x86/x86 9/sys/amd64/amd64 9/sys/dev/acpica 9/sys/i386/i386 9/sys/kern 9/sys/sys ... Message-ID: <20150406124939.GA48665@FreeBSD.org> References: <201504020102.t3212lTO021499@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504020102.t3212lTO021499@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-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 12:49:39 -0000 On Thu, Apr 02, 2015 at 01:02:47AM +0000, John Baldwin wrote: > New Revision: 280973 > URL: https://svnweb.freebsd.org/changeset/base/280973 > > Log: > MFC 276724: > On some Intel CPUs with a P-state but not C-state invariant TSC the TSC > may also halt in C2 and not just C3 (it seems that in some cases the BIOS > advertises its C3 state as a C2 state in _CST). Just play it safe and > disable both C2 and C3 states if a user forces the use of the TSC as the > timecounter on such CPUs. Does it apply to stable/8 as well? Any preliminary testing I might have to conduct first? ./danfe From owner-svn-src-stable@FreeBSD.ORG Mon Apr 6 14:27:40 2015 Return-Path: Delivered-To: svn-src-stable@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 8D8289A5; Mon, 6 Apr 2015 14:27:40 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61B8BF09; Mon, 6 Apr 2015 14:27:40 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 17958B93C; Mon, 6 Apr 2015 10:27:39 -0400 (EDT) From: John Baldwin To: Alexey Dokuchaev Subject: Re: svn commit: r280973 - in stable: 10/sys/amd64/amd64 10/sys/dev/acpica 10/sys/i386/i386 10/sys/kern 10/sys/sys 10/sys/x86/x86 9/sys/amd64/amd64 9/sys/dev/acpica 9/sys/i386/i386 9/sys/kern 9/sys/sys ... Date: Mon, 06 Apr 2015 10:25:17 -0400 Message-ID: <1845061.qZcGbcMHKr@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150406124939.GA48665@FreeBSD.org> References: <201504020102.t3212lTO021499@svn.freebsd.org> <20150406124939.GA48665@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 06 Apr 2015 10:27:39 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 14:27:40 -0000 On Monday, April 06, 2015 12:49:39 PM Alexey Dokuchaev wrote: > On Thu, Apr 02, 2015 at 01:02:47AM +0000, John Baldwin wrote: > > New Revision: 280973 > > URL: https://svnweb.freebsd.org/changeset/base/280973 > > > > Log: > > MFC 276724: > > On some Intel CPUs with a P-state but not C-state invariant TSC the TSC > > may also halt in C2 and not just C3 (it seems that in some cases the BIOS > > advertises its C3 state as a C2 state in _CST). Just play it safe and > > disable both C2 and C3 states if a user forces the use of the TSC as the > > timecounter on such CPUs. > > Does it apply to stable/8 as well? Any preliminary testing I might have to > conduct first? It needs some manual patching to apply to 8 (8 doesn't have the merged tsc.c in sys/x86/x86 for example). At this point in 8's life cycle I'm not inclined to merge non-trivial changes that need manual fixups, etc. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Mon Apr 6 14:45:41 2015 Return-Path: Delivered-To: svn-src-stable@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 46C307DD; Mon, 6 Apr 2015 14:45:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 306B8155; 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 t36EjfXl072219; 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 t36Ejf9B072218; Mon, 6 Apr 2015 14:45:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504061445.t36Ejf9B072218@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-9@freebsd.org Subject: svn commit: r281148 - in stable: 10/bin/expr 9/bin/expr X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 14:45:41 -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/9/bin/expr/Makefile Directory Properties: stable/9/ (props changed) stable/9/bin/ (props changed) stable/9/bin/expr/ (props changed) Changes in other areas also in this revision: Modified: stable/10/bin/expr/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/bin/expr/Makefile ============================================================================== --- stable/9/bin/expr/Makefile Mon Apr 6 13:55:33 2015 (r281147) +++ stable/9/bin/expr/Makefile Mon Apr 6 14:45:40 2015 (r281148) @@ -4,4 +4,7 @@ PROG= expr SRCS= expr.y YFLAGS= +# expr relies on signed integer wrapping +CFLAGS+= -fwrapv + .include From owner-svn-src-stable@FreeBSD.ORG Mon Apr 6 14:45:42 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Mon Apr 6 14:50:55 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Mon Apr 6 14:50:55 2015 Return-Path: Delivered-To: svn-src-stable@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 285A7CCC; 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 F343A243; Mon, 6 Apr 2015 14:50: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 t36EosBT075632; Mon, 6 Apr 2015 14:50:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36EosDP075631; Mon, 6 Apr 2015 14:50:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504061450.t36EosDP075631@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:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281149 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 14:50:55 -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/9/contrib/libc++/include/type_traits Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libc++/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libc++/include/type_traits Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libc++/include/type_traits ============================================================================== --- stable/9/contrib/libc++/include/type_traits Mon Apr 6 14:45:40 2015 (r281148) +++ stable/9/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@FreeBSD.ORG Mon Apr 6 18:40:52 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Mon Apr 6 19:56:31 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Mon Apr 6 22:41:15 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 02:53:16 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 02:55:23 2015 Return-Path: Delivered-To: svn-src-stable@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 D231D8D8; Tue, 7 Apr 2015 02:55:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCF61DCD; Tue, 7 Apr 2015 02:55:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t372tNtM030938; Tue, 7 Apr 2015 02:55:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t372tNBO030936; Tue, 7 Apr 2015 02:55:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504070255.t372tNBO030936@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:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281186 - stable/9/crypto/openssh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 02:55:23 -0000 Author: bdrewery Date: Tue Apr 7 02:55:22 2015 New Revision: 281186 URL: https://svnweb.freebsd.org/changeset/base/281186 Log: MFC r280360: Document "none" for VersionAddendum. Modified: stable/9/crypto/openssh/ssh_config.5 stable/9/crypto/openssh/sshd_config.5 Directory Properties: stable/9/crypto/openssh/ (props changed) Modified: stable/9/crypto/openssh/ssh_config.5 ============================================================================== --- stable/9/crypto/openssh/ssh_config.5 Tue Apr 7 02:53:14 2015 (r281185) +++ stable/9/crypto/openssh/ssh_config.5 Tue Apr 7 02:55:22 2015 (r281186) @@ -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 @@ -1421,6 +1421,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/9/crypto/openssh/sshd_config.5 ============================================================================== --- stable/9/crypto/openssh/sshd_config.5 Tue Apr 7 02:53:14 2015 (r281185) +++ stable/9/crypto/openssh/sshd_config.5 Tue Apr 7 02:55:22 2015 (r281186) @@ -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@FreeBSD.ORG Tue Apr 7 04:21:37 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 07:08:36 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 07:10:45 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 15:24:38 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 15:28:24 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 15:32:44 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 15:34:35 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 17:07:31 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 17:21:31 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 17:33:52 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 17:40:36 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 18:04:19 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 18:07:17 2015 Return-Path: Delivered-To: svn-src-stable@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 27856239; Tue, 7 Apr 2015 18:07:17 +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 11CDBC4C; Tue, 7 Apr 2015 18:07:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37I7G41065141; Tue, 7 Apr 2015 18:07:16 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37I7GOJ065140; Tue, 7 Apr 2015 18:07:16 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201504071807.t37I7GOJ065140@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:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281217 - stable/9/sys/dev/bxe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:07:17 -0000 Author: davidcs Date: Tue Apr 7 18:07:16 2015 New Revision: 281217 URL: https://svnweb.freebsd.org/changeset/base/281217 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/9/sys/dev/bxe/bxe.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/bxe.c ============================================================================== --- stable/9/sys/dev/bxe/bxe.c Tue Apr 7 18:06:46 2015 (r281216) +++ stable/9/sys/dev/bxe/bxe.c Tue Apr 7 18:07:16 2015 (r281217) @@ -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@FreeBSD.ORG Tue Apr 7 18:10:59 2015 Return-Path: Delivered-To: svn-src-stable@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 816FF3F4; Tue, 7 Apr 2015 18:10: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 6B9BCC8C; Tue, 7 Apr 2015 18:10: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 t37IAxaC067647; Tue, 7 Apr 2015 18:10:59 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37IAxvp067646; Tue, 7 Apr 2015 18:10:59 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201504071810.t37IAxvp067646@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:10:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r281218 - stable/8/sys/dev/bxe X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:10:59 -0000 Author: davidcs Date: Tue Apr 7 18:10:58 2015 New Revision: 281218 URL: https://svnweb.freebsd.org/changeset/base/281218 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/8/sys/dev/bxe/bxe.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/bxe/bxe.c ============================================================================== --- stable/8/sys/dev/bxe/bxe.c Tue Apr 7 18:07:16 2015 (r281217) +++ stable/8/sys/dev/bxe/bxe.c Tue Apr 7 18:10:58 2015 (r281218) @@ -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@FreeBSD.ORG Tue Apr 7 18:14:02 2015 Return-Path: Delivered-To: svn-src-stable@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 62CC6556; Tue, 7 Apr 2015 18:14:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CF01D43; Tue, 7 Apr 2015 18:14: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 t37IE2w7069677; Tue, 7 Apr 2015 18:14:02 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37IE2qb069676; Tue, 7 Apr 2015 18:14:02 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201504071814.t37IE2qb069676@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:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r281219 - stable/7/sys/dev/bxe X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:14:02 -0000 Author: davidcs Date: Tue Apr 7 18:14:01 2015 New Revision: 281219 URL: https://svnweb.freebsd.org/changeset/base/281219 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/7/sys/dev/bxe/bxe.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/bxe/bxe.c ============================================================================== --- stable/7/sys/dev/bxe/bxe.c Tue Apr 7 18:10:58 2015 (r281218) +++ stable/7/sys/dev/bxe/bxe.c Tue Apr 7 18:14:01 2015 (r281219) @@ -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@FreeBSD.ORG Tue Apr 7 20:20:27 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Apr 7 20:20:46 2015 Return-Path: Delivered-To: svn-src-stable@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 BE6EE406; Tue, 7 Apr 2015 20:20: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 A7130E03; Tue, 7 Apr 2015 20:20: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 t37KKk4w032129; Tue, 7 Apr 2015 20:20:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KKjgd032124; Tue, 7 Apr 2015 20:20:45 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504072020.t37KKjgd032124@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:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281231 - in stable: 8/contrib/ntp/ntpd 8/sys/netinet 8/sys/netinet6 9/contrib/ntp/ntpd 9/sys/netinet 9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:20:46 -0000 Author: delphij Date: Tue Apr 7 20:20:44 2015 New Revision: 281231 URL: https://svnweb.freebsd.org/changeset/base/281231 Log: Improve patch for SA-15:04.igmp to solve a potential buffer overflow. Fix multiple vulnerabilities of ntp. [SA-15:07] Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] Modified: stable/9/contrib/ntp/ntpd/ntp_crypto.c stable/9/contrib/ntp/ntpd/ntp_proto.c stable/9/sys/netinet/igmp.c stable/9/sys/netinet6/nd6_rtr.c Changes in other areas also in this revision: Modified: stable/8/contrib/ntp/ntpd/ntp_crypto.c stable/8/contrib/ntp/ntpd/ntp_proto.c stable/8/sys/netinet/igmp.c stable/8/sys/netinet6/nd6_rtr.c Modified: stable/9/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/9/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:44 2015 (r281231) @@ -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/9/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/9/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:44 2015 (r281231) @@ -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/9/sys/netinet/igmp.c ============================================================================== --- stable/9/sys/netinet/igmp.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/9/sys/netinet/igmp.c Tue Apr 7 20:20:44 2015 (r281231) @@ -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/9/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/9/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/9/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:44 2015 (r281231) @@ -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); } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 7 20:20:48 2015 Return-Path: Delivered-To: svn-src-stable@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 94A21407; Tue, 7 Apr 2015 20:20: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 7CE77E04; Tue, 7 Apr 2015 20:20: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 t37KKmk1032144; Tue, 7 Apr 2015 20:20:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KKl5Q032136; Tue, 7 Apr 2015 20:20:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504072020.t37KKl5Q032136@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:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r281231 - in stable: 8/contrib/ntp/ntpd 8/sys/netinet 8/sys/netinet6 9/contrib/ntp/ntpd 9/sys/netinet 9/sys/netinet6 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:20:48 -0000 Author: delphij Date: Tue Apr 7 20:20:44 2015 New Revision: 281231 URL: https://svnweb.freebsd.org/changeset/base/281231 Log: Improve patch for SA-15:04.igmp to solve a potential buffer overflow. Fix multiple vulnerabilities of ntp. [SA-15:07] Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] Modified: stable/8/contrib/ntp/ntpd/ntp_crypto.c stable/8/contrib/ntp/ntpd/ntp_proto.c stable/8/sys/netinet/igmp.c stable/8/sys/netinet6/nd6_rtr.c Changes in other areas also in this revision: Modified: stable/9/contrib/ntp/ntpd/ntp_crypto.c stable/9/contrib/ntp/ntpd/ntp_proto.c stable/9/sys/netinet/igmp.c stable/9/sys/netinet6/nd6_rtr.c Modified: stable/8/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/8/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/8/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:44 2015 (r281231) @@ -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/8/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- stable/8/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/8/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:44 2015 (r281231) @@ -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/8/sys/netinet/igmp.c ============================================================================== --- stable/8/sys/netinet/igmp.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/8/sys/netinet/igmp.c Tue Apr 7 20:20:44 2015 (r281231) @@ -1533,7 +1533,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; @@ -1541,8 +1540,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; } @@ -1551,7 +1550,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/8/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/8/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/8/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:44 2015 (r281231) @@ -286,8 +286,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); } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 7 21:05:54 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 00:13:18 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 00:35:14 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 00:49:55 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 00:52:47 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 01:02:12 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 01:05:51 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 01:07:52 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 01:09:37 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 01:16:20 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 01:25:27 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 01:43:31 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 02:15:14 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 02:21:46 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 03:55:04 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 04:40:05 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 05:02:22 2015 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Apr 8 19:49:43 2015 Return-Path: Delivered-To: svn-src-stable@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 130C5C05; Wed, 8 Apr 2015 19:49:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC8CCEA5; Wed, 8 Apr 2015 19:49: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 t38JngC5001081; Wed, 8 Apr 2015 19:49:42 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38Jnd0S001068; Wed, 8 Apr 2015 19:49:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504081949.t38Jnd0S001068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 8 Apr 2015 19:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281273 - in stable/9: contrib/bind9 contrib/bind9/bin/check contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec contrib/bind9/bin/named contrib/bind9/bin/n... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 19:49:43 -0000 Author: delphij Date: Wed Apr 8 19:49:38 2015 New Revision: 281273 URL: https://svnweb.freebsd.org/changeset/base/281273 Log: Update BIND to 9.9.7. This is a direct commit to stable/9 because BIND is no longer in -HEAD. Added: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch11.html - copied unchanged from r281268, vendor/bind9/dist/doc/arm/Bv9ARM.ch11.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch12.html - copied unchanged from r281268, vendor/bind9/dist/doc/arm/Bv9ARM.ch12.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch13.html - copied unchanged from r281268, vendor/bind9/dist/doc/arm/Bv9ARM.ch13.html stable/9/contrib/bind9/doc/arm/notes-wrapper.xml - copied unchanged from r281268, vendor/bind9/dist/doc/arm/notes-wrapper.xml stable/9/contrib/bind9/doc/arm/notes.html - copied unchanged from r281268, vendor/bind9/dist/doc/arm/notes.html stable/9/contrib/bind9/doc/arm/notes.pdf - copied unchanged from r281268, vendor/bind9/dist/doc/arm/notes.pdf stable/9/contrib/bind9/doc/arm/notes.xml - copied unchanged from r281268, vendor/bind9/dist/doc/arm/notes.xml stable/9/contrib/bind9/lib/dns/rdata/generic/openpgpkey_61.c - copied unchanged from r281268, vendor/bind9/dist/lib/dns/rdata/generic/openpgpkey_61.c stable/9/contrib/bind9/lib/dns/rdata/generic/openpgpkey_61.h - copied unchanged from r281268, vendor/bind9/dist/lib/dns/rdata/generic/openpgpkey_61.h Modified: stable/9/contrib/bind9/CHANGES stable/9/contrib/bind9/COPYRIGHT stable/9/contrib/bind9/FAQ.xml stable/9/contrib/bind9/README stable/9/contrib/bind9/bin/check/named-checkconf.c stable/9/contrib/bind9/bin/dig/dig.1 stable/9/contrib/bind9/bin/dig/dig.docbook stable/9/contrib/bind9/bin/dig/dig.html stable/9/contrib/bind9/bin/dig/dighost.c stable/9/contrib/bind9/bin/dig/host.c stable/9/contrib/bind9/bin/dig/include/dig/dig.h stable/9/contrib/bind9/bin/dig/nslookup.c stable/9/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c stable/9/contrib/bind9/bin/dnssec/dnssec-importkey.c stable/9/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.c stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.html stable/9/contrib/bind9/bin/dnssec/dnssec-settime.8 stable/9/contrib/bind9/bin/dnssec/dnssec-settime.c stable/9/contrib/bind9/bin/dnssec/dnssec-settime.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-settime.html stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/9/contrib/bind9/bin/dnssec/dnssec-verify.c stable/9/contrib/bind9/bin/dnssec/dnssectool.c stable/9/contrib/bind9/bin/dnssec/dnssectool.h stable/9/contrib/bind9/bin/named/client.c stable/9/contrib/bind9/bin/named/config.c stable/9/contrib/bind9/bin/named/include/named/globals.h stable/9/contrib/bind9/bin/named/interfacemgr.c stable/9/contrib/bind9/bin/named/main.c stable/9/contrib/bind9/bin/named/named.html stable/9/contrib/bind9/bin/named/query.c stable/9/contrib/bind9/bin/named/server.c stable/9/contrib/bind9/bin/named/update.c stable/9/contrib/bind9/bin/named/zoneconf.c stable/9/contrib/bind9/bin/nsupdate/nsupdate.c stable/9/contrib/bind9/bin/rndc/rndc.c stable/9/contrib/bind9/config.h.in stable/9/contrib/bind9/configure.in stable/9/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/9/contrib/bind9/doc/arm/Bv9ARM.html stable/9/contrib/bind9/doc/arm/Bv9ARM.pdf stable/9/contrib/bind9/doc/arm/Makefile.in stable/9/contrib/bind9/doc/arm/dnssec.xml stable/9/contrib/bind9/doc/arm/man.arpaname.html stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html stable/9/contrib/bind9/doc/arm/man.dig.html stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html stable/9/contrib/bind9/doc/arm/man.dnssec-settime.html stable/9/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/9/contrib/bind9/doc/arm/man.dnssec-verify.html stable/9/contrib/bind9/doc/arm/man.genrandom.html stable/9/contrib/bind9/doc/arm/man.host.html stable/9/contrib/bind9/doc/arm/man.isc-hmac-fixup.html stable/9/contrib/bind9/doc/arm/man.named-checkconf.html stable/9/contrib/bind9/doc/arm/man.named-checkzone.html stable/9/contrib/bind9/doc/arm/man.named-journalprint.html stable/9/contrib/bind9/doc/arm/man.named.html stable/9/contrib/bind9/doc/arm/man.nsec3hash.html stable/9/contrib/bind9/doc/arm/man.nsupdate.html stable/9/contrib/bind9/doc/arm/man.rndc-confgen.html stable/9/contrib/bind9/doc/arm/man.rndc.conf.html stable/9/contrib/bind9/doc/arm/man.rndc.html stable/9/contrib/bind9/lib/bind9/api stable/9/contrib/bind9/lib/bind9/check.c stable/9/contrib/bind9/lib/bind9/getaddresses.c stable/9/contrib/bind9/lib/dns/adb.c stable/9/contrib/bind9/lib/dns/api stable/9/contrib/bind9/lib/dns/diff.c stable/9/contrib/bind9/lib/dns/dispatch.c stable/9/contrib/bind9/lib/dns/gen.c stable/9/contrib/bind9/lib/dns/include/dns/dispatch.h stable/9/contrib/bind9/lib/dns/include/dns/log.h stable/9/contrib/bind9/lib/dns/include/dns/rbt.h stable/9/contrib/bind9/lib/dns/include/dns/request.h stable/9/contrib/bind9/lib/dns/journal.c stable/9/contrib/bind9/lib/dns/keytable.c stable/9/contrib/bind9/lib/dns/log.c stable/9/contrib/bind9/lib/dns/master.c stable/9/contrib/bind9/lib/dns/masterdump.c stable/9/contrib/bind9/lib/dns/message.c stable/9/contrib/bind9/lib/dns/name.c stable/9/contrib/bind9/lib/dns/nsec3.c stable/9/contrib/bind9/lib/dns/openssldh_link.c stable/9/contrib/bind9/lib/dns/opensslecdsa_link.c stable/9/contrib/bind9/lib/dns/opensslgost_link.c stable/9/contrib/bind9/lib/dns/private.c stable/9/contrib/bind9/lib/dns/rbt.c stable/9/contrib/bind9/lib/dns/rbtdb.c stable/9/contrib/bind9/lib/dns/rdata.c stable/9/contrib/bind9/lib/dns/rdata/generic/cdnskey_60.c stable/9/contrib/bind9/lib/dns/rdata/generic/cds_59.c stable/9/contrib/bind9/lib/dns/rdata/generic/keydata_65533.c stable/9/contrib/bind9/lib/dns/rdata/generic/nsec3_50.c stable/9/contrib/bind9/lib/dns/rdata/generic/opt_41.c stable/9/contrib/bind9/lib/dns/rdata/generic/rrsig_46.c stable/9/contrib/bind9/lib/dns/rdata/generic/sig_24.c stable/9/contrib/bind9/lib/dns/rdata/generic/spf_99.h stable/9/contrib/bind9/lib/dns/rdata/generic/txt_16.c stable/9/contrib/bind9/lib/dns/rdataset.c stable/9/contrib/bind9/lib/dns/request.c stable/9/contrib/bind9/lib/dns/resolver.c stable/9/contrib/bind9/lib/dns/rootns.c stable/9/contrib/bind9/lib/dns/spnego_asn1.c stable/9/contrib/bind9/lib/dns/tkey.c stable/9/contrib/bind9/lib/dns/tsig.c stable/9/contrib/bind9/lib/dns/validator.c stable/9/contrib/bind9/lib/dns/zone.c stable/9/contrib/bind9/lib/dns/zt.c stable/9/contrib/bind9/lib/export/isc/Makefile.in stable/9/contrib/bind9/lib/export/isc/unix/Makefile.in stable/9/contrib/bind9/lib/export/samples/nsprobe.c stable/9/contrib/bind9/lib/export/samples/sample-request.c stable/9/contrib/bind9/lib/export/samples/sample-update.c stable/9/contrib/bind9/lib/irs/getnameinfo.c stable/9/contrib/bind9/lib/isc/api stable/9/contrib/bind9/lib/isc/hash.c stable/9/contrib/bind9/lib/isc/hmacmd5.c stable/9/contrib/bind9/lib/isc/hmacsha.c stable/9/contrib/bind9/lib/isc/httpd.c stable/9/contrib/bind9/lib/isc/include/isc/platform.h.in stable/9/contrib/bind9/lib/isc/include/isc/radix.h stable/9/contrib/bind9/lib/isc/include/isc/ratelimiter.h stable/9/contrib/bind9/lib/isc/md5.c stable/9/contrib/bind9/lib/isc/mem.c stable/9/contrib/bind9/lib/isc/radix.c stable/9/contrib/bind9/lib/isc/ratelimiter.c stable/9/contrib/bind9/lib/isc/result.c stable/9/contrib/bind9/lib/isc/sha1.c stable/9/contrib/bind9/lib/isc/sha2.c stable/9/contrib/bind9/lib/isc/unix/app.c stable/9/contrib/bind9/lib/isc/unix/include/isc/net.h stable/9/contrib/bind9/lib/isc/unix/include/isc/time.h stable/9/contrib/bind9/lib/isc/unix/net.c stable/9/contrib/bind9/lib/isc/unix/socket.c stable/9/contrib/bind9/lib/isc/unix/stdio.c stable/9/contrib/bind9/lib/isc/unix/time.c stable/9/contrib/bind9/lib/isccfg/api stable/9/contrib/bind9/lib/isccfg/parser.c stable/9/contrib/bind9/lib/lwres/api stable/9/contrib/bind9/lib/lwres/compat.c stable/9/contrib/bind9/lib/lwres/gethost.c stable/9/contrib/bind9/lib/lwres/man/lwres.html stable/9/contrib/bind9/lib/lwres/man/lwres_buffer.html stable/9/contrib/bind9/lib/lwres/man/lwres_config.html stable/9/contrib/bind9/lib/lwres/man/lwres_context.html stable/9/contrib/bind9/lib/lwres/man/lwres_gabn.html stable/9/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html stable/9/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html stable/9/contrib/bind9/lib/lwres/man/lwres_gethostent.html stable/9/contrib/bind9/lib/lwres/man/lwres_getipnode.html stable/9/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html stable/9/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html stable/9/contrib/bind9/lib/lwres/man/lwres_gnba.html stable/9/contrib/bind9/lib/lwres/man/lwres_hstrerror.html stable/9/contrib/bind9/lib/lwres/man/lwres_inetntop.html stable/9/contrib/bind9/lib/lwres/man/lwres_noop.html stable/9/contrib/bind9/lib/lwres/man/lwres_packet.html stable/9/contrib/bind9/lib/lwres/man/lwres_resutil.html stable/9/contrib/bind9/version stable/9/lib/bind/config.h stable/9/lib/bind/dns/code.h stable/9/lib/bind/dns/dns/enumclass.h stable/9/lib/bind/dns/dns/enumtype.h stable/9/lib/bind/dns/dns/rdatastruct.h stable/9/lib/bind/isc/isc/platform.h Directory Properties: stable/9/contrib/bind9/ (props changed) Modified: stable/9/contrib/bind9/CHANGES ============================================================================== --- stable/9/contrib/bind9/CHANGES Wed Apr 8 19:46:13 2015 (r281272) +++ stable/9/contrib/bind9/CHANGES Wed Apr 8 19:49:38 2015 (r281273) @@ -1,11 +1,145 @@ - --- 9.9.6-P2 released --- + --- 9.9.7 released --- + + --- 9.9.7rc2 released --- + +4061. [bug] Handle timeout in legacy system test. [RT #38573] + +4060. [bug] dns_rdata_freestruct could be called on a + uninitialised structure when handling a error. + [RT #38568] + +4059. [bug] Addressed valgrind warnings. [RT #38549] + +4058. [bug] UDP dispatches could use the wrong pseudorandom + number generator context. [RT #38578] + +4056. [bug] Fixed several small bugs in automatic trust anchor + management, including a memory leak and a possible + loss of key state information. [RT #38458] + +4057. [bug] 'dnssec-dsfromkey -T 0' failed to add ttl field. + [RT #38565] 4053. [security] Revoking a managed trust anchor and supplying an untrusted replacement could cause named to crash with an assertion failure. (CVE-2015-1349) [RT #38344] - --- 9.9.6-P1 released --- +4052. [bug] Fix a leak of query fetchlock. [RT #38454] + +4050. [bug] RPZ could send spurious SERVFAILs in response + to duplicate queries. [RT #38510] + +4049. [bug] CDS and CDNSKEY had the wrong attributes. [RT #38491] + +4048. [bug] adb hash table was not being grown. [RT #38470] + + --- 9.9.7rc1 released --- + +4047. [cleanup] "named -V" now reports the current running versions + of OpenSSL and the libxml2 libraries, in addition to + the versions that were in use at build time. + +4046. [bug] Accounting of "total use" in memory context + statistics was not correct. [RT #38370] + +4045. [bug] Skip to next master on dns_request_createvia4 failure. + [RT #25185] + +4044. [bug] Change 3955 was not complete, resulting in an assertion + failure if the timing was just right. [RT #38352] + +4039. [cleanup] Cleaned up warnings from gcc -Wshadow. [RT #37381] + +4038. [bug] Add 'rpz' flag to node and use it to determine whether + to call dns_rpz_delete. This should prevent unbalanced + add / delete calls. [RT #36888] + +4037. [bug] also-notify was ignoring the tsig key when checking + for duplicates resulting in some expected notify + messages not being sent. [RT #38369] + +4035. [bug] Close temporary and NZF FILE pointers before moving + the former into the latter's place, as required on + Windows. [RT #38332] + +4032. [bug] Built-in "empty" zones did not correctly inherit the + "allow-transfer" ACL from the options or view. + [RT #38310] + +4031. [bug] named-checkconf -z failed to report a missing file + with a hint zone. [RT #38294] + +4028. [bug] $GENERATE with a zero step was not being caught as a + error. A $GENERATE with a / but no step was not being + caught as a error. [RT #38262] + +3973. [test] Added hooks for Google Performance Tools CPU profiler, + including real-time/wall-clock profiling. Use + "configure --with-gperftools-profiler" to enable. + [RT #37339] + + --- 9.9.7b1 released --- + +4027. [port] Net::DNS 0.81 compatibility. [RT #38165] + +4026. [bug] Fix RFC 3658 reference in dig +sigchase. [RT #38173] + +4025. [port] bsdi: failed to build. [RT #38047] + +4024. [bug] dns_rdata_opt_first, dns_rdata_opt_next, + dns_rdata_opt_current, dns_rdata_txt_first, + dns_rdata_txt_next and dns_rdata_txt_current were + documented but not implemented. These have now been + implemented. + + dns_rdata_spf_first, dns_rdata_spf_next and + dns_rdata_spf_current were documented but not + implemented. The prototypes for these + functions have been removed. [RT #38068] + +4023. [bug] win32: socket handling with explicit ports and + invoking named with -4 was broken for some + configurations. [RT #38068] + +4021. [bug] Adjust max-recursion-queries to accommodate + the need for more queries when the cache is + empty. [RT #38104] + +4020. [bug] Change 3736 broke nsupdate's SOA MNAME discovery + resulting in updates being sent to the wrong server. + [RT #37925] + +4019. [func] If named is not configured to validate the answer + then allow fallback to plain DNS on timeout even + when we know the server supports EDNS. [RT #37978] + +4018. [bug] Fall back to plain DNS when EDNS queries are being + dropped was failing. [RT #37965] + +4017. [test] Add system test to check lookups to legacy servers + with broken DNS behavior. [RT #37965] + +4016. [bug] Fix a dig segfault due to bad linked list usage. + [RT #37591] + +4015. [bug] Nameservers that are skipped due to them being + CNAMEs were not being logged. They are now logged + to category 'cname' as per BIND 8. [RT #37935] + +4014. [bug] When including a master file origin_changed was + not being properly set leading to a potentially + spurious 'inherited owner' warning. [RT #37919] + +4012. [bug] Check returned status of OpenSSL digest and HMAC + functions when they return one. Note this applies + only to FIPS capable OpenSSL libraries put in + FIPS mode and MD5. [RT #37944] + +4011. [bug] master's list port inheritance was not properly + implemented. [RT #37792] + +4007. [doc] Remove acl forward reference restriction. [RT #37772] 4006. [security] A flaw in delegation handling could be exploited to put named into an infinite loop. This has @@ -19,6 +153,99 @@ "max-recursion-depth" option, and the query limit via the "max-recursion-queries" option. [RT #37580] +4004. [bug] When delegations had AAAA glue but not A, a + reference could be leaked causing an assertion + failure on shutdown. [RT #37796] + +4000. [bug] NXDOMAIN redirection incorrectly handled NXRRSET + from the redirect zone. [RT #37722] + +3998. [bug] isc_radix_search was returning matches that were + too precise. [RT #37680] + +3997. [protocol] Add OPENGPGKEY record. [RT# 37671] + +3996. [bug] Address use after free on out of memory error in + keyring_add. [RT #37639] + +3995. [bug] receive_secure_serial holds the zone lock for too + long. [RT #37626] + +3990. [testing] Add tests for unknown DNSSEC algorithm handling. + [RT #37541] + +3989. [cleanup] Remove redundant dns_db_resigned calls. [RT #35748] + +3987. [func] Handle future Visual Studio 14 incompatible changes. + [RT #37380] + +3986. [doc] Add the BIND version number to page footers + in the ARM. [RT #37398] + +3985. [doc] Describe how +ndots and +search interact in dig. + [RT #37529] + +3982. [doc] Include release notes in product documentation. + [RT #37272] + +3981. [bug] Cache DS/NXDOMAIN independently of other query types. + [RT #37467] + +3978. [test] Added a unit test for Diffie-Hellman key + computation, completing change #3974. [RT #37477] + +3976. [bug] When refreshing managed-key trust anchors, clear + any cached trust so that they will always be + revalidated with the current set of secure + roots. [RT #37506] + +3974. [bug] Handle DH_compute_key() failure correctly in + openssldh_link.c. [RT #37477] + +3972. [bug] Fix host's usage statement. [RT #37397] + +3971. [bug] Reduce the cascading failures due to a bad $TTL line + in named-checkconf / named-checkzone. [RT #37138] + +3970. [contrib] Fixed a use after free bug in the SDB LDAP driver. + [RT #37237] + +3968. [bug] Silence spurious log messages when using 'named -[46]'. + [RT #37308] + +3967. [test] Add test for inlined signed zone in multiple views + with different DNSKEY sets. [RT #35759] + +3966. [bug] Missing dns_db_closeversion call in receive_secure_db. + [RT #35746] + +3962. [bug] 'dig +topdown +trace +sigchase' address unhandled error + conditions. [RT #34663] + +3961. [bug] Forwarding of SIG(0) signed UPDATE messages failed with + BADSIG. [RT #37216] + +3960. [bug] 'dig +sigchase' could loop forever. [RT #37220] + +3959. [bug] Updates could be lost if they arrived immediately + after a rndc thaw. [RT #37233] + +3958. [bug] Detect when writeable files have multiple references + in named.conf. [RT #37172] + +3957. [bug] "dnssec-keygen -S" failed for ECCGOST, ECDSAP256SHA256 + and ECDSAP384SHA384. [RT #37183] + +3955. [bug] Notify messages due to changes are no longer queued + behind startup notify messages. [RT #24454] + +3954. [bug] Unchecked mutex init in dlz_dlopen_driver.c [RT #37112] + +3953. [bug] Don't escape semi-colon in TXT fields. [RT #37159] + +3952. [bug] dns_name_fullcompare failed to set *nlabelsp when the + two name pointers were the same. [RT #37176] + --- 9.9.6 released --- 3950. [port] Changed the bin/python Makefile to work around a @@ -63,7 +290,7 @@ 3922. [bug] When resigning, dnssec-signzone was removing all signatures from delegation nodes. It now - retains DS and (if applicable) NSEC signatures. + retains DS and (if applicable) NSEC signatures. [RT #36946] 3921. [bug] AD was inappropriately set on RPZ responses. [RT #36833] Modified: stable/9/contrib/bind9/COPYRIGHT ============================================================================== --- stable/9/contrib/bind9/COPYRIGHT Wed Apr 8 19:46:13 2015 (r281272) +++ stable/9/contrib/bind9/COPYRIGHT Wed Apr 8 19:49:38 2015 (r281273) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any Modified: stable/9/contrib/bind9/FAQ.xml ============================================================================== --- stable/9/contrib/bind9/FAQ.xml Wed Apr 8 19:46:13 2015 (r281272) +++ stable/9/contrib/bind9/FAQ.xml Wed Apr 8 19:49:38 2015 (r281273) @@ -1,7 +1,7 @@