From owner-svn-src-stable-12@freebsd.org Sun Oct 4 00:40:31 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C83CB3F4E31; Sun, 4 Oct 2020 00:40:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3lJH4tRSz41Xg; Sun, 4 Oct 2020 00:40:31 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AED91BE72; Sun, 4 Oct 2020 00:40:31 +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 0940eV03048363; Sun, 4 Oct 2020 00:40:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0940eSm7048346; Sun, 4 Oct 2020 00:40:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202010040040.0940eSm7048346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 4 Oct 2020 00:40:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366418 - stable/12/usr.bin/procstat X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/usr.bin/procstat X-SVN-Commit-Revision: 366418 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2020 00:40:31 -0000 Author: kib Date: Sun Oct 4 00:40:28 2020 New Revision: 366418 URL: https://svnweb.freebsd.org/changeset/base/366418 Log: MFC r366210: Consistently use __FBSDID("FreeBSD") for ids in usr.bin/procstat. Modified: stable/12/usr.bin/procstat/procstat.c stable/12/usr.bin/procstat/procstat_args.c stable/12/usr.bin/procstat/procstat_auxv.c stable/12/usr.bin/procstat/procstat_basic.c stable/12/usr.bin/procstat/procstat_bin.c stable/12/usr.bin/procstat/procstat_cred.c stable/12/usr.bin/procstat/procstat_cs.c stable/12/usr.bin/procstat/procstat_files.c stable/12/usr.bin/procstat/procstat_kstack.c stable/12/usr.bin/procstat/procstat_ptlwpinfo.c stable/12/usr.bin/procstat/procstat_rlimit.c stable/12/usr.bin/procstat/procstat_sigs.c stable/12/usr.bin/procstat/procstat_threads.c stable/12/usr.bin/procstat/procstat_vm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/procstat/procstat.c ============================================================================== --- stable/12/usr.bin/procstat/procstat.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat.c Sun Oct 4 00:40:28 2020 (r366418) @@ -26,9 +26,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_args.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_args.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_args.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_auxv.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_auxv.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_auxv.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_basic.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_basic.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_basic.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_bin.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_bin.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_bin.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_cred.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_cred.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_cred.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_cs.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_cs.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_cs.c Sun Oct 4 00:40:28 2020 (r366418) @@ -23,9 +23,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_files.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_files.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_files.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_kstack.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_kstack.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_kstack.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_ptlwpinfo.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_ptlwpinfo.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_ptlwpinfo.c Sun Oct 4 00:40:28 2020 (r366418) @@ -22,10 +22,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * */ - #include - __FBSDID("$FreeBSD$"); + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_rlimit.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_rlimit.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_rlimit.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_sigs.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_sigs.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_sigs.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_threads.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_threads.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_threads.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/12/usr.bin/procstat/procstat_vm.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_vm.c Sat Oct 3 23:17:29 2020 (r366417) +++ stable/12/usr.bin/procstat/procstat_vm.c Sun Oct 4 00:40:28 2020 (r366418) @@ -25,9 +25,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include From owner-svn-src-stable-12@freebsd.org Sun Oct 4 03:31:36 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 927303F8D92; Sun, 4 Oct 2020 03:31:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3q5h3Ljpz48kn; Sun, 4 Oct 2020 03:31:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 579E51DC60; Sun, 4 Oct 2020 03:31:36 +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 0943VanB056807; Sun, 4 Oct 2020 03:31:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0943Vanp056806; Sun, 4 Oct 2020 03:31:36 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202010040331.0943Vanp056806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 4 Oct 2020 03:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366420 - in stable: 11/contrib/ipfilter/ipsend 12/contrib/ipfilter/ipsend X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter/ipsend 12/contrib/ipfilter/ipsend X-SVN-Commit-Revision: 366420 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2020 03:31:36 -0000 Author: cy Date: Sun Oct 4 03:31:35 2020 New Revision: 366420 URL: https://svnweb.freebsd.org/changeset/base/366420 Log: MFC r366202: Continuing the effort started in r343701, #ifdef cleanup, remove never to be used again checks. Modified: stable/12/contrib/ipfilter/ipsend/iptests.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/ipsend/iptests.c Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/ipfilter/ipsend/iptests.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/iptests.c Sun Oct 4 01:39:29 2020 (r366419) +++ stable/12/contrib/ipfilter/ipsend/iptests.c Sun Oct 4 03:31:35 2020 (r366420) @@ -27,7 +27,7 @@ typedef int boolean_t; # endif # define _KERNEL # define KERNEL -# if !defined(solaris) && !defined(linux) && !defined(__sgi) && !defined(hpux) +# if !defined(solaris) # include # else # ifdef solaris From owner-svn-src-stable-12@freebsd.org Sun Oct 4 03:33:06 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16CF03F8C42; Sun, 4 Oct 2020 03:33:06 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3q7P6jH4z482X; Sun, 4 Oct 2020 03:33:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C94521DC6F; Sun, 4 Oct 2020 03:33:05 +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 0943X5sr059420; Sun, 4 Oct 2020 03:33:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0943X5p5059419; Sun, 4 Oct 2020 03:33:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202010040333.0943X5p5059419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 4 Oct 2020 03:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366421 - in stable: 11/contrib/ipfilter/ipsend 12/contrib/ipfilter/ipsend X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter/ipsend 12/contrib/ipfilter/ipsend X-SVN-Commit-Revision: 366421 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2020 03:33:06 -0000 Author: cy Date: Sun Oct 4 03:33:05 2020 New Revision: 366421 URL: https://svnweb.freebsd.org/changeset/base/366421 Log: MFC r366203: Remove Linux and IRIX specific files. Deleted: stable/12/contrib/ipfilter/ipsend/larp.c stable/12/contrib/ipfilter/ipsend/linux.h stable/12/contrib/ipfilter/ipsend/lsock.c stable/12/contrib/ipfilter/ipsend/sirix.c stable/12/contrib/ipfilter/ipsend/slinux.c Modified: Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Deleted: stable/11/contrib/ipfilter/ipsend/larp.c stable/11/contrib/ipfilter/ipsend/linux.h stable/11/contrib/ipfilter/ipsend/lsock.c stable/11/contrib/ipfilter/ipsend/sirix.c stable/11/contrib/ipfilter/ipsend/slinux.c Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-12@freebsd.org Sun Oct 4 06:12:53 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 126643FC20B; Sun, 4 Oct 2020 06:12:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3tgm6n0Bz4HhW; Sun, 4 Oct 2020 06:12:52 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBFE71FE32; Sun, 4 Oct 2020 06:12:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0946CqlI056987; Sun, 4 Oct 2020 06:12:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0946Cqvk056985; Sun, 4 Oct 2020 06:12:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202010040612.0946Cqvk056985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 4 Oct 2020 06:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366422 - stable/12/stand/lua X-SVN-Group: stable-12 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: stable/12/stand/lua X-SVN-Commit-Revision: 366422 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2020 06:12:53 -0000 Author: imp Date: Sun Oct 4 06:12:52 2020 New Revision: 366422 URL: https://svnweb.freebsd.org/changeset/base/366422 Log: MFC: r366228 Report the kernel console on the boot screen Report what console the boot loader is telling the kernel to use: o Dual (Serial Primary) o Dual (Video Primary) o Serial o Video and allow toggling between them. Modified: stable/12/stand/lua/core.lua stable/12/stand/lua/menu.lua Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/lua/core.lua ============================================================================== --- stable/12/stand/lua/core.lua Sun Oct 4 03:33:05 2020 (r366421) +++ stable/12/stand/lua/core.lua Sun Oct 4 06:12:52 2020 (r366422) @@ -410,6 +410,40 @@ function core.popFrontTable(tbl) return first_value, new_tbl end +function core.getConsoleName() + if loader.getenv("boot_multicons") ~= nil then + if loader.getenv("boot_serial") ~= nil then + return "Dual (Serial primary)" + else + return "Dual (Video primary)" + end + else + if loader.getenv("boot_serial") ~= nil then + return "Serial" + else + return "Video" + end + end +end + +function core.nextConsoleChoice() + if loader.getenv("boot_multicons") ~= nil then + if loader.getenv("boot_serial") ~= nil then + loader.unsetenv("boot_serial") + else + loader.unsetenv("boot_multicons") + loader.setenv("boot_serial", "YES") + end + else + if loader.getenv("boot_serial") ~= nil then + loader.unsetenv("boot_serial") + else + loader.setenv("boot_multicons", "YES") + loader.setenv("boot_serial", "YES") + end + end +end + recordDefaults() hook.register("config.reloaded", core.clearCachedKernels) return core Modified: stable/12/stand/lua/menu.lua ============================================================================== --- stable/12/stand/lua/menu.lua Sun Oct 4 03:33:05 2020 (r366421) +++ stable/12/stand/lua/menu.lua Sun Oct 4 06:12:52 2020 (r366422) @@ -241,6 +241,7 @@ menu.welcome = { boot_entry_2, menu_entries.prompt, menu_entries.reboot, + menu_entries.console, { entry_type = core.MENU_SEPARATOR, }, @@ -279,6 +280,16 @@ menu.welcome = { core.boot() end, alias = {"s", "S"}, + }, + console = { + entry_type = core.MENU_ENTRY, + name = function() + return color.highlight("C") .. "ons: " .. core.getConsoleName() + end, + func = function() + core.nextConsoleChoice() + end, + alias = {"c", "C"}, }, prompt = { entry_type = core.MENU_RETURN, From owner-svn-src-stable-12@freebsd.org Sun Oct 4 06:14:52 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1416A3FBEF6; Sun, 4 Oct 2020 06:14:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3tk36sRGz4J18; Sun, 4 Oct 2020 06:14:51 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF46D1FC35; Sun, 4 Oct 2020 06:14:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0946Eped057120; Sun, 4 Oct 2020 06:14:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0946EpwX057119; Sun, 4 Oct 2020 06:14:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202010040614.0946EpwX057119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 4 Oct 2020 06:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366423 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 366423 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2020 06:14:52 -0000 Author: imp Date: Sun Oct 4 06:14:51 2020 New Revision: 366423 URL: https://svnweb.freebsd.org/changeset/base/366423 Log: MFC: r366229 For mulitcons boot, report it and which console is primary Until we can do proper /etc/rc output on both consoles in multicons boot (or all of them if we ever generalize), report when we are booting multicons. Also report the primary console. This will be a big hint why output stops after this line (though some slow USB discovery still happens after mountroot / init starts). Reviewed by: scottl@, tsoome@ Differential Revision: https://reviews.freebsd.org/D26574 Modified: stable/12/sys/kern/init_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/init_main.c ============================================================================== --- stable/12/sys/kern/init_main.c Sun Oct 4 06:12:52 2020 (r366422) +++ stable/12/sys/kern/init_main.c Sun Oct 4 06:14:51 2020 (r366423) @@ -743,6 +743,14 @@ start_init(void *dummy) p->p_vmspace->vm_maxsaddr = (caddr_t)addr; p->p_vmspace->vm_ssize = 1; + /* For Multicons, report which console is primary to both */ + if (boothowto & RB_MULTIPLE) { + if (boothowto & RB_SERIAL) + printf("Dual Console: Serial Primary, Video Secondary\n"); + else + printf("Dual Console: Video Primary, Serial Secondary\n"); + } + if ((var = kern_getenv("init_path")) != NULL) { strlcpy(init_path, var, sizeof(init_path)); freeenv(var); @@ -753,7 +761,7 @@ start_init(void *dummy) pathlen = strlen(path) + 1; if (bootverbose) printf("start_init: trying %s\n", path); - + /* * Move out the boot flag argument. */ From owner-svn-src-stable-12@freebsd.org Sun Oct 4 16:27:50 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64AEF42C8B8; Sun, 4 Oct 2020 16:27:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C48KL1q0Pz3fsZ; Sun, 4 Oct 2020 16:27:50 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21AC42703B; Sun, 4 Oct 2020 16:27:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 094GRnvq038475; Sun, 4 Oct 2020 16:27:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 094GRn8R038474; Sun, 4 Oct 2020 16:27:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202010041627.094GRn8R038474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 4 Oct 2020 16:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366427 - stable/12/sys/amd64/vmm/amd X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/amd64/vmm/amd X-SVN-Commit-Revision: 366427 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2020 16:27:50 -0000 Author: markj Date: Sun Oct 4 16:27:49 2020 New Revision: 366427 URL: https://svnweb.freebsd.org/changeset/base/366427 Log: MFC r366347: Remove svn:executable from a couple of vmm(4) source files. Modified: Directory Properties: stable/12/ (props changed) stable/12/sys/amd64/vmm/amd/amdvi_priv.h (props changed) stable/12/sys/amd64/vmm/amd/ivrs_drv.c (props changed) From owner-svn-src-stable-12@freebsd.org Sun Oct 4 19:59:13 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C69D431DA8; Sun, 4 Oct 2020 19:59:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4F1F1LGdz4BqQ; Sun, 4 Oct 2020 19:59:13 +0000 (UTC) (envelope-from kevans@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 113E29F62; Sun, 4 Oct 2020 19:59:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 094JxCCn069320; Sun, 4 Oct 2020 19:59:12 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 094JxCqH069319; Sun, 4 Oct 2020 19:59:12 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202010041959.094JxCqH069319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 4 Oct 2020 19:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366434 - stable/12/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 366434 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2020 19:59:13 -0000 Author: kevans Date: Sun Oct 4 19:59:12 2020 New Revision: 366434 URL: https://svnweb.freebsd.org/changeset/base/366434 Log: MFC r362421: raspberry pi 4: cpufreq support The submitter notes that the bcm2835_cpufreq driver really just needs the rpi4 compat string added to it; powerd subsequently works and the dev.cpu.0 sysctl values look sane and can be successfully manipulated. Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- stable/12/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Sun Oct 4 19:37:15 2020 (r366433) +++ stable/12/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Sun Oct 4 19:59:12 2020 (r366434) @@ -129,6 +129,7 @@ static struct ofw_compat_data compat_data[] = { { "brcm,bcm2835", 1 }, { "brcm,bcm2836", 1 }, { "brcm,bcm2837", 1 }, + { "brcm,bcm2711", 1 }, { NULL, 0 } }; From owner-svn-src-stable-12@freebsd.org Mon Oct 5 01:26:35 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4468C3F25BB; Mon, 5 Oct 2020 01:26:35 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4NGz18R6z4VTc; Mon, 5 Oct 2020 01:26:35 +0000 (UTC) (envelope-from 0mp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BE42D8F6; Mon, 5 Oct 2020 01:26:35 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0951QYAd071893; Mon, 5 Oct 2020 01:26:34 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0951QYYU071892; Mon, 5 Oct 2020 01:26:34 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202010050126.0951QYYU071892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon, 5 Oct 2020 01:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366436 - stable/12/stand/man X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/stand/man X-SVN-Commit-Revision: 366436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 01:26:35 -0000 Author: 0mp (doc,ports committer) Date: Mon Oct 5 01:26:34 2020 New Revision: 366436 URL: https://svnweb.freebsd.org/changeset/base/366436 Log: MFC r366364: Correct the documented size of kern.msgbufsize The correct value is 96KB after r226090. PR: 249971 Submitted by: johannes@jo-t.de Modified: stable/12/stand/man/loader.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/man/loader.8 ============================================================================== --- stable/12/stand/man/loader.8 Sun Oct 4 22:41:43 2020 (r366435) +++ stable/12/stand/man/loader.8 Mon Oct 5 01:26:34 2020 (r366436) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2018 +.Dd October 2, 2020 .Dt LOADER 8 .Os .Sh NAME @@ -646,7 +646,7 @@ Modifies .Dv VM_BCACHE_SIZE_MAX . .It Va kern.msgbufsize Sets the size of the kernel message buffer. -The default limit of 64KB is usually sufficient unless +The default limit of 96KB is usually sufficient unless large amounts of trace data need to be collected between opportunities to examine the buffer or dump it to a file. From owner-svn-src-stable-12@freebsd.org Mon Oct 5 05:36:02 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A905D3F8643; Mon, 5 Oct 2020 05:36:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4Tpp41LPz4hXg; Mon, 5 Oct 2020 05:36:02 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CFBB109DC; Mon, 5 Oct 2020 05:36:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0955a2uC025669; Mon, 5 Oct 2020 05:36:02 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0955a2QU025668; Mon, 5 Oct 2020 05:36:02 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010050536.0955a2QU025668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 05:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366438 - stable/12/sys/dev/cxgbe/tom X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 366438 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 05:36:02 -0000 Author: np Date: Mon Oct 5 05:36:01 2020 New Revision: 366438 URL: https://svnweb.freebsd.org/changeset/base/366438 Log: MFC r366384: cxgbe(4): set up the firmware flowc for the tid before send_abort_rpl. Modified: stable/12/sys/dev/cxgbe/tom/t4_listen.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_listen.c Mon Oct 5 01:27:18 2020 (r366437) +++ stable/12/sys/dev/cxgbe/tom/t4_listen.c Mon Oct 5 05:36:01 2020 (r366438) @@ -341,48 +341,32 @@ release_lctx(struct adapter *sc, struct listen_ctx *lc } static void -send_reset_synqe(struct toedev *tod, struct synq_entry *synqe) +send_flowc_wr_synqe(struct adapter *sc, struct synq_entry *synqe) { - struct adapter *sc = tod->tod_softc; struct mbuf *m = synqe->syn; struct ifnet *ifp = m->m_pkthdr.rcvif; struct vi_info *vi = ifp->if_softc; struct port_info *pi = vi->pi; - struct l2t_entry *e = &sc->l2t->l2tab[synqe->params.l2t_idx]; struct wrqe *wr; struct fw_flowc_wr *flowc; - struct cpl_abort_req *req; - int flowclen; struct sge_wrq *ofld_txq; struct sge_ofld_rxq *ofld_rxq; const int nparams = 6; + const int flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); const u_int pfvf = sc->pf << S_FW_VIID_PFN; INP_WLOCK_ASSERT(synqe->lctx->inp); + MPASS((synqe->flags & TPF_FLOWC_WR_SENT) == 0); - CTR5(KTR_CXGBE, "%s: synqe %p (0x%x), tid %d%s", - __func__, synqe, synqe->flags, synqe->tid, - synqe->flags & TPF_ABORT_SHUTDOWN ? - " (abort already in progress)" : ""); - if (synqe->flags & TPF_ABORT_SHUTDOWN) - return; /* abort already in progress */ - synqe->flags |= TPF_ABORT_SHUTDOWN; - ofld_txq = &sc->sge.ofld_txq[synqe->params.txq_idx]; ofld_rxq = &sc->sge.ofld_rxq[synqe->params.rxq_idx]; - /* The wrqe will have two WRs - a flowc followed by an abort_req */ - flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); - - wr = alloc_wrqe(roundup2(flowclen, EQ_ESIZE) + sizeof(*req), ofld_txq); + wr = alloc_wrqe(roundup2(flowclen, 16), ofld_txq); if (wr == NULL) { /* XXX */ panic("%s: allocation failure.", __func__); } flowc = wrtod(wr); - req = (void *)((caddr_t)flowc + roundup2(flowclen, EQ_ESIZE)); - - /* First the flowc ... */ memset(flowc, 0, wr->wr_len); flowc->op_to_nparams = htobe32(V_FW_WR_OP(FW_FLOWC_WR) | V_FW_FLOWC_WR_NPARAMS(nparams)); @@ -396,19 +380,47 @@ send_reset_synqe(struct toedev *tod, struct synq_entry flowc->mnemval[2].val = htobe32(pi->tx_chan); flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; flowc->mnemval[3].val = htobe32(ofld_rxq->iq.abs_id); - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; - flowc->mnemval[4].val = htobe32(512); - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; - flowc->mnemval[5].val = htobe32(512); + flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; + flowc->mnemval[4].val = htobe32(512); + flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; + flowc->mnemval[5].val = htobe32(512); + synqe->flags |= TPF_FLOWC_WR_SENT; + t4_wrq_tx(sc, wr); +} - /* ... then ABORT request */ +static void +send_reset_synqe(struct toedev *tod, struct synq_entry *synqe) +{ + struct adapter *sc = tod->tod_softc; + struct wrqe *wr; + struct cpl_abort_req *req; + + INP_WLOCK_ASSERT(synqe->lctx->inp); + + CTR5(KTR_CXGBE, "%s: synqe %p (0x%x), tid %d%s", + __func__, synqe, synqe->flags, synqe->tid, + synqe->flags & TPF_ABORT_SHUTDOWN ? + " (abort already in progress)" : ""); + if (synqe->flags & TPF_ABORT_SHUTDOWN) + return; /* abort already in progress */ + synqe->flags |= TPF_ABORT_SHUTDOWN; + + if (!(synqe->flags & TPF_FLOWC_WR_SENT)) + send_flowc_wr_synqe(sc, synqe); + + wr = alloc_wrqe(sizeof(*req), &sc->sge.ofld_txq[synqe->params.txq_idx]); + if (wr == NULL) { + /* XXX */ + panic("%s: allocation failure.", __func__); + } + req = wrtod(wr); INIT_TP_WR_MIT_CPL(req, CPL_ABORT_REQ, synqe->tid); req->rsvd0 = 0; /* don't have a snd_nxt */ req->rsvd1 = 1; /* no data sent yet */ req->cmd = CPL_ABORT_SEND_RST; - t4_l2t_send(sc, wr, e); + t4_l2t_send(sc, wr, &sc->l2t->l2tab[synqe->params.l2t_idx]); } static int @@ -888,6 +900,9 @@ do_abort_req_synqe(struct sge_iq *iq, const struct rss INP_WLOCK(inp); ofld_txq = &sc->sge.ofld_txq[synqe->params.txq_idx]; + + if (!(synqe->flags & TPF_FLOWC_WR_SENT)) + send_flowc_wr_synqe(sc, synqe); /* * If we'd initiated an abort earlier the reply to it is responsible for From owner-svn-src-stable-12@freebsd.org Mon Oct 5 06:38:56 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF2FF3F99D6; Mon, 5 Oct 2020 06:38:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4WCN55MDz4kvf; Mon, 5 Oct 2020 06:38:56 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 747EF114C6; Mon, 5 Oct 2020 06:38:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0956cuSF062621; Mon, 5 Oct 2020 06:38:56 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0956cudH062620; Mon, 5 Oct 2020 06:38:56 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010050638.0956cudH062620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 06:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366439 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 366439 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 06:38:56 -0000 Author: np Date: Mon Oct 5 06:38:56 2020 New Revision: 366439 URL: https://svnweb.freebsd.org/changeset/base/366439 Log: MFC r365867: mbuf checksum flags and fields to support tunneling protocols. These are being added to support VXLAN but will work for GENEVE as well. ENCAP_RSVD1 will likely become ENCAP_GENEVE in the future. The size of struct mbuf does not change and that means this change can be MFC'd. If size wasn't a constraint a cleaner way may have been to add inner_csum_flags and inner_csum_data to go with csum_flags and csum_data. Reviewed by: kib@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25873 Modified: stable/12/sys/sys/mbuf.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/sys/mbuf.h ============================================================================== --- stable/12/sys/sys/mbuf.h Mon Oct 5 05:36:01 2020 (r366438) +++ stable/12/sys/sys/mbuf.h Mon Oct 5 06:38:56 2020 (r366439) @@ -168,7 +168,10 @@ struct pkthdr { uint8_t l3hlen; /* layer 3 hdr len */ uint8_t l4hlen; /* layer 4 hdr len */ uint8_t l5hlen; /* layer 5 hdr len */ - uint32_t spare; + uint8_t inner_l2hlen; + uint8_t inner_l3hlen; + uint8_t inner_l4hlen; + uint8_t inner_l5hlen; }; }; union { @@ -497,7 +500,13 @@ struct mbuf { * Outbound flags that are set by upper protocol layers requesting lower * layers, or ideally the hardware, to perform these offloading tasks. * For outbound packets this field and its flags can be directly tested - * against ifnet if_hwassist. + * against ifnet if_hwassist. Note that the outbound and the inbound flags do + * not collide right now but they could be allowed to (as long as the flags are + * scrubbed appropriately when the direction of an mbuf changes). CSUM_BITS + * would also have to split into CSUM_BITS_TX and CSUM_BITS_RX. + * + * CSUM_INNER_ is the same as CSUM_ but it applies to the inner frame. + * The CSUM_ENCAP_ bits identify the outer encapsulation. */ #define CSUM_IP 0x00000001 /* IP header checksum offload */ #define CSUM_IP_UDP 0x00000002 /* UDP checksum offload */ @@ -506,13 +515,28 @@ struct mbuf { #define CSUM_IP_TSO 0x00000010 /* TCP segmentation offload */ #define CSUM_IP_ISCSI 0x00000020 /* iSCSI checksum offload */ +#define CSUM_INNER_IP6_UDP 0x00000040 +#define CSUM_INNER_IP6_TCP 0x00000080 +#define CSUM_INNER_IP6_TSO 0x00000100 #define CSUM_IP6_UDP 0x00000200 /* UDP checksum offload */ #define CSUM_IP6_TCP 0x00000400 /* TCP checksum offload */ #define CSUM_IP6_SCTP 0x00000800 /* SCTP checksum offload */ #define CSUM_IP6_TSO 0x00001000 /* TCP segmentation offload */ #define CSUM_IP6_ISCSI 0x00002000 /* iSCSI checksum offload */ +#define CSUM_INNER_IP 0x00004000 +#define CSUM_INNER_IP_UDP 0x00008000 +#define CSUM_INNER_IP_TCP 0x00010000 +#define CSUM_INNER_IP_TSO 0x00020000 + +#define CSUM_ENCAP_VXLAN 0x00040000 /* VXLAN outer encapsulation */ +#define CSUM_ENCAP_RSVD1 0x00080000 + /* Inbound checksum support where the checksum was verified by hardware. */ +#define CSUM_INNER_L3_CALC 0x00100000 +#define CSUM_INNER_L3_VALID 0x00200000 +#define CSUM_INNER_L4_CALC 0x00400000 +#define CSUM_INNER_L4_VALID 0x00800000 #define CSUM_L3_CALC 0x01000000 /* calculated layer 3 csum */ #define CSUM_L3_VALID 0x02000000 /* checksum is correct */ #define CSUM_L4_CALC 0x04000000 /* calculated layer 4 csum */ @@ -523,16 +547,31 @@ struct mbuf { #define CSUM_SND_TAG 0x80000000 /* Packet header has send tag */ +#define CSUM_FLAGS_TX (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP | CSUM_IP_SCTP | \ + CSUM_IP_TSO | CSUM_IP_ISCSI | CSUM_INNER_IP6_UDP | CSUM_INNER_IP6_TCP | \ + CSUM_INNER_IP6_TSO | CSUM_IP6_UDP | CSUM_IP6_TCP | CSUM_IP6_SCTP | \ + CSUM_IP6_TSO | CSUM_IP6_ISCSI | CSUM_INNER_IP | CSUM_INNER_IP_UDP | \ + CSUM_INNER_IP_TCP | CSUM_INNER_IP_TSO | CSUM_ENCAP_VXLAN | \ + CSUM_ENCAP_RSVD1 | CSUM_SND_TAG) + +#define CSUM_FLAGS_RX (CSUM_INNER_L3_CALC | CSUM_INNER_L3_VALID | \ + CSUM_INNER_L4_CALC | CSUM_INNER_L4_VALID | CSUM_L3_CALC | CSUM_L3_VALID | \ + CSUM_L4_CALC | CSUM_L4_VALID | CSUM_L5_CALC | CSUM_L5_VALID | \ + CSUM_COALESCED) + /* * CSUM flag description for use with printf(9) %b identifier. */ #define CSUM_BITS \ "\20\1CSUM_IP\2CSUM_IP_UDP\3CSUM_IP_TCP\4CSUM_IP_SCTP\5CSUM_IP_TSO" \ - "\6CSUM_IP_ISCSI" \ - "\12CSUM_IP6_UDP\13CSUM_IP6_TCP\14CSUM_IP6_SCTP\15CSUM_IP6_TSO" \ - "\16CSUM_IP6_ISCSI" \ - "\31CSUM_L3_CALC\32CSUM_L3_VALID\33CSUM_L4_CALC\34CSUM_L4_VALID" \ - "\35CSUM_L5_CALC\36CSUM_L5_VALID\37CSUM_COALESCED\40CSUM_SND_TAG" + "\6CSUM_IP_ISCSI\7CSUM_INNER_IP6_UDP\10CSUM_INNER_IP6_TCP" \ + "\11CSUM_INNER_IP6_TSO\12CSUM_IP6_UDP\13CSUM_IP6_TCP\14CSUM_IP6_SCTP" \ + "\15CSUM_IP6_TSO\16CSUM_IP6_ISCSI\17CSUM_INNER_IP\20CSUM_INNER_IP_UDP" \ + "\21CSUM_INNER_IP_TCP\22CSUM_INNER_IP_TSO\23CSUM_ENCAP_VXLAN" \ + "\24CSUM_ENCAP_RSVD1\25CSUM_INNER_L3_CALC\26CSUM_INNER_L3_VALID" \ + "\27CSUM_INNER_L4_CALC\30CSUM_INNER_L4_VALID\31CSUM_L3_CALC" \ + "\32CSUM_L3_VALID\33CSUM_L4_CALC\34CSUM_L4_VALID\35CSUM_L5_CALC" \ + "\36CSUM_L5_VALID\37CSUM_COALESCED\40CSUM_SND_TAG" /* CSUM flags compatibility mappings. */ #define CSUM_IP_CHECKED CSUM_L3_CALC @@ -548,6 +587,7 @@ struct mbuf { #define CSUM_UDP CSUM_IP_UDP #define CSUM_SCTP CSUM_IP_SCTP #define CSUM_TSO (CSUM_IP_TSO|CSUM_IP6_TSO) +#define CSUM_INNER_TSO (CSUM_INNER_IP_TSO|CSUM_INNER_IP6_TSO) #define CSUM_UDP_IPV6 CSUM_IP6_UDP #define CSUM_TCP_IPV6 CSUM_IP6_TCP #define CSUM_SCTP_IPV6 CSUM_IP6_SCTP From owner-svn-src-stable-12@freebsd.org Mon Oct 5 07:26:08 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B1A53FAD9F; Mon, 5 Oct 2020 07:26:08 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4XFq58d8z4myx; Mon, 5 Oct 2020 07:26:07 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 941D9120A2; Mon, 5 Oct 2020 07:26:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0957Q7Yd092795; Mon, 5 Oct 2020 07:26:07 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0957Q6Zp092791; Mon, 5 Oct 2020 07:26:06 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010050726.0957Q6Zp092791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 07:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366441 - in stable/12: sbin/ifconfig sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12: sbin/ifconfig sys/net X-SVN-Commit-Revision: 366441 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 07:26:08 -0000 Author: np Date: Mon Oct 5 07:26:06 2020 New Revision: 366441 URL: https://svnweb.freebsd.org/changeset/base/366441 Log: MFC r365868: Add two new ifnet capabilities for hw checksumming and TSO for VXLAN traffic. These are similar to the existing VLAN capabilities. Reviewed by: kib@ Sponsored by: Chelsio Communications Modified: stable/12/sbin/ifconfig/ifconfig.8 stable/12/sbin/ifconfig/ifconfig.c stable/12/sbin/ifconfig/ifvxlan.c stable/12/sys/net/if.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/12/sbin/ifconfig/ifconfig.8 Mon Oct 5 06:53:29 2020 (r366440) +++ stable/12/sbin/ifconfig/ifconfig.8 Mon Oct 5 07:26:06 2020 (r366441) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd June 4, 2020 +.Dd September 17, 2020 .Dt IFCONFIG 8 .Os .Sh NAME @@ -559,7 +559,7 @@ If the driver offers user-configurable VLAN support, e reception of extended frames, tag processing in hardware, frame filtering in hardware, checksum offloading, or TSO on VLAN, respectively. -Note that this must be issued on a physical interface associated with +Note that this must be configured on a physical interface associated with .Xr vlan 4 , not on a .Xr vlan 4 @@ -569,6 +569,21 @@ If the driver offers user-configurable VLAN support, d reception of extended frames, tag processing in hardware, frame filtering in hardware, or TSO on VLAN, respectively. +.It Cm vxlanhwcsum , vxlanhwtso +If the driver offers user-configurable VXLAN support, enable inner checksum +offloading (receive and transmit) or TSO on VXLAN, respectively. +Note that this must be configured on a physical interface associated with +.Xr vxlan 4 , +not on a +.Xr vxlan 4 +interface itself. +The physical interface is either the interface specified as the vxlandev +or the interface hosting the vxlanlocal address. +The driver will offload as much checksum work and TSO as it can reliably +support, the exact level of offloading may vary between drivers. +.It Fl vxlanhwcsum , vxlanhwtso +If the driver offers user-configurable VXLAN support, disable checksum +offloading (receive and transmit) or TSO on VXLAN, respectively. .It Cm vnet Ar jail Move the interface to the .Xr jail 8 , Modified: stable/12/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/12/sbin/ifconfig/ifconfig.c Mon Oct 5 06:53:29 2020 (r366440) +++ stable/12/sbin/ifconfig/ifconfig.c Mon Oct 5 07:26:06 2020 (r366441) @@ -1344,7 +1344,8 @@ unsetifdescr(const char *val, int value, int s, const "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ "\17TOE4\20TOE6\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \ -"\26RXCSUM_IPV6\27TXCSUM_IPV6\31TXRTLMT\32HWRXTSTMP" +"\26RXCSUM_IPV6\27TXCSUM_IPV6\31TXRTLMT\32HWRXTSTMP" \ +"\36VXLAN_HWCSUM\37VXLAN_HWTSO" /* * Print the status of the interface. If an address family was Modified: stable/12/sbin/ifconfig/ifvxlan.c ============================================================================== --- stable/12/sbin/ifconfig/ifvxlan.c Mon Oct 5 06:53:29 2020 (r366440) +++ stable/12/sbin/ifconfig/ifvxlan.c Mon Oct 5 07:26:06 2020 (r366441) @@ -620,6 +620,11 @@ static struct cmd vxlan_cmds[] = { DEF_CMD("vxlanflush", 0, setvxlan_flush), DEF_CMD("vxlanflushall", 1, setvxlan_flush), + + DEF_CMD("vxlanhwcsum", IFCAP_VXLAN_HWCSUM, setifcap), + DEF_CMD("-vxlanhwcsum", -IFCAP_VXLAN_HWCSUM, setifcap), + DEF_CMD("vxlanhwtso", IFCAP_VXLAN_HWTSO, setifcap), + DEF_CMD("-vxlanhwtso", -IFCAP_VXLAN_HWTSO, setifcap), }; static struct afswtch af_vxlan = { Modified: stable/12/sys/net/if.h ============================================================================== --- stable/12/sys/net/if.h Mon Oct 5 06:53:29 2020 (r366440) +++ stable/12/sys/net/if.h Mon Oct 5 07:26:06 2020 (r366441) @@ -246,6 +246,8 @@ struct if_data { #define IFCAP_HWSTATS 0x800000 /* manages counters internally */ #define IFCAP_TXRTLMT 0x1000000 /* hardware supports TX rate limiting */ #define IFCAP_HWRXTSTMP 0x2000000 /* hardware rx timestamping */ +#define IFCAP_VXLAN_HWCSUM 0x20000000 /* can do IFCAN_HWCSUM on VXLANs */ +#define IFCAP_VXLAN_HWTSO 0x40000000 /* can do IFCAP_TSO on VXLANs */ #define IFCAP_HWCSUM_IPV6 (IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6) From owner-svn-src-stable-12@freebsd.org Mon Oct 5 08:51:05 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D35D13FC9A2; Mon, 5 Oct 2020 08:51:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4Z7s5YVfz4rfn; Mon, 5 Oct 2020 08:51:05 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A12BB12FA5; Mon, 5 Oct 2020 08:51:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0958p5pV046284; Mon, 5 Oct 2020 08:51:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0958p4HL046277; Mon, 5 Oct 2020 08:51:04 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010050851.0958p4HL046277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 08:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366442 - in stable/12: share/man/man4 sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/firmware X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/firmware X-SVN-Commit-Revision: 366442 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 08:51:05 -0000 Author: np Date: Mon Oct 5 08:51:03 2020 New Revision: 366442 URL: https://svnweb.freebsd.org/changeset/base/366442 Log: MFC r365871. This needs a couple other revisions which aren't in stable/12 yet to actually work but is being committed out of order to ease other cxgbe MFCs. r365871: cxgbe(4): add support for stateless offloads for VXLAN traffic. Hardware assistance includes checksumming (tx and rx), TSO, and RSS on the inner traffic in a VXLAN tunnel. Sponsored by: Chelsio Communications Modified: stable/12/share/man/man4/cxgbe.4 stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/common/common.h stable/12/sys/dev/cxgbe/common/t4_hw.c stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/cxgbe.4 ============================================================================== --- stable/12/share/man/man4/cxgbe.4 Mon Oct 5 07:26:06 2020 (r366441) +++ stable/12/share/man/man4/cxgbe.4 Mon Oct 5 08:51:03 2020 (r366442) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Dec 10, 2019 +.Dd September 17, 2020 .Dt CXGBE 4 .Os .Sh NAME @@ -61,8 +61,8 @@ driver provides support for PCI Express Ethernet adapt the Chelsio Terminator 4, Terminator 5, and Terminator 6 ASICs (T4, T5, and T6). The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN -tag insertion/extraction, VLAN checksum offload, VLAN TSO, and -Receive Side Steering (RSS). +tag insertion/extraction, VLAN checksum offload, VLAN TSO, VXLAN checksum +offload, VXLAN TSO, and Receive Side Steering (RSS). For further hardware information and questions related to hardware requirements, see .Pa http://www.chelsio.com/ . Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Mon Oct 5 07:26:06 2020 (r366441) +++ stable/12/sys/dev/cxgbe/adapter.h Mon Oct 5 08:51:03 2020 (r366442) @@ -121,6 +121,7 @@ enum { TX_SGL_SEGS = 39, TX_SGL_SEGS_TSO = 38, TX_SGL_SEGS_EO_TSO = 30, /* XXX: lower for IPv6. */ + TX_SGL_SEGS_VXLAN_TSO = 37, TX_WR_FLITS = SGE_MAX_WR_LEN / 8 }; @@ -286,6 +287,7 @@ struct port_info { int nvi; int up_vis; int uld_vis; + bool vxlan_tcam_entry; struct tx_sched_params *sched_params; @@ -593,6 +595,8 @@ struct sge_txq { uint64_t txpkts0_pkts; /* # of frames in type0 coalesced tx WRs */ uint64_t txpkts1_pkts; /* # of frames in type1 coalesced tx WRs */ uint64_t raw_wrs; /* # of raw work requests (alloc_wr_mbuf) */ + uint64_t vxlan_tso_wrs; /* # of VXLAN TSO work requests */ + uint64_t vxlan_txcsum; /* stats for not-that-common events */ } __aligned(CACHE_LINE_SIZE); @@ -611,6 +615,7 @@ struct sge_rxq { uint64_t rxcsum; /* # of times hardware assisted with checksum */ uint64_t vlan_extraction;/* # of times VLAN tag was extracted */ + uint64_t vxlan_rxcsum; /* stats for not-that-common events */ @@ -833,6 +838,11 @@ struct adapter { struct sge sge; int lro_timeout; int sc_do_rxcopy; + + int vxlan_port; + u_int vxlan_refcount; + int rawf_base; + int nrawf; struct taskqueue *tq[MAX_NCHAN]; /* General purpose taskqueues */ struct port_info *port[MAX_NPORTS]; Modified: stable/12/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/12/sys/dev/cxgbe/common/common.h Mon Oct 5 07:26:06 2020 (r366441) +++ stable/12/sys/dev/cxgbe/common/common.h Mon Oct 5 08:51:03 2020 (r366442) @@ -249,7 +249,7 @@ struct tp_params { uint32_t max_rx_pdu; uint32_t max_tx_pdu; uint64_t hash_filter_mask; - __be16 err_vec_mask; + bool rx_pkt_encap; int8_t fcoe_shift; int8_t port_shift; Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/12/sys/dev/cxgbe/common/t4_hw.c Mon Oct 5 07:26:06 2020 (r366441) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Mon Oct 5 08:51:03 2020 (r366442) @@ -9627,19 +9627,11 @@ int t4_init_tp_params(struct adapter *adap, bool sleep read_filter_mode_and_ingress_config(adap, sleep_ok); - /* - * Cache a mask of the bits that represent the error vector portion of - * rx_pkt.err_vec. T6+ can use a compressed error vector to make room - * for information about outer encapsulation (GENEVE/VXLAN/NVGRE). - */ - tpp->err_vec_mask = htobe16(0xffff); if (chip_id(adap) > CHELSIO_T5) { v = t4_read_reg(adap, A_TP_OUT_CONFIG); - if (v & F_CRXPKTENC) { - tpp->err_vec_mask = - htobe16(V_T6_COMPR_RXERR_VEC(M_T6_COMPR_RXERR_VEC)); - } - } + tpp->rx_pkt_encap = v & F_CRXPKTENC; + } else + tpp->rx_pkt_encap = false; rx_len = t4_read_reg(adap, A_TP_PMM_RX_PAGE_SIZE); tx_len = t4_read_reg(adap, A_TP_PMM_TX_PAGE_SIZE); Modified: stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt ============================================================================== --- stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt Mon Oct 5 07:26:06 2020 (r366441) +++ stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt Mon Oct 5 08:51:03 2020 (r366442) @@ -146,7 +146,8 @@ nethctrl = 1024 neq = 2048 nqpcq = 8192 - nexactf = 456 + nexactf = 454 + nrawf = 2 cmask = all pmask = all ncrypto_lookaside = 16 @@ -272,7 +273,7 @@ [fini] version = 0x1 - checksum = 0x13640470 + checksum = 0xa92352a8 # # $FreeBSD$ # Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Mon Oct 5 07:26:06 2020 (r366441) +++ stable/12/sys/dev/cxgbe/t4_main.c Mon Oct 5 08:51:03 2020 (r366442) @@ -41,9 +41,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include @@ -1021,6 +1023,8 @@ t4_attach(device_t dev) sc->policy = NULL; rw_init(&sc->policy_lock, "connection offload policy"); + refcount_init(&sc->vxlan_refcount, 0); + rc = t4_map_bars_0_and_4(sc); if (rc != 0) goto done; /* error message displayed already */ @@ -1661,6 +1665,7 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) { struct ifnet *ifp; struct sbuf *sb; + struct adapter *sc = vi->adapter; vi->xact_addr_filt = -1; callout_init(&vi->tick, 1); @@ -1691,23 +1696,31 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) ifp->if_capabilities = T4_CAP; ifp->if_capenable = T4_CAP_ENABLE; + ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | + CSUM_UDP_IPV6 | CSUM_TCP_IPV6; + if (chip_id(sc) >= CHELSIO_T6) { + ifp->if_capabilities |= IFCAP_VXLAN_HWCSUM | IFCAP_VXLAN_HWTSO; + ifp->if_capenable |= IFCAP_VXLAN_HWCSUM | IFCAP_VXLAN_HWTSO; + ifp->if_hwassist |= CSUM_INNER_IP6_UDP | CSUM_INNER_IP6_TCP | + CSUM_INNER_IP6_TSO | CSUM_INNER_IP | CSUM_INNER_IP_UDP | + CSUM_INNER_IP_TCP | CSUM_INNER_IP_TSO | CSUM_ENCAP_VXLAN; + } + #ifdef TCP_OFFLOAD if (vi->nofldrxq != 0) ifp->if_capabilities |= IFCAP_TOE; #endif #ifdef RATELIMIT - if (is_ethoffload(vi->adapter) && vi->nofldtxq != 0) { + if (is_ethoffload(sc) && vi->nofldtxq != 0) { ifp->if_capabilities |= IFCAP_TXRTLMT; ifp->if_capenable |= IFCAP_TXRTLMT; } #endif - ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | - CSUM_UDP_IPV6 | CSUM_TCP_IPV6; ifp->if_hw_tsomax = IP_MAXPACKET; ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; #ifdef RATELIMIT - if (is_ethoffload(vi->adapter) && vi->nofldtxq != 0) + if (is_ethoffload(sc) && vi->nofldtxq != 0) ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; #endif ifp->if_hw_tsomaxsegsize = 65536; @@ -2021,6 +2034,18 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, cadd if (mask & IFCAP_NOMAP) ifp->if_capenable ^= IFCAP_NOMAP; + if (mask & IFCAP_VXLAN_HWCSUM) { + ifp->if_capenable ^= IFCAP_VXLAN_HWCSUM; + ifp->if_hwassist ^= CSUM_INNER_IP6_UDP | + CSUM_INNER_IP6_TCP | CSUM_INNER_IP | + CSUM_INNER_IP_UDP | CSUM_INNER_IP_TCP; + } + if (mask & IFCAP_VXLAN_HWTSO) { + ifp->if_capenable ^= IFCAP_VXLAN_HWTSO; + ifp->if_hwassist ^= CSUM_INNER_IP6_TSO | + CSUM_INNER_IP_TSO; + } + #ifdef VLAN_CAPABILITIES VLAN_CAPABILITIES(ifp); #endif @@ -4231,6 +4256,19 @@ get_params__post_init(struct adapter *sc) MPASS(sc->tids.hpftid_base == 0); MPASS(sc->tids.tid_base == sc->tids.nhpftids); } + + param[0] = FW_PARAM_PFVF(RAWF_START); + param[1] = FW_PARAM_PFVF(RAWF_END); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query rawf parameters: %d.\n", rc); + return (rc); + } + if ((int)val[1] > (int)val[0]) { + sc->rawf_base = val[0]; + sc->nrawf = val[1] - val[0] + 1; + } } /* @@ -4856,6 +4894,7 @@ update_mac_settings(struct ifnet *ifp, int flags) struct port_info *pi = vi->pi; struct adapter *sc = pi->adapter; int mtu = -1, promisc = -1, allmulti = -1, vlanex = -1; + uint8_t match_all_mac[ETHER_ADDR_LEN] = {0}; ASSERT_SYNCHRONIZED_OP(sc); KASSERT(flags, ("%s: not told what to update.", __func__)); @@ -4942,7 +4981,7 @@ update_mac_settings(struct ifnet *ifp, int flags) rc = -rc; for (j = 0; j < i; j++) { if_printf(ifp, - "failed to add mc address" + "failed to add mcast address" " %02x:%02x:%02x:" "%02x:%02x:%02x rc=%d\n", mcaddr[j][0], mcaddr[j][1], @@ -4952,15 +4991,37 @@ update_mac_settings(struct ifnet *ifp, int flags) } goto mcfail; } + del = 0; } rc = -t4_set_addr_hash(sc, sc->mbox, vi->viid, 0, hash, 0); if (rc != 0) - if_printf(ifp, "failed to set mc address hash: %d", rc); + if_printf(ifp, "failed to set mcast address hash: %d\n", + rc); + if (del == 0) { + /* We clobbered the VXLAN entry if there was one. */ + pi->vxlan_tcam_entry = false; + } mcfail: if_maddr_runlock(ifp); } + if (IS_MAIN_VI(vi) && sc->vxlan_refcount > 0 && + pi->vxlan_tcam_entry == false) { + rc = t4_alloc_raw_mac_filt(sc, vi->viid, match_all_mac, + match_all_mac, sc->rawf_base + pi->port_id, 1, pi->port_id, + true); + if (rc < 0) { + rc = -rc; + if_printf(ifp, "failed to add VXLAN TCAM entry: %d.\n", + rc); + } else { + MPASS(rc == sc->rawf_base + pi->port_id); + rc = 0; + pi->vxlan_tcam_entry = true; + } + } + return (rc); } @@ -10080,6 +10141,7 @@ clear_stats(struct adapter *sc, u_int port_id) #endif rxq->rxcsum = 0; rxq->vlan_extraction = 0; + rxq->vxlan_rxcsum = 0; rxq->fl.cl_allocated = 0; rxq->fl.cl_recycled = 0; @@ -10098,6 +10160,8 @@ clear_stats(struct adapter *sc, u_int port_id) txq->txpkts0_pkts = 0; txq->txpkts1_pkts = 0; txq->raw_wrs = 0; + txq->vxlan_tso_wrs = 0; + txq->vxlan_txcsum = 0; mp_ring_reset_stats(txq->r); } @@ -10873,6 +10937,116 @@ DB_FUNC(tcb, db_show_t4tcb, db_t4_table, CS_OWN, NULL) } #endif +static eventhandler_tag vxlan_start_evtag; +static eventhandler_tag vxlan_stop_evtag; + +struct vxlan_evargs { + struct ifnet *ifp; + uint16_t port; +}; + +static void +t4_vxlan_start(struct adapter *sc, void *arg) +{ + struct vxlan_evargs *v = arg; + struct port_info *pi; + uint8_t match_all_mac[ETHER_ADDR_LEN] = {0}; + int i, rc; + + if (sc->nrawf == 0 || chip_id(sc) <= CHELSIO_T5) + return; + if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4vxst") != 0) + return; + + if (sc->vxlan_refcount == 0) { + sc->vxlan_port = v->port; + sc->vxlan_refcount = 1; + t4_write_reg(sc, A_MPS_RX_VXLAN_TYPE, + V_VXLAN(v->port) | F_VXLAN_EN); + for_each_port(sc, i) { + pi = sc->port[i]; + if (pi->vxlan_tcam_entry == true) + continue; + rc = t4_alloc_raw_mac_filt(sc, pi->vi[0].viid, + match_all_mac, match_all_mac, + sc->rawf_base + pi->port_id, 1, pi->port_id, true); + if (rc < 0) { + rc = -rc; + log(LOG_ERR, + "%s: failed to add VXLAN TCAM entry: %d.\n", + device_get_name(pi->vi[0].dev), rc); + } else { + MPASS(rc == sc->rawf_base + pi->port_id); + rc = 0; + pi->vxlan_tcam_entry = true; + } + } + } else if (sc->vxlan_port == v->port) { + sc->vxlan_refcount++; + } else { + log(LOG_ERR, "%s: VXLAN already configured on port %d; " + "ignoring attempt to configure it on port %d\n", + device_get_nameunit(sc->dev), sc->vxlan_port, v->port); + } + end_synchronized_op(sc, 0); +} + +static void +t4_vxlan_stop(struct adapter *sc, void *arg) +{ + struct vxlan_evargs *v = arg; + + if (sc->nrawf == 0 || chip_id(sc) <= CHELSIO_T5) + return; + if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4vxsp") != 0) + return; + + /* + * VXLANs may have been configured before the driver was loaded so we + * may see more stops than starts. This is not handled cleanly but at + * least we keep the refcount sane. + */ + if (sc->vxlan_port != v->port) + goto done; + if (sc->vxlan_refcount == 0) { + log(LOG_ERR, + "%s: VXLAN operation on port %d was stopped earlier; " + "ignoring attempt to stop it again.\n", + device_get_nameunit(sc->dev), sc->vxlan_port); + } else if (--sc->vxlan_refcount == 0) { + t4_set_reg_field(sc, A_MPS_RX_VXLAN_TYPE, F_VXLAN_EN, 0); + } +done: + end_synchronized_op(sc, 0); +} + +static void +t4_vxlan_start_handler(void *arg __unused, struct ifnet *ifp, + sa_family_t family, u_int port) +{ + struct vxlan_evargs v; + + MPASS(family == AF_INET || family == AF_INET6); + v.ifp = ifp; + v.port = port; + + t4_iterate(t4_vxlan_start, &v); +} + +static void +t4_vxlan_stop_handler(void *arg __unused, struct ifnet *ifp, sa_family_t family, + u_int port) +{ + struct vxlan_evargs v; + + MPASS(family == AF_INET || family == AF_INET6); + v.ifp = ifp; + v.port = port; + + t4_iterate(t4_vxlan_stop, &v); +} + + static struct sx mlu; /* mod load unload */ SX_SYSINIT(cxgbe_mlu, &mlu, "cxgbe mod load/unload"); @@ -10913,6 +11087,14 @@ mod_event(module_t mod, int cmd, void *arg) #endif t4_tracer_modload(); tweak_tunables(); + vxlan_start_evtag = + EVENTHANDLER_REGISTER(vxlan_start, + t4_vxlan_start_handler, NULL, + EVENTHANDLER_PRI_ANY); + vxlan_stop_evtag = + EVENTHANDLER_REGISTER(vxlan_stop, + t4_vxlan_stop_handler, NULL, + EVENTHANDLER_PRI_ANY); } sx_xunlock(&mlu); break; @@ -10949,6 +11131,10 @@ mod_event(module_t mod, int cmd, void *arg) sx_sunlock(&t4_list_lock); if (t4_sge_extfree_refs() == 0) { + EVENTHANDLER_DEREGISTER(vxlan_start, + vxlan_start_evtag); + EVENTHANDLER_DEREGISTER(vxlan_stop, + vxlan_stop_evtag); t4_tracer_modunload(); #ifdef INET6 t4_clip_modunload(); Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Mon Oct 5 07:26:06 2020 (r366441) +++ stable/12/sys/dev/cxgbe/t4_sge.c Mon Oct 5 08:51:03 2020 (r366442) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -271,8 +272,9 @@ static int find_refill_source(struct adapter *, int, b static void add_fl_to_sfl(struct adapter *, struct sge_fl *); static inline void get_pkt_gl(struct mbuf *, struct sglist *); -static inline u_int txpkt_len16(u_int, u_int); -static inline u_int txpkt_vm_len16(u_int, u_int); +static inline u_int txpkt_len16(u_int, const u_int); +static inline u_int txpkt_vm_len16(u_int, const u_int); +static inline void calculate_mbuf_len16(struct adapter *, struct mbuf *); static inline u_int txpkts0_len16(u_int); static inline u_int txpkts1_len16(void); static u_int write_raw_wr(struct sge_txq *, void *, struct mbuf *, u_int); @@ -1867,13 +1869,42 @@ eth_rx(struct adapter *sc, struct sge_rxq *rxq, const #if defined(INET) || defined(INET6) struct lro_ctrl *lro = &rxq->lro; #endif + uint16_t err_vec, tnl_type, tnlhdr_len; static const int sw_hashtype[4][2] = { {M_HASHTYPE_NONE, M_HASHTYPE_NONE}, {M_HASHTYPE_RSS_IPV4, M_HASHTYPE_RSS_IPV6}, {M_HASHTYPE_RSS_TCP_IPV4, M_HASHTYPE_RSS_TCP_IPV6}, {M_HASHTYPE_RSS_UDP_IPV4, M_HASHTYPE_RSS_UDP_IPV6}, }; + static const int sw_csum_flags[2][2] = { + { + /* IP, inner IP */ + CSUM_ENCAP_VXLAN | + CSUM_L3_CALC | CSUM_L3_VALID | + CSUM_L4_CALC | CSUM_L4_VALID | + CSUM_INNER_L3_CALC | CSUM_INNER_L3_VALID | + CSUM_INNER_L4_CALC | CSUM_INNER_L4_VALID, + /* IP, inner IP6 */ + CSUM_ENCAP_VXLAN | + CSUM_L3_CALC | CSUM_L3_VALID | + CSUM_L4_CALC | CSUM_L4_VALID | + CSUM_INNER_L4_CALC | CSUM_INNER_L4_VALID, + }, + { + /* IP6, inner IP */ + CSUM_ENCAP_VXLAN | + CSUM_L4_CALC | CSUM_L4_VALID | + CSUM_INNER_L3_CALC | CSUM_INNER_L3_VALID | + CSUM_INNER_L4_CALC | CSUM_INNER_L4_VALID, + + /* IP6, inner IP6 */ + CSUM_ENCAP_VXLAN | + CSUM_L4_CALC | CSUM_L4_VALID | + CSUM_INNER_L4_CALC | CSUM_INNER_L4_VALID, + }, + }; + MPASS(plen > sc->params.sge.fl_pktshift); m0 = get_fl_payload(sc, fl, plen); if (__predict_false(m0 == NULL)) @@ -1888,23 +1919,73 @@ eth_rx(struct adapter *sc, struct sge_rxq *rxq, const m0->m_pkthdr.flowid = be32toh(d->rss.hash_val); cpl = (const void *)(&d->rss + 1); - if (cpl->csum_calc && !(cpl->err_vec & sc->params.tp.err_vec_mask)) { - if (ifp->if_capenable & IFCAP_RXCSUM && - cpl->l2info & htobe32(F_RXF_IP)) { - m0->m_pkthdr.csum_flags = (CSUM_IP_CHECKED | - CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); + if (sc->params.tp.rx_pkt_encap) { + const uint16_t ev = be16toh(cpl->err_vec); + + err_vec = G_T6_COMPR_RXERR_VEC(ev); + tnl_type = G_T6_RX_TNL_TYPE(ev); + tnlhdr_len = G_T6_RX_TNLHDR_LEN(ev); + } else { + err_vec = be16toh(cpl->err_vec); + tnl_type = 0; + tnlhdr_len = 0; + } + if (cpl->csum_calc && err_vec == 0) { + int ipv6 = !!(cpl->l2info & htobe32(F_RXF_IP6)); + + /* checksum(s) calculated and found to be correct. */ + + MPASS((cpl->l2info & htobe32(F_RXF_IP)) ^ + (cpl->l2info & htobe32(F_RXF_IP6))); + m0->m_pkthdr.csum_data = be16toh(cpl->csum); + if (tnl_type == 0) { + if (!ipv6 && ifp->if_capenable & IFCAP_RXCSUM) { + m0->m_pkthdr.csum_flags = CSUM_L3_CALC | + CSUM_L3_VALID | CSUM_L4_CALC | + CSUM_L4_VALID; + } else if (ipv6 && ifp->if_capenable & IFCAP_RXCSUM_IPV6) { + m0->m_pkthdr.csum_flags = CSUM_L4_CALC | + CSUM_L4_VALID; + } rxq->rxcsum++; - } else if (ifp->if_capenable & IFCAP_RXCSUM_IPV6 && - cpl->l2info & htobe32(F_RXF_IP6)) { - m0->m_pkthdr.csum_flags = (CSUM_DATA_VALID_IPV6 | - CSUM_PSEUDO_HDR); - rxq->rxcsum++; - } + } else { + MPASS(tnl_type == RX_PKT_TNL_TYPE_VXLAN); + if (__predict_false(cpl->ip_frag)) { + /* + * csum_data is for the inner frame (which is an + * IP fragment) and is not 0xffff. There is no + * way to pass the inner csum_data to the stack. + * We don't want the stack to use the inner + * csum_data to validate the outer frame or it + * will get rejected. So we fix csum_data here + * and let sw do the checksum of inner IP + * fragments. + * + * XXX: Need 32b for csum_data2 in an rx mbuf. + * Maybe stuff it into rcv_tstmp? + */ + m0->m_pkthdr.csum_data = 0xffff; + if (ipv6) { + m0->m_pkthdr.csum_flags = CSUM_L4_CALC | + CSUM_L4_VALID; + } else { + m0->m_pkthdr.csum_flags = CSUM_L3_CALC | + CSUM_L3_VALID | CSUM_L4_CALC | + CSUM_L4_VALID; + } + } else { + int outer_ipv6; - if (__predict_false(cpl->ip_frag)) - m0->m_pkthdr.csum_data = be16toh(cpl->csum); - else - m0->m_pkthdr.csum_data = 0xffff; + MPASS(m0->m_pkthdr.csum_data == 0xffff); + + outer_ipv6 = tnlhdr_len >= + sizeof(struct ether_header) + + sizeof(struct ip6_hdr); + m0->m_pkthdr.csum_flags = + sw_csum_flags[outer_ipv6][ipv6]; + } + rxq->vxlan_rxcsum++; + } } if (cpl->vlan_ex) { @@ -1929,7 +2010,7 @@ eth_rx(struct adapter *sc, struct sge_rxq *rxq, const } #if defined(INET) || defined(INET6) - if (rxq->iq.flags & IQ_LRO_ENABLED && + if (rxq->iq.flags & IQ_LRO_ENABLED && tnl_type == 0 && (M_HASHTYPE_GET(m0) == M_HASHTYPE_RSS_TCP_IPV4 || M_HASHTYPE_GET(m0) == M_HASHTYPE_RSS_TCP_IPV6)) { if (sort_before_lro(lro)) { @@ -2101,10 +2182,10 @@ mbuf_nsegs(struct mbuf *m) { M_ASSERTPKTHDR(m); - KASSERT(m->m_pkthdr.l5hlen > 0, + KASSERT(m->m_pkthdr.inner_l5hlen > 0, ("%s: mbuf %p missing information on # of segments.", __func__, m)); - return (m->m_pkthdr.l5hlen); + return (m->m_pkthdr.inner_l5hlen); } static inline void @@ -2112,7 +2193,7 @@ set_mbuf_nsegs(struct mbuf *m, uint8_t nsegs) { M_ASSERTPKTHDR(m); - m->m_pkthdr.l5hlen = nsegs; + m->m_pkthdr.inner_l5hlen = nsegs; } static inline int @@ -2237,63 +2318,108 @@ alloc_wr_mbuf(int len, int how) return (m); } -static inline int +static inline bool needs_hwcsum(struct mbuf *m) { + const uint32_t csum_flags = CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP | + CSUM_IP_TSO | CSUM_INNER_IP | CSUM_INNER_IP_UDP | + CSUM_INNER_IP_TCP | CSUM_INNER_IP_TSO | CSUM_IP6_UDP | + CSUM_IP6_TCP | CSUM_IP6_TSO | CSUM_INNER_IP6_UDP | + CSUM_INNER_IP6_TCP | CSUM_INNER_IP6_TSO; M_ASSERTPKTHDR(m); - return (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_IP | - CSUM_TSO | CSUM_UDP_IPV6 | CSUM_TCP_IPV6)); + return (m->m_pkthdr.csum_flags & csum_flags); } -static inline int +static inline bool needs_tso(struct mbuf *m) { + const uint32_t csum_flags = CSUM_IP_TSO | CSUM_IP6_TSO | + CSUM_INNER_IP_TSO | CSUM_INNER_IP6_TSO; M_ASSERTPKTHDR(m); - return (m->m_pkthdr.csum_flags & CSUM_TSO); + return (m->m_pkthdr.csum_flags & csum_flags); } -static inline int +static inline bool +needs_vxlan_csum(struct mbuf *m) +{ + + M_ASSERTPKTHDR(m); + + return (m->m_pkthdr.csum_flags & CSUM_ENCAP_VXLAN); +} + +static inline bool +needs_vxlan_tso(struct mbuf *m) +{ + const uint32_t csum_flags = CSUM_ENCAP_VXLAN | CSUM_INNER_IP_TSO | + CSUM_INNER_IP6_TSO; + + M_ASSERTPKTHDR(m); + + return ((m->m_pkthdr.csum_flags & csum_flags) != 0 && + (m->m_pkthdr.csum_flags & csum_flags) != CSUM_ENCAP_VXLAN); +} + +static inline bool +needs_inner_tcp_csum(struct mbuf *m) +{ + const uint32_t csum_flags = CSUM_INNER_IP_TSO | CSUM_INNER_IP6_TSO; + + M_ASSERTPKTHDR(m); + + return (m->m_pkthdr.csum_flags & csum_flags); +} + +static inline bool needs_l3_csum(struct mbuf *m) { + const uint32_t csum_flags = CSUM_IP | CSUM_IP_TSO | CSUM_INNER_IP | + CSUM_INNER_IP_TSO; M_ASSERTPKTHDR(m); - return (m->m_pkthdr.csum_flags & (CSUM_IP | CSUM_TSO)); + return (m->m_pkthdr.csum_flags & csum_flags); } -static inline int -needs_tcp_csum(struct mbuf *m) +static inline bool +needs_outer_tcp_csum(struct mbuf *m) { + const uint32_t csum_flags = CSUM_IP_TCP | CSUM_IP_TSO | CSUM_IP6_TCP | + CSUM_IP6_TSO; M_ASSERTPKTHDR(m); - return (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_TCP_IPV6 | CSUM_TSO)); + + return (m->m_pkthdr.csum_flags & csum_flags); } #ifdef RATELIMIT -static inline int -needs_l4_csum(struct mbuf *m) +static inline bool +needs_outer_l4_csum(struct mbuf *m) { + const uint32_t csum_flags = CSUM_IP_UDP | CSUM_IP_TCP | CSUM_IP_TSO | + CSUM_IP6_UDP | CSUM_IP6_TCP | CSUM_IP6_TSO; M_ASSERTPKTHDR(m); - return (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_UDP_IPV6 | - CSUM_TCP_IPV6 | CSUM_TSO)); + return (m->m_pkthdr.csum_flags & csum_flags); } -static inline int -needs_udp_csum(struct mbuf *m) +static inline bool +needs_outer_udp_csum(struct mbuf *m) { + const uint32_t csum_flags = CSUM_IP_UDP | CSUM_IP6_UDP; M_ASSERTPKTHDR(m); - return (m->m_pkthdr.csum_flags & (CSUM_UDP | CSUM_UDP_IPV6)); + + return (m->m_pkthdr.csum_flags & csum_flags); } #endif -static inline int +static inline bool needs_vlan_insertion(struct mbuf *m) { @@ -2440,6 +2566,23 @@ count_mbuf_nsegs(struct mbuf *m, int skip, uint8_t *cf } /* + * The maximum number of segments that can fit in a WR. + */ +static int +max_nsegs_allowed(struct mbuf *m) +{ + + if (needs_tso(m)) { + if (needs_vxlan_tso(m)) + return (TX_SGL_SEGS_VXLAN_TSO); + else + return (TX_SGL_SEGS_TSO); + } + + return (TX_SGL_SEGS); +} + +/* * Analyze the mbuf to determine its tx needs. The mbuf passed in may change: * a) caller can assume it's been freed if this function returns with an error. * b) it may get defragged up if the gather list is too long for the hardware. @@ -2474,7 +2617,7 @@ restart: M_ASSERTPKTHDR(m0); MPASS(m0->m_pkthdr.len > 0); nsegs = count_mbuf_nsegs(m0, 0, &cflags); - if (nsegs > (needs_tso(m0) ? TX_SGL_SEGS_TSO : TX_SGL_SEGS)) { + if (nsegs > max_nsegs_allowed(m0)) { if (defragged++ > 0) { rc = EFBIG; goto fail; @@ -2502,18 +2645,15 @@ restart: } set_mbuf_nsegs(m0, nsegs); set_mbuf_cflags(m0, cflags); - if (sc->flags & IS_VF) - set_mbuf_len16(m0, txpkt_vm_len16(nsegs, needs_tso(m0))); - else - set_mbuf_len16(m0, txpkt_len16(nsegs, needs_tso(m0))); + calculate_mbuf_len16(sc, m0); #ifdef RATELIMIT /* * Ethofld is limited to TCP and UDP for now, and only when L4 hw - * checksumming is enabled. needs_l4_csum happens to check for all the - * right things. + * checksumming is enabled. needs_outer_l4_csum happens to check for + * all the right things. */ - if (__predict_false(needs_eo(m0) && !needs_l4_csum(m0))) + if (__predict_false(needs_eo(m0) && !needs_outer_l4_csum(m0))) m0->m_pkthdr.snd_tag = NULL; #endif @@ -2541,21 +2681,27 @@ restart: switch (eh_type) { #ifdef INET6 case ETHERTYPE_IPV6: - { - struct ip6_hdr *ip6 = l3hdr; - - MPASS(!needs_tso(m0) || ip6->ip6_nxt == IPPROTO_TCP); - - m0->m_pkthdr.l3hlen = sizeof(*ip6); + m0->m_pkthdr.l3hlen = sizeof(struct ip6_hdr); break; - } #endif #ifdef INET case ETHERTYPE_IP: { struct ip *ip = l3hdr; - m0->m_pkthdr.l3hlen = ip->ip_hl * 4; + if (needs_vxlan_csum(m0)) { + /* Driver will do the outer IP hdr checksum. */ + ip->ip_sum = 0; + if (needs_vxlan_tso(m0)) { + const uint16_t ipl = ip->ip_len; + + ip->ip_len = 0; + ip->ip_sum = ~in_cksum_hdr(ip); + ip->ip_len = ipl; + } else + ip->ip_sum = in_cksum_hdr(ip); + } + m0->m_pkthdr.l3hlen = ip->ip_hl << 2; break; } #endif @@ -2565,8 +2711,59 @@ restart: __func__, eh_type); } + if (needs_vxlan_csum(m0)) { + m0->m_pkthdr.l4hlen = sizeof(struct udphdr); + m0->m_pkthdr.l5hlen = sizeof(struct vxlan_header); + + /* Inner headers. */ + eh = m_advance(&m, &offset, m0->m_pkthdr.l3hlen + + sizeof(struct udphdr) + sizeof(struct vxlan_header)); + eh_type = ntohs(eh->ether_type); + if (eh_type == ETHERTYPE_VLAN) { + struct ether_vlan_header *evh = (void *)eh; + + eh_type = ntohs(evh->evl_proto); + m0->m_pkthdr.inner_l2hlen = sizeof(*evh); + } else + m0->m_pkthdr.inner_l2hlen = sizeof(*eh); + l3hdr = m_advance(&m, &offset, m0->m_pkthdr.inner_l2hlen); + + switch (eh_type) { +#ifdef INET6 + case ETHERTYPE_IPV6: + m0->m_pkthdr.inner_l3hlen = sizeof(struct ip6_hdr); + break; +#endif +#ifdef INET + case ETHERTYPE_IP: + { + struct ip *ip = l3hdr; + + m0->m_pkthdr.inner_l3hlen = ip->ip_hl << 2; + break; + } +#endif + default: + panic("%s: VXLAN hw offload requested with unknown " + "ethertype 0x%04x. if_cxgbe must be compiled" + " with the same INET/INET6 options as the kernel.", + __func__, eh_type); + } #if defined(INET) || defined(INET6) - if (needs_tcp_csum(m0)) { + if (needs_inner_tcp_csum(m0)) { + tcp = m_advance(&m, &offset, m0->m_pkthdr.inner_l3hlen); + m0->m_pkthdr.inner_l4hlen = tcp->th_off * 4; + } +#endif + MPASS((m0->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); + m0->m_pkthdr.csum_flags &= CSUM_INNER_IP6_UDP | + CSUM_INNER_IP6_TCP | CSUM_INNER_IP6_TSO | CSUM_INNER_IP | + CSUM_INNER_IP_UDP | CSUM_INNER_IP_TCP | CSUM_INNER_IP_TSO | + CSUM_ENCAP_VXLAN; + } + +#if defined(INET) || defined(INET6) + if (needs_outer_tcp_csum(m0)) { tcp = m_advance(&m, &offset, m0->m_pkthdr.l3hlen); m0->m_pkthdr.l4hlen = tcp->th_off * 4; #ifdef RATELIMIT @@ -2576,7 +2773,7 @@ restart: V_FW_ETH_TX_EO_WR_TSOFF(sizeof(*tcp) / 2 + 1)); } else set_mbuf_eo_tsclk_tsoff(m0, 0); - } else if (needs_udp_csum(m)) { + } else if (needs_outer_udp_csum(m0)) { m0->m_pkthdr.l4hlen = sizeof(struct udphdr); #endif } @@ -3524,6 +3721,9 @@ alloc_rxq(struct vi_info *vi, struct sge_rxq *rxq, int SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "vlan_extraction", CTLFLAG_RD, &rxq->vlan_extraction, "# of times hardware extracted 802.1Q tag"); + SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "vxlan_rxcsum", + CTLFLAG_RD, &rxq->vxlan_rxcsum, + "# of times hardware assisted with inner checksum (VXLAN) "); add_fl_sysctls(sc, &vi->ctx, oid, &rxq->fl); @@ -4178,6 +4378,11 @@ alloc_txq(struct vi_info *vi, struct sge_txq *txq, int "# of frames tx'd using type1 txpkts work requests"); SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "raw_wrs", CTLFLAG_RD, &txq->raw_wrs, "# of raw work requests (non-packets)"); + SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "vxlan_tso_wrs", + CTLFLAG_RD, &txq->vxlan_tso_wrs, "# of VXLAN TSO work requests"); + SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "vxlan_txcsum", + CTLFLAG_RD, &txq->vxlan_txcsum, + "# of times hardware assisted with inner checksums (VXLAN)"); mp_ring_sysctls(txq->r, &vi->ctx, children); @@ -4427,27 +4632,25 @@ get_pkt_gl(struct mbuf *m, struct sglist *gl) KASSERT(gl->sg_nseg == mbuf_nsegs(m), ("%s: nsegs changed for mbuf %p from %d to %d", __func__, m, mbuf_nsegs(m), gl->sg_nseg)); - KASSERT(gl->sg_nseg > 0 && - gl->sg_nseg <= (needs_tso(m) ? TX_SGL_SEGS_TSO : TX_SGL_SEGS), + KASSERT(gl->sg_nseg > 0 && gl->sg_nseg <= max_nsegs_allowed(m), ("%s: %d segments, should have been 1 <= nsegs <= %d", __func__, - gl->sg_nseg, needs_tso(m) ? TX_SGL_SEGS_TSO : TX_SGL_SEGS)); + gl->sg_nseg, max_nsegs_allowed(m))); } /* * len16 for a txpkt WR with a GL. Includes the firmware work request header. */ static inline u_int -txpkt_len16(u_int nsegs, u_int tso) +txpkt_len16(u_int nsegs, const u_int extra) { u_int n; MPASS(nsegs > 0); nsegs--; /* first segment is part of ulptx_sgl */ - n = sizeof(struct fw_eth_tx_pkt_wr) + sizeof(struct cpl_tx_pkt_core) + + n = extra + sizeof(struct fw_eth_tx_pkt_wr) + + sizeof(struct cpl_tx_pkt_core) + sizeof(struct ulptx_sgl) + 8 * ((3 * nsegs) / 2 + (nsegs & 1)); - if (tso) - n += sizeof(struct cpl_tx_pkt_lso_core); return (howmany(n, 16)); } @@ -4457,22 +4660,43 @@ txpkt_len16(u_int nsegs, u_int tso) * request header. */ static inline u_int -txpkt_vm_len16(u_int nsegs, u_int tso) +txpkt_vm_len16(u_int nsegs, const u_int extra) { u_int n; MPASS(nsegs > 0); nsegs--; /* first segment is part of ulptx_sgl */ - n = sizeof(struct fw_eth_tx_pkt_vm_wr) + + n = extra + sizeof(struct fw_eth_tx_pkt_vm_wr) + sizeof(struct cpl_tx_pkt_core) + sizeof(struct ulptx_sgl) + 8 * ((3 * nsegs) / 2 + (nsegs & 1)); - if (tso) - n += sizeof(struct cpl_tx_pkt_lso_core); return (howmany(n, 16)); } +static inline void *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Mon Oct 5 09:03:18 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51FD13FD07F; Mon, 5 Oct 2020 09:03:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4ZPy1W6xz4sbB; Mon, 5 Oct 2020 09:03:18 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16DDC12FE5; Mon, 5 Oct 2020 09:03:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09593H79054445; Mon, 5 Oct 2020 09:03:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09593HJ6054441; Mon, 5 Oct 2020 09:03:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010050903.09593HJ6054441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 09:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366443 - in stable/12: share/man/man4 sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/cxgbe X-SVN-Commit-Revision: 366443 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 09:03:18 -0000 Author: np Date: Mon Oct 5 09:03:17 2020 New Revision: 366443 URL: https://svnweb.freebsd.org/changeset/base/366443 Log: MFC r365993: cxgbe(4): let the PF driver use VM work requests for transmit. This allows the PF interfaces to communicate with the VF interfaces over the internal switch in the ASIC. Fix the GL limits for VM work requests while here. Sponsored by: Chelsio Communications Modified: stable/12/share/man/man4/cxgbe.4 stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/cxgbe.4 ============================================================================== --- stable/12/share/man/man4/cxgbe.4 Mon Oct 5 08:51:03 2020 (r366442) +++ stable/12/share/man/man4/cxgbe.4 Mon Oct 5 09:03:17 2020 (r366443) @@ -351,6 +351,17 @@ This tunable is for specialized applications only and normal operation. The capabilities for which hardware resources have been reserved are listed in dev..X.*caps sysctls. +.It Va hw.cxgbe.tx_vm_wr +Setting this to 1 instructs the driver to use VM work requests to transmit data. +This lets PF interfaces transmit frames to VF interfaces over the internal +switch in the ASIC. +Note that the +.Xr cxgbev 4 +VF driver always uses VM work requests and is not affected by this tunable. +The default value is 0 and should be changed only if PF and VF interfaces need +to communicate with each other. +Different interfaces can be assigned different values using the +dev..X.tx_vm_wr sysctl when the interface is administratively down. .El .Sh SUPPORT For general information and support, Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Mon Oct 5 08:51:03 2020 (r366442) +++ stable/12/sys/dev/cxgbe/adapter.h Mon Oct 5 09:03:17 2020 (r366443) @@ -120,6 +120,8 @@ enum { SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ TX_SGL_SEGS = 39, TX_SGL_SEGS_TSO = 38, + TX_SGL_SEGS_VM = 38, + TX_SGL_SEGS_VM_TSO = 37, TX_SGL_SEGS_EO_TSO = 30, /* XXX: lower for IPv6. */ TX_SGL_SEGS_VXLAN_TSO = 37, TX_WR_FLITS = SGE_MAX_WR_LEN / 8 @@ -174,6 +176,7 @@ enum { DOOMED = (1 << 0), VI_INIT_DONE = (1 << 1), VI_SYSCTL_CTX = (1 << 2), + TX_USES_VM_WR = (1 << 3), /* adapter debug_flags */ DF_DUMP_MBOX = (1 << 0), /* Log all mbox cmd/rpl. */ @@ -1238,7 +1241,7 @@ void t4_intr_evt(void *); void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct wrqe *); void t4_update_fl_bufsize(struct ifnet *); struct mbuf *alloc_wr_mbuf(int, int); -int parse_pkt(struct adapter *, struct mbuf **); +int parse_pkt(struct mbuf **, bool); void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); int tnl_cong(struct port_info *, int); Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Mon Oct 5 08:51:03 2020 (r366442) +++ stable/12/sys/dev/cxgbe/t4_main.c Mon Oct 5 09:03:17 2020 (r366443) @@ -575,6 +575,10 @@ static int t4_panic_on_fatal_err = 0; SYSCTL_INT(_hw_cxgbe, OID_AUTO, panic_on_fatal_err, CTLFLAG_RDTUN, &t4_panic_on_fatal_err, 0, "panic on fatal errors"); +static int t4_tx_vm_wr = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, tx_vm_wr, CTLFLAG_RWTUN, &t4_tx_vm_wr, 0, + "Use VM work requests to transmit packets."); + #ifdef TCP_OFFLOAD /* * TOE tunables. @@ -655,6 +659,7 @@ static int sysctl_bitfield_8b(SYSCTL_HANDLER_ARGS); static int sysctl_bitfield_16b(SYSCTL_HANDLER_ARGS); static int sysctl_btphy(SYSCTL_HANDLER_ARGS); static int sysctl_noflowq(SYSCTL_HANDLER_ARGS); +static int sysctl_tx_vm_wr(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS); static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS); @@ -1669,6 +1674,8 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) vi->xact_addr_filt = -1; callout_init(&vi->tick, 1); + if (sc->flags & IS_VF || t4_tx_vm_wr != 0) + vi->flags |= TX_USES_VM_WR; /* Allocate an ifnet and set it up */ ifp = if_alloc(IFT_ETHER); @@ -1718,7 +1725,10 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) #endif ifp->if_hw_tsomax = IP_MAXPACKET; - ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; + if (vi->flags & TX_USES_VM_WR) + ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_VM_TSO; + else + ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; #ifdef RATELIMIT if (is_ethoffload(sc) && vi->nofldtxq != 0) ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; @@ -2096,7 +2106,7 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) { struct vi_info *vi = ifp->if_softc; struct port_info *pi = vi->pi; - struct adapter *sc = pi->adapter; + struct adapter *sc; struct sge_txq *txq; void *items[1]; int rc; @@ -2109,7 +2119,7 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) return (ENETDOWN); } - rc = parse_pkt(sc, &m); + rc = parse_pkt(&m, vi->flags & TX_USES_VM_WR); if (__predict_false(rc != 0)) { MPASS(m == NULL); /* was freed already */ atomic_add_int(&pi->tx_parse_error, 1); /* rare, atomic is ok */ @@ -2128,6 +2138,7 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) #endif /* Select a txq. */ + sc = vi->adapter; txq = &sc->sge.txq[vi->first_txq]; if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) txq += ((m->m_pkthdr.flowid % (vi->ntxq - vi->rsrv_noflowq)) + @@ -6499,6 +6510,16 @@ vi_sysctls(struct vi_info *vi) "Reserve queue 0 for non-flowid packets"); } + if (vi->adapter->flags & IS_VF) { + MPASS(vi->flags & TX_USES_VM_WR); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "tx_vm_wr", CTLFLAG_RD, + NULL, 1, "use VM work requests for transmit"); + } else { + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tx_vm_wr", + CTLTYPE_INT | CTLFLAG_RW, vi, 0, + sysctl_tx_vm_wr, "I", "use VM work requestes for transmit"); + } + #ifdef TCP_OFFLOAD if (vi->nofldrxq != 0) { SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldrxq", CTLFLAG_RD, @@ -6920,6 +6941,63 @@ sysctl_noflowq(SYSCTL_HANDLER_ARGS) else vi->rsrv_noflowq = 0; + return (rc); +} + +static int +sysctl_tx_vm_wr(SYSCTL_HANDLER_ARGS) +{ + struct vi_info *vi = arg1; + struct adapter *sc = vi->adapter; + int rc, val, i; + + MPASS(!(sc->flags & IS_VF)); + + val = vi->flags & TX_USES_VM_WR ? 1 : 0; + rc = sysctl_handle_int(oidp, &val, 0, req); + if (rc != 0 || req->newptr == NULL) + return (rc); + + if (val != 0 && val != 1) + return (EINVAL); + + rc = begin_synchronized_op(sc, vi, HOLD_LOCK | SLEEP_OK | INTR_OK, + "t4txvm"); + if (rc) + return (rc); + if (vi->ifp->if_drv_flags & IFF_DRV_RUNNING) { + /* + * We don't want parse_pkt to run with one setting (VF or PF) + * and then eth_tx to see a different setting but still use + * stale information calculated by parse_pkt. + */ + rc = EBUSY; + } else { + struct port_info *pi = vi->pi; + struct sge_txq *txq; + uint32_t ctrl0; + uint8_t npkt = sc->params.max_pkts_per_eth_tx_pkts_wr; + + if (val) { + vi->flags |= TX_USES_VM_WR; + vi->ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_VM_TSO; + ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | + V_TXPKT_INTF(pi->tx_chan)); + if (!(sc->flags & IS_VF)) + npkt--; + } else { + vi->flags &= ~TX_USES_VM_WR; + vi->ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; + ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | + V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(sc->pf) | + V_TXPKT_VF(vi->vin) | V_TXPKT_VF_VLD(vi->vfvld)); + } + for_each_txq(vi, i, txq) { + txq->cpl_ctrl0 = ctrl0; + txq->txp.max_npkt = npkt; + } + } + end_synchronized_op(sc, LOCK_HELD); return (rc); } Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Mon Oct 5 08:51:03 2020 (r366442) +++ stable/12/sys/dev/cxgbe/t4_sge.c Mon Oct 5 09:03:17 2020 (r366443) @@ -274,7 +274,7 @@ static void add_fl_to_sfl(struct adapter *, struct sge static inline void get_pkt_gl(struct mbuf *, struct sglist *); static inline u_int txpkt_len16(u_int, const u_int); static inline u_int txpkt_vm_len16(u_int, const u_int); -static inline void calculate_mbuf_len16(struct adapter *, struct mbuf *); +static inline void calculate_mbuf_len16(struct mbuf *, bool); static inline u_int txpkts0_len16(u_int); static inline u_int txpkts1_len16(void); static u_int write_raw_wr(struct sge_txq *, void *, struct mbuf *, u_int); @@ -2229,6 +2229,7 @@ set_mbuf_len16(struct mbuf *m, uint8_t len16) { M_ASSERTPKTHDR(m); + MPASS(len16 > 0 && len16 <= SGE_MAX_WR_LEN / 16); m->m_pkthdr.PH_loc.eight[0] = len16; } @@ -2569,9 +2570,15 @@ count_mbuf_nsegs(struct mbuf *m, int skip, uint8_t *cf * The maximum number of segments that can fit in a WR. */ static int -max_nsegs_allowed(struct mbuf *m) +max_nsegs_allowed(struct mbuf *m, bool vm_wr) { + if (vm_wr) { + if (needs_tso(m)) + return (TX_SGL_SEGS_VM_TSO); + return (TX_SGL_SEGS_VM); + } + if (needs_tso(m)) { if (needs_vxlan_tso(m)) return (TX_SGL_SEGS_VXLAN_TSO); @@ -2588,7 +2595,7 @@ max_nsegs_allowed(struct mbuf *m) * b) it may get defragged up if the gather list is too long for the hardware. */ int -parse_pkt(struct adapter *sc, struct mbuf **mp) +parse_pkt(struct mbuf **mp, bool vm_wr) { struct mbuf *m0 = *mp, *m; int rc, nsegs, defragged = 0, offset; @@ -2617,7 +2624,7 @@ restart: M_ASSERTPKTHDR(m0); MPASS(m0->m_pkthdr.len > 0); nsegs = count_mbuf_nsegs(m0, 0, &cflags); - if (nsegs > max_nsegs_allowed(m0)) { + if (nsegs > max_nsegs_allowed(m0, vm_wr)) { if (defragged++ > 0) { rc = EFBIG; goto fail; @@ -2645,7 +2652,7 @@ restart: } set_mbuf_nsegs(m0, nsegs); set_mbuf_cflags(m0, cflags); - calculate_mbuf_len16(sc, m0); + calculate_mbuf_len16(m0, vm_wr); #ifdef RATELIMIT /* @@ -3053,7 +3060,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool if (txp->npkt > 0 || remaining > 1 || txp->score > 3 || atomic_load_int(&txq->eq.equiq) != 0) { - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) rc = add_to_txpkts_vf(sc, txq, m0, avail, &snd); else rc = add_to_txpkts_pf(sc, txq, m0, avail, &snd); @@ -3069,14 +3076,14 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool if (txp->score++ >= 10) txp->score = 10; MPASS(avail >= tx_len16_to_desc(txp->len16)); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) n = write_txpkts_vm_wr(sc, txq); else n = write_txpkts_wr(sc, txq); } else { MPASS(avail >= tx_len16_to_desc(mbuf_len16(txp->mb[0]))); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) n = write_txpkt_vm_wr(sc, txq, txp->mb[0]); else @@ -3118,7 +3125,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool break; /* out of descriptors */ } ETHER_BPF_MTAP(ifp, m0); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) n = write_txpkt_vm_wr(sc, txq, m0); else n = write_txpkt_wr(sc, txq, m0, avail); @@ -3161,14 +3168,14 @@ send_txpkts: ETHER_BPF_MTAP(ifp, txp->mb[i]); if (txp->npkt > 1) { MPASS(avail >= tx_len16_to_desc(txp->len16)); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) n = write_txpkts_vm_wr(sc, txq); else n = write_txpkts_wr(sc, txq); } else { MPASS(avail >= tx_len16_to_desc(mbuf_len16(txp->mb[0]))); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) n = write_txpkt_vm_wr(sc, txq, txp->mb[0]); else n = write_txpkt_wr(sc, txq, txp->mb[0], avail); @@ -4307,7 +4314,7 @@ alloc_txq(struct vi_info *vi, struct sge_txq *txq, int TASK_INIT(&txq->tx_reclaim_task, 0, tx_reclaim, eq); txq->ifp = vi->ifp; txq->gl = sglist_alloc(TX_SGL_SEGS, M_WAITOK); - if (sc->flags & IS_VF) + if (vi->flags & TX_USES_VM_WR) txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | V_TXPKT_INTF(pi->tx_chan)); else @@ -4323,6 +4330,8 @@ alloc_txq(struct vi_info *vi, struct sge_txq *txq, int MPASS(nitems(txp->mb) >= sc->params.max_pkts_per_eth_tx_pkts_wr); txq->txp.max_npkt = min(nitems(txp->mb), sc->params.max_pkts_per_eth_tx_pkts_wr); + if (vi->flags & TX_USES_VM_WR && !(sc->flags & IS_VF)) + txq->txp.max_npkt--; snprintf(name, sizeof(name), "%d", idx); oid = SYSCTL_ADD_NODE(&vi->ctx, children, OID_AUTO, name, CTLFLAG_RD, @@ -4632,9 +4641,11 @@ get_pkt_gl(struct mbuf *m, struct sglist *gl) KASSERT(gl->sg_nseg == mbuf_nsegs(m), ("%s: nsegs changed for mbuf %p from %d to %d", __func__, m, mbuf_nsegs(m), gl->sg_nseg)); - KASSERT(gl->sg_nseg > 0 && gl->sg_nseg <= max_nsegs_allowed(m), +#if 0 /* vm_wr not readily available here. */ + KASSERT(gl->sg_nseg > 0 && gl->sg_nseg <= max_nsegs_allowed(m, vm_wr), ("%s: %d segments, should have been 1 <= nsegs <= %d", __func__, - gl->sg_nseg, max_nsegs_allowed(m))); + gl->sg_nseg, max_nsegs_allowed(m, vm_wr))); +#endif } /* @@ -4675,12 +4686,12 @@ txpkt_vm_len16(u_int nsegs, const u_int extra) } static inline void -calculate_mbuf_len16(struct adapter *sc, struct mbuf *m) +calculate_mbuf_len16(struct mbuf *m, bool vm_wr) { const int lso = sizeof(struct cpl_tx_pkt_lso_core); const int tnl_lso = sizeof(struct cpl_tx_tnl_lso); - if (sc->flags & IS_VF) { + if (vm_wr) { if (needs_tso(m)) set_mbuf_len16(m, txpkt_vm_len16(mbuf_nsegs(m), lso)); else @@ -5183,8 +5194,6 @@ add_to_txpkts_vf(struct adapter *sc, struct sge_txq *t int avail, bool *send) { struct txpkts *txp = &txq->txp; - - MPASS(sc->flags & IS_VF); /* Cannot have TSO and coalesce at the same time. */ if (cannot_use_txpkts(m)) { From owner-svn-src-stable-12@freebsd.org Mon Oct 5 18:08:53 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C952342BAC6; Mon, 5 Oct 2020 18:08:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4pWT4qvmz4Hwc; Mon, 5 Oct 2020 18:08:53 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89519195F1; Mon, 5 Oct 2020 18:08:53 +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 095I8r9p093101; Mon, 5 Oct 2020 18:08:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 095I8rXN093099; Mon, 5 Oct 2020 18:08:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202010051808.095I8rXN093099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 5 Oct 2020 18:08:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366452 - in stable: 11/contrib/llvm-project/clang/lib/Basic/Targets 11/contrib/llvm-project/llvm/lib/Target/X86 12/contrib/llvm-project/clang/lib/Basic/Targets 12/contrib/llvm-project/... X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm-project/clang/lib/Basic/Targets 11/contrib/llvm-project/llvm/lib/Target/X86 12/contrib/llvm-project/clang/lib/Basic/Targets 12/contrib/llvm-project/llvm/lib/Target/X86 X-SVN-Commit-Revision: 366452 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 18:08:53 -0000 Author: dim Date: Mon Oct 5 18:08:52 2020 New Revision: 366452 URL: https://svnweb.freebsd.org/changeset/base/366452 Log: Merge commit 0fac1c191 from llvm git (by Craig Topper): [X86] Allow Yz inline assembly constraint to choose ymm0 or zmm0 when avx/avx512 are enabled and type is 256 or 512 bits gcc supports selecting ymm0/zmm0 for the Yz constraint when used with 256 or 512 bit vector types. Fixes PR45806 Differential Revision: https://reviews.llvm.org/D79448 This should fix 'fatal error: error in backend: Cannot select' errors if assertions are disabled, or 'Assertion failed: (isVector() && "Invalid vector type!"), function getVectorNumElements, file /usr/src/contrib/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h, line 276.', when building the audio/lsp-plugins-lv2 port. Direct commit to stable/{11,12} since head has clang 11.0.0, which already includes this fix. Reported by: yuri PR: 232911 Modified: stable/12/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp Changes in other areas also in this revision: Modified: stable/11/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp Modified: stable/12/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp ============================================================================== --- stable/12/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp Mon Oct 5 16:39:38 2020 (r366451) +++ stable/12/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp Mon Oct 5 18:08:52 2020 (r366452) @@ -1772,8 +1772,14 @@ bool X86TargetInfo::validateOperandSize(const llvm::St return Size <= 64; case 'z': case '0': - // XMM0 - if (FeatureMap.lookup("sse")) + // XMM0/YMM/ZMM0 + if (FeatureMap.lookup("avx512f")) + // ZMM0 can be used if target supports AVX512F. + return Size <= 512U; + else if (FeatureMap.lookup("avx")) + // YMM0 can be used if target supports AVX. + return Size <= 256U; + else if (FeatureMap.lookup("sse")) return Size <= 128U; return false; case 'i': Modified: stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp Mon Oct 5 16:39:38 2020 (r366451) +++ stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp Mon Oct 5 18:08:52 2020 (r366452) @@ -46555,7 +46555,9 @@ TargetLowering::ConstraintWeight // XMM0 case 'z': case '0': - if ((type->getPrimitiveSizeInBits() == 128) && Subtarget.hasSSE1()) + if (((type->getPrimitiveSizeInBits() == 128) && Subtarget.hasSSE1()) || + ((type->getPrimitiveSizeInBits() == 256) && Subtarget.hasAVX()) || + ((type->getPrimitiveSizeInBits() == 512) && Subtarget.hasAVX512())) return CW_SpecificReg; return CW_Invalid; // Conditional OpMask regs (AVX512) @@ -47005,6 +47007,8 @@ X86TargetLowering::getRegForInlineAsmConstraint(const if (Subtarget.hasAVX()) return std::make_pair(0U, &X86::VR256RegClass); break; + case MVT::v64i8: + case MVT::v32i16: case MVT::v8f64: case MVT::v16f32: case MVT::v16i32: @@ -47030,7 +47034,42 @@ X86TargetLowering::getRegForInlineAsmConstraint(const case 'z': case '0': if (!Subtarget.hasSSE1()) break; - return std::make_pair(X86::XMM0, &X86::VR128RegClass); + switch (VT.SimpleTy) { + default: break; + // Scalar SSE types. + case MVT::f32: + case MVT::i32: + return std::make_pair(X86::XMM0, &X86::FR32RegClass); + case MVT::f64: + case MVT::i64: + return std::make_pair(X86::XMM0, &X86::FR64RegClass); + case MVT::f128: + case MVT::v16i8: + case MVT::v8i16: + case MVT::v4i32: + case MVT::v2i64: + case MVT::v4f32: + case MVT::v2f64: + return std::make_pair(X86::XMM0, &X86::VR128RegClass); + // AVX types. + case MVT::v32i8: + case MVT::v16i16: + case MVT::v8i32: + case MVT::v4i64: + case MVT::v8f32: + case MVT::v4f64: + if (Subtarget.hasAVX()) + return std::make_pair(X86::YMM0, &X86::VR256RegClass); + break; + case MVT::v8f64: + case MVT::v16f32: + case MVT::v16i32: + case MVT::v8i64: + if (Subtarget.hasAVX512()) + return std::make_pair(X86::ZMM0, &X86::VR512_0_15RegClass); + break; + } + break; case 'k': // This register class doesn't allocate k0 for masked vector operation. if (Subtarget.hasAVX512()) { From owner-svn-src-stable-12@freebsd.org Mon Oct 5 18:45:33 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3598142CB4A; Mon, 5 Oct 2020 18:45:33 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4qKn0VpKz4LcQ; Mon, 5 Oct 2020 18:45:33 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E48E81A330; Mon, 5 Oct 2020 18:45:32 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 095IjWi5017626; Mon, 5 Oct 2020 18:45:32 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 095IjWgk017625; Mon, 5 Oct 2020 18:45:32 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010051845.095IjWgk017625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 18:45:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366455 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 366455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 18:45:33 -0000 Author: np Date: Mon Oct 5 18:45:32 2020 New Revision: 366455 URL: https://svnweb.freebsd.org/changeset/base/366455 Log: MFC r366242: cxgbe(4): fixes for netmap operation with only some queues active. - Only active netmap receive queues should be in the RSS lookup table. - The RSS table should be restored for NIC operation when the last active netmap queue is switched off, not the first one. - Support repeated netmap ON/OFF on a subset of the queues. This works whether the the queues being enabled and disabled are the only ones active or not. Some kring indexes have to be reset in the driver for the second case. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 18:41:35 2020 (r366454) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 18:45:32 2020 (r366455) @@ -347,6 +347,180 @@ free_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq } static int +cxgbe_netmap_simple_rss(struct adapter *sc, struct vi_info *vi, + struct ifnet *ifp, struct netmap_adapter *na) +{ + struct netmap_kring *kring; + struct sge_nm_rxq *nm_rxq; + int rc, i, j, nm_state, defq; + uint16_t *rss; + + /* + * Check if there's at least one active (or about to go active) netmap + * rx queue. + */ + defq = -1; + for_each_nm_rxq(vi, j, nm_rxq) { + nm_state = atomic_load_int(&nm_rxq->nm_state); + kring = na->rx_rings[nm_rxq->nid]; + if ((nm_state != NM_OFF && !nm_kring_pending_off(kring)) || + (nm_state == NM_OFF && nm_kring_pending_on(kring))) { + MPASS(nm_rxq->iq_cntxt_id != INVALID_NM_RXQ_CNTXT_ID); + if (defq == -1) { + defq = nm_rxq->iq_abs_id; + break; + } + } + } + + if (defq == -1) { + /* No active netmap queues. Switch back to NIC queues. */ + rss = vi->rss; + defq = vi->rss[0]; + } else { + for (i = 0; i < vi->rss_size;) { + for_each_nm_rxq(vi, j, nm_rxq) { + nm_state = atomic_load_int(&nm_rxq->nm_state); + kring = na->rx_rings[nm_rxq->nid]; + if ((nm_state != NM_OFF && + !nm_kring_pending_off(kring)) || + (nm_state == NM_OFF && + nm_kring_pending_on(kring))) { + MPASS(nm_rxq->iq_cntxt_id != + INVALID_NM_RXQ_CNTXT_ID); + vi->nm_rss[i++] = nm_rxq->iq_abs_id; + if (i == vi->rss_size) + break; + } + } + } + rss = vi->nm_rss; + } + + rc = -t4_config_rss_range(sc, sc->mbox, vi->viid, 0, vi->rss_size, rss, + vi->rss_size); + if (rc != 0) + if_printf(ifp, "netmap rss_config failed: %d\n", rc); + + rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, defq, 0, 0); + if (rc != 0) { + if_printf(ifp, "netmap defaultq config failed: %d\n", rc); + } + + return (rc); +} + +/* + * Odd number of rx queues work best for split RSS mode as the first queue can + * be dedicated for non-RSS traffic and the rest divided into two equal halves. + */ +static int +cxgbe_netmap_split_rss(struct adapter *sc, struct vi_info *vi, + struct ifnet *ifp, struct netmap_adapter *na) +{ + struct netmap_kring *kring; + struct sge_nm_rxq *nm_rxq; + int rc, i, j, nm_state, defq; + int nactive[2] = {0, 0}; + int dq[2] = {-1, -1}; + bool dq_norss; /* default queue should not be in RSS table. */ + + MPASS(nm_split_rss != 0); + MPASS(vi->nnmrxq > 1); + + for_each_nm_rxq(vi, i, nm_rxq) { + j = i / ((vi->nnmrxq + 1) / 2); + nm_state = atomic_load_int(&nm_rxq->nm_state); + kring = na->rx_rings[nm_rxq->nid]; + if ((nm_state != NM_OFF && !nm_kring_pending_off(kring)) || + (nm_state == NM_OFF && nm_kring_pending_on(kring))) { + MPASS(nm_rxq->iq_cntxt_id != INVALID_NM_RXQ_CNTXT_ID); + nactive[j]++; + if (dq[j] == -1) { + dq[j] = nm_rxq->iq_abs_id; + break; + } + } + } + + if (nactive[0] == 0 || nactive[1] == 0) + return (cxgbe_netmap_simple_rss(sc, vi, ifp, na)); + + MPASS(dq[0] != -1 && dq[1] != -1); + if (nactive[0] > nactive[1]) { + defq = dq[0]; + dq_norss = true; + } else if (nactive[0] < nactive[1]) { + defq = dq[1]; + dq_norss = true; + } else { + defq = dq[0]; + dq_norss = false; + } + + i = 0; + nm_rxq = &sc->sge.nm_rxq[vi->first_nm_rxq]; + while (i < vi->rss_size / 2) { + for (j = 0; j < (vi->nnmrxq + 1) / 2; j++) { + nm_state = atomic_load_int(&nm_rxq[j].nm_state); + kring = na->rx_rings[nm_rxq[j].nid]; + if ((nm_state == NM_OFF && + !nm_kring_pending_on(kring)) || + (nm_state == NM_ON && + nm_kring_pending_off(kring))) { + continue; + } + MPASS(nm_rxq[j].iq_cntxt_id != INVALID_NM_RXQ_CNTXT_ID); + if (dq_norss && defq == nm_rxq[j].iq_abs_id) + continue; + vi->nm_rss[i++] = nm_rxq[j].iq_abs_id; + if (i == vi->rss_size / 2) + break; + } + } + while (i < vi->rss_size) { + for (j = (vi->nnmrxq + 1) / 2; j < vi->nnmrxq; j++) { + nm_state = atomic_load_int(&nm_rxq[j].nm_state); + kring = na->rx_rings[nm_rxq[j].nid]; + if ((nm_state == NM_OFF && + !nm_kring_pending_on(kring)) || + (nm_state == NM_ON && + nm_kring_pending_off(kring))) { + continue; + } + MPASS(nm_rxq[j].iq_cntxt_id != INVALID_NM_RXQ_CNTXT_ID); + if (dq_norss && defq == nm_rxq[j].iq_abs_id) + continue; + vi->nm_rss[i++] = nm_rxq[j].iq_abs_id; + if (i == vi->rss_size) + break; + } + } + + rc = -t4_config_rss_range(sc, sc->mbox, vi->viid, 0, vi->rss_size, + vi->nm_rss, vi->rss_size); + if (rc != 0) + if_printf(ifp, "netmap split_rss_config failed: %d\n", rc); + + rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, defq, 0, 0); + if (rc != 0) + if_printf(ifp, "netmap defaultq config failed: %d\n", rc); + + return (rc); +} + +static inline int +cxgbe_netmap_rss(struct adapter *sc, struct vi_info *vi, struct ifnet *ifp, + struct netmap_adapter *na) +{ + + if (nm_split_rss == 0 || vi->nnmrxq == 1) + return (cxgbe_netmap_simple_rss(sc, vi, ifp, na)); + else + return (cxgbe_netmap_split_rss(sc, vi, ifp, na)); +} + +static int cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi, struct ifnet *ifp, struct netmap_adapter *na) { @@ -354,10 +528,12 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi struct netmap_kring *kring; struct sge_nm_rxq *nm_rxq; struct sge_nm_txq *nm_txq; - int rc, i, j, hwidx, defq, nrssq; + int i, j, hwidx; struct rx_buf_info *rxb; ASSERT_SYNCHRONIZED_OP(sc); + MPASS(vi->nnmrxq > 0); + MPASS(vi->nnmtxq > 0); if ((vi->flags & VI_INIT_DONE) == 0 || (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) @@ -430,72 +606,7 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi M_ZERO | M_WAITOK); } - MPASS(vi->nnmrxq > 0); - if (nm_split_rss == 0 || vi->nnmrxq == 1) { - for (i = 0; i < vi->rss_size;) { - for_each_nm_rxq(vi, j, nm_rxq) { - vi->nm_rss[i++] = nm_rxq->iq_abs_id; - if (i == vi->rss_size) - break; - } - } - defq = vi->nm_rss[0]; - } else { - /* We have multiple queues and we want to split the table. */ - MPASS(nm_split_rss != 0); - MPASS(vi->nnmrxq > 1); - - nm_rxq = &sc->sge.nm_rxq[vi->first_nm_rxq]; - nrssq = vi->nnmrxq; - if (vi->nnmrxq & 1) { - /* - * Odd number of queues. The first rxq is designated the - * default queue, the rest are split evenly. - */ - defq = nm_rxq->iq_abs_id; - nm_rxq++; - nrssq--; - } else { - /* - * Even number of queues split into two halves. The - * first rxq in one of the halves is designated the - * default queue. - */ -#if 1 - /* First rxq in the first half. */ - defq = nm_rxq->iq_abs_id; -#else - /* First rxq in the second half. */ - defq = nm_rxq[vi->nnmrxq / 2].iq_abs_id; -#endif - } - - i = 0; - while (i < vi->rss_size / 2) { - for (j = 0; j < nrssq / 2; j++) { - vi->nm_rss[i++] = nm_rxq[j].iq_abs_id; - if (i == vi->rss_size / 2) - break; - } - } - while (i < vi->rss_size) { - for (j = nrssq / 2; j < nrssq; j++) { - vi->nm_rss[i++] = nm_rxq[j].iq_abs_id; - if (i == vi->rss_size) - break; - } - } - } - rc = -t4_config_rss_range(sc, sc->mbox, vi->viid, 0, vi->rss_size, - vi->nm_rss, vi->rss_size); - if (rc != 0) - if_printf(ifp, "netmap rss_config failed: %d\n", rc); - - rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, defq, 0, 0); - if (rc != 0) - if_printf(ifp, "netmap rss hash/defaultq config failed: %d\n", rc); - - return (rc); + return (cxgbe_netmap_rss(sc, vi, ifp, na)); } static int @@ -503,11 +614,13 @@ cxgbe_netmap_off(struct adapter *sc, struct vi_info *v struct netmap_adapter *na) { struct netmap_kring *kring; - int rc, i; + int rc, i, nm_state, nactive; struct sge_nm_txq *nm_txq; struct sge_nm_rxq *nm_rxq; ASSERT_SYNCHRONIZED_OP(sc); + MPASS(vi->nnmrxq > 0); + MPASS(vi->nnmtxq > 0); if (!nm_netmap_on(na)) return (0); @@ -515,14 +628,10 @@ cxgbe_netmap_off(struct adapter *sc, struct vi_info *v if ((vi->flags & VI_INIT_DONE) == 0) return (0); - rc = -t4_config_rss_range(sc, sc->mbox, vi->viid, 0, vi->rss_size, - vi->rss, vi->rss_size); + /* First remove the queues that are stopping from the RSS table. */ + rc = cxgbe_netmap_rss(sc, vi, ifp, na); if (rc != 0) - if_printf(ifp, "failed to restore RSS config: %d\n", rc); - rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, vi->rss[0], 0, 0); - if (rc != 0) - if_printf(ifp, "failed to restore RSS hash/defaultq: %d\n", rc); - nm_clear_native_flags(na); + return (rc); /* error message logged already. */ for_each_nm_txq(vi, i, nm_txq) { struct sge_qstat *spg = (void *)&nm_txq->desc[nm_txq->sidx]; @@ -541,18 +650,33 @@ cxgbe_netmap_off(struct adapter *sc, struct vi_info *v pause("nmcidx", 1); free_nm_txq_hwq(vi, nm_txq); + + /* XXX: netmap, not the driver, should do this. */ + kring->rhead = kring->rcur = kring->nr_hwcur = 0; + kring->rtail = kring->nr_hwtail = kring->nkr_num_slots - 1; } + nactive = 0; for_each_nm_rxq(vi, i, nm_rxq) { + nm_state = atomic_load_int(&nm_rxq->nm_state); kring = na->rx_rings[nm_rxq->nid]; - if (!nm_kring_pending_off(kring) || - nm_rxq->iq_cntxt_id == INVALID_NM_RXQ_CNTXT_ID) + if (nm_state != NM_OFF && !nm_kring_pending_off(kring)) + nactive++; + if (nm_state == NM_OFF || !nm_kring_pending_off(kring)) continue; + MPASS(nm_rxq->iq_cntxt_id != INVALID_NM_RXQ_CNTXT_ID); while (!atomic_cmpset_int(&nm_rxq->nm_state, NM_ON, NM_OFF)) pause("nmst", 1); free_nm_rxq_hwq(vi, nm_rxq); + + /* XXX: netmap, not the driver, should do this. */ + kring->rhead = kring->rcur = kring->nr_hwcur = 0; + kring->rtail = kring->nr_hwtail = 0; } + netmap_krings_mode_commit(na, 0); + if (nactive == 0) + nm_clear_native_flags(na); return (rc); } From owner-svn-src-stable-12@freebsd.org Mon Oct 5 18:47:12 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B199E42D020; Mon, 5 Oct 2020 18:47:12 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4qMh4HCtz4Lf1; Mon, 5 Oct 2020 18:47:12 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 754E019EE6; Mon, 5 Oct 2020 18:47:12 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 095IlC5l017851; Mon, 5 Oct 2020 18:47:12 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 095IlCRR017850; Mon, 5 Oct 2020 18:47:12 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010051847.095IlCRR017850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 18:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366457 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 366457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 18:47:12 -0000 Author: np Date: Mon Oct 5 18:47:12 2020 New Revision: 366457 URL: https://svnweb.freebsd.org/changeset/base/366457 Log: MFC r366244: cxgbe(4): display an error message when netmap cannot be enabled because the interface is down. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 18:46:14 2020 (r366456) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 18:47:12 2020 (r366457) @@ -536,8 +536,11 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi MPASS(vi->nnmtxq > 0); if ((vi->flags & VI_INIT_DONE) == 0 || - (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + if_printf(ifp, "cannot enable netmap operation because " + "interface is not UP.\n"); return (EAGAIN); + } rxb = &sc->sge.rx_buf_info[0]; for (i = 0; i < SW_ZONE_SIZES; i++, rxb++) { From owner-svn-src-stable-12@freebsd.org Mon Oct 5 18:49:55 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAC9042CD6D; Mon, 5 Oct 2020 18:49:55 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4qQq5wxqz4LvF; Mon, 5 Oct 2020 18:49:55 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEF6C1A037; Mon, 5 Oct 2020 18:49:55 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 095Intld018112; Mon, 5 Oct 2020 18:49:55 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 095IntW9018109; Mon, 5 Oct 2020 18:49:55 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010051849.095IntW9018109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 18:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366458 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 366458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 18:49:56 -0000 Author: np Date: Mon Oct 5 18:49:55 2020 New Revision: 366458 URL: https://svnweb.freebsd.org/changeset/base/366458 Log: MFC r366245: cxgbe(4): adjust the doorbell threshold for netmap freelists to match the maximum burst size used when fetching descriptors from the list. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Mon Oct 5 18:47:12 2020 (r366457) +++ stable/12/sys/dev/cxgbe/adapter.h Mon Oct 5 18:49:55 2020 (r366458) @@ -716,6 +716,7 @@ struct sge_nm_rxq { uint32_t fl_sidx2; /* copy of fl_sidx */ uint32_t fl_db_val; u_int fl_db_saved; + u_int fl_db_threshold; /* in descriptors */ u_int fl_hwidx:4; /* Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 18:47:12 2020 (r366457) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 18:49:55 2020 (r366458) @@ -196,6 +196,9 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq nm_rxq->fl_cntxt_id = be16toh(c.fl0id); nm_rxq->fl_pidx = nm_rxq->fl_cidx = 0; + nm_rxq->fl_db_saved = 0; + /* matches the X_FETCHBURSTMAX_512B or X_FETCHBURSTMAX_256B above. */ + nm_rxq->fl_db_threshold = chip_id(sc) <= CHELSIO_T5 ? 8 : 4; MPASS(nm_rxq->fl_sidx == na->num_rx_desc); cntxt_id = nm_rxq->fl_cntxt_id - sc->sge.eq_start; if (cntxt_id >= sc->sge.neq) { @@ -1063,7 +1066,7 @@ cxgbe_netmap_rxsync(struct netmap_kring *kring, int fl fl_pidx = 0; slot = &ring->slot[0]; } - if (++dbinc == 8 && n >= 32) { + if (++dbinc == nm_rxq->fl_db_threshold) { wmb(); if (starve_fl) nm_rxq->fl_db_saved += dbinc; From owner-svn-src-stable-12@freebsd.org Mon Oct 5 18:59:11 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F1F842D0E8; Mon, 5 Oct 2020 18:59:11 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4qdW1Rxtz4MWL; Mon, 5 Oct 2020 18:59:11 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 107441A602; Mon, 5 Oct 2020 18:59:11 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 095IxAC4024059; Mon, 5 Oct 2020 18:59:10 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 095IxAbo024058; Mon, 5 Oct 2020 18:59:10 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010051859.095IxAbo024058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 18:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366459 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 366459 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 18:59:11 -0000 Author: np Date: Mon Oct 5 18:59:10 2020 New Revision: 366459 URL: https://svnweb.freebsd.org/changeset/base/366459 Log: MFC r366246: Remove duplicate line. Modified: stable/12/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 18:49:55 2020 (r366458) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 18:59:10 2020 (r366459) @@ -216,9 +216,6 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | V_FW_PARAMS_PARAM_YZ(nm_rxq->iq_cntxt_id); - param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | - V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | - V_FW_PARAMS_PARAM_YZ(nm_rxq->iq_cntxt_id); if (cong == 0) val = 1 << 19; else { From owner-svn-src-stable-12@freebsd.org Mon Oct 5 19:22:28 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4E9042DC2F; Mon, 5 Oct 2020 19:22:28 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4r8N5JyHz4PB6; Mon, 5 Oct 2020 19:22:28 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99E561A8AA; Mon, 5 Oct 2020 19:22:28 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 095JMSNh040278; Mon, 5 Oct 2020 19:22:28 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 095JMSFn040277; Mon, 5 Oct 2020 19:22:28 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010051922.095JMSFn040277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 19:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366460 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 366460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 19:22:28 -0000 Author: np Date: Mon Oct 5 19:22:28 2020 New Revision: 366460 URL: https://svnweb.freebsd.org/changeset/base/366460 Log: MFC r366247: cxgbe(4): Avoid unnecessary work in the firmware during netmap tx. Bind the netmap tx queues to a special '0xff' scheduling class which makes the firmware skip some processing related to rate limiting on the outgoing traffic. Future firmwares will do this automatically. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 18:59:10 2020 (r366459) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 19:22:28 2020 (r366460) @@ -329,6 +329,22 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq nm_txq->udb = (volatile void *)udb; } + if (sc->params.fw_vers < FW_VERSION32(1, 25, 1, 0)) { + uint32_t param, val; + + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH) | + V_FW_PARAMS_PARAM_YZ(nm_txq->cntxt_id); + val = 0xff; + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + if (rc != 0) { + device_printf(vi->dev, + "failed to bind netmap txq %d to class 0xff: %d\n", + nm_txq->cntxt_id, rc); + rc = 0; + } + } + return (rc); } From owner-svn-src-stable-12@freebsd.org Mon Oct 5 19:45:12 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4049042E34C; Mon, 5 Oct 2020 19:45:12 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4rfc0m31z4QTM; Mon, 5 Oct 2020 19:45:12 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECBF11ABDE; Mon, 5 Oct 2020 19:45:11 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 095JjB3c055527; Mon, 5 Oct 2020 19:45:11 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 095JjBTh055526; Mon, 5 Oct 2020 19:45:11 GMT (envelope-from np@FreeBSD.org) Message-Id: <202010051945.095JjBTh055526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Oct 2020 19:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366463 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 366463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 19:45:12 -0000 Author: np Date: Mon Oct 5 19:45:11 2020 New Revision: 366463 URL: https://svnweb.freebsd.org/changeset/base/366463 Log: MFC r366354: cxgbe(4): validate largest_rx_cluster and safest_rx_cluster. These tunables can only be set to a valid cluster size (2K, 4K, 9K, or 16K) as documented in the man page. Anything else could lead to a panic on interface up. Reported by: mav@ Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Mon Oct 5 19:38:51 2020 (r366462) +++ stable/12/sys/dev/cxgbe/t4_sge.c Mon Oct 5 19:45:11 2020 (r366463) @@ -538,6 +538,28 @@ t4_sge_modload(void) tscale = 1; } + if (largest_rx_cluster != MCLBYTES && +#if MJUMPAGESIZE != MCLBYTES + largest_rx_cluster != MJUMPAGESIZE && +#endif + largest_rx_cluster != MJUM9BYTES && + largest_rx_cluster != MJUM16BYTES) { + printf("Invalid hw.cxgbe.largest_rx_cluster value (%d)," + " using %d instead.\n", largest_rx_cluster, MJUM16BYTES); + largest_rx_cluster = MJUM16BYTES; + } + + if (safest_rx_cluster != MCLBYTES && +#if MJUMPAGESIZE != MCLBYTES + safest_rx_cluster != MJUMPAGESIZE && +#endif + safest_rx_cluster != MJUM9BYTES && + safest_rx_cluster != MJUM16BYTES) { + printf("Invalid hw.cxgbe.safest_rx_cluster value (%d)," + " using %d instead.\n", safest_rx_cluster, MJUMPAGESIZE); + safest_rx_cluster = MJUMPAGESIZE; + } + extfree_refs = counter_u64_alloc(M_WAITOK); extfree_rels = counter_u64_alloc(M_WAITOK); pullups = counter_u64_alloc(M_WAITOK); From owner-svn-src-stable-12@freebsd.org Tue Oct 6 09:28:25 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2BB642D8FF; Tue, 6 Oct 2020 09:28:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5BwT4l2gz4DVL; Tue, 6 Oct 2020 09:28:25 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BBB6247BF; Tue, 6 Oct 2020 09:28:25 +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 0969SPDm059191; Tue, 6 Oct 2020 09:28:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0969SP1c059189; Tue, 6 Oct 2020 09:28:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202010060928.0969SP1c059189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 6 Oct 2020 09:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366473 - in stable/12/sys: amd64/include x86/include X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: amd64/include x86/include X-SVN-Commit-Revision: 366473 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 09:28:26 -0000 Author: kib Date: Tue Oct 6 09:28:24 2020 New Revision: 366473 URL: https://svnweb.freebsd.org/changeset/base/366473 Log: MFC r366415: Move ctx_switch_xsave declaration to amd64 md_var.h. Modified: stable/12/sys/amd64/include/md_var.h stable/12/sys/x86/include/x86_var.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/include/md_var.h ============================================================================== --- stable/12/sys/amd64/include/md_var.h Tue Oct 6 08:18:09 2020 (r366472) +++ stable/12/sys/amd64/include/md_var.h Tue Oct 6 09:28:24 2020 (r366473) @@ -37,6 +37,7 @@ #include extern uint64_t *vm_page_dump; +extern char ctx_switch_xsave[]; extern int hw_lower_amd64_sharedpage; extern int hw_ibrs_disable; extern int hw_ssb_disable; Modified: stable/12/sys/x86/include/x86_var.h ============================================================================== --- stable/12/sys/x86/include/x86_var.h Tue Oct 6 08:18:09 2020 (r366472) +++ stable/12/sys/x86/include/x86_var.h Tue Oct 6 09:28:24 2020 (r366473) @@ -67,7 +67,6 @@ extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; extern u_int cpu_maxphyaddr; -extern char ctx_switch_xsave[]; extern u_int hv_high; extern char hv_vendor[]; extern char kstack[]; From owner-svn-src-stable-12@freebsd.org Tue Oct 6 14:04:00 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AD4B433FA5; Tue, 6 Oct 2020 14:04:00 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5K2R6lWbz4X0j; Tue, 6 Oct 2020 14:03:59 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBEAD27D9B; Tue, 6 Oct 2020 14:03:59 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 096E3xwO031523; Tue, 6 Oct 2020 14:03:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 096E3x7R031521; Tue, 6 Oct 2020 14:03:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202010061403.096E3x7R031521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 6 Oct 2020 14:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366488 - in stable/12/sys: kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: kern sys X-SVN-Commit-Revision: 366488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 14:04:00 -0000 Author: markj Date: Tue Oct 6 14:03:59 2020 New Revision: 366488 URL: https://svnweb.freebsd.org/changeset/base/366488 Log: MFC r365759-r365765, r365788: Simplify unix domain socket locking. Modified: stable/12/sys/kern/uipc_usrreq.c stable/12/sys/sys/unpcb.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/uipc_usrreq.c ============================================================================== --- stable/12/sys/kern/uipc_usrreq.c Tue Oct 6 13:03:31 2020 (r366487) +++ stable/12/sys/kern/uipc_usrreq.c Tue Oct 6 14:03:59 2020 (r366488) @@ -65,13 +65,13 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include /* XXX must be before */ #include +#include #include #include #include #include +#include #include #include #include @@ -106,9 +106,7 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_FILECAPS); /* - * Locking key: - * (l) Locked using list lock - * (g) Locked using linkage lock + * See unpcb.h for the locking key. */ static uma_zone_t unp_zone; @@ -191,41 +189,32 @@ SYSCTL_INT(_net_local, OID_AUTO, deferred, CTLFLAG_RD, /* * Locking and synchronization: * - * Three types of locks exist in the local domain socket implementation: a - * a global linkage rwlock, the mtxpool lock, and per-unpcb mutexes. - * The linkage lock protects the socket count, global generation number, - * and stream/datagram global lists. + * Several types of locks exist in the local domain socket implementation: + * - a global linkage lock + * - a global connection list lock + * - the mtxpool lock + * - per-unpcb mutexes * - * The mtxpool lock protects the vnode from being modified while referenced. - * Lock ordering requires that it be acquired before any unpcb locks. + * The linkage lock protects the global socket lists, the generation number + * counter and garbage collector state. * - * The unpcb lock (unp_mtx) protects all fields in the unpcb. Of particular - * note is that this includes the unp_conn field. So long as the unpcb lock - * is held the reference to the unpcb pointed to by unp_conn is valid. If we - * require that the unpcb pointed to by unp_conn remain live in cases where - * we need to drop the unp_mtx as when we need to acquire the lock for a - * second unpcb the caller must first acquire an additional reference on the - * second unpcb and then revalidate any state (typically check that unp_conn - * is non-NULL) upon requiring the initial unpcb lock. The lock ordering - * between unpcbs is the conventional ascending address order. Two helper - * routines exist for this: + * The connection list lock protects the list of referring sockets in a datagram + * socket PCB. This lock is also overloaded to protect a global list of + * sockets whose buffers contain socket references in the form of SCM_RIGHTS + * messages. To avoid recursion, such references are released by a dedicated + * thread. * - * - unp_pcb_lock2(unp, unp2) - which just acquires the two locks in the - * safe ordering. + * The mtxpool lock protects the vnode from being modified while referenced. + * Lock ordering rules require that it be acquired before any PCB locks. * - * - unp_pcb_owned_lock2(unp, unp2, freed) - the lock for unp is held - * when called. If unp is unlocked and unp2 is subsequently freed - * freed will be set to 1. + * The unpcb lock (unp_mtx) protects the most commonly referenced fields in the + * unpcb. This includes the unp_conn field, which either links two connected + * PCBs together (for connected socket types) or points at the destination + * socket (for connectionless socket types). The operations of creating or + * destroying a connection therefore involve locking multiple PCBs. To avoid + * lock order reversals, in some cases this involves dropping a PCB lock and + * using a reference counter to maintain liveness. * - * The helper routines for references are: - * - * - unp_pcb_hold(unp): Can be called any time we currently hold a valid - * reference to unp. - * - * - unp_pcb_rele(unp): The caller must hold the unp lock. If we are - * releasing the last reference, detach must have been called thus - * unp->unp_socket be NULL. - * * UNIX domain sockets each have an unpcb hung off of their so_pcb pointer, * allocated in pru_attach() and freed in pru_detach(). The validity of that * pointer is an invariant, so no lock is required to dereference the so_pcb @@ -285,6 +274,7 @@ static struct mtx unp_defers_lock; "unp", "unp", \ MTX_DUPOK|MTX_DEF) #define UNP_PCB_LOCK_DESTROY(unp) mtx_destroy(&(unp)->unp_mtx) +#define UNP_PCB_LOCKPTR(unp) (&(unp)->unp_mtx) #define UNP_PCB_LOCK(unp) mtx_lock(&(unp)->unp_mtx) #define UNP_PCB_TRYLOCK(unp) mtx_trylock(&(unp)->unp_mtx) #define UNP_PCB_UNLOCK(unp) mtx_unlock(&(unp)->unp_mtx) @@ -320,35 +310,43 @@ static void unp_process_defers(void * __unused, int); static void unp_pcb_hold(struct unpcb *unp) { - MPASS(unp->unp_refcount); refcount_acquire(&unp->unp_refcount); } -static int +static __result_use_check bool unp_pcb_rele(struct unpcb *unp) { - int freed; + bool ret; UNP_PCB_LOCK_ASSERT(unp); - MPASS(unp->unp_refcount); - if ((freed = refcount_release(&unp->unp_refcount))) { - /* we got here with having detached? */ - MPASS(unp->unp_socket == NULL); + + if ((ret = refcount_release(&unp->unp_refcount))) { UNP_PCB_UNLOCK(unp); UNP_PCB_LOCK_DESTROY(unp); uma_zfree(unp_zone, unp); } - return (freed); + return (ret); } static void -unp_pcb_lock2(struct unpcb *unp, struct unpcb *unp2) +unp_pcb_rele_notlast(struct unpcb *unp) { - MPASS(unp != unp2); + bool ret __unused; + + ret = refcount_release(&unp->unp_refcount); + KASSERT(!ret, ("%s: unpcb %p has no references", __func__, unp)); +} + +static void +unp_pcb_lock_pair(struct unpcb *unp, struct unpcb *unp2) +{ UNP_PCB_UNLOCK_ASSERT(unp); UNP_PCB_UNLOCK_ASSERT(unp2); - if ((uintptr_t)unp2 > (uintptr_t)unp) { + + if (unp == unp2) { UNP_PCB_LOCK(unp); + } else if ((uintptr_t)unp2 > (uintptr_t)unp) { + UNP_PCB_LOCK(unp); UNP_PCB_LOCK(unp2); } else { UNP_PCB_LOCK(unp2); @@ -356,36 +354,64 @@ unp_pcb_lock2(struct unpcb *unp, struct unpcb *unp2) } } -static __noinline void -unp_pcb_owned_lock2_slowpath(struct unpcb *unp, struct unpcb **unp2p, - int *freed) +static void +unp_pcb_unlock_pair(struct unpcb *unp, struct unpcb *unp2) { + UNP_PCB_UNLOCK(unp); + if (unp != unp2) + UNP_PCB_UNLOCK(unp2); +} + +/* + * Try to lock the connected peer of an already locked socket. In some cases + * this requires that we unlock the current socket. The pairbusy counter is + * used to block concurrent connection attempts while the lock is dropped. The + * caller must be careful to revalidate PCB state. + */ +static struct unpcb * +unp_pcb_lock_peer(struct unpcb *unp) +{ struct unpcb *unp2; - unp2 = *unp2p; + UNP_PCB_LOCK_ASSERT(unp); + unp2 = unp->unp_conn; + if (__predict_false(unp2 == NULL)) + return (NULL); + if (__predict_false(unp == unp2)) + return (unp); + + UNP_PCB_UNLOCK_ASSERT(unp2); + + if (__predict_true(UNP_PCB_TRYLOCK(unp2))) + return (unp2); + if ((uintptr_t)unp2 > (uintptr_t)unp) { + UNP_PCB_LOCK(unp2); + return (unp2); + } + unp->unp_pairbusy++; unp_pcb_hold(unp2); UNP_PCB_UNLOCK(unp); + UNP_PCB_LOCK(unp2); UNP_PCB_LOCK(unp); - *freed = unp_pcb_rele(unp2); - if (*freed) - *unp2p = NULL; + KASSERT(unp->unp_conn == unp2 || unp->unp_conn == NULL, + ("%s: socket %p was reconnected", __func__, unp)); + if (--unp->unp_pairbusy == 0 && (unp->unp_flags & UNP_WAITING) != 0) { + unp->unp_flags &= ~UNP_WAITING; + wakeup(unp); + } + if (unp_pcb_rele(unp2)) { + /* unp2 is unlocked. */ + return (NULL); + } + if (unp->unp_conn == NULL) { + UNP_PCB_UNLOCK(unp2); + return (NULL); + } + return (unp2); } -#define unp_pcb_owned_lock2(unp, unp2, freed) do { \ - freed = 0; \ - UNP_PCB_LOCK_ASSERT(unp); \ - UNP_PCB_UNLOCK_ASSERT(unp2); \ - MPASS((unp) != (unp2)); \ - if (__predict_true(UNP_PCB_TRYLOCK(unp2))) \ - break; \ - else if ((uintptr_t)(unp2) > (uintptr_t)(unp)) \ - UNP_PCB_LOCK(unp2); \ - else \ - unp_pcb_owned_lock2_slowpath((unp), &(unp2), &freed); \ -} while (0) - /* * Definitions of protocols supported in the LOCAL domain. */ @@ -467,18 +493,17 @@ uipc_accept(struct socket *so, struct sockaddr **nam) KASSERT(unp != NULL, ("uipc_accept: unp == NULL")); *nam = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); - UNP_LINK_RLOCK(); - unp2 = unp->unp_conn; - if (unp2 != NULL && unp2->unp_addr != NULL) { - UNP_PCB_LOCK(unp2); - sa = (struct sockaddr *) unp2->unp_addr; - bcopy(sa, *nam, sa->sa_len); - UNP_PCB_UNLOCK(unp2); - } else { + UNP_PCB_LOCK(unp); + unp2 = unp_pcb_lock_peer(unp); + if (unp2 != NULL && unp2->unp_addr != NULL) + sa = (struct sockaddr *)unp2->unp_addr; + else sa = &sun_noname; - bcopy(sa, *nam, sa->sa_len); - } - UNP_LINK_RUNLOCK(); + bcopy(sa, *nam, sa->sa_len); + if (unp2 != NULL) + unp_pcb_unlock_pair(unp, unp2); + else + UNP_PCB_UNLOCK(unp); return (0); } @@ -522,7 +547,7 @@ uipc_attach(struct socket *so, int proto, struct threa UNP_PCB_LOCK_INIT(unp); unp->unp_socket = so; so->so_pcb = unp; - unp->unp_refcount = 1; + refcount_init(&unp->unp_refcount, 1); if ((locked = UNP_LINK_WOWNED()) == false) UNP_LINK_WLOCK(); @@ -699,7 +724,7 @@ uipc_close(struct socket *so) struct unpcb *unp, *unp2; struct vnode *vp = NULL; struct mtx *vplock; - int freed; + unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_close: unp == NULL")); @@ -718,18 +743,9 @@ uipc_close(struct socket *so) VOP_UNP_DETACH(vp); unp->unp_vnode = NULL; } - unp2 = unp->unp_conn; - unp_pcb_hold(unp); - if (__predict_false(unp == unp2)) { + if ((unp2 = unp_pcb_lock_peer(unp)) != NULL) unp_disconnect(unp, unp2); - } else if (unp2 != NULL) { - unp_pcb_hold(unp2); - unp_pcb_owned_lock2(unp, unp2, freed); - unp_disconnect(unp, unp2); - if (unp_pcb_rele(unp2) == 0) - UNP_PCB_UNLOCK(unp2); - } - if (unp_pcb_rele(unp) == 0) + else UNP_PCB_UNLOCK(unp); if (vp) { mtx_unlock(vplock); @@ -747,14 +763,9 @@ uipc_connect2(struct socket *so1, struct socket *so2) KASSERT(unp != NULL, ("uipc_connect2: unp == NULL")); unp2 = so2->so_pcb; KASSERT(unp2 != NULL, ("uipc_connect2: unp2 == NULL")); - if (unp != unp2) - unp_pcb_lock2(unp, unp2); - else - UNP_PCB_LOCK(unp); + unp_pcb_lock_pair(unp, unp2); error = unp_connect2(so1, so2, PRU_CONNECT2); - if (unp != unp2) - UNP_PCB_UNLOCK(unp2); - UNP_PCB_UNLOCK(unp); + unp_pcb_unlock_pair(unp, unp2); return (error); } @@ -764,14 +775,13 @@ uipc_detach(struct socket *so) struct unpcb *unp, *unp2; struct mtx *vplock; struct vnode *vp; - int freeunp, local_unp_rights; + int local_unp_rights; unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_detach: unp == NULL")); vp = NULL; vplock = NULL; - local_unp_rights = 0; SOCK_LOCK(so); if (!SOLISTENING(so)) { @@ -808,24 +818,11 @@ uipc_detach(struct socket *so) VOP_UNP_DETACH(vp); unp->unp_vnode = NULL; } - if (__predict_false(unp == unp->unp_conn)) { - unp_disconnect(unp, unp); - unp2 = NULL; - } else { - if ((unp2 = unp->unp_conn) != NULL) { - unp_pcb_owned_lock2(unp, unp2, freeunp); - if (freeunp) - unp2 = NULL; - } - unp_pcb_hold(unp); - if (unp2 != NULL) { - unp_pcb_hold(unp2); - unp_disconnect(unp, unp2); - if (unp_pcb_rele(unp2) == 0) - UNP_PCB_UNLOCK(unp2); - } - } - UNP_PCB_UNLOCK(unp); + if ((unp2 = unp_pcb_lock_peer(unp)) != NULL) + unp_disconnect(unp, unp2); + else + UNP_PCB_UNLOCK(unp); + UNP_REF_LIST_LOCK(); while (!LIST_EMPTY(&unp->unp_refs)) { struct unpcb *ref = LIST_FIRST(&unp->unp_refs); @@ -838,11 +835,9 @@ uipc_detach(struct socket *so) unp_drop(ref); UNP_REF_LIST_LOCK(); } - UNP_REF_LIST_UNLOCK(); + UNP_PCB_LOCK(unp); - freeunp = unp_pcb_rele(unp); - MPASS(freeunp == 0); local_unp_rights = unp_rights; unp->unp_socket->so_pcb = NULL; unp->unp_socket = NULL; @@ -862,30 +857,15 @@ static int uipc_disconnect(struct socket *so) { struct unpcb *unp, *unp2; - int freed; unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_disconnect: unp == NULL")); UNP_PCB_LOCK(unp); - if ((unp2 = unp->unp_conn) == NULL) { + if ((unp2 = unp_pcb_lock_peer(unp)) != NULL) + unp_disconnect(unp, unp2); + else UNP_PCB_UNLOCK(unp); - return (0); - } - if (__predict_true(unp != unp2)) { - unp_pcb_owned_lock2(unp, unp2, freed); - if (__predict_false(freed)) { - UNP_PCB_UNLOCK(unp); - return (0); - } - unp_pcb_hold(unp2); - } - unp_pcb_hold(unp); - unp_disconnect(unp, unp2); - if (unp_pcb_rele(unp) == 0) - UNP_PCB_UNLOCK(unp); - if ((unp != unp2) && unp_pcb_rele(unp2) == 0) - UNP_PCB_UNLOCK(unp2); return (0); } @@ -1004,28 +984,6 @@ uipc_rcvd(struct socket *so, int flags) } static int -connect_internal(struct socket *so, struct sockaddr *nam, struct thread *td) -{ - int error; - struct unpcb *unp; - - unp = so->so_pcb; - if (unp->unp_conn != NULL) - return (EISCONN); - error = unp_connect(so, nam, td); - if (error) - return (error); - UNP_PCB_LOCK(unp); - if (unp->unp_conn == NULL) { - UNP_PCB_UNLOCK(unp); - if (error == 0) - error = ENOTCONN; - } - return (error); -} - - -static int uipc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, struct mbuf *control, struct thread *td) { @@ -1055,57 +1013,26 @@ uipc_send(struct socket *so, int flags, struct mbuf *m const struct sockaddr *from; if (nam != NULL) { - /* - * We return with UNP_PCB_LOCK_HELD so we know that - * the reference is live if the pointer is valid. - */ - if ((error = connect_internal(so, nam, td))) + error = unp_connect(so, nam, td); + if (error != 0) break; - MPASS(unp->unp_conn != NULL); - unp2 = unp->unp_conn; - } else { - UNP_PCB_LOCK(unp); - - /* - * Because connect() and send() are non-atomic in a sendto() - * with a target address, it's possible that the socket will - * have disconnected before the send() can run. In that case - * return the slightly counter-intuitive but otherwise - * correct error that the socket is not connected. - */ - if ((unp2 = unp->unp_conn) == NULL) { - UNP_PCB_UNLOCK(unp); - error = ENOTCONN; - break; - } } - if (__predict_false(unp == unp2)) { - if (unp->unp_socket == NULL) { - error = ENOTCONN; - break; - } - goto connect_self; - } - unp_pcb_owned_lock2(unp, unp2, freed); - if (__predict_false(freed)) { - UNP_PCB_UNLOCK(unp); - error = ENOTCONN; - break; - } + UNP_PCB_LOCK(unp); + /* - * The socket referencing unp2 may have been closed - * or unp may have been disconnected if the unp lock - * was dropped to acquire unp2. + * Because connect() and send() are non-atomic in a sendto() + * with a target address, it's possible that the socket will + * have disconnected before the send() can run. In that case + * return the slightly counter-intuitive but otherwise + * correct error that the socket is not connected. */ - if (__predict_false(unp->unp_conn == NULL) || - unp2->unp_socket == NULL) { + unp2 = unp_pcb_lock_peer(unp); + if (unp2 == NULL) { UNP_PCB_UNLOCK(unp); - if (unp_pcb_rele(unp2) == 0) - UNP_PCB_UNLOCK(unp2); error = ENOTCONN; break; } - connect_self: + if (unp2->unp_flags & UNP_WANTCRED) control = unp_addsockcred(td, control); if (unp->unp_addr != NULL) @@ -1125,9 +1052,8 @@ uipc_send(struct socket *so, int flags, struct mbuf *m } if (nam != NULL) unp_disconnect(unp, unp2); - if (__predict_true(unp != unp2)) - UNP_PCB_UNLOCK(unp2); - UNP_PCB_UNLOCK(unp); + else + unp_pcb_unlock_pair(unp, unp2); break; } @@ -1135,36 +1061,26 @@ uipc_send(struct socket *so, int flags, struct mbuf *m case SOCK_STREAM: if ((so->so_state & SS_ISCONNECTED) == 0) { if (nam != NULL) { - error = connect_internal(so, nam, td); + error = unp_connect(so, nam, td); if (error != 0) break; } else { error = ENOTCONN; break; } - } else { - UNP_PCB_LOCK(unp); } - if ((unp2 = unp->unp_conn) == NULL) { + UNP_PCB_LOCK(unp); + if ((unp2 = unp_pcb_lock_peer(unp)) == NULL) { UNP_PCB_UNLOCK(unp); error = ENOTCONN; break; } else if (so->so_snd.sb_state & SBS_CANTSENDMORE) { - UNP_PCB_UNLOCK(unp); + unp_pcb_unlock_pair(unp, unp2); error = EPIPE; break; - } else if ((unp2 = unp->unp_conn) == NULL) { - UNP_PCB_UNLOCK(unp); - error = ENOTCONN; - break; } - unp_pcb_owned_lock2(unp, unp2, freed); UNP_PCB_UNLOCK(unp); - if (__predict_false(freed)) { - error = ENOTCONN; - break; - } if ((so2 = unp2->unp_socket) == NULL) { UNP_PCB_UNLOCK(unp2); error = ENOTCONN; @@ -1299,30 +1215,19 @@ uipc_ready(struct socket *so, struct mbuf *m, int coun ("%s: unexpected socket type for %p", __func__, so)); UNP_PCB_LOCK(unp); - if ((unp2 = unp->unp_conn) == NULL) { + if ((unp2 = unp_pcb_lock_peer(unp)) != NULL) { UNP_PCB_UNLOCK(unp); - goto search; + so2 = unp2->unp_socket; + SOCKBUF_LOCK(&so2->so_rcv); + if ((error = sbready(&so2->so_rcv, m, count)) == 0) + sorwakeup_locked(so2); + else + SOCKBUF_UNLOCK(&so2->so_rcv); + UNP_PCB_UNLOCK(unp2); + return (error); } - if (unp != unp2) { - if (UNP_PCB_TRYLOCK(unp2) == 0) { - unp_pcb_hold(unp2); - UNP_PCB_UNLOCK(unp); - UNP_PCB_LOCK(unp2); - if (unp_pcb_rele(unp2)) - goto search; - } else - UNP_PCB_UNLOCK(unp); - } - so2 = unp2->unp_socket; - SOCKBUF_LOCK(&so2->so_rcv); - if ((error = sbready(&so2->so_rcv, m, count)) == 0) - sorwakeup_locked(so2); - else - SOCKBUF_UNLOCK(&so2->so_rcv); - UNP_PCB_UNLOCK(unp2); - return (error); + UNP_PCB_UNLOCK(unp); -search: /* * The receiving socket has been disconnected, but may still be valid. * In this case, the now-ready mbufs are still present in its socket @@ -1565,7 +1470,8 @@ static int unp_connectat(int fd, struct socket *so, struct sockaddr *nam, struct thread *td) { - struct sockaddr_un *soun = (struct sockaddr_un *)nam; + struct mtx *vplock; + struct sockaddr_un *soun; struct vnode *vp; struct socket *so2; struct unpcb *unp, *unp2, *unp3; @@ -1573,8 +1479,8 @@ unp_connectat(int fd, struct socket *so, struct sockad char buf[SOCK_MAXADDRLEN]; struct sockaddr *sa; cap_rights_t rights; - int error, len, freed; - struct mtx *vplock; + int error, len; + bool connreq; if (nam->sa_family != AF_UNIX) return (EAFNOSUPPORT); @@ -1583,19 +1489,48 @@ unp_connectat(int fd, struct socket *so, struct sockad len = nam->sa_len - offsetof(struct sockaddr_un, sun_path); if (len <= 0) return (EINVAL); + soun = (struct sockaddr_un *)nam; bcopy(soun->sun_path, buf, len); buf[len] = 0; unp = sotounpcb(so); UNP_PCB_LOCK(unp); - if (unp->unp_flags & UNP_CONNECTING) { - UNP_PCB_UNLOCK(unp); - return (EALREADY); + for (;;) { + /* + * Wait for connection state to stabilize. If a connection + * already exists, give up. For datagram sockets, which permit + * multiple consecutive connect(2) calls, upper layers are + * responsible for disconnecting in advance of a subsequent + * connect(2), but this is not synchronized with PCB connection + * state. + * + * Also make sure that no threads are currently attempting to + * lock the peer socket, to ensure that unp_conn cannot + * transition between two valid sockets while locks are dropped. + */ + if (unp->unp_conn != NULL) { + UNP_PCB_UNLOCK(unp); + return (EISCONN); + } + if ((unp->unp_flags & UNP_CONNECTING) != 0) { + UNP_PCB_UNLOCK(unp); + return (EALREADY); + } + if (unp->unp_pairbusy > 0) { + unp->unp_flags |= UNP_WAITING; + mtx_sleep(unp, UNP_PCB_LOCKPTR(unp), 0, "unpeer", 0); + continue; + } + break; } unp->unp_flags |= UNP_CONNECTING; UNP_PCB_UNLOCK(unp); - sa = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); + connreq = (so->so_proto->pr_flags & PR_CONNREQUIRED) != 0; + if (connreq) + sa = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); + else + sa = NULL; NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, UIO_SYSSPACE, buf, fd, cap_rights_init(&rights, CAP_CONNECTAT), td); error = namei(&nd); @@ -1636,7 +1571,7 @@ unp_connectat(int fd, struct socket *so, struct sockad error = EPROTOTYPE; goto bad2; } - if (so->so_proto->pr_flags & PR_CONNREQUIRED) { + if (connreq) { if (so2->so_options & SO_ACCEPTCONN) { CURVNET_SET(so2->so_vnet); so2 = sonewconn(so2, 0); @@ -1648,7 +1583,7 @@ unp_connectat(int fd, struct socket *so, struct sockad goto bad2; } unp3 = sotounpcb(so2); - unp_pcb_lock2(unp2, unp3); + unp_pcb_lock_pair(unp2, unp3); if (unp2->unp_addr != NULL) { bcopy(unp2->unp_addr, sa, unp2->unp_addr->sun_len); unp3->unp_addr = (struct sockaddr_un *) sa; @@ -1659,29 +1594,24 @@ unp_connectat(int fd, struct socket *so, struct sockad UNP_PCB_UNLOCK(unp2); unp2 = unp3; - unp_pcb_owned_lock2(unp2, unp, freed); - if (__predict_false(freed)) { - UNP_PCB_UNLOCK(unp2); - error = ECONNREFUSED; - goto bad2; - } + + /* + * It is safe to block on the PCB lock here since unp2 is + * nascent and cannot be connected to any other sockets. + */ + UNP_PCB_LOCK(unp); #ifdef MAC mac_socketpeer_set_from_socket(so, so2); mac_socketpeer_set_from_socket(so2, so); #endif } else { - if (unp == unp2) - UNP_PCB_LOCK(unp); - else - unp_pcb_lock2(unp, unp2); + unp_pcb_lock_pair(unp, unp2); } KASSERT(unp2 != NULL && so2 != NULL && unp2->unp_socket == so2 && sotounpcb(so2) == unp2, ("%s: unp2 %p so2 %p", __func__, unp2, so2)); error = unp_connect2(so, so2, PRU_CONNECT); - if (unp != unp2) - UNP_PCB_UNLOCK(unp2); - UNP_PCB_UNLOCK(unp); + unp_pcb_unlock_pair(unp, unp2); bad2: mtx_unlock(vplock); bad: @@ -1690,6 +1620,8 @@ bad: } free(sa, M_SONAME); UNP_PCB_LOCK(unp); + KASSERT((unp->unp_flags & UNP_CONNECTING) != 0, + ("%s: unp %p has UNP_CONNECTING clear", __func__, unp)); unp->unp_flags &= ~UNP_CONNECTING; UNP_PCB_UNLOCK(unp); return (error); @@ -1729,6 +1661,8 @@ unp_connect2(struct socket *so, struct socket *so2, in UNP_PCB_LOCK_ASSERT(unp); UNP_PCB_LOCK_ASSERT(unp2); + KASSERT(unp->unp_conn == NULL, + ("%s: socket %p is already connected", __func__, unp)); if (so2->so_type != so->so_type) return (EPROTOTYPE); @@ -1745,6 +1679,8 @@ unp_connect2(struct socket *so, struct socket *so2, in case SOCK_STREAM: case SOCK_SEQPACKET: + KASSERT(unp2->unp_conn == NULL, + ("%s: socket %p is already connected", __func__, unp2)); unp2->unp_conn = unp; if (req == PRU_CONNECT && ((unp->unp_flags | unp2->unp_flags) & UNP_CONNWAIT)) @@ -1764,23 +1700,29 @@ static void unp_disconnect(struct unpcb *unp, struct unpcb *unp2) { struct socket *so, *so2; - int freed __unused; +#ifdef INVARIANTS + struct unpcb *unptmp; +#endif - KASSERT(unp2 != NULL, ("unp_disconnect: unp2 == NULL")); - UNP_PCB_LOCK_ASSERT(unp); UNP_PCB_LOCK_ASSERT(unp2); + KASSERT(unp->unp_conn == unp2, + ("%s: unpcb %p is not connected to %p", __func__, unp, unp2)); - if (unp->unp_conn == NULL && unp2->unp_conn == NULL) - return; - - MPASS(unp->unp_conn == unp2); unp->unp_conn = NULL; so = unp->unp_socket; so2 = unp2->unp_socket; switch (unp->unp_socket->so_type) { case SOCK_DGRAM: UNP_REF_LIST_LOCK(); +#ifdef INVARIANTS + LIST_FOREACH(unptmp, &unp2->unp_refs, unp_reflink) { + if (unptmp == unp) + break; + } + KASSERT(unptmp != NULL, + ("%s: %p not found in reflist of %p", __func__, unp, unp2)); +#endif LIST_REMOVE(unp, unp_reflink); UNP_REF_LIST_UNLOCK(); if (so) { @@ -1800,10 +1742,17 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2) soisdisconnected(so2); break; } - freed = unp_pcb_rele(unp); - MPASS(freed == 0); - freed = unp_pcb_rele(unp2); - MPASS(freed == 0); + + if (unp == unp2) { + unp_pcb_rele_notlast(unp); + if (!unp_pcb_rele(unp)) + UNP_PCB_UNLOCK(unp); + } else { + if (!unp_pcb_rele(unp)) + UNP_PCB_UNLOCK(unp); + if (!unp_pcb_rele(unp2)) + UNP_PCB_UNLOCK(unp2); + } } /* @@ -1822,7 +1771,7 @@ unp_pcblist(SYSCTL_HANDLER_ARGS) struct unp_head *head; struct xunpcb *xu; u_int i; - int error, freeunp, n; + int error, n; switch ((intptr_t)arg1) { case SOCK_STREAM: @@ -1899,9 +1848,10 @@ unp_pcblist(SYSCTL_HANDLER_ARGS) for (i = 0; i < n; i++) { unp = unp_list[i]; UNP_PCB_LOCK(unp); - freeunp = unp_pcb_rele(unp); + if (unp_pcb_rele(unp)) + continue; - if (freeunp == 0 && unp->unp_gencnt <= gencnt) { + if (unp->unp_gencnt <= gencnt) { xu->xu_len = sizeof *xu; xu->xu_unpp = (uintptr_t)unp; /* @@ -1928,8 +1878,9 @@ unp_pcblist(SYSCTL_HANDLER_ARGS) sotoxsocket(unp->unp_socket, &xu->xu_socket); UNP_PCB_UNLOCK(unp); error = SYSCTL_OUT(req, xu, sizeof *xu); - } else if (freeunp == 0) + } else { UNP_PCB_UNLOCK(unp); + } } free(xu, M_TEMP); if (!error) { @@ -1982,30 +1933,23 @@ unp_drop(struct unpcb *unp) { struct socket *so = unp->unp_socket; struct unpcb *unp2; - int freed; /* * Regardless of whether the socket's peer dropped the connection * with this socket by aborting or disconnecting, POSIX requires * that ECONNRESET is returned. */ - /* acquire a reference so that unp isn't freed from underneath us */ UNP_PCB_LOCK(unp); if (so) so->so_error = ECONNRESET; - unp2 = unp->unp_conn; - if (unp2 == unp) { + if ((unp2 = unp_pcb_lock_peer(unp)) != NULL) { + /* Last reference dropped in unp_disconnect(). */ + unp_pcb_rele_notlast(unp); unp_disconnect(unp, unp2); - } else if (unp2 != NULL) { - unp_pcb_hold(unp2); - unp_pcb_owned_lock2(unp, unp2, freed); - unp_disconnect(unp, unp2); - if (unp_pcb_rele(unp2) == 0) - UNP_PCB_UNLOCK(unp2); - } - if (unp_pcb_rele(unp) == 0) + } else if (!unp_pcb_rele(unp)) { UNP_PCB_UNLOCK(unp); + } } static void @@ -2143,18 +2087,44 @@ unp_zone_change(void *tag) uma_zone_set_max(unp_zone, maxsockets); } +#ifdef INVARIANTS static void +unp_zdtor(void *mem, int size __unused, void *arg __unused) +{ + struct unpcb *unp; + + unp = mem; + + KASSERT(LIST_EMPTY(&unp->unp_refs), + ("%s: unpcb %p has lingering refs", __func__, unp)); + KASSERT(unp->unp_socket == NULL, + ("%s: unpcb %p has socket backpointer", __func__, unp)); + KASSERT(unp->unp_vnode == NULL, + ("%s: unpcb %p has vnode references", __func__, unp)); + KASSERT(unp->unp_conn == NULL, + ("%s: unpcb %p is still connected", __func__, unp)); + KASSERT(unp->unp_addr == NULL, + ("%s: unpcb %p has leaked addr", __func__, unp)); +} +#endif + +static void unp_init(void) { + uma_dtor dtor; #ifdef VIMAGE if (!IS_DEFAULT_VNET(curvnet)) return; #endif - unp_zone = uma_zcreate("unpcb", sizeof(struct unpcb), NULL, NULL, + +#ifdef INVARIANTS + dtor = unp_zdtor; +#else + dtor = NULL; +#endif + unp_zone = uma_zcreate("unpcb", sizeof(struct unpcb), NULL, dtor, NULL, NULL, UMA_ALIGN_CACHE, 0); - if (unp_zone == NULL) - panic("unp_init"); uma_zone_set_max(unp_zone, maxsockets); uma_zone_set_warning(unp_zone, "kern.ipc.maxsockets limit reached"); EVENTHANDLER_REGISTER(maxsockets_change, unp_zone_change, Modified: stable/12/sys/sys/unpcb.h ============================================================================== --- stable/12/sys/sys/unpcb.h Tue Oct 6 13:03:31 2020 (r366487) +++ stable/12/sys/sys/unpcb.h Tue Oct 6 14:03:59 2020 (r366488) @@ -65,28 +65,37 @@ typedef uint64_t unp_gen_t; * Stream sockets keep copies of receive sockbuf sb_cc and sb_mbcnt * so that changes in the sockbuf may be computed to modify * back pressure on the sender accordingly. + * + * Locking key: + * (a) Atomic + * (c) Constant + * (g) Locked using linkage lock + * (l) Locked using list lock + * (p) Locked using pcb lock */ LIST_HEAD(unp_head, unpcb); struct unpcb { /* Cache line 1 */ - struct mtx unp_mtx; /* mutex */ - struct unpcb *unp_conn; /* control block of connected socket */ - volatile u_int unp_refcount; - short unp_flags; /* flags */ - short unp_gcflag; /* Garbage collector flags. */ - struct sockaddr_un *unp_addr; /* bound address of socket */ - struct socket *unp_socket; /* pointer back to socket */ + struct mtx unp_mtx; /* PCB mutex */ + struct unpcb *unp_conn; /* (p) connected socket */ + volatile u_int unp_refcount; /* (a, p) atomic refcount */ + short unp_flags; /* (p) PCB flags */ + short unp_gcflag; /* (g) Garbage collector flags */ + struct sockaddr_un *unp_addr; /* (p) bound address of socket */ + struct socket *unp_socket; /* (c) pointer back to socket */ /* Cache line 2 */ - struct vnode *unp_vnode; /* if associated with file */ - struct xucred unp_peercred; /* peer credentials, if applicable */ - LIST_ENTRY(unpcb) unp_reflink; /* link in unp_refs list */ - LIST_ENTRY(unpcb) unp_link; /* glue on list of all PCBs */ - struct unp_head unp_refs; /* referencing socket linked list */ - unp_gen_t unp_gencnt; /* generation count of this instance */ - struct file *unp_file; /* back-pointer to file for gc. */ - u_int unp_msgcount; /* references from message queue */ - ino_t unp_ino; /* fake inode number */ + u_int unp_pairbusy; /* (p) threads acquiring peer locks */ + struct vnode *unp_vnode; /* (p) associated file if applicable */ + struct xucred unp_peercred; /* (p) peer credentials if applicable */ + LIST_ENTRY(unpcb) unp_reflink; /* (l) link in unp_refs list */ + LIST_ENTRY(unpcb) unp_link; /* (g) glue on list of all PCBs */ + struct unp_head unp_refs; /* (l) referencing socket linked list */ + unp_gen_t unp_gencnt; /* (g) generation count of this item */ + struct file *unp_file; /* (g) back-pointer to file for gc */ + u_int unp_msgcount; /* (g) references from message queue */ + ino_t unp_ino; /* (g) fake inode number */ + LIST_ENTRY(unpcb) unp_dead; /* (g) link in dead list */ } __aligned(CACHE_LINE_SIZE); /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Tue Oct 6 19:10:33 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D068E4397E7; Tue, 6 Oct 2020 19:10:33 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5Rr95DhWz3YkQ; Tue, 6 Oct 2020 19:10:33 +0000 (UTC) (envelope-from vmaffione@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9780CB674; Tue, 6 Oct 2020 19:10:33 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 096JAXrY015995; Tue, 6 Oct 2020 19:10:33 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 096JAXBl015993; Tue, 6 Oct 2020 19:10:33 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202010061910.096JAXBl015993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 6 Oct 2020 19:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366495 - stable/12/tools/tools/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/tools/tools/netmap X-SVN-Commit-Revision: 366495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 19:10:33 -0000 Author: vmaffione Date: Tue Oct 6 19:10:32 2020 New Revision: 366495 URL: https://svnweb.freebsd.org/changeset/base/366495 Log: MFC r366387 netmap: pkt-gen: minor corrections to documentation Submitted by: Brian Poole Modified: stable/12/tools/tools/netmap/pkt-gen.8 stable/12/tools/tools/netmap/pkt-gen.c Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/netmap/pkt-gen.8 ============================================================================== --- stable/12/tools/tools/netmap/pkt-gen.8 Tue Oct 6 18:13:15 2020 (r366494) +++ stable/12/tools/tools/netmap/pkt-gen.8 Tue Oct 6 19:10:32 2020 (r366495) @@ -95,7 +95,7 @@ for server-side ping-pong operation. .It Fl n Ar count Number of iterations of the .Nm -function, with 0 meaning infinite). +function (with 0 meaning infinite). In case of .Cm tx or @@ -147,10 +147,10 @@ is larger than one, each thread handles a single TX ri .Cm tx mode), a single RX ring (in .Cm rx -mode), or a TX/RX ring couple. +mode), or a TX/RX ring pair. The number of .Ar threads -must be less or equal than the number of TX (or RX) ring available +must be less than or equal to the number of TX (or RX) ring available in the device specified by .Ar interface . .It Fl T Ar report_ms @@ -158,7 +158,7 @@ Number of milliseconds between reports. .It Fl w Ar wait_for_link_time Number of seconds to wait before starting the .Nm -function, useuful to make sure that the network link is up. +function, useful to make sure that the network link is up. A network device driver may take some time to enter netmap mode, or to create a new transmit/receive ring pair when .Xr netmap 4 @@ -168,7 +168,7 @@ Packet transmission rate. Not setting the packet transmission rate tells .Nm to transmit packets as quickly as possible. -On servers from 2010 on-wards +On servers from 2010 onward .Xr netmap 4 is able to completely use all of the bandwidth of a 10 or 40Gbps link, so this option should be used unless your intention is to saturate the link. @@ -231,7 +231,7 @@ This adds 4 bytes of CRC and 20 bytes of framing to ea .It Fl C Ar tx_slots Ns Oo Cm \&, Ns Ar rx_slots Ns Oo Cm \&, Ns Ar tx_rings Ns Oo Cm \&, Ns Ar rx_rings Oc Oc Oc Configuration in terms of number of rings and slots to be used when opening the netmap port. -Such configuration has effect on software ports +Such configuration has an effect on software ports created on the fly, such as VALE ports and netmap pipes. The configuration may consist of 1 to 4 numbers separated by commas: .Dq tx_slots,rx_slots,tx_rings,rx_rings . Modified: stable/12/tools/tools/netmap/pkt-gen.c ============================================================================== --- stable/12/tools/tools/netmap/pkt-gen.c Tue Oct 6 18:13:15 2020 (r366494) +++ stable/12/tools/tools/netmap/pkt-gen.c Tue Oct 6 19:10:32 2020 (r366495) @@ -275,7 +275,7 @@ struct glob_arg { #define OPT_TS 16 /* add a timestamp */ #define OPT_INDIRECT 32 /* use indirect buffers, tx only */ #define OPT_DUMP 64 /* dump rx/tx traffic */ -#define OPT_RUBBISH 256 /* send wathever the buffers contain */ +#define OPT_RUBBISH 256 /* send whatever the buffers contain */ #define OPT_RANDOM_SRC 512 #define OPT_RANDOM_DST 1024 #define OPT_PPS_STATS 2048 @@ -2360,7 +2360,7 @@ usage(int errcode) " for client-side ping-pong operation, and pong for server-side ping-pong operation.\n" "\n" " -n count\n" -" Number of iterations of the pkt-gen function, with 0 meaning infinite). In case of tx or rx,\n" +" Number of iterations of the pkt-gen function (with 0 meaning infinite). In case of tx or rx,\n" " count is the number of packets to receive or transmit. In case of ping or pong, count is the\n" " number of ping-pong transactions.\n" "\n" @@ -2397,20 +2397,20 @@ usage(int errcode) " -p threads\n" " Number of threads to use. By default, only a single thread is used to handle all the netmap\n" " rings. If threads is larger than one, each thread handles a single TX ring (in tx mode), a\n" -" single RX ring (in rx mode), or a TX/RX ring couple. The number of threads must be less or\n" -" equal than the number of TX (or RX) ring available in the device specified by interface.\n" +" single RX ring (in rx mode), or a TX/RX ring pair. The number of threads must be less than or\n" +" equal to the number of TX (or RX) rings available in the device specified by interface.\n" "\n" " -T report_ms\n" " Number of milliseconds between reports.\n" "\n" " -w wait_for_link_time\n" -" Number of seconds to wait before starting the pkt-gen function, useuful to make sure that the\n" +" Number of seconds to wait before starting the pkt-gen function, useful to make sure that the\n" " network link is up. A network device driver may take some time to enter netmap mode, or to\n" " create a new transmit/receive ring pair when netmap(4) requests one.\n" "\n" " -R rate\n" " Packet transmission rate. Not setting the packet transmission rate tells pkt-gen to transmit\n" -" packets as quickly as possible. On servers from 2010 on-wards netmap(4) is able to com-\n" +" packets as quickly as possible. On servers from 2010 onward netmap(4) is able to com-\n" " pletely use all of the bandwidth of a 10 or 40Gbps link, so this option should be used unless\n" " your intention is to saturate the link.\n" "\n" @@ -2456,7 +2456,7 @@ usage(int errcode) "\n" " -C tx_slots[,rx_slots[,tx_rings[,rx_rings]]]\n" " Configuration in terms of number of rings and slots to be used when opening the netmap port.\n" -" Such configuration has effect on software ports created on the fly, such as VALE ports and\n" +" Such configuration has an effect on software ports created on the fly, such as VALE ports and\n" " netmap pipes. The configuration may consist of 1 to 4 numbers separated by commas: tx_slots,\n" " rx_slots, tx_rings, rx_rings. Missing numbers or zeroes stand for default values. As an\n" " additional convenience, if exactly one number is specified, then this is assigned to both\n" @@ -2472,7 +2472,7 @@ usage(int errcode) " OPT_INDIRECT 32 (use indirect buffers)\n" " OPT_DUMP 64 (dump rx/tx traffic)\n" " OPT_RUBBISH 256\n" -" (send wathever the buffers contain)\n" +" (send whatever the buffers contain)\n" " OPT_RANDOM_SRC 512\n" " OPT_RANDOM_DST 1024\n" " OPT_PPS_STATS 2048\n" From owner-svn-src-stable-12@freebsd.org Tue Oct 6 19:11:56 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41285439C87; Tue, 6 Oct 2020 19:11:56 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5Rsm0wYLz3Ytd; Tue, 6 Oct 2020 19:11:56 +0000 (UTC) (envelope-from vmaffione@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 030C7B7B1; Tue, 6 Oct 2020 19:11:56 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 096JBtiK021721; Tue, 6 Oct 2020 19:11:55 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 096JBt6Z021720; Tue, 6 Oct 2020 19:11:55 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202010061911.096JBt6Z021720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 6 Oct 2020 19:11:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366496 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 366496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 19:11:56 -0000 Author: vmaffione Date: Tue Oct 6 19:11:55 2020 New Revision: 366496 URL: https://svnweb.freebsd.org/changeset/base/366496 Log: MFC r366388 netmap: fix constness warnings generated by "-Wcast-qual" Submitted by: milosz.kaniewski@gmail.com Modified: stable/12/sys/net/netmap_user.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/netmap_user.h ============================================================================== --- stable/12/sys/net/netmap_user.h Tue Oct 6 19:10:32 2020 (r366495) +++ stable/12/sys/net/netmap_user.h Tue Oct 6 19:11:55 2020 (r366496) @@ -292,7 +292,7 @@ struct nm_desc { * when the descriptor is open correctly, d->self == d * Eventually we should also use some magic number. */ -#define P2NMD(p) ((struct nm_desc *)(p)) +#define P2NMD(p) ((const struct nm_desc *)(p)) #define IS_NETMAP_DESC(d) ((d) && P2NMD(d)->self == P2NMD(d)) #define NETMAP_FD(d) (P2NMD(d)->fd) @@ -623,7 +623,7 @@ nm_parse(const char *ifname, struct nm_desc *d, char * const char *vpname = NULL; u_int namelen; uint32_t nr_ringid = 0, nr_flags; - char errmsg[MAXERRMSG] = ""; + char errmsg[MAXERRMSG] = "", *tmp; long num; uint16_t nr_arg2 = 0; enum { P_START, P_RNGSFXOK, P_GETNUM, P_FLAGS, P_FLAGSOK, P_MEMID } p_state; @@ -720,12 +720,13 @@ nm_parse(const char *ifname, struct nm_desc *d, char * port++; break; case P_GETNUM: - num = strtol(port, (char **)&port, 10); + num = strtol(port, &tmp, 10); if (num < 0 || num >= NETMAP_RING_MASK) { snprintf(errmsg, MAXERRMSG, "'%ld' out of range [0, %d)", num, NETMAP_RING_MASK); goto fail; } + port = tmp; nr_ringid = num & NETMAP_RING_MASK; p_state = P_RNGSFXOK; break; @@ -767,11 +768,12 @@ nm_parse(const char *ifname, struct nm_desc *d, char * snprintf(errmsg, MAXERRMSG, "double setting of memid"); goto fail; } - num = strtol(port, (char **)&port, 10); + num = strtol(port, &tmp, 10); if (num <= 0) { snprintf(errmsg, MAXERRMSG, "invalid memid %ld, must be >0", num); goto fail; } + port = tmp; nr_arg2 = num; p_state = P_RNGSFXOK; break; @@ -1054,7 +1056,7 @@ nm_inject(struct nm_desc *d, const void *buf, size_t s ring->slot[i].flags = NS_MOREFRAG; nm_pkt_copy(buf, NETMAP_BUF(ring, idx), ring->nr_buf_size); i = nm_ring_next(ring, i); - buf = (char *)buf + ring->nr_buf_size; + buf = (const char *)buf + ring->nr_buf_size; } idx = ring->slot[i].buf_idx; ring->slot[i].len = rem; From owner-svn-src-stable-12@freebsd.org Tue Oct 6 19:12:44 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07425439C95; Tue, 6 Oct 2020 19:12:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5Rtg6SfGz3Z36; Tue, 6 Oct 2020 19:12:43 +0000 (UTC) (envelope-from vmaffione@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C137CB74F; Tue, 6 Oct 2020 19:12:43 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 096JChKp021814; Tue, 6 Oct 2020 19:12:43 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 096JCh77021812; Tue, 6 Oct 2020 19:12:43 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202010061912.096JCh77021812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 6 Oct 2020 19:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366497 - in stable/12: share/man/man4 tools/tools/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/12: share/man/man4 tools/tools/netmap X-SVN-Commit-Revision: 366497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 19:12:44 -0000 Author: vmaffione Date: Tue Oct 6 19:12:43 2020 New Revision: 366497 URL: https://svnweb.freebsd.org/changeset/base/366497 Log: MFC r366389 netmap: minor documentation fix Also update date of pkt-gen.8 (not done in r366387). Submitted by: milosz.kaniewski@gmail.com Modified: stable/12/share/man/man4/netmap.4 stable/12/tools/tools/netmap/pkt-gen.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/netmap.4 ============================================================================== --- stable/12/share/man/man4/netmap.4 Tue Oct 6 19:11:55 2020 (r366496) +++ stable/12/share/man/man4/netmap.4 Tue Oct 6 19:12:43 2020 (r366497) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2020 +.Dd October 3, 2020 .Dt NETMAP 4 .Os .Sh NAME @@ -1051,7 +1051,7 @@ void receiver(void) for (;;) { poll(&fds, 1, -1); while ( (buf = nm_nextpkt(d, &h)) ) - consume_pkt(buf, h->len); + consume_pkt(buf, h.len); } nm_close(d); } Modified: stable/12/tools/tools/netmap/pkt-gen.8 ============================================================================== --- stable/12/tools/tools/netmap/pkt-gen.8 Tue Oct 6 19:11:55 2020 (r366496) +++ stable/12/tools/tools/netmap/pkt-gen.8 Tue Oct 6 19:12:43 2020 (r366497) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2018 +.Dd October 3, 2020 .Dt PKT-GEN 8 .Os .Sh NAME From owner-svn-src-stable-12@freebsd.org Tue Oct 6 19:14:05 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B45E439A53; Tue, 6 Oct 2020 19:14:05 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5RwF0Dt9z3Z5w; Tue, 6 Oct 2020 19:14:05 +0000 (UTC) (envelope-from vmaffione@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C67E0BB93; Tue, 6 Oct 2020 19:14:04 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 096JE41p021932; Tue, 6 Oct 2020 19:14:04 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 096JE3e6021926; Tue, 6 Oct 2020 19:14:03 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202010061914.096JE3e6021926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 6 Oct 2020 19:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366498 - stable/12/tools/tools/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/tools/tools/netmap X-SVN-Commit-Revision: 366498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 19:14:05 -0000 Author: vmaffione Date: Tue Oct 6 19:14:03 2020 New Revision: 366498 URL: https://svnweb.freebsd.org/changeset/base/366498 Log: MFC r366393 netmap: tools: fix several compiler warnings MFC after: 1 week Modified: stable/12/tools/tools/netmap/Makefile stable/12/tools/tools/netmap/bridge.c stable/12/tools/tools/netmap/ctrs.h stable/12/tools/tools/netmap/lb.c stable/12/tools/tools/netmap/nmreplay.c stable/12/tools/tools/netmap/pkt-gen.c stable/12/tools/tools/netmap/pkt_hash.c Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/netmap/Makefile ============================================================================== --- stable/12/tools/tools/netmap/Makefile Tue Oct 6 19:12:43 2020 (r366497) +++ stable/12/tools/tools/netmap/Makefile Tue Oct 6 19:14:03 2020 (r366498) @@ -21,6 +21,8 @@ LDFLAGS += -lm # used by nmreplay .include .include +CFLAGS += -Wno-cast-align + all: $(PROGS) pkt-gen: pkt-gen.o Modified: stable/12/tools/tools/netmap/bridge.c ============================================================================== --- stable/12/tools/tools/netmap/bridge.c Tue Oct 6 19:12:43 2020 (r366497) +++ stable/12/tools/tools/netmap/bridge.c Tue Oct 6 19:14:03 2020 (r366498) @@ -14,7 +14,7 @@ #include #include -int verbose = 0; +static int verbose = 0; static int do_abort = 0; static int zerocopy = 1; /* enable zerocopy if possible */ @@ -31,7 +31,7 @@ sigint_h(int sig) /* * how many packets on this set of queues ? */ -int +static int pkt_queued(struct nm_desc *d, int tx) { u_int i, tot = 0; Modified: stable/12/tools/tools/netmap/ctrs.h ============================================================================== --- stable/12/tools/tools/netmap/ctrs.h Tue Oct 6 19:12:43 2020 (r366497) +++ stable/12/tools/tools/netmap/ctrs.h Tue Oct 6 19:14:03 2020 (r366498) @@ -18,12 +18,12 @@ struct my_ctrs { * Caller has to make sure that the buffer is large enough. */ static const char * -norm2(char *buf, double val, char *fmt, int normalize) +norm2(char *buf, double val, const char *fmt, int normalize) { - char *units[] = { "", "K", "M", "G", "T" }; + const char *units[] = { "", "K", "M", "G", "T" }; u_int i; if (normalize) - for (i = 0; val >=1000 && i < sizeof(units)/sizeof(char *) - 1; i++) + for (i = 0; val >=1000 && i < sizeof(units)/sizeof(const char *) - 1; i++) val /= 1000; else i=0; Modified: stable/12/tools/tools/netmap/lb.c ============================================================================== --- stable/12/tools/tools/netmap/lb.c Tue Oct 6 19:12:43 2020 (r366497) +++ stable/12/tools/tools/netmap/lb.c Tue Oct 6 19:14:03 2020 (r366498) @@ -89,7 +89,7 @@ struct compact_ipv6_hdr { #define BUF_REVOKE 100 #define STAT_MSG_MAXSIZE 1024 -struct { +static struct { char ifname[MAX_IFNAMELEN]; char base_name[MAX_IFNAMELEN]; int netmap_fd; @@ -115,7 +115,7 @@ struct overflow_queue { uint32_t size; }; -struct overflow_queue *freeq; +static struct overflow_queue *freeq; static inline int oq_full(struct overflow_queue *q) @@ -160,12 +160,12 @@ oq_deq(struct overflow_queue *q) static volatile int do_abort = 0; -uint64_t dropped = 0; -uint64_t forwarded = 0; -uint64_t received_bytes = 0; -uint64_t received_pkts = 0; -uint64_t non_ip = 0; -uint32_t freeq_n = 0; +static uint64_t dropped = 0; +static uint64_t forwarded = 0; +static uint64_t received_bytes = 0; +static uint64_t received_pkts = 0; +static uint64_t non_ip = 0; +static uint32_t freeq_n = 0; struct port_des { char interface[MAX_PORTNAMELEN]; @@ -178,7 +178,7 @@ struct port_des { struct group_des *group; }; -struct port_des *ports; +static struct port_des *ports; /* each group of pipes receives all the packets */ struct group_des { @@ -190,7 +190,7 @@ struct group_des { int custom_port; }; -struct group_des *groups; +static struct group_des *groups; /* statistcs */ struct counters { @@ -205,7 +205,7 @@ struct counters { #define COUNTERS_FULL 1 }; -struct counters counters_buf; +static struct counters counters_buf; static void * print_stats(void *arg) @@ -387,7 +387,7 @@ static void sigint_h(int sig) signal(SIGINT, SIG_DFL); } -void usage() +static void usage() { printf("usage: lb [options]\n"); printf("where options are:\n"); @@ -404,9 +404,9 @@ void usage() } static int -parse_pipes(char *spec) +parse_pipes(const char *spec) { - char *end = index(spec, ':'); + const char *end = index(spec, ':'); static int max_groups = 0; struct group_des *g; @@ -458,7 +458,8 @@ parse_pipes(char *spec) } /* complete the initialization of the groups data structure */ -void init_groups(void) +static void +init_groups(void) { int i, j, t = 0; struct group_des *g = NULL; @@ -484,7 +485,8 @@ void init_groups(void) * chain headed by g. * Return a free buffer. */ -uint32_t forward_packet(struct group_des *g, struct netmap_slot *rs) +static uint32_t +forward_packet(struct group_des *g, struct netmap_slot *rs) { uint32_t hash = rs->ptr; uint32_t output_port = hash % g->nports; @@ -886,7 +888,6 @@ run: */ for (i = glob_arg.num_groups - 1U; i > 0; i--) { struct group_des *g = &groups[i - 1]; - int j; for (j = 0; j < g->nports; j++) { struct port_des *p = &g->ports[j]; @@ -917,7 +918,7 @@ run: for (i = 0; i < npipes; i++) { struct port_des *p = &ports[i]; struct overflow_queue *q = p->oq; - uint32_t j, lim; + uint32_t k, lim; struct netmap_ring *ring; struct netmap_slot *slot; @@ -929,7 +930,7 @@ run: continue; if (q->n < lim) lim = q->n; - for (j = 0; j < lim; j++) { + for (k = 0; k < lim; k++) { struct netmap_slot s = oq_deq(q), tmp; tmp.ptr = 0; slot = &ring->slot[ring->head]; Modified: stable/12/tools/tools/netmap/nmreplay.c ============================================================================== --- stable/12/tools/tools/netmap/nmreplay.c Tue Oct 6 19:12:43 2020 (r366497) +++ stable/12/tools/tools/netmap/nmreplay.c Tue Oct 6 19:14:03 2020 (r366498) @@ -431,7 +431,7 @@ readpcap(const char *fn) enum my_pcap_mode { PM_NONE, PM_FAST, PM_FIXED, PM_REAL }; -int verbose = 0; +static int verbose = 0; static int do_abort = 0; @@ -988,7 +988,8 @@ usage(void) static char ** split_arg(const char *src, int *_ac) { - char *my = NULL, **av = NULL, *seps = " \t\r\n,"; + char *my = NULL, **av = NULL; + const char *seps = " \t\r\n,"; int l, i, ac; /* number of entries */ if (!src) @@ -1127,15 +1128,15 @@ main(int argc, char **argv) /* set default values */ for (i = 0; i < N_OPTS; i++) { - struct _qs *q = &bp[i].q; + struct _qs *qs = &bp[i].q; - q->burst = 128; - q->c_delay.optarg = "0"; - q->c_delay.run = null_run_fn; - q->c_loss.optarg = "0"; - q->c_loss.run = null_run_fn; - q->c_bw.optarg = "0"; - q->c_bw.run = null_run_fn; + qs->burst = 128; + qs->c_delay.optarg = "0"; + qs->c_delay.run = null_run_fn; + qs->c_loss.optarg = "0"; + qs->c_loss.run = null_run_fn; + qs->c_bw.optarg = "0"; + qs->c_bw.run = null_run_fn; } // Options: @@ -1250,10 +1251,10 @@ main(int argc, char **argv) /* apply commands */ for (i = 0; i < N_OPTS; i++) { /* once per queue */ - struct _qs *q = &bp[i].q; - err += cmd_apply(delay_cfg, d[i], q, &q->c_delay); - err += cmd_apply(bw_cfg, b[i], q, &q->c_bw); - err += cmd_apply(loss_cfg, l[i], q, &q->c_loss); + struct _qs *qs = &bp[i].q; + err += cmd_apply(delay_cfg, d[i], qs, &qs->c_delay); + err += cmd_apply(bw_cfg, b[i], qs, &qs->c_bw); + err += cmd_apply(loss_cfg, l[i], qs, &qs->c_loss); } pthread_create(&bp[0].cons_tid, NULL, nmreplay_main, (void*)&bp[0]); @@ -1287,7 +1288,7 @@ main(int argc, char **argv) * the final entry has s = NULL. */ struct _sm { /* string and multiplier */ - char *s; + const char *s; double m; }; Modified: stable/12/tools/tools/netmap/pkt-gen.c ============================================================================== --- stable/12/tools/tools/netmap/pkt-gen.c Tue Oct 6 19:12:43 2020 (r366497) +++ stable/12/tools/tools/netmap/pkt-gen.c Tue Oct 6 19:14:03 2020 (r366498) @@ -42,7 +42,6 @@ #define NETMAP_WITH_LIBS #include - #include // isprint() #include // sysconf() #include @@ -179,14 +178,14 @@ static inline void CPU_SET(uint32_t i, cpuset_t *p) do {struct timespec t0 = {0,0}; *(b) = t0; } while (0) #endif /* __APPLE__ */ -const char *default_payload="netmap pkt-gen DIRECT payload\n" +static const char *default_payload = "netmap pkt-gen DIRECT payload\n" "http://info.iet.unipi.it/~luigi/netmap/ "; -const char *indirect_payload="netmap pkt-gen indirect payload\n" +static const char *indirect_payload = "netmap pkt-gen indirect payload\n" "http://info.iet.unipi.it/~luigi/netmap/ "; -int verbose = 0; -int normalize = 1; +static int verbose = 0; +static int normalize = 1; #define VIRT_HDR_1 10 /* length of a base vnet-hdr */ #define VIRT_HDR_2 12 /* length of the extenede vnet-hdr */ @@ -218,7 +217,7 @@ struct pkt { ((af) == AF_INET ? (p)->ipv4.f: (p)->ipv6.f) struct ip_range { - char *name; + const char *name; union { struct { uint32_t start, end; /* same as struct in_addr */ @@ -232,7 +231,7 @@ struct ip_range { }; struct mac_range { - char *name; + const char *name; struct ether_addr start, end; }; @@ -295,7 +294,7 @@ struct glob_arg { int td_type; void *mmap_addr; char ifname[MAX_IFNAMELEN]; - char *nmr_config; + const char *nmr_config; int dummy_send; int virt_header; /* send also the virt_header */ char *packet_file; /* -P option */ @@ -620,7 +619,7 @@ system_ncpus(void) * If there is no 4th number, then the 3rd is assigned to both #tx-rings * and #rx-rings. */ -int +static int parse_nmr_config(const char* conf, struct nmreq *nmr) { char *w, *tok; @@ -727,7 +726,7 @@ checksum(const void *data, uint16_t len, uint32_t sum) /* Checksum all the pairs of bytes first... */ for (i = 0; i < (len & ~1U); i += 2) { - sum += (u_int16_t)ntohs(*((u_int16_t *)(addr + i))); + sum += (uint16_t)ntohs(*((const uint16_t *)(addr + i))); if (sum > 0xFFFF) sum -= 0xFFFF; } @@ -1241,7 +1240,7 @@ send_packets(struct netmap_ring *ring, struct pkt *pkt /* * Index of the highest bit set */ -uint32_t +static uint32_t msb64(uint64_t x) { uint64_t m = 1ULL << 63; @@ -2695,7 +2694,7 @@ main_thread(struct glob_arg *g) struct td_desc { int ty; - char *key; + const char *key; void *f; int default_burst; }; @@ -2715,7 +2714,7 @@ tap_alloc(char *dev) { struct ifreq ifr; int fd, err; - char *clonedev = TAP_CLONEDEV; + const char *clonedev = TAP_CLONEDEV; (void)err; (void)dev; Modified: stable/12/tools/tools/netmap/pkt_hash.c ============================================================================== --- stable/12/tools/tools/netmap/pkt_hash.c Tue Oct 6 19:12:43 2020 (r366497) +++ stable/12/tools/tools/netmap/pkt_hash.c Tue Oct 6 19:14:03 2020 (r366498) @@ -145,7 +145,7 @@ static uint32_t decode_gre_hash(const uint8_t *, uint8 ** Parser + hash function for the IPv4 packet **/ static uint32_t -decode_ip_n_hash(struct ip *iph, uint8_t hash_split, uint8_t seed) +decode_ip_n_hash(const struct ip *iph, uint8_t hash_split, uint8_t seed) { uint32_t rc = 0; @@ -155,19 +155,19 @@ decode_ip_n_hash(struct ip *iph, uint8_t hash_split, u ntohs(0xFFFD) + seed, ntohs(0xFFFE) + seed); } else { - struct tcphdr *tcph = NULL; - struct udphdr *udph = NULL; + const struct tcphdr *tcph = NULL; + const struct udphdr *udph = NULL; switch (iph->ip_p) { case IPPROTO_TCP: - tcph = (struct tcphdr *)((uint8_t *)iph + (iph->ip_hl<<2)); + tcph = (const struct tcphdr *)((const uint8_t *)iph + (iph->ip_hl<<2)); rc = sym_hash_fn(ntohl(iph->ip_src.s_addr), ntohl(iph->ip_dst.s_addr), ntohs(tcph->th_sport) + seed, ntohs(tcph->th_dport) + seed); break; case IPPROTO_UDP: - udph = (struct udphdr *)((uint8_t *)iph + (iph->ip_hl<<2)); + udph = (const struct udphdr *)((const uint8_t *)iph + (iph->ip_hl<<2)); rc = sym_hash_fn(ntohl(iph->ip_src.s_addr), ntohl(iph->ip_dst.s_addr), ntohs(udph->uh_sport) + seed, @@ -175,11 +175,11 @@ decode_ip_n_hash(struct ip *iph, uint8_t hash_split, u break; case IPPROTO_IPIP: /* tunneling */ - rc = decode_ip_n_hash((struct ip *)((uint8_t *)iph + (iph->ip_hl<<2)), + rc = decode_ip_n_hash((const struct ip *)((const uint8_t *)iph + (iph->ip_hl<<2)), hash_split, seed); break; case IPPROTO_GRE: - rc = decode_gre_hash((uint8_t *)iph + (iph->ip_hl<<2), + rc = decode_gre_hash((const uint8_t *)iph + (iph->ip_hl<<2), hash_split, seed); break; case IPPROTO_ICMP: @@ -205,7 +205,7 @@ decode_ip_n_hash(struct ip *iph, uint8_t hash_split, u ** Parser + hash function for the IPv6 packet **/ static uint32_t -decode_ipv6_n_hash(struct ip6_hdr *ipv6h, uint8_t hash_split, uint8_t seed) +decode_ipv6_n_hash(const struct ip6_hdr *ipv6h, uint8_t hash_split, uint8_t seed) { uint32_t saddr, daddr; uint32_t rc = 0; @@ -226,19 +226,19 @@ decode_ipv6_n_hash(struct ip6_hdr *ipv6h, uint8_t hash ntohs(0xFFFD) + seed, ntohs(0xFFFE) + seed); } else { - struct tcphdr *tcph = NULL; - struct udphdr *udph = NULL; + const struct tcphdr *tcph = NULL; + const struct udphdr *udph = NULL; switch(ntohs(ipv6h->ip6_ctlun.ip6_un1.ip6_un1_nxt)) { case IPPROTO_TCP: - tcph = (struct tcphdr *)(ipv6h + 1); + tcph = (const struct tcphdr *)(ipv6h + 1); rc = sym_hash_fn(ntohl(saddr), ntohl(daddr), ntohs(tcph->th_sport) + seed, ntohs(tcph->th_dport) + seed); break; case IPPROTO_UDP: - udph = (struct udphdr *)(ipv6h + 1); + udph = (const struct udphdr *)(ipv6h + 1); rc = sym_hash_fn(ntohl(saddr), ntohl(daddr), ntohs(udph->uh_sport) + seed, @@ -246,16 +246,16 @@ decode_ipv6_n_hash(struct ip6_hdr *ipv6h, uint8_t hash break; case IPPROTO_IPIP: /* tunneling */ - rc = decode_ip_n_hash((struct ip *)(ipv6h + 1), + rc = decode_ip_n_hash((const struct ip *)(ipv6h + 1), hash_split, seed); break; case IPPROTO_IPV6: /* tunneling */ - rc = decode_ipv6_n_hash((struct ip6_hdr *)(ipv6h + 1), + rc = decode_ipv6_n_hash((const struct ip6_hdr *)(ipv6h + 1), hash_split, seed); break; case IPPROTO_GRE: - rc = decode_gre_hash((uint8_t *)(ipv6h + 1), hash_split, seed); + rc = decode_gre_hash((const uint8_t *)(ipv6h + 1), hash_split, seed); break; case IPPROTO_ICMP: case IPPROTO_ESP: @@ -280,7 +280,7 @@ decode_ipv6_n_hash(struct ip6_hdr *ipv6h, uint8_t hash * * (See decode_vlan_n_hash & pkt_hdr_hash functions). * */ static uint32_t -decode_others_n_hash(struct ether_header *ethh, uint8_t seed) +decode_others_n_hash(const struct ether_header *ethh, uint8_t seed) { uint32_t saddr, daddr, rc; @@ -305,18 +305,18 @@ decode_others_n_hash(struct ether_header *ethh, uint8_ ** Parser + hash function for VLAN packet **/ static inline uint32_t -decode_vlan_n_hash(struct ether_header *ethh, uint8_t hash_split, uint8_t seed) +decode_vlan_n_hash(const struct ether_header *ethh, uint8_t hash_split, uint8_t seed) { uint32_t rc = 0; - struct vlanhdr *vhdr = (struct vlanhdr *)(ethh + 1); + const struct vlanhdr *vhdr = (const struct vlanhdr *)(ethh + 1); switch (ntohs(vhdr->proto)) { case ETHERTYPE_IP: - rc = decode_ip_n_hash((struct ip *)(vhdr + 1), + rc = decode_ip_n_hash((const struct ip *)(vhdr + 1), hash_split, seed); break; case ETHERTYPE_IPV6: - rc = decode_ipv6_n_hash((struct ip6_hdr *)(vhdr + 1), + rc = decode_ipv6_n_hash((const struct ip6_hdr *)(vhdr + 1), hash_split, seed); break; case ETHERTYPE_ARP: @@ -336,15 +336,15 @@ uint32_t pkt_hdr_hash(const unsigned char *buffer, uint8_t hash_split, uint8_t seed) { uint32_t rc = 0; - struct ether_header *ethh = (struct ether_header *)buffer; + const struct ether_header *ethh = (const struct ether_header *)buffer; switch (ntohs(ethh->ether_type)) { case ETHERTYPE_IP: - rc = decode_ip_n_hash((struct ip *)(ethh + 1), + rc = decode_ip_n_hash((const struct ip *)(ethh + 1), hash_split, seed); break; case ETHERTYPE_IPV6: - rc = decode_ipv6_n_hash((struct ip6_hdr *)(ethh + 1), + rc = decode_ipv6_n_hash((const struct ip6_hdr *)(ethh + 1), hash_split, seed); break; case ETHERTYPE_VLAN: @@ -372,15 +372,15 @@ decode_gre_hash(const uint8_t *grehdr, uint8_t hash_sp !!(*grehdr & 2) + /* Routing */ !!(*grehdr & 4) + /* Key */ !!(*grehdr & 8)); /* Sequence Number */ - uint16_t proto = ntohs(*(uint16_t *)(void *)(grehdr + 2)); + uint16_t proto = ntohs(*(const uint16_t *)(const void *)(grehdr + 2)); switch (proto) { case ETHERTYPE_IP: - rc = decode_ip_n_hash((struct ip *)(grehdr + len), + rc = decode_ip_n_hash((const struct ip *)(grehdr + len), hash_split, seed); break; case ETHERTYPE_IPV6: - rc = decode_ipv6_n_hash((struct ip6_hdr *)(grehdr + len), + rc = decode_ipv6_n_hash((const struct ip6_hdr *)(grehdr + len), hash_split, seed); break; case 0x6558: /* Transparent Ethernet Bridging */ From owner-svn-src-stable-12@freebsd.org Tue Oct 6 19:15:11 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E40AE439CCF; Tue, 6 Oct 2020 19:15:11 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5RxW5lCLz3ZWC; Tue, 6 Oct 2020 19:15:11 +0000 (UTC) (envelope-from vmaffione@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A819DBA1D; Tue, 6 Oct 2020 19:15:11 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 096JFBJZ022051; Tue, 6 Oct 2020 19:15:11 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 096JFBKZ022050; Tue, 6 Oct 2020 19:15:11 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202010061915.096JFBKZ022050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 6 Oct 2020 19:15:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366499 - stable/12/tools/tools/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/tools/tools/netmap X-SVN-Commit-Revision: 366499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 19:15:12 -0000 Author: vmaffione Date: Tue Oct 6 19:15:11 2020 New Revision: 366499 URL: https://svnweb.freebsd.org/changeset/base/366499 Log: MFC r366394 netmap: tools: extend CFLAGS after including bsd.prog.mk MFC after: 1 week Modified: stable/12/tools/tools/netmap/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/netmap/Makefile ============================================================================== --- stable/12/tools/tools/netmap/Makefile Tue Oct 6 19:14:03 2020 (r366498) +++ stable/12/tools/tools/netmap/Makefile Tue Oct 6 19:15:11 2020 (r366499) @@ -7,9 +7,10 @@ PROGS = pkt-gen nmreplay bridge lb CLEANFILES = $(PROGS) *.o MAN= -CFLAGS += -Werror -Wall -CFLAGS += -Wextra +.include +.include + LDFLAGS += -lpthread .ifdef WITHOUT_PCAP CFLAGS += -DNO_PCAP @@ -17,9 +18,6 @@ CFLAGS += -DNO_PCAP LDFLAGS += -lpcap .endif LDFLAGS += -lm # used by nmreplay - -.include -.include CFLAGS += -Wno-cast-align From owner-svn-src-stable-12@freebsd.org Wed Oct 7 10:43:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9D6B42B7D2; Wed, 7 Oct 2020 10:43:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5rXd52PXz4fpG; Wed, 7 Oct 2020 10:43:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 900EF164C8; Wed, 7 Oct 2020 10:43: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 097AhTUv094439; Wed, 7 Oct 2020 10:43:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 097AhTdg094438; Wed, 7 Oct 2020 10:43:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202010071043.097AhTdg094438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 7 Oct 2020 10:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366513 - stable/12/usr.sbin/pciconf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/usr.sbin/pciconf X-SVN-Commit-Revision: 366513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2020 10:43:29 -0000 Author: kib Date: Wed Oct 7 10:43:29 2020 New Revision: 366513 URL: https://svnweb.freebsd.org/changeset/base/366513 Log: MFC r366300: pciconf: print PCIe CTL max read request. Modified: stable/12/usr.sbin/pciconf/cap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/pciconf/cap.c ============================================================================== --- stable/12/usr.sbin/pciconf/cap.c Wed Oct 7 09:53:24 2020 (r366512) +++ stable/12/usr.sbin/pciconf/cap.c Wed Oct 7 10:43:29 2020 (r366513) @@ -397,6 +397,28 @@ link_speed_string(uint8_t speed) } static const char * +max_read_string(u_int max_read) +{ + + switch (max_read) { + case 0x0: + return ("128"); + case 0x1: + return ("256"); + case 0x2: + return ("512"); + case 0x3: + return ("1024"); + case 0x4: + return ("2048"); + case 0x5: + return ("4096"); + default: + return ("undef"); + } +} + +static const char * aspm_string(uint8_t aspm) { @@ -498,6 +520,8 @@ cap_express(int fd, struct pci_conf *p, uint8_t ptr) (ctl & PCIEM_CTL2_ARI) ? "enabled" : "disabled"); } } + printf("\n max read %s", max_read_string((ctl & + PCIEM_CTL_MAX_READ_REQUEST) >> 12)); cap = read_config(fd, &p->pc_sel, ptr + PCIER_LINK_CAP, 4); sta = read_config(fd, &p->pc_sel, ptr + PCIER_LINK_STA, 2); if (cap == 0 && sta == 0) From owner-svn-src-stable-12@freebsd.org Thu Oct 8 04:00:32 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A09B444C49; Thu, 8 Oct 2020 04:00:32 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C6HYC6Xg1z4Wl7; Thu, 8 Oct 2020 04:00:31 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3AA122AC1; Thu, 8 Oct 2020 04:00:31 +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 09840VF6032133; Thu, 8 Oct 2020 04:00:31 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09840VRT032132; Thu, 8 Oct 2020 04:00:31 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202010080400.09840VRT032132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 8 Oct 2020 04:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366531 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 366531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2020 04:00:32 -0000 Author: cy Date: Thu Oct 8 04:00:31 2020 New Revision: 366531 URL: https://svnweb.freebsd.org/changeset/base/366531 Log: MFC r366287: Continued ipfilter #ifdef cleanup. The r343701 log entry contains a complete description. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_nat.c Thu Oct 8 02:56:11 2020 (r366530) +++ stable/12/sys/contrib/ipfilter/netinet/ip_nat.c Thu Oct 8 04:00:31 2020 (r366531) @@ -5116,8 +5116,8 @@ ipf_nat_out(fin, nat, natadd, nflags) ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, msumd, 0); } -#if !defined(_KERNEL) || defined(MENTAT) || defined(__sgi) || \ - defined(linux) || defined(BRIDGE_IPF) || defined(__FreeBSD__) +#if !defined(_KERNEL) || defined(MENTAT) || \ + defined(BRIDGE_IPF) || defined(__FreeBSD__) else { /* * Strictly speaking, this isn't necessary on BSD @@ -5631,8 +5631,7 @@ ipf_nat_in(fin, nat, natadd, nflags) } fin->fin_ip->ip_dst = nat->nat_ndstip; fin->fin_daddr = nat->nat_ndstaddr; -#if !defined(_KERNEL) || defined(MENTAT) || defined(__sgi) || \ - defined(__osf__) || defined(linux) +#if !defined(_KERNEL) || defined(MENTAT) ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, ipsumd, 0); #endif break; From owner-svn-src-stable-12@freebsd.org Thu Oct 8 12:56:24 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31E3F42827F; Thu, 8 Oct 2020 12:56:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C6WRX0Ybdz41Qv; Thu, 8 Oct 2020 12:56:24 +0000 (UTC) (envelope-from kevans@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAADD9302; Thu, 8 Oct 2020 12:56:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 098CuNHa062138; Thu, 8 Oct 2020 12:56:23 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 098CuN9Y062137; Thu, 8 Oct 2020 12:56:23 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202010081256.098CuN9Y062137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 8 Oct 2020 12:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366538 - stable/12/usr.sbin/crunch/crunchgen X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/usr.sbin/crunch/crunchgen X-SVN-Commit-Revision: 366538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2020 12:56:24 -0000 Author: kevans Date: Thu Oct 8 12:56:23 2020 New Revision: 366538 URL: https://svnweb.freebsd.org/changeset/base/366538 Log: MFC r366466: crunchgen: fix MK_AUTO_OBJ logic after r364166 r364166 converted echo -n `/bin/pwd` to a raw pwd invocation, leaving a trailing newline at the end of path. This caused a later stat() of it to erroneously fail and the fallback to MK_AUTO_OBJ=no logic proceeded as unexpected. Harry Schmalzbauer bissected the resulting build failure he experienced (stable/12 host, -HEAD build) down to r365887. This change is mostly unrelated, except it switches the build to bootstrapped crunchgen - clue! I then bissected recent crunchgen changes going back a bit since we wouldn't observe the failure immediately with -CURRENT in most configurations, which landed me on r364166. After many intense head-scratching minutes and printf debugging, I realized that the newline was the difference. This is where our tale ends. Modified: stable/12/usr.sbin/crunch/crunchgen/crunchgen.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/crunch/crunchgen/crunchgen.c ============================================================================== --- stable/12/usr.sbin/crunch/crunchgen/crunchgen.c Thu Oct 8 11:45:10 2020 (r366537) +++ stable/12/usr.sbin/crunch/crunchgen/crunchgen.c Thu Oct 8 12:56:23 2020 (r366538) @@ -666,6 +666,8 @@ fillin_program(prog_t *p) if (!*path) errx(1, "Can't perform pwd on: %s\n", p->srcdir); + /* Chop off trailing newline. */ + path[strlen(path) - 1] = '\0'; p->realsrcdir = strdup(path); } From owner-svn-src-stable-12@freebsd.org Fri Oct 9 05:28:33 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 952FE4396B2; Fri, 9 Oct 2020 05:28:33 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C6xSK3PLqz3f3n; Fri, 9 Oct 2020 05:28:33 +0000 (UTC) (envelope-from pfg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 594BB14990; Fri, 9 Oct 2020 05:28:33 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0995SXZK075220; Fri, 9 Oct 2020 05:28:33 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0995SXXP075219; Fri, 9 Oct 2020 05:28:33 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <202010090528.0995SXXP075219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 9 Oct 2020 05:28:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366563 - stable/12/sys/fs/ext2fs X-SVN-Group: stable-12 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/12/sys/fs/ext2fs X-SVN-Commit-Revision: 366563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 05:28:33 -0000 Author: pfg Date: Fri Oct 9 05:28:32 2020 New Revision: 366563 URL: https://svnweb.freebsd.org/changeset/base/366563 Log: MFC r366501: ext2fs: minor typo. Obtained from: Dragonfly Modified: stable/12/sys/fs/ext2fs/ext2_alloc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_alloc.c Fri Oct 9 05:27:02 2020 (r366562) +++ stable/12/sys/fs/ext2fs/ext2_alloc.c Fri Oct 9 05:28:32 2020 (r366563) @@ -192,7 +192,7 @@ static SYSCTL_NODE(_vfs, OID_AUTO, ext2fs, CTLFLAG_RW, static int doasyncfree = 1; SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, - "Use asychronous writes to update block pointers when freeing blocks"); + "Use asynchronous writes to update block pointers when freeing blocks"); static int doreallocblks = 0; From owner-svn-src-stable-12@freebsd.org Fri Oct 9 09:33:46 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E0F543D6BE; Fri, 9 Oct 2020 09:33:46 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C72vG3D51z46mV; Fri, 9 Oct 2020 09:33:46 +0000 (UTC) (envelope-from rscheff@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51BFC17578; Fri, 9 Oct 2020 09:33:46 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0999Xk2C030319; Fri, 9 Oct 2020 09:33:46 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0999XkUu030318; Fri, 9 Oct 2020 09:33:46 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202010090933.0999XkUu030318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Fri, 9 Oct 2020 09:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366564 - stable/12/sys/netinet/cc X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: stable/12/sys/netinet/cc X-SVN-Commit-Revision: 366564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 09:33:46 -0000 Author: rscheff Date: Fri Oct 9 09:33:45 2020 New Revision: 366564 URL: https://svnweb.freebsd.org/changeset/base/366564 Log: MFC r366149: TCP newreno: improve after_idle ssthresh Adjust ssthresh in after_idle to the maximum of the prior ssthresh, or 3/4 of the prior cwnd. See RFC2861 section 2 for an in depth explanation for the rationale around this. As newreno is the default "fall-through" reaction, most tcp variants will benefit from this. Reviewed by: tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D22438 Modified: stable/12/sys/netinet/cc/cc_newreno.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/cc/cc_newreno.c ============================================================================== --- stable/12/sys/netinet/cc/cc_newreno.c Fri Oct 9 05:28:32 2020 (r366563) +++ stable/12/sys/netinet/cc/cc_newreno.c Fri Oct 9 09:33:45 2020 (r366564) @@ -213,12 +213,19 @@ newreno_after_idle(struct cc_var *ccv) * wirespeed, overloading router and switch buffers along the way. * * See RFC5681 Section 4.1. "Restarting Idle Connections". + * + * In addition, per RFC2861 Section 2, the ssthresh is set to the + * maximum of the former ssthresh or 3/4 of the old cwnd, to + * not exit slow-start prematurely. */ if (V_tcp_do_rfc3390) rw = min(4 * CCV(ccv, t_maxseg), max(2 * CCV(ccv, t_maxseg), 4380)); else rw = CCV(ccv, t_maxseg) * 2; + + CCV(ccv, snd_ssthresh) = max(CCV(ccv, snd_ssthresh), + CCV(ccv, snd_cwnd)-(CCV(ccv, snd_cwnd)>>2)); CCV(ccv, snd_cwnd) = min(rw, CCV(ccv, snd_cwnd)); } From owner-svn-src-stable-12@freebsd.org Fri Oct 9 09:37:44 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D14C43DC89; Fri, 9 Oct 2020 09:37:44 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C72zr0vPmz46rN; Fri, 9 Oct 2020 09:37:44 +0000 (UTC) (envelope-from rscheff@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F19701799E; Fri, 9 Oct 2020 09:37:43 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0999bhpt030652; Fri, 9 Oct 2020 09:37:43 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0999bhLc030649; Fri, 9 Oct 2020 09:37:43 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202010090937.0999bhLc030649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Fri, 9 Oct 2020 09:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366565 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 366565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 09:37:44 -0000 Author: rscheff Date: Fri Oct 9 09:37:43 2020 New Revision: 366565 URL: https://svnweb.freebsd.org/changeset/base/366565 Log: MFC r366150: TCP: send full initial window when timestamps are in use The fastpath in tcp_output tries to send out full segments, and avoid sending partial segments by comparing against the static t_maxseg variable. That value does not consider tcp options like timestamps, while the initial window calculation is using the correct dynamic tcp_maxseg() function. Due to this interaction, the last, full size segment is considered too short and not sent out immediately. Reported by: tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D26478 Modified: stable/12/sys/netinet/tcp.h stable/12/sys/netinet/tcp_output.c stable/12/sys/netinet/tcp_subr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/tcp.h ============================================================================== --- stable/12/sys/netinet/tcp.h Fri Oct 9 09:33:45 2020 (r366564) +++ stable/12/sys/netinet/tcp.h Fri Oct 9 09:37:43 2020 (r366565) @@ -80,6 +80,8 @@ struct tcphdr { u_short th_urp; /* urgent pointer */ }; +#define PADTCPOLEN(len) ((((len) / 4) + !!((len) % 4)) * 4) + #define TCPOPT_EOL 0 #define TCPOLEN_EOL 1 #define TCPOPT_PAD 0 /* padding after EOL */ Modified: stable/12/sys/netinet/tcp_output.c ============================================================================== --- stable/12/sys/netinet/tcp_output.c Fri Oct 9 09:33:45 2020 (r366564) +++ stable/12/sys/netinet/tcp_output.c Fri Oct 9 09:37:43 2020 (r366565) @@ -577,6 +577,20 @@ after_sack_rexmit: if (len >= tp->t_maxseg) goto send; /* + * As the TCP header options are now + * considered when setting up the initial + * window, we would not send the last segment + * if we skip considering the option length here. + * Note: this may not work when tcp headers change + * very dynamically in the future. + */ + if ((((tp->t_flags & TF_SIGNATURE) ? + PADTCPOLEN(TCPOLEN_SIGNATURE) : 0) + + ((tp->t_flags & TF_RCVD_TSTMP) ? + PADTCPOLEN(TCPOLEN_TIMESTAMP) : 0) + + len) >= tp->t_maxseg) + goto send; + /* * NOTE! on localhost connections an 'ack' from the remote * end may occur synchronously with the output and cause * us to flush a buffer queued with moretocome. XXX Modified: stable/12/sys/netinet/tcp_subr.c ============================================================================== --- stable/12/sys/netinet/tcp_subr.c Fri Oct 9 09:33:45 2020 (r366564) +++ stable/12/sys/netinet/tcp_subr.c Fri Oct 9 09:37:43 2020 (r366565) @@ -2941,7 +2941,6 @@ tcp_maxseg(const struct tcpcb *tp) * but this is harmless, since result of tcp_maxseg() is used * only in cwnd and ssthresh estimations. */ -#define PAD(len) ((((len) / 4) + !!((len) % 4)) * 4) if (TCPS_HAVEESTABLISHED(tp->t_state)) { if (tp->t_flags & TF_RCVD_TSTMP) optlen = TCPOLEN_TSTAMP_APPA; @@ -2949,26 +2948,26 @@ tcp_maxseg(const struct tcpcb *tp) optlen = 0; #if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) if (tp->t_flags & TF_SIGNATURE) - optlen += PAD(TCPOLEN_SIGNATURE); + optlen += PADTCPOLEN(TCPOLEN_SIGNATURE); #endif if ((tp->t_flags & TF_SACK_PERMIT) && tp->rcv_numsacks > 0) { optlen += TCPOLEN_SACKHDR; optlen += tp->rcv_numsacks * TCPOLEN_SACK; - optlen = PAD(optlen); + optlen = PADTCPOLEN(optlen); } } else { if (tp->t_flags & TF_REQ_TSTMP) optlen = TCPOLEN_TSTAMP_APPA; else - optlen = PAD(TCPOLEN_MAXSEG); + optlen = PADTCPOLEN(TCPOLEN_MAXSEG); if (tp->t_flags & TF_REQ_SCALE) - optlen += PAD(TCPOLEN_WINDOW); + optlen += PADTCPOLEN(TCPOLEN_WINDOW); #if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) if (tp->t_flags & TF_SIGNATURE) - optlen += PAD(TCPOLEN_SIGNATURE); + optlen += PADTCPOLEN(TCPOLEN_SIGNATURE); #endif if (tp->t_flags & TF_SACK_PERMIT) - optlen += PAD(TCPOLEN_SACK_PERMITTED); + optlen += PADTCPOLEN(TCPOLEN_SACK_PERMITTED); } #undef PAD optlen = min(optlen, TCP_MAXOLEN); From owner-svn-src-stable-12@freebsd.org Fri Oct 9 18:30:50 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26D3242854C; Fri, 9 Oct 2020 18:30:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7Gpy0Jzyz4gLH; Fri, 9 Oct 2020 18:30:50 +0000 (UTC) (envelope-from emaste@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E24271DAD6; Fri, 9 Oct 2020 18:30:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 099IUn0X060670; Fri, 9 Oct 2020 18:30:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 099IUnSS060668; Fri, 9 Oct 2020 18:30:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202010091830.099IUnSS060668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 9 Oct 2020 18:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366581 - in stable/12/usr.sbin/makefs: . cd9660 X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/12/usr.sbin/makefs: . cd9660 X-SVN-Commit-Revision: 366581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 18:30:50 -0000 Author: emaste Date: Fri Oct 9 18:30:49 2020 New Revision: 366581 URL: https://svnweb.freebsd.org/changeset/base/366581 Log: MFC r365847: makefs: connect cd9660 El Torito EFI boot image system type Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/makefs/cd9660/cd9660_eltorito.c stable/12/usr.sbin/makefs/makefs.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/makefs/cd9660/cd9660_eltorito.c ============================================================================== --- stable/12/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri Oct 9 15:50:50 2020 (r366580) +++ stable/12/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri Oct 9 18:30:49 2020 (r366581) @@ -107,9 +107,11 @@ cd9660_add_boot_disk(iso9660_disk *diskStructure, cons else if (strcmp(sysname, "macppc") == 0 || strcmp(sysname, "mac68k") == 0) new_image->system = ET_SYS_MAC; + else if (strcmp(sysname, "efi") == 0) + new_image->system = ET_SYS_EFI; else { warnx("boot disk system must be " - "i386, powerpc, macppc, or mac68k"); + "i386, powerpc, macppc, mac68k, or efi"); free(temp); free(new_image); return 0; Modified: stable/12/usr.sbin/makefs/makefs.8 ============================================================================== --- stable/12/usr.sbin/makefs/makefs.8 Fri Oct 9 15:50:50 2020 (r366580) +++ stable/12/usr.sbin/makefs/makefs.8 Fri Oct 9 18:30:49 2020 (r366581) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 20, 2019 +.Dd September 17, 2020 .Dt MAKEFS 8 .Os .Sh NAME @@ -385,8 +385,9 @@ is one of .Ql i386 , .Ql mac68k , .Ql macppc , +.Ql powerpc , or -.Ql powerpc . +.Ql efi . .It Sy generic-bootimage Load a generic boot image into the first 32K of the cd9660 image. .It Sy hard-disk-boot From owner-svn-src-stable-12@freebsd.org Fri Oct 9 21:01:53 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7F5F42CFCD; Fri, 9 Oct 2020 21:01:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7L9F5PmQz4sl3; Fri, 9 Oct 2020 21:01:53 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C6831FB2B; Fri, 9 Oct 2020 21:01:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 099L1reB060370; Fri, 9 Oct 2020 21:01:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 099L1rxQ060369; Fri, 9 Oct 2020 21:01:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202010092101.099L1rxQ060369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 9 Oct 2020 21:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366588 - stable/12/stand/efi/loader X-SVN-Group: stable-12 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: stable/12/stand/efi/loader X-SVN-Commit-Revision: 366588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 21:01:53 -0000 Author: imp Date: Fri Oct 9 21:01:53 2020 New Revision: 366588 URL: https://svnweb.freebsd.org/changeset/base/366588 Log: MFC: r366216 imp Fix video on PCI heuristic The video on PCI heuristic was broken. It was supposed to infer a video device when the last element of the path was a PCI DEVICE PATH node. However, the last node in the device path is an END node, so this heuristic never fired. This leads, among other things, to bhyve only producing output in the serial connection once we leave the boot loader. This restores the dual headed boot on bhyve + UEFI (as we did in 11.2), but will favor serial in the absence of other config which may be a change from 11.2. MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D26572 Modified: stable/12/stand/efi/loader/main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/efi/loader/main.c ============================================================================== --- stable/12/stand/efi/loader/main.c Fri Oct 9 20:31:42 2020 (r366587) +++ stable/12/stand/efi/loader/main.c Fri Oct 9 21:01:53 2020 (r366588) @@ -717,6 +717,10 @@ parse_uefi_con_out(void) ep = buf + sz; node = (EFI_DEVICE_PATH *)buf; while ((char *)node < ep) { + if (IsDevicePathEndType(node)) { + if (pci_pending && vid_seen == 0) + vid_seen = ++seen; + } pci_pending = false; if (DevicePathType(node) == ACPI_DEVICE_PATH && DevicePathSubType(node) == ACPI_DP) { @@ -749,8 +753,6 @@ parse_uefi_con_out(void) } node = NextDevicePathNode(node); /* Skip the end node */ } - if (pci_pending && vid_seen == 0) - vid_seen = ++seen; /* * Truth table for RB_MULTIPLE | RB_SERIAL From owner-svn-src-stable-12@freebsd.org Fri Oct 9 22:42:05 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9091742F2F7; Fri, 9 Oct 2020 22:42:05 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7NNs38ZYz3WJg; Fri, 9 Oct 2020 22:42:05 +0000 (UTC) (envelope-from allanjude@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 357BF20951; Fri, 9 Oct 2020 22:42:05 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 099Mg4pA024810; Fri, 9 Oct 2020 22:42:04 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 099Mg4Lg024808; Fri, 9 Oct 2020 22:42:04 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202010092242.099Mg4Lg024808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 9 Oct 2020 22:42:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366590 - in stable/12: stand/libsa/zfs usr.bin/netstat X-SVN-Group: stable-12 X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: in stable/12: stand/libsa/zfs usr.bin/netstat X-SVN-Commit-Revision: 366590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 22:42:05 -0000 Author: allanjude Date: Fri Oct 9 22:42:04 2020 New Revision: 366590 URL: https://svnweb.freebsd.org/changeset/base/366590 Log: MFC r364787: ZFS: whitelist zstd and encryption in the loader Please note that neither zstd nor encryption is supported by the loader at this instant. This change makes it safe to use those features in one's root pool, but not in one's root dataset. Modified: stable/12/stand/libsa/zfs/zfsimpl.c stable/12/usr.bin/netstat/route.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/libsa/zfs/zfsimpl.c ============================================================================== --- stable/12/stand/libsa/zfs/zfsimpl.c Fri Oct 9 22:23:39 2020 (r366589) +++ stable/12/stand/libsa/zfs/zfsimpl.c Fri Oct 9 22:42:04 2020 (r366590) @@ -127,6 +127,8 @@ static const char *features_for_read[] = { "com.delphix:device_removal", "com.delphix:obsolete_counts", "com.intel:allocation_classes", + "org.freebsd:zstd_compress", + "com.datto:encryption", NULL }; Modified: stable/12/usr.bin/netstat/route.c ============================================================================== --- stable/12/usr.bin/netstat/route.c Fri Oct 9 22:23:39 2020 (r366589) +++ stable/12/usr.bin/netstat/route.c Fri Oct 9 22:42:04 2020 (r366590) @@ -772,12 +772,7 @@ rt_stats(void) xo_emit("{W:rtstat: symbol not in namelist}\n"); return; } - if ((rttaddr = nl[N_RTTRASH].n_value) == 0) { - xo_emit("{W:rttrash: symbol not in namelist}\n"); - return; - } kread(rtsaddr, (char *)&rtstat, sizeof (rtstat)); - kread(rttaddr, (char *)&rttrash, sizeof (rttrash)); xo_emit("{T:routing}:\n"); #define p(f, m) if (rtstat.f || sflag <= 1) \ @@ -793,7 +788,17 @@ rt_stats(void) "{N:/destination%s found unreachable}\n"); p(rts_wildcard, "\t{:wildcard-uses/%hu} " "{N:/use%s of a wildcard route}\n"); + p(rts_nh_idx_alloc_failure, "\t{:nexthop-index-alloc-failures/%hu} " + "{N:/nexthop index alloc failure%s}\n"); + p(rts_nh_alloc_failure, "\t{:nexthop-alloc-failures/%hu} " + "{N:/nexthop allocation failure%s}\n"); #undef p + + if ((rttaddr = nl[N_RTTRASH].n_value) == 0) { + xo_emit("{W:rttrash: symbol not in namelist}\n"); + return; + } + kread(rttaddr, (char *)&rttrash, sizeof (rttrash)); if (rttrash || sflag <= 1) xo_emit("\t{:unused-but-not-freed/%u} " From owner-svn-src-stable-12@freebsd.org Fri Oct 9 22:50:16 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC50C42FB20; Fri, 9 Oct 2020 22:50:16 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7NZJ4YzBz3WZj; Fri, 9 Oct 2020 22:50:16 +0000 (UTC) (envelope-from allanjude@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 800F5208CC; Fri, 9 Oct 2020 22:50:16 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 099MoGxu025398; Fri, 9 Oct 2020 22:50:16 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 099MoGnj025397; Fri, 9 Oct 2020 22:50:16 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202010092250.099MoGnj025397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 9 Oct 2020 22:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366591 - stable/12/stand/efi/loader X-SVN-Group: stable-12 X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: stable/12/stand/efi/loader X-SVN-Commit-Revision: 366591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 22:50:16 -0000 Author: allanjude Date: Fri Oct 9 22:50:16 2020 New Revision: 366591 URL: https://svnweb.freebsd.org/changeset/base/366591 Log: Revert r366590 that contains garbage Modified: stable/12/stand/efi/loader/main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/efi/loader/main.c ============================================================================== --- stable/12/stand/efi/loader/main.c Fri Oct 9 22:42:04 2020 (r366590) +++ stable/12/stand/efi/loader/main.c Fri Oct 9 22:50:16 2020 (r366591) @@ -717,10 +717,6 @@ parse_uefi_con_out(void) ep = buf + sz; node = (EFI_DEVICE_PATH *)buf; while ((char *)node < ep) { - if (IsDevicePathEndType(node)) { - if (pci_pending && vid_seen == 0) - vid_seen = ++seen; - } pci_pending = false; if (DevicePathType(node) == ACPI_DEVICE_PATH && DevicePathSubType(node) == ACPI_DP) { @@ -753,6 +749,8 @@ parse_uefi_con_out(void) } node = NextDevicePathNode(node); /* Skip the end node */ } + if (pci_pending && vid_seen == 0) + vid_seen = ++seen; /* * Truth table for RB_MULTIPLE | RB_SERIAL From owner-svn-src-stable-12@freebsd.org Fri Oct 9 22:59:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3BDD242FA6D; Fri, 9 Oct 2020 22:59:29 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7Nmx0qQ3z3X10; Fri, 9 Oct 2020 22:59:29 +0000 (UTC) (envelope-from allanjude@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7CEF20E38; Fri, 9 Oct 2020 22:59:28 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 099MxSjK031513; Fri, 9 Oct 2020 22:59:28 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 099MxSsS031510; Fri, 9 Oct 2020 22:59:28 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202010092259.099MxSsS031510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 9 Oct 2020 22:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366592 - in stable/12: stand/efi/loader stand/libsa/zfs usr.bin/netstat X-SVN-Group: stable-12 X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: in stable/12: stand/efi/loader stand/libsa/zfs usr.bin/netstat X-SVN-Commit-Revision: 366592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 22:59:29 -0000 Author: allanjude Date: Fri Oct 9 22:59:27 2020 New Revision: 366592 URL: https://svnweb.freebsd.org/changeset/base/366592 Log: Clean up the mess I made with r366590 and r366591 Modified: stable/12/stand/efi/loader/main.c stable/12/stand/libsa/zfs/zfsimpl.c stable/12/usr.bin/netstat/route.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/efi/loader/main.c ============================================================================== --- stable/12/stand/efi/loader/main.c Fri Oct 9 22:50:16 2020 (r366591) +++ stable/12/stand/efi/loader/main.c Fri Oct 9 22:59:27 2020 (r366592) @@ -717,6 +717,10 @@ parse_uefi_con_out(void) ep = buf + sz; node = (EFI_DEVICE_PATH *)buf; while ((char *)node < ep) { + if (IsDevicePathEndType(node)) { + if (pci_pending && vid_seen == 0) + vid_seen = ++seen; + } pci_pending = false; if (DevicePathType(node) == ACPI_DEVICE_PATH && DevicePathSubType(node) == ACPI_DP) { @@ -749,8 +753,6 @@ parse_uefi_con_out(void) } node = NextDevicePathNode(node); /* Skip the end node */ } - if (pci_pending && vid_seen == 0) - vid_seen = ++seen; /* * Truth table for RB_MULTIPLE | RB_SERIAL Modified: stable/12/stand/libsa/zfs/zfsimpl.c ============================================================================== --- stable/12/stand/libsa/zfs/zfsimpl.c Fri Oct 9 22:50:16 2020 (r366591) +++ stable/12/stand/libsa/zfs/zfsimpl.c Fri Oct 9 22:59:27 2020 (r366592) @@ -127,8 +127,6 @@ static const char *features_for_read[] = { "com.delphix:device_removal", "com.delphix:obsolete_counts", "com.intel:allocation_classes", - "org.freebsd:zstd_compress", - "com.datto:encryption", NULL }; Modified: stable/12/usr.bin/netstat/route.c ============================================================================== --- stable/12/usr.bin/netstat/route.c Fri Oct 9 22:50:16 2020 (r366591) +++ stable/12/usr.bin/netstat/route.c Fri Oct 9 22:59:27 2020 (r366592) @@ -772,7 +772,12 @@ rt_stats(void) xo_emit("{W:rtstat: symbol not in namelist}\n"); return; } + if ((rttaddr = nl[N_RTTRASH].n_value) == 0) { + xo_emit("{W:rttrash: symbol not in namelist}\n"); + return; + } kread(rtsaddr, (char *)&rtstat, sizeof (rtstat)); + kread(rttaddr, (char *)&rttrash, sizeof (rttrash)); xo_emit("{T:routing}:\n"); #define p(f, m) if (rtstat.f || sflag <= 1) \ @@ -788,17 +793,7 @@ rt_stats(void) "{N:/destination%s found unreachable}\n"); p(rts_wildcard, "\t{:wildcard-uses/%hu} " "{N:/use%s of a wildcard route}\n"); - p(rts_nh_idx_alloc_failure, "\t{:nexthop-index-alloc-failures/%hu} " - "{N:/nexthop index alloc failure%s}\n"); - p(rts_nh_alloc_failure, "\t{:nexthop-alloc-failures/%hu} " - "{N:/nexthop allocation failure%s}\n"); #undef p - - if ((rttaddr = nl[N_RTTRASH].n_value) == 0) { - xo_emit("{W:rttrash: symbol not in namelist}\n"); - return; - } - kread(rttaddr, (char *)&rttrash, sizeof (rttrash)); if (rttrash || sflag <= 1) xo_emit("\t{:unused-but-not-freed/%u} " From owner-svn-src-stable-12@freebsd.org Fri Oct 9 23:02:10 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8144342FDAA; Fri, 9 Oct 2020 23:02:10 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7Nr22xJ7z3XJx; Fri, 9 Oct 2020 23:02:10 +0000 (UTC) (envelope-from allanjude@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48AF620DE2; Fri, 9 Oct 2020 23:02:10 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 099N2AGv037102; Fri, 9 Oct 2020 23:02:10 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 099N2Axn037101; Fri, 9 Oct 2020 23:02:10 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202010092302.099N2Axn037101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 9 Oct 2020 23:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366593 - stable/12/stand/libsa/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: stable/12/stand/libsa/zfs X-SVN-Commit-Revision: 366593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 23:02:10 -0000 Author: allanjude Date: Fri Oct 9 23:02:09 2020 New Revision: 366593 URL: https://svnweb.freebsd.org/changeset/base/366593 Log: MFC r364787: ZFS: whitelist zstd and encryption in the loader Please note that neither zstd nor encryption is supported by the loader at this instant. This change makes it safe to use those features in one's root pool, but not in one's root dataset. Modified: stable/12/stand/libsa/zfs/zfsimpl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/libsa/zfs/zfsimpl.c ============================================================================== --- stable/12/stand/libsa/zfs/zfsimpl.c Fri Oct 9 22:59:27 2020 (r366592) +++ stable/12/stand/libsa/zfs/zfsimpl.c Fri Oct 9 23:02:09 2020 (r366593) @@ -127,6 +127,8 @@ static const char *features_for_read[] = { "com.delphix:device_removal", "com.delphix:obsolete_counts", "com.intel:allocation_classes", + "org.freebsd:zstd_compress", + "com.datto:encryption", NULL }; From owner-svn-src-stable-12@freebsd.org Sat Oct 10 09:40:03 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E83314418C6; Sat, 10 Oct 2020 09:40:03 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7g035j0Hz4VnM; Sat, 10 Oct 2020 09:40:03 +0000 (UTC) (envelope-from gbe@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A79DB865D; Sat, 10 Oct 2020 09:40:03 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09A9e3es036629; Sat, 10 Oct 2020 09:40:03 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09A9e3E1036628; Sat, 10 Oct 2020 09:40:03 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202010100940.09A9e3E1036628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 10 Oct 2020 09:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366602 - stable/12/usr.bin/cpuset X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/usr.bin/cpuset X-SVN-Commit-Revision: 366602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 09:40:04 -0000 Author: gbe (doc committer) Date: Sat Oct 10 09:40:03 2020 New Revision: 366602 URL: https://svnweb.freebsd.org/changeset/base/366602 Log: MFC r366414: cpuset(1): Fix some issues reported by mandoc - whitespace at end of input line - new sentence, new line Modified: stable/12/usr.bin/cpuset/cpuset.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/cpuset/cpuset.1 ============================================================================== --- stable/12/usr.bin/cpuset/cpuset.1 Sat Oct 10 08:02:23 2020 (r366601) +++ stable/12/usr.bin/cpuset/cpuset.1 Sat Oct 10 09:40:03 2020 (r366602) @@ -34,24 +34,24 @@ .Sh SYNOPSIS .Nm .Op Fl l Ar cpu-list -.Op Fl n Ar policy:domain-list +.Op Fl n Ar policy:domain-list .Op Fl s Ar setid .Ar cmd ... .Nm .Op Fl l Ar cpu-list -.Op Fl n Ar policy:domain-list +.Op Fl n Ar policy:domain-list .Op Fl s Ar setid .Fl p Ar pid .Nm .Op Fl c .Op Fl l Ar cpu-list -.Op Fl n Ar policy:domain-list +.Op Fl n Ar policy:domain-list .Fl C .Fl p Ar pid .Nm .Op Fl c .Op Fl l Ar cpu-list -.Op Fl n Ar policy:domain-list +.Op Fl n Ar policy:domain-list .Op Fl j Ar jail | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq .Nm .Fl g @@ -97,8 +97,8 @@ This last set is the list of all possible CPUs in the queried using .Fl r . .Pp -Most sets include NUMA memory domain and policy information. This can be -inspected with +Most sets include NUMA memory domain and policy information. +This can be inspected with .Fl g and set with .Fl n . @@ -124,8 +124,8 @@ Create a new cpuset and assign the target process to t The requested operation should reference the cpuset available via the target specifier. .It Fl d Ar domain -Specifies a NUMA domain id as the target of the operation. This can only -be used to query the cpus visible in each numberd domain. +Specifies a NUMA domain id as the target of the operation. +This can only be used to query the cpus visible in each numberd domain. .It Fl g Causes .Nm @@ -146,8 +146,8 @@ A special list of .Dq all may be specified in which case the list includes all CPUs from the root set. .It Fl n Ar policy:domain-list -Specifies a list of domains and allocation policy to apply to a target. Ranges -may be specified as in +Specifies a list of domains and allocation policy to apply to a target. +Ranges may be specified as in .Fl l . Valid policies include first-touch (ft), round-robin (rr), prefer and interleave (il). From owner-svn-src-stable-12@freebsd.org Sat Oct 10 09:41:21 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 655FC4418E2; Sat, 10 Oct 2020 09:41:21 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7g1Y24nsz4W5Z; Sat, 10 Oct 2020 09:41:21 +0000 (UTC) (envelope-from gbe@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A9E58EA6; Sat, 10 Oct 2020 09:41:21 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09A9fLIg041749; Sat, 10 Oct 2020 09:41:21 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09A9fLrN041748; Sat, 10 Oct 2020 09:41:21 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202010100941.09A9fLrN041748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 10 Oct 2020 09:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366603 - stable/12/sbin/camcontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/sbin/camcontrol X-SVN-Commit-Revision: 366603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 09:41:21 -0000 Author: gbe (doc committer) Date: Sat Oct 10 09:41:20 2020 New Revision: 366603 URL: https://svnweb.freebsd.org/changeset/base/366603 Log: MFC r366406: camcontrol(8): Bugfixes for some issues reported by mandoc - new sentence, new line Modified: stable/12/sbin/camcontrol/camcontrol.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/12/sbin/camcontrol/camcontrol.8 Sat Oct 10 09:40:03 2020 (r366602) +++ stable/12/sbin/camcontrol/camcontrol.8 Sat Oct 10 09:41:20 2020 (r366603) @@ -1511,10 +1511,10 @@ user. This option can be combined with other options such as .Fl e Em pwd .Pp -A master password may be set in a addition to the user password. The purpose of -the master password is to allow an administrator to establish a password that -is kept secret from the user, and which may be used to unlock the device if the -user password is lost. +A master password may be set in a addition to the user password. +The purpose of the master password is to allow an administrator to establish +a password that is kept secret from the user, and which may be used to unlock +the device if the user password is lost. .Pp .Em Note: Setting the master password does not enable device security. @@ -2528,7 +2528,8 @@ whether it is enabled and what the timer value is. .It Ic timestamp Issue REPORT TIMESTAMP or SET TIMESTAMP .Tn SCSI -commands. Either the +commands. +Either the .Fl r option or the .Fl s @@ -2552,7 +2553,8 @@ time, but override the system time zone and use UTC in .El .Bl -tag -width 6n .It Fl s -Set the device's timestamp. Either the +Set the device's timestamp. +Either the .Fl f and .Fl T From owner-svn-src-stable-12@freebsd.org Sat Oct 10 09:42:24 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D8DE54418F7; Sat, 10 Oct 2020 09:42:24 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7g2m5Vddz4WHF; Sat, 10 Oct 2020 09:42:24 +0000 (UTC) (envelope-from gbe@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0F7E8C2A; Sat, 10 Oct 2020 09:42:24 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09A9gO0x042537; Sat, 10 Oct 2020 09:42:24 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09A9gOYA042536; Sat, 10 Oct 2020 09:42:24 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202010100942.09A9gOYA042536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 10 Oct 2020 09:42:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366604 - stable/12/sbin/veriexec X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/sbin/veriexec X-SVN-Commit-Revision: 366604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 09:42:24 -0000 Author: gbe (doc committer) Date: Sat Oct 10 09:42:24 2020 New Revision: 366604 URL: https://svnweb.freebsd.org/changeset/base/366604 Log: MFC r366409: veriexec(8): Bugfix for an issue reported by mandoc - consider using OS macro: Nx Modified: stable/12/sbin/veriexec/veriexec.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/veriexec/veriexec.8 ============================================================================== --- stable/12/sbin/veriexec/veriexec.8 Sat Oct 10 09:41:20 2020 (r366603) +++ stable/12/sbin/veriexec/veriexec.8 Sat Oct 10 09:42:24 2020 (r366604) @@ -138,9 +138,8 @@ they are provided for the use of other .Xr mac 4 modules. .Sh HISTORY -The Verified Exec system first appeared in NetBSD. +The Verified Exec system first appeared in +.Nx . This utility derrives from the one found in Junos. The key difference is the requirement that manifest files be digitally signed. - - From owner-svn-src-stable-12@freebsd.org Sat Oct 10 09:43:36 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 570E5441F0C; Sat, 10 Oct 2020 09:43:36 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7g481dhvz4WQn; Sat, 10 Oct 2020 09:43:36 +0000 (UTC) (envelope-from gbe@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C0F78D31; Sat, 10 Oct 2020 09:43:36 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09A9hZ0J042645; Sat, 10 Oct 2020 09:43:35 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09A9hZXQ042644; Sat, 10 Oct 2020 09:43:35 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202010100943.09A9hZXQ042644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 10 Oct 2020 09:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366605 - stable/12/bin/cp X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/bin/cp X-SVN-Commit-Revision: 366605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 09:43:36 -0000 Author: gbe (doc committer) Date: Sat Oct 10 09:43:35 2020 New Revision: 366605 URL: https://svnweb.freebsd.org/changeset/base/366605 Log: MFC 366404: cp(1): Bugfixes for some issues reported by mandoc - no blank before trailing delimiter Modified: stable/12/bin/cp/cp.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/cp/cp.1 ============================================================================== --- stable/12/bin/cp/cp.1 Sat Oct 10 09:42:24 2020 (r366604) +++ stable/12/bin/cp/cp.1 Sat Oct 10 09:43:35 2020 (r366605) @@ -300,9 +300,9 @@ differ as they copy special files as normal files while recreating a hierarchy. .Pp The -.Fl l, -.Fl s, -.Fl v, +.Fl l , +.Fl s , +.Fl v , .Fl x and .Fl n From owner-svn-src-stable-12@freebsd.org Sat Oct 10 09:44:57 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A102441F83; Sat, 10 Oct 2020 09:44:57 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7g5j3gt5z4Wcn; Sat, 10 Oct 2020 09:44:57 +0000 (UTC) (envelope-from gbe@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 618F3867C; Sat, 10 Oct 2020 09:44:57 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09A9ivMZ042790; Sat, 10 Oct 2020 09:44:57 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09A9ivog042789; Sat, 10 Oct 2020 09:44:57 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202010100944.09A9ivog042789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 10 Oct 2020 09:44:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366606 - stable/12/sbin/gvinum X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/sbin/gvinum X-SVN-Commit-Revision: 366606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 09:44:57 -0000 Author: gbe (doc committer) Date: Sat Oct 10 09:44:56 2020 New Revision: 366606 URL: https://svnweb.freebsd.org/changeset/base/366606 Log: MFC r366411: gvinum(8): Fix an issue reported by mandoc - new sentence, new line Modified: stable/12/sbin/gvinum/gvinum.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/gvinum/gvinum.8 ============================================================================== --- stable/12/sbin/gvinum/gvinum.8 Sat Oct 10 09:43:35 2020 (r366605) +++ stable/12/sbin/gvinum/gvinum.8 Sat Oct 10 09:44:56 2020 (r366606) @@ -202,8 +202,8 @@ Terminate access to the objects, or stop .Nm if no parameters are specified. .It Ic stripe Oo Fl fv Oc Oo Fl n Ar name Oc Ar drives -Create a striped volume from the specified drives. If no name is specified, -a unique name will be set by +Create a striped volume from the specified drives. +If no name is specified, a unique name will be set by .Ic gvinum . This organization requires at least two drives. .El From owner-svn-src-stable-12@freebsd.org Sat Oct 10 09:50:10 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9119C441F9B; Sat, 10 Oct 2020 09:50:10 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7gCk3KSnz4WXv; Sat, 10 Oct 2020 09:50:10 +0000 (UTC) (envelope-from gbe@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 556A58EB8; Sat, 10 Oct 2020 09:50:10 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09A9oAOh043192; Sat, 10 Oct 2020 09:50:10 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09A9o9KF043190; Sat, 10 Oct 2020 09:50:09 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202010100950.09A9o9KF043190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 10 Oct 2020 09:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366607 - in stable/12/sbin: devd fsdb mdmfs X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12/sbin: devd fsdb mdmfs X-SVN-Commit-Revision: 366607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 09:50:10 -0000 Author: gbe (doc committer) Date: Sat Oct 10 09:50:09 2020 New Revision: 366607 URL: https://svnweb.freebsd.org/changeset/base/366607 Log: MFC r366408, r366410, r366405 fsdb(8): Fix an issue reported by mandoc mdmfs(8): Fix an issue reported by mandoc devd.conf(5): Bugfix for an issue reported by mandoc - whitespace at end of input line Modified: stable/12/sbin/devd/devd.conf.5 stable/12/sbin/fsdb/fsdb.8 stable/12/sbin/mdmfs/mdmfs.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/devd/devd.conf.5 ============================================================================== --- stable/12/sbin/devd/devd.conf.5 Sat Oct 10 09:44:56 2020 (r366606) +++ stable/12/sbin/devd/devd.conf.5 Sat Oct 10 09:50:09 2020 (r366607) @@ -532,7 +532,7 @@ keyboard has been pressed. A brightness level change has been requested. Direction is in the $notify variable. .It Li PMU Ta Li keys Ta mute Ta -The mute key +The mute key .It Li PMU Ta Li keys Ta volume Ta A volume level change has been requested. Direction is in the $notify variable. Modified: stable/12/sbin/fsdb/fsdb.8 ============================================================================== --- stable/12/sbin/fsdb/fsdb.8 Sat Oct 10 09:44:56 2020 (r366606) +++ stable/12/sbin/fsdb/fsdb.8 Sat Oct 10 09:50:09 2020 (r366607) @@ -251,7 +251,7 @@ appeared in written by .An John T. Kohl . It first appeared in -.Fx 2.1.5 +.Fx 2.1.5 ported by Peter Wemm. .Sh BUGS Manipulation of ``short'' symlinks has no effect. Modified: stable/12/sbin/mdmfs/mdmfs.8 ============================================================================== --- stable/12/sbin/mdmfs/mdmfs.8 Sat Oct 10 09:44:56 2020 (r366606) +++ stable/12/sbin/mdmfs/mdmfs.8 Sat Oct 10 09:50:09 2020 (r366607) @@ -70,7 +70,7 @@ Based on .Ar md-device , the .Nm -utility either creates a +utility either creates a .Xr tmpfs 5 filesystem, or it configures an .Xr md 4 From owner-svn-src-stable-12@freebsd.org Sat Oct 10 09:52:42 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7DCE442312; Sat, 10 Oct 2020 09:52:42 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7gGf3wnzz4Wt4; Sat, 10 Oct 2020 09:52:42 +0000 (UTC) (envelope-from gbe@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FF638F3B; Sat, 10 Oct 2020 09:52:42 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09A9qgiu048714; Sat, 10 Oct 2020 09:52:42 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09A9qfvc048712; Sat, 10 Oct 2020 09:52:41 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202010100952.09A9qfvc048712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 10 Oct 2020 09:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366608 - in stable/12: bin/ls sbin/dhclient X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12: bin/ls sbin/dhclient X-SVN-Commit-Revision: 366608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 09:52:42 -0000 Author: gbe (doc committer) Date: Sat Oct 10 09:52:41 2020 New Revision: 366608 URL: https://svnweb.freebsd.org/changeset/base/366608 Log: MFC r366407, r366403 ls(1): Bugfix for an issue reported by mandoc dhclient(8): Bugfixes for some issues reported by mandoc - no blank before trailing delimiter - new sentence, new line Modified: stable/12/bin/ls/ls.1 stable/12/sbin/dhclient/dhclient.leases.5 stable/12/sbin/dhclient/dhcp-options.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/ls/ls.1 ============================================================================== --- stable/12/bin/ls/ls.1 Sat Oct 10 09:50:09 2020 (r366607) +++ stable/12/bin/ls/ls.1 Sat Oct 10 09:52:41 2020 (r366608) @@ -40,7 +40,7 @@ .Nd list directory contents .Sh SYNOPSIS .Nm -.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1, +.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1 , .Op Fl -color Ns = Ns Ar when .Op Fl D Ar format .Op Ar Modified: stable/12/sbin/dhclient/dhclient.leases.5 ============================================================================== --- stable/12/sbin/dhclient/dhclient.leases.5 Sat Oct 10 09:50:09 2020 (r366607) +++ stable/12/sbin/dhclient/dhclient.leases.5 Sat Oct 10 09:52:41 2020 (r366608) @@ -54,7 +54,7 @@ the last one in the file is used. The file is written as a log, so this is not an unusual occurrence. .Pp The lease file is named -.Pa dhclient.leases. Ns Ar IFNAME , +.Pa dhclient.leases . Ns Ar IFNAME , where .Ar IFNAME represents the network interface the DHCP client acquired the lease on. @@ -70,7 +70,7 @@ The format of the lease declarations is described in .Xr dhclient.conf 5 . .Sh FILES .Bl -tag -width ".Pa /var/db/dhclient.leases. Ns Ar IFNAME" -.It Pa /var/db/dhclient.leases. Ns Ar IFNAME +.It Pa /var/db/dhclient.leases . Ns Ar IFNAME Current lease file. .El .Sh SEE ALSO Modified: stable/12/sbin/dhclient/dhcp-options.5 ============================================================================== --- stable/12/sbin/dhclient/dhcp-options.5 Sat Oct 10 09:50:09 2020 (r366607) +++ stable/12/sbin/dhclient/dhcp-options.5 Sat Oct 10 09:52:41 2020 (r366608) @@ -267,8 +267,8 @@ This option specifies the domain name that the client resolving hostnames via the Domain Name System. .It Ic option domain-search Ar string ; This option specifies a list of domain names that the client should use -when resolving hostnames via the Domain Name System. This option is -defined in RFC 3397. +when resolving hostnames via the Domain Name System. +This option is defined in RFC 3397. .It Ic option swap-server Ar ip-address ; This specifies the IP address of the client's swap server. .It Ic option root-path Ar string ; From owner-svn-src-stable-12@freebsd.org Sat Oct 10 13:12:45 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6E49447562; Sat, 10 Oct 2020 13:12:45 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4C7ljS6kDfz3VDR; Sat, 10 Oct 2020 13:12:43 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.15.2/8.15.2) with ESMTP id 09ADChZi001500; Sat, 10 Oct 2020 08:12:43 -0500 (CDT) (envelope-from mike@karels.net) Message-Id: <202010101312.09ADChZi001500@mail.karels.net> To: Gordon Bergling cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org From: Mike Karels Reply-to: mike@karels.net Subject: Re: svn commit: r366608 - in stable/12: bin/ls sbin/dhclient In-reply-to: Your message of Sat, 10 Oct 2020 09:52:41 -0000. <202010100952.09A9qfvc048712@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1498.1602335563.1@mail.karels.net> Content-Transfer-Encoding: quoted-printable Date: Sat, 10 Oct 2020 08:12:43 -0500 X-Rspamd-Queue-Id: 4C7ljS6kDfz3VDR X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Spamd-Result: default: False [-1.86 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[mike@karels.net]; FREEFALL_USER(0.00)[mike]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; DMARC_NA(0.00)[karels.net]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-0.95)[-0.951]; NEURAL_HAM_MEDIUM(-0.76)[-0.760]; NEURAL_SPAM_SHORT(0.05)[0.052]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-stable-12,svn-src-stable,svn-src-all] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 13:12:45 -0000 > Author: gbe (doc committer) > Date: Sat Oct 10 09:52:41 2020 > New Revision: 366608 > URL: https://svnweb.freebsd.org/changeset/base/366608 > Log: > MFC r366407, r366403 > = > ls(1): Bugfix for an issue reported by mandoc > dhclient(8): Bugfixes for some issues reported by mandoc > = > - no blank before trailing delimiter > - new sentence, new line > Modified: > stable/12/bin/ls/ls.1 > stable/12/sbin/dhclient/dhclient.leases.5 > stable/12/sbin/dhclient/dhcp-options.5 > Directory Properties: > stable/12/ (props changed) > Modified: stable/12/bin/ls/ls.1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/12/bin/ls/ls.1 Sat Oct 10 09:50:09 2020 (r366607) > +++ stable/12/bin/ls/ls.1 Sat Oct 10 09:52:41 2020 (r366608) > @@ -40,7 +40,7 @@ > .Nd list directory contents > .Sh SYNOPSIS > .Nm > -.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1, > +.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1 , > .Op Fl -color Ns =3D Ns Ar when > .Op Fl D Ar format > .Op Ar This change is wrong, and should not have been MFC'd. It should be fixed correctly instead. The comma is not a delimiter, it is an option; it shou= ld appear inside the brackets, not after. The warning can be fixed by adding \& after the comma rather than inserting a space. Mike From owner-svn-src-stable-12@freebsd.org Sat Oct 10 13:28:32 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E7AA44791A; Sat, 10 Oct 2020 13:28:32 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7m3h3fR5z3VkP; Sat, 10 Oct 2020 13:28:32 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p4fd3acce.dip0.t-ipconnect.de [79.211.172.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 1F5FC16123; Sat, 10 Oct 2020 13:28:32 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Sat, 10 Oct 2020 15:28:29 +0200 From: Gordon Bergling To: Mike Karels Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r366608 - in stable/12: bin/ls sbin/dhclient Message-ID: <20201010132829.GA68899@lion.0xfce3.net> References: <202010100952.09A9qfvc048712@repo.freebsd.org> <202010101312.09ADChZi001500@mail.karels.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202010101312.09ADChZi001500@mail.karels.net> X-Url: X-Operating-System: FreeBSD 12.2-STABLE amd64 X-Host-Uptime: 3:24PM up 1 day, 2:46, 3 users, load averages: 0.29, 0.25, 0.25 X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 13:28:32 -0000 On Sat, Oct 10, 2020 at 08:12:43AM -0500, Mike Karels wrote: > > Author: gbe (doc committer) > > Date: Sat Oct 10 09:52:41 2020 > > New Revision: 366608 > > URL: https://svnweb.freebsd.org/changeset/base/366608 > > > Log: > > MFC r366407, r366403 > > > > ls(1): Bugfix for an issue reported by mandoc > > dhclient(8): Bugfixes for some issues reported by mandoc > > > > - no blank before trailing delimiter > > - new sentence, new line > > > Modified: > > stable/12/bin/ls/ls.1 > > stable/12/sbin/dhclient/dhclient.leases.5 > > stable/12/sbin/dhclient/dhcp-options.5 > > Directory Properties: > > stable/12/ (props changed) > > > Modified: stable/12/bin/ls/ls.1 > > ============================================================================== > > --- stable/12/bin/ls/ls.1 Sat Oct 10 09:50:09 2020 (r366607) > > +++ stable/12/bin/ls/ls.1 Sat Oct 10 09:52:41 2020 (r366608) > > @@ -40,7 +40,7 @@ > > .Nd list directory contents > > .Sh SYNOPSIS > > .Nm > > -.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1, > > +.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1 , > > .Op Fl -color Ns = Ns Ar when > > .Op Fl D Ar format > > .Op Ar > > This change is wrong, and should not have been MFC'd. It should be fixed > correctly instead. The comma is not a delimiter, it is an option; it should > appear inside the brackets, not after. The warning can be fixed by adding > \& after the comma rather than inserting a space. > > Mike Hello Mike, if this change is wrong I'll correct it in head and MFC it afterwards. The output of ls(1) is still the same as it was before, checked via mandoc and man. --Gordon From owner-svn-src-stable-12@freebsd.org Sat Oct 10 13:33:58 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44E8F447B2B; Sat, 10 Oct 2020 13:33:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7m9y15HLz3W26; Sat, 10 Oct 2020 13:33:58 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 087FCB543; Sat, 10 Oct 2020 13:33:58 +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 09ADXvIK085342; Sat, 10 Oct 2020 13:33:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09ADXvq5085341; Sat, 10 Oct 2020 13:33:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202010101333.09ADXvq5085341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 10 Oct 2020 13:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366612 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 366612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 13:33:58 -0000 Author: kib Date: Sat Oct 10 13:33:57 2020 New Revision: 366612 URL: https://svnweb.freebsd.org/changeset/base/366612 Log: MFC r366514: Fix typo. Modified: stable/12/sys/net/if.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if.h ============================================================================== --- stable/12/sys/net/if.h Sat Oct 10 13:01:04 2020 (r366611) +++ stable/12/sys/net/if.h Sat Oct 10 13:33:57 2020 (r366612) @@ -210,7 +210,7 @@ struct if_data { * contains the enabled optional feature & capabilites that can be used * individually per packet and are specified in the mbuf pkthdr.csum_flags * field. IFCAP_* and CSUM_* do not match one to one and CSUM_* may be - * more detailed or differenciated than IFCAP_*. + * more detailed or differentiated than IFCAP_*. * Hwassist features are defined CSUM_* in sys/mbuf.h * * Capabilities that cannot be arbitrarily changed with ifconfig/ioctl From owner-svn-src-stable-12@freebsd.org Sat Oct 10 13:46:49 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2662B3F8103; Sat, 10 Oct 2020 13:46:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7mSn06zwz3WjH; Sat, 10 Oct 2020 13:46:49 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAD82BA22; Sat, 10 Oct 2020 13:46:48 +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 09ADkmun091719; Sat, 10 Oct 2020 13:46:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09ADkmB8091716; Sat, 10 Oct 2020 13:46:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202010101346.09ADkmB8091716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 10 Oct 2020 13:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366614 - in stable/12/sys/amd64: amd64 include X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys/amd64: amd64 include X-SVN-Commit-Revision: 366614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 13:46:49 -0000 Author: kib Date: Sat Oct 10 13:46:48 2020 New Revision: 366614 URL: https://svnweb.freebsd.org/changeset/base/366614 Log: MFC r366417: amd64: Store full 64bit of FIP/FDP for 64bit processes when using XSAVE. PR: 250043 Modified: stable/12/sys/amd64/amd64/cpu_switch.S stable/12/sys/amd64/amd64/fpu.c stable/12/sys/amd64/include/md_var.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/12/sys/amd64/amd64/cpu_switch.S Sat Oct 10 13:39:13 2020 (r366613) +++ stable/12/sys/amd64/amd64/cpu_switch.S Sat Oct 10 13:46:48 2020 (r366614) @@ -128,22 +128,25 @@ done_store_dr: /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) - jne 2f - movq PCB_SAVEFPU(%r8),%r8 + jne ctx_switch_fpusave_done + movq PCB_SAVEFPU(%r8),%r9 clts cmpl $0,use_xsave(%rip) jne 1f - fxsave (%r8) - jmp 2f + fxsave (%r9) + jmp ctx_switch_fpusave_done 1: movq %rdx,%rcx movl xsave_mask,%eax movl xsave_mask+4,%edx + testl $PCB_32BIT,PCB_FLAGS(%r8) + jne ctx_switch_xsave32 .globl ctx_switch_xsave ctx_switch_xsave: /* This is patched to xsaveopt if supported, see fpuinit_bsp1() */ - xsave (%r8) + xsave64 (%r9) +ctx_switch_xsave_done: movq %rcx,%rdx -2: +ctx_switch_fpusave_done: /* Save is done. Now fire up new thread. Leave old vmspace. */ movq %rsi,%r12 movq %rdi,%r13 @@ -306,6 +309,11 @@ do_ldt: movq PCPU(LDT),%rax movq %rdx,8(%rax) movl $LDTSEL,%eax jmp ld_ldt + + .globl ctx_switch_xsave32 +ctx_switch_xsave32: + xsave (%r9) + jmp ctx_switch_xsave_done END(cpu_switch) /* Modified: stable/12/sys/amd64/amd64/fpu.c ============================================================================== --- stable/12/sys/amd64/amd64/fpu.c Sat Oct 10 13:39:13 2020 (r366613) +++ stable/12/sys/amd64/amd64/fpu.c Sat Oct 10 13:46:48 2020 (r366614) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -80,7 +81,7 @@ __FBSDID("$FreeBSD$"); #define stmxcsr(addr) __asm __volatile("stmxcsr %0" : : "m" (*(addr))) static __inline void -xrstor(char *addr, uint64_t mask) +xrstor32(char *addr, uint64_t mask) { uint32_t low, hi; @@ -90,27 +91,59 @@ xrstor(char *addr, uint64_t mask) } static __inline void -xsave(char *addr, uint64_t mask) +xrstor64(char *addr, uint64_t mask) { uint32_t low, hi; low = mask; hi = mask >> 32; + __asm __volatile("xrstor64 %0" : : "m" (*addr), "a" (low), "d" (hi)); +} + +static __inline void +xsave32(char *addr, uint64_t mask) +{ + uint32_t low, hi; + + low = mask; + hi = mask >> 32; __asm __volatile("xsave %0" : "=m" (*addr) : "a" (low), "d" (hi) : "memory"); } static __inline void -xsaveopt(char *addr, uint64_t mask) +xsave64(char *addr, uint64_t mask) { uint32_t low, hi; low = mask; hi = mask >> 32; + __asm __volatile("xsave64 %0" : "=m" (*addr) : "a" (low), "d" (hi) : + "memory"); +} + +static __inline void +xsaveopt32(char *addr, uint64_t mask) +{ + uint32_t low, hi; + + low = mask; + hi = mask >> 32; __asm __volatile("xsaveopt %0" : "=m" (*addr) : "a" (low), "d" (hi) : "memory"); } +static __inline void +xsaveopt64(char *addr, uint64_t mask) +{ + uint32_t low, hi; + + low = mask; + hi = mask >> 32; + __asm __volatile("xsaveopt64 %0" : "=m" (*addr) : "a" (low), "d" (hi) : + "memory"); +} + #else /* !(__GNUCLIKE_ASM && !lint) */ void fldcw(u_short cw); @@ -122,9 +155,12 @@ void fxsave(caddr_t addr); void fxrstor(caddr_t addr); void ldmxcsr(u_int csr); void stmxcsr(u_int *csr); -void xrstor(char *addr, uint64_t mask); -void xsave(char *addr, uint64_t mask); -void xsaveopt(char *addr, uint64_t mask); +void xrstor32(char *addr, uint64_t mask); +void xrstor64(char *addr, uint64_t mask); +void xsave32(char *addr, uint64_t mask); +void xsave64(char *addr, uint64_t mask); +void xsaveopt32(char *addr, uint64_t mask); +void xsaveopt64(char *addr, uint64_t mask); #endif /* __GNUCLIKE_ASM && !lint */ @@ -170,24 +206,48 @@ struct xsave_area_elm_descr { } *xsave_area_desc; static void -fpusave_xsaveopt(void *addr) +fpusave_xsaveopt64(void *addr) { + xsaveopt64((char *)addr, xsave_mask); +} - xsaveopt((char *)addr, xsave_mask); +static void +fpusave_xsaveopt3264(void *addr) +{ + if (SV_CURPROC_FLAG(SV_ILP32)) + xsaveopt32((char *)addr, xsave_mask); + else + xsaveopt64((char *)addr, xsave_mask); } static void -fpusave_xsave(void *addr) +fpusave_xsave64(void *addr) { + xsave64((char *)addr, xsave_mask); +} - xsave((char *)addr, xsave_mask); +static void +fpusave_xsave3264(void *addr) +{ + if (SV_CURPROC_FLAG(SV_ILP32)) + xsave32((char *)addr, xsave_mask); + else + xsave64((char *)addr, xsave_mask); } static void -fpurestore_xrstor(void *addr) +fpurestore_xrstor64(void *addr) { + xrstor64((char *)addr, xsave_mask); +} - xrstor((char *)addr, xsave_mask); +static void +fpurestore_xrstor3264(void *addr) +{ + if (SV_CURPROC_FLAG(SV_ILP32)) + xrstor32((char *)addr, xsave_mask); + else + xrstor64((char *)addr, xsave_mask); } static void @@ -220,17 +280,24 @@ DEFINE_IFUNC(, void, fpusave, (void *), static) { init_xsave(); - if (use_xsave) - return ((cpu_stdext_feature & CPUID_EXTSTATE_XSAVEOPT) != 0 ? - fpusave_xsaveopt : fpusave_xsave); - return (fpusave_fxsave); + if (!use_xsave) + return (fpusave_fxsave); + if ((cpu_stdext_feature & CPUID_EXTSTATE_XSAVEOPT) != 0) { + return ((cpu_stdext_feature & CPUID_STDEXT_NFPUSG) != 0 ? + fpusave_xsaveopt64 : fpusave_xsaveopt3264); + } + return ((cpu_stdext_feature & CPUID_STDEXT_NFPUSG) != 0 ? + fpusave_xsave64 : fpusave_xsave3264); } DEFINE_IFUNC(, void, fpurestore, (void *), static) { init_xsave(); - return (use_xsave ? fpurestore_xrstor : fpurestore_fxrstor); + if (!use_xsave) + return (fpurestore_fxrstor); + return ((cpu_stdext_feature & CPUID_STDEXT_NFPUSG) != 0 ? + fpurestore_xrstor64 : fpurestore_xrstor3264); } void @@ -297,6 +364,7 @@ fpuinit_bsp1(void) * read-only before cpu_startup(). */ old_wp = disable_wp(); + ctx_switch_xsave32[3] |= 0x10; ctx_switch_xsave[3] |= 0x10; restore_wp(old_wp); } Modified: stable/12/sys/amd64/include/md_var.h ============================================================================== --- stable/12/sys/amd64/include/md_var.h Sat Oct 10 13:39:13 2020 (r366613) +++ stable/12/sys/amd64/include/md_var.h Sat Oct 10 13:46:48 2020 (r366614) @@ -38,6 +38,7 @@ extern uint64_t *vm_page_dump; extern char ctx_switch_xsave[]; +extern char ctx_switch_xsave32[]; extern int hw_lower_amd64_sharedpage; extern int hw_ibrs_disable; extern int hw_ssb_disable; From owner-svn-src-stable-12@freebsd.org Sat Oct 10 14:02:53 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C110C3F825E; Sat, 10 Oct 2020 14:02:53 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4C7mqJ3yShz3XPQ; Sat, 10 Oct 2020 14:02:52 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.15.2/8.15.2) with ESMTP id 09AE2o7j001646; Sat, 10 Oct 2020 09:02:50 -0500 (CDT) (envelope-from mike@karels.net) Message-Id: <202010101402.09AE2o7j001646@mail.karels.net> To: Gordon Bergling cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org From: Mike Karels Reply-to: mike@karels.net Subject: Re: svn commit: r366608 - in stable/12: bin/ls sbin/dhclient In-reply-to: Your message of Sat, 10 Oct 2020 15:28:29 +0200. <20201010132829.GA68899@lion.0xfce3.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1644.1602338570.1@mail.karels.net> Content-Transfer-Encoding: quoted-printable Date: Sat, 10 Oct 2020 09:02:50 -0500 X-Rspamd-Queue-Id: 4C7mqJ3yShz3XPQ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Spamd-Result: default: False [-1.82 / 15.00]; HAS_REPLYTO(0.00)[mike@karels.net]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[mike]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; DMARC_NA(0.00)[karels.net]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-0.91)[-0.914]; NEURAL_HAM_MEDIUM(-0.72)[-0.724]; NEURAL_SPAM_SHORT(0.02)[0.016]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-stable-12,svn-src-stable,svn-src-all] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 14:02:53 -0000 > Date: Sat, 10 Oct 2020 15:28:29 +0200 > From: Gordon Bergling > On Sat, Oct 10, 2020 at 08:12:43AM -0500, Mike Karels wrote: > > > Author: gbe (doc committer) > > > Date: Sat Oct 10 09:52:41 2020 > > > New Revision: 366608 > > > URL: https://svnweb.freebsd.org/changeset/base/366608 > > = > > > Log: > > > MFC r366407, r366403 > > > = > > > ls(1): Bugfix for an issue reported by mandoc > > > dhclient(8): Bugfixes for some issues reported by mandoc > > > = > > > - no blank before trailing delimiter > > > - new sentence, new line > > = > > > Modified: > > > stable/12/bin/ls/ls.1 > > > stable/12/sbin/dhclient/dhclient.leases.5 > > > stable/12/sbin/dhclient/dhcp-options.5 > > > Directory Properties: > > > stable/12/ (props changed) > > = > > > Modified: stable/12/bin/ls/ls.1 > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > --- stable/12/bin/ls/ls.1 Sat Oct 10 09:50:09 2020 (r366607) > > > +++ stable/12/bin/ls/ls.1 Sat Oct 10 09:52:41 2020 (r366608) > > > @@ -40,7 +40,7 @@ > > > .Nd list directory contents > > > .Sh SYNOPSIS > > > .Nm > > > -.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1, > > > +.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1 , > > > .Op Fl -color Ns =3D Ns Ar when > > > .Op Fl D Ar format > > > .Op Ar > > = > > This change is wrong, and should not have been MFC'd. It should be fi= xed > > correctly instead. The comma is not a delimiter, it is an option; it = should > > appear inside the brackets, not after. The warning can be fixed by ad= ding > > \& after the comma rather than inserting a space. > > = > > Mike > Hello Mike, > if this change is wrong I'll correct it in head and MFC it afterwards. > The output of ls(1) is still the same as it was before, checked via mand= oc and > man. > --Gordon In my testing, the comma is inside the brackets in the original version: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1,] [--color=3Dwhen] [-D fo= rmat] [file ...] It is outside the brackets with this change: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1], [--color=3Dwhen] [-D fo= rmat] [file ...] The former is correct. Caveat, I'm running mandoc on 12.1. Mike From owner-svn-src-stable-12@freebsd.org Sat Oct 10 14:48:59 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8541E3F9D92; Sat, 10 Oct 2020 14:48:59 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7nrW2z15z3ZgM; Sat, 10 Oct 2020 14:48:59 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p4fd3acce.dip0.t-ipconnect.de [79.211.172.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id E7997165C8; Sat, 10 Oct 2020 14:48:58 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Sat, 10 Oct 2020 16:48:56 +0200 From: Gordon Bergling To: Mike Karels Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r366608 - in stable/12: bin/ls sbin/dhclient Message-ID: <20201010144856.GA16865@lion.0xfce3.net> References: <20201010132829.GA68899@lion.0xfce3.net> <202010101402.09AE2o7j001646@mail.karels.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202010101402.09AE2o7j001646@mail.karels.net> X-Url: X-Operating-System: FreeBSD 12.2-STABLE amd64 X-Host-Uptime: 4:39PM up 1 day, 4:01, 4 users, load averages: 0.20, 0.34, 0.30 X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 14:48:59 -0000 On Sat, Oct 10, 2020 at 09:02:50AM -0500, Mike Karels wrote: > > Date: Sat, 10 Oct 2020 15:28:29 +0200 > > From: Gordon Bergling > > On Sat, Oct 10, 2020 at 08:12:43AM -0500, Mike Karels wrote: > > > > Author: gbe (doc committer) > > > > Date: Sat Oct 10 09:52:41 2020 > > > > New Revision: 366608 > > > > URL: https://svnweb.freebsd.org/changeset/base/366608 > > > > > > > Log: > > > > MFC r366407, r366403 > > > > > > > > ls(1): Bugfix for an issue reported by mandoc > > > > dhclient(8): Bugfixes for some issues reported by mandoc > > > > > > > > - no blank before trailing delimiter > > > > - new sentence, new line > > > > > > > Modified: > > > > stable/12/bin/ls/ls.1 > > > > stable/12/sbin/dhclient/dhclient.leases.5 > > > > stable/12/sbin/dhclient/dhcp-options.5 > > > > Directory Properties: > > > > stable/12/ (props changed) > > > > > > > Modified: stable/12/bin/ls/ls.1 > > > > ============================================================================== > > > > --- stable/12/bin/ls/ls.1 Sat Oct 10 09:50:09 2020 (r366607) > > > > +++ stable/12/bin/ls/ls.1 Sat Oct 10 09:52:41 2020 (r366608) > > > > @@ -40,7 +40,7 @@ > > > > .Nd list directory contents > > > > .Sh SYNOPSIS > > > > .Nm > > > > -.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1, > > > > +.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1 , > > > > .Op Fl -color Ns = Ns Ar when > > > > .Op Fl D Ar format > > > > .Op Ar > > > > > > This change is wrong, and should not have been MFC'd. It should be fixed > > > correctly instead. The comma is not a delimiter, it is an option; it should > > > appear inside the brackets, not after. The warning can be fixed by adding > > > \& after the comma rather than inserting a space. > > > > > > Mike > > > Hello Mike, > > > if this change is wrong I'll correct it in head and MFC it afterwards. > > The output of ls(1) is still the same as it was before, checked via mandoc and > > man. > > > --Gordon > > In my testing, the comma is inside the brackets in the original version: > > ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1,] [--color=when] [-D format] > [file ...] > > > It is outside the brackets with this change: > > ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1], [--color=when] [-D format] > [file ...] > > The former is correct. Caveat, I'm running mandoc on 12.1. > > Mike That is strange, maybe an localisation problem. I am also running my local tests on 12.2-STABLE. I followed your suggestion in r366613 [1] and MFC it tomorrow. --Gordon [1] https://svnweb.freebsd.org/base?view=revision&revision=366613