From owner-svn-src-stable-11@freebsd.org Sun Jun 4 02:21:39 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F7DEAF8764; Sun, 4 Jun 2017 02:21:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E58AD79; Sun, 4 Jun 2017 02:21:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v542Lcax051832; Sun, 4 Jun 2017 02:21:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v542LcYS051831; Sun, 4 Jun 2017 02:21:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706040221.v542LcYS051831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 4 Jun 2017 02:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319560 - stable/11/usr.bin/mkimg/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2017 02:21:39 -0000 Author: ngie Date: Sun Jun 4 02:21:38 2017 New Revision: 319560 URL: https://svnweb.freebsd.org/changeset/base/319560 Log: MFC r319294: Approved by: re (gjb) Fix "make rebase" after ^/head@r315776 "make rebase" can be used for rebasing the output files from mkimg after making a change to mkimg. This will come in handy soon, per bug 219673. Modified: stable/11/usr.bin/mkimg/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mkimg/tests/Makefile ============================================================================== --- stable/11/usr.bin/mkimg/tests/Makefile Sat Jun 3 23:13:46 2017 (r319559) +++ stable/11/usr.bin/mkimg/tests/Makefile Sun Jun 4 02:21:38 2017 (r319560) @@ -2,7 +2,8 @@ PACKAGE= tests -ATF_TESTS_SH= mkimg_test +_REBASE_SCRIPT= mkimg_test +ATF_TESTS_SH= ${_REBASE_SCRIPT} SOURCES!= cd ${.CURDIR}; echo *.uu ${PACKAGE}FILES+= ${SOURCES:S,.gz.uu,,g} @@ -12,7 +13,7 @@ ${${PACKAGE}FILES}: CLEANFILES+= ${${PACKAGE}FILES}} -rebase: - (cd ${.CURDIR}; atf-sh mkimg.sh rebase) +rebase: .PHONY + (cd ${.CURDIR}; atf-sh ${_REBASE_SCRIPT}.sh rebase) .include From owner-svn-src-stable-11@freebsd.org Sun Jun 4 08:25:30 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 903BBAFD986; Sun, 4 Jun 2017 08:25:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63F036E3B4; Sun, 4 Jun 2017 08:25:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v548PTs4001274; Sun, 4 Jun 2017 08:25:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v548PTEG001273; Sun, 4 Jun 2017 08:25:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706040825.v548PTEG001273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Jun 2017 08:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319563 - stable/11/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2017 08:25:30 -0000 Author: hselasky Date: Sun Jun 4 08:25:28 2017 New Revision: 319563 URL: https://svnweb.freebsd.org/changeset/base/319563 Log: MFC r319414: Allow communication between functions on the same host when using the mlx4en(4) driver in SRIOV mode. Place a copy of the destination MAC address in the send WQE only under SRIOV/eSwitch configuration or when the device is in selftest. This allows communication between functions on the same host. PR: 216493 Approved by: re (kib) Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/en_tx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/en_tx.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/en_tx.c Sun Jun 4 02:45:18 2017 (r319562) +++ stable/11/sys/ofed/drivers/net/mlx4/en_tx.c Sun Jun 4 08:25:28 2017 (r319563) @@ -661,18 +661,6 @@ static void mlx4_bf_copy(void __iomem *dst, volatile u __iowrite64_copy(dst, __DEVOLATILE(void *, src), bytecnt / 8); } -static u64 mlx4_en_mac_to_u64(u8 *addr) -{ - u64 mac = 0; - int i; - - for (i = 0; i < ETHER_ADDR_LEN; i++) { - mac <<= 8; - mac |= addr[i]; - } - return mac; -} - static int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_ind, struct mbuf **mbp) { enum { @@ -770,8 +758,18 @@ static int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_desc->ctrl.ins_vlan = 0; } - /* clear immediate field */ - tx_desc->ctrl.imm = 0; + if (unlikely(mlx4_is_mfunc(priv->mdev->dev) || priv->validate_loopback)) { + /* + * Copy destination MAC address to WQE. This allows + * loopback in eSwitch, so that VFs and PF can + * communicate with each other: + */ + m_copydata(mb, 0, 2, __DEVOLATILE(void *, &tx_desc->ctrl.srcrb_flags16[0])); + m_copydata(mb, 2, 4, __DEVOLATILE(void *, &tx_desc->ctrl.imm)); + } else { + /* clear immediate field */ + tx_desc->ctrl.imm = 0; + } /* Handle LSO (TSO) packets */ if (mb->m_pkthdr.csum_flags & CSUM_TSO) { @@ -929,22 +927,6 @@ skip_dma: mlx4_en_store_inline_lso_header(dseg_inline, ihs, owner_bit); else mlx4_en_store_inline_header(dseg_inline, ihs, owner_bit); - - if (unlikely(priv->validate_loopback)) { - /* Copy dst mac address to wqe */ - struct ether_header *ethh; - u64 mac; - u32 mac_l, mac_h; - - ethh = mtod(mb, struct ether_header *); - mac = mlx4_en_mac_to_u64(ethh->ether_dhost); - if (mac) { - mac_h = (u32) ((mac & 0xffff00000000ULL) >> 16); - mac_l = (u32) (mac & 0xffffffff); - tx_desc->ctrl.srcrb_flags |= cpu_to_be32(mac_h); - tx_desc->ctrl.imm = cpu_to_be32(mac_l); - } - } /* update producer counter */ ring->prod += tx_info->nr_txbb; From owner-svn-src-stable-11@freebsd.org Sun Jun 4 08:45:15 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 014D2AFDE70; Sun, 4 Jun 2017 08:45:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C31AC6EDEB; Sun, 4 Jun 2017 08:45:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v548jDc0009570; Sun, 4 Jun 2017 08:45:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v548jDLx009569; Sun, 4 Jun 2017 08:45:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706040845.v548jDLx009569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Jun 2017 08:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319566 - stable/11/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2017 08:45:15 -0000 Author: hselasky Date: Sun Jun 4 08:45:13 2017 New Revision: 319566 URL: https://svnweb.freebsd.org/changeset/base/319566 Log: MFC r319413: Free hardware queue resource after port is stopped in the mlx4en(4) driver. Else if the port is up the resource might still be busy and the MTT free will fail. PR: 216493 Approved by: re (kib) Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 4 08:30:55 2017 (r319565) +++ stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 4 08:45:13 2017 (r319566) @@ -1731,13 +1731,12 @@ void mlx4_en_destroy_netdev(struct net_device *dev) mutex_unlock(&mdev->state_lock); } - if (priv->allocated) - mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); - mutex_lock(&mdev->state_lock); mlx4_en_stop_port(dev); mutex_unlock(&mdev->state_lock); + if (priv->allocated) + mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); cancel_delayed_work(&priv->stats_task); cancel_delayed_work(&priv->service_task); From owner-svn-src-stable-11@freebsd.org Sun Jun 4 19:09:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9F19B95879; Sun, 4 Jun 2017 19:09:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87A1B80649; Sun, 4 Jun 2017 19:09:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v54J9ox6063972; Sun, 4 Jun 2017 19:09:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v54J9o9D063971; Sun, 4 Jun 2017 19:09:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706041909.v54J9o9D063971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Jun 2017 19:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319572 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2017 19:09:51 -0000 Author: bdrewery Date: Sun Jun 4 19:09:50 2017 New Revision: 319572 URL: https://svnweb.freebsd.org/changeset/base/319572 Log: MFC r318194,r319481: r318194: Tell bmake (meta mode) to ignore changes to /usr/local/etc/libmap.d/* r319481: META_MODE: Move ignoring of /usr/local/etc/libmap.d to proper place. Approved by: re (gjb) Modified: stable/11/share/mk/sys.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/sys.mk ============================================================================== --- stable/11/share/mk/sys.mk Sun Jun 4 18:35:30 2017 (r319571) +++ stable/11/share/mk/sys.mk Sun Jun 4 19:09:50 2017 (r319572) @@ -91,7 +91,11 @@ META_MODE?= normal /usr/share \ .endif - +.if !empty(.MAKE.MODE:Mmeta) +# We do not want everything out-of-date just because +# some unrelated shared lib updated this. +.MAKE.META.IGNORE_PATHS+= /usr/local/etc/libmap.d +.endif .if ${MK_AUTO_OBJ} == "yes" # This needs to be done early - before .PATH is computed From owner-svn-src-stable-11@freebsd.org Sun Jun 4 19:56:23 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4350ABD3680; Sun, 4 Jun 2017 19:56:23 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E28E81C0A; Sun, 4 Jun 2017 19:56:22 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v54JuMqh083988; Sun, 4 Jun 2017 19:56:22 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v54JuMlo083987; Sun, 4 Jun 2017 19:56:22 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201706041956.v54JuMlo083987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 4 Jun 2017 19:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319573 - stable/11/sys/compat/linux X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2017 19:56:23 -0000 Author: dchagin Date: Sun Jun 4 19:56:21 2017 New Revision: 319573 URL: https://svnweb.freebsd.org/changeset/base/319573 Log: MFC r317601: Fix symlinkat() which use the newdfd argument to look up the old path, while it should use it for the new path instead. Approved by: re (kib) Modified: stable/11/sys/compat/linux/linux_file.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_file.c ============================================================================== --- stable/11/sys/compat/linux/linux_file.c Sun Jun 4 19:09:50 2017 (r319572) +++ stable/11/sys/compat/linux/linux_file.c Sun Jun 4 19:56:21 2017 (r319573) @@ -826,7 +826,7 @@ linux_symlinkat(struct thread *td, struct linux_symlin int error, dfd; dfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd; - LCONVPATHEXIST_AT(td, args->oldname, &path, dfd); + LCONVPATHEXIST(td, args->oldname, &path); /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ error = linux_emul_convpath(td, args->newname, UIO_USERSPACE, &to, 1, dfd); if (to == NULL) { From owner-svn-src-stable-11@freebsd.org Sun Jun 4 19:58:15 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC414BD3793; Sun, 4 Jun 2017 19:58:15 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB2C681E2A; Sun, 4 Jun 2017 19:58:15 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v54JwEeI084192; Sun, 4 Jun 2017 19:58:14 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v54JwEET084190; Sun, 4 Jun 2017 19:58:14 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201706041958.v54JwEET084190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 4 Jun 2017 19:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319574 - in stable/11/sys/modules: linux linux64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2017 19:58:16 -0000 Author: dchagin Date: Sun Jun 4 19:58:14 2017 New Revision: 319574 URL: https://svnweb.freebsd.org/changeset/base/319574 Log: MFC r319052: Strip _binary_linux_locore_o_size from ${VDSO}.so as it is a low absolute symbol, and this breaks symbol lookup in ddb. Approved by: re (kib) Modified: stable/11/sys/modules/linux/Makefile stable/11/sys/modules/linux64/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/linux/Makefile ============================================================================== --- stable/11/sys/modules/linux/Makefile Sun Jun 4 19:56:21 2017 (r319573) +++ stable/11/sys/modules/linux/Makefile Sun Jun 4 19:58:14 2017 (r319574) @@ -64,10 +64,12 @@ linux${SFX}_support.o: linux${SFX}_assym.h assym.s ${VDSO}.so: linux${SFX}_locore.o ${OBJCOPY} --input-target binary --output-target elf64-x86-64-freebsd \ --binary-architecture i386 linux${SFX}_locore.o ${.TARGET} + strip -N _binary_linux${SFX}_locore_o_size ${.TARGET} .else ${VDSO}.so: linux${SFX}_locore.o ${OBJCOPY} --input-target binary --output-target elf32-i386-freebsd \ --binary-architecture i386 linux${SFX}_locore.o ${.TARGET} + strip -N _binary_linux_locore_o_size ${.TARGET} .endif linux${SFX}_genassym.o: Modified: stable/11/sys/modules/linux64/Makefile ============================================================================== --- stable/11/sys/modules/linux64/Makefile Sun Jun 4 19:56:21 2017 (r319573) +++ stable/11/sys/modules/linux64/Makefile Sun Jun 4 19:58:14 2017 (r319574) @@ -38,6 +38,7 @@ linux_locore.o: linux_locore.s linux_assym.h ${VDSO}.so: linux_locore.o ${OBJCOPY} --input-target binary --output-target elf64-x86-64-freebsd \ -S -g --binary-architecture i386:x86-64 linux_locore.o ${.TARGET} + strip -N _binary_linux_locore_o_size ${.TARGET} linux_support.o: assym.s linux_assym.h ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ From owner-svn-src-stable-11@freebsd.org Mon Jun 5 11:11:09 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C432FBFC633; Mon, 5 Jun 2017 11:11:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A034179FD0; Mon, 5 Jun 2017 11:11:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v55BB8kX057786; Mon, 5 Jun 2017 11:11:08 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v55BB8eu057778; Mon, 5 Jun 2017 11:11:08 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201706051111.v55BB8eu057778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 5 Jun 2017 11:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319599 - stable/11/sys/netipsec X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2017 11:11:09 -0000 Author: ae Date: Mon Jun 5 11:11:07 2017 New Revision: 319599 URL: https://svnweb.freebsd.org/changeset/base/319599 Log: MFC r319118: Disable IPsec debugging code by default when IPSEC_DEBUG kernel option is not specified. Due to the long call chain IPsec code can produce the kernel stack exhaustion on the i386 architecture. The debugging code usually is not used, but it requires a lot of stack space to keep buffers for strings formatting. This patch conditionally defines macros to disable building of IPsec debugging code. IPsec currently has two sysctl variables to configure debug output: * net.key.debug variable is used to enable debug output for PF_KEY protocol. Such debug messages are produced by KEYDBG() macro and usually they can be interesting for developers. * net.inet.ipsec.debug variable is used to enable debug output for DPRINTF() macro and ipseclog() function. DPRINTF() macro usually is used for development debugging. ipseclog() function is used for debugging by administrator. The patch disables KEYDBG() and DPRINTF() macros, and formatting buffers declarations when IPSEC_DEBUG is not present in kernel config. This reduces stack requirement for up to several hundreds of bytes. The net.inet.ipsec.debug variable still can be used to enable ipseclog() messages by administrator. PR: 219476 MFC r319412: Build kdebug_secreplay() function only when IPSEC_DEBUG is defined. This should fix the build on sparc. Approved by: re (kib) Modified: stable/11/sys/netipsec/ipsec.h stable/11/sys/netipsec/ipsec_input.c stable/11/sys/netipsec/ipsec_output.c stable/11/sys/netipsec/key_debug.c stable/11/sys/netipsec/key_debug.h stable/11/sys/netipsec/xform_ah.c stable/11/sys/netipsec/xform_esp.c stable/11/sys/netipsec/xform_ipcomp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netipsec/ipsec.h ============================================================================== --- stable/11/sys/netipsec/ipsec.h Mon Jun 5 11:04:22 2017 (r319598) +++ stable/11/sys/netipsec/ipsec.h Mon Jun 5 11:11:07 2017 (r319599) @@ -299,7 +299,13 @@ VNET_DECLARE(int, natt_cksum_policy); #define ipseclog(x) do { if (V_ipsec_debug) log x; } while (0) /* for openbsd compatibility */ +#ifdef IPSEC_DEBUG +#define IPSEC_DEBUG_DECLARE(x) x #define DPRINTF(x) do { if (V_ipsec_debug) printf x; } while (0) +#else +#define IPSEC_DEBUG_DECLARE(x) +#define DPRINTF(x) +#endif struct inpcb; struct m_tag; Modified: stable/11/sys/netipsec/ipsec_input.c ============================================================================== --- stable/11/sys/netipsec/ipsec_input.c Mon Jun 5 11:04:22 2017 (r319598) +++ stable/11/sys/netipsec/ipsec_input.c Mon Jun 5 11:11:07 2017 (r319599) @@ -117,7 +117,7 @@ __FBSDID("$FreeBSD$"); static int ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); union sockaddr_union dst_address; struct secasvar *sav; uint32_t spi; @@ -277,7 +277,7 @@ int ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int protoff) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); struct ipsec_ctx_data ctx; struct xform_history *xh; struct secasindex *saidx; @@ -488,7 +488,7 @@ int ipsec6_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int protoff) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); struct ipsec_ctx_data ctx; struct xform_history *xh; struct secasindex *saidx; Modified: stable/11/sys/netipsec/ipsec_output.c ============================================================================== --- stable/11/sys/netipsec/ipsec_output.c Mon Jun 5 11:04:22 2017 (r319598) +++ stable/11/sys/netipsec/ipsec_output.c Mon Jun 5 11:11:07 2017 (r319599) @@ -183,7 +183,6 @@ next: static int ipsec4_perform_request(struct mbuf *m, struct secpolicy *sp, u_int idx) { - char sbuf[IPSEC_ADDRSTRLEN], dbuf[IPSEC_ADDRSTRLEN]; struct ipsec_ctx_data ctx; union sockaddr_union *dst; struct secasvar *sav; @@ -230,12 +229,9 @@ ipsec4_perform_request(struct mbuf *m, struct secpolic ip->ip_sum = in_cksum(m, ip->ip_hl << 2); error = ipsec_encap(&m, &sav->sah->saidx); if (error != 0) { - DPRINTF(("%s: encapsulation for SA %s->%s " - "SPI 0x%08x failed with error %d\n", __func__, - ipsec_address(&sav->sah->saidx.src, sbuf, - sizeof(sbuf)), - ipsec_address(&sav->sah->saidx.dst, dbuf, - sizeof(dbuf)), ntohl(sav->spi), error)); + DPRINTF(("%s: encapsulation for SPI 0x%08x failed " + "with error %d\n", __func__, ntohl(sav->spi), + error)); /* XXXAE: IPSEC_OSTAT_INC(tunnel); */ goto bad; } @@ -497,7 +493,6 @@ next: static int ipsec6_perform_request(struct mbuf *m, struct secpolicy *sp, u_int idx) { - char sbuf[IPSEC_ADDRSTRLEN], dbuf[IPSEC_ADDRSTRLEN]; struct ipsec_ctx_data ctx; union sockaddr_union *dst; struct secasvar *sav; @@ -539,12 +534,9 @@ ipsec6_perform_request(struct mbuf *m, struct secpolic } error = ipsec_encap(&m, &sav->sah->saidx); if (error != 0) { - DPRINTF(("%s: encapsulation for SA %s->%s " - "SPI 0x%08x failed with error %d\n", __func__, - ipsec_address(&sav->sah->saidx.src, sbuf, - sizeof(sbuf)), - ipsec_address(&sav->sah->saidx.dst, dbuf, - sizeof(dbuf)), ntohl(sav->spi), error)); + DPRINTF(("%s: encapsulation for SPI 0x%08x failed " + "with error %d\n", __func__, ntohl(sav->spi), + error)); /* XXXAE: IPSEC_OSTAT_INC(tunnel); */ goto bad; } Modified: stable/11/sys/netipsec/key_debug.c ============================================================================== --- stable/11/sys/netipsec/key_debug.c Mon Jun 5 11:04:22 2017 (r319598) +++ stable/11/sys/netipsec/key_debug.c Mon Jun 5 11:11:07 2017 (r319599) @@ -77,10 +77,6 @@ static void kdebug_sadb_x_sa2(struct sadb_ext *); static void kdebug_sadb_x_sa_replay(struct sadb_ext *); static void kdebug_sadb_x_natt(struct sadb_ext *); -#ifdef _KERNEL -static void kdebug_secreplay(struct secreplay *); -#endif - #ifndef _KERNEL #define panic(fmt, ...) { printf(fmt, ## __VA_ARGS__); exit(-1); } #endif @@ -724,6 +720,7 @@ kdebug_secash(struct secashead *sah, const char *inden printf("}\n"); } +#ifdef IPSEC_DEBUG static void kdebug_secreplay(struct secreplay *rpl) { @@ -745,6 +742,7 @@ kdebug_secreplay(struct secreplay *rpl) } printf(" }\n"); } +#endif /* IPSEC_DEBUG */ static void kdebug_secnatt(struct secnatt *natt) Modified: stable/11/sys/netipsec/key_debug.h ============================================================================== --- stable/11/sys/netipsec/key_debug.h Mon Jun 5 11:04:22 2017 (r319598) +++ stable/11/sys/netipsec/key_debug.h Mon Jun 5 11:11:07 2017 (r319599) @@ -53,10 +53,14 @@ #define KEYDEBUG_IPSEC_DATA (KEYDEBUG_IPSEC | KEYDEBUG_DATA) #define KEYDEBUG_IPSEC_DUMP (KEYDEBUG_IPSEC | KEYDEBUG_DUMP) +#ifdef IPSEC_DEBUG #define KEYDBG(lev, arg) \ if ((V_key_debug_level & (KEYDEBUG_ ## lev)) == (KEYDEBUG_ ## lev)) { \ arg; \ } +#else +#define KEYDBG(lev, arg) +#endif /* !IPSEC_DEBUG */ VNET_DECLARE(uint32_t, key_debug_level); #define V_key_debug_level VNET(key_debug_level) Modified: stable/11/sys/netipsec/xform_ah.c ============================================================================== --- stable/11/sys/netipsec/xform_ah.c Mon Jun 5 11:04:22 2017 (r319598) +++ stable/11/sys/netipsec/xform_ah.c Mon Jun 5 11:11:07 2017 (r319599) @@ -544,7 +544,7 @@ ah_massage_headers(struct mbuf **m0, int proto, int sk static int ah_input(struct mbuf *m, struct secasvar *sav, int skip, int protoff) { - char buf[128]; + IPSEC_DEBUG_DECLARE(char buf[128]); const struct auth_hash *ahx; struct cryptodesc *crda; struct cryptop *crp; @@ -681,7 +681,7 @@ bad: static int ah_input_cb(struct cryptop *crp) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); unsigned char calc[AH_ALEN_MAX]; const struct auth_hash *ahx; struct mbuf *m; @@ -831,7 +831,7 @@ static int ah_output(struct mbuf *m, struct secpolicy *sp, struct secasvar *sav, u_int idx, int skip, int protoff) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); const struct auth_hash *ahx; struct cryptodesc *crda; struct xform_data *xd; Modified: stable/11/sys/netipsec/xform_esp.c ============================================================================== --- stable/11/sys/netipsec/xform_esp.c Mon Jun 5 11:04:22 2017 (r319598) +++ stable/11/sys/netipsec/xform_esp.c Mon Jun 5 11:11:07 2017 (r319599) @@ -263,7 +263,7 @@ esp_zeroize(struct secasvar *sav) static int esp_input(struct mbuf *m, struct secasvar *sav, int skip, int protoff) { - char buf[128]; + IPSEC_DEBUG_DECLARE(char buf[128]); const struct auth_hash *esph; const struct enc_xform *espx; struct xform_data *xd; @@ -436,7 +436,7 @@ bad: static int esp_input_cb(struct cryptop *crp) { - char buf[128]; + IPSEC_DEBUG_DECLARE(char buf[128]); u_int8_t lastthree[3], aalg[AH_HMAC_MAXHASHLEN]; const struct auth_hash *esph; const struct enc_xform *espx; @@ -622,7 +622,7 @@ static int esp_output(struct mbuf *m, struct secpolicy *sp, struct secasvar *sav, u_int idx, int skip, int protoff) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); struct cryptodesc *crde = NULL, *crda = NULL; struct cryptop *crp; const struct auth_hash *esph; Modified: stable/11/sys/netipsec/xform_ipcomp.c ============================================================================== --- stable/11/sys/netipsec/xform_ipcomp.c Mon Jun 5 11:04:22 2017 (r319598) +++ stable/11/sys/netipsec/xform_ipcomp.c Mon Jun 5 11:11:07 2017 (r319599) @@ -271,7 +271,7 @@ bad: static int ipcomp_input_cb(struct cryptop *crp) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); struct cryptodesc *crd; struct xform_data *xd; struct mbuf *m; @@ -387,7 +387,7 @@ static int ipcomp_output(struct mbuf *m, struct secpolicy *sp, struct secasvar *sav, u_int idx, int skip, int protoff) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); const struct comp_algo *ipcompx; struct cryptodesc *crdc; struct cryptop *crp; @@ -521,7 +521,7 @@ bad: static int ipcomp_output_cb(struct cryptop *crp) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); struct xform_data *xd; struct secpolicy *sp; struct secasvar *sav; From owner-svn-src-stable-11@freebsd.org Mon Jun 5 18:56:46 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC26FAFF426; Mon, 5 Jun 2017 18:56:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC59066139; Mon, 5 Jun 2017 18:56:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v55IujnO052905; Mon, 5 Jun 2017 18:56:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v55Iujms052904; Mon, 5 Jun 2017 18:56:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706051856.v55Iujms052904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Jun 2017 18:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319607 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2017 18:56:47 -0000 Author: gjb Date: Mon Jun 5 18:56:45 2017 New Revision: 319607 URL: https://svnweb.freebsd.org/changeset/base/319607 Log: Document r295930, truss(1) '-H' flag. Document r308154, cxgbe(4) additional virtual interface support. Submitted by: jhb Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 5 18:54:53 2017 (r319606) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 5 18:56:45 2017 (r319607) @@ -190,6 +190,10 @@ Userland Application Changes + The &man.truss.1; utility has been + updated to include the -H flag, which logs + the thread ID of a thread invoking a system call. + Support for &man.blacklistd.8; has been added to OpenSSH. @@ -644,6 +648,11 @@ sponsor="&chelsio;">The &man.cxgbev.4; driver has been added, providing support for Virtual Function devices (VFs) on Chelsio T4 and T5 adapters. + + The &man.cxgbe.4; driver has been updated + to support creating additional virtual interfaces on + a port. The &man.bnxt.4; driver has been added, From owner-svn-src-stable-11@freebsd.org Mon Jun 5 20:06:58 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13CA3B798CF for ; Mon, 5 Jun 2017 20:06:58 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDBFF682BE for ; Mon, 5 Jun 2017 20:06:57 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-qt0-x243.google.com with SMTP id w1so18614206qtg.0 for ; Mon, 05 Jun 2017 13:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LJAWP7dnByN4fFRi9rsgOzfLX/PkmrgrUl3gfcQlEeg=; b=BJakpuPL5o+CpWPaPcxNygNq9f4a6AJhxJBJVwfHEY+oa01tehDNomWXE2iz5JPbNR E6pqE42v7M/fY2iIb4/+c3D1be7ujFHpEEbtMda2thfX3PK84HZYFBauRVYKqUUnLUlm 2bu5BINIsvjbnqJ6jvItNAvQqosaLWzrDr35kxbwn4dYbiCtekbAuGn3xfn8TUp0AtJO TA8OKwCapZuhiigbfAsSKk6qCvMPfXSCFm9ROeEh8r+j9UhysmA2fdktQWMT1bdhqv74 A6QMZGp5YgTSlePyLw+YQmlX1B+faW+nkDHm8TB3AeCoBOkJoDSEkGwdk7RDArAxiG82 WHKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LJAWP7dnByN4fFRi9rsgOzfLX/PkmrgrUl3gfcQlEeg=; b=hXcYXMjKnhIm33CeIs69jqaiV2ZlL0a8Gxo8cm/qIBuaZfhpf7bZ9kHHT2KFHMiC6U 5zgiy7O4761uE4geQb0F3H7Ft75UUemBEWLTO44VcIM2Fae+IQzKsXLlwchSQW74gzC1 rAB8gGgpZwgpeoUo+FXChzFiXjzL1yjqSO/buGvVPBqWZ5VcU9sYwH60ETuwWWyDV8BK AAUICMYCf+Tx+GRezNLqSsLUnnElj0EYqqBTC8bTnk7uMQx9YIpxRN3+f1IgVDoFB3B6 4bCH1l83cjfN9rR8IdbmU1GA7fG8gbN684LPxdIzNnaX2oPZgH7pOhYktA3h7S8NUXbq Udnw== X-Gm-Message-State: AKS2vOzhT+rqSIcjnFA31u+/IGmwwO6Gn1pBFp01F7nDCgV/vnBx857A 2S/UGMELB3yuQQJT X-Received: by 10.200.14.66 with SMTP id j2mr4535479qti.229.1496693216714; Mon, 05 Jun 2017 13:06:56 -0700 (PDT) Received: from [10.192.166.0] (stargate.chelsio.com. [12.32.117.8]) by smtp.googlemail.com with ESMTPSA id t9sm9321732qth.46.2017.06.05.13.06.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jun 2017 13:06:55 -0700 (PDT) Sender: Navdeep Parhar Subject: Re: svn commit: r319269 - in stable/11/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware To: Mike Tancsa , "pholes@sentex.net" , svn-src-stable-11@freebsd.org References: <201705310016.v4V0G5n7012861@repo.freebsd.org> From: Navdeep Parhar Message-ID: <20a81b3e-17c7-df59-dda8-370d93eec899@FreeBSD.org> Date: Mon, 5 Jun 2017 13:06:51 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2017 20:06:58 -0000 On 06/02/2017 14:16, Mike Tancsa wrote: > > Hi, > Not sure if its the firmware for sure, but a number of DAC cables I > have been using without issue all of a sudden are failing. On the > switch port side, the link does not go down, but on the NIC side, the > link is bouncing up and down once a bit of traffic is place on it. I The firmware handles all transceiver setup and link so it must be the firmware, but passing traffic should not affect the link. Does the link really stay up steadily as long as there's no traffic? Once the link has bounced at least once (with or without traffic), run this and provide its output: # sysctl -n dev.t5nex.0.misc.devlog > swapped out the DAC cable for a plain old fiber SFP+ and its OK. The > same DAC cable works fine prior to this update > > Jun 2 17:07:26 intels12004u kernel: cxl1: link state changed to DOWN > Jun 2 17:07:27 intels12004u kernel: cxl1: link state changed to UP > Jun 2 17:08:50 intels12004u kernel: cxl1: link state changed to DOWN > Jun 2 17:08:50 intels12004u kernel: cxl1: link state changed to UP > Jun 2 17:09:08 intels12004u kernel: cxl1: link state changed to DOWN > Jun 2 17:09:08 intels12004u kernel: cxl1: link state changed to UP > Jun 2 17:10:52 intels12004u kernel: cxl1: link state changed to DOWN > Jun 2 17:10:53 intels12004u kernel: cxl1: link state changed to UP > Jun 2 17:12:15 intels12004u kernel: cxl1: link state changed to DOWN > Jun 2 17:12:15 intels12004u kernel: cxl1: link state changed to UP > 0(intels12004u)# ifconfig cxl1 > cxl1: flags=8843 metric 0 mtu 1500 > > options=ec07bb > ether 00:07:43:28:95:28 > hwaddr 00:07:43:28:95:28 > inet 3.3.3.1 netmask 0xffffff00 broadcast 3.3.3.255 > nd6 options=29 > media: Ethernet 10Gbase-SR > status: active > plugged: SFP/SFP+/SFP28 10G Base-SR (LC) > vendor: SOURCEPHOTONICS PN: SPP10ESRCDFB SN: G0611090002 DATE: > 2010-09-19 > module temperature: 20.35 C Voltage: 3.37 Volts > RX: 0.00 mW (-40.00 dBm) TX: 6.55 mW (8.16 dBm) > 0(intels12004u)# > > it for whatever reason shows it as fibre, but its twinax Please provide the full dump of the module's eeprom? # ifconfig -vvv cxl0/1 It is possible that the transceiver misidentifies itself and the firmware sets it up incorrectly as a result. It may have worked by accident in the past. Regards, Navdeep From owner-svn-src-stable-11@freebsd.org Mon Jun 5 23:16:34 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D653B7C268; Mon, 5 Jun 2017 23:16:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 6FDBA70D28; Mon, 5 Jun 2017 23:16:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id CE80710AFA2; Mon, 5 Jun 2017 19:16:31 -0400 (EDT) From: John Baldwin To: Glen Barber Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r319607 - stable/11/release/doc/en_US.ISO8859-1/relnotes Date: Mon, 05 Jun 2017 16:15:50 -0700 Message-ID: <3942689.MOD8xETb0x@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201706051856.v55Iujms052904@repo.freebsd.org> References: <201706051856.v55Iujms052904@repo.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.4.3 (mail.baldwin.cx); Mon, 05 Jun 2017 19:16:31 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2017 23:16:34 -0000 On Monday, June 05, 2017 06:56:45 PM Glen Barber wrote: > Author: gjb > Date: Mon Jun 5 18:56:45 2017 > New Revision: 319607 > URL: https://svnweb.freebsd.org/changeset/base/319607 > > Log: > Document r295930, truss(1) '-H' flag. > Document r308154, cxgbe(4) additional virtual interface support. Both of these features actually shipped in 11.0 so shouldn't be documented in the 11.1 notes (they are still new in 10.4 relative to 10.3 though). -- John Baldwin From owner-svn-src-stable-11@freebsd.org Tue Jun 6 07:21:36 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20B95BF884B; Tue, 6 Jun 2017 07:21:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAC9381293; Tue, 6 Jun 2017 07:21:35 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v567LZmx060462; Tue, 6 Jun 2017 07:21:35 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v567LYt7060023; Tue, 6 Jun 2017 07:21:34 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706060721.v567LYt7060023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 6 Jun 2017 07:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319614 - in stable/11: lib/libc/rpc lib/libc/xdr sys/rpc sys/xdr usr.sbin/rpcbind X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 07:21:36 -0000 Author: delphij Date: Tue Jun 6 07:21:33 2017 New Revision: 319614 URL: https://svnweb.freebsd.org/changeset/base/319614 Log: MFC r319369: * limit size of buffers to RPC_MAXDATASIZE * don't leak memory * be more picky about bad parameters From: https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt https://github.com/guidovranken/rpcbomb/blob/master/rpcbind_patch.txt via NetBSD. Approved by: re (kib) Modified: stable/11/lib/libc/rpc/rpc_generic.c stable/11/lib/libc/rpc/rpcb_prot.c stable/11/lib/libc/rpc/rpcb_st_xdr.c stable/11/lib/libc/xdr/xdr.c stable/11/sys/rpc/rpc_generic.c stable/11/sys/rpc/rpcb_clnt.c stable/11/sys/rpc/rpcb_prot.c stable/11/sys/xdr/xdr.c stable/11/usr.sbin/rpcbind/rpcb_svc_com.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/rpc/rpc_generic.c ============================================================================== --- stable/11/lib/libc/rpc/rpc_generic.c Tue Jun 6 03:40:45 2017 (r319613) +++ stable/11/lib/libc/rpc/rpc_generic.c Tue Jun 6 07:21:33 2017 (r319614) @@ -609,6 +609,8 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf switch (af) { case AF_INET: + if (nbuf->len < sizeof(*sin)) + return NULL; sin = nbuf->buf; if (inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf) == NULL) @@ -620,6 +622,8 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf break; #ifdef INET6 case AF_INET6: + if (nbuf->len < sizeof(*sin6)) + return NULL; sin6 = nbuf->buf; if (inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6) == NULL) @@ -658,6 +662,10 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr) port = 0; sin = NULL; + + if (uaddr == NULL) + return NULL; + addrstr = strdup(uaddr); if (addrstr == NULL) return NULL; Modified: stable/11/lib/libc/rpc/rpcb_prot.c ============================================================================== --- stable/11/lib/libc/rpc/rpcb_prot.c Tue Jun 6 03:40:45 2017 (r319613) +++ stable/11/lib/libc/rpc/rpcb_prot.c Tue Jun 6 07:21:33 2017 (r319614) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "un-namespace.h" bool_t @@ -62,13 +63,13 @@ xdr_rpcb(XDR *xdrs, RPCB *objp) if (!xdr_rpcvers(xdrs, &objp->r_vers)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_netid, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_addr, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_addr, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_owner, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_owner, RPC_MAXDATASIZE)) { return (FALSE); } return (TRUE); @@ -162,19 +163,19 @@ xdr_rpcblist(XDR *xdrs, RPCBLIST **rp) bool_t xdr_rpcb_entry(XDR *xdrs, rpcb_entry *objp) { - if (!xdr_string(xdrs, &objp->r_maddr, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_maddr, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_netid, RPC_MAXDATASIZE)) { return (FALSE); } if (!xdr_u_int32_t(xdrs, &objp->r_nc_semantics)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_protofmly, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_protofmly, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_proto, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_proto, RPC_MAXDATASIZE)) { return (FALSE); } return (TRUE); @@ -289,7 +290,7 @@ xdr_rpcb_rmtcallres(XDR *xdrs, struct rpcb_rmtcallres bool_t dummy; struct r_rpcb_rmtcallres *objp = (struct r_rpcb_rmtcallres *)(void *)p; - if (!xdr_string(xdrs, &objp->addr, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->addr, RPC_MAXDATASIZE)) { return (FALSE); } if (!xdr_u_int(xdrs, &objp->results.results_len)) { Modified: stable/11/lib/libc/rpc/rpcb_st_xdr.c ============================================================================== --- stable/11/lib/libc/rpc/rpcb_st_xdr.c Tue Jun 6 03:40:45 2017 (r319613) +++ stable/11/lib/libc/rpc/rpcb_st_xdr.c Tue Jun 6 07:21:33 2017 (r319614) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include +#include #include "un-namespace.h" /* Link list of all the stats about getport and getaddr */ @@ -63,7 +64,7 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp) if (!xdr_int(xdrs, &objp->failure)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); } @@ -115,7 +116,7 @@ xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *ob IXDR_PUT_INT32(buf, objp->failure); IXDR_PUT_INT32(buf, objp->indirect); } - if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); } pnext = &objp->next; @@ -154,7 +155,7 @@ xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *ob objp->failure = (int)IXDR_GET_INT32(buf); objp->indirect = (int)IXDR_GET_INT32(buf); } - if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); } if (!xdr_pointer(xdrs, (char **) pnext, @@ -182,7 +183,7 @@ xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *ob if (!xdr_int(xdrs, &objp->indirect)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); } if (!xdr_pointer(xdrs, (char **) pnext, Modified: stable/11/lib/libc/xdr/xdr.c ============================================================================== --- stable/11/lib/libc/xdr/xdr.c Tue Jun 6 03:40:45 2017 (r319613) +++ stable/11/lib/libc/xdr/xdr.c Tue Jun 6 07:21:33 2017 (r319614) @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include "un-namespace.h" @@ -64,7 +66,6 @@ typedef u_quad_t u_longlong_t; /* ANSI unsign */ #define XDR_FALSE ((long) 0) #define XDR_TRUE ((long) 1) -#define LASTUNSIGNED ((u_int) 0-1) /* * for unit alignment @@ -561,6 +562,7 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m { char *sp = *cpp; /* sp is the actual string pointer */ u_int nodesize; + bool_t ret, allocated = FALSE; /* * first deal with the length since xdr bytes are counted @@ -584,6 +586,7 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m } if (sp == NULL) { *cpp = sp = mem_alloc(nodesize); + allocated = TRUE; } if (sp == NULL) { warnx("xdr_bytes: out of memory"); @@ -592,7 +595,14 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m /* FALLTHROUGH */ case XDR_ENCODE: - return (xdr_opaque(xdrs, sp, nodesize)); + ret = xdr_opaque(xdrs, sp, nodesize); + if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) { + if (allocated == TRUE) { + free(sp); + *cpp = NULL; + } + } + return (ret); case XDR_FREE: if (sp != NULL) { @@ -683,6 +693,7 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) char *sp = *cpp; /* sp is the actual string pointer */ u_int size; u_int nodesize; + bool_t ret, allocated = FALSE; /* * first deal with the length since xdr strings are counted-strings @@ -716,8 +727,10 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) if (nodesize == 0) { return (TRUE); } - if (sp == NULL) + if (sp == NULL) { *cpp = sp = mem_alloc(nodesize); + allocated = TRUE; + } if (sp == NULL) { warnx("xdr_string: out of memory"); return (FALSE); @@ -726,7 +739,14 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) /* FALLTHROUGH */ case XDR_ENCODE: - return (xdr_opaque(xdrs, sp, size)); + ret = xdr_opaque(xdrs, sp, size); + if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) { + if (allocated == TRUE) { + free(sp); + *cpp = NULL; + } + } + return (ret); case XDR_FREE: mem_free(sp, nodesize); @@ -744,7 +764,7 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) bool_t xdr_wrapstring(XDR *xdrs, char **cpp) { - return xdr_string(xdrs, cpp, LASTUNSIGNED); + return xdr_string(xdrs, cpp, RPC_MAXDATASIZE); } /* Modified: stable/11/sys/rpc/rpc_generic.c ============================================================================== --- stable/11/sys/rpc/rpc_generic.c Tue Jun 6 03:40:45 2017 (r319613) +++ stable/11/sys/rpc/rpc_generic.c Tue Jun 6 07:21:33 2017 (r319614) @@ -311,6 +311,8 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf switch (af) { case AF_INET: + if (nbuf->len < sizeof(*sin)) + return NULL; sin = nbuf->buf; if (inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf) == NULL) @@ -323,6 +325,8 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf break; #ifdef INET6 case AF_INET6: + if (nbuf->len < sizeof(*sin6)) + return NULL; sin6 = nbuf->buf; if (inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6) == NULL) @@ -366,6 +370,10 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr) port = 0; sin = NULL; + + if (uaddr == NULL) + return NULL; + addrstr = strdup(uaddr, M_RPC); if (addrstr == NULL) return NULL; Modified: stable/11/sys/rpc/rpcb_clnt.c ============================================================================== --- stable/11/sys/rpc/rpcb_clnt.c Tue Jun 6 03:40:45 2017 (r319613) +++ stable/11/sys/rpc/rpcb_clnt.c Tue Jun 6 07:21:33 2017 (r319614) @@ -1287,6 +1287,11 @@ xdr_netbuf(XDR *xdrs, struct netbuf *objp) return (FALSE); } pp = &objp->buf; + + if (objp->maxlen > RPC_MAXDATASIZE) { + return (FALSE); + } + dummy = xdr_bytes(xdrs, (char **) pp, (u_int *)&(objp->len), objp->maxlen); return (dummy); Modified: stable/11/sys/rpc/rpcb_prot.c ============================================================================== --- stable/11/sys/rpc/rpcb_prot.c Tue Jun 6 03:40:45 2017 (r319613) +++ stable/11/sys/rpc/rpcb_prot.c Tue Jun 6 07:21:33 2017 (r319614) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include bool_t @@ -74,13 +75,13 @@ xdr_rpcb(XDR *xdrs, RPCB *objp) if (!xdr_uint32_t(xdrs, &objp->r_vers)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_netid, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_addr, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_addr, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_owner, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_owner, RPC_MAXDATASIZE)) { return (FALSE); } return (TRUE); @@ -175,19 +176,19 @@ xdr_rpcblist(XDR *xdrs, RPCBLIST **rp) bool_t xdr_rpcb_entry(XDR *xdrs, rpcb_entry *objp) { - if (!xdr_string(xdrs, &objp->r_maddr, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_maddr, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_netid, RPC_MAXDATASIZE)) { return (FALSE); } if (!xdr_uint32_t(xdrs, &objp->r_nc_semantics)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_protofmly, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_protofmly, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_proto, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_proto, RPC_MAXDATASIZE)) { return (FALSE); } return (TRUE); Modified: stable/11/sys/xdr/xdr.c ============================================================================== --- stable/11/sys/xdr/xdr.c Tue Jun 6 03:40:45 2017 (r319613) +++ stable/11/sys/xdr/xdr.c Tue Jun 6 07:21:33 2017 (r319614) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include @@ -62,7 +64,6 @@ typedef u_quad_t u_longlong_t; /* ANSI unsign */ #define XDR_FALSE ((long) 0) #define XDR_TRUE ((long) 1) -#define LASTUNSIGNED ((u_int) 0-1) /* * for unit alignment @@ -503,6 +504,7 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m { char *sp = *cpp; /* sp is the actual string pointer */ u_int nodesize; + bool_t ret, allocated = FALSE; /* * first deal with the length since xdr bytes are counted @@ -526,6 +528,7 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m } if (sp == NULL) { *cpp = sp = mem_alloc(nodesize); + allocated = TRUE; } if (sp == NULL) { printf("xdr_bytes: out of memory"); @@ -534,7 +537,14 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m /* FALLTHROUGH */ case XDR_ENCODE: - return (xdr_opaque(xdrs, sp, nodesize)); + ret = xdr_opaque(xdrs, sp, nodesize); + if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) { + if (allocated == TRUE) { + mem_free(sp, nodesize); + *cpp = NULL; + } + } + return (ret); case XDR_FREE: if (sp != NULL) { @@ -622,6 +632,7 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) char *sp = *cpp; /* sp is the actual string pointer */ u_int size; u_int nodesize; + bool_t ret, allocated = FALSE; /* * first deal with the length since xdr strings are counted-strings @@ -655,8 +666,10 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) if (nodesize == 0) { return (TRUE); } - if (sp == NULL) + if (sp == NULL) { *cpp = sp = mem_alloc(nodesize); + allocated = TRUE; + } if (sp == NULL) { printf("xdr_string: out of memory"); return (FALSE); @@ -665,7 +678,14 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) /* FALLTHROUGH */ case XDR_ENCODE: - return (xdr_opaque(xdrs, sp, size)); + ret = xdr_opaque(xdrs, sp, size); + if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) { + if (allocated == TRUE) { + mem_free(sp, nodesize); + *cpp = NULL; + } + } + return (ret); case XDR_FREE: mem_free(sp, nodesize); @@ -683,7 +703,7 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) bool_t xdr_wrapstring(XDR *xdrs, char **cpp) { - return xdr_string(xdrs, cpp, LASTUNSIGNED); + return xdr_string(xdrs, cpp, RPC_MAXDATASIZE); } /* Modified: stable/11/usr.sbin/rpcbind/rpcb_svc_com.c ============================================================================== --- stable/11/usr.sbin/rpcbind/rpcb_svc_com.c Tue Jun 6 03:40:45 2017 (r319613) +++ stable/11/usr.sbin/rpcbind/rpcb_svc_com.c Tue Jun 6 07:21:33 2017 (r319614) @@ -55,6 +55,7 @@ #include #ifdef PORTMAP #include +#include #include #endif /* PORTMAP */ #include @@ -418,7 +419,8 @@ rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rq static bool_t xdr_encap_parms(XDR *xdrs, struct encap_parms *epp) { - return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), ~0)); + return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), + RPC_MAXDATASIZE)); } /* From owner-svn-src-stable-11@freebsd.org Tue Jun 6 08:33:21 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BB1ABFA031; Tue, 6 Jun 2017 08:33:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 497CF835BC; Tue, 6 Jun 2017 08:33:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v568XKFb091574; Tue, 6 Jun 2017 08:33:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v568XKqg091573; Tue, 6 Jun 2017 08:33:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706060833.v568XKqg091573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 6 Jun 2017 08:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319616 - stable/11/sys/amd64/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 08:33:21 -0000 Author: trasz Date: Tue Jun 6 08:33:19 2017 New Revision: 319616 URL: https://svnweb.freebsd.org/changeset/base/319616 Log: MFC r318398: Bump default MAXTSIZ (kern.maxtsiz) from 128MB to 32GB. The old limit prevents one from running eg clang built with debug; the new one is arbitrary (equal to MAXDSIZ) and... well, should be quite future-proof. Same fix might be applicable to other 64 bit architectures; I'll ask their respective maintainers to make sure it won't break anything. Approved by: re (kib) Modified: stable/11/sys/amd64/include/vmparam.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/include/vmparam.h ============================================================================== --- stable/11/sys/amd64/include/vmparam.h Tue Jun 6 07:22:26 2017 (r319615) +++ stable/11/sys/amd64/include/vmparam.h Tue Jun 6 08:33:19 2017 (r319616) @@ -52,7 +52,7 @@ /* * Virtual memory related constants, all in bytes */ -#define MAXTSIZ (128UL*1024*1024) /* max text size */ +#define MAXTSIZ (32768UL*1024*1024) /* max text size */ #ifndef DFLDSIZ #define DFLDSIZ (32768UL*1024*1024) /* initial data size limit */ #endif From owner-svn-src-stable-11@freebsd.org Tue Jun 6 08:55:12 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFD3DBFA692; Tue, 6 Jun 2017 08:55:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 988058420A; Tue, 6 Jun 2017 08:55:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v568tBj8000730; Tue, 6 Jun 2017 08:55:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v568tB27000729; Tue, 6 Jun 2017 08:55:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706060855.v568tB27000729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 6 Jun 2017 08:55:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319617 - stable/11/etc/mtree X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 08:55:12 -0000 Author: trasz Date: Tue Jun 6 08:55:11 2017 New Revision: 319617 URL: https://svnweb.freebsd.org/changeset/base/319617 Log: MFC r318861: Create /net by default, for autofs. Approved by: re (kib) Modified: stable/11/etc/mtree/BSD.root.dist Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.root.dist ============================================================================== --- stable/11/etc/mtree/BSD.root.dist Tue Jun 6 08:33:19 2017 (r319616) +++ stable/11/etc/mtree/BSD.root.dist Tue Jun 6 08:55:11 2017 (r319617) @@ -97,6 +97,8 @@ .. mnt .. + net + .. proc mode=0555 .. rescue From owner-svn-src-stable-11@freebsd.org Tue Jun 6 09:23:15 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24FA8BFB0E3; Tue, 6 Jun 2017 09:23:15 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF86884FBB; Tue, 6 Jun 2017 09:23:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v569NDbU013908; Tue, 6 Jun 2017 09:23:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v569ND38013897; Tue, 6 Jun 2017 09:23:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706060923.v569ND38013897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 6 Jun 2017 09:23:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319618 - in stable/11: lib/lib80211 lib/libc/net lib/libc/sys lib/libpmc share/man/man4 share/man/man7 usr.sbin/pmcstudy X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 09:23:15 -0000 Author: trasz Date: Tue Jun 6 09:23:12 2017 New Revision: 319618 URL: https://svnweb.freebsd.org/changeset/base/319618 Log: MFC r318816: Don't end up manpage titles with a full stop. Approved by: re (marius) Modified: stable/11/lib/lib80211/lib80211.3 stable/11/lib/libc/net/sctp_bindx.3 stable/11/lib/libc/net/sctp_getassocid.3 stable/11/lib/libc/sys/setfib.2 stable/11/lib/libpmc/pmc_event_names_of_class.3 stable/11/share/man/man4/mmcsd.4 stable/11/share/man/man7/growfs.7 stable/11/usr.sbin/pmcstudy/pmcstudy.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/lib80211/lib80211.3 ============================================================================== --- stable/11/lib/lib80211/lib80211.3 Tue Jun 6 08:55:11 2017 (r319617) +++ stable/11/lib/lib80211/lib80211.3 Tue Jun 6 09:23:12 2017 (r319618) @@ -36,7 +36,7 @@ .Nm lib80211_regdomain_findbyname , .Nm lib80211_country_findbycc , .Nm lib80211_country_findbyname -.Nd manage net80211 configuration and regulatory database. +.Nd manage net80211 configuration and regulatory database .Sh LIBRARY .Lb lib80211 .Sh SYNOPSIS Modified: stable/11/lib/libc/net/sctp_bindx.3 ============================================================================== --- stable/11/lib/libc/net/sctp_bindx.3 Tue Jun 6 08:55:11 2017 (r319617) +++ stable/11/lib/libc/net/sctp_bindx.3 Tue Jun 6 09:23:12 2017 (r319618) @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm sctp_bindx -.Nd bind or unbind an SCTP socket to a list of addresses. +.Nd bind or unbind an SCTP socket to a list of addresses .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: stable/11/lib/libc/net/sctp_getassocid.3 ============================================================================== --- stable/11/lib/libc/net/sctp_getassocid.3 Tue Jun 6 08:55:11 2017 (r319617) +++ stable/11/lib/libc/net/sctp_getassocid.3 Tue Jun 6 09:23:12 2017 (r319618) @@ -32,7 +32,7 @@ .Os .Sh NAME .Nm sctp_getassocid -.Nd return an association id for a specified socket address. +.Nd return an association id for a specified socket address .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: stable/11/lib/libc/sys/setfib.2 ============================================================================== --- stable/11/lib/libc/sys/setfib.2 Tue Jun 6 08:55:11 2017 (r319617) +++ stable/11/lib/libc/sys/setfib.2 Tue Jun 6 09:23:12 2017 (r319618) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm setfib -.Nd set the default FIB (routing table) for the calling process. +.Nd set the default FIB (routing table) for the calling process .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: stable/11/lib/libpmc/pmc_event_names_of_class.3 ============================================================================== --- stable/11/lib/libpmc/pmc_event_names_of_class.3 Tue Jun 6 08:55:11 2017 (r319617) +++ stable/11/lib/libpmc/pmc_event_names_of_class.3 Tue Jun 6 09:23:12 2017 (r319618) @@ -28,7 +28,7 @@ .Os .Sh NAME .Nm pmc_event_names_of_class -.Nd return a list of event names supported by a PMC class. +.Nd return a list of event names supported by a PMC class .Sh LIBRARY .Lb libpmc .Sh SYNOPSIS Modified: stable/11/share/man/man4/mmcsd.4 ============================================================================== --- stable/11/share/man/man4/mmcsd.4 Tue Jun 6 08:55:11 2017 (r319617) +++ stable/11/share/man/man4/mmcsd.4 Tue Jun 6 09:23:12 2017 (r319618) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm mmcsd -.Nd MMC and SD memory card driver. +.Nd MMC and SD memory card driver .Sh SYNOPSIS .Cd device mmcsd .Sh DESCRIPTION Modified: stable/11/share/man/man7/growfs.7 ============================================================================== --- stable/11/share/man/man7/growfs.7 Tue Jun 6 08:55:11 2017 (r319617) +++ stable/11/share/man/man7/growfs.7 Tue Jun 6 09:23:12 2017 (r319618) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm growfs -.Nd start up script to grow the root file-system. +.Nd start up script to grow the root file-system .Sh DESCRIPTION The following options in .Pa /etc/rc.conf Modified: stable/11/usr.sbin/pmcstudy/pmcstudy.8 ============================================================================== --- stable/11/usr.sbin/pmcstudy/pmcstudy.8 Tue Jun 6 08:55:11 2017 (r319617) +++ stable/11/usr.sbin/pmcstudy/pmcstudy.8 Tue Jun 6 09:23:12 2017 (r319618) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm pmcstudy -.Nd Perform various studies on a system's overall PMCs. +.Nd Perform various studies on a system's overall PMCs .Sh SYNOPSIS .Nm .Oo Fl i Ar inputfile | Fl A | Fl T | Fl v | Fl m Ar max | Fl e exp | Fl Ar E | Fl h | fl H Oc From owner-svn-src-stable-11@freebsd.org Tue Jun 6 09:43:29 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C448FBFB50A; Tue, 6 Jun 2017 09:43:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F3ACC79; Tue, 6 Jun 2017 09:43:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v569hSC6022065; Tue, 6 Jun 2017 09:43:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v569hSm5022064; Tue, 6 Jun 2017 09:43:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706060943.v569hSm5022064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 6 Jun 2017 09:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319619 - stable/11/usr.sbin/ctld X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 09:43:29 -0000 Author: trasz Date: Tue Jun 6 09:43:28 2017 New Revision: 319619 URL: https://svnweb.freebsd.org/changeset/base/319619 Log: MFC r319072: Make ctld(8) mention cfiscsi(4). Approved by: re (marius) Modified: stable/11/usr.sbin/ctld/ctld.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ctld/ctld.8 ============================================================================== --- stable/11/usr.sbin/ctld/ctld.8 Tue Jun 6 09:23:12 2017 (r319618) +++ stable/11/usr.sbin/ctld/ctld.8 Tue Jun 6 09:43:28 2017 (r319619) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2016 +.Dd May 28, 2017 .Dt CTLD 8 .Os .Sh NAME @@ -55,7 +55,9 @@ instances, removes LUNs no longer existing in the conf and creates new LUNs as necessary. After that it listens for the incoming iSCSI connections, performs authentication, and, if successful, passes the connections to the kernel part -of CTL iSCSI target, which handles it from that point. +of CTL iSCSI target, +.Xr cfiscsi 4 , +which handles it from that point. .Pp When it receives a SIGHUP signal, the .Nm @@ -105,6 +107,7 @@ The .Nm utility exits 0 on success, and >0 if an error occurs. .Sh SEE ALSO +.Xr cfiscsi 4 , .Xr ctl 4 , .Xr ctl.conf 5 , .Xr ctladm 8 , From owner-svn-src-stable-11@freebsd.org Tue Jun 6 13:14:44 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB78DB954BE; Tue, 6 Jun 2017 13:14:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84A87675E7; Tue, 6 Jun 2017 13:14:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 971C814577; Tue, 6 Jun 2017 13:14:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Tue, 6 Jun 2017 13:14:41 +0000 From: Glen Barber To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r319607 - stable/11/release/doc/en_US.ISO8859-1/relnotes Message-ID: <20170606131441.GC20545@FreeBSD.org> References: <201706051856.v55Iujms052904@repo.freebsd.org> <3942689.MOD8xETb0x@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xo44VMWPx7vlQ2+2" Content-Disposition: inline In-Reply-To: <3942689.MOD8xETb0x@ralph.baldwin.cx> X-Operating-System: FreeBSD 11.0-STABLE amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer X-Spidey-Sense: Uh oh, Peter logged in User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 13:14:44 -0000 --xo44VMWPx7vlQ2+2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 05, 2017 at 04:15:50PM -0700, John Baldwin wrote: > On Monday, June 05, 2017 06:56:45 PM Glen Barber wrote: > > Author: gjb > > Date: Mon Jun 5 18:56:45 2017 > > New Revision: 319607 > > URL: https://svnweb.freebsd.org/changeset/base/319607 > >=20 > > Log: > > Document r295930, truss(1) '-H' flag. > > Document r308154, cxgbe(4) additional virtual interface support. >=20 > Both of these features actually shipped in 11.0 so shouldn't be documented > in the 11.1 notes (they are still new in 10.4 relative to 10.3 though). >=20 Oops. Thanks for pointing this out. Glen --xo44VMWPx7vlQ2+2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAlk2qsEACgkQAxRYpUeP 4pOhnA//aseXiscmDhqJd+UwCsS7OKHl52XcKCuhr16SWNMXgayvuw2Wcz4YePhV mQwdQ6Doni66s0mT1LZf63MiCMTFcIYjvwdPNs0FJSxMe/UKkAC5RrDAZhAfVx3u 8Bnea8ESVxlVuWpPR66uf2OUr+RWWot8WfxoAN7BILoXi63l9QHYkY4xhMVo5f40 sLDu1j2HKWn7iCE6NlaU9d6TOVP0Uy4TyUMRCkMUljwpCCYkTri2W3taeJFll6z4 HU7G51UEGNRWBGlsQGTNcVeQjm/GYjmQ2vsDObVN7APT4EIo8iAfiGe4jCgj/kdw EUzWWa5AhDUz+pUTDHyeeWlydWnNbcIpYqGrA5QoFr3Gy5RZohrh57SzYRgyhcEh VaGQPTrVhwUB/hYW/R1D8gkWz+6R9ZNGDdx2+Swi52xDaoPhYVhpIgJB8XOzO9j3 HsnylsmdEJtIJvxFLiAfkLp+MJGzqClap4614B30PMDQhgeOFp8+eovJNE/iMoca /8C2gkAC+RkYVi+eNgxZ6TctY6U/DrGpG/4RRHB4hsUMBg5FSWqEExTLK4LZ+2+p hq5iPP1Lp6yIJiOpygg+pUhc/Q4qqxLVOQmZp/S7DxcsRgwizAciziUla6g/GPPw iGwm3JQ3k9rzJbbJqXpLDObaNlpDTnmpYzwCOXhWFoBxKhrHZg0= =M/CU -----END PGP SIGNATURE----- --xo44VMWPx7vlQ2+2-- From owner-svn-src-stable-11@freebsd.org Tue Jun 6 13:24:35 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC9F4B95767 for ; Tue, 6 Jun 2017 13:24:35 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost2.sentex.ca (smarthost2.sentex.ca [205.211.164.50]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "smarthost.sentex.ca", Issuer "smarthost.sentex.ca" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8795367A8B; Tue, 6 Jun 2017 13:24:35 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (lava.sentex.ca [IPv6:2607:f3e0:0:5::11]) by smarthost2.sentex.ca (8.15.2/8.15.2) with ESMTPS id v56DOMD5012417 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 6 Jun 2017 09:24:22 -0400 (EDT) (envelope-from mike@sentex.net) Received: from [192.168.43.26] (saphire3.sentex.net [192.168.43.26]) by lava.sentex.ca (8.15.2/8.15.2) with ESMTP id v56DOLUS030091; Tue, 6 Jun 2017 09:24:21 -0400 (EDT) (envelope-from mike@sentex.net) Subject: Re: svn commit: r319269 - in stable/11/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware To: Navdeep Parhar , "pholes@sentex.net" , svn-src-stable-11@freebsd.org References: <201705310016.v4V0G5n7012861@repo.freebsd.org> <20a81b3e-17c7-df59-dda8-370d93eec899@FreeBSD.org> From: Mike Tancsa Organization: Sentex Communications Message-ID: <6636b518-adb7-be5a-32fd-0095fd8486a1@sentex.net> Date: Tue, 6 Jun 2017 09:24:23 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20a81b3e-17c7-df59-dda8-370d93eec899@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 13:24:35 -0000 On 6/5/2017 4:06 PM, Navdeep Parhar wrote: > On 06/02/2017 14:16, Mike Tancsa wrote: >> >> Hi, >> Not sure if its the firmware for sure, but a number of DAC cables I >> have been using without issue all of a sudden are failing. On the >> switch port side, the link does not go down, but on the NIC side, the >> link is bouncing up and down once a bit of traffic is place on it. I > > The firmware handles all transceiver setup and link so it must be the > firmware, but passing traffic should not affect the link. Does the link > really stay up steadily as long as there's no traffic? On my test box, it doesnt stay up actually. Whats strange is that the other end on the HP does not show the link bouncing. > > Once the link has bounced at least once (with or without traffic), run > this and provide its output: > # sysctl -n dev.t5nex.0.misc.devlog Here is the interface up with the other end plugged into the HP cxl1: flags=8843 metric 0 mtu 1500 options=ec07bb ether 00:07:43:28:95:28 hwaddr 00:07:43:28:95:28 inet 3.3.3.1 netmask 0xffffff00 broadcast 3.3.3.255 nd6 options=29 media: Ethernet 10Gbase-SR status: active plugged: SFP/SFP+/SFP28 10G Base-SR (LC) vendor: SOURCEPHOTONICS PN: SPP10ESRCDFB SN: G0611090002 DATE: 2010-09-19 Class: 10G Base-SR Length: (null) Tech: (null) Media: (null) Speed: (null) module temperature: 19.31 C Voltage: 3.37 Volts RX: 0.00 mW (-40.00 dBm) TX: 6.55 mW (8.16 dBm) SFF8472 DUMP (0xA0 0..127 range): 03 04 07 10 00 00 00 00 00 00 00 06 67 00 00 00 08 03 00 1E 53 4F 55 52 43 45 50 48 4F 54 4F 4E 49 43 53 20 00 00 1F 22 53 50 50 31 30 45 53 52 43 44 46 42 20 20 20 20 31 30 20 20 03 52 00 60 00 1A 00 00 47 30 36 31 31 30 39 30 30 30 32 20 20 20 20 20 31 30 30 39 31 39 20 20 68 F0 03 C3 48 50 A0 00 80 50 20 20 4A 39 31 35 30 41 20 31 39 39 30 2D 34 30 36 35 20 20 00 32 00 00 00 00 0(intels12004u)# sysctl -n dev.t5nex.0.misc.devlog Seq# Tstamp Level Facility Message 5005 15852442561 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5006 15852442563 INFO PORT port[1] link down (816) (lstatus 0xe) 5007 15852442575 INFO PORT port[1] update (flowcid 1352 rc 0) 5008 15852642562 INFO PORT port[1] link up (818) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5009 15852642564 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5010 15852642567 INFO PORT port[1] update (flowcid 1352 rc 0) 5011 15860042586 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5012 15860042588 INFO PORT port[1] link down (817) (lstatus 0xe) 5013 15860042601 INFO PORT port[1] update (flowcid 1352 rc 0) 5014 15860242587 INFO PORT port[1] link up (819) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5015 15860242589 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5016 15860242592 INFO PORT port[1] update (flowcid 1352 rc 0) 5017 15885542670 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5018 15885542672 INFO PORT port[1] link down (818) (lstatus 0xe) 5019 15885542685 INFO PORT port[1] update (flowcid 1352 rc 0) 5020 15885742671 INFO PORT port[1] link up (820) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5021 15885742673 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5022 15885742676 INFO PORT port[1] update (flowcid 1352 rc 0) 5023 15903442729 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5024 15903442731 INFO PORT port[1] link down (819) (lstatus 0xe) 5025 15903442744 INFO PORT port[1] update (flowcid 1352 rc 0) 5026 15903642730 INFO PORT port[1] link up (821) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5027 15903642732 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5028 15903642735 INFO PORT port[1] update (flowcid 1352 rc 0) 5029 15909642749 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5030 15909642751 INFO PORT port[1] link down (820) (lstatus 0xe) 5031 15909642765 INFO PORT port[1] update (flowcid 1352 rc 0) 5032 15909842750 INFO PORT port[1] link up (822) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5033 15909842753 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5034 15909842755 INFO PORT port[1] update (flowcid 1352 rc 0) 5035 15927642809 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5036 15927642810 INFO PORT port[1] link down (821) (lstatus 0xe) 5037 15927642823 INFO PORT port[1] update (flowcid 1352 rc 0) 5038 15927842810 INFO PORT port[1] link up (823) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5039 15927842812 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5040 15927842815 INFO PORT port[1] update (flowcid 1352 rc 0) 5041 15930242817 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5042 15930242819 INFO PORT port[1] link down (822) (lstatus 0xe) 5043 15930242832 INFO PORT port[1] update (flowcid 1352 rc 0) 5044 15930442819 INFO PORT port[1] link up (824) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5045 15930442821 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5046 15930442823 INFO PORT port[1] update (flowcid 1352 rc 0) 5047 15948142876 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5048 15948142878 INFO PORT port[1] link down (823) (lstatus 0xe) 5049 15948142891 INFO PORT port[1] update (flowcid 1352 rc 0) 5050 15948342878 INFO PORT port[1] link up (825) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5051 15948342880 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5052 15948342883 INFO PORT port[1] update (flowcid 1352 rc 0) 5053 15952442891 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5054 15952442893 INFO PORT port[1] link down (824) (lstatus 0xe) 5055 15952442906 INFO PORT port[1] update (flowcid 1352 rc 0) 5056 15952642892 INFO PORT port[1] link up (826) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5057 15952642894 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5058 15952642897 INFO PORT port[1] update (flowcid 1352 rc 0) 5059 15962442924 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5060 15962442926 INFO PORT port[1] link down (825) (lstatus 0xe) 5061 15962442939 INFO PORT port[1] update (flowcid 1352 rc 0) 5062 15962642925 INFO PORT port[1] link up (827) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5063 15962642927 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5064 15962642930 INFO PORT port[1] update (flowcid 1352 rc 0) 5065 15994243028 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5066 15994243030 INFO PORT port[1] link down (826) (lstatus 0xe) 5067 15994243043 INFO PORT port[1] update (flowcid 1352 rc 0) 5068 15994443030 INFO PORT port[1] link up (828) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5069 15994443032 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5070 15994443034 INFO PORT port[1] update (flowcid 1352 rc 0) 5071 16070243277 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5072 16070243279 INFO PORT port[1] link down (827) (lstatus 0xe) 5073 16070243292 INFO PORT port[1] update (flowcid 1352 rc 0) 5074 16070443279 INFO PORT port[1] link up (829) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5075 16070443281 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5076 16070443283 INFO PORT port[1] update (flowcid 1352 rc 0) 5077 16070743279 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5078 16070743281 INFO PORT port[1] link down (828) (lstatus 0xe) 5079 16070743294 INFO PORT port[1] update (flowcid 1352 rc 0) 5080 16070943281 INFO PORT port[1] link up (830) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5081 16070943283 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5082 16070943286 INFO PORT port[1] update (flowcid 1352 rc 0) 5083 16075643296 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5084 16075643298 INFO PORT port[1] link down (829) (lstatus 0xe) 5085 16075643311 INFO PORT port[1] update (flowcid 1352 rc 0) 5086 16075843297 INFO PORT port[1] link up (831) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5087 16075843300 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5088 16075843302 INFO PORT port[1] update (flowcid 1352 rc 0) 5089 16102143383 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5090 16102143385 INFO PORT port[1] link down (830) (lstatus 0xe) 5091 16102143398 INFO PORT port[1] update (flowcid 1352 rc 0) 5092 16102343384 INFO PORT port[1] link up (832) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5093 16102343386 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5094 16102343389 INFO PORT port[1] update (flowcid 1352 rc 0) 5095 16117043432 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5096 16117043434 INFO PORT port[1] link down (831) (lstatus 0xe) 5097 16117043447 INFO PORT port[1] update (flowcid 1352 rc 0) 5098 16117243433 INFO PORT port[1] link up (833) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5099 16117243436 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5100 16117243438 INFO PORT port[1] update (flowcid 1352 rc 0) 5101 16173743618 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5102 16173743620 INFO PORT port[1] link down (832) (lstatus 0xe) 5103 16173743633 INFO PORT port[1] update (flowcid 1352 rc 0) 5104 16173943619 INFO PORT port[1] link up (834) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5105 16173943621 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5106 16173943624 INFO PORT port[1] update (flowcid 1352 rc 0) 5107 16179843638 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5108 16179843640 INFO PORT port[1] link down (833) (lstatus 0xe) 5109 16179843653 INFO PORT port[1] update (flowcid 1352 rc 0) 5110 16180043640 INFO PORT port[1] link up (835) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5111 16180043642 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5112 16180043644 INFO PORT port[1] update (flowcid 1352 rc 0) 5113 16195743691 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5114 16195743693 INFO PORT port[1] link down (834) (lstatus 0xe) 5115 16195743706 INFO PORT port[1] update (flowcid 1352 rc 0) 5116 16195943692 INFO PORT port[1] link up (836) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5117 16195943694 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5118 16195943697 INFO PORT port[1] update (flowcid 1352 rc 0) 5119 16228443797 INFO PORT port[1] link down (835) (lstatus 0) 5120 16228443812 INFO PORT port_link_state_handler[1] powering down 5121 321883244122 INFO PORT port_link_state_handler[1] powering up 5122 321883244126 INFO PORT port[1] update (flowcid 1352 rc 0) 5123 321883644123 INFO PORT hw_mac_link_status[1] int_cause 0x1c70, link_status 0x12 5124 321883844124 INFO PORT port[1] link up (837) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5125 321883844127 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5126 321883844131 INFO PORT port[1] update (flowcid 1352 rc 0) 5127 321885244128 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5128 321885244130 INFO PORT port[1] link down (836) (lstatus 0xe) 5129 321885244143 INFO PORT port[1] update (flowcid 1352 rc 0) 5130 321885444130 INFO PORT port[1] link up (838) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5131 321885444132 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5132 321885444134 INFO PORT port[1] update (flowcid 1352 rc 0) And now plugged into the quanta 0(intels12004u)# sysctl -n dev.t5nex.0.misc.devlog Seq# Tstamp Level Facility Message 5187 322069744736 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5188 322069744738 INFO PORT port[1] link down (846) (lstatus 0xe) 5189 322069744751 INFO PORT port[1] update (flowcid 1352 rc 0) 5190 322069944737 INFO PORT port[1] link up (848) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5191 322069944740 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5192 322069944742 INFO PORT port[1] update (flowcid 1352 rc 0) 5193 322085244787 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5194 322085244789 INFO PORT port[1] link down (847) (lstatus 0xe) 5195 322085244802 INFO PORT port[1] update (flowcid 1352 rc 0) 5196 322085444788 INFO PORT port[1] link up (849) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5197 322085444791 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5198 322085444793 INFO PORT port[1] update (flowcid 1352 rc 0) 5199 322119244899 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5200 322119244901 INFO PORT port[1] link down (848) (lstatus 0xe) 5201 322119244915 INFO PORT port[1] update (flowcid 1352 rc 0) 5202 322119444900 INFO PORT port[1] link up (850) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5203 322119444903 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5204 322119444906 INFO PORT port[1] update (flowcid 1352 rc 0) 5205 322124144915 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5206 322124144917 INFO PORT port[1] link down (849) (lstatus 0xe) 5207 322124144930 INFO PORT port[1] update (flowcid 1352 rc 0) 5208 322124344917 INFO PORT port[1] link up (851) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5209 322124344919 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5210 322124344922 INFO PORT port[1] update (flowcid 1352 rc 0) 5211 322142244975 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5212 322142244977 INFO PORT port[1] link down (850) (lstatus 0xe) 5213 322142244990 INFO PORT port[1] update (flowcid 1352 rc 0) 5214 322142444976 INFO PORT port[1] link up (852) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5215 322142444979 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5216 322142444981 INFO PORT port[1] update (flowcid 1352 rc 0) 5217 322145644986 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5218 322145644988 INFO PORT port[1] link down (851) (lstatus 0xe) 5219 322145645002 INFO PORT port[1] update (flowcid 1352 rc 0) 5220 322145844988 INFO PORT port[1] link up (853) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5221 322145844990 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5222 322145844993 INFO PORT port[1] update (flowcid 1352 rc 0) 5223 322162645042 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5224 322162645044 INFO PORT port[1] link down (852) (lstatus 0xe) 5225 322162645058 INFO PORT port[1] update (flowcid 1352 rc 0) 5226 322162845044 INFO PORT port[1] link up (854) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5227 322162845046 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5228 322162845048 INFO PORT port[1] update (flowcid 1352 rc 0) 5229 322167445059 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5230 322167445060 INFO PORT port[1] link down (853) (lstatus 0xe) 5231 322167445073 INFO PORT port[1] update (flowcid 1352 rc 0) 5232 322167645060 INFO PORT port[1] link up (855) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5233 322167645062 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5234 322167645065 INFO PORT port[1] update (flowcid 1352 rc 0) 5235 322176645089 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5236 322176645091 INFO PORT port[1] link down (854) (lstatus 0xe) 5237 322176645104 INFO PORT port[1] update (flowcid 1352 rc 0) 5238 322176845090 INFO PORT port[1] link up (856) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5239 322176845092 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5240 322176845095 INFO PORT port[1] update (flowcid 1352 rc 0) 5241 322192045140 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5242 322192045142 INFO PORT port[1] link down (855) (lstatus 0xe) 5243 322192045155 INFO PORT port[1] update (flowcid 1352 rc 0) 5244 322192245141 INFO PORT port[1] link up (857) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5245 322192245143 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5246 322192245146 INFO PORT port[1] update (flowcid 1352 rc 0) 5247 322216845221 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5248 322216845223 INFO PORT port[1] link down (856) (lstatus 0xe) 5249 322216845236 INFO PORT port[1] update (flowcid 1352 rc 0) 5250 322217045222 INFO PORT port[1] link up (858) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5251 322217045225 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5252 322217045227 INFO PORT port[1] update (flowcid 1352 rc 0) 5253 322227745257 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5254 322227745259 INFO PORT port[1] link down (857) (lstatus 0xe) 5255 322227745273 INFO PORT port[1] update (flowcid 1352 rc 0) 5256 322227845258 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5257 322228045259 INFO PORT port[1] link up (859) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5258 322228045261 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5259 322228045264 INFO PORT port[1] update (flowcid 1352 rc 0) 5260 322239245295 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5261 322239245297 INFO PORT port[1] link down (858) (lstatus 0xe) 5262 322239245310 INFO PORT port[1] update (flowcid 1352 rc 0) 5263 322239445297 INFO PORT port[1] link up (860) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5264 322239445299 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5265 322239445302 INFO PORT port[1] update (flowcid 1352 rc 0) 5266 322249645330 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5267 322249645332 INFO PORT port[1] link down (859) (lstatus 0xe) 5268 322249645345 INFO PORT port[1] update (flowcid 1352 rc 0) 5269 322249845331 INFO PORT port[1] link up (861) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5270 322249845333 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5271 322249845336 INFO PORT port[1] update (flowcid 1352 rc 0) 5272 322257945357 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5273 322257945359 INFO PORT port[1] link down (860) (lstatus 0xe) 5274 322257945372 INFO PORT port[1] update (flowcid 1352 rc 0) 5275 322258145359 INFO PORT port[1] link up (862) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5276 322258145361 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5277 322258145364 INFO PORT port[1] update (flowcid 1352 rc 0) 5278 322308645524 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5279 322308645526 INFO PORT port[1] link down (861) (lstatus 0xe) 5280 322308645539 INFO PORT port[1] update (flowcid 1352 rc 0) 5281 322308845525 INFO PORT port[1] link up (863) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5282 322308845527 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5283 322308845530 INFO PORT port[1] update (flowcid 1352 rc 0) 5284 322329345592 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5285 322329345594 INFO PORT port[1] link down (862) (lstatus 0xe) 5286 322329345607 INFO PORT port[1] update (flowcid 1352 rc 0) 5287 322329545593 INFO PORT port[1] link up (864) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5288 322329545595 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5289 322329545598 INFO PORT port[1] update (flowcid 1352 rc 0) 5290 322356145680 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5291 322356145682 INFO PORT port[1] link down (863) (lstatus 0xe) 5292 322356145695 INFO PORT port[1] update (flowcid 1352 rc 0) 5293 322356345681 INFO PORT port[1] link up (865) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5294 322356345683 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5295 322356345686 INFO PORT port[1] update (flowcid 1352 rc 0) 5296 322363345704 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5297 322363345706 INFO PORT port[1] link down (864) (lstatus 0xe) 5298 322363345719 INFO PORT port[1] update (flowcid 1352 rc 0) 5299 322363545705 INFO PORT port[1] link up (866) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5300 322363545707 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5301 322363545710 INFO PORT port[1] update (flowcid 1352 rc 0) 5302 322364245707 INFO PORT hw_mac_link_status[1] int_cause 0x4b0, link_status 0x12 5303 322364245709 INFO PORT port[1] link down (865) (lstatus 0xe) 5304 322364245722 INFO PORT port[1] update (flowcid 1352 rc 0) 5305 322364445708 INFO PORT port[1] link up (867) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5306 322364445711 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5307 322364445713 INFO PORT port[1] update (flowcid 1352 rc 0) 5308 322385845778 INFO PORT port[1] link down (866) (lstatus 0xe) 5309 322385845791 INFO PORT port[1] update (flowcid 1352 rc 0) 5310 322400745827 INFO PORT hw_mac_link_status[1] int_cause 0x1001cf0, link_status 0x12 5311 322400845828 INFO PORT hw_mac_link_status[1] int_cause 0x1001cf0, link_status 0x12 5312 322401045829 INFO PORT port[1] link up (868) (speed 0x8 acaps 0xc0c8 lpcaps 0xc0c0) 5313 322401045831 INFO PORT port[1] set PAUSE PARAMS: pppen 0 txpe 0x1 rxpe 0x1 5314 322401045834 INFO PORT port[1] update (flowcid 1352 rc 0) 0(intels12004u)# ifconfig -vvvvv cxl1 cxl1: flags=8843 metric 0 mtu 1500 options=ec07bb ether 00:07:43:28:95:28 hwaddr 00:07:43:28:95:28 inet 3.3.3.1 netmask 0xffffff00 broadcast 3.3.3.255 nd6 options=29 media: Ethernet 10Gbase-SR status: active plugged: SFP/SFP+/SFP28 10G Base-SR (LC) vendor: SOURCEPHOTONICS PN: SPP10ESRCDFB SN: G0611090002 DATE: 2010-09-19 Class: 10G Base-SR Length: (null) Tech: (null) Media: (null) Speed: (null) module temperature: 19.73 C Voltage: 3.37 Volts RX: 0.00 mW (-40.00 dBm) TX: 6.55 mW (8.16 dBm) SFF8472 DUMP (0xA0 0..127 range): 03 04 07 10 00 00 00 00 00 00 00 06 67 00 00 00 08 03 00 1E 53 4F 55 52 43 45 50 48 4F 54 4F 4E 49 43 53 20 00 00 1F 22 53 50 50 31 30 45 53 52 43 44 46 42 20 20 20 20 31 30 20 20 03 52 00 60 00 1A 00 00 47 30 36 31 31 30 39 30 30 30 32 20 20 20 20 20 31 30 30 39 31 39 20 20 68 F0 03 C3 48 50 A0 00 80 50 20 20 4A 39 31 35 30 41 20 31 39 39 30 2D 34 30 36 35 20 20 00 32 00 00 00 00 0(intels12004u)# > >> swapped out the DAC cable for a plain old fiber SFP+ and its OK. The >> same DAC cable works fine prior to this update >> >> Jun 2 17:07:26 intels12004u kernel: cxl1: link state changed to DOWN >> Jun 2 17:07:27 intels12004u kernel: cxl1: link state changed to UP >> Jun 2 17:08:50 intels12004u kernel: cxl1: link state changed to DOWN >> Jun 2 17:08:50 intels12004u kernel: cxl1: link state changed to UP >> Jun 2 17:09:08 intels12004u kernel: cxl1: link state changed to DOWN >> Jun 2 17:09:08 intels12004u kernel: cxl1: link state changed to UP >> Jun 2 17:10:52 intels12004u kernel: cxl1: link state changed to DOWN >> Jun 2 17:10:53 intels12004u kernel: cxl1: link state changed to UP >> Jun 2 17:12:15 intels12004u kernel: cxl1: link state changed to DOWN >> Jun 2 17:12:15 intels12004u kernel: cxl1: link state changed to UP >> 0(intels12004u)# ifconfig cxl1 >> cxl1: flags=8843 metric 0 mtu >> 1500 >> >> options=ec07bb >> >> ether 00:07:43:28:95:28 >> hwaddr 00:07:43:28:95:28 >> inet 3.3.3.1 netmask 0xffffff00 broadcast 3.3.3.255 >> nd6 options=29 >> media: Ethernet 10Gbase-SR >> status: active >> plugged: SFP/SFP+/SFP28 10G Base-SR (LC) >> vendor: SOURCEPHOTONICS PN: SPP10ESRCDFB SN: G0611090002 DATE: >> 2010-09-19 >> module temperature: 20.35 C Voltage: 3.37 Volts >> RX: 0.00 mW (-40.00 dBm) TX: 6.55 mW (8.16 dBm) >> 0(intels12004u)# >> >> it for whatever reason shows it as fibre, but its twinax > > Please provide the full dump of the module's eeprom? > # ifconfig -vvv cxl0/1 > > It is possible that the transceiver misidentifies itself and the > firmware sets it up incorrectly as a result. It may have worked by > accident in the past. > > Regards, > Navdeep > > -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/ From owner-svn-src-stable-11@freebsd.org Tue Jun 6 14:26:39 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29A1FBD3DEA; Tue, 6 Jun 2017 14:26:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAB196E725; Tue, 6 Jun 2017 14:26:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v56EQcZ3038376; Tue, 6 Jun 2017 14:26:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v56EQcMF038375; Tue, 6 Jun 2017 14:26:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706061426.v56EQcMF038375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Jun 2017 14:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319622 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 14:26:39 -0000 Author: gjb Date: Tue Jun 6 14:26:37 2017 New Revision: 319622 URL: https://svnweb.freebsd.org/changeset/base/319622 Log: Revert r319607, which documents items that existed in 11.0-RELEASE. Submitted by: jhb Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 6 14:08:54 2017 (r319621) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 6 14:26:37 2017 (r319622) @@ -190,10 +190,6 @@ Userland Application Changes - The &man.truss.1; utility has been - updated to include the -H flag, which logs - the thread ID of a thread invoking a system call. - Support for &man.blacklistd.8; has been added to OpenSSH. @@ -648,11 +644,6 @@ sponsor="&chelsio;">The &man.cxgbev.4; driver has been added, providing support for Virtual Function devices (VFs) on Chelsio T4 and T5 adapters. - - The &man.cxgbe.4; driver has been updated - to support creating additional virtual interfaces on - a port. The &man.bnxt.4; driver has been added, From owner-svn-src-stable-11@freebsd.org Tue Jun 6 14:40:54 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84C9FBEE12B; Tue, 6 Jun 2017 14:40:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F0936EC9D; Tue, 6 Jun 2017 14:40:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v56Eergt042572; Tue, 6 Jun 2017 14:40:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v56Eer5L042571; Tue, 6 Jun 2017 14:40:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706061440.v56Eer5L042571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 6 Jun 2017 14:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319623 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 14:40:54 -0000 Author: trasz Date: Tue Jun 6 14:40:53 2017 New Revision: 319623 URL: https://svnweb.freebsd.org/changeset/base/319623 Log: MFC r319073: Random tweaks to cfiscsi(4) man page. This improves wording and adds a few Xrs. Approved by: re (gjb) Modified: stable/11/share/man/man4/cfiscsi.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/cfiscsi.4 ============================================================================== --- stable/11/share/man/man4/cfiscsi.4 Tue Jun 6 14:26:37 2017 (r319622) +++ stable/11/share/man/man4/cfiscsi.4 Tue Jun 6 14:40:53 2017 (r319623) @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd March 29, 2017 +.Dd May 28, 2017 .Dt CFISCSI 4 .Os .Sh NAME @@ -50,9 +50,15 @@ cfiscsi_load="YES" .Sh DESCRIPTION The .Nm -subsystem provides iSCSI target device emulation via +subsystem provides the kernel component of an iSCSI target. +The target is the iSCSI server, providing LUNs backed by local files +and volumes to remote initiators. +The userspace component is provided by +.Xr ctld 8 . +.Nm +is implemented as a .Xr ctl 4 -and +frontend and uses infrastructure provided by .Xr iscsi 4 . .Sh SYSCTL VARIABLES The following variables are available as both @@ -80,7 +86,9 @@ Defaults to 5. .El .Sh SEE ALSO .Xr ctl 4 , -.Xr iscsi 4 +.Xr iscsi 4 , +.Xr ctl.conf 5 , +.Xr ctld 8 .Sh HISTORY The .Nm From owner-svn-src-stable-11@freebsd.org Tue Jun 6 14:46:24 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B05B5BEE36D; Tue, 6 Jun 2017 14:46:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E3786F088; Tue, 6 Jun 2017 14:46:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v56EkNKC046369; Tue, 6 Jun 2017 14:46:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v56EkN8g046368; Tue, 6 Jun 2017 14:46:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706061446.v56EkN8g046368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Jun 2017 14:46:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319624 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 14:46:24 -0000 Author: gjb Date: Tue Jun 6 14:46:23 2017 New Revision: 319624 URL: https://svnweb.freebsd.org/changeset/base/319624 Log: MFC r318943 (avg): MFV r318942: 8166 zpool scrub thinks it repaired offline device https://www.illumos.org/issues/8166 If we do a scrub while a leaf device is offline (via "zpool offline"), we will inadvertently clear the DTL (dirty time log) of the offline device, even though it is still damaged. When the device comes back online, we will incompletely resilver it, thinking that the scrub repaired blocks written before the scrub was started. The incomplete resilver can lead to data loss if there is a subsequent failure of a different leaf device. The fix is to never clear the DTL of offline devices. Note that if a device is onlined while a scrub is in progress, the scrub will be restarted. The problem can be worked around by running "zpool scrub" after "zpool online". See also https://github.com/zfsonlinux/zfs/issues/5806 PR: 219537 Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Tue Jun 6 14:40:53 2017 (r319623) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Tue Jun 6 14:46:23 2017 (r319624) @@ -1929,6 +1929,9 @@ vdev_dtl_should_excise(vdev_t *vd) ASSERT0(scn->scn_phys.scn_errors); ASSERT0(vd->vdev_children); + if (vd->vdev_state < VDEV_STATE_DEGRADED) + return (B_FALSE); + if (vd->vdev_resilver_txg == 0 || range_tree_space(vd->vdev_dtl[DTL_MISSING]) == 0) return (B_TRUE); From owner-svn-src-stable-11@freebsd.org Tue Jun 6 17:00:22 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF6B2BF0CD5; Tue, 6 Jun 2017 17:00:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3397375C; Tue, 6 Jun 2017 17:00:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v56H0LNl001142; Tue, 6 Jun 2017 17:00:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v56H0LnS001139; Tue, 6 Jun 2017 17:00:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706061700.v56H0LnS001139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 6 Jun 2017 17:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319628 - in stable/11: share/man/man4 usr.sbin/iscsid X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 17:00:22 -0000 Author: trasz Date: Tue Jun 6 17:00:21 2017 New Revision: 319628 URL: https://svnweb.freebsd.org/changeset/base/319628 Log: MFC r319074: Minor tweaks to iscsi(4) and iscsid(8). This is mostly wording and clarification of the userspace/kernel split. Approved by: re (gjb) Modified: stable/11/share/man/man4/iscsi.4 stable/11/usr.sbin/iscsid/iscsid.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/iscsi.4 ============================================================================== --- stable/11/share/man/man4/iscsi.4 Tue Jun 6 16:52:07 2017 (r319627) +++ stable/11/share/man/man4/iscsi.4 Tue Jun 6 17:00:21 2017 (r319628) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 11, 2015 +.Dd May 28, 2017 .Dt ISCSI 4 .Os .Sh NAME @@ -46,18 +46,14 @@ iscsi_load="YES" .Sh DESCRIPTION The .Nm -subsystem provides the kernel component of an iSCSI initiator. +subsystem provides the kernel component of an iSCSI initiator, +responsible for implementing the Full Feature Phase of the iSCSI protocol. The initiator is the iSCSI client, which connects to an iSCSI target, providing local access to a remote block device. The userland component is provided by .Xr iscsid 8 and both the kernel and userland are configured using .Xr iscsictl 8 . -The -.Nm -subsystem is responsible for implementing the -.Qq Full Feature Phase -of the iSCSI protocol. .Sh SYSCTL VARIABLES The following variables are available as both .Xr sysctl 8 Modified: stable/11/usr.sbin/iscsid/iscsid.8 ============================================================================== --- stable/11/usr.sbin/iscsid/iscsid.8 Tue Jun 6 16:52:07 2017 (r319627) +++ stable/11/usr.sbin/iscsid/iscsid.8 Tue Jun 6 17:00:21 2017 (r319628) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2014 +.Dd May 28, 2017 .Dt ISCSID 8 .Os .Sh NAME @@ -43,12 +43,15 @@ .Sh DESCRIPTION The .Nm -daemon is responsible for performing the Login Phase of iSCSI connections, -as well as performing SendTargets discovery. +daemon is the userspace component of the iSCSI initiator, +responsible for performing the Login Phase +of iSCSI connections and the SendTargets discovery. .Pp Upon startup, the .Nm -daemon opens the iSCSI initiator device file and waits for kernel requests. +daemon opens the iSCSI initiator device file and waits for requests +from the kernel component, +.Xr iscsi 4 . .Nm does not use any configuration files. All needed information is supplied by the kernel. From owner-svn-src-stable-11@freebsd.org Tue Jun 6 17:10:35 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1DE3BF0F7F; Tue, 6 Jun 2017 17:10:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFB2973C9B; Tue, 6 Jun 2017 17:10:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v56HAYQZ007992; Tue, 6 Jun 2017 17:10:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v56HAY8j007991; Tue, 6 Jun 2017 17:10:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706061710.v56HAY8j007991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 6 Jun 2017 17:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319629 - stable/11/usr.bin/rctl X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 17:10:36 -0000 Author: trasz Date: Tue Jun 6 17:10:34 2017 New Revision: 319629 URL: https://svnweb.freebsd.org/changeset/base/319629 Log: MFC r319075: Random tweaks to rctl(8). This is just wording and formatting fixes. MFC r319432: Use proper capitalization with .Dd. Approved by: re (gjb) Modified: stable/11/usr.bin/rctl/rctl.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/rctl/rctl.8 ============================================================================== --- stable/11/usr.bin/rctl/rctl.8 Tue Jun 6 17:00:21 2017 (r319628) +++ stable/11/usr.bin/rctl/rctl.8 Tue Jun 6 17:10:34 2017 (r319629) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 30, 2016 +.Dd May 28, 2017 .Dt RCTL 8 .Os .Sh NAME @@ -84,7 +84,7 @@ Remove rules matching .Ar filter from the RCTL database. .It Fl u Ar filter -Display resource usage for a subject +Display resource utilization for a subject .Po .Sy process , .Sy user , @@ -173,7 +173,6 @@ resource would be "::maxproc". .Sh SUBJECTS .Bl -column -offset 3n "pseudoterminals" ".Sy username or numerical User ID" -.It Em subject Ta Em subject-id .It Sy process Ta numerical Process ID .It Sy user Ta user name or numerical User ID .It Sy loginclass Ta login class from @@ -182,7 +181,6 @@ resource would be .El .Sh RESOURCES .Bl -column -offset 3n "pseudoterminals" -.It Em resource .It Sy cputime Ta "CPU time, in seconds" .It Sy datasize Ta "data size, in bytes" .It Sy stacksize Ta "stack size, in bytes" @@ -211,7 +209,6 @@ resource would be .El .Sh ACTIONS .Bl -column -offset 3n "pseudoterminals" -.It Em action .It Sy deny Ta deny the allocation; not supported for .Sy cputime , .Sy wallclock , @@ -269,7 +266,7 @@ Prevent user "joe" from allocating more than 1GB of vi Remove all RCTL rules: .Dl Nm Fl r Ar \&: .Pp -Display resource usage information for jail named "www": +Display resource utilization information for jail named "www": .Dl Nm Fl hu Ar jail:www .Pp Display all the rules applicable to process with PID 512: From owner-svn-src-stable-11@freebsd.org Tue Jun 6 17:27:43 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 282BABF16E1; Tue, 6 Jun 2017 17:27:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F371074880; Tue, 6 Jun 2017 17:27:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v56HRg7J013622; Tue, 6 Jun 2017 17:27:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v56HRfsJ013619; Tue, 6 Jun 2017 17:27:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706061727.v56HRfsJ013619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 6 Jun 2017 17:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319630 - in stable/11: share/man/man4 usr.bin/rctl X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 17:27:43 -0000 Author: trasz Date: Tue Jun 6 17:27:41 2017 New Revision: 319630 URL: https://svnweb.freebsd.org/changeset/base/319630 Log: MFC r319076: Declutter rctl(8) by moving kernel build instructions into newly created rctl(4). Approved by: re (gjb) Added: stable/11/share/man/man4/rctl.4 - copied unchanged from r319076, head/share/man/man4/rctl.4 Modified: stable/11/share/man/man4/Makefile stable/11/usr.bin/rctl/rctl.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/Makefile ============================================================================== --- stable/11/share/man/man4/Makefile Tue Jun 6 17:10:34 2017 (r319629) +++ stable/11/share/man/man4/Makefile Tue Jun 6 17:27:41 2017 (r319630) @@ -433,6 +433,7 @@ MAN= aac.4 \ ral.4 \ random.4 \ rc.4 \ + rctl.4 \ re.4 \ rgephy.4 \ rights.4 \ Copied: stable/11/share/man/man4/rctl.4 (from r319076, head/share/man/man4/rctl.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man4/rctl.4 Tue Jun 6 17:27:41 2017 (r319630, copy of r319076, head/share/man/man4/rctl.4) @@ -0,0 +1,74 @@ +.\" Copyright (c) 2017 Edward Tomasz Napierala +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.Dd May 28, 2017 +.Dt RCTL 4 +.Os +.Sh NAME +.Nm rctl +.Nd resource limits +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "options RACCT" +.Cd "options RCTL" +.Ed +.Sh DESCRIPTION +The +.Nm +subsystem provides a flexible resource limits mechanism, +controlled by a set of rules that can be added or removed at runtime +using the +.Xr rctl 8 +management utility. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt, or +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va kern.racct.enable: No 1 +Enable +.Nm . +This defaults to 1, unless +.Cd "options RACCT_DEFAULT_TO_DISABLED" +is set in the kernel configuration file. +.El +.Sh SEE ALSO +.Xr rctl.conf 5 , +.Xr rctl 8 +.Sh HISTORY +The +.Nm +subsystem first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +subsystem was developed by +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. Modified: stable/11/usr.bin/rctl/rctl.8 ============================================================================== --- stable/11/usr.bin/rctl/rctl.8 Tue Jun 6 17:10:34 2017 (r319629) +++ stable/11/usr.bin/rctl/rctl.8 Tue Jun 6 17:27:41 2017 (r319630) @@ -51,13 +51,6 @@ .Fl u .Op Fl h .Ar filter Ar ... -.Pp -.Nm -requires the kernel to be compiled with: -.Bd -ragged -offset indent -.Cd "options RACCT" -.Cd "options RCTL" -.Ed .Sh DESCRIPTION When called without options, the .Nm @@ -244,19 +237,6 @@ and Not all actions are supported for all resources. Attempting to add a rule with an action not supported by a given resource will result in error. -.Sh LOADER TUNABLES -Tunables can be set at the -.Xr loader 8 -prompt, or -.Xr loader.conf 5 . -.Bl -tag -width indent -.It Va kern.racct.enable: No 1 -Enable -.Nm . -This defaults to 1, unless -.Cd "options RACCT_DEFAULT_TO_DISABLED" -is set in the kernel configuration file. -.El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES @@ -281,6 +261,7 @@ Display all rules matching user "joe": Display all rules matching login classes: .Dl Nm Ar loginclass: .Sh SEE ALSO +.Xr rctl 4 , .Xr rctl.conf 5 .Sh HISTORY The From owner-svn-src-stable-11@freebsd.org Tue Jun 6 19:20:29 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF5ADBF331A; Tue, 6 Jun 2017 19:20:29 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEE71779B2; Tue, 6 Jun 2017 19:20:29 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v56JKSRg058097; Tue, 6 Jun 2017 19:20:28 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v56JKSSH058096; Tue, 6 Jun 2017 19:20:28 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706061920.v56JKSSH058096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 6 Jun 2017 19:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319632 - stable/11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 19:20:30 -0000 Author: cy Date: Tue Jun 6 19:20:28 2017 New Revision: 319632 URL: https://svnweb.freebsd.org/changeset/base/319632 Log: MFC r318998: Fix return value of ip_sync_nat. Previously, regardless of error it always returned a return code of 0. Obtained from: NetBSD ip_sync.c r1.5 Approved by: re (delphij) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Tue Jun 6 18:40:14 2017 (r319631) +++ stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Tue Jun 6 19:20:28 2017 (r319632) @@ -939,7 +939,7 @@ ipf_sync_nat(softc, sp, data) nat_t *n, *nat; synclist_t *sl; u_int hv = 0; - int err; + int err = 0; READ_ENTER(&softs->ipf_syncnat); @@ -1016,7 +1016,7 @@ ipf_sync_nat(softc, sp, data) } RWLOCK_EXIT(&softs->ipf_syncnat); - return 0; + return err; } From owner-svn-src-stable-11@freebsd.org Wed Jun 7 11:30:30 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14BACC09EF7; Wed, 7 Jun 2017 11:30:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D787D703A4; Wed, 7 Jun 2017 11:30:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v57BUTT7053475; Wed, 7 Jun 2017 11:30:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v57BUSPq053473; Wed, 7 Jun 2017 11:30:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706071130.v57BUSPq053473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 7 Jun 2017 11:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319650 - in stable/11: share/man/man9 sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 11:30:30 -0000 Author: kib Date: Wed Jun 7 11:30:28 2017 New Revision: 319650 URL: https://svnweb.freebsd.org/changeset/base/319650 Log: MFC r318781: Add BIT_OR2(), BIT_AND2(), BIT_NAND2(), BIT_XOR() and BIT_XOR2(). Approved by: re (marius) Modified: stable/11/share/man/man9/bitset.9 stable/11/sys/sys/bitset.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/bitset.9 ============================================================================== --- stable/11/share/man/man9/bitset.9 Wed Jun 7 09:10:24 2017 (r319649) +++ stable/11/share/man/man9/bitset.9 Wed Jun 7 11:30:28 2017 (r319650) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 1, 2016 +.Dd May 24, 2017 .Dt BITSET 9 .Os .Sh NAME @@ -48,8 +48,13 @@ .Nm BIT_OVERLAP , .Nm BIT_CMP , .Nm BIT_OR , +.Nm BIT_OR2 , .Nm BIT_AND , +.Nm BIT_AND2 , .Nm BIT_NAND , +.Nm BIT_NAND2 , +.Nm BIT_XOR , +.Nm BIT_XOR2 , .Nm BIT_CLR_ATOMIC , .Nm BIT_SET_ATOMIC , .Nm BIT_SET_ATOMIC_ACQ , @@ -95,8 +100,33 @@ .Fa "const SETSIZE" "struct STRUCTNAME *bitset1" "struct STRUCTNAME *bitset2" .Fc .Fn BIT_OR "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_OR2 +.Fa "const SETSIZE" +.Fa "struct STRUCTNAME *dst" +.Fa "struct STRUCTNAME *src1" +.Fa "struct STRUCTNAME *src2" +.Fc .Fn BIT_AND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_AND2 +.Fa "const SETSIZE" +.Fa "struct STRUCTNAME *dst" +.Fa "struct STRUCTNAME *src1" +.Fa "struct STRUCTNAME *src2" +.Fc .Fn BIT_NAND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_NAND2 +.Fa "const SETSIZE" +.Fa "struct STRUCTNAME *dst" +.Fa "struct STRUCTNAME *src1" +.Fa "struct STRUCTNAME *src2" +.Fc +.Fn BIT_XOR "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_XOR2 +.Fa "const SETSIZE" +.Fa "struct STRUCTNAME *dst" +.Fa "struct STRUCTNAME *src1" +.Fa "struct STRUCTNAME *src2" +.Fc .\" .Fn BIT_CLR_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" .Fn BIT_SET_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" @@ -312,6 +342,23 @@ is composed of multiple machine words, performs multiple individually atomic operations.) .Pp The +.Fn BIT_OR2 +macro computes +.Fa src1 +bitwise or +.Fa src2 +and assigns the result to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst += +.Fa src1 +| +.Fa src2 . ) +.Pp +The .Fn BIT_AND macro clears bits absent from .Fa src @@ -328,6 +375,23 @@ is similar, with the same atomic semantics as .Fn BIT_OR_ATOMIC . .Pp The +.Fn BIT_AND2 +macro computes +.Fa src1 +bitwise and +.Fa src2 +and assigns the result to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst += +.Fa src1 +& +.Fa src2 . ) +.Pp +The .Fn BIT_NAND macro clears bits set in .Fa src @@ -339,6 +403,53 @@ equivalent of the scalar: .Fa dst &= .Fa ~ src . ) +.Pp +The +.Fn BIT_NAND2 +macro computes +.Fa src1 +bitwise and not +.Fa src2 +and assigns the result to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst += +.Fa src1 +& ~ +.Fa src2 . ) +.Pp +The +.Fn BIT_XOR +macro toggles bits set in +.Fa src +in +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +^= +.Fa src . ) +.Pp +The +.Fn BIT_XOR2 +macro computes +.Fa src1 +bitwise exclusive or +.Fa src2 +and assigns the result to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst += +.Fa src1 +^ +.Fa src2 . ) .Sh BITSET_T_INITIALIZER EXAMPLE .Bd -literal BITSET_DEFINE(_myset, MYSETSIZE); Modified: stable/11/sys/sys/bitset.h ============================================================================== --- stable/11/sys/sys/bitset.h Wed Jun 7 09:10:24 2017 (r319649) +++ stable/11/sys/sys/bitset.h Wed Jun 7 11:30:28 2017 (r319650) @@ -122,16 +122,46 @@ (d)->__bits[__i] |= (s)->__bits[__i]; \ } while (0) +#define BIT_OR2(_s, d, s1, s2) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] = (s1)->__bits[__i] | (s2)->__bits[__i];\ +} while (0) + #define BIT_AND(_s, d, s) do { \ __size_t __i; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ (d)->__bits[__i] &= (s)->__bits[__i]; \ } while (0) +#define BIT_AND2(_s, d, s1, s2) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] = (s1)->__bits[__i] & (s2)->__bits[__i];\ +} while (0) + #define BIT_NAND(_s, d, s) do { \ __size_t __i; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ (d)->__bits[__i] &= ~(s)->__bits[__i]; \ +} while (0) + +#define BIT_NAND2(_s, d, s1, s2) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] = (s1)->__bits[__i] & ~(s2)->__bits[__i];\ +} while (0) + +#define BIT_XOR(_s, d, s) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] ^= (s)->__bits[__i]; \ +} while (0) + +#define BIT_XOR2(_s, d, s1, s2) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] = (s1)->__bits[__i] ^ (s2)->__bits[__i];\ } while (0) #define BIT_CLR_ATOMIC(_s, n, p) \ From owner-svn-src-stable-11@freebsd.org Wed Jun 7 11:39:54 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1996AC0A0B7; Wed, 7 Jun 2017 11:39:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCA3D708F6; Wed, 7 Jun 2017 11:39:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v57BdrXN057726; Wed, 7 Jun 2017 11:39:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v57Bdqle057724; Wed, 7 Jun 2017 11:39:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706071139.v57Bdqle057724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 7 Jun 2017 11:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319651 - in stable/11: include sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 11:39:54 -0000 Author: kib Date: Wed Jun 7 11:39:52 2017 New Revision: 319651 URL: https://svnweb.freebsd.org/changeset/base/319651 Log: MFC r318780: Use __BSD_VISIBLE test instead checking for absense of _POSIX_SOURCE. Approved by: re (marius) Modified: stable/11/include/termios.h stable/11/sys/sys/_termios.h Directory Properties: stable/11/ (props changed) Modified: stable/11/include/termios.h ============================================================================== --- stable/11/include/termios.h Wed Jun 7 11:30:28 2017 (r319650) +++ stable/11/include/termios.h Wed Jun 7 11:39:52 2017 (r319651) @@ -42,12 +42,12 @@ typedef __pid_t pid_t; #define _PID_T_DECLARED #endif -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define OXTABS TAB3 #define MDMBUF CCAR_OFLOW #endif -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE) #endif @@ -57,7 +57,7 @@ typedef __pid_t pid_t; #define TCSANOW 0 /* make change immediate */ #define TCSADRAIN 1 /* drain output, then change */ #define TCSAFLUSH 2 /* drain output, flush input */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define TCSASOFT 0x10 /* flag - don't alter h.w. state */ #endif @@ -95,7 +95,7 @@ __END_DECLS #endif /* !_TERMIOS_H_ */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #include #include #endif Modified: stable/11/sys/sys/_termios.h ============================================================================== --- stable/11/sys/sys/_termios.h Wed Jun 7 11:30:28 2017 (r319650) +++ stable/11/sys/sys/_termios.h Wed Jun 7 11:39:52 2017 (r319651) @@ -42,15 +42,15 @@ */ #define VEOF 0 /* ICANON */ #define VEOL 1 /* ICANON */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VEOL2 2 /* ICANON together with IEXTEN */ #endif #define VERASE 3 /* ICANON */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VWERASE 4 /* ICANON together with IEXTEN */ #endif #define VKILL 5 /* ICANON */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VREPRINT 6 /* ICANON together with IEXTEN */ #define VERASE2 7 /* ICANON */ #endif @@ -58,18 +58,18 @@ #define VINTR 8 /* ISIG */ #define VQUIT 9 /* ISIG */ #define VSUSP 10 /* ISIG */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VDSUSP 11 /* ISIG together with IEXTEN */ #endif #define VSTART 12 /* IXON, IXOFF */ #define VSTOP 13 /* IXON, IXOFF */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VLNEXT 14 /* IEXTEN */ #define VDISCARD 15 /* IEXTEN */ #endif #define VMIN 16 /* !ICANON */ #define VTIME 17 /* !ICANON */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define VSTATUS 18 /* ICANON together with IEXTEN */ /* 19 spare 2 */ #endif @@ -91,16 +91,16 @@ #define ICRNL 0x00000100 /* map CR to NL (ala CRMOD) */ #define IXON 0x00000200 /* enable output flow control */ #define IXOFF 0x00000400 /* enable input flow control */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define IXANY 0x00000800 /* any char will restart after stop */ #define IMAXBEL 0x00002000 /* ring bell on input queue full */ -#endif /*_POSIX_SOURCE */ +#endif /* * Output flags - software output processing */ #define OPOST 0x00000001 /* enable following output processing */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define ONLCR 0x00000002 /* map NL to CR-NL (ala CRMOD) */ #define TABDLY 0x00000004 /* tab delay mask */ #define TAB0 0x00000000 /* no tab delay and expansion */ @@ -109,12 +109,12 @@ #define OCRNL 0x00000010 /* map CR to NL on output */ #define ONOCR 0x00000020 /* no CR output at column 0 */ #define ONLRET 0x00000040 /* NL performs CR function */ -#endif /*_POSIX_SOURCE */ +#endif /* * Control flags - hardware control of terminal */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define CIGNORE 0x00000001 /* ignore control flags */ #endif #define CSIZE 0x00000300 /* character size mask */ @@ -128,7 +128,7 @@ #define PARODD 0x00002000 /* odd parity, else even */ #define HUPCL 0x00004000 /* hang up on last close */ #define CLOCAL 0x00008000 /* ignore modem status lines */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define CCTS_OFLOW 0x00010000 /* CTS flow control of output */ #define CRTSCTS (CCTS_OFLOW | CRTS_IFLOW) #define CRTS_IFLOW 0x00020000 /* RTS flow control of input */ @@ -146,30 +146,30 @@ * input flag. */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define ECHOKE 0x00000001 /* visual erase for line kill */ -#endif /*_POSIX_SOURCE */ +#endif #define ECHOE 0x00000002 /* visually erase chars */ #define ECHOK 0x00000004 /* echo NL after line kill */ #define ECHO 0x00000008 /* enable echoing */ #define ECHONL 0x00000010 /* echo NL even if ECHO is off */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define ECHOPRT 0x00000020 /* visual erase mode for hardcopy */ #define ECHOCTL 0x00000040 /* echo control chars as ^(Char) */ -#endif /*_POSIX_SOURCE */ +#endif #define ISIG 0x00000080 /* enable signals INTR, QUIT, [D]SUSP */ #define ICANON 0x00000100 /* canonicalize input lines */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define ALTWERASE 0x00000200 /* use alternate WERASE algorithm */ -#endif /*_POSIX_SOURCE */ +#endif #define IEXTEN 0x00000400 /* enable DISCARD and LNEXT */ #define EXTPROC 0x00000800 /* external processing */ #define TOSTOP 0x00400000 /* stop background jobs from output */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define FLUSHO 0x00800000 /* output being flushed (state) */ #define NOKERNINFO 0x02000000 /* no kernel output from VSTATUS */ #define PENDIN 0x20000000 /* XXX retype pending input (state) */ -#endif /*_POSIX_SOURCE */ +#endif #define NOFLSH 0x80000000 /* don't flush after interrupt */ /* @@ -191,7 +191,7 @@ #define B9600 9600 #define B19200 19200 #define B38400 38400 -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define B7200 7200 #define B14400 14400 #define B28800 28800 @@ -203,7 +203,7 @@ #define B921600 921600 #define EXTA 19200 #define EXTB 38400 -#endif /* !_POSIX_SOURCE */ +#endif typedef unsigned int tcflag_t; typedef unsigned char cc_t; From owner-svn-src-stable-11@freebsd.org Wed Jun 7 12:50:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BE9BC3110D; Wed, 7 Jun 2017 12:50:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05DB4732DD; Wed, 7 Jun 2017 12:50:55 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v57CotWV086615; Wed, 7 Jun 2017 12:50:55 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v57Cos26086612; Wed, 7 Jun 2017 12:50:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706071250.v57Cos26086612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 7 Jun 2017 12:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319654 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 12:50:56 -0000 Author: tuexen Date: Wed Jun 7 12:50:54 2017 New Revision: 319654 URL: https://svnweb.freebsd.org/changeset/base/319654 Log: MFC r319556: Fix the ICMP6 handling for TCP. The ICMP6 packets might not be contained in a single mbuf. So don't assume this. Keep the IPv4 and IPv6 code in sync and make explicit that the syncache code only need the TCP sequence number, not the complete TCP header. Approved by: re (marius) Modified: stable/11/sys/netinet/tcp_subr.c stable/11/sys/netinet/tcp_syncache.c stable/11/sys/netinet/tcp_syncache.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_subr.c ============================================================================== --- stable/11/sys/netinet/tcp_subr.c Wed Jun 7 11:43:36 2017 (r319653) +++ stable/11/sys/netinet/tcp_subr.c Wed Jun 7 12:50:54 2017 (r319654) @@ -1966,16 +1966,16 @@ tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip) if (inp != NULL && PRC_IS_REDIRECT(cmd)) { /* signal EHOSTDOWN, as it flushes the cached route */ inp = (*notify)(inp, EHOSTDOWN); - if (inp != NULL) - INP_WUNLOCK(inp); - } else if (inp != NULL) { + goto out; + } + icmp_tcp_seq = th->th_seq; + if (inp != NULL) { if (!(inp->inp_flags & INP_TIMEWAIT) && !(inp->inp_flags & INP_DROPPED) && !(inp->inp_socket == NULL)) { - icmp_tcp_seq = ntohl(th->th_seq); tp = intotcpcb(inp); - if (SEQ_GEQ(icmp_tcp_seq, tp->snd_una) && - SEQ_LT(icmp_tcp_seq, tp->snd_max)) { + if (SEQ_GEQ(ntohl(icmp_tcp_seq), tp->snd_una) && + SEQ_LT(ntohl(icmp_tcp_seq), tp->snd_max)) { if (cmd == PRC_MSGSIZE) { /* * MTU discovery: @@ -1983,7 +1983,7 @@ tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip) * in the route to the suggested new * value (if given) and then notify. */ - mtu = ntohs(icp->icmp_nextmtu); + mtu = ntohs(icp->icmp_nextmtu); /* * If no alternative MTU was * proposed, try the next smaller @@ -2014,16 +2014,17 @@ tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip) inetctlerrmap[cmd]); } } - if (inp != NULL) - INP_WUNLOCK(inp); } else { bzero(&inc, sizeof(inc)); inc.inc_fport = th->th_dport; inc.inc_lport = th->th_sport; inc.inc_faddr = faddr; inc.inc_laddr = ip->ip_src; - syncache_unreach(&inc, th); + syncache_unreach(&inc, icmp_tcp_seq); } +out: + if (inp != NULL) + INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); } #endif /* INET */ @@ -2033,7 +2034,6 @@ void tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) { struct in6_addr *dst; - struct tcphdr *th; struct inpcb *(*notify)(struct inpcb *, int) = tcp_notify; struct ip6_hdr *ip6; struct mbuf *m; @@ -2043,11 +2043,14 @@ tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) struct ip6ctlparam *ip6cp = NULL; const struct sockaddr_in6 *sa6_src = NULL; struct in_conninfo inc; + struct tcp_ports { + uint16_t th_sport; + uint16_t th_dport; + } t_ports; tcp_seq icmp_tcp_seq; unsigned int mtu; unsigned int off; - if (sa->sa_family != AF_INET6 || sa->sa_len != sizeof(struct sockaddr_in6)) return; @@ -2096,27 +2099,31 @@ tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) /* Check if we can safely get the ports from the tcp hdr */ if (m == NULL || (m->m_pkthdr.len < - (int32_t) (off + offsetof(struct tcphdr, th_seq)))) { + (int32_t) (off + sizeof(struct tcp_ports)))) { return; } - - th = (struct tcphdr *) mtodo(ip6cp->ip6c_m, ip6cp->ip6c_off); + bzero(&t_ports, sizeof(struct tcp_ports)); + m_copydata(m, off, sizeof(struct tcp_ports), (caddr_t)&t_ports); INP_INFO_RLOCK(&V_tcbinfo); - inp = in6_pcblookup(&V_tcbinfo, &ip6->ip6_dst, th->th_dport, - &ip6->ip6_src, th->th_sport, INPLOOKUP_WLOCKPCB, NULL); + inp = in6_pcblookup(&V_tcbinfo, &ip6->ip6_dst, t_ports.th_dport, + &ip6->ip6_src, t_ports.th_sport, INPLOOKUP_WLOCKPCB, NULL); if (inp != NULL && PRC_IS_REDIRECT(cmd)) { /* signal EHOSTDOWN, as it flushes the cached route */ inp = (*notify)(inp, EHOSTDOWN); - if (inp != NULL) - INP_WUNLOCK(inp); - } else if (inp != NULL) { + goto out; + } + off += sizeof(struct tcp_ports); + if (m->m_pkthdr.len < (int32_t) (off + sizeof(tcp_seq))) { + goto out; + } + m_copydata(m, off, sizeof(tcp_seq), (caddr_t)&icmp_tcp_seq); + if (inp != NULL) { if (!(inp->inp_flags & INP_TIMEWAIT) && !(inp->inp_flags & INP_DROPPED) && !(inp->inp_socket == NULL)) { - icmp_tcp_seq = ntohl(th->th_seq); tp = intotcpcb(inp); - if (SEQ_GEQ(icmp_tcp_seq, tp->snd_una) && - SEQ_LT(icmp_tcp_seq, tp->snd_max)) { + if (SEQ_GEQ(ntohl(icmp_tcp_seq), tp->snd_una) && + SEQ_LT(ntohl(icmp_tcp_seq), tp->snd_max)) { if (cmd == PRC_MSGSIZE) { /* * MTU discovery: @@ -2133,22 +2140,20 @@ tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) */ if (mtu < IPV6_MMTU) mtu = IPV6_MMTU - 8; - - bzero(&inc, sizeof(inc)); inc.inc_fibnum = M_GETFIB(m); inc.inc_flags |= INC_ISIPV6; inc.inc6_faddr = *dst; if (in6_setscope(&inc.inc6_faddr, m->m_pkthdr.rcvif, NULL)) - goto unlock_inp; - + goto out; /* * Only process the offered MTU if it * is smaller than the current one. */ if (mtu < tp->t_maxseg + - (sizeof (*th) + sizeof (*ip6))) { + sizeof (struct tcphdr) + + sizeof (struct ip6_hdr)) { tcp_hc_updatemtu(&inc, mtu); tcp_mtudisc(inp, mtu); ICMP6STAT_INC(icp6s_pmtuchg); @@ -2158,19 +2163,19 @@ tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) inet6ctlerrmap[cmd]); } } -unlock_inp: - if (inp != NULL) - INP_WUNLOCK(inp); } else { bzero(&inc, sizeof(inc)); inc.inc_fibnum = M_GETFIB(m); inc.inc_flags |= INC_ISIPV6; - inc.inc_fport = th->th_dport; - inc.inc_lport = th->th_sport; + inc.inc_fport = t_ports.th_dport; + inc.inc_lport = t_ports.th_sport; inc.inc6_faddr = *dst; inc.inc6_laddr = ip6->ip6_src; - syncache_unreach(&inc, th); + syncache_unreach(&inc, icmp_tcp_seq); } +out: + if (inp != NULL) + INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); } #endif /* INET6 */ Modified: stable/11/sys/netinet/tcp_syncache.c ============================================================================== --- stable/11/sys/netinet/tcp_syncache.c Wed Jun 7 11:43:36 2017 (r319653) +++ stable/11/sys/netinet/tcp_syncache.c Wed Jun 7 12:50:54 2017 (r319654) @@ -594,7 +594,7 @@ syncache_badack(struct in_conninfo *inc) } void -syncache_unreach(struct in_conninfo *inc, struct tcphdr *th) +syncache_unreach(struct in_conninfo *inc, tcp_seq th_seq) { struct syncache *sc; struct syncache_head *sch; @@ -605,7 +605,7 @@ syncache_unreach(struct in_conninfo *inc, struct tcphd goto done; /* If the sequence number != sc_iss, then it's a bogus ICMP msg */ - if (ntohl(th->th_seq) != sc->sc_iss) + if (ntohl(th_seq) != sc->sc_iss) goto done; /* Modified: stable/11/sys/netinet/tcp_syncache.h ============================================================================== --- stable/11/sys/netinet/tcp_syncache.h Wed Jun 7 11:43:36 2017 (r319653) +++ stable/11/sys/netinet/tcp_syncache.h Wed Jun 7 12:50:54 2017 (r319654) @@ -38,7 +38,7 @@ void syncache_init(void); #ifdef VIMAGE void syncache_destroy(void); #endif -void syncache_unreach(struct in_conninfo *, struct tcphdr *); +void syncache_unreach(struct in_conninfo *, tcp_seq); int syncache_expand(struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct socket **, struct mbuf *); int syncache_add(struct in_conninfo *, struct tcpopt *, From owner-svn-src-stable-11@freebsd.org Thu Jun 8 14:32:43 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1CE4BFFFA0; Thu, 8 Jun 2017 14:32:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BEAE847D4; Thu, 8 Jun 2017 14:32:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58EWgZ2024893; Thu, 8 Jun 2017 14:32:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58EWgd4024891; Thu, 8 Jun 2017 14:32:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201706081432.v58EWgd4024891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 8 Jun 2017 14:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319695 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 14:32:43 -0000 Author: mav Date: Thu Jun 8 14:32:42 2017 New Revision: 319695 URL: https://svnweb.freebsd.org/changeset/base/319695 Log: MFC r318907: Remove some code, dead from the day one. Approved by: re (marius) Modified: stable/11/sys/net/if_lagg.c stable/11/sys/net/if_lagg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_lagg.c ============================================================================== --- stable/11/sys/net/if_lagg.c Thu Jun 8 13:04:01 2017 (r319694) +++ stable/11/sys/net/if_lagg.c Thu Jun 8 14:32:42 2017 (r319695) @@ -1716,7 +1716,6 @@ struct lagg_port * lagg_link_active(struct lagg_softc *sc, struct lagg_port *lp) { struct lagg_port *lp_next, *rval = NULL; - // int new_link = LINK_STATE_DOWN; /* * Search a port which reports an active link state. @@ -1743,22 +1742,6 @@ search: } found: - if (rval != NULL) { - /* - * The IEEE 802.1D standard assumes that a lagg with - * multiple ports is always full duplex. This is valid - * for load sharing laggs and if at least two links - * are active. Unfortunately, checking the latter would - * be too expensive at this point. - XXX - if ((sc->sc_capabilities & IFCAP_LAGG_FULLDUPLEX) && - (sc->sc_count > 1)) - new_link = LINK_STATE_FULL_DUPLEX; - else - new_link = rval->lp_link_state; - */ - } - return (rval); } @@ -1775,7 +1758,6 @@ lagg_enqueue(struct ifnet *ifp, struct mbuf *m) static void lagg_rr_attach(struct lagg_softc *sc) { - sc->sc_capabilities = IFCAP_LAGG_FULLDUPLEX; sc->sc_seq = 0; sc->sc_bkt_count = sc->sc_bkt; } @@ -1944,9 +1926,6 @@ lagg_lb_attach(struct lagg_softc *sc) struct lagg_lb *lb; lb = malloc(sizeof(struct lagg_lb), M_DEVBUF, M_WAITOK | M_ZERO); - - sc->sc_capabilities = IFCAP_LAGG_FULLDUPLEX; - lb->lb_key = m_ether_tcpip_hash_init(); sc->sc_psc = lb; Modified: stable/11/sys/net/if_lagg.h ============================================================================== --- stable/11/sys/net/if_lagg.h Thu Jun 8 13:04:01 2017 (r319694) +++ stable/11/sys/net/if_lagg.h Thu Jun 8 14:32:42 2017 (r319695) @@ -185,10 +185,6 @@ struct lagg_ifreq { #define sc_ifflags sc_ifp->if_flags /* flags */ #define sc_ifname sc_ifp->if_xname /* name */ -#define sc_capabilities sc_ifp->if_capabilities /* capabilities */ - -#define IFCAP_LAGG_MASK 0xffff0000 /* private capabilities */ -#define IFCAP_LAGG_FULLDUPLEX 0x00010000 /* full duplex with >1 ports */ /* Private data used by the loadbalancing protocol */ struct lagg_lb { From owner-svn-src-stable-11@freebsd.org Thu Jun 8 14:33:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64A7CC08025; Thu, 8 Jun 2017 14:33:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3434984924; Thu, 8 Jun 2017 14:33:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58EXlb7025012; Thu, 8 Jun 2017 14:33:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58EXlkw025011; Thu, 8 Jun 2017 14:33:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201706081433.v58EXlkw025011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 8 Jun 2017 14:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319696 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 14:33:48 -0000 Author: mav Date: Thu Jun 8 14:33:47 2017 New Revision: 319696 URL: https://svnweb.freebsd.org/changeset/base/319696 Log: MFC r318966: Improve applying unified capabilities to the lagg ports. Some NICs have some capabilities dependent, so that disabling one require disabling some other (TXCSUM/RXCSUM on em). This code tries to reach the consensus more insistently. Approved by: re (marius) Modified: stable/11/sys/net/if_lagg.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_lagg.c ============================================================================== --- stable/11/sys/net/if_lagg.c Thu Jun 8 14:32:42 2017 (r319695) +++ stable/11/sys/net/if_lagg.c Thu Jun 8 14:33:47 2017 (r319696) @@ -561,24 +561,41 @@ static void lagg_capabilities(struct lagg_softc *sc) { struct lagg_port *lp; - int cap = ~0, ena = ~0; - u_long hwa = ~0UL; + int cap, ena, pena; + uint64_t hwa; struct ifnet_hw_tsomax hw_tsomax; LAGG_XLOCK_ASSERT(sc); - memset(&hw_tsomax, 0, sizeof(hw_tsomax)); + /* Get common enabled capabilities for the lagg ports */ + ena = ~0; + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) + ena &= lp->lp_ifp->if_capenable; + ena = (ena == ~0 ? 0 : ena); - /* Get capabilities from the lagg ports */ + /* + * Apply common enabled capabilities back to the lagg ports. + * May require several iterations if they are dependent. + */ + do { + pena = ena; + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + lagg_setcaps(lp, ena); + ena &= lp->lp_ifp->if_capenable; + } + } while (pena != ena); + + /* Get other capabilities from the lagg ports */ + cap = ~0; + hwa = ~(uint64_t)0; + memset(&hw_tsomax, 0, sizeof(hw_tsomax)); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { cap &= lp->lp_ifp->if_capabilities; - ena &= lp->lp_ifp->if_capenable; hwa &= lp->lp_ifp->if_hwassist; if_hw_tsomax_common(lp->lp_ifp, &hw_tsomax); } cap = (cap == ~0 ? 0 : cap); - ena = (ena == ~0 ? 0 : ena); - hwa = (hwa == ~0 ? 0 : hwa); + hwa = (hwa == ~(uint64_t)0 ? 0 : hwa); if (sc->sc_ifp->if_capabilities != cap || sc->sc_ifp->if_capenable != ena || @@ -593,10 +610,6 @@ lagg_capabilities(struct lagg_softc *sc) if_printf(sc->sc_ifp, "capabilities 0x%08x enabled 0x%08x\n", cap, ena); } - - /* Apply unified capabilities back to the lagg ports. */ - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) - lagg_setcaps(lp, ena); } static int From owner-svn-src-stable-11@freebsd.org Thu Jun 8 14:34:40 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA123C0808D; Thu, 8 Jun 2017 14:34:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7D8784A80; Thu, 8 Jun 2017 14:34:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58EYd60025096; Thu, 8 Jun 2017 14:34:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58EYdBt025095; Thu, 8 Jun 2017 14:34:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201706081434.v58EYdBt025095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 8 Jun 2017 14:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319697 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 14:34:41 -0000 Author: mav Date: Thu Jun 8 14:34:39 2017 New Revision: 319697 URL: https://svnweb.freebsd.org/changeset/base/319697 Log: MFC r318970: Call VLAN_CAPABILITIES() when LAGG capabilities change. This makes VLAN on top of LAGG to expose proper capabilities if they are changed after creation. Approved by: re (marius) Modified: stable/11/sys/net/if_lagg.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_lagg.c ============================================================================== --- stable/11/sys/net/if_lagg.c Thu Jun 8 14:33:47 2017 (r319696) +++ stable/11/sys/net/if_lagg.c Thu Jun 8 14:34:39 2017 (r319697) @@ -890,6 +890,7 @@ lagg_port_ioctl(struct ifnet *ifp, u_long cmd, caddr_t LAGG_XLOCK(sc); lagg_capabilities(sc); LAGG_XUNLOCK(sc); + VLAN_CAPABILITIES(sc->sc_ifp); break; case SIOCSIFMTU: @@ -1003,6 +1004,7 @@ lagg_port_ifdetach(void *arg __unused, struct ifnet *i lp->lp_detaching = 1; lagg_port_destroy(lp, 1); LAGG_XUNLOCK(sc); + VLAN_CAPABILITIES(sc->sc_ifp); } static void @@ -1362,6 +1364,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data error = lagg_port_create(sc, tpif); LAGG_XUNLOCK(sc); if_rele(tpif); + VLAN_CAPABILITIES(ifp); break; case SIOCSLAGGDELPORT: error = priv_check(td, PRIV_NET_LAGG); @@ -1385,6 +1388,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data error = lagg_port_destroy(lp, 1); LAGG_XUNLOCK(sc); if_rele(tpif); + VLAN_CAPABILITIES(ifp); break; case SIOCSIFFLAGS: /* Set flags on ports too */ @@ -1435,6 +1439,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data } lagg_capabilities(sc); LAGG_XUNLOCK(sc); + VLAN_CAPABILITIES(ifp); error = 0; break; From owner-svn-src-stable-11@freebsd.org Thu Jun 8 15:47:53 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D0FBC09152; Thu, 8 Jun 2017 15:47:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B591219E; Thu, 8 Jun 2017 15:47:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58Flqe7053714; Thu, 8 Jun 2017 15:47:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58FlqFs053713; Thu, 8 Jun 2017 15:47:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706081547.v58FlqFs053713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 8 Jun 2017 15:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319698 - stable/11/release/arm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 15:47:53 -0000 Author: gjb Date: Thu Jun 8 15:47:52 2017 New Revision: 319698 URL: https://svnweb.freebsd.org/changeset/base/319698 Log: MFC r319603, r319608, r319609: Create a hard link for sun7i-a20-cubieboard2.dtb to allow the cubieboard2 to find the correct dtb file. Note: r319608 and r319609 are included, but are no-op changes to the original change, and only included to prevent these commits from showing up on the MFC tracking page. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/arm/CUBIEBOARD2.conf Directory Properties: stable/11/ (props changed) Modified: stable/11/release/arm/CUBIEBOARD2.conf ============================================================================== --- stable/11/release/arm/CUBIEBOARD2.conf Thu Jun 8 14:34:39 2017 (r319697) +++ stable/11/release/arm/CUBIEBOARD2.conf Thu Jun 8 15:47:52 2017 (r319698) @@ -30,6 +30,8 @@ arm_install_uboot() { chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ ${FATMOUNT}/ubldr.bin + chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/cubieboard2.dtb \ + ${UFSMOUNT}/boot/dtb/sun7i-a20-cubieboard2.dtb chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} From owner-svn-src-stable-11@freebsd.org Thu Jun 8 15:50:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 086B7C09233; Thu, 8 Jun 2017 15:50:52 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA9B12553; Thu, 8 Jun 2017 15:50:51 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58FooC5055302; Thu, 8 Jun 2017 15:50:50 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58Fooe6055301; Thu, 8 Jun 2017 15:50:50 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706081550.v58Fooe6055301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 8 Jun 2017 15:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319700 - stable/11/release/arm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 15:50:52 -0000 Author: manu Date: Thu Jun 8 15:50:50 2017 New Revision: 319700 URL: https://svnweb.freebsd.org/changeset/base/319700 Log: Currently stable/11 is using custom DTS for beaglebone(-black) while CURRENT is using the upstream ones from Linux. U-Boot ports have been changed to use the upstream names so 11.1-PRERELEASE doesn't boot. Since we cannot MFC the DTS easily (a lot of drivers would have to be modified) add links on the dts with upstream names. This is a direct commit to stable/11 Approved by: re (marius) Modified: stable/11/release/arm/BEAGLEBONE.conf Modified: stable/11/release/arm/BEAGLEBONE.conf ============================================================================== --- stable/11/release/arm/BEAGLEBONE.conf Thu Jun 8 15:48:54 2017 (r319699) +++ stable/11/release/arm/BEAGLEBONE.conf Thu Jun 8 15:50:50 2017 (r319700) @@ -28,6 +28,10 @@ arm_install_uboot() { chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ ${FATMOUNT}/ubldr.bin + chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/beaglebone.dtb \ + ${UFSMOUNT}/boot/dtb/am335x-bone.dtb + chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/beaglebone-black.dtb \ + ${UFSMOUNT}/boot/dtb/am335x-boneblack.dtb chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} From owner-svn-src-stable-11@freebsd.org Thu Jun 8 17:10:59 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48E35C0ACB5; Thu, 8 Jun 2017 17:10:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18BE765C84; Thu, 8 Jun 2017 17:10:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58HAw42089254; Thu, 8 Jun 2017 17:10:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58HAws0089253; Thu, 8 Jun 2017 17:10:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706081710.v58HAws0089253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 8 Jun 2017 17:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319711 - stable/11/lib/clang X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 17:10:59 -0000 Author: dim Date: Thu Jun 8 17:10:58 2017 New Revision: 319711 URL: https://svnweb.freebsd.org/changeset/base/319711 Log: MFC r319473: For arm targets, place ABI at the end of the target triple For some reason, we have been inserting the ABI specification into the middle of the target triple, when building LLVM, like so: armv6-gnueabi-freebsd12.0 This is the wrong way around. LLVM even auto-canonicalizes it to: armv6--freebsd12.0-gnueabi Let's do this the right way in llvm.build.mk instead. While here, define a proper VENDOR macro which can be overridden easily. Approved by: re (gjb) Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D10846 Modified: stable/11/lib/clang/llvm.build.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/clang/llvm.build.mk ============================================================================== --- stable/11/lib/clang/llvm.build.mk Thu Jun 8 17:06:16 2017 (r319710) +++ stable/11/lib/clang/llvm.build.mk Thu Jun 8 17:10:58 2017 (r319711) @@ -25,16 +25,17 @@ BUILD_ARCH?= ${MACHINE_ARCH} # arm (for armv4 and armv5 CPUs) always uses the soft float ABI. # For all other targets, we stick with 'unknown'. .if ${TARGET_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") -TARGET_ABI= gnueabihf +TARGET_ABI= -gnueabihf .elif ${TARGET_ARCH:Marm*} -TARGET_ABI= gnueabi +TARGET_ABI= -gnueabi .else -TARGET_ABI= unknown +TARGET_ABI= .endif +VENDOR= unknown OS_VERSION= freebsd11.1 -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${TARGET_ABI}-${OS_VERSION} -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-unknown-${OS_VERSION} +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION} CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" CFLAGS+= -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" From owner-svn-src-stable-11@freebsd.org Thu Jun 8 17:54:28 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E9D0C315D9; Thu, 8 Jun 2017 17:54:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC6367259; Thu, 8 Jun 2017 17:54:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58HsRBP007707; Thu, 8 Jun 2017 17:54:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58HsRvw007706; Thu, 8 Jun 2017 17:54:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706081754.v58HsRvw007706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 8 Jun 2017 17:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319712 - stable/11/release X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 17:54:28 -0000 Author: gjb Date: Thu Jun 8 17:54:27 2017 New Revision: 319712 URL: https://svnweb.freebsd.org/changeset/base/319712 Log: MFC r319621: Ensure ${_CW} is uppercase when passing '-c' to mk-vmimage.sh, otherwise with 'CLOUDWARE=vagrant-virtualbox', the path to the configuration file may be incorrect. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/Makefile.vm Directory Properties: stable/11/ (props changed) Modified: stable/11/release/Makefile.vm ============================================================================== --- stable/11/release/Makefile.vm Thu Jun 8 17:10:58 2017 (r319711) +++ stable/11/release/Makefile.vm Thu Jun 8 17:54:27 2017 (r319712) @@ -59,7 +59,7 @@ cw-${_CW:tl}: ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ - -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}IMAGE} -c ${${_CW}CONF} + -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}IMAGE} -c ${${_CW:tu}CONF} touch ${.TARGET} cw${_CW:tl}-package: From owner-svn-src-stable-11@freebsd.org Thu Jun 8 22:12:11 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8296D8512D; Thu, 8 Jun 2017 22:12:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACBFA74099; Thu, 8 Jun 2017 22:12:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58MCAKU015798; Thu, 8 Jun 2017 22:12:10 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58MCAXI015794; Thu, 8 Jun 2017 22:12:10 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706082212.v58MCAXI015794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 8 Jun 2017 22:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319726 - in stable/11/sys: compat/ndis dev/if_ndis X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 22:12:12 -0000 Author: glebius Date: Thu Jun 8 22:12:10 2017 New Revision: 319726 URL: https://svnweb.freebsd.org/changeset/base/319726 Log: MFC r318677: Fix regression in ndis(4) after r286410. This adds a bunch of checks for whether this is a Ethernet or 802.11 device and does proper dereferencing. PR: 213237 Submitted by: Approved by: re (marius) Modified: stable/11/sys/compat/ndis/kern_ndis.c stable/11/sys/compat/ndis/subr_ndis.c stable/11/sys/dev/if_ndis/if_ndis.c stable/11/sys/dev/if_ndis/if_ndisvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/ndis/kern_ndis.c ============================================================================== --- stable/11/sys/compat/ndis/kern_ndis.c Thu Jun 8 21:34:54 2017 (r319725) +++ stable/11/sys/compat/ndis/kern_ndis.c Thu Jun 8 22:12:10 2017 (r319726) @@ -210,8 +210,8 @@ ndis_status_func(adapter, status, sbuf, slen) block = adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - ifp = sc->ifp; - if (ifp->if_flags & IFF_DEBUG) + ifp = NDISUSB_GET_IFNET(sc); + if ( ifp && ifp->if_flags & IFF_DEBUG) device_printf(sc->ndis_dev, "status: %x\n", status); } @@ -225,8 +225,8 @@ ndis_statusdone_func(adapter) block = adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - ifp = sc->ifp; - if (ifp->if_flags & IFF_DEBUG) + ifp = NDISUSB_GET_IFNET(sc); + if (ifp && ifp->if_flags & IFF_DEBUG) device_printf(sc->ndis_dev, "status complete\n"); } @@ -264,9 +264,9 @@ ndis_resetdone_func(ndis_handle adapter, ndis_status s block = adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - ifp = sc->ifp; + ifp = NDISUSB_GET_IFNET(sc); - if (ifp->if_flags & IFF_DEBUG) + if (ifp && ifp->if_flags & IFF_DEBUG) device_printf(sc->ndis_dev, "reset done...\n"); KeSetEvent(&block->nmb_resetevent, IO_NO_INCREMENT, FALSE); } @@ -285,6 +285,9 @@ ndis_create_sysctls(arg) return (EINVAL); sc = arg; + /* + device_printf(sc->ndis_dev, "ndis_create_sysctls() sc=%p\n", sc); + */ vals = sc->ndis_regvals; TAILQ_INIT(&sc->ndis_cfglist_head); @@ -698,8 +701,8 @@ ndis_ptom(m0, p) */ eh = mtod((*m0), struct ether_header *); - ifp = ((struct ndis_softc *)p->np_softc)->ifp; - if (totlen > ETHER_MAX_FRAME(ifp, eh->ether_type, FALSE)) { + ifp = NDISUSB_GET_IFNET((struct ndis_softc *)p->np_softc); + if (ifp && totlen > ETHER_MAX_FRAME(ifp, eh->ether_type, FALSE)) { diff = totlen - ETHER_MAX_FRAME(ifp, eh->ether_type, FALSE); totlen -= diff; m->m_len -= diff; Modified: stable/11/sys/compat/ndis/subr_ndis.c ============================================================================== --- stable/11/sys/compat/ndis/subr_ndis.c Thu Jun 8 21:34:54 2017 (r319725) +++ stable/11/sys/compat/ndis/subr_ndis.c Thu Jun 8 22:12:10 2017 (r319726) @@ -626,6 +626,9 @@ NdisReadConfiguration(status, parm, cfg, key, type) block = (ndis_miniport_block *)cfg; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); + /* + device_printf(sc->ndis_dev, "NdisReadConfiguration sc=%p\n", sc); + */ if (key->us_len == 0 || key->us_buf == NULL) { *status = NDIS_STATUS_FAILURE; @@ -984,7 +987,7 @@ NdisWriteErrorLogEntry(ndis_handle adapter, ndis_error dev = block->nmb_physdeviceobj->do_devext; drv = block->nmb_deviceobj->do_drvobj; sc = device_get_softc(dev); - ifp = sc->ifp; + ifp = NDISUSB_GET_IFNET(sc); if (ifp != NULL && ifp->if_flags & IFF_DEBUG) { error = pe_get_message((vm_offset_t)drv->dro_driverstart, @@ -1304,17 +1307,19 @@ NdisReadNetworkAddress(status, addr, addrlen, adapter) ndis_handle adapter; { struct ndis_softc *sc; + struct ifnet *ifp; ndis_miniport_block *block; uint8_t empty[] = { 0, 0, 0, 0, 0, 0 }; block = (ndis_miniport_block *)adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); - if (sc->ifp == NULL) { + ifp = NDISUSB_GET_IFNET(sc); + if (ifp == NULL) { *status = NDIS_STATUS_FAILURE; return; } - if (sc->ifp->if_addr == NULL || + if (ifp->if_addr == NULL || bcmp(IF_LLADDR(sc->ifp), empty, ETHER_ADDR_LEN) == 0) *status = NDIS_STATUS_FAILURE; else { Modified: stable/11/sys/dev/if_ndis/if_ndis.c ============================================================================== --- stable/11/sys/dev/if_ndis/if_ndis.c Thu Jun 8 21:34:54 2017 (r319725) +++ stable/11/sys/dev/if_ndis/if_ndis.c Thu Jun 8 22:12:10 2017 (r319726) @@ -147,7 +147,7 @@ static funcptr ndis_rxeof_xfr_done_wrap; static funcptr ndis_linksts_wrap; static funcptr ndis_linksts_done_wrap; static funcptr ndis_ticktask_wrap; -static funcptr ndis_starttask_wrap; +static funcptr ndis_ifstarttask_wrap; static funcptr ndis_resettask_wrap; static funcptr ndis_inputtask_wrap; @@ -162,11 +162,11 @@ static int ndis_raw_xmit (struct ieee80211_node *, str const struct ieee80211_bpf_params *); static void ndis_update_mcast (struct ieee80211com *); static void ndis_update_promisc (struct ieee80211com *); -static void ndis_start (struct ifnet *); -static void ndis_starttask (device_object *, void *); +static void ndis_ifstart (struct ifnet *); +static void ndis_ifstarttask (device_object *, void *); static void ndis_resettask (device_object *, void *); static void ndis_inputtask (device_object *, void *); -static int ndis_ioctl (struct ifnet *, u_long, caddr_t); +static int ndis_ifioctl (struct ifnet *, u_long, caddr_t); static int ndis_newstate (struct ieee80211vap *, enum ieee80211_state, int); static int ndis_nettype_chan (uint32_t); @@ -246,7 +246,7 @@ ndisdrv_modevent(mod, cmd, arg) &ndis_linksts_done_wrap, 1, WINDRV_WRAP_STDCALL); windrv_wrap((funcptr)ndis_ticktask, &ndis_ticktask_wrap, 2, WINDRV_WRAP_STDCALL); - windrv_wrap((funcptr)ndis_starttask, &ndis_starttask_wrap, + windrv_wrap((funcptr)ndis_ifstarttask, &ndis_ifstarttask_wrap, 2, WINDRV_WRAP_STDCALL); windrv_wrap((funcptr)ndis_resettask, &ndis_resettask_wrap, 2, WINDRV_WRAP_STDCALL); @@ -268,7 +268,7 @@ ndisdrv_modevent(mod, cmd, arg) windrv_unwrap(ndis_linksts_wrap); windrv_unwrap(ndis_linksts_done_wrap); windrv_unwrap(ndis_ticktask_wrap); - windrv_unwrap(ndis_starttask_wrap); + windrv_unwrap(ndis_ifstarttask_wrap); windrv_unwrap(ndis_resettask_wrap); windrv_unwrap(ndis_inputtask_wrap); break; @@ -292,11 +292,14 @@ ndis_setmulti(sc) int len, mclistsz, error; uint8_t *mclist; - ifp = sc->ifp; if (!NDIS_INITIALIZED(sc)) return; + if (sc->ndis_80211) + return; + + ifp = sc->ifp; if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { sc->ndis_filter |= NDIS_PACKET_TYPE_ALL_MULTICAST; len = sizeof(sc->ndis_filter); @@ -368,13 +371,14 @@ ndis_set_offload(sc) struct ifnet *ifp; int len, error; - ifp = sc->ifp; - if (!NDIS_INITIALIZED(sc)) return (EINVAL); + if (sc->ndis_80211) + return (EINVAL); /* See if there's anything to set. */ + ifp = sc->ifp; error = ndis_probe_offload(sc); if (error) return (error); @@ -965,8 +969,8 @@ ndis_ifattach(struct ndis_softc *sc) if_initname(ifp, device_get_name(sc->ndis_dev), device_get_unit(sc->ndis_dev)); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_ioctl = ndis_ioctl; - ifp->if_start = ndis_start; + ifp->if_ioctl = ndis_ifioctl; + ifp->if_start = ndis_ifstart; ifp->if_init = ndis_init; ifp->if_baudrate = 10000000; IFQ_SET_MAXLEN(&ifp->if_snd, 50); @@ -1560,19 +1564,23 @@ ndis_txeof(adapter, packet, status) sc->ndis_txarray[idx] = NULL; sc->ndis_txpending++; - if (status == NDIS_STATUS_SUCCESS) - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - else - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - + if (!sc->ndis_80211) { + struct ifnet *ifp = sc->ifp; + if (status == NDIS_STATUS_SUCCESS) + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + else + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + } sc->ndis_tx_timer = 0; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; NDIS_UNLOCK(sc); - IoQueueWorkItem(sc->ndis_startitem, - (io_workitem_func)ndis_starttask_wrap, - WORKQUEUE_CRITICAL, ifp); + if (!sc->ndis_80211) + IoQueueWorkItem(sc->ndis_startitem, + (io_workitem_func)ndis_ifstarttask_wrap, + WORKQUEUE_CRITICAL, sc); + DPRINTF(("%s: ndis_ifstarttask_wrap sc=%p\n", __func__, sc)); } static void @@ -1635,9 +1643,10 @@ ndis_linksts_done(adapter) IoQueueWorkItem(sc->ndis_tickitem, (io_workitem_func)ndis_ticktask_wrap, WORKQUEUE_CRITICAL, sc); - IoQueueWorkItem(sc->ndis_startitem, - (io_workitem_func)ndis_starttask_wrap, - WORKQUEUE_CRITICAL, ifp); + if (!sc->ndis_80211) + IoQueueWorkItem(sc->ndis_startitem, + (io_workitem_func)ndis_ifstarttask_wrap, + WORKQUEUE_CRITICAL, sc); break; case NDIS_STATUS_MEDIA_DISCONNECT: if (sc->ndis_link) @@ -1672,9 +1681,10 @@ ndis_tick(xsc) IoQueueWorkItem(sc->ndis_resetitem, (io_workitem_func)ndis_resettask_wrap, WORKQUEUE_CRITICAL, sc); - IoQueueWorkItem(sc->ndis_startitem, - (io_workitem_func)ndis_starttask_wrap, - WORKQUEUE_CRITICAL, sc->ifp); + if (!sc->ndis_80211) + IoQueueWorkItem(sc->ndis_startitem, + (io_workitem_func)ndis_ifstarttask_wrap, + WORKQUEUE_CRITICAL, sc); } callout_reset(&sc->ndis_stat_callout, hz, ndis_tick, sc); @@ -1796,16 +1806,16 @@ ndis_update_promisc(struct ieee80211com *ic) } static void -ndis_starttask(d, arg) - device_object *d; - void *arg; +ndis_ifstarttask(device_object *d, void *arg) { - struct ifnet *ifp; + struct ndis_softc *sc = arg; + DPRINTF(("%s: sc=%p, ifp=%p\n", __func__, sc, sc->ifp)); + if (sc->ndis_80211) + return; - ifp = arg; - + struct ifnet *ifp = sc->ifp; if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - ndis_start(ifp); + ndis_ifstart(ifp); } /* @@ -1821,8 +1831,7 @@ ndis_starttask(d, arg) * will do the mapping themselves on a buffer by buffer basis. */ static void -ndis_start(ifp) - struct ifnet *ifp; +ndis_ifstart(struct ifnet *ifp) { struct ndis_softc *sc; struct mbuf *m = NULL; @@ -2880,7 +2889,7 @@ ndis_getstate_80211(struct ndis_softc *sc) } static int -ndis_ioctl(ifp, command, data) +ndis_ifioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; Modified: stable/11/sys/dev/if_ndis/if_ndisvar.h ============================================================================== --- stable/11/sys/dev/if_ndis/if_ndisvar.h Thu Jun 8 21:34:54 2017 (r319725) +++ stable/11/sys/dev/if_ndis/if_ndisvar.h Thu Jun 8 22:12:10 2017 (r319726) @@ -152,6 +152,7 @@ struct ndisusb_task { }; struct ndis_softc { +#define NDISUSB_GET_IFNET(ndis_softc) ( (ndis_softc)->ndis_80211 ? NULL : (ndis_softc)->ifp ) u_int ndis_80211:1, ndis_link:1, ndis_running:1; From owner-svn-src-stable-11@freebsd.org Thu Jun 8 22:13:30 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BDB3D851EE; Thu, 8 Jun 2017 22:13:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 197857427B; Thu, 8 Jun 2017 22:13:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58MDT9Z015930; Thu, 8 Jun 2017 22:13:29 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58MDTTd015929; Thu, 8 Jun 2017 22:13:29 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706082213.v58MDTTd015929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 8 Jun 2017 22:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319727 - stable/11/sys/dev/nand X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 22:13:30 -0000 Author: glebius Date: Thu Jun 8 22:13:29 2017 New Revision: 319727 URL: https://svnweb.freebsd.org/changeset/base/319727 Log: MFC r317806: The nandsim(4) simulator driver doesn't have any protection against races at least in its ioctl handler, and at the same time it creates device entry with 0666 permissions. To plug possible issues in it: - Mark it as needing Giant. - Switch device mode to 0600. Submitted by: C Turt Reviewed by: imp Security: Possible double free in ioctl handler Approved by: re (marius) Modified: stable/11/sys/dev/nand/nandsim.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nand/nandsim.c ============================================================================== --- stable/11/sys/dev/nand/nandsim.c Thu Jun 8 22:12:10 2017 (r319726) +++ stable/11/sys/dev/nand/nandsim.c Thu Jun 8 22:13:29 2017 (r319727) @@ -71,6 +71,7 @@ static struct nandsim_chip *get_nandsim_chip(uint8_t, static struct cdevsw nandsim_cdevsw = { .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = nandsim_ioctl, .d_name = "nandsim", }; @@ -639,7 +640,7 @@ nandsim_modevent(module_t mod __unused, int type, void switch (type) { case MOD_LOAD: nandsim_dev = make_dev(&nandsim_cdevsw, 0, - UID_ROOT, GID_WHEEL, 0666, "nandsim.ioctl"); + UID_ROOT, GID_WHEEL, 0600, "nandsim.ioctl"); break; case MOD_UNLOAD: for (i = 0; i < MAX_SIM_DEV; i++) { From owner-svn-src-stable-11@freebsd.org Thu Jun 8 23:56:24 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E2FED86C5C; Thu, 8 Jun 2017 23:56:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1612276CAE; Thu, 8 Jun 2017 23:56:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58NuN2G056742; Thu, 8 Jun 2017 23:56:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58NuNXW056741; Thu, 8 Jun 2017 23:56:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706082356.v58NuNXW056741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 8 Jun 2017 23:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319728 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 23:56:24 -0000 Author: gjb Date: Thu Jun 8 23:56:23 2017 New Revision: 319728 URL: https://svnweb.freebsd.org/changeset/base/319728 Log: Rename stable/11 from PRERELEASE to BETA1 as part of the 11.1-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jun 8 22:13:29 2017 (r319727) +++ stable/11/sys/conf/newvers.sh Thu Jun 8 23:56:23 2017 (r319728) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.1" -BRANCH="PRERELEASE" +BRANCH="BETA1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-11@freebsd.org Sat Jun 10 11:14:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 696E7D8B246; Sat, 10 Jun 2017 11:14:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9D0E74762; Sat, 10 Jun 2017 11:14:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ABEshe033696; Sat, 10 Jun 2017 11:14:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ABEsM5033694; Sat, 10 Jun 2017 11:14:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706101114.v5ABEsM5033694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 10 Jun 2017 11:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319778 - in stable/11/sys: kern ufs/ffs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jun 2017 11:14:56 -0000 Author: kib Date: Sat Jun 10 11:14:54 2017 New Revision: 319778 URL: https://svnweb.freebsd.org/changeset/base/319778 Log: MFC r319518: Ensure that cached struct thread does not keep spurious td_su reference on an UFS mount point. MFC r319519: Clean possible td_su reference on the struct mount being unmounted as the last step of ffs_unmount(). Approved by: re (gjb) Modified: stable/11/sys/kern/kern_proc.c stable/11/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_proc.c ============================================================================== --- stable/11/sys/kern/kern_proc.c Sat Jun 10 10:40:15 2017 (r319777) +++ stable/11/sys/kern/kern_proc.c Sat Jun 10 11:14:54 2017 (r319778) @@ -226,6 +226,8 @@ proc_dtor(void *mem, int size, void *arg) #endif /* Free all OSD associated to this thread. */ osd_thread_exit(td); + td_softdep_cleanup(td); + MPASS(td->td_su == NULL); /* Make sure all thread destructors are executed */ EVENTHANDLER_INVOKE(thread_dtor, td); Modified: stable/11/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_vfsops.c Sat Jun 10 10:40:15 2017 (r319777) +++ stable/11/sys/ufs/ffs/ffs_vfsops.c Sat Jun 10 11:14:54 2017 (r319778) @@ -1317,6 +1317,10 @@ ffs_unmount(mp, mntflags) MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_LOCAL; MNT_IUNLOCK(mp); + if (td->td_su == mp) { + td->td_su = NULL; + vfs_rel(mp); + } return (error); fail: