From owner-svn-src-stable@freebsd.org Sun Feb 3 00:36:13 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4E2614AA7DD; Sun, 3 Feb 2019 00:36:13 +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) server-signature RSA-PSS (4096 bits) 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 5A98171501; Sun, 3 Feb 2019 00:36:13 +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 506ADEAA2; Sun, 3 Feb 2019 00:36:13 +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 x130aD0N065672; Sun, 3 Feb 2019 00:36:13 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x130aDOM065671; Sun, 3 Feb 2019 00:36:13 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902030036.x130aDOM065671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 3 Feb 2019 00:36:13 +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: r343691 - in stable: 10/sys/contrib/ipfilter/netinet 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: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 343691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5A98171501 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:36:13 -0000 Author: cy Date: Sun Feb 3 00:36:12 2019 New Revision: 343691 URL: https://svnweb.freebsd.org/changeset/base/343691 Log: MFC r343600: Document the instance context pointer. Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/contrib/ipfilter/netinet/fil.c stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/fil.c Sun Feb 3 00:18:29 2019 (r343690) +++ stable/12/sys/contrib/ipfilter/netinet/fil.c Sun Feb 3 00:36:12 2019 (r343691) @@ -2815,7 +2815,8 @@ ipf_firewall(fin, passp) /* -2 == requires authentication */ /* Kernel: */ /* > 0 == filter error # for packet */ -/* Parameters: ip(I) - pointer to start of IPv4/6 packet */ +/* Parameters: ctx(I) - pointer to the instance context */ +/* ip(I) - pointer to start of IPv4/6 packet */ /* hlen(I) - length of header */ /* ifp(I) - pointer to interface this packet is on */ /* out(I) - 0 == packet going in, 1 == packet going out */ From owner-svn-src-stable@freebsd.org Sun Feb 3 00:36:13 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62DD314AA7D9; Sun, 3 Feb 2019 00:36:13 +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) server-signature RSA-PSS (4096 bits) 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 06F90714FF; Sun, 3 Feb 2019 00:36:13 +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 EFFDCEAA1; Sun, 3 Feb 2019 00:36:12 +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 x130aC4B065666; Sun, 3 Feb 2019 00:36:12 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x130aCxN065665; Sun, 3 Feb 2019 00:36:12 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902030036.x130aCxN065665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 3 Feb 2019 00:36:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343691 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 343691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 06F90714FF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:36:13 -0000 Author: cy Date: Sun Feb 3 00:36:12 2019 New Revision: 343691 URL: https://svnweb.freebsd.org/changeset/base/343691 Log: MFC r343600: Document the instance context pointer. Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/contrib/ipfilter/netinet/fil.c stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Sun Feb 3 00:18:29 2019 (r343690) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Sun Feb 3 00:36:12 2019 (r343691) @@ -2815,7 +2815,8 @@ ipf_firewall(fin, passp) /* -2 == requires authentication */ /* Kernel: */ /* > 0 == filter error # for packet */ -/* Parameters: ip(I) - pointer to start of IPv4/6 packet */ +/* Parameters: ctx(I) - pointer to the instance context */ +/* ip(I) - pointer to start of IPv4/6 packet */ /* hlen(I) - length of header */ /* ifp(I) - pointer to interface this packet is on */ /* out(I) - 0 == packet going in, 1 == packet going out */ From owner-svn-src-stable@freebsd.org Sun Feb 3 00:36:14 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39A6714AA7E3; Sun, 3 Feb 2019 00:36:14 +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) server-signature RSA-PSS (4096 bits) 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 CE0DD71508; Sun, 3 Feb 2019 00:36:13 +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 BE7C5EAA3; Sun, 3 Feb 2019 00:36:13 +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 x130aDs0065679; Sun, 3 Feb 2019 00:36:13 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x130aDha065678; Sun, 3 Feb 2019 00:36:13 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902030036.x130aDha065678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 3 Feb 2019 00:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343691 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 343691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CE0DD71508 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:36:14 -0000 Author: cy Date: Sun Feb 3 00:36:12 2019 New Revision: 343691 URL: https://svnweb.freebsd.org/changeset/base/343691 Log: MFC r343600: Document the instance context pointer. Modified: stable/10/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/fil.c Sun Feb 3 00:18:29 2019 (r343690) +++ stable/10/sys/contrib/ipfilter/netinet/fil.c Sun Feb 3 00:36:12 2019 (r343691) @@ -2781,7 +2781,8 @@ ipf_firewall(fin, passp) /* -2 == requires authentication */ /* Kernel: */ /* > 0 == filter error # for packet */ -/* Parameters: ip(I) - pointer to start of IPv4/6 packet */ +/* Parameters: ctx(I) - pointer to the instance context */ +/* ip(I) - pointer to start of IPv4/6 packet */ /* hlen(I) - length of header */ /* ifp(I) - pointer to interface this packet is on */ /* out(I) - 0 == packet going in, 1 == packet going out */ From owner-svn-src-stable@freebsd.org Sun Feb 3 00:39:36 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3318414AAAF5; Sun, 3 Feb 2019 00:39:36 +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) server-signature RSA-PSS (4096 bits) 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 CA50271C49; Sun, 3 Feb 2019 00:39:35 +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 C08F3EAAE; Sun, 3 Feb 2019 00:39:35 +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 x130dZf8065868; Sun, 3 Feb 2019 00:39:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x130dZPN065867; Sun, 3 Feb 2019 00:39:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902030039.x130dZPN065867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Feb 2019 00:39: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: r343692 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 343692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CA50271C49 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:39:36 -0000 Author: kib Date: Sun Feb 3 00:39:35 2019 New Revision: 343692 URL: https://svnweb.freebsd.org/changeset/base/343692 Log: MFC r343484: Remove now redundand ifunc relocation code which should have been removed as part of r341441. Modified: stable/12/libexec/rtld-elf/rtld.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Sun Feb 3 00:36:12 2019 (r343691) +++ stable/12/libexec/rtld-elf/rtld.c Sun Feb 3 00:39:35 2019 (r343692) @@ -2871,16 +2871,6 @@ relocate_object(Obj_Entry *obj, bool bind_now, Obj_Ent lockstate) == -1) return (-1); - /* - * Process the non-PLT IFUNC relocations. The relocations are - * processed in two phases, because IFUNC resolvers may - * reference other symbols, which must be readily processed - * before resolvers are called. - */ - if (obj->non_plt_gnu_ifunc && - reloc_non_plt(obj, rtldobj, flags | SYMLOOK_IFUNC, lockstate)) - return (-1); - if (!obj->mainprog && obj_enforce_relro(obj) == -1) return (-1); From owner-svn-src-stable@freebsd.org Sun Feb 3 00:41:15 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4254D14AAD2A; Sun, 3 Feb 2019 00:41:15 +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) server-signature RSA-PSS (4096 bits) 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 D6DB07224D; Sun, 3 Feb 2019 00:41:14 +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 C5AD7EAF1; Sun, 3 Feb 2019 00:41:14 +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 x130fECd068256; Sun, 3 Feb 2019 00:41:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x130fE9s068255; Sun, 3 Feb 2019 00:41:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902030041.x130fE9s068255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Feb 2019 00:41:14 +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: r343693 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 343693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D6DB07224D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:41:15 -0000 Author: kib Date: Sun Feb 3 00:41:14 2019 New Revision: 343693 URL: https://svnweb.freebsd.org/changeset/base/343693 Log: MFC r343607: Reserve a bit in the FreeBSD feature control note for marking the image as not compatible with ASLR. Modified: stable/12/sys/sys/elf_common.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/sys/elf_common.h ============================================================================== --- stable/12/sys/sys/elf_common.h Sun Feb 3 00:39:35 2019 (r343692) +++ stable/12/sys/sys/elf_common.h Sun Feb 3 00:41:14 2019 (r343693) @@ -761,6 +761,9 @@ typedef struct { #define NT_FREEBSD_ARCH_TAG 3 #define NT_FREEBSD_FEATURE_CTL 4 +/* NT_FREEBSD_FEATURE_CTL desc[0] bits */ +#define NT_FREEBSD_FCTL_ASLR_DISABLE 0x00000001 + /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ #define NT_FPREGSET 2 /* Floating point registers. */ From owner-svn-src-stable@freebsd.org Sun Feb 3 00:44:27 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37E9514AAEFD; Sun, 3 Feb 2019 00:44:27 +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) server-signature RSA-PSS (4096 bits) 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 C798C724C7; Sun, 3 Feb 2019 00:44:26 +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 B8FADEC7E; Sun, 3 Feb 2019 00:44:26 +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 x130iQnt071030; Sun, 3 Feb 2019 00:44:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x130iQO9071029; Sun, 3 Feb 2019 00:44:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902030044.x130iQO9071029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Feb 2019 00:44:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343694 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 343694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C798C724C7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:44:27 -0000 Author: kib Date: Sun Feb 3 00:44:26 2019 New Revision: 343694 URL: https://svnweb.freebsd.org/changeset/base/343694 Log: MFC r343484: Remove now redundand ifunc relocation code which should have been removed as part of r341441. Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Sun Feb 3 00:41:14 2019 (r343693) +++ stable/11/libexec/rtld-elf/rtld.c Sun Feb 3 00:44:26 2019 (r343694) @@ -2877,16 +2877,6 @@ relocate_object(Obj_Entry *obj, bool bind_now, Obj_Ent lockstate) == -1) return (-1); - /* - * Process the non-PLT IFUNC relocations. The relocations are - * processed in two phases, because IFUNC resolvers may - * reference other symbols, which must be readily processed - * before resolvers are called. - */ - if (obj->non_plt_gnu_ifunc && - reloc_non_plt(obj, rtldobj, flags | SYMLOOK_IFUNC, lockstate)) - return (-1); - if (!obj->mainprog && obj_enforce_relro(obj) == -1) return (-1); From owner-svn-src-stable@freebsd.org Sun Feb 3 00:45:53 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B16114AAFC6; Sun, 3 Feb 2019 00:45:53 +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) server-signature RSA-PSS (4096 bits) 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 F31D572613; Sun, 3 Feb 2019 00:45:52 +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 B04C0EC80; Sun, 3 Feb 2019 00:45:52 +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 x130jqnJ071150; Sun, 3 Feb 2019 00:45:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x130jquN071149; Sun, 3 Feb 2019 00:45:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902030045.x130jquN071149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Feb 2019 00:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343695 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 343695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F31D572613 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:45:53 -0000 Author: kib Date: Sun Feb 3 00:45:52 2019 New Revision: 343695 URL: https://svnweb.freebsd.org/changeset/base/343695 Log: MFC r343607: Reserve a bit in the FreeBSD feature control note for marking the image as not compatible with ASLR. Modified: stable/11/sys/sys/elf_common.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/elf_common.h ============================================================================== --- stable/11/sys/sys/elf_common.h Sun Feb 3 00:44:26 2019 (r343694) +++ stable/11/sys/sys/elf_common.h Sun Feb 3 00:45:52 2019 (r343695) @@ -744,6 +744,9 @@ typedef struct { #define NT_FREEBSD_ARCH_TAG 3 #define NT_FREEBSD_FEATURE_CTL 4 +/* NT_FREEBSD_FEATURE_CTL desc[0] bits */ +#define NT_FREEBSD_FCTL_ASLR_DISABLE 0x00000001 + /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ #define NT_FPREGSET 2 /* Floating point registers. */ From owner-svn-src-stable@freebsd.org Sun Feb 3 08:45:02 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 587CE14BD45A; Sun, 3 Feb 2019 08:45:02 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 F089689B86; Sun, 3 Feb 2019 08:45:01 +0000 (UTC) (envelope-from gonzo@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 E67E31C2D1; Sun, 3 Feb 2019 08:45:01 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x138j15f021183; Sun, 3 Feb 2019 08:45:01 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x138j1F6021182; Sun, 3 Feb 2019 08:45:01 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902030845.x138j1F6021182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 08:45:01 +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: r343708 - stable/12/sys/mips/ingenic X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/sys/mips/ingenic X-SVN-Commit-Revision: 343708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F089689B86 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 08:45:02 -0000 Author: gonzo Date: Sun Feb 3 08:45:01 2019 New Revision: 343708 URL: https://svnweb.freebsd.org/changeset/base/343708 Log: MFC r343450: [mips] Unbreak kernel build for CI20 - Include header required for boot_parse_XXX functions - Use boot_parse_args when parsing argc/argv style arguments - Remove unused function Modified: stable/12/sys/mips/ingenic/jz4780_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/mips/ingenic/jz4780_machdep.c ============================================================================== --- stable/12/sys/mips/ingenic/jz4780_machdep.c Sun Feb 3 08:28:02 2019 (r343707) +++ stable/12/sys/mips/ingenic/jz4780_machdep.c Sun Feb 3 08:45:01 2019 (r343708) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -173,20 +174,6 @@ mips_init(void) #endif } -#ifdef FDT -static void -_parse_bootargs(char *cmdline) -{ - char *v; - - while ((v = strsep(&cmdline, " \n")) != NULL) { - if (*v == '\0') - continue; - boothowto |= boot_parse_arg(v); - } -} -#endif - void platform_start(__register_t a0, __register_t a1, __register_t a2 __unused, __register_t a3 __unused) @@ -247,7 +234,7 @@ platform_start(__register_t a0, __register_t a1, /* Parse cmdline from U-Boot */ argc = a0; argv = (char **)a1; - boothowto |= boot_parse_cmdline(argc, argv); + boothowto |= boot_parse_args(argc, argv); mips_init(); } From owner-svn-src-stable@freebsd.org Sun Feb 3 09:14:54 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8737014BF3C9; Sun, 3 Feb 2019 09:14:54 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 2BF838B3A6; Sun, 3 Feb 2019 09:14:54 +0000 (UTC) (envelope-from gonzo@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 211BD1C870; Sun, 3 Feb 2019 09:14:54 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x139EsFX037322; Sun, 3 Feb 2019 09:14:54 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x139ErkW037320; Sun, 3 Feb 2019 09:14:53 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902030914.x139ErkW037320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 09:14: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: r343710 - stable/12/sys/arm/mv X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/sys/arm/mv X-SVN-Commit-Revision: 343710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2BF838B3A6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 09:14:54 -0000 Author: gonzo Date: Sun Feb 3 09:14:53 2019 New Revision: 343710 URL: https://svnweb.freebsd.org/changeset/base/343710 Log: MFC r343028, r343104 r343028: [mv_pci] Increase default PCI space size for mv_pci mv_pci driver reads PCI memory window layout from DTB data and if the data is incomplete falls back to default value. The value is too small to fit two PCI spaces for mwlwifi devices on WRT3200ACM so the resource allocation for them fails. Increase the default to 4Mb from 1Mb so the devices can be properly attached. r343104: [mv] Fix invalid condition in fdt_fixup_ranges Add parentheses to perform assignment before comparison. The prior condition worked because fdt_parent_addr_cells returns 1 for the DTB on which fdt_fixup_ranges is called and accidentally par_addr_cells ends up to be set to the same value. PR: 210705 Submitted by: David Binderman Modified: stable/12/sys/arm/mv/mv_common.c stable/12/sys/arm/mv/mv_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/mv/mv_common.c ============================================================================== --- stable/12/sys/arm/mv/mv_common.c Sun Feb 3 08:53:03 2019 (r343709) +++ stable/12/sys/arm/mv/mv_common.c Sun Feb 3 09:14:53 2019 (r343710) @@ -2935,7 +2935,7 @@ fdt_fixup_ranges(phandle_t root) /* Fix-up SoC ranges according to real fdt_immr_pa */ if ((node = fdt_find_compatible(root, "simple-bus", 1)) != 0) { if (fdt_addrsize_cells(node, &addr_cells, &size_cells) == 0 && - (par_addr_cells = fdt_parent_addr_cells(node) <= 2)) { + ((par_addr_cells = fdt_parent_addr_cells(node)) <= 2)) { tuple_size = sizeof(pcell_t) * (par_addr_cells + addr_cells + size_cells); len = OF_getprop(node, "ranges", ranges, Modified: stable/12/sys/arm/mv/mv_pci.c ============================================================================== --- stable/12/sys/arm/mv/mv_pci.c Sun Feb 3 08:53:03 2019 (r343709) +++ stable/12/sys/arm/mv/mv_pci.c Sun Feb 3 09:14:53 2019 (r343710) @@ -100,7 +100,7 @@ struct mv_pci_range { }; #define FDT_RANGES_CELLS ((3 + 3 + 2) * 2) -#define PCI_SPACE_LEN 0x00100000 +#define PCI_SPACE_LEN 0x00400000 static void mv_pci_range_dump(struct mv_pci_range *range) From owner-svn-src-stable@freebsd.org Sun Feb 3 08:53:05 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D367B14BE1B3; Sun, 3 Feb 2019 08:53:04 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 6F87A8A40E; Sun, 3 Feb 2019 08:53:04 +0000 (UTC) (envelope-from gonzo@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 613FD1C4A7; Sun, 3 Feb 2019 08:53:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x138r4mP026661; Sun, 3 Feb 2019 08:53:04 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x138r3CC026658; Sun, 3 Feb 2019 08:53:03 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902030853.x138r3CC026658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 08:53: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: r343709 - in stable/12/sys/mips: ingenic mips nlm X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in stable/12/sys/mips: ingenic mips nlm X-SVN-Commit-Revision: 343709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6F87A8A40E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 08:53:05 -0000 Author: gonzo Date: Sun Feb 3 08:53:03 2019 New Revision: 343709 URL: https://svnweb.freebsd.org/changeset/base/343709 Log: MFC r343443, r343446, r343448, r343452 r343443: [mips] remove dublicate values in enable mask in nlm_usb_intr_en PR: 230572 Submitted by: David Binderman r343446: [mips] remove check that is always false (unsinged < 0) cpuid and local cpu variable are unsigned so checking if value is less than zero always yields false. PR: 211088 Submitted by: David Binderman r343448: [mips] Fix counter mask in jz4780 timer driver Fix dublicate value in what is apparent copypaste mistake. The last value in mask is supposed to be for counter 7, not counter 3. PR: 229790 Submitted by: David Binderman r343452: [mips] Fix error condition check that always evaluates to false Use proper logical operand when checking the value of srcid PR: 200988 Submitted by: David Binderman Modified: stable/12/sys/mips/ingenic/jz4780_timer.c stable/12/sys/mips/mips/tlb.c stable/12/sys/mips/nlm/cms.c stable/12/sys/mips/nlm/usb_init.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/mips/ingenic/jz4780_timer.c ============================================================================== --- stable/12/sys/mips/ingenic/jz4780_timer.c Sun Feb 3 08:45:01 2019 (r343708) +++ stable/12/sys/mips/ingenic/jz4780_timer.c Sun Feb 3 08:53:03 2019 (r343709) @@ -185,7 +185,7 @@ jz4780_timer_attach(device_t dev) CSR_WRITE_4(sc, JZ_TC_TECR, TESR_OST); /* Stop all other channels as well */ CSR_WRITE_4(sc, JZ_TC_TECR, TESR_TCST0 | TESR_TCST1 | TESR_TCST2 | - TESR_TCST3 | TESR_TCST4 | TESR_TCST5 | TESR_TCST6 | TESR_TCST3); + TESR_TCST3 | TESR_TCST4 | TESR_TCST5 | TESR_TCST6 | TESR_TCST7); /* Clear detect mask flags */ CSR_WRITE_4(sc, JZ_TC_TFCR, 0xFFFFFFFF); /* Mask all interrupts */ Modified: stable/12/sys/mips/mips/tlb.c ============================================================================== --- stable/12/sys/mips/mips/tlb.c Sun Feb 3 08:45:01 2019 (r343708) +++ stable/12/sys/mips/mips/tlb.c Sun Feb 3 08:53:03 2019 (r343709) @@ -348,7 +348,7 @@ DB_SHOW_COMMAND(tlb, ddb_dump_tlb) else cpu = PCPU_GET(cpuid); - if (cpu < 0 || cpu >= mp_ncpus) { + if (cpu >= mp_ncpus) { db_printf("Invalid CPU %u\n", cpu); return; } Modified: stable/12/sys/mips/nlm/cms.c ============================================================================== --- stable/12/sys/mips/nlm/cms.c Sun Feb 3 08:45:01 2019 (r343708) +++ stable/12/sys/mips/nlm/cms.c Sun Feb 3 08:53:03 2019 (r343709) @@ -204,7 +204,7 @@ xlp_handle_msg_vc(u_int vcmask, int max_msgs) nlm_restore_flags(mflags); if (status != 0) /* no msg or error */ continue; - if (srcid < 0 && srcid >= 1024) { + if (srcid < 0 || srcid >= 1024) { printf("[%s]: bad src id %d\n", __func__, srcid); continue; Modified: stable/12/sys/mips/nlm/usb_init.c ============================================================================== --- stable/12/sys/mips/nlm/usb_init.c Sun Feb 3 08:45:01 2019 (r343708) +++ stable/12/sys/mips/nlm/usb_init.c Sun Feb 3 08:53:03 2019 (r343709) @@ -52,8 +52,7 @@ nlm_usb_intr_en(int node, int port) port_addr = nlm_get_usb_regbase(node, port); val = nlm_read_usb_reg(port_addr, USB_INT_EN); val = USB_CTRL_INTERRUPT_EN | USB_OHCI_INTERRUPT_EN | - USB_OHCI_INTERRUPT1_EN | USB_CTRL_INTERRUPT_EN | - USB_OHCI_INTERRUPT_EN | USB_OHCI_INTERRUPT2_EN; + USB_OHCI_INTERRUPT1_EN | USB_OHCI_INTERRUPT2_EN; nlm_write_usb_reg(port_addr, USB_INT_EN, val); } From owner-svn-src-stable@freebsd.org Sun Feb 3 11:07:41 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D0FE14C3958; Sun, 3 Feb 2019 11:07:41 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 35AF18F8D9; Sun, 3 Feb 2019 11:07:41 +0000 (UTC) (envelope-from gonzo@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 23D6F1DBBD; Sun, 3 Feb 2019 11:07:41 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13B7fJG096913; Sun, 3 Feb 2019 11:07:41 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13B7egc096912; Sun, 3 Feb 2019 11:07:40 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902031107.x13B7egc096912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 11:07:40 +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: r343711 - stable/12/tools/build/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/tools/build/mk X-SVN-Commit-Revision: 343711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 35AF18F8D9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 11:07:41 -0000 Author: gonzo Date: Sun Feb 3 11:07:40 2019 New Revision: 343711 URL: https://svnweb.freebsd.org/changeset/base/343711 Log: MFC r343009, r343109-r343110, r343128, r343232 r343009: Add four kerberos CLI utilities to OptionalObsoleteFiles.inc Add asn1_compile, make-roken, kcc, and slc to the OptionalObsoleteFiles.inc so they would be removed during delete-old stage if the new world is built without Kerberos support. PR: 230725 Submitted by: Dmitry Wagin r343109: Add optional obsolete files for the installworld without sendmail Add two more entries for WITHOUT_SENDMAIL install. The /var/spool/clientmqueue entry would be deleted only if there are no files/dirs in it, so the content generated during previous lifecycle of the system is safe PR: 228484 Submitted by: Dmitry Wagin r343110: Fix conditional obsolete files entry for WITHOUT_EXAMPLES Add all the files under /usr/share/examples to the MK_EXAMPLES section. OLD_DIRS entries are not removed if they're not empty so prior to this change WITHOUT_EXAMPLES didn't have significant effect on the updated system. PR: 228484 Submitted by: Dmitry Wagin (original patch) r343128: Add ypldap to the list of conditional obsolete files ypldap should be removed during delete-old if WITHOUT_NIS flag is enabled PR: 230727 Submitted by: Dmitry Wagin r343232: Add more profile-enabled libraries to remove when WITHOUT_PROFILE is defined PR: 230898 Submitted by: Herbert J. Skuhra Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 3 09:14:53 2019 (r343710) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 3 11:07:40 2019 (r343711) @@ -2279,22 +2279,274 @@ OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat .endif .if ${MK_EXAMPLES} == no +OLD_FILES+=usr/share/examples/BSD_daemon/FreeBSD.pfa +OLD_FILES+=usr/share/examples/BSD_daemon/README +OLD_FILES+=usr/share/examples/BSD_daemon/beastie.eps +OLD_FILES+=usr/share/examples/BSD_daemon/beastie.fig +OLD_FILES+=usr/share/examples/BSD_daemon/eps.patch +OLD_FILES+=usr/share/examples/BSD_daemon/poster.sh +OLD_FILES+=usr/share/examples/FreeBSD_version/FreeBSD_version.c +OLD_FILES+=usr/share/examples/FreeBSD_version/Makefile +OLD_FILES+=usr/share/examples/FreeBSD_version/README +OLD_FILES+=usr/share/examples/IPv6/USAGE +OLD_FILES+=usr/share/examples/bhyve/vmrun.sh +OLD_FILES+=usr/share/examples/bootforth/README +OLD_FILES+=usr/share/examples/bootforth/boot.4th +OLD_FILES+=usr/share/examples/bootforth/frames.4th +OLD_FILES+=usr/share/examples/bootforth/loader.rc +OLD_FILES+=usr/share/examples/bootforth/menu.4th +OLD_FILES+=usr/share/examples/bootforth/menuconf.4th +OLD_FILES+=usr/share/examples/bootforth/screen.4th +OLD_FILES+=usr/share/examples/bsdconfig/add_some_packages.sh +OLD_FILES+=usr/share/examples/bsdconfig/browse_packages_http.sh +OLD_FILES+=usr/share/examples/bsdconfig/bsdconfigrc +OLD_FILES+=usr/share/examples/csh/dot.cshrc +OLD_FILES+=usr/share/examples/diskless/ME +OLD_FILES+=usr/share/examples/diskless/README.BOOTP +OLD_FILES+=usr/share/examples/diskless/README.TEMPLATING +OLD_FILES+=usr/share/examples/diskless/clone_root +OLD_FILES+=usr/share/examples/dma/mailer.conf +OLD_FILES+=usr/share/examples/drivers/README +OLD_FILES+=usr/share/examples/drivers/make_device_driver.sh +OLD_FILES+=usr/share/examples/drivers/make_pseudo_driver.sh +OLD_FILES+=usr/share/examples/dwatch/profile_template +OLD_FILES+=usr/share/examples/etc/README.examples +OLD_FILES+=usr/share/examples/etc/bsd-style-copyright +OLD_FILES+=usr/share/examples/etc/group +OLD_FILES+=usr/share/examples/etc/login.access +OLD_FILES+=usr/share/examples/etc/make.conf +OLD_FILES+=usr/share/examples/etc/rc.bsdextended +OLD_FILES+=usr/share/examples/etc/rc.firewall +OLD_FILES+=usr/share/examples/etc/rc.sendmail +OLD_FILES+=usr/share/examples/etc/termcap.small +OLD_FILES+=usr/share/examples/etc/wpa_supplicant.conf +OLD_FILES+=usr/share/examples/find_interface/Makefile +OLD_FILES+=usr/share/examples/find_interface/README +OLD_FILES+=usr/share/examples/find_interface/find_interface.c +OLD_FILES+=usr/share/examples/hast/ucarp.sh +OLD_FILES+=usr/share/examples/hast/ucarp_down.sh +OLD_FILES+=usr/share/examples/hast/ucarp_up.sh +OLD_FILES+=usr/share/examples/hast/vip-down.sh +OLD_FILES+=usr/share/examples/hast/vip-up.sh +OLD_FILES+=usr/share/examples/hostapd/hostapd.conf +OLD_FILES+=usr/share/examples/hostapd/hostapd.eap_user +OLD_FILES+=usr/share/examples/hostapd/hostapd.wpa_psk +OLD_FILES+=usr/share/examples/indent/indent.pro +OLD_FILES+=usr/share/examples/ipfilter/BASIC.NAT +OLD_FILES+=usr/share/examples/ipfilter/BASIC_1.FW +OLD_FILES+=usr/share/examples/ipfilter/BASIC_2.FW +OLD_FILES+=usr/share/examples/ipfilter/README +OLD_FILES+=usr/share/examples/ipfilter/example.1 +OLD_FILES+=usr/share/examples/ipfilter/example.10 +OLD_FILES+=usr/share/examples/ipfilter/example.11 +OLD_FILES+=usr/share/examples/ipfilter/example.12 +OLD_FILES+=usr/share/examples/ipfilter/example.13 +OLD_FILES+=usr/share/examples/ipfilter/example.14 +OLD_FILES+=usr/share/examples/ipfilter/example.2 +OLD_FILES+=usr/share/examples/ipfilter/example.3 +OLD_FILES+=usr/share/examples/ipfilter/example.4 +OLD_FILES+=usr/share/examples/ipfilter/example.5 +OLD_FILES+=usr/share/examples/ipfilter/example.6 +OLD_FILES+=usr/share/examples/ipfilter/example.7 +OLD_FILES+=usr/share/examples/ipfilter/example.8 +OLD_FILES+=usr/share/examples/ipfilter/example.9 +OLD_FILES+=usr/share/examples/ipfilter/example.sr +OLD_FILES+=usr/share/examples/ipfilter/examples.txt +OLD_FILES+=usr/share/examples/ipfilter/firewall +OLD_FILES+=usr/share/examples/ipfilter/firewall.1 +OLD_FILES+=usr/share/examples/ipfilter/firewall.2 +OLD_FILES+=usr/share/examples/ipfilter/ftp-proxy +OLD_FILES+=usr/share/examples/ipfilter/ftppxy +OLD_FILES+=usr/share/examples/ipfilter/ipf-howto.txt +OLD_FILES+=usr/share/examples/ipfilter/ipf.conf.permissive +OLD_FILES+=usr/share/examples/ipfilter/ipf.conf.restrictive +OLD_FILES+=usr/share/examples/ipfilter/ipf.conf.sample +OLD_FILES+=usr/share/examples/ipfilter/ipnat.conf.sample +OLD_FILES+=usr/share/examples/ipfilter/mkfilters +OLD_FILES+=usr/share/examples/ipfilter/nat-setup +OLD_FILES+=usr/share/examples/ipfilter/nat.eg +OLD_FILES+=usr/share/examples/ipfilter/rules.txt +OLD_FILES+=usr/share/examples/ipfilter/server +OLD_FILES+=usr/share/examples/ipfilter/tcpstate +OLD_FILES+=usr/share/examples/ipfw/change_rules.sh +OLD_FILES+=usr/share/examples/jails/README +OLD_FILES+=usr/share/examples/jails/VIMAGE +OLD_FILES+=usr/share/examples/jails/jail.xxx.conf +OLD_FILES+=usr/share/examples/jails/jib +OLD_FILES+=usr/share/examples/jails/jng +OLD_FILES+=usr/share/examples/jails/rc.conf.jails +OLD_FILES+=usr/share/examples/jails/rcjail.xxx.conf +OLD_FILES+=usr/share/examples/kld/Makefile +OLD_FILES+=usr/share/examples/kld/cdev/Makefile +OLD_FILES+=usr/share/examples/kld/cdev/README +OLD_FILES+=usr/share/examples/kld/cdev/module/Makefile +OLD_FILES+=usr/share/examples/kld/cdev/module/cdev.c +OLD_FILES+=usr/share/examples/kld/cdev/module/cdev.h +OLD_FILES+=usr/share/examples/kld/cdev/module/cdevmod.c +OLD_FILES+=usr/share/examples/kld/cdev/test/Makefile +OLD_FILES+=usr/share/examples/kld/cdev/test/testcdev.c +OLD_FILES+=usr/share/examples/kld/dyn_sysctl/Makefile +OLD_FILES+=usr/share/examples/kld/dyn_sysctl/README +OLD_FILES+=usr/share/examples/kld/dyn_sysctl/dyn_sysctl.c +OLD_FILES+=usr/share/examples/kld/firmware/Makefile +OLD_FILES+=usr/share/examples/kld/firmware/README +OLD_FILES+=usr/share/examples/kld/firmware/fwconsumer/Makefile +OLD_FILES+=usr/share/examples/kld/firmware/fwconsumer/fw_consumer.c +OLD_FILES+=usr/share/examples/kld/firmware/fwimage/Makefile +OLD_FILES+=usr/share/examples/kld/firmware/fwimage/firmware.img.uu +OLD_FILES+=usr/share/examples/kld/khelp/Makefile +OLD_FILES+=usr/share/examples/kld/khelp/README +OLD_FILES+=usr/share/examples/kld/khelp/h_example.c +OLD_FILES+=usr/share/examples/kld/syscall/Makefile +OLD_FILES+=usr/share/examples/kld/syscall/module/Makefile +OLD_FILES+=usr/share/examples/kld/syscall/module/syscall.c +OLD_FILES+=usr/share/examples/kld/syscall/test/Makefile +OLD_FILES+=usr/share/examples/kld/syscall/test/call.c +OLD_FILES+=usr/share/examples/libusb20/Makefile +OLD_FILES+=usr/share/examples/libusb20/README +OLD_FILES+=usr/share/examples/libusb20/bulk.c +OLD_FILES+=usr/share/examples/libusb20/control.c +OLD_FILES+=usr/share/examples/libusb20/util.c +OLD_FILES+=usr/share/examples/libusb20/util.h +OLD_FILES+=usr/share/examples/libvgl/Makefile +OLD_FILES+=usr/share/examples/libvgl/demo.c +OLD_FILES+=usr/share/examples/mdoc/POSIX-copyright +OLD_FILES+=usr/share/examples/mdoc/deshallify.sh +OLD_FILES+=usr/share/examples/mdoc/example.1 +OLD_FILES+=usr/share/examples/mdoc/example.3 +OLD_FILES+=usr/share/examples/mdoc/example.4 +OLD_FILES+=usr/share/examples/mdoc/example.9 +OLD_FILES+=usr/share/examples/netgraph/ether.bridge +OLD_FILES+=usr/share/examples/netgraph/frame_relay +OLD_FILES+=usr/share/examples/netgraph/ngctl +OLD_FILES+=usr/share/examples/netgraph/raw +OLD_FILES+=usr/share/examples/netgraph/udp.tunnel +OLD_FILES+=usr/share/examples/netgraph/virtual.chain +OLD_FILES+=usr/share/examples/netgraph/virtual.lan +OLD_FILES+=usr/share/examples/pc-sysinstall/README +OLD_FILES+=usr/share/examples/pc-sysinstall/pc-autoinstall.conf +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.fbsd-netinstall +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.geli +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.gmirror +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.netinstall +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.restore +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.rsync +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.upgrade +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.zfs +OLD_FILES+=usr/share/examples/perfmon/Makefile +OLD_FILES+=usr/share/examples/perfmon/README +OLD_FILES+=usr/share/examples/perfmon/perfmon.c +OLD_FILES+=usr/share/examples/pf/ackpri +OLD_FILES+=usr/share/examples/pf/faq-example1 +OLD_FILES+=usr/share/examples/pf/faq-example2 +OLD_FILES+=usr/share/examples/pf/faq-example3 +OLD_FILES+=usr/share/examples/pf/pf.conf +OLD_FILES+=usr/share/examples/pf/queue1 +OLD_FILES+=usr/share/examples/pf/queue2 +OLD_FILES+=usr/share/examples/pf/queue3 +OLD_FILES+=usr/share/examples/pf/queue4 +OLD_FILES+=usr/share/examples/pf/spamd +OLD_FILES+=usr/share/examples/ppi/Makefile +OLD_FILES+=usr/share/examples/ppi/ppilcd.c +OLD_FILES+=usr/share/examples/ppp/chap-auth +OLD_FILES+=usr/share/examples/ppp/login-auth +OLD_FILES+=usr/share/examples/ppp/ppp.conf.sample +OLD_FILES+=usr/share/examples/ppp/ppp.conf.span-isp +OLD_FILES+=usr/share/examples/ppp/ppp.conf.span-isp.working +OLD_FILES+=usr/share/examples/ppp/ppp.linkdown.sample +OLD_FILES+=usr/share/examples/ppp/ppp.linkdown.span-isp +OLD_FILES+=usr/share/examples/ppp/ppp.linkdown.span-isp.working +OLD_FILES+=usr/share/examples/ppp/ppp.linkup.sample +OLD_FILES+=usr/share/examples/ppp/ppp.linkup.span-isp +OLD_FILES+=usr/share/examples/ppp/ppp.linkup.span-isp.working +OLD_FILES+=usr/share/examples/ppp/ppp.secret.sample +OLD_FILES+=usr/share/examples/ppp/ppp.secret.span-isp +OLD_FILES+=usr/share/examples/ppp/ppp.secret.span-isp.working +OLD_FILES+=usr/share/examples/printing/diablo-if-net +OLD_FILES+=usr/share/examples/printing/hpdf +OLD_FILES+=usr/share/examples/printing/hpif +OLD_FILES+=usr/share/examples/printing/hpof +OLD_FILES+=usr/share/examples/printing/hprf +OLD_FILES+=usr/share/examples/printing/hpvf +OLD_FILES+=usr/share/examples/printing/if-simple +OLD_FILES+=usr/share/examples/printing/if-simpleX +OLD_FILES+=usr/share/examples/printing/ifhp +OLD_FILES+=usr/share/examples/printing/make-ps-header +OLD_FILES+=usr/share/examples/printing/netprint +OLD_FILES+=usr/share/examples/printing/psdf +OLD_FILES+=usr/share/examples/printing/psdfX +OLD_FILES+=usr/share/examples/printing/psif +OLD_FILES+=usr/share/examples/printing/pstf +OLD_FILES+=usr/share/examples/printing/pstfX +OLD_FILES+=usr/share/examples/scsi_target/Makefile +OLD_FILES+=usr/share/examples/scsi_target/scsi_cmds.c +OLD_FILES+=usr/share/examples/scsi_target/scsi_target.8 +OLD_FILES+=usr/share/examples/scsi_target/scsi_target.c +OLD_FILES+=usr/share/examples/scsi_target/scsi_target.h +OLD_FILES+=usr/share/examples/ses/Makefile +OLD_FILES+=usr/share/examples/ses/Makefile.inc +OLD_FILES+=usr/share/examples/ses/getencstat/Makefile +OLD_FILES+=usr/share/examples/ses/getencstat/getencstat.0 +OLD_FILES+=usr/share/examples/ses/sesd/Makefile +OLD_FILES+=usr/share/examples/ses/sesd/sesd.0 +OLD_FILES+=usr/share/examples/ses/setencstat/Makefile +OLD_FILES+=usr/share/examples/ses/setencstat/setencstat.0 +OLD_FILES+=usr/share/examples/ses/setobjstat/Makefile +OLD_FILES+=usr/share/examples/ses/setobjstat/setobjstat.0 +OLD_FILES+=usr/share/examples/ses/srcs/chpmon.c +OLD_FILES+=usr/share/examples/ses/srcs/eltsub.c +OLD_FILES+=usr/share/examples/ses/srcs/eltsub.h +OLD_FILES+=usr/share/examples/ses/srcs/getencstat.c +OLD_FILES+=usr/share/examples/ses/srcs/getnobj.c +OLD_FILES+=usr/share/examples/ses/srcs/getobjmap.c +OLD_FILES+=usr/share/examples/ses/srcs/getobjstat.c +OLD_FILES+=usr/share/examples/ses/srcs/inienc.c +OLD_FILES+=usr/share/examples/ses/srcs/sesd.c +OLD_FILES+=usr/share/examples/ses/srcs/setencstat.c +OLD_FILES+=usr/share/examples/ses/srcs/setobjstat.c +OLD_FILES+=usr/share/examples/smbfs/dot.nsmbrc +OLD_FILES+=usr/share/examples/smbfs/print/lj6l +OLD_FILES+=usr/share/examples/smbfs/print/ljspool +OLD_FILES+=usr/share/examples/smbfs/print/printcap.sample +OLD_FILES+=usr/share/examples/smbfs/print/tolj +OLD_FILES+=usr/share/examples/sunrpc/Makefile +OLD_FILES+=usr/share/examples/sunrpc/dir/Makefile +OLD_FILES+=usr/share/examples/sunrpc/dir/dir.x +OLD_FILES+=usr/share/examples/sunrpc/dir/dir_proc.c +OLD_FILES+=usr/share/examples/sunrpc/dir/rls.c +OLD_FILES+=usr/share/examples/sunrpc/msg/Makefile +OLD_FILES+=usr/share/examples/sunrpc/msg/msg.x +OLD_FILES+=usr/share/examples/sunrpc/msg/msg_proc.c +OLD_FILES+=usr/share/examples/sunrpc/msg/printmsg.c +OLD_FILES+=usr/share/examples/sunrpc/msg/rprintmsg.c +OLD_FILES+=usr/share/examples/sunrpc/sort/Makefile +OLD_FILES+=usr/share/examples/sunrpc/sort/rsort.c +OLD_FILES+=usr/share/examples/sunrpc/sort/sort.x +OLD_FILES+=usr/share/examples/sunrpc/sort/sort_proc.c +OLD_FILES+=usr/share/examples/tcsh/complete.tcsh +OLD_FILES+=usr/share/examples/tcsh/csh-mode.el +OLD_FILES+=usr/share/examples/uefisign/uefikeys +OLD_FILES+=usr/share/examples/ypldap/ypldap.conf OLD_DIRS+=usr/share/examples OLD_DIRS+=usr/share/examples/BSD_daemon OLD_DIRS+=usr/share/examples/FreeBSD_version OLD_DIRS+=usr/share/examples/IPv6 +OLD_DIRS+=usr/share/examples/bhyve OLD_DIRS+=usr/share/examples/bootforth OLD_DIRS+=usr/share/examples/bsdconfig OLD_DIRS+=usr/share/examples/csh OLD_DIRS+=usr/share/examples/diskless OLD_DIRS+=usr/share/examples/dma OLD_DIRS+=usr/share/examples/drivers +OLD_DIRS+=usr/share/examples/dwatch OLD_DIRS+=usr/share/examples/etc OLD_DIRS+=usr/share/examples/etc/defaults OLD_DIRS+=usr/share/examples/find_interface OLD_DIRS+=usr/share/examples/hast OLD_DIRS+=usr/share/examples/ibcs2 +OLD_DIRS+=usr/share/examples/hostapd OLD_DIRS+=usr/share/examples/indent +OLD_DIRS+=usr/share/examples/ipfilter OLD_DIRS+=usr/share/examples/ipfw OLD_DIRS+=usr/share/examples/jails OLD_DIRS+=usr/share/examples/kld @@ -2313,7 +2565,9 @@ OLD_DIRS+=usr/share/examples/libusb20 OLD_DIRS+=usr/share/examples/libvgl OLD_DIRS+=usr/share/examples/mdoc OLD_DIRS+=usr/share/examples/netgraph +OLD_DIRS+=usr/share/examples/pc-sysinstall OLD_DIRS+=usr/share/examples/perfmon +OLD_DIRS+=usr/share/examples/pf OLD_DIRS+=usr/share/examples/ppi OLD_DIRS+=usr/share/examples/ppp OLD_DIRS+=usr/share/examples/printing @@ -2961,9 +3215,11 @@ OLD_FILES+=usr/share/man/man1/truss.1.gz .if ${MK_KERBEROS} == no OLD_FILES+=etc/rc.d/ipropd_master OLD_FILES+=etc/rc.d/ipropd_slave +OLD_FILES+=usr/bin/asn1_compile OLD_FILES+=usr/bin/compile_et OLD_FILES+=usr/bin/hxtool OLD_FILES+=usr/bin/kadmin +OLD_FILES+=usr/bin/kcc OLD_FILES+=usr/bin/kdestroy OLD_FILES+=usr/bin/kf OLD_FILES+=usr/bin/kgetcred @@ -2973,6 +3229,8 @@ OLD_FILES+=usr/bin/kpasswd OLD_FILES+=usr/bin/krb5-config OLD_FILES+=usr/bin/ksu OLD_FILES+=usr/bin/kswitch +OLD_FILES+=usr/bin/make-roken +OLD_FILES+=usr/bin/slc OLD_FILES+=usr/bin/string2key OLD_FILES+=usr/bin/verify_krb5_conf OLD_FILES+=usr/include/asn1-common.h @@ -6225,6 +6483,7 @@ OLD_FILES+=usr/bin/ypcat OLD_FILES+=usr/bin/ypchfn OLD_FILES+=usr/bin/ypchpass OLD_FILES+=usr/bin/ypchsh +OLD_FILES+=usr/bin/ypldap OLD_FILES+=usr/bin/ypmatch OLD_FILES+=usr/bin/yppasswd OLD_FILES+=usr/bin/ypwhich @@ -7166,6 +7425,8 @@ OLD_FILES+=usr/share/man/man8/pppctl.8.gz .endif .if ${MK_PROFILE} == no +OLD_FILES+=usr/lib/lib80211_p.a +OLD_FILES+=usr/lib/libBlocksRuntime_p.a OLD_FILES+=usr/lib/libalias_cuseeme_p.a OLD_FILES+=usr/lib/libalias_dummy_p.a OLD_FILES+=usr/lib/libalias_ftp_p.a @@ -7177,40 +7438,64 @@ OLD_FILES+=usr/lib/libalias_skinny_p.a OLD_FILES+=usr/lib/libalias_smedia_p.a OLD_FILES+=usr/lib/libarchive_p.a OLD_FILES+=usr/lib/libasn1_p.a +OLD_FILES+=usr/lib/libauditd_p.a +OLD_FILES+=usr/lib/libavl_p.a +OLD_FILES+=usr/lib/libbe_p.a OLD_FILES+=usr/lib/libbegemot_p.a +OLD_FILES+=usr/lib/libblacklist_p.a OLD_FILES+=usr/lib/libbluetooth_p.a OLD_FILES+=usr/lib/libbsdxml_p.a OLD_FILES+=usr/lib/libbsm_p.a OLD_FILES+=usr/lib/libbsnmp_p.a OLD_FILES+=usr/lib/libbz2_p.a +OLD_FILES+=usr/lib/libc++_p.a OLD_FILES+=usr/lib/libc_p.a OLD_FILES+=usr/lib/libcalendar_p.a OLD_FILES+=usr/lib/libcam_p.a OLD_FILES+=usr/lib/libcom_err_p.a OLD_FILES+=usr/lib/libcompat_p.a +OLD_FILES+=usr/lib/libcompiler_rt_p.a OLD_FILES+=usr/lib/libcrypt_p.a OLD_FILES+=usr/lib/libcrypto_p.a +OLD_FILES+=usr/lib/libctf_p.a OLD_FILES+=usr/lib/libcurses_p.a OLD_FILES+=usr/lib/libcursesw_p.a +OLD_FILES+=usr/lib/libcuse_p.a +OLD_FILES+=usr/lib/libcxxrt_p.a +OLD_FILES+=usr/lib/libdevctl_p.a OLD_FILES+=usr/lib/libdevinfo_p.a OLD_FILES+=usr/lib/libdevstat_p.a OLD_FILES+=usr/lib/libdialog_p.a +OLD_FILES+=usr/lib/libdl_p.a +OLD_FILES+=usr/lib/libdpv_p.a +OLD_FILES+=usr/lib/libdtrace_p.a +OLD_FILES+=usr/lib/libdwarf_p.a OLD_FILES+=usr/lib/libedit_p.a +OLD_FILES+=usr/lib/libefivar_p.a OLD_FILES+=usr/lib/libelf_p.a +OLD_FILES+=usr/lib/libexecinfo_p.a OLD_FILES+=usr/lib/libfetch_p.a +OLD_FILES+=usr/lib/libfigpar_p.a OLD_FILES+=usr/lib/libfl_p.a OLD_FILES+=usr/lib/libform_p.a OLD_FILES+=usr/lib/libformw_p.a +OLD_FILES+=usr/lib/libgcc_eh_p.a OLD_FILES+=usr/lib/libgcc_p.a OLD_FILES+=usr/lib/libgeom_p.a OLD_FILES+=usr/lib/libgnuregex_p.a +OLD_FILES+=usr/lib/libgpio_p.a OLD_FILES+=usr/lib/libgssapi_krb5_p.a +OLD_FILES+=usr/lib/libgssapi_ntlm_p.a OLD_FILES+=usr/lib/libgssapi_p.a +OLD_FILES+=usr/lib/libgssapi_spnego_p.a OLD_FILES+=usr/lib/libhdb_p.a OLD_FILES+=usr/lib/libheimbase_p.a +OLD_FILES+=usr/lib/libheimntlm_p.a OLD_FILES+=usr/lib/libheimsqlite_p.a OLD_FILES+=usr/lib/libhistory_p.a +OLD_FILES+=usr/lib/libhx509_p.a OLD_FILES+=usr/lib/libipsec_p.a +OLD_FILES+=usr/lib/libipt_p.a OLD_FILES+=usr/lib/libjail_p.a OLD_FILES+=usr/lib/libkadm5clnt_p.a OLD_FILES+=usr/lib/libkadm5srv_p.a @@ -7221,6 +7506,7 @@ OLD_FILES+=usr/lib/libkrb5_p.a OLD_FILES+=usr/lib/libkvm_p.a OLD_FILES+=usr/lib/libl_p.a OLD_FILES+=usr/lib/libln_p.a +OLD_FILES+=usr/lib/liblzma_p.a OLD_FILES+=usr/lib/libm_p.a OLD_FILES+=usr/lib/libmagic_p.a OLD_FILES+=usr/lib/libmd_p.a @@ -7229,26 +7515,52 @@ OLD_FILES+=usr/lib/libmenu_p.a OLD_FILES+=usr/lib/libmenuw_p.a OLD_FILES+=usr/lib/libmilter_p.a OLD_FILES+=usr/lib/libmp_p.a +OLD_FILES+=usr/lib/libmt_p.a OLD_FILES+=usr/lib/libncurses_p.a OLD_FILES+=usr/lib/libncursesw_p.a OLD_FILES+=usr/lib/libnetgraph_p.a OLD_FILES+=usr/lib/libngatm_p.a +OLD_FILES+=usr/lib/libnv_p.a +OLD_FILES+=usr/lib/libnvpair_p.a +OLD_FILES+=usr/lib/libopencsd_p.a OLD_FILES+=usr/lib/libopie_p.a OLD_FILES+=usr/lib/libpanel_p.a OLD_FILES+=usr/lib/libpanelw_p.a +OLD_FILES+=usr/lib/libpathconv_p.a OLD_FILES+=usr/lib/libpcap_p.a +OLD_FILES+=usr/lib/libpjdlog_p.a OLD_FILES+=usr/lib/libpmc_p.a +OLD_FILES+=usr/lib/libprivatebsdstat_p.a +OLD_FILES+=usr/lib/libprivatedevdctl_p.a +OLD_FILES+=usr/lib/libprivateevent_p.a +OLD_FILES+=usr/lib/libprivateheimipcc_p.a +OLD_FILES+=usr/lib/libprivateheimipcs_p.a +OLD_FILES+=usr/lib/libprivateifconfig_p.a +OLD_FILES+=usr/lib/libprivateldns_p.a +OLD_FILES+=usr/lib/libprivatesqlite3_p.a +OLD_FILES+=usr/lib/libprivatessh_p.a +OLD_FILES+=usr/lib/libprivateucl_p.a +OLD_FILES+=usr/lib/libprivateunbound_p.a +OLD_FILES+=usr/lib/libprivatezstd_p.a +OLD_FILES+=usr/lib/libproc_p.a +OLD_FILES+=usr/lib/libprocstat_p.a OLD_FILES+=usr/lib/libpthread_p.a OLD_FILES+=usr/lib/libradius_p.a +OLD_FILES+=usr/lib/libregex_p.a OLD_FILES+=usr/lib/libroken_p.a OLD_FILES+=usr/lib/librpcsvc_p.a +OLD_FILES+=usr/lib/librss_p.a OLD_FILES+=usr/lib/librt_p.a +OLD_FILES+=usr/lib/librtld_db_p.a OLD_FILES+=usr/lib/libsbuf_p.a OLD_FILES+=usr/lib/libsdp_p.a OLD_FILES+=usr/lib/libsmb_p.a OLD_FILES+=usr/lib/libssl_p.a +OLD_FILES+=usr/lib/libstdbuf_p.a OLD_FILES+=usr/lib/libstdc++_p.a +OLD_FILES+=usr/lib/libstdthreads_p.a OLD_FILES+=usr/lib/libsupc++_p.a +OLD_FILES+=usr/lib/libsysdecode_p.a OLD_FILES+=usr/lib/libtacplus_p.a OLD_FILES+=usr/lib/libtermcap_p.a OLD_FILES+=usr/lib/libtermcapw_p.a @@ -7260,14 +7572,23 @@ OLD_FILES+=usr/lib/libtinfo_p.a OLD_FILES+=usr/lib/libtinfow_p.a OLD_FILES+=usr/lib/libufs_p.a OLD_FILES+=usr/lib/libugidfw_p.a +OLD_FILES+=usr/lib/libulog_p.a +OLD_FILES+=usr/lib/libumem_p.a +OLD_FILES+=usr/lib/libusb_p.a OLD_FILES+=usr/lib/libusbhid_p.a +OLD_FILES+=usr/lib/libutempter_p.a OLD_FILES+=usr/lib/libutil_p.a +OLD_FILES+=usr/lib/libuutil_p.a OLD_FILES+=usr/lib/libvgl_p.a +OLD_FILES+=usr/lib/libvmmapi_p.a OLD_FILES+=usr/lib/libwind_p.a OLD_FILES+=usr/lib/libwrap_p.a +OLD_FILES+=usr/lib/libxo_p.a OLD_FILES+=usr/lib/liby_p.a OLD_FILES+=usr/lib/libypclnt_p.a OLD_FILES+=usr/lib/libz_p.a +OLD_FILES+=usr/lib/libzfs_core_p.a +OLD_FILES+=usr/lib/libzfs_p.a OLD_FILES+=usr/lib/private/libldns_p.a OLD_FILES+=usr/lib/private/libssh_p.a .endif @@ -7359,6 +7680,7 @@ OLD_FILES+=usr/share/man/man8/rtquery.8.gz .endif .if ${MK_SENDMAIL} == no +OLD_FILES+=etc/mtree/BSD.sendmail.dist OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf OLD_FILES+=etc/periodic/daily/150.clean-hoststat OLD_FILES+=etc/periodic/daily/440.status-mailq @@ -7597,6 +7919,7 @@ OLD_FILES+=usr/share/sendmail/cf/siteconfig/uucp.ucbva OLD_DIRS+=usr/share/sendmail/cf/siteconfig OLD_DIRS+=usr/share/sendmail/cf OLD_DIRS+=usr/share/sendmail +OLD_DIRS+=var/spool/clientmqueue .endif .if ${MK_SERVICESDB} == no From owner-svn-src-stable@freebsd.org Sun Feb 3 14:56:39 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B9D614D172F; Sun, 3 Feb 2019 14:56:39 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 2C85A7217F; Sun, 3 Feb 2019 14:56:39 +0000 (UTC) (envelope-from gonzo@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 1B41B20269; Sun, 3 Feb 2019 14:56:39 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13Euc8j016825; Sun, 3 Feb 2019 14:56:38 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13Euc97016824; Sun, 3 Feb 2019 14:56:38 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902031456.x13Euc97016824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 14:56:38 +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: r343717 - stable/12/sys/dev/drm X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/sys/dev/drm X-SVN-Commit-Revision: 343717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2C85A7217F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 14:56:39 -0000 Author: gonzo Date: Sun Feb 3 14:56:38 2019 New Revision: 343717 URL: https://svnweb.freebsd.org/changeset/base/343717 Log: MFC r343060: [drm] Fix off-by-one error when accessing driver-specific ioctl handlers array PR: 231513 Submitted by: Young_X Approved by: imp Modified: stable/12/sys/dev/drm/drm_drv.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/drm/drm_drv.c ============================================================================== --- stable/12/sys/dev/drm/drm_drv.c Sun Feb 3 14:55:21 2019 (r343716) +++ stable/12/sys/dev/drm/drm_drv.c Sun Feb 3 14:56:38 2019 (r343717) @@ -745,7 +745,7 @@ int drm_ioctl(struct cdev *kdev, u_long cmd, caddr_t d if (ioctl->func == NULL && nr >= DRM_COMMAND_BASE) { /* The array entries begin at DRM_COMMAND_BASE ioctl nr */ nr -= DRM_COMMAND_BASE; - if (nr > dev->driver->max_ioctl) { + if (nr >= dev->driver->max_ioctl) { DRM_DEBUG("Bad driver ioctl number, 0x%x (of 0x%x)\n", nr, dev->driver->max_ioctl); return EINVAL; From owner-svn-src-stable@freebsd.org Sun Feb 3 14:47:23 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD52D14D0EBD; Sun, 3 Feb 2019 14:47:23 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 E7D1F71663; Sun, 3 Feb 2019 14:47:22 +0000 (UTC) (envelope-from gonzo@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 DD4C9200A5; Sun, 3 Feb 2019 14:47:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13ElMoB011144; Sun, 3 Feb 2019 14:47:22 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13ElMwC011143; Sun, 3 Feb 2019 14:47:22 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902031447.x13ElMwC011143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 14:47:22 +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: r343714 - stable/12/usr.bin/systat X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/usr.bin/systat X-SVN-Commit-Revision: 343714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E7D1F71663 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 14:47:24 -0000 Author: gonzo Date: Sun Feb 3 14:47:22 2019 New Revision: 343714 URL: https://svnweb.freebsd.org/changeset/base/343714 Log: MFC r343222-r343223, r343338 r343222: Fix crash in systat(4) when certain commands are called without arguments Add check for missing arguments to dsmatchselect and dsselect PR: 219689 Submitted by: Marko Turk r343223: Fix inconsistency in return values introduced by r343222 Consistently return 1 or the case of missing arguments in both functions PR: 219689 X-MFC-With: 343222 r343338: Fix systat's :only command parser for the multiple arguments case According to systat(1) :only option is supposed to accept multiple drives but the parser for its arguments stops after first entry. Fix the parser logic to accept multiple drives. PR: 59220 Reported by: Andy Farkas Modified: stable/12/usr.bin/systat/devs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/systat/devs.c ============================================================================== --- stable/12/usr.bin/systat/devs.c Sun Feb 3 12:46:27 2019 (r343713) +++ stable/12/usr.bin/systat/devs.c Sun Feb 3 14:47:22 2019 (r343714) @@ -193,6 +193,11 @@ dsmatchselect(const char *args, devstat_select_mode se int i; int retval = 0; + if (!args) { + warnx("dsmatchselect: no arguments"); + return(1); + } + /* * Break the (pipe delimited) input string out into separate * strings. @@ -251,6 +256,11 @@ dsselect(const char *args, devstat_select_mode select_ int i; int retval = 0; + if (!args) { + warnx("dsselect: no argument"); + return(1); + } + /* * If we've gone through this code before, free previously * allocated resources. @@ -278,7 +288,7 @@ dsselect(const char *args, devstat_select_mode select_ ; if (*cp) *cp++ = '\0'; - if (cp - args == 0) + if (cp - tmpstr1 == 0) break; for (i = 0; i < num_devices; i++) { asprintf(&buffer, "%s%d", dev_select[i].device_name, @@ -302,7 +312,7 @@ dsselect(const char *args, devstat_select_mode select_ } if (i >= num_devices) error("%s: unknown drive", args); - args = cp; + tmpstr1 = cp; } free(tmpstr); From owner-svn-src-stable@freebsd.org Sun Feb 3 14:54:30 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FCB114D1617; Sun, 3 Feb 2019 14:54:30 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 B306671F2D; Sun, 3 Feb 2019 14:54:29 +0000 (UTC) (envelope-from gonzo@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 A303320265; Sun, 3 Feb 2019 14:54:29 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13EsTrg016575; Sun, 3 Feb 2019 14:54:29 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13EsTOG016574; Sun, 3 Feb 2019 14:54:29 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902031454.x13EsTOG016574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 14:54: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: r343715 - stable/12/stand/i386/libi386 X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/stand/i386/libi386 X-SVN-Commit-Revision: 343715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B306671F2D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 14:54:30 -0000 Author: gonzo Date: Sun Feb 3 14:54:29 2019 New Revision: 343715 URL: https://svnweb.freebsd.org/changeset/base/343715 Log: MFC r343008: Add Dell Chromebook to the list of devices with E820 extmem quirk enabled Just like for Acer C270 chromebook the E820 extmem workaround is required for FreeBSD to boot on Dell chromebook. PR: 204916 Submitted by: Keith White Modified: stable/12/stand/i386/libi386/biosmem.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/i386/libi386/biosmem.c ============================================================================== --- stable/12/stand/i386/libi386/biosmem.c Sun Feb 3 14:47:22 2019 (r343714) +++ stable/12/stand/i386/libi386/biosmem.c Sun Feb 3 14:54:29 2019 (r343715) @@ -74,6 +74,7 @@ struct bios_getmem_quirks { static struct bios_getmem_quirks quirks[] = { {"coreboot", "Acer", "Peppy", BQ_DISTRUST_E820_EXTMEM}, + {"coreboot", "Dell", "Wolf", BQ_DISTRUST_E820_EXTMEM}, {NULL, NULL, NULL, 0} }; From owner-svn-src-stable@freebsd.org Sun Feb 3 14:55:22 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5A2614D169E; Sun, 3 Feb 2019 14:55:22 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 684C07205C; Sun, 3 Feb 2019 14:55:22 +0000 (UTC) (envelope-from gonzo@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 5AE0D20267; Sun, 3 Feb 2019 14:55:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13EtMuc016709; Sun, 3 Feb 2019 14:55:22 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13EtMAq016708; Sun, 3 Feb 2019 14:55:22 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902031455.x13EtMAq016708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 14:55:22 +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: r343716 - stable/12/sys/dev/led X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/sys/dev/led X-SVN-Commit-Revision: 343716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 684C07205C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 14:55:23 -0000 Author: gonzo Date: Sun Feb 3 14:55:21 2019 New Revision: 343716 URL: https://svnweb.freebsd.org/changeset/base/343716 Log: MFC r343029: [led] propagate error from set_led() to the caller Do not lose error condition by always returning 0 from set_led. None of the calls to set_led checks for return value at the moment so none of API consumers in base is affected. PR: 231567 Submitted by: Bertrand Petit Modified: stable/12/sys/dev/led/led.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/led/led.c ============================================================================== --- stable/12/sys/dev/led/led.c Sun Feb 3 14:54:29 2019 (r343715) +++ stable/12/sys/dev/led/led.c Sun Feb 3 14:55:21 2019 (r343716) @@ -261,7 +261,7 @@ led_set(char const *name, char const *cmd) mtx_unlock(&led_mtx); if (sb != NULL) sbuf_delete(sb); - return (0); + return (error); } static struct cdevsw led_cdevsw = { From owner-svn-src-stable@freebsd.org Sun Feb 3 15:34:11 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0262614D31D2; Sun, 3 Feb 2019 15:34:11 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 9646473D0A; Sun, 3 Feb 2019 15:34:10 +0000 (UTC) (envelope-from gonzo@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 8B81F20945; Sun, 3 Feb 2019 15:34:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13FYADW040182; Sun, 3 Feb 2019 15:34:10 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13FY9Kk040178; Sun, 3 Feb 2019 15:34:09 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902031534.x13FY9Kk040178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 15:34: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: r343718 - in stable/12/sys: arm64/conf dts/arm/overlays dts/arm64/overlays modules/dtb/rpi X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in stable/12/sys: arm64/conf dts/arm/overlays dts/arm64/overlays modules/dtb/rpi X-SVN-Commit-Revision: 343718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9646473D0A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 15:34:11 -0000 Author: gonzo Date: Sun Feb 3 15:34:09 2019 New Revision: 343718 URL: https://svnweb.freebsd.org/changeset/base/343718 Log: MFC r343069: [rpi] Reorganize spigen(4) overlays for Raspberry Pi - Remove CS=2 entry from spigen-rpi2 since it didn't work - Add spigen-rpi3 overlay for Raspberry Pi 3 - Enable rpi overlay modules for GENERIC kernel on aarch64 PR: 233489 Submitted by: bobf@mrp3.com Reviewed by: db Differential Revision: https://reviews.freebsd.org/D16088 Added: stable/12/sys/dts/arm64/overlays/spigen-rpi3.dtso - copied unchanged from r343069, head/sys/dts/arm64/overlays/spigen-rpi3.dtso Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/dts/arm/overlays/spigen-rpi2.dtso stable/12/sys/modules/dtb/rpi/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Sun Feb 3 14:56:38 2019 (r343717) +++ stable/12/sys/arm64/conf/GENERIC Sun Feb 3 15:34:09 2019 (r343718) @@ -262,4 +262,4 @@ options FDT device acpi # DTBs -makeoptions MODULES_EXTRA="dtb/allwinner" +makeoptions MODULES_EXTRA="dtb/allwinner dtb/rpi" Modified: stable/12/sys/dts/arm/overlays/spigen-rpi2.dtso ============================================================================== --- stable/12/sys/dts/arm/overlays/spigen-rpi2.dtso Sun Feb 3 14:56:38 2019 (r343717) +++ stable/12/sys/dts/arm/overlays/spigen-rpi2.dtso Sun Feb 3 15:34:09 2019 (r343718) @@ -12,6 +12,7 @@ spigen0: spigen0 { compatible = "freebsd,spigen"; reg = <0>; + spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ status = "okay"; }; spigen1: spigen1 { @@ -20,20 +21,10 @@ spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ status = "okay"; }; - spigen2: spigen2 { - compatible = "freebsd,spigen"; - reg = <2>; - spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ - status = "okay"; - }; }; &{/soc/gpio@7e200000/spi0_cs_pins} { - brcm,pins = <8 7 16>; + brcm,pins = <8 7>; brcm,function = <4>; /* ALT0 */ -}; - -&{/soc/gpio@7e200000/spi0_gpio7} { - brcm,pins = <7 8 16 9 10 11>; }; Copied: stable/12/sys/dts/arm64/overlays/spigen-rpi3.dtso (from r343069, head/sys/dts/arm64/overlays/spigen-rpi3.dtso) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dts/arm64/overlays/spigen-rpi3.dtso Sun Feb 3 15:34:09 2019 (r343718, copy of r343069, head/sys/dts/arm64/overlays/spigen-rpi3.dtso) @@ -0,0 +1,30 @@ +/* $FreeBSD$ */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2837"; +}; + +&{/soc/spi@7e204000} { + status = "okay"; + spigen0: spigen0 { + compatible = "freebsd,spigen"; + reg = <0>; + spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ + status = "okay"; + }; + spigen1: spigen1 { + compatible = "freebsd,spigen"; + reg = <1>; + spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ + status = "okay"; + }; +}; + +&{/soc/gpio@7e200000/spi0_cs_pins} { + brcm,pins = <8 7>; + brcm,function = <4>; /* ALT0 */ +}; + Modified: stable/12/sys/modules/dtb/rpi/Makefile ============================================================================== --- stable/12/sys/modules/dtb/rpi/Makefile Sun Feb 3 14:56:38 2019 (r343717) +++ stable/12/sys/modules/dtb/rpi/Makefile Sun Feb 3 15:34:09 2019 (r343718) @@ -1,7 +1,12 @@ # $FreeBSD$ # DTS files for the Raspberry Pi-B +.if ${MACHINE_ARCH:Marmv[67]*} != "" DTSO= \ spigen-rpi-b.dtso \ - spigen-rpi2.dtso \ + spigen-rpi2.dtso +.elif ${MACHINE_ARCH} == "aarch64" +DTSO= \ + spigen-rpi3.dtso +.endif .include From owner-svn-src-stable@freebsd.org Sun Feb 3 21:17:28 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA30014B3C6A; Sun, 3 Feb 2019 21:17:27 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 4041487437; Sun, 3 Feb 2019 21:17:27 +0000 (UTC) (envelope-from gonzo@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 24D832432A; Sun, 3 Feb 2019 21:17:27 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13LHQ2S021140; Sun, 3 Feb 2019 21:17:26 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13LHQEG021138; Sun, 3 Feb 2019 21:17:26 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902032117.x13LHQEG021138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 21:17:26 +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: r343721 - in stable/12/sys/dev/usb: . quirk X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in stable/12/sys/dev/usb: . quirk X-SVN-Commit-Revision: 343721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4041487437 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 21:17:28 -0000 Author: gonzo Date: Sun Feb 3 21:17:26 2019 New Revision: 343721 URL: https://svnweb.freebsd.org/changeset/base/343721 Log: MFC r343106: [usb] Add quirk for SmartG2 USB memory key PR: 167001 Submitted by: Daan Vreeken [PA4DAN] Modified: stable/12/sys/dev/usb/quirk/usb_quirk.c stable/12/sys/dev/usb/usbdevs Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/12/sys/dev/usb/quirk/usb_quirk.c Sun Feb 3 18:43:20 2019 (r343720) +++ stable/12/sys/dev/usb/quirk/usb_quirk.c Sun Feb 3 21:17:26 2019 (r343721) @@ -497,6 +497,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(VIALABS, USB30SATABRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), + USB_QUIRK(SMART2, G2MEMKEY, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), /* Non-standard USB MIDI devices */ USB_QUIRK(ROLAND, UM1, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SC8850, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), Modified: stable/12/sys/dev/usb/usbdevs ============================================================================== --- stable/12/sys/dev/usb/usbdevs Sun Feb 3 18:43:20 2019 (r343720) +++ stable/12/sys/dev/usb/usbdevs Sun Feb 3 21:17:26 2019 (r343721) @@ -561,6 +561,7 @@ vendor NETAC 0x0dd8 Netac vendor SITECOMEU 0x0df6 Sitecom Europe vendor MOBILEACTION 0x0df7 Mobile Action vendor AMIGO 0x0e0b Amigo Technology +vendor SMART2 0x0e39 Smart Modular Technologies vendor SPEEDDRAGON 0x0e55 Speed Dragon Multimedia vendor HAWKING 0x0e66 Hawking vendor FOSSIL 0x0e67 Fossil, Inc @@ -4370,6 +4371,9 @@ product SKANHEX SX_520Z 0x5200 SX 520z Camera /* Smart Technologies products */ product SMART PL2303 0x2303 Serial adapter + +/* Smart Modular Technologies products */ +product SMART2 G2MEMKEY 0x1700 G2 Memory Key /* SmartBridges products */ product SMARTBRIDGES SMARTLINK 0x0001 SmartLink USB Ethernet From owner-svn-src-stable@freebsd.org Sun Feb 3 21:18:47 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B49814B3D25; Sun, 3 Feb 2019 21:18:47 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 C49C58757D; Sun, 3 Feb 2019 21:18:46 +0000 (UTC) (envelope-from gonzo@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 B5F022432C; Sun, 3 Feb 2019 21:18:46 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13LIkeK021264; Sun, 3 Feb 2019 21:18:46 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13LIkwh021263; Sun, 3 Feb 2019 21:18:46 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902032118.x13LIkwh021263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 21:18: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: r343722 - stable/12/usr.bin/compress X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/usr.bin/compress X-SVN-Commit-Revision: 343722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C49C58757D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 21:18:47 -0000 Author: gonzo Date: Sun Feb 3 21:18:46 2019 New Revision: 343722 URL: https://svnweb.freebsd.org/changeset/base/343722 Log: MFC r343127: Fix descriptor/memory leak in compress(1) code This is mostly a style fix since the code in question is not called multiple times and doesn't have cummulative effect. PR: 204953 Submitted by: David Binderman Modified: stable/12/usr.bin/compress/compress.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/compress/compress.c ============================================================================== --- stable/12/usr.bin/compress/compress.c Sun Feb 3 21:17:26 2019 (r343721) +++ stable/12/usr.bin/compress/compress.c Sun Feb 3 21:18:46 2019 (r343722) @@ -322,6 +322,8 @@ decompress(const char *in, const char *out, int bits) if ((ofp = fopen(out, "w")) == NULL || (nr != 0 && fwrite(buf, 1, nr, ofp) != nr)) { cwarn("%s", out); + if (ofp) + (void)fclose(ofp); (void)fclose(ifp); return; } From owner-svn-src-stable@freebsd.org Sun Feb 3 22:45:51 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8149C14B5DA6; Sun, 3 Feb 2019 22:45:51 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 215DF89E9E; Sun, 3 Feb 2019 22:45:51 +0000 (UTC) (envelope-from gonzo@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 0CD1F25253; Sun, 3 Feb 2019 22:45:51 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13Mjo4i068251; Sun, 3 Feb 2019 22:45:50 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13MjoCk068250; Sun, 3 Feb 2019 22:45:50 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902032245.x13MjoCk068250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 22:45:50 +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: r343725 - stable/12/sys/cam/ata X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/sys/cam/ata X-SVN-Commit-Revision: 343725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 215DF89E9E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 22:45:51 -0000 Author: gonzo Date: Sun Feb 3 22:45:50 2019 New Revision: 343725 URL: https://svnweb.freebsd.org/changeset/base/343725 Log: MFC r343129: [ata] Add workaround for KingDian S200 SSD crash on receiving TRIM command - Add ADA_Q_NO_TRIM quirk to be used with the device that falsely advertise TRIM support - Add ADA_Q_NO_TRIM entry for KingDian S200 SSD PR: 222802 Submitted by: Bertrand Petit Modified: stable/12/sys/cam/ata/ata_da.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ata/ata_da.c ============================================================================== --- stable/12/sys/cam/ata/ata_da.c Sun Feb 3 21:31:40 2019 (r343724) +++ stable/12/sys/cam/ata/ata_da.c Sun Feb 3 22:45:50 2019 (r343725) @@ -118,7 +118,8 @@ typedef enum { ADA_Q_4K = 0x01, ADA_Q_NCQ_TRIM_BROKEN = 0x02, ADA_Q_LOG_BROKEN = 0x04, - ADA_Q_SMR_DM = 0x08 + ADA_Q_SMR_DM = 0x08, + ADA_Q_NO_TRIM = 0x10 } ada_quirks; #define ADA_Q_BIT_STRING \ @@ -126,7 +127,8 @@ typedef enum { "\0014K" \ "\002NCQ_TRIM_BROKEN" \ "\003LOG_BROKEN" \ - "\004SMR_DM" + "\004SMR_DM" \ + "\005NO_TRIM" typedef enum { ADA_CCB_RAHEAD = 0x01, @@ -540,6 +542,14 @@ static struct ada_quirk_entry ada_quirk_table[] = }, { /* + * KingDian S200 60GB P0921B + * Trimming crash the SSD + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "KingDian S200 *", "*" }, + /*quirks*/ADA_Q_NO_TRIM + }, + { + /* * Kingston E100 Series SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ @@ -1796,6 +1806,10 @@ adaregister(struct cam_periph *periph, void *arg) softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE; if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; + /* Device lies about TRIM capability. */ + if ((softc->quirks & ADA_Q_NO_TRIM) && + (softc->flags & ADA_FLAG_CAN_TRIM)) + softc->flags &= ~ADA_FLAG_CAN_TRIM; if (softc->flags & ADA_FLAG_CAN_TRIM) { softc->disk->d_flags |= DISKFLAG_CANDELETE; softc->disk->d_delmaxsize = softc->params.secsize * From owner-svn-src-stable@freebsd.org Sun Feb 3 22:49:03 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA4D914B5EF0; Sun, 3 Feb 2019 22:49:02 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 7ED088A03C; Sun, 3 Feb 2019 22:49:02 +0000 (UTC) (envelope-from gonzo@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 685922525B; Sun, 3 Feb 2019 22:49:02 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13Mn2Ga068445; Sun, 3 Feb 2019 22:49:02 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13Mn28c068443; Sun, 3 Feb 2019 22:49:02 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902032249.x13Mn28c068443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 22:49: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: r343726 - in stable/12/sys/dev/usb: . quirk X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in stable/12/sys/dev/usb: . quirk X-SVN-Commit-Revision: 343726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7ED088A03C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 22:49:03 -0000 Author: gonzo Date: Sun Feb 3 22:49:01 2019 New Revision: 343726 URL: https://svnweb.freebsd.org/changeset/base/343726 Log: MFC r343156: [usb] Add HID_IGNORE quirks for multiple UPS devices Without HID_IGNORE quirk enabled these models appear in the system as a uhid devices while NUT (Network UPS Tool) expects them to be ugen. PR: 131521 Submitted by: Naoyuki Tai , John Bayly Modified: stable/12/sys/dev/usb/quirk/usb_quirk.c stable/12/sys/dev/usb/usbdevs Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/12/sys/dev/usb/quirk/usb_quirk.c Sun Feb 3 22:45:50 2019 (r343725) +++ stable/12/sys/dev/usb/quirk/usb_quirk.c Sun Feb 3 22:49:01 2019 (r343726) @@ -110,8 +110,19 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(XEROX, WCM15, 0x0000, 0xffff, UQ_BROKEN_BIDIR), /* Devices which should be ignored by uhid */ USB_QUIRK(APC, UPS, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6H375USB, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(BELKIN, F6C550AVR, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C1250TWRK, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C1500TWRK, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C900UNV, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C100UNV, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C120UNV, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C800UNV, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C1100UNV, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(CYBERPOWER, BC900D, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(CYBERPOWER, 1500CAVRLCD, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(CYBERPOWER, OR2200LCDRM2U, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(DELL2, VARIOUS_UPS, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(CYPRESS, SILVERSHIELD, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(DREAMLINK, DL100B, 0x0000, 0xffff, UQ_HID_IGNORE), @@ -119,8 +130,26 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(LIEBERT2, PSI1000, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(LIEBERT2, POWERSURE_PSA, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(MGE, UPS1, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(MGE, UPS2, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(POWERCOM, IMPERIAL_SERIES, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(POWERCOM, SMART_KING_PRO, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(POWERCOM, WOW, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(POWERCOM, VANGUARD, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(POWERCOM, BLACK_KNIGHT_PRO, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, AVR550U, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, AVR750U, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, ECO550UPS, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, T750_INTL, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, RT_2200_INTL, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, OMNI1000LCD, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, OMNI900LCD, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, SMART_2200RMXL2U, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, UPS_3014, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, SU1500RTXL2UA, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, SU6000RT4U, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, SU1500RTXL2UA_2, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(APPLE, IPHONE, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(APPLE, IPHONE_3G, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(MEGATEC, UPS, 0x0000, 0xffff, UQ_HID_IGNORE), Modified: stable/12/sys/dev/usb/usbdevs ============================================================================== --- stable/12/sys/dev/usb/usbdevs Sun Feb 3 22:45:50 2019 (r343725) +++ stable/12/sys/dev/usb/usbdevs Sun Feb 3 22:49:01 2019 (r343726) @@ -140,6 +140,7 @@ vendor SANYO 0x0474 Sanyo Electric vendor SEAGATE 0x0477 Seagate vendor CONNECTIX 0x0478 Connectix vendor SEMTECH 0x047a Semtech +vendor DELL2 0x047c Dell vendor KENSINGTON 0x047d Kensington vendor LUCENT 0x047e Lucent vendor PLANTRONICS 0x047f Plantronics @@ -554,6 +555,7 @@ vendor ACDC 0x0d7e American Computer & Digital Compon vendor CMEDIA 0x0d8c CMEDIA vendor CONCEPTRONIC 0x0d8e Conceptronic vendor SKANHEX 0x0d96 Skanhex Technology, Inc. +vendor POWERCOM 0x0d9f PowerCOM vendor MSI 0x0db0 Micro Star International vendor ELCON 0x0db7 ELCON Systemtechnik vendor UNKNOWN4 0x0dcd Unknown vendor @@ -1366,8 +1368,16 @@ product BELKIN USB2LAN 0x0121 USB to LAN product BELKIN F5U208 0x0208 F5U208 VideoBus II product BELKIN F5U237 0x0237 F5U237 USB 2.0 7-Port Hub product BELKIN F5U257 0x0257 F5U257 Serial +product BELKIN F6H375USB 0x0375 F6H375-USB product BELKIN F5U409 0x0409 F5U409 Serial product BELKIN F6C550AVR 0x0551 F6C550-AVR UPS +product BELKIN F6C1250TWRK 0x0750 F6C1250-TW-RK +product BELKIN F6C1500TWRK 0x0751 F6C1500-TW-RK +product BELKIN F6C900UNV 0x0900 F6C900-UNV +product BELKIN F6C100UNV 0x0910 F6C100-UNV +product BELKIN F6C120UNV 0x0912 F6C120-UNV UPS +product BELKIN F6C800UNV 0x0980 F6C800-UNV +product BELKIN F6C1100UNV 0x1100 F6C1100-UNV, F6C1200-UNV product BELKIN F5U120 0x1203 F5U120-PC Hub product BELKIN RTL8188CU 0x1102 RTL8188CU Wireless Adapter product BELKIN F9L1103 0x1103 F9L1103 Wireless Adapter @@ -1602,7 +1612,9 @@ product CURITEL UM150 0x3711 EVDO modem product CURITEL UM175 0x3714 EVDO modem /* CyberPower products */ -product CYBERPOWER 1500CAVRLCD 0x0501 1500CAVRLCD +product CYBERPOWER BC900D 0x0005 900AVR/BC900D, CP1200AVR/BC1200D +product CYBERPOWER 1500CAVRLCD 0x0501 1500CAVRLCD +product CYBERPOWER OR2200LCDRM2U 0x0601 OR2200LCDRM2U /* CyberTAN Technology products */ product CYBERTAN TG54USB 0x1666 TG54USB @@ -1654,6 +1666,7 @@ product DELL U5730 0x8180 Dell 5730 3G product DELL U5730_2 0x8181 Dell 5730 3G product DELL U5730_3 0x8182 Dell 5730 3G product DELL DW700 0x9500 Dell DW700 GPS +product DELL2 VARIOUS_UPS 0xffff Various UPS Models /* Delorme Paublishing products */ product DELORME EARTHMATE 0x0100 Earthmate GPS @@ -2402,6 +2415,8 @@ product HP 930C 0x1204 DeskJet 930c product HP3 RTL8188CU 0x1629 RTL8188CU product HP P2000U 0x1801 Inkjet P-2000U product HP HS2300 0x1e1d HS2300 HSDPA (aka MC8775) +product HP T500 0x1f01 T500 +product HP T750 0x1f02 T750 product HP 640C 0x2004 DeskJet 640c product HP 4670V 0x3005 ScanJet 4670v product HP P1100 0x3102 Photosmart P1100 @@ -2776,6 +2791,7 @@ product LEXMARK S2450 0x0009 Optra S 2450 /* Liebert products */ product LIEBERT POWERSURE_PXT 0xffff PowerSure Personal XT +product LIEBERT2 POWERSURE_PSA 0x0001 PowerSure PSA UPS product LIEBERT2 PSI1000 0x0004 UPS PSI 1000 FW:08 /* Link Instruments Inc. products */ @@ -3701,6 +3717,13 @@ product PLOYTEC SPL_CRIMSON_1 0xc150 SPL Crimson Revis product PLX TESTBOARD 0x9060 test board product PLX CA42 0xac70 CA-42 +/* PowerCOM products */ +product POWERCOM IMPERIAL_SERIES 0x00a2 IMPERIAL Series +product POWERCOM SMART_KING_PRO 0x00a3 Smart KING Pro +product POWERCOM WOW 0x00a4 WOW +product POWERCOM VANGUARD 0x00a5 Vanguard +product POWERCOM BLACK_KNIGHT_PRO 0x00a6 Black Knight Pro + /* PNY products */ product PNY ATTACHE2 0x0010 USB 2.0 Flash Drive @@ -4640,7 +4663,20 @@ product TRENDNET RTL8188CU 0x648b RTL8188CU product TRENDNET TEW805UB 0x805b TEW-805UB /* Tripp-Lite products */ -product TRIPPLITE U209 0x2008 Serial +product TRIPPLITE U209 0x2008 Serial +product TRIPPLITE2 OMNIVS1000 0x0001 OMNIVS1000, SMART550USB +product TRIPPLITE2 AVR550U 0x1003 AVR550U +product TRIPPLITE2 AVR750U 0x1007 AVR750U +product TRIPPLITE2 ECO550UPS 0x1008 ECO550UPS +product TRIPPLITE2 T750_INTL 0x1f06 T750 INTL +product TRIPPLITE2 RT_2200_INTL 0x1f0a R/T 2200 INTL +product TRIPPLITE2 OMNI1000LCD 0x2005 OMNI1000LCD +product TRIPPLITE2 OMNI900LCD 0x2007 OMNI900LCD +product TRIPPLITE2 SMART_2200RMXL2U 0x3012 smart2200RMXL2U +product TRIPPLITE2 UPS_3014 0x3014 Unknown UPS +product TRIPPLITE2 SU1500RTXL2UA 0x4001 SmartOnline SU1500RTXL2UA +product TRIPPLITE2 SU6000RT4U 0x4002 SmartOnline SU6000RT4U +product TRIPPLITE2 SU1500RTXL2UA_2 0x4003 SmartOnline SU1500RTXL2UA /* Trumpion products */ product TRUMPION T33520 0x1001 T33520 USB Flash Card Controller From owner-svn-src-stable@freebsd.org Mon Feb 4 03:44:08 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2A7914BD085; Mon, 4 Feb 2019 03:44:08 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 55A5E6B9E1; Mon, 4 Feb 2019 03:44:08 +0000 (UTC) (envelope-from avos@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 313B15C3; Mon, 4 Feb 2019 03:44:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x143i8Fo025739; Mon, 4 Feb 2019 03:44:08 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x143i74B025737; Mon, 4 Feb 2019 03:44:07 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902040344.x143i74B025737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 4 Feb 2019 03:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343730 - in stable: 10/usr.sbin/ndiscvt 11/usr.sbin/ndiscvt 12/usr.sbin/ndiscvt X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/usr.sbin/ndiscvt 11/usr.sbin/ndiscvt 12/usr.sbin/ndiscvt X-SVN-Commit-Revision: 343730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 55A5E6B9E1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 03:44:08 -0000 Author: avos Date: Mon Feb 4 03:44:07 2019 New Revision: 343730 URL: https://svnweb.freebsd.org/changeset/base/343730 Log: MFC r343576: ndiscvt(8): abort if no IDs were found during conversion. PR: 69268 Submitted by: Modified: stable/10/usr.sbin/ndiscvt/inf.c stable/10/usr.sbin/ndiscvt/ndiscvt.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/ndiscvt/inf.c stable/11/usr.sbin/ndiscvt/ndiscvt.c stable/12/usr.sbin/ndiscvt/inf.c stable/12/usr.sbin/ndiscvt/ndiscvt.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/usr.sbin/ndiscvt/inf.c ============================================================================== --- stable/10/usr.sbin/ndiscvt/inf.c Mon Feb 4 02:18:27 2019 (r343729) +++ stable/10/usr.sbin/ndiscvt/inf.c Mon Feb 4 03:44:07 2019 (r343730) @@ -60,9 +60,9 @@ static struct assign (struct assign *); static struct section *find_section (const char *); -static void dump_deviceids_pci (void); -static void dump_deviceids_pcmcia (void); -static void dump_deviceids_usb (void); +static int dump_deviceids_pci (void); +static int dump_deviceids_pcmcia (void); +static int dump_deviceids_usb (void); static void dump_pci_id (const char *); static void dump_pcmcia_id (const char *); static void dump_usb_id (const char *); @@ -83,9 +83,11 @@ inf_parse (FILE *fp, FILE *outfp) yyin = fp; yyparse(); - dump_deviceids_pci(); - dump_deviceids_pcmcia(); - dump_deviceids_usb(); + if (dump_deviceids_pci() == 0 && + dump_deviceids_pcmcia() == 0 && + dump_deviceids_usb() == 0) + return (-1); + fprintf(outfp, "#ifdef NDIS_REGVALS\n"); dump_regvals(); fprintf(outfp, "#endif /* NDIS_REGVALS */\n"); @@ -278,7 +280,7 @@ dump_usb_id(const char *s) fprintf(ofp, "\t\\\n\t{ %s, %s, ", vidstr, pidstr); } -static void +static int dump_deviceids_pci() { struct assign *manf, *dev; @@ -368,10 +370,10 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } -static void +static int dump_deviceids_pcmcia() { struct assign *manf, *dev; @@ -461,10 +463,10 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } -static void +static int dump_deviceids_usb() { struct assign *manf, *dev; @@ -554,7 +556,7 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } static void Modified: stable/10/usr.sbin/ndiscvt/ndiscvt.c ============================================================================== --- stable/10/usr.sbin/ndiscvt/ndiscvt.c Mon Feb 4 02:18:27 2019 (r343729) +++ stable/10/usr.sbin/ndiscvt/ndiscvt.c Mon Feb 4 03:44:07 2019 (r343730) @@ -369,7 +369,8 @@ main(int argc, char *argv[]) err(1, "opening .INF file '%s' failed", inffile); - inf_parse(fp, outfp); + if (inf_parse(fp, outfp) != 0) + errx(1, "creating .INF file - no entries created, are you using the correct files?"); fclose(fp); } From owner-svn-src-stable@freebsd.org Mon Feb 4 03:44:09 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5111A14BD08F; Mon, 4 Feb 2019 03:44:09 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 ECB6E6B9E7; Mon, 4 Feb 2019 03:44:08 +0000 (UTC) (envelope-from avos@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 B40725C4; Mon, 4 Feb 2019 03:44:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x143i8Cs025746; Mon, 4 Feb 2019 03:44:08 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x143i8IX025745; Mon, 4 Feb 2019 03:44:08 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902040344.x143i8IX025745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 4 Feb 2019 03:44:08 +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: r343730 - in stable: 10/usr.sbin/ndiscvt 11/usr.sbin/ndiscvt 12/usr.sbin/ndiscvt X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/usr.sbin/ndiscvt 11/usr.sbin/ndiscvt 12/usr.sbin/ndiscvt X-SVN-Commit-Revision: 343730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ECB6E6B9E7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 03:44:09 -0000 Author: avos Date: Mon Feb 4 03:44:07 2019 New Revision: 343730 URL: https://svnweb.freebsd.org/changeset/base/343730 Log: MFC r343576: ndiscvt(8): abort if no IDs were found during conversion. PR: 69268 Submitted by: Modified: stable/12/usr.sbin/ndiscvt/inf.c stable/12/usr.sbin/ndiscvt/ndiscvt.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/ndiscvt/inf.c stable/10/usr.sbin/ndiscvt/ndiscvt.c stable/11/usr.sbin/ndiscvt/inf.c stable/11/usr.sbin/ndiscvt/ndiscvt.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/usr.sbin/ndiscvt/inf.c ============================================================================== --- stable/12/usr.sbin/ndiscvt/inf.c Mon Feb 4 02:18:27 2019 (r343729) +++ stable/12/usr.sbin/ndiscvt/inf.c Mon Feb 4 03:44:07 2019 (r343730) @@ -62,9 +62,9 @@ static struct assign (struct assign *); static struct section *find_section (const char *); -static void dump_deviceids_pci (void); -static void dump_deviceids_pcmcia (void); -static void dump_deviceids_usb (void); +static int dump_deviceids_pci (void); +static int dump_deviceids_pcmcia (void); +static int dump_deviceids_usb (void); static void dump_pci_id (const char *); static void dump_pcmcia_id (const char *); static void dump_usb_id (const char *); @@ -85,9 +85,11 @@ inf_parse (FILE *fp, FILE *outfp) yyin = fp; yyparse(); - dump_deviceids_pci(); - dump_deviceids_pcmcia(); - dump_deviceids_usb(); + if (dump_deviceids_pci() == 0 && + dump_deviceids_pcmcia() == 0 && + dump_deviceids_usb() == 0) + return (-1); + fprintf(outfp, "#ifdef NDIS_REGVALS\n"); dump_regvals(); fprintf(outfp, "#endif /* NDIS_REGVALS */\n"); @@ -280,7 +282,7 @@ dump_usb_id(const char *s) fprintf(ofp, "\t\\\n\t{ %s, %s, ", vidstr, pidstr); } -static void +static int dump_deviceids_pci() { struct assign *manf, *dev; @@ -370,10 +372,10 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } -static void +static int dump_deviceids_pcmcia() { struct assign *manf, *dev; @@ -463,10 +465,10 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } -static void +static int dump_deviceids_usb() { struct assign *manf, *dev; @@ -556,7 +558,7 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } static void Modified: stable/12/usr.sbin/ndiscvt/ndiscvt.c ============================================================================== --- stable/12/usr.sbin/ndiscvt/ndiscvt.c Mon Feb 4 02:18:27 2019 (r343729) +++ stable/12/usr.sbin/ndiscvt/ndiscvt.c Mon Feb 4 03:44:07 2019 (r343730) @@ -372,7 +372,8 @@ main(int argc, char *argv[]) err(1, "opening .INF file '%s' failed", inffile); - inf_parse(fp, outfp); + if (inf_parse(fp, outfp) != 0) + errx(1, "creating .INF file - no entries created, are you using the correct files?"); fclose(fp); } From owner-svn-src-stable@freebsd.org Mon Feb 4 03:44:08 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B61614BD07F; Mon, 4 Feb 2019 03:44:08 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 D2F6F6B9E0; Mon, 4 Feb 2019 03:44:07 +0000 (UTC) (envelope-from avos@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 A71525C2; Mon, 4 Feb 2019 03:44:07 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x143i7UE025732; Mon, 4 Feb 2019 03:44:07 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x143i7Yp025730; Mon, 4 Feb 2019 03:44:07 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902040344.x143i7Yp025730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 4 Feb 2019 03:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343730 - in stable: 10/usr.sbin/ndiscvt 11/usr.sbin/ndiscvt 12/usr.sbin/ndiscvt X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/usr.sbin/ndiscvt 11/usr.sbin/ndiscvt 12/usr.sbin/ndiscvt X-SVN-Commit-Revision: 343730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D2F6F6B9E0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 03:44:08 -0000 Author: avos Date: Mon Feb 4 03:44:07 2019 New Revision: 343730 URL: https://svnweb.freebsd.org/changeset/base/343730 Log: MFC r343576: ndiscvt(8): abort if no IDs were found during conversion. PR: 69268 Submitted by: Modified: stable/11/usr.sbin/ndiscvt/inf.c stable/11/usr.sbin/ndiscvt/ndiscvt.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/ndiscvt/inf.c stable/10/usr.sbin/ndiscvt/ndiscvt.c stable/12/usr.sbin/ndiscvt/inf.c stable/12/usr.sbin/ndiscvt/ndiscvt.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/usr.sbin/ndiscvt/inf.c ============================================================================== --- stable/11/usr.sbin/ndiscvt/inf.c Mon Feb 4 02:18:27 2019 (r343729) +++ stable/11/usr.sbin/ndiscvt/inf.c Mon Feb 4 03:44:07 2019 (r343730) @@ -60,9 +60,9 @@ static struct assign (struct assign *); static struct section *find_section (const char *); -static void dump_deviceids_pci (void); -static void dump_deviceids_pcmcia (void); -static void dump_deviceids_usb (void); +static int dump_deviceids_pci (void); +static int dump_deviceids_pcmcia (void); +static int dump_deviceids_usb (void); static void dump_pci_id (const char *); static void dump_pcmcia_id (const char *); static void dump_usb_id (const char *); @@ -83,9 +83,11 @@ inf_parse (FILE *fp, FILE *outfp) yyin = fp; yyparse(); - dump_deviceids_pci(); - dump_deviceids_pcmcia(); - dump_deviceids_usb(); + if (dump_deviceids_pci() == 0 && + dump_deviceids_pcmcia() == 0 && + dump_deviceids_usb() == 0) + return (-1); + fprintf(outfp, "#ifdef NDIS_REGVALS\n"); dump_regvals(); fprintf(outfp, "#endif /* NDIS_REGVALS */\n"); @@ -278,7 +280,7 @@ dump_usb_id(const char *s) fprintf(ofp, "\t\\\n\t{ %s, %s, ", vidstr, pidstr); } -static void +static int dump_deviceids_pci() { struct assign *manf, *dev; @@ -368,10 +370,10 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } -static void +static int dump_deviceids_pcmcia() { struct assign *manf, *dev; @@ -461,10 +463,10 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } -static void +static int dump_deviceids_usb() { struct assign *manf, *dev; @@ -554,7 +556,7 @@ done: fprintf(ofp, "\n\n"); - return; + return (found); } static void Modified: stable/11/usr.sbin/ndiscvt/ndiscvt.c ============================================================================== --- stable/11/usr.sbin/ndiscvt/ndiscvt.c Mon Feb 4 02:18:27 2019 (r343729) +++ stable/11/usr.sbin/ndiscvt/ndiscvt.c Mon Feb 4 03:44:07 2019 (r343730) @@ -369,7 +369,8 @@ main(int argc, char *argv[]) err(1, "opening .INF file '%s' failed", inffile); - inf_parse(fp, outfp); + if (inf_parse(fp, outfp) != 0) + errx(1, "creating .INF file - no entries created, are you using the correct files?"); fclose(fp); } From owner-svn-src-stable@freebsd.org Mon Feb 4 03:52:05 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDC8614BD467; Mon, 4 Feb 2019 03:52:05 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 749196C071; Mon, 4 Feb 2019 03:52:05 +0000 (UTC) (envelope-from avos@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 2A953746; Mon, 4 Feb 2019 03:52:05 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x143q5pV027709; Mon, 4 Feb 2019 03:52:05 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x143q4qH027708; Mon, 4 Feb 2019 03:52:04 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902040352.x143q4qH027708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 4 Feb 2019 03:52: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: r343731 - stable/12/sys/dev/usb/wlan X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 749196C071 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 03:52:06 -0000 Author: avos Date: Mon Feb 4 03:52:04 2019 New Revision: 343731 URL: https://svnweb.freebsd.org/changeset/base/343731 Log: MFC r343524: rsu(4): do not ignore mgmtrate / mcastrate / ucastrate. Enforce net80211 rates for control / management / multicast / EAPOL frames and allow to override rate for unicast frames via ifconfig(8) 'ucastrate' option; by default it still uses f/w rate adaptation for unicast frames. Modified: stable/12/sys/dev/usb/wlan/if_rsu.c stable/12/sys/dev/usb/wlan/if_rsureg.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rsu.c Mon Feb 4 03:44:07 2019 (r343730) +++ stable/12/sys/dev/usb/wlan/if_rsu.c Mon Feb 4 03:52:04 2019 (r343731) @@ -2757,15 +2757,17 @@ static int rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, struct rsu_data *data) { + const struct ieee80211_txparam *tp = ni->ni_txparms; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; struct r92s_tx_desc *txd; - uint8_t type, cipher; + uint8_t rate, ridx, type, cipher; int prio = 0; uint8_t which; int hasqos; + int ismcast; int xferlen; int qid; @@ -2773,10 +2775,26 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no wh = mtod(m0, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); RSU_DPRINTF(sc, RSU_DEBUG_TX, "%s: data=%p, m=%p\n", __func__, data, m0); + /* Choose a TX rate index. */ + if (type == IEEE80211_FC0_TYPE_MGT || + type == IEEE80211_FC0_TYPE_CTL || + (m0->m_flags & M_EAPOL) != 0) + rate = tp->mgmtrate; + else if (ismcast) + rate = tp->mcastrate; + else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) + rate = tp->ucastrate; + else + rate = 0; + + if (rate != 0) + ridx = rate2ridx(rate); + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); if (k == NULL) { @@ -2855,8 +2873,17 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no } /* XXX todo: set AGGEN bit if appropriate? */ txd->txdw2 |= htole32(R92S_TXDW2_BK); - if (IEEE80211_IS_MULTICAST(wh->i_addr1)) + if (ismcast) txd->txdw2 |= htole32(R92S_TXDW2_BMCAST); + + /* Force mgmt / mcast / ucast rate if needed. */ + if (rate != 0) { + /* Data rate fallback limit (max). */ + txd->txdw5 |= htole32(SM(R92S_TXDW5_DATARATE_FB_LMT, 0x1f)); + txd->txdw5 |= htole32(SM(R92S_TXDW5_DATARATE, ridx)); + txd->txdw4 |= htole32(R92S_TXDW4_DRVRATE); + } + /* * Firmware will use and increment the sequence number for the * specified priority. Modified: stable/12/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rsureg.h Mon Feb 4 03:44:07 2019 (r343730) +++ stable/12/sys/dev/usb/wlan/if_rsureg.h Mon Feb 4 03:52:04 2019 (r343731) @@ -700,9 +700,14 @@ struct r92s_tx_desc { uint32_t txdw4; #define R92S_TXDW4_TXBW 0x00040000 +#define R92S_TXDW4_DRVRATE 0x80000000 uint32_t txdw5; -#define R92S_TXDW5_DISFB 0x00008000 +#define R92S_TXDW5_DATARATE_M 0x00007e00 +#define R92S_TXDW5_DATARATE_S 9 +#define R92S_TXDW5_DISFB 0x00008000 +#define R92S_TXDW5_DATARATE_FB_LMT_M 0x001f0000 +#define R92S_TXDW5_DATARATE_FB_LMT_S 16 uint16_t ipchksum; uint16_t tcpchksum; From owner-svn-src-stable@freebsd.org Mon Feb 4 08:37:17 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68CCD14C33E3; Mon, 4 Feb 2019 08:37:17 +0000 (UTC) (envelope-from bapt@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) server-signature RSA-PSS (4096 bits) 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 008CB73423; Mon, 4 Feb 2019 08:37:17 +0000 (UTC) (envelope-from bapt@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 D8AC8383F; Mon, 4 Feb 2019 08:37:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x148bG45075712; Mon, 4 Feb 2019 08:37:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x148bGwV075711; Mon, 4 Feb 2019 08:37:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201902040837.x148bGwV075711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 4 Feb 2019 08:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343734 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 343734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 008CB73423 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 08:37:17 -0000 Author: bapt Date: Mon Feb 4 08:37:16 2019 New Revision: 343734 URL: https://svnweb.freebsd.org/changeset/base/343734 Log: MFC: 332990,337892,343546 Update pci_vendors to 2019.01.29 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Mon Feb 4 08:30:29 2019 (r343733) +++ stable/11/share/misc/pci_vendors Mon Feb 4 08:37:16 2019 (r343734) @@ -2,11 +2,11 @@ # List of PCI ID's # -# Version: 2018.03.21 -# Date: 2018-03-21 03:15:01 +# Version: 2019.01.29 +# Date: 2019-01-29 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from -# the PCI ID Project at http://pci-ids.ucw.cz/. +# the PCI ID Project at https://pci-ids.ucw.cz/. # # New data are always welcome, especially if they are accurate. If you have # anything to contribute, please follow the instructions at the web site. @@ -27,6 +27,7 @@ # This is a relabelled RTL-8139 8139 AT-2500TX V3 Ethernet 0014 Loongson Technology LLC + 7a00 Hyper Transport Bridge Controller 7a02 APB (Advanced Peripheral Bus) Controller 7a03 Gigabit Ethernet Controller 7a04 OTG USB Controller @@ -34,9 +35,15 @@ 7a06 DC (Display Controller) 7a07 HDA (High Definition Audio) Controller 7a08 SATA AHCI Controller + 7a09 PCI-to-PCI Bridge + 7a0b SPI Controller + 7a0c LPC Controller 7a0f DMA (Direct Memory Access) Controller 7a14 EHCI USB Controller + 7a15 Vivante GPU (Graphics Processing Unit) + 7a19 PCI-to-PCI Bridge 7a24 OHCI USB Controller + 7a29 PCI-to-PCI Bridge 001c PEAK-System Technik GmbH 0001 PCAN-PCI CAN-Bus controller 001c 0004 2 Channel CAN Bus SJC1000 @@ -51,8 +58,7 @@ 0680 Ultra ATA/133 IDE RAID CONTROLLER CARD # Wrong ID used in subsystem ID of the TELES.S0/PCI 2.x ISDN adapter 00a7 Teles AG (Wrong ID) -# nee nCipher -0100 Thales e-Security +0100 nCipher Security 0123 General Dynamics 0128 Dell (wrong ID) # 018a is not LevelOne but there is a board misprogrammed @@ -74,6 +80,7 @@ 000a TTP-Monitoring Card V2.0 0432 SCM Microsystems, Inc. 0001 Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet] +0497 Dell Inc. (wrong ID) 0675 Dynalink 1700 IS64PH ISDN Adapter 1702 IS64PH ISDN Adapter @@ -267,6 +274,7 @@ 8086 9460 RAID Controller RSP3TD160F 8086 9480 RAID Controller RSP3MD088F 0015 MegaRAID Tri-Mode SAS3416 + 1d49 0503 ThinkSystem RAID 530-16i PCIe 12Gb Adapter 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter 1028 1fcb PERC H740P Adapter @@ -274,7 +282,6 @@ 1028 1fcf PERC H740P Mini 1d49 0601 ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter 1d49 0603 ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter - 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 8086 352e Integrated RAID Module RMSP3CD080F 8086 352f Integrated RAID Module RMSP3HD080E 8086 9461 RAID Controller RSP3DD080F @@ -405,6 +412,7 @@ 005c SAS1064A PCI-X Fusion-MPT SAS 005d MegaRAID SAS-3 3108 [Invader] 1000 9361 MegaRAID SAS 9361-8i + 1000 9363 MegaRAID SAS 9361-4i 1000 9364 MegaRAID SAS 9364-8i 1000 936a MegaRAID SAS 9364-8i 1028 1f41 PERC H830 Adapter @@ -421,6 +429,8 @@ 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter + 1d49 0608 ThinkSystem RAID 730-8i 2GB Flash PCIe 12Gb Adapter + 1d49 0609 ThinkSystem RAID 730-8i 4GB Flash PCIe 12Gb Adapter 8086 351e RMS3CC080 RAID Controller 8086 351f RMS3CC040 RAID Controller 8086 9360 RS3DC080 RAID Controller @@ -435,6 +445,7 @@ 1028 1f4d PERC H330 Embedded (for monolithic) 1054 306a SAS 3004 iMR ROMB 1d49 04db ServeRAID M1210 SAS/SATA Controller + 1d49 0504 ThinkSystem RAID 520-8i PCIe 12Gb Adapter 0060 MegaRAID SAS 1078 1000 1006 MegaRAID SAS 8888ELP 1000 100a MegaRAID SAS 8708ELP @@ -473,14 +484,17 @@ 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] + 1000 3010 SAS9211-4i 0071 MR SAS HBA 2004 0072 SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] + 1000 3040 9210-8i + 1000 30b0 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1028 1f1c 6Gbps SAS HBA Adapter 1028 1f1d PERC H200 Adapter 1028 1f1e PERC H200 Integrated 1028 1f1f PERC H200 Modular 1028 1f20 PERC H200 Embedded - 1028 1f22 Internal Tape Adapter + 1028 1f22 PERC H200 Internal Tape Adapter 8086 350f RMS2LL040 RAID Controller 8086 3700 SSD 910 Series 0073 MegaRAID SAS 2008 [Falcon] @@ -495,6 +509,7 @@ 1028 1f52 PERC H310 Embedded1 1028 1f53 PERC H310 Embedded2 1028 1f54 PERC H310 Reserved + 1028 1f78 PERC H310 1054 3035 LSI MegaRAID SAS 9240-8i 1137 0072 2004 iMR ROMB 1137 0073 2008 ROMB @@ -575,10 +590,13 @@ 0084 SAS2208 PCI-Express Fusion-MPT SAS-2 0085 SAS2208 PCI-Express Fusion-MPT SAS-2 0086 SAS2308 PCI-Express Fusion-MPT SAS-2 + 15d9 0690 Onboard MegaRAID SAS2208 [Thunderbolt] + 15d9 0691 Onboard SAS2308 PCI-Express Fusion-MPT SAS-2 0087 SAS2308 PCI-Express Fusion-MPT SAS-2 1000 3020 9207-8i SAS2.1 HBA 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i + 1014 0472 N2125 External Host Bus Adapter 1590 0044 H220i 8086 3000 RS25GB008 RAID Controller 8086 3060 RS25FB044 RAID Controller @@ -616,6 +634,7 @@ 8086 3020 RAID Controller RSP3GD016J 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) + 1000 3010 HBA 9400-8i 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA @@ -639,9 +658,19 @@ 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 00d3 MegaRAID Tri-Mode SAS3716W + 00e0 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx + 00e1 Fusion-MPT 12GSAS/PCIe SAS39xx + 00e2 Fusion-MPT 12GSAS/PCIe Secure SAS39xx + 00e3 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx + 00e4 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx + 00e5 Fusion-MPT 12GSAS/PCIe SAS38xx + 00e6 Fusion-MPT 12GSAS/PCIe Secure SAS38xx + 00e7 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx 02b0 Virtual Endpoint on PCIe Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter + 02b1 Virtual Endpoint on PCIe Switch (9749) + 1d49 0004 ThinkSystem 1610-8P NVMe Switch Adapter 0407 MegaRAID 1000 0530 MegaRAID 530 SCSI 320-0X RAID Controller 1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller @@ -712,6 +741,14 @@ 0807 SA2020ZC 0901 61C102 1000 63C815 + 10e0 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 10e1 MegaRAID 12GSAS/PCIe SAS39xx + 10e2 MegaRAID 12GSAS/PCIe Secure SAS39xx + 10e3 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 10e4 MegaRAID 12GSAS/PCIe Unsupported SAS38xx + 10e5 MegaRAID 12GSAS/PCIe SAS38xx + 10e6 MegaRAID 12GSAS/PCIe Secure SAS38xx + 10e7 MegaRAID 12GSAS/PCIe Unsupported SAS38xx 1960 MegaRAID 1000 0518 MegaRAID 518 SCSI 320-2 Controller 1000 0520 MegaRAID 520 SCSI 320-1 Controller @@ -764,10 +801,20 @@ 131b Kaveri [Radeon R4 Graphics] 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] + 13e9 Ariel + 154c Kryptos + 154e Garfield + 1551 Arlene + 1552 Pooky + 1561 Anubis + 15d8 Picasso 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] 103c 83c6 Radeon Vega 8 Mobile 1458 d000 Radeon RX Vega 11 - 15ff Vega [Radeon Vega 28 Mobile] + 15de Raven Ridge HDMI/DP Audio Controller + 15ff Fenghuang [Zhongshan Subor Z+] + 1607 Arden + 1636 Renoir 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 103c 168b ProBook 4535s 3150 RV380/M24 [Mobility Radeon X600] @@ -849,19 +896,28 @@ 4337 RS200M [Radeon IGP 330M/340M/345M/350M] 1014 053a ThinkPad R40e 103c 0850 Radeon IGP 345M - 4341 IXP150 AC'97 Audio Controller - 4342 IXP200 3COM 3C920B Ethernet Controller - 4345 EHCI USB Controller - 4347 OHCI USB Controller #1 - 4348 OHCI USB Controller #2 - 4349 Dual Channel Bus Master PCI IDE Controller - 434d IXP AC'97 Modem - 4353 SMBus + 4341 SB200 AC97 Audio Controller + 4342 SB200 PCI to PCI Bridge + 4345 SB200 EHCI USB Controller + 4346 Crayola 6 [XENOS Parent Die (XBOX 360)] + 4347 SB200 OHCI USB Controller #1 + 4348 SB200 OHCI USB Controller #2 + 4349 SB200 IDE Controller + 434c SB200 PCI to LPC Bridge + 434d SB200 AC97 Modem Controller + 4353 SB200 SMBus Controller 4354 215CT [Mach64 CT PCI] - 4358 210888CX [Mach64 CX] - 4361 IXP SB300 AC'97 Audio Controller - 4363 SMBus - 436e 436E Serial ATA Controller + 4358 Mach64 CX [Graphics Xpression] + 4361 SB300 AC'97 Audio Controller + 4362 SB300 PCI to PCI Bridge + 4363 SB300 SMBus Controller + 4365 SB300 USB Controller (EHCI) + 4367 SB300 USB Controller (EHCI) + 4368 SB300 USB Controller (EHCI) + 4369 SB300 IDE Controller + 436c SB300 PCI to LPC Bridge + 436d SB300 AC97 Modem Controller + 436e SB300 Serial ATA Controller 4370 IXP SB400 AC'97 Audio Controller 1025 0079 Aspire 5024WLMMi 1025 0091 Aspire 5032WXMi @@ -1007,6 +1063,7 @@ 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 1043 84dd M5A99X EVO (R1.0) SB950 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 4392 SB7x0/SB8x0/SB9x0 SATA Controller [Non-RAID5 mode] @@ -1042,6 +1099,7 @@ 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 439c SB7x0/SB8x0/SB9x0 IDE Controller + 1002 4392 MSI MS-7713 motherboard 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard 105b 0e13 N15235/A74MX mainboard / AMD SB700 @@ -1058,8 +1116,10 @@ 43a3 SB900 PCI to PCI bridge (PCIE port 3) 4437 RS250 [Mobility Radeon 7000 IGP] 4554 210888ET [Mach64 ET] + 4630 XENOS Parent Die (XBOX 360) + 4631 XENOS Daughter Die (XBOX 360) 4654 Mach64 VT - 4742 3D Rage PRO AGP 2X + 4742 Rage 3 [3D Rage PRO AGP 2X] 1002 0040 Rage Pro Turbo AGP 2X 1002 0044 Rage Pro Turbo AGP 2X 1002 0061 Rage Pro AIW AGP 2X @@ -1075,7 +1135,7 @@ 1028 c082 Rage Pro Turbo AGP 2X 8086 4152 Xpert 98D AGP 2X 8086 464a Rage Pro Turbo AGP 2X - 4744 3D Rage PRO AGP 1X + 4744 Rage 3 [3D Rage PRO AGP 1X] 1002 4744 Rage Pro Turbo AGP 8086 4d55 Rage 3D Pro AGP 1X [Intel MU440EX] 4749 3D Rage PRO PCI @@ -1099,7 +1159,7 @@ 1002 0080 Rage Pro Turbo 1002 0084 Rage Pro Turbo 1002 4750 Rage Pro Turbo - 4752 Rage XL PCI + 4752 Rage 3 [Rage XL PCI] 0e11 001e Proliant Rage XL 1002 0008 Rage XL 1002 4752 Proliant Rage XL @@ -1121,23 +1181,39 @@ 8086 5744 S845WD1-E mainboard 4753 Rage XC 1002 4753 Rage XC - 4754 3D Rage II/II+ PCI [Mach64 GT] - 4755 Mach64 GTB [3D Rage II+ DVD] - 4756 3D Rage IIC PCI [Mach64 GT IIC] + 4754 Mach64 GT/GT-B [3D Rage I/II] + 4755 Mach64 GT-B [3D Rage II+ DVD] + 4756 Rage 2 [3D Rage IIC PCI] 1002 4756 Rage IIC - 4757 3D Rage IIC AGP + 4757 Rage 2 [3D Rage IIC AGP] 1002 4757 Rage IIC AGP 1028 0089 Rage 3D IIC 1028 008e PowerEdge 1300 onboard video 1028 4082 Rage 3D IIC 1028 8082 Rage 3D IIC 1028 c082 Rage 3D IIC - 4758 210888GX [Mach64 GX PCI] - 4759 3D Rage IIC PCI + 4758 Mach64 GX [WinTurbo] + 4759 Rage 3 [3D Rage IIC PCI] 475a 3D Rage IIC AGP 1002 0084 Rage 3D Pro AGP 2x XPERT 98 1002 0087 Rage 3D IIC 1002 475a Rage IIC AGP + 4845 Xilleon 220 HBIU for HDTV2 + 4846 Xilleon 220 IDE for HDTV2 + 4847 Xilleon 220 USB for HDTV2 + 4848 Xilleon 220 DAIO-0 for HDTV2 + 4849 Xilleon 220 DAIO-1 for HDTV2 + 484a Xilleon 220 LPC for HDTV2 + 4850 Xilleon 215 HBIU for X215 + 4851 Xilleon 215 IDE for X215 + 4852 Xilleon 215 USB for X215 + 4853 Xilleon 215 DAIO-0 for X215 + 4854 Xilleon 215 DAIO-1 for X215 + 4855 Xilleon 225 HBIU for X225 + 4856 Xilleon 225 IDE for X225 + 4857 Xilleon 225 USB for X225 + 4858 Xilleon 225 DAIO-0 for X225 + 4859 Xilleon 225 DAIO-1 for X225 4966 RV250 [Radeon 9000 Series] 10f1 0002 RV250 If [Tachyon G9000 PRO] 148c 2039 RV250 If [Radeon 9000 Pro "Evil Commando"] @@ -1169,7 +1245,7 @@ 4b69 R481 [Radeon X850 XT AGP] (Secondary) 4b6b R481 [Radeon X850 PRO AGP] (Secondary) 4b6c R481 [Radeon X850 XT Platinum Edition AGP] (Secondary) - 4c42 3D Rage LT PRO AGP 2X + 4c42 Mach64 LT [3D Rage LT PRO AGP] 0e11 b0e7 Rage LT Pro (Compaq Presario 5240) 0e11 b0e8 Rage 3D LT Pro 0e11 b10e 3D Rage LT Pro (Compaq Armada 1750) @@ -1197,9 +1273,9 @@ 1028 00bb Latitude CPx 1179 ff00 Satellite 1715XCDS laptop 13bd 1019 PC-AR10 - 4c50 3D Rage LT PRO PCI + 4c50 Rage 3 LT [3D Rage LT PRO PCI] 1002 4c50 Rage LT Pro - 4c52 Rage Mobility-M1 PCI + 4c52 M1 [Rage Mobility-M1 PCI] 1033 8112 Versa Note VXi 4c54 264LT [Mach64 LT] 4c57 RV200/M7 [Mobility Radeon 7500] @@ -1267,7 +1343,7 @@ 5044 All-In-Wonder 128 PCI 1002 0028 Rage 128 AIW 1002 0029 Rage 128 AIW - 5046 Rage 128 PRO AGP 4x TMDS + 5046 Rage 4 [Rage 128 PRO AGP 4X TMDS] 1002 0004 Rage Fury Pro 1002 0008 Rage Fury Pro/Xpert 2000 Pro 1002 0014 Rage Fury Pro @@ -1367,7 +1443,7 @@ 1002 0028 Rage 128 AIW 1002 0029 Rage 128 AIW 1002 0068 Rage 128 AIW - 5246 Rage Fury/Xpert 128/Xpert 2000 AGP 2x + 5246 Rage 4 [Rage Fury/Xpert 128/Xpert 2000 AGP] 1002 0004 Magnum/Xpert 128/Xpert 99 1002 0008 Magnum/Xpert128/X99/Xpert2000 1002 0028 Rage 128 AIW AGP @@ -1425,10 +1501,10 @@ 5653 RV410/M26 [Mobility Radeon X700] 1025 0080 Aspire 5024WLMi 103c 0940 Compaq NW8240 Mobile Workstation - 5654 264VT [Mach64 VT] + 5654 Mach64 VT [Video Xpression] 1002 5654 Mach64VT Reference 5655 264VT3 [Mach64 VT3] - 5656 264VT4 [Mach64 VT4] + 5656 Mach64 VT4 [Video Xpression+] 5657 RV410 [Radeon X550 XTX / X700] 5830 RS300 Host Bridge 5831 RS300 Host Bridge @@ -1615,6 +1691,7 @@ 6602 Mars 6603 Mars 6604 Opal XT [Radeon R7 M265/M365X/M465] + 1025 0776 Aspire V5 Radeon R7 M265 103c 8006 FirePro M4170 103c 814f Litho XT [Radeon R7 M365X] 103c 82aa Litho XT [Radeon R7 M465] @@ -1653,7 +1730,8 @@ 106b 014b Tropo XT [Radeon R9 M380 Mac Edition] 6641 Saturn PRO [Radeon HD 8930M] 6646 Bonaire XT [Radeon R9 M280X] - 6647 Bonaire PRO [Radeon R9 M270X] + 6647 Saturn PRO/XT [Radeon R9 M270X/M280X] + 1043 223d N551ZU laptop Radeon R9 M280X 6649 Bonaire [FirePro W5100] 1002 0b0c FirePro W4300 103c 0b0c Bonaire [FirePro W4300] @@ -1662,6 +1740,7 @@ 6650 Bonaire 6651 Bonaire 6658 Bonaire XTX [Radeon R7 260X/360] + 1043 04d3 AMD Radeon R7 260X 148c 0907 Radeon R7 360 1682 0907 Radeon R7 360 1682 7360 Radeon R7 360 @@ -1687,7 +1766,7 @@ 1462 2938 Radeon R9 360 OEM 1462 3271 Radeon R9 360 OEM 1682 7360 Radeon R7 360 - 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] + 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile] 1028 05ea Radeon HD 8670M 1028 06bf Radeon R5 M335 103c 1970 Radeon HD 8670M @@ -1703,10 +1782,17 @@ 1025 0846 Radeon HD 8570A 17aa 3805 Radeon HD 8570M 6664 Jet XT [Radeon R5 M240] - 6665 Jet PRO [Radeon R5 M230] + 6665 Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520 Mobile] + 17aa 1309 Radeon R7 M260DX 17aa 368f Radeon R5 A230 6667 Jet ULT [Radeon R5 M230] 666f Sun LE [Radeon HD 8550M / R5 M230] + 66a0 Vega 20 [Radeon Instinct] + 66a1 Vega 20 + 66a2 Vega 20 + 66a3 Vega 20 + 66a7 Vega 20 [Radeon Pro Vega 20] + 66af Vega 20 [Radeon VII] 6704 Cayman PRO GL [FirePro V7900] 6707 Cayman LE GL [FirePro V5900] 6718 Cayman XT [Radeon HD 6970] @@ -2161,6 +2247,7 @@ 1028 2120 Radeon HD 6450 103c 2128 Radeon HD 6450 103c 2aee Radeon HD 7450A + 1092 6450 Radeon HD 6450 1462 2125 Radeon HD 6450 1462 2346 Radeon HD 7450 1462 2490 Radeon HD 6450 @@ -2307,16 +2394,22 @@ 67cc Ellesmere [Polaris10] 67cf Ellesmere [Polaris10] 67d0 Ellesmere [Radeon Pro V7300X / V7350x2] - 67df Ellesmere [Radeon RX 470/480/570/580] + 67df Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 1002 0b37 Radeon RX 480 + 1028 1722 Radeon RX 570X + 1028 1723 Radeon RX 580X 1043 04a8 Radeon RX 480 1043 04b0 Radeon RX 470 1043 04fb Radeon RX 480 1043 04fd Radeon RX 480 8GB + 1043 056a Radeon RX 590 + 106b 0161 Radeon Pro 580 + 106b 0162 Radeon Pro 575 + 106b 0163 Radeon Pro 570 1458 22f0 Radeon RX 570 1458 22f7 Radeon RX 570 Gaming 4G 1462 3411 Radeon RX 470 - 1462 3413 Radeon RX 480 + 1462 3413 Radeon RX 480 Gaming X 8GB 1462 3416 Radeon RX 570 1462 3418 Radeon RX 580 Armor 4G OC 148c 2372 Radeon RX 480 @@ -2328,8 +2421,9 @@ 174b e349 Radeon RX 470 1787 a470 Radeon RX 470 1787 a480 Radeon RX 480 - 1da2 e353 Sapphire Radeon RX 580 Pulse 8GB - 1da2 e366 Nitro+ Radeon RX 580 4GB + 1849 5001 Phantom Gaming X RX 580 OC + 1da2 e353 Radeon RX 570 Pulse 4GB + 1da2 e366 Nitro+ Radeon RX 570/580 67e0 Baffin [Radeon Pro WX 4170] 103c 8270 Radeon Pro WX 4170 103c 8272 Radeon Pro WX 4170 @@ -2346,15 +2440,21 @@ 103c 8277 Radeon Pro WX 4150 67e9 Baffin [Polaris11] 67eb Baffin [Radeon Pro V5300X] - 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/560] + 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] 106b 0160 Radeon Pro 460 106b 0166 Radeon Pro 455 106b 0167 Radeon Pro 450 106b 0179 Radeon Pro 560 + 106b 017a Radeon Pro 555 + 106b 018f Radeon Pro 560X + 106b 0190 Radeon Pro 555X 1642 1727 Polaris 21 XL [Radeon RX 560D] 1682 956d Polaris 21 XL [Radeon RX 560D] - 67ff Baffin [Radeon RX 550 640SP / RX 560] + 67ff Baffin [Radeon RX 550 640SP / RX 560/560X] 1002 0b04 Radeon RX 560 + 1028 1721 Radeon RX 560X + 1028 1726 Radeon RX 560DX + 103c 8479 Radeon RX 560X Mobile 1043 04bc Radeon RX 560 1458 22ed Radeon RX 560 148c 2381 Radeon RX 560 @@ -2433,8 +2533,9 @@ 15c3 2b1e MED-X6000 6829 Cape Verde 682a Venus PRO - 682b Venus LE / Tropo PRO-L [Radeon HD 8830M / R7 M465X] + 682b Cape Verde PRO / Venus LE / Tropo PRO-L [Radeon HD 8830M / R7 250 / R7 M465X] 0128 079c Radeon R7 465X + 1462 3012 Radeon R7 250 682c Cape Verde GL [FirePro W4100] 682d Chelsea XT GL [FirePro M4000] 682f Chelsea LP [Radeon HD 7730M] @@ -2567,15 +2668,19 @@ 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] 6860 Vega 10 [Radeon Instinct MI25] + 1002 0c35 Radeon PRO V320 + 1002 6c75 Radeon PRO V320 106b 017c Radeon Pro Vega 64 6861 Vega 10 XT [Radeon PRO WX 9100] 6862 Vega 10 XT [Radeon PRO SSG] 6863 Vega 10 XTX [Radeon Vega Frontier Edition] 6864 Vega 6867 Vega 10 XL [Radeon Pro Vega 56] - 6868 Vega + 6868 Vega 10 [Radeon PRO WX 8100/8200] 686c Vega 10 [Radeon Instinct MI25 MxGPU] - 687f Vega 10 XT [Radeon RX Vega 64] + 687f Vega 10 XL/XT [Radeon RX Vega 56/64] + 6880 Lexington [Radeon HD 6550M] + 103c 163c Pavilion dv6 Radeon HD 6550M 6888 Cypress XT [FirePro V8800] 6889 Cypress PRO [FirePro V7800] 1002 0301 FirePro V7800P @@ -2782,7 +2887,7 @@ 17aa 3928 Mobility Radeon HD 5650 17aa 3951 Mobility Radeon HD 5650 17aa 3977 Radeon HD 6550M - 68c7 Madison [Mobility Radeon HD 5570/6550A] + 68c7 Pinewood [Mobility Radeon HD 5570/6550A] 1462 2241 Mobility Radeon HD 5570 1462 2243 Mobility Radeon HD 5570 1462 2244 Mobility Radeon HD 5570 @@ -3089,17 +3194,25 @@ 148c 9380 Radeon R9 380 # Make naming scheme consistent 174b e308 Radeon R9 380 Nitro 4G D5 - 694c Polaris 22 [Radeon RX Vega M GH] - 694e Polaris 22 [Radeon RX Vega M GL] + 694c Polaris 22 XT [Radeon RX Vega M GH] + 694e Polaris 22 XL [Radeon RX Vega M GL] + 694f Polaris 22 MGL XL [Radeon Pro WX Vega M GL] 6980 Polaris12 6981 Polaris12 6985 Lexa XT [Radeon PRO WX 3100] 6986 Polaris12 6987 Lexa [Radeon E9171 MCM] 6995 Lexa XT [Radeon PRO WX 2100] - 699f Lexa PRO [Radeon RX 550] + 699f Lexa PRO [Radeon RX 550/550X] + 1028 1720 Radeon RX 550X 148c 2380 Lexa XL [Radeon RX 550] 1da2 e367 Lexa PRO [Radeon RX 550] + 69a0 Vega 12 + 69a1 Vega 12 + 69a2 Vega 12 + 69a3 Vega 12 + 69af Vega 12 [Radeon Pro Vega 20] + 6fdf Polaris 20 XL [Radeon RX 580 2048SP] 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge 7100 R520 [Radeon X1800 XT] @@ -3242,6 +3355,8 @@ 1043 049e Radeon R9 FURY 1043 04a0 Radeon R9 FURY X 174b e329 Radeon R9 FURY + 7310 Navi 10 + 731f Navi 10 7833 RS350 Host Bridge 7834 RS350 [Radeon 9100 PRO/XT IGP] 7835 RS350M [Mobility Radeon 9000 IGP] @@ -3534,6 +3649,9 @@ 17aa 5113 Radeon R6 Graphics 17aa 5116 Radeon R6 Graphics 17aa 5118 Radeon R5 Graphics + 9890 Amur + 98c0 Nolan + 98e4 Stoney [Radeon R2/R3/R4/R5 Graphics] 9900 Trinity [Radeon HD 7660G] 103c 1985 Pavilion 17-e163sg Notebook PC # AMD A10-5800K CPU @@ -3561,13 +3679,18 @@ 9917 Trinity [Radeon HD 7620G] 9918 Trinity [Radeon HD 7600G] 9919 Trinity [Radeon HD 7500G] + 991e Bishop 9920 Liverpool [Playstation 4 APU] 9921 Liverpool HDMI/DP Audio Controller - 9990 Trinity [Radeon HD 7520G] - 9991 Trinity [Radeon HD 7540D] - 9992 Trinity [Radeon HD 7420G] - 9993 Trinity [Radeon HD 7480D] - 9994 Trinity [Radeon HD 7400G] + 9922 Starship + 9923 Starsha2 [Kingston/Clayton] + 9924 Gladius + 9926 Jupiter + 9990 Trinity 2 [Radeon HD 7520G] + 9991 Trinity 2 [Radeon HD 7540D] + 9992 Trinity 2 [Radeon HD 7420G] + 9993 Trinity 2 [Radeon HD 7480D] + 9994 Trinity 2 [Radeon HD 7400G] 9995 Richland [Radeon HD 8450G] 9996 Richland [Radeon HD 8470D] 9997 Richland [Radeon HD 8350G] @@ -3578,9 +3701,9 @@ 999c Richland # AMD Quad-Core A8-Series APU A8-6500T with Radeon HD 8550D 999d Richland [Radeon HD 8550D] - 99a0 Trinity [Radeon HD 7520G] - 99a2 Trinity [Radeon HD 7420G] - 99a4 Trinity [Radeon HD 7400G] + 99a0 Trinity 2 [Radeon HD 7520G] + 99a2 Trinity 2 [Radeon HD 7420G] + 99a4 Trinity 2 [Radeon HD 7400G] aa00 R600 HDMI Audio [Radeon HD 2900 GT/PRO/XT] aa01 RV635 HDMI Audio [Radeon HD 3650/3730/3750] aa08 RV630 HDMI Audio [Radeon HD 2600 PRO/XT / HD 3610] @@ -3612,13 +3735,34 @@ aab0 Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] aac0 Tobago HDMI Audio [Radeon R7 360 / R9 360 OEM] aac8 Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X] -# I have a Tonga card and this is the HDMI Audio part aad8 Tonga HDMI Audio [Radeon R9 285/380] 174b aad8 Radeon R9 285/380 HDMI Audio + aae0 Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] aae8 Fiji HDMI/DP Audio [Radeon R9 Nano / FURY/FURY X] - aaf0 Ellesmere [Radeon RX 580] - ac00 Theater 600 Pro + aaf0 Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] + aaf8 Vega 10 HDMI Audio [Radeon Vega 56/64] + ab00 Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] + ab08 Polaris 22 HDMI Audio + ab10 Lexa HDMI Audio + ab18 Vega 12 HDMI Audio + ab20 Vega 20 HDMI Audio [Radeon VII] + ab38 Navi 10 HDMI Audio + ac00 Theater 506 World-Wide Analog Decoder + ac01 Theater 506 World-Wide Analog Decoder ac02 TV Wonder HD 600 PCIe + ac03 Theater 506 PCIe + ac04 Theater 506 USB + ac05 Theater 506 USB + ac06 Theater 506 External USB + ac07 Theater 506 External USB + ac08 Theater 506A World-Wide Analog Decoder + Demodulator + ac09 Theater 506A World-Wide Analog Decoder + Demodulator + ac0a Theater 506A PCIe + ac0b Theater 506A PCIe + ac0c Theater 506A USB + ac0d Theater 506A USB + ac0e Theater 506A External USB + ac0f Theater 506A External USB ac12 Theater HD T507 (DVB-T) TV tuner/capture device cab0 RS100 Host Bridge cab2 RS200 Host Bridge @@ -4038,6 +4182,7 @@ 03dc POWER8 Host Bridge (PHB3) 044b GenWQE Accelerator Adapter 04aa Flash Adapter 90 (PCIe2 0.9TB) + 04c1 POWER9 Host Bridge (PHB4) 04da PCI-E IPR SAS+ Adapter (ASIC) 1014 04fb PCIe3 x16 20GB Cache 12Gb Quad SAS RAID+ Adapter(580B) 1014 04fc PCIe3 x8 12Gb Quad SAS RAID+ Adapter(580A) @@ -4168,7 +4313,7 @@ 1439 Family 16h Processor Functions 5:1 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit - 1452 Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge + 1452 Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B 1456 Family 17h (Models 00h-0fh) Platform Security Processor @@ -4199,6 +4344,8 @@ 1535 Family 16h Processor Function 5 1536 Family 16h Processor Root Complex 1538 Family 16h Processor Function 0 + 1566 Family 16h (Models 30h-3fh) Processor Root Complex + 156b Family 16h (Models 30h-3fh) Host Bridge 1570 Family 15h (Models 60h-6fh) Processor Function 0 1571 Family 15h (Models 60h-6fh) Processor Function 1 1572 Family 15h (Models 60h-6fh) Processor Function 2 @@ -4210,6 +4357,14 @@ 157a Family 15h (Models 60h-6fh) Audio Controller 157b Family 15h (Models 60h-6fh) Host Bridge 157c Family 15h (Models 60h-6fh) Processor Root Port + 1580 Family 16h (Models 30h-3fh) Processor Function 0 + 1581 Family 16h (Models 30h-3fh) Processor Function 1 + 1582 Family 16h (Models 30h-3fh) Processor Function 2 + 1583 Family 16h (Models 30h-3fh) Processor Function 3 + 1584 Family 16h (Models 30h-3fh) Processor Function 4 + 1585 Family 16h (Models 30h-3fh) Processor Function 5 + 15df Family 17h (Models 10h-1fh) Platform Security Processor + 15e3 Family 17h (Models 10h-1fh) HD Audio Controller 1600 Family 15h Processor Function 0 1601 Family 15h Processor Function 1 1602 Family 15h Processor Function 2 @@ -4279,12 +4434,22 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) + 43b0 X370 Series Chipset PCIe Upstream Port + 1849 43c6 Fatal1ty X370 Professional Gaming 43b1 X399 Series Chipset PCIe Bridge 43b4 300 Series Chipset PCIe Port + 43b5 X370 Series Chipset SATA Controller + 1849 43c8 Fatal1ty X370 Professional Gaming 43b6 X399 Series Chipset SATA Controller 43b7 300 Series Chipset SATA Controller + 43b9 X370 Series Chipset USB 3.1 xHCI Controller + 1849 43d0 Fatal1ty X370 Professional Gaming 43ba X399 Series Chipset USB 3.1 xHCI Controller 43bb 300 Series Chipset USB 3.1 xHCI Controller + 43c6 400 Series Chipset PCIe Bridge + 43c7 400 Series Chipset PCIe Port + 43c8 400 Series Chipset SATA Controller + 43d5 400 Series Chipset USB 3.1 XHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -4734,11 +4899,14 @@ 1028 028d PowerEdge T410 MGA G200eW WPCM450 1028 029c PowerEdge M710 MGA G200eW WPCM450 1028 02a4 PowerEdge T310 MGA G200eW WPCM450 + 15d9 0605 X8SIL 15d9 0624 X9SCM-F Motherboard + 15d9 066b X9SRL-F 15d9 a811 H8DGU 0533 MGA G200EH 103c 3381 iLO4 0534 G200eR2 + 1028 04f7 PowerEdge R320 server 0536 Integrated Matrox G200eW3 Graphics Controller 0538 MGA G200eH3 1590 00e4 iLO5 VGA @@ -4779,6 +4947,7 @@ 102b 0f83 Millennium G550 102b 0f84 Millennium G550 Dual Head DDR 32Mb 102b 1e41 Millennium G550 + 102b 22c0 G550 PCIe 102b 2300 Millennium G550 LP PCIE 2537 Millennium P650/P750 102b 1820 Millennium P750 64MB @@ -5245,6 +5414,7 @@ 122e PCI-X Local Bus Adapter 127b sx1000 System Bus Adapter 127c sx1000 I/O Controller + 128d Diva [GSP] Management Board 1290 Auxiliary Diva Serial Port 103c 1291 Diva SP2 1291 Auxiliary Diva Serial Port @@ -5333,6 +5503,7 @@ 3306 Integrated Lights-Out Standard Slave Instrumentation & System Support 103c 330e iLO3 103c 3381 iLO4 + 1590 00e4 iLO5 3307 Integrated Lights-Out Standard Management Processor Support and Messaging # HP DL380 G6 103c 3309 iLO 2 @@ -5344,6 +5515,7 @@ 4030 zx2 System Bus Adapter 4031 zx2 I/O Controller 4037 PCIe Local Bus Adapter + 9602 AMD RS780/RS880 PCI to PCI bridge (int gfx) 103e Solliday Engineering 103f Synopsys/Logic Modeling Group 1040 Accelgraphics Inc. @@ -5772,10 +5944,19 @@ 104d Sony Corporation 8004 DTL-H2500 [Playstation development board] 8009 CXD1947Q i.LINK Controller + 800c DTL-H800 [PS1 sound development board] 8039 CXD3222 i.LINK Controller + 8047 PS2 TOOL MRP 8056 Rockwell HCF 56K modem 808a Memory Stick Controller + 80ff PS2 Performance Analyzer + 814a PS2 Performance Analyzer + 8183 ATHENS [PS3 prototype developer interface card] + 81b0 BM-1 [PSP TOOL Board Management Device] + 81c3 VO-4 [PSP TOOL Video Output Device] 81ce SxS Pro memory card + 81ff PS3 TOOL MRP + 820e CXD9208GP [PS3 PS2 emulation subsystem adapter] # 2nd ID 905c SxS Pro memory card # 2nd ID @@ -5853,7 +6034,7 @@ 3070 Hitachi FIVE-FX Fibre Channel to PCIe HBA 3505 SH7751 PCI Controller (PCIC) 350e SH7751R PCI Controller (PCIC) -1055 Efar Microsystems +1055 Microchip Technology / SMSC 9130 SLC90E66 [Victory66] IDE 9460 SLC90E66 [Victory66] ISA 9462 SLC90E66 [Victory66] USB @@ -6211,6 +6392,8 @@ 0074 U4 HT Bridge # should be 14e4:1645 1645 Broadcom NetXtreme BCM5701 Gigabit Ethernet + 1801 T2 Bridge Controller + 1802 T2 Secure Enclave Processor 2001 S1X NVMe Controller 2002 S3ELab NVMe Controller 2003 S3X NVMe Controller @@ -6279,15 +6462,19 @@ 1644 FastLinQ QL45000 Series 100GbE Controller 1077 e4f8 FastLinQ QL45611H 100GbE Adapter 1654 FastLinQ QL45000 Series 50GbE Controller + 1077 0032 QL45212 Flex 50Gb 2-port Ethernet Adapter 1590 0223 Synergy 6810C 25/50Gb Ethernet Adapter 1656 FastLinQ QL45000 Series 25GbE Controller + 1077 0033 QL45214 Flex 25Gb 4-port Ethernet Adapter 1077 02a7 QL45212-DE 25GbE Adapter 1077 e4f6 FastLinQ QL45211H 25GbE Adapter 1077 e4f7 FastLinQ QL45212H 25GbE Adapter 165c FastLinQ QL45000 Series 10/25/40/50GbE Controller (FCoE) + 1077 0034 QL45262 Flex 50Gb 2-port Ethernet Adapter w/ iSCSI/FCoE 1077 e4f1 FastLinQ QL45462H 40GbE FCoE Adapter 1077 e4f2 FastLinQ QL45461H 40GbE FCoE Adapter 165e FastLinQ QL45000 Series 10/25/40/50GbE Controller (iSCSI) + 1077 0034 QL45262 Flex 50Gb 2-port Ethernet Adapter w/ iSCSI/FCoE 1077 e4f1 FastLinQ QL45462H 40GbE iSCSI Adapter 1077 e4f2 FastLinQ QL45461H 40GbE iSCSI Adapter 1664 FastLinQ QL45000 Series Gigabit Ethernet Controller (SR-IOV VF) @@ -6322,6 +6509,8 @@ 1077 02a8 QLE2692 Dual Port 16Gb FC to PCIe Gen3 x8 Adapter 1077 02ab QLE2740 Single Port 32Gb FC to PCIe Gen3 x8 Adapter 1077 02ac QLE2742 Dual Port 32Gb FC to PCIe Gen3 x8 Adapter + 1077 02b8 2x16Gb QME2692 FC HBA + 1077 02b9 2x32Gb QME2742 FC HBA 1590 00f9 StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter 1590 00fa StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter 1590 0203 StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter @@ -6385,14 +6574,20 @@ 8070 FastLinQ QL41000 Series 10/25/40/50GbE Controller 1077 0001 10GE 2P QL41162HxRJ-DE Adapter 1077 0002 10GE 2P QL41112HxCU-DE Adapter + 1077 0004 4x10GE QL41164HFCU CNA 1077 0005 QLogic 4x10GE QL41164HMRJ CNA 1077 0006 QLogic 4x10GE QL41164HMCU CNA 1077 0007 QLogic 2x1GE+2x10GE QL41264HMCU CNA 1077 0009 QLogic 2x1GE+2x10GE QL41162HMRJ CNA 1077 000b 25GE 2P QL41262HxCU-DE Adapter - 1077 0011 FastLinQ QL41212H 25GbE Adapter + 1077 000f 2x25GE QL41262HMKR CNA + 1077 0010 2x25GE QL41232HMKR NIC + 1077 0011 FastLinQ QL41212HLCU 25GbE Adapter 1077 0012 FastLinQ QL41112H 10GbE Adapter + 1077 0019 QL41232HOCU - Dual Port 25/10GbE SFP28 OCP Adapter 1077 0039 QLogic QL41262 PCIe 25Gb 2-Port SFP28 Ethernet Adapter + 1590 021a 10GbE 2P QL41162HLRJ-HP Adapter + 1590 021b 10GbE 2P QL41162HLRJ-HP Adapter 1590 021d 10/25GbE 2P QL41222HLCU-HP Adapter 1590 021e 10/25GbE 2P QL41162HMRJ-HP Adapter 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter @@ -6400,6 +6595,7 @@ 8080 FastLinQ QL41000 Series 10/25/40/50GbE Controller (FCoE) 1077 0001 10GE 2P QL41162HxRJ-DE Adapter 1077 0002 10GE 2P QL41112HxCU-DE Adapter + 1077 0004 4x10GE QL41164HFCU CNA 1077 0005 QLogic 4x10GE QL41164HMRJ CNA 1077 0006 QLogic 4x10GE QL41164HMCU CNA 1077 0007 QLogic 2x1GE+2x10GE QL41264HMCU CNA @@ -6408,9 +6604,14 @@ 1077 000c QLogic 2x25GE QL41262HMCU CNA 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter 1077 000e FastLinQ QL41162H 10GbE FCoE Adapter + 1077 000f 2x25GE QL41262HMKR CNA + 1590 021a 10GbE 2P QL41162HLRJ-HP Adapter + 1590 021b 10GbE 2P QL41162HLRJ-HP Adapter 8084 FastLinQ QL41000 Series 10/25/40/50GbE Controller (iSCSI) 1077 0001 10GE 2P QL41162HxRJ-DE Adapter 1077 0002 10GE 2P QL41112HxCU-DE Adapter + 1077 0003 4x10GE QL41164HxRJ CNA + 1077 0004 4x10GE QL41164HFCU CNA 1077 0005 QLogic 4x10GE QL41164HMRJ CNA 1077 0006 QLogic 4x10GE QL41164HMCU CNA 1077 0007 QLogic 2x25GE QL41262HMCU CNA @@ -6419,9 +6620,14 @@ 1077 000c QLogic 2x25GE QL41262HMCU CNA 1077 000d FastLinQ QL41262H 25GbE iSCSI Adapter 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter + 1077 000f 2x25GE QL41262HMKR CNA + 1590 021a 10GbE 2P QL41162HLRJ-HP Adapter + 1590 021b 10GbE 2P QL41162HLRJ-HP Adapter 8090 FastLinQ QL41000 Series Gigabit Ethernet Controller (SR-IOV VF) 1077 0001 25GE 2P QL41262HxCU-DE Adapter 1077 0002 10GE 2P QL41112HxCU-DE Adapter + 1077 0003 4x10GE QL41164HxRJ CNA + 1077 0004 4x10GE QL41164HFCU CNA 1077 0005 QLogic 4x10GE QL41164HMRJ CNA 1077 0006 QLogic 4x10GE QL41164HMCU CNA 1077 0007 QLogic 2x1GE+2x10GE QL41264HMCU CNA @@ -6430,8 +6636,12 @@ 1077 000c QLogic 2x25GE QL41262HMCU CNA 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter (SR-IOV VF) 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter (SR-IOV VF) + 1077 000f 2x25GE QL41262HMKR CNA + 1077 0010 2x25GE QL41232HMKR NIC 1077 0011 FastLinQ QL41212H 25GbE Adapter (SR-IOV VF) 1077 0012 FastLinQ QL41112H 10GbE Adapter (SR-IOV VF) + 1590 021a 10GbE 2P QL41162HLRJ-HP Adapter + 1590 021b 10GbE 2P QL41162HLRJ-HP Adapter 1590 021e 10/25GbE 2P QL41162HMRJ-HP Adapter 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter 8430 ISP8324 1/10GbE Converged Network Controller (NIC VF) @@ -7434,6 +7644,7 @@ 036c Bt879(??) Video Capture 13e9 0070 Win/TV (Video Section) 036e Bt878 Video Capture + 0000 0001 Euresys Picolo PCIe 0070 13eb WinTV Series 0070 ff01 Viewcast Osprey 200 0071 0101 DigiTV PCI @@ -7528,6 +7739,7 @@ 1851 1851 FlyVideo'98 EZ - video 1852 1852 FlyVideo'98 (with FM Tuner) 0878 Bt878 Audio Capture + 0000 0001 Euresys Picolo PCIe 0070 13eb WinTV Series 0070 ff01 Viewcast Osprey 200 0071 0101 DigiTV PCI @@ -7892,6 +8104,7 @@ 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter 9749 PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch + 1d49 0004 ThinkSystem 1610-8P NVMe Switch Adapter a100 Blackmagic Design DeckLink bb04 B&B 3PCIOSD1A Isolated PCI Serial c001 CronyxOmega-PCI (8-port RS232) @@ -8608,7 +8821,7 @@ 0098 G70M [GeForce Go 7800] 0099 G70M [GeForce Go 7800 GTX] 009d G70GL [Quadro FX 4500] - 00a0 NV5 [Aladdin TNT2] + 00a0 NV0A [Aladdin TNT2 IGP] 14af 5810 Maxi Gamer Xentor 00c0 NV41 [GeForce 6800 GS] 00c1 NV41 [GeForce 6800] @@ -8704,7 +8917,7 @@ 00f5 G71 [GeForce 7800 GS] 00f6 NV43 [GeForce 6800 GS/XT] 1682 217e XFX GeForce 6800 XTreme 256MB DDR3 AGP - 00f8 NV40GL [Quadro FX 3400/4400] + 00f8 NV45GL [Quadro FX 3400/4400] 00f9 NV40 [GeForce 6800 GT/GTO/Ultra] 10de 00f9 NV40 [GeForce 6800 GT] 1682 2120 GEFORCE 6800 GT PCI-E @@ -8862,7 +9075,6 @@ 018b NV18GL [Quadro4 380 XGL] 018c NV18GL [Quadro NVS 50 PCI] 018d NV18M [GeForce4 448 Go] - 018f NV18 0190 G80 [GeForce 8800 GTS / 8800 GTX] 0191 G80 [GeForce 8800 GTX] 0192 G80 [GeForce 8800 GTS] @@ -9405,6 +9617,7 @@ 040f G84GL [Quadro FX 1700] 0410 G92 [GeForce GT 330] 0414 G92 [GeForce 9800 GT] + 0418 G92 [GeForce GT 330 OEM] 0420 G86 [GeForce 8400 SE] 0421 G86 [GeForce 8500 GT] 1462 0960 NX8500GT-TD512EH/M2 @@ -10265,14 +10478,17 @@ 0f00 GF108 [GeForce GT 630] 0f01 GF108 [GeForce GT 620] 0f02 GF108 [GeForce GT 730] + 0f03 GF108 [GeForce GT 610] 0f06 GF108 [GeForce GT 730] 0fb0 GM200 High Definition Audio 0fb8 GP108 High Definition Audio Controller 0fb9 GP107GL High Definition Audio Controller + 0fba GM206 High Definition Audio Controller 0fbb GM204 High Definition Audio Controller 0fc0 GK107 [GeForce GT 640 OEM] *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Mon Feb 4 08:38:04 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B867314C347D; Mon, 4 Feb 2019 08:38:03 +0000 (UTC) (envelope-from bapt@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) server-signature RSA-PSS (4096 bits) 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 6532573554; Mon, 4 Feb 2019 08:38:03 +0000 (UTC) (envelope-from bapt@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 58FF63840; Mon, 4 Feb 2019 08:38:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x148c3tb075786; Mon, 4 Feb 2019 08:38:03 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x148c3ss075785; Mon, 4 Feb 2019 08:38:03 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201902040838.x148c3ss075785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 4 Feb 2019 08:38: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: r343735 - stable/12/share/misc X-SVN-Group: stable-12 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/12/share/misc X-SVN-Commit-Revision: 343735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6532573554 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 08:38:04 -0000 Author: bapt Date: Mon Feb 4 08:38:02 2019 New Revision: 343735 URL: https://svnweb.freebsd.org/changeset/base/343735 Log: MFC: 343546 Update pci_vendors to 2019.01.29 Modified: stable/12/share/misc/pci_vendors Directory Properties: stable/12/ (props changed) Modified: stable/12/share/misc/pci_vendors ============================================================================== --- stable/12/share/misc/pci_vendors Mon Feb 4 08:37:16 2019 (r343734) +++ stable/12/share/misc/pci_vendors Mon Feb 4 08:38:02 2019 (r343735) @@ -2,11 +2,11 @@ # List of PCI ID's # -# Version: 2018.08.12 -# Date: 2018-08-12 03:15:01 +# Version: 2019.01.29 +# Date: 2019-01-29 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from -# the PCI ID Project at http://pci-ids.ucw.cz/. +# the PCI ID Project at https://pci-ids.ucw.cz/. # # New data are always welcome, especially if they are accurate. If you have # anything to contribute, please follow the instructions at the web site. @@ -58,8 +58,7 @@ 0680 Ultra ATA/133 IDE RAID CONTROLLER CARD # Wrong ID used in subsystem ID of the TELES.S0/PCI 2.x ISDN adapter 00a7 Teles AG (Wrong ID) -# nee nCipher -0100 Thales e-Security +0100 nCipher Security 0123 General Dynamics 0128 Dell (wrong ID) # 018a is not LevelOne but there is a board misprogrammed @@ -275,6 +274,7 @@ 8086 9460 RAID Controller RSP3TD160F 8086 9480 RAID Controller RSP3MD088F 0015 MegaRAID Tri-Mode SAS3416 + 1d49 0503 ThinkSystem RAID 530-16i PCIe 12Gb Adapter 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter 1028 1fcb PERC H740P Adapter @@ -282,7 +282,6 @@ 1028 1fcf PERC H740P Mini 1d49 0601 ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter 1d49 0603 ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter - 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 8086 352e Integrated RAID Module RMSP3CD080F 8086 352f Integrated RAID Module RMSP3HD080E 8086 9461 RAID Controller RSP3DD080F @@ -413,6 +412,7 @@ 005c SAS1064A PCI-X Fusion-MPT SAS 005d MegaRAID SAS-3 3108 [Invader] 1000 9361 MegaRAID SAS 9361-8i + 1000 9363 MegaRAID SAS 9361-4i 1000 9364 MegaRAID SAS 9364-8i 1000 936a MegaRAID SAS 9364-8i 1028 1f41 PERC H830 Adapter @@ -445,6 +445,7 @@ 1028 1f4d PERC H330 Embedded (for monolithic) 1054 306a SAS 3004 iMR ROMB 1d49 04db ServeRAID M1210 SAS/SATA Controller + 1d49 0504 ThinkSystem RAID 520-8i PCIe 12Gb Adapter 0060 MegaRAID SAS 1078 1000 1006 MegaRAID SAS 8888ELP 1000 100a MegaRAID SAS 8708ELP @@ -483,15 +484,17 @@ 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] + 1000 3010 SAS9211-4i 0071 MR SAS HBA 2004 0072 SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] + 1000 3040 9210-8i 1000 30b0 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1028 1f1c 6Gbps SAS HBA Adapter 1028 1f1d PERC H200 Adapter 1028 1f1e PERC H200 Integrated 1028 1f1f PERC H200 Modular 1028 1f20 PERC H200 Embedded - 1028 1f22 Internal Tape Adapter + 1028 1f22 PERC H200 Internal Tape Adapter 8086 350f RMS2LL040 RAID Controller 8086 3700 SSD 910 Series 0073 MegaRAID SAS 2008 [Falcon] @@ -506,6 +509,7 @@ 1028 1f52 PERC H310 Embedded1 1028 1f53 PERC H310 Embedded2 1028 1f54 PERC H310 Reserved + 1028 1f78 PERC H310 1054 3035 LSI MegaRAID SAS 9240-8i 1137 0072 2004 iMR ROMB 1137 0073 2008 ROMB @@ -586,10 +590,13 @@ 0084 SAS2208 PCI-Express Fusion-MPT SAS-2 0085 SAS2208 PCI-Express Fusion-MPT SAS-2 0086 SAS2308 PCI-Express Fusion-MPT SAS-2 + 15d9 0690 Onboard MegaRAID SAS2208 [Thunderbolt] + 15d9 0691 Onboard SAS2308 PCI-Express Fusion-MPT SAS-2 0087 SAS2308 PCI-Express Fusion-MPT SAS-2 1000 3020 9207-8i SAS2.1 HBA 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i + 1014 0472 N2125 External Host Bus Adapter 1590 0044 H220i 8086 3000 RS25GB008 RAID Controller 8086 3060 RS25FB044 RAID Controller @@ -627,6 +634,7 @@ 8086 3020 RAID Controller RSP3GD016J 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) + 1000 3010 HBA 9400-8i 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA @@ -650,11 +658,19 @@ 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 00d3 MegaRAID Tri-Mode SAS3716W + 00e0 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx + 00e1 Fusion-MPT 12GSAS/PCIe SAS39xx + 00e2 Fusion-MPT 12GSAS/PCIe Secure SAS39xx + 00e3 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx + 00e4 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx + 00e5 Fusion-MPT 12GSAS/PCIe SAS38xx + 00e6 Fusion-MPT 12GSAS/PCIe Secure SAS38xx + 00e7 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx 02b0 Virtual Endpoint on PCIe Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter 02b1 Virtual Endpoint on PCIe Switch (9749) - 1d49 0004 Lenovo ThinkSystem 1610-8P NVMe Switch Adapter + 1d49 0004 ThinkSystem 1610-8P NVMe Switch Adapter 0407 MegaRAID 1000 0530 MegaRAID 530 SCSI 320-0X RAID Controller 1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller @@ -725,6 +741,14 @@ 0807 SA2020ZC 0901 61C102 1000 63C815 + 10e0 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 10e1 MegaRAID 12GSAS/PCIe SAS39xx + 10e2 MegaRAID 12GSAS/PCIe Secure SAS39xx + 10e3 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 10e4 MegaRAID 12GSAS/PCIe Unsupported SAS38xx + 10e5 MegaRAID 12GSAS/PCIe SAS38xx + 10e6 MegaRAID 12GSAS/PCIe Secure SAS38xx + 10e7 MegaRAID 12GSAS/PCIe Unsupported SAS38xx 1960 MegaRAID 1000 0518 MegaRAID 518 SCSI 320-2 Controller 1000 0520 MegaRAID 520 SCSI 320-1 Controller @@ -777,11 +801,20 @@ 131b Kaveri [Radeon R4 Graphics] 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] + 13e9 Ariel + 154c Kryptos + 154e Garfield + 1551 Arlene + 1552 Pooky + 1561 Anubis 15d8 Picasso 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] 103c 83c6 Radeon Vega 8 Mobile 1458 d000 Radeon RX Vega 11 - 15ff Vega 11 [Radeon Vega 28 Mobile] + 15de Raven Ridge HDMI/DP Audio Controller + 15ff Fenghuang [Zhongshan Subor Z+] + 1607 Arden + 1636 Renoir 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 103c 168b ProBook 4535s 3150 RV380/M24 [Mobility Radeon X600] @@ -863,19 +896,28 @@ 4337 RS200M [Radeon IGP 330M/340M/345M/350M] 1014 053a ThinkPad R40e 103c 0850 Radeon IGP 345M - 4341 IXP150 AC'97 Audio Controller - 4342 IXP200 3COM 3C920B Ethernet Controller - 4345 EHCI USB Controller - 4347 OHCI USB Controller #1 - 4348 OHCI USB Controller #2 - 4349 Dual Channel Bus Master PCI IDE Controller - 434d IXP AC'97 Modem - 4353 SMBus + 4341 SB200 AC97 Audio Controller + 4342 SB200 PCI to PCI Bridge + 4345 SB200 EHCI USB Controller + 4346 Crayola 6 [XENOS Parent Die (XBOX 360)] + 4347 SB200 OHCI USB Controller #1 + 4348 SB200 OHCI USB Controller #2 + 4349 SB200 IDE Controller + 434c SB200 PCI to LPC Bridge + 434d SB200 AC97 Modem Controller + 4353 SB200 SMBus Controller 4354 215CT [Mach64 CT PCI] 4358 Mach64 CX [Graphics Xpression] - 4361 IXP SB300 AC'97 Audio Controller - 4363 SMBus - 436e 436E Serial ATA Controller + 4361 SB300 AC'97 Audio Controller + 4362 SB300 PCI to PCI Bridge + 4363 SB300 SMBus Controller + 4365 SB300 USB Controller (EHCI) + 4367 SB300 USB Controller (EHCI) + 4368 SB300 USB Controller (EHCI) + 4369 SB300 IDE Controller + 436c SB300 PCI to LPC Bridge + 436d SB300 AC97 Modem Controller + 436e SB300 Serial ATA Controller 4370 IXP SB400 AC'97 Audio Controller 1025 0079 Aspire 5024WLMMi 1025 0091 Aspire 5032WXMi @@ -1021,6 +1063,7 @@ 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 1043 84dd M5A99X EVO (R1.0) SB950 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 4392 SB7x0/SB8x0/SB9x0 SATA Controller [Non-RAID5 mode] @@ -1056,6 +1099,7 @@ 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 439c SB7x0/SB8x0/SB9x0 IDE Controller + 1002 4392 MSI MS-7713 motherboard 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard 105b 0e13 N15235/A74MX mainboard / AMD SB700 @@ -1072,6 +1116,8 @@ 43a3 SB900 PCI to PCI bridge (PCIE port 3) 4437 RS250 [Mobility Radeon 7000 IGP] 4554 210888ET [Mach64 ET] + 4630 XENOS Parent Die (XBOX 360) + 4631 XENOS Daughter Die (XBOX 360) 4654 Mach64 VT 4742 Rage 3 [3D Rage PRO AGP 2X] 1002 0040 Rage Pro Turbo AGP 2X @@ -1152,6 +1198,22 @@ 1002 0084 Rage 3D Pro AGP 2x XPERT 98 1002 0087 Rage 3D IIC 1002 475a Rage IIC AGP + 4845 Xilleon 220 HBIU for HDTV2 + 4846 Xilleon 220 IDE for HDTV2 + 4847 Xilleon 220 USB for HDTV2 + 4848 Xilleon 220 DAIO-0 for HDTV2 + 4849 Xilleon 220 DAIO-1 for HDTV2 + 484a Xilleon 220 LPC for HDTV2 + 4850 Xilleon 215 HBIU for X215 + 4851 Xilleon 215 IDE for X215 + 4852 Xilleon 215 USB for X215 + 4853 Xilleon 215 DAIO-0 for X215 + 4854 Xilleon 215 DAIO-1 for X215 + 4855 Xilleon 225 HBIU for X225 + 4856 Xilleon 225 IDE for X225 + 4857 Xilleon 225 USB for X225 + 4858 Xilleon 225 DAIO-0 for X225 + 4859 Xilleon 225 DAIO-1 for X225 4966 RV250 [Radeon 9000 Series] 10f1 0002 RV250 If [Tachyon G9000 PRO] 148c 2039 RV250 If [Radeon 9000 Pro "Evil Commando"] @@ -1668,7 +1730,8 @@ 106b 014b Tropo XT [Radeon R9 M380 Mac Edition] 6641 Saturn PRO [Radeon HD 8930M] 6646 Bonaire XT [Radeon R9 M280X] - 6647 Bonaire PRO [Radeon R9 M270X] + 6647 Saturn PRO/XT [Radeon R9 M270X/M280X] + 1043 223d N551ZU laptop Radeon R9 M280X 6649 Bonaire [FirePro W5100] 1002 0b0c FirePro W4300 103c 0b0c Bonaire [FirePro W4300] @@ -1677,6 +1740,7 @@ 6650 Bonaire 6651 Bonaire 6658 Bonaire XTX [Radeon R7 260X/360] + 1043 04d3 AMD Radeon R7 260X 148c 0907 Radeon R7 360 1682 0907 Radeon R7 360 1682 7360 Radeon R7 360 @@ -1702,7 +1766,7 @@ 1462 2938 Radeon R9 360 OEM 1462 3271 Radeon R9 360 OEM 1682 7360 Radeon R7 360 - 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] + 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile] 1028 05ea Radeon HD 8670M 1028 06bf Radeon R5 M335 103c 1970 Radeon HD 8670M @@ -1718,7 +1782,8 @@ 1025 0846 Radeon HD 8570A 17aa 3805 Radeon HD 8570M 6664 Jet XT [Radeon R5 M240] - 6665 Jet PRO [Radeon R5 M230] + 6665 Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520 Mobile] + 17aa 1309 Radeon R7 M260DX 17aa 368f Radeon R5 A230 6667 Jet ULT [Radeon R5 M230] 666f Sun LE [Radeon HD 8550M / R5 M230] @@ -1727,7 +1792,7 @@ 66a2 Vega 20 66a3 Vega 20 66a7 Vega 20 [Radeon Pro Vega 20] - 66af Vega 20 + 66af Vega 20 [Radeon VII] 6704 Cayman PRO GL [FirePro V7900] 6707 Cayman LE GL [FirePro V5900] 6718 Cayman XT [Radeon HD 6970] @@ -2182,6 +2247,7 @@ 1028 2120 Radeon HD 6450 103c 2128 Radeon HD 6450 103c 2aee Radeon HD 7450A + 1092 6450 Radeon HD 6450 1462 2125 Radeon HD 6450 1462 2346 Radeon HD 7450 1462 2490 Radeon HD 6450 @@ -2328,7 +2394,7 @@ 67cc Ellesmere [Polaris10] 67cf Ellesmere [Polaris10] 67d0 Ellesmere [Radeon Pro V7300X / V7350x2] - 67df Ellesmere [Radeon RX 470/480/570/570X/580/580X] + 67df Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 1002 0b37 Radeon RX 480 1028 1722 Radeon RX 570X 1028 1723 Radeon RX 580X @@ -2336,13 +2402,14 @@ 1043 04b0 Radeon RX 470 1043 04fb Radeon RX 480 1043 04fd Radeon RX 480 8GB + 1043 056a Radeon RX 590 106b 0161 Radeon Pro 580 106b 0162 Radeon Pro 575 106b 0163 Radeon Pro 570 1458 22f0 Radeon RX 570 1458 22f7 Radeon RX 570 Gaming 4G 1462 3411 Radeon RX 470 - 1462 3413 Radeon RX 480 + 1462 3413 Radeon RX 480 Gaming X 8GB 1462 3416 Radeon RX 570 1462 3418 Radeon RX 580 Armor 4G OC 148c 2372 Radeon RX 480 @@ -2355,8 +2422,8 @@ 1787 a470 Radeon RX 470 1787 a480 Radeon RX 480 1849 5001 Phantom Gaming X RX 580 OC - 1da2 e353 Sapphire Radeon RX 580 Pulse 8GB - 1da2 e366 Nitro+ Radeon RX 580 4GB + 1da2 e353 Radeon RX 570 Pulse 4GB + 1da2 e366 Nitro+ Radeon RX 570/580 67e0 Baffin [Radeon Pro WX 4170] 103c 8270 Radeon Pro WX 4170 103c 8272 Radeon Pro WX 4170 @@ -2466,8 +2533,9 @@ 15c3 2b1e MED-X6000 6829 Cape Verde 682a Venus PRO - 682b Venus LE / Tropo PRO-L [Radeon HD 8830M / R7 M465X] + 682b Cape Verde PRO / Venus LE / Tropo PRO-L [Radeon HD 8830M / R7 250 / R7 M465X] 0128 079c Radeon R7 465X + 1462 3012 Radeon R7 250 682c Cape Verde GL [FirePro W4100] 682d Chelsea XT GL [FirePro M4000] 682f Chelsea LP [Radeon HD 7730M] @@ -2608,9 +2676,9 @@ 6863 Vega 10 XTX [Radeon Vega Frontier Edition] 6864 Vega 6867 Vega 10 XL [Radeon Pro Vega 56] - 6868 Vega 10 [Radeon PRO WX 8100] + 6868 Vega 10 [Radeon PRO WX 8100/8200] 686c Vega 10 [Radeon Instinct MI25 MxGPU] - 687f Vega 10 XT [Radeon RX Vega 64] + 687f Vega 10 XL/XT [Radeon RX Vega 56/64] 6880 Lexington [Radeon HD 6550M] 103c 163c Pavilion dv6 Radeon HD 6550M 6888 Cypress XT [FirePro V8800] @@ -3126,8 +3194,9 @@ 148c 9380 Radeon R9 380 # Make naming scheme consistent 174b e308 Radeon R9 380 Nitro 4G D5 - 694c Polaris 22 [Radeon RX Vega M GH] + 694c Polaris 22 XT [Radeon RX Vega M GH] 694e Polaris 22 XL [Radeon RX Vega M GL] + 694f Polaris 22 MGL XL [Radeon Pro WX Vega M GL] 6980 Polaris12 6981 Polaris12 6985 Lexa XT [Radeon PRO WX 3100] @@ -3142,7 +3211,8 @@ 69a1 Vega 12 69a2 Vega 12 69a3 Vega 12 - 69af Vega 12 + 69af Vega 12 [Radeon Pro Vega 20] + 6fdf Polaris 20 XL [Radeon RX 580 2048SP] 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge 7100 R520 [Radeon X1800 XT] @@ -3285,6 +3355,8 @@ 1043 049e Radeon R9 FURY 1043 04a0 Radeon R9 FURY X 174b e329 Radeon R9 FURY + 7310 Navi 10 + 731f Navi 10 7833 RS350 Host Bridge 7834 RS350 [Radeon 9100 PRO/XT IGP] 7835 RS350M [Mobility Radeon 9000 IGP] @@ -3577,6 +3649,8 @@ 17aa 5113 Radeon R6 Graphics 17aa 5116 Radeon R6 Graphics 17aa 5118 Radeon R5 Graphics + 9890 Amur + 98c0 Nolan 98e4 Stoney [Radeon R2/R3/R4/R5 Graphics] 9900 Trinity [Radeon HD 7660G] 103c 1985 Pavilion 17-e163sg Notebook PC @@ -3605,13 +3679,18 @@ 9917 Trinity [Radeon HD 7620G] 9918 Trinity [Radeon HD 7600G] 9919 Trinity [Radeon HD 7500G] + 991e Bishop 9920 Liverpool [Playstation 4 APU] 9921 Liverpool HDMI/DP Audio Controller - 9990 Trinity [Radeon HD 7520G] - 9991 Trinity [Radeon HD 7540D] - 9992 Trinity [Radeon HD 7420G] - 9993 Trinity [Radeon HD 7480D] - 9994 Trinity [Radeon HD 7400G] + 9922 Starship + 9923 Starsha2 [Kingston/Clayton] + 9924 Gladius + 9926 Jupiter + 9990 Trinity 2 [Radeon HD 7520G] + 9991 Trinity 2 [Radeon HD 7540D] + 9992 Trinity 2 [Radeon HD 7420G] + 9993 Trinity 2 [Radeon HD 7480D] + 9994 Trinity 2 [Radeon HD 7400G] 9995 Richland [Radeon HD 8450G] 9996 Richland [Radeon HD 8470D] 9997 Richland [Radeon HD 8350G] @@ -3622,9 +3701,9 @@ 999c Richland # AMD Quad-Core A8-Series APU A8-6500T with Radeon HD 8550D 999d Richland [Radeon HD 8550D] - 99a0 Trinity [Radeon HD 7520G] - 99a2 Trinity [Radeon HD 7420G] - 99a4 Trinity [Radeon HD 7400G] + 99a0 Trinity 2 [Radeon HD 7520G] + 99a2 Trinity 2 [Radeon HD 7420G] + 99a4 Trinity 2 [Radeon HD 7400G] aa00 R600 HDMI Audio [Radeon HD 2900 GT/PRO/XT] aa01 RV635 HDMI Audio [Radeon HD 3650/3730/3750] aa08 RV630 HDMI Audio [Radeon HD 2600 PRO/XT / HD 3610] @@ -3656,13 +3735,34 @@ aab0 Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] aac0 Tobago HDMI Audio [Radeon R7 360 / R9 360 OEM] aac8 Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X] -# I have a Tonga card and this is the HDMI Audio part aad8 Tonga HDMI Audio [Radeon R9 285/380] 174b aad8 Radeon R9 285/380 HDMI Audio + aae0 Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] aae8 Fiji HDMI/DP Audio [Radeon R9 Nano / FURY/FURY X] - aaf0 Ellesmere [Radeon RX 580] - ac00 Theater 600 Pro + aaf0 Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] + aaf8 Vega 10 HDMI Audio [Radeon Vega 56/64] + ab00 Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] + ab08 Polaris 22 HDMI Audio + ab10 Lexa HDMI Audio + ab18 Vega 12 HDMI Audio + ab20 Vega 20 HDMI Audio [Radeon VII] + ab38 Navi 10 HDMI Audio + ac00 Theater 506 World-Wide Analog Decoder + ac01 Theater 506 World-Wide Analog Decoder ac02 TV Wonder HD 600 PCIe + ac03 Theater 506 PCIe + ac04 Theater 506 USB + ac05 Theater 506 USB + ac06 Theater 506 External USB + ac07 Theater 506 External USB + ac08 Theater 506A World-Wide Analog Decoder + Demodulator + ac09 Theater 506A World-Wide Analog Decoder + Demodulator + ac0a Theater 506A PCIe + ac0b Theater 506A PCIe + ac0c Theater 506A USB + ac0d Theater 506A USB + ac0e Theater 506A External USB + ac0f Theater 506A External USB ac12 Theater HD T507 (DVB-T) TV tuner/capture device cab0 RS100 Host Bridge cab2 RS200 Host Bridge @@ -4082,6 +4182,7 @@ 03dc POWER8 Host Bridge (PHB3) 044b GenWQE Accelerator Adapter 04aa Flash Adapter 90 (PCIe2 0.9TB) + 04c1 POWER9 Host Bridge (PHB4) 04da PCI-E IPR SAS+ Adapter (ASIC) 1014 04fb PCIe3 x16 20GB Cache 12Gb Quad SAS RAID+ Adapter(580B) 1014 04fc PCIe3 x8 12Gb Quad SAS RAID+ Adapter(580A) @@ -4212,7 +4313,7 @@ 1439 Family 16h Processor Functions 5:1 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit - 1452 Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge + 1452 Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B 1456 Family 17h (Models 00h-0fh) Platform Security Processor @@ -4243,6 +4344,8 @@ 1535 Family 16h Processor Function 5 1536 Family 16h Processor Root Complex 1538 Family 16h Processor Function 0 + 1566 Family 16h (Models 30h-3fh) Processor Root Complex + 156b Family 16h (Models 30h-3fh) Host Bridge 1570 Family 15h (Models 60h-6fh) Processor Function 0 1571 Family 15h (Models 60h-6fh) Processor Function 1 1572 Family 15h (Models 60h-6fh) Processor Function 2 @@ -4254,6 +4357,14 @@ 157a Family 15h (Models 60h-6fh) Audio Controller 157b Family 15h (Models 60h-6fh) Host Bridge 157c Family 15h (Models 60h-6fh) Processor Root Port + 1580 Family 16h (Models 30h-3fh) Processor Function 0 + 1581 Family 16h (Models 30h-3fh) Processor Function 1 + 1582 Family 16h (Models 30h-3fh) Processor Function 2 + 1583 Family 16h (Models 30h-3fh) Processor Function 3 + 1584 Family 16h (Models 30h-3fh) Processor Function 4 + 1585 Family 16h (Models 30h-3fh) Processor Function 5 + 15df Family 17h (Models 10h-1fh) Platform Security Processor + 15e3 Family 17h (Models 10h-1fh) HD Audio Controller 1600 Family 15h Processor Function 0 1601 Family 15h Processor Function 1 1602 Family 15h Processor Function 2 @@ -4323,12 +4434,22 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) + 43b0 X370 Series Chipset PCIe Upstream Port + 1849 43c6 Fatal1ty X370 Professional Gaming 43b1 X399 Series Chipset PCIe Bridge 43b4 300 Series Chipset PCIe Port + 43b5 X370 Series Chipset SATA Controller + 1849 43c8 Fatal1ty X370 Professional Gaming 43b6 X399 Series Chipset SATA Controller 43b7 300 Series Chipset SATA Controller + 43b9 X370 Series Chipset USB 3.1 xHCI Controller + 1849 43d0 Fatal1ty X370 Professional Gaming 43ba X399 Series Chipset USB 3.1 xHCI Controller 43bb 300 Series Chipset USB 3.1 xHCI Controller + 43c6 400 Series Chipset PCIe Bridge + 43c7 400 Series Chipset PCIe Port + 43c8 400 Series Chipset SATA Controller + 43d5 400 Series Chipset USB 3.1 XHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -4778,11 +4899,14 @@ 1028 028d PowerEdge T410 MGA G200eW WPCM450 1028 029c PowerEdge M710 MGA G200eW WPCM450 1028 02a4 PowerEdge T310 MGA G200eW WPCM450 + 15d9 0605 X8SIL 15d9 0624 X9SCM-F Motherboard + 15d9 066b X9SRL-F 15d9 a811 H8DGU 0533 MGA G200EH 103c 3381 iLO4 0534 G200eR2 + 1028 04f7 PowerEdge R320 server 0536 Integrated Matrox G200eW3 Graphics Controller 0538 MGA G200eH3 1590 00e4 iLO5 VGA @@ -5290,6 +5414,7 @@ 122e PCI-X Local Bus Adapter 127b sx1000 System Bus Adapter 127c sx1000 I/O Controller + 128d Diva [GSP] Management Board 1290 Auxiliary Diva Serial Port 103c 1291 Diva SP2 1291 Auxiliary Diva Serial Port @@ -5819,10 +5944,19 @@ 104d Sony Corporation 8004 DTL-H2500 [Playstation development board] 8009 CXD1947Q i.LINK Controller + 800c DTL-H800 [PS1 sound development board] 8039 CXD3222 i.LINK Controller + 8047 PS2 TOOL MRP 8056 Rockwell HCF 56K modem 808a Memory Stick Controller + 80ff PS2 Performance Analyzer + 814a PS2 Performance Analyzer + 8183 ATHENS [PS3 prototype developer interface card] + 81b0 BM-1 [PSP TOOL Board Management Device] + 81c3 VO-4 [PSP TOOL Video Output Device] 81ce SxS Pro memory card + 81ff PS3 TOOL MRP + 820e CXD9208GP [PS3 PS2 emulation subsystem adapter] # 2nd ID 905c SxS Pro memory card # 2nd ID @@ -6258,6 +6392,8 @@ 0074 U4 HT Bridge # should be 14e4:1645 1645 Broadcom NetXtreme BCM5701 Gigabit Ethernet + 1801 T2 Bridge Controller + 1802 T2 Secure Enclave Processor 2001 S1X NVMe Controller 2002 S3ELab NVMe Controller 2003 S3X NVMe Controller @@ -6373,6 +6509,8 @@ 1077 02a8 QLE2692 Dual Port 16Gb FC to PCIe Gen3 x8 Adapter 1077 02ab QLE2740 Single Port 32Gb FC to PCIe Gen3 x8 Adapter 1077 02ac QLE2742 Dual Port 32Gb FC to PCIe Gen3 x8 Adapter + 1077 02b8 2x16Gb QME2692 FC HBA + 1077 02b9 2x32Gb QME2742 FC HBA 1590 00f9 StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter 1590 00fa StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter 1590 0203 StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter @@ -6442,10 +6580,14 @@ 1077 0007 QLogic 2x1GE+2x10GE QL41264HMCU CNA 1077 0009 QLogic 2x1GE+2x10GE QL41162HMRJ CNA 1077 000b 25GE 2P QL41262HxCU-DE Adapter + 1077 000f 2x25GE QL41262HMKR CNA + 1077 0010 2x25GE QL41232HMKR NIC 1077 0011 FastLinQ QL41212HLCU 25GbE Adapter 1077 0012 FastLinQ QL41112H 10GbE Adapter 1077 0019 QL41232HOCU - Dual Port 25/10GbE SFP28 OCP Adapter 1077 0039 QLogic QL41262 PCIe 25Gb 2-Port SFP28 Ethernet Adapter + 1590 021a 10GbE 2P QL41162HLRJ-HP Adapter + 1590 021b 10GbE 2P QL41162HLRJ-HP Adapter 1590 021d 10/25GbE 2P QL41222HLCU-HP Adapter 1590 021e 10/25GbE 2P QL41162HMRJ-HP Adapter 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter @@ -6462,6 +6604,9 @@ 1077 000c QLogic 2x25GE QL41262HMCU CNA 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter 1077 000e FastLinQ QL41162H 10GbE FCoE Adapter + 1077 000f 2x25GE QL41262HMKR CNA + 1590 021a 10GbE 2P QL41162HLRJ-HP Adapter + 1590 021b 10GbE 2P QL41162HLRJ-HP Adapter 8084 FastLinQ QL41000 Series 10/25/40/50GbE Controller (iSCSI) 1077 0001 10GE 2P QL41162HxRJ-DE Adapter 1077 0002 10GE 2P QL41112HxCU-DE Adapter @@ -6475,6 +6620,9 @@ 1077 000c QLogic 2x25GE QL41262HMCU CNA 1077 000d FastLinQ QL41262H 25GbE iSCSI Adapter 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter + 1077 000f 2x25GE QL41262HMKR CNA + 1590 021a 10GbE 2P QL41162HLRJ-HP Adapter + 1590 021b 10GbE 2P QL41162HLRJ-HP Adapter 8090 FastLinQ QL41000 Series Gigabit Ethernet Controller (SR-IOV VF) 1077 0001 25GE 2P QL41262HxCU-DE Adapter 1077 0002 10GE 2P QL41112HxCU-DE Adapter @@ -6488,8 +6636,12 @@ 1077 000c QLogic 2x25GE QL41262HMCU CNA 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter (SR-IOV VF) 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter (SR-IOV VF) + 1077 000f 2x25GE QL41262HMKR CNA + 1077 0010 2x25GE QL41232HMKR NIC 1077 0011 FastLinQ QL41212H 25GbE Adapter (SR-IOV VF) 1077 0012 FastLinQ QL41112H 10GbE Adapter (SR-IOV VF) + 1590 021a 10GbE 2P QL41162HLRJ-HP Adapter + 1590 021b 10GbE 2P QL41162HLRJ-HP Adapter 1590 021e 10/25GbE 2P QL41162HMRJ-HP Adapter 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter 8430 ISP8324 1/10GbE Converged Network Controller (NIC VF) @@ -7492,6 +7644,7 @@ 036c Bt879(??) Video Capture 13e9 0070 Win/TV (Video Section) 036e Bt878 Video Capture + 0000 0001 Euresys Picolo PCIe 0070 13eb WinTV Series 0070 ff01 Viewcast Osprey 200 0071 0101 DigiTV PCI @@ -7586,6 +7739,7 @@ 1851 1851 FlyVideo'98 EZ - video 1852 1852 FlyVideo'98 (with FM Tuner) 0878 Bt878 Audio Capture + 0000 0001 Euresys Picolo PCIe 0070 13eb WinTV Series 0070 ff01 Viewcast Osprey 200 0071 0101 DigiTV PCI @@ -8921,7 +9075,6 @@ 018b NV18GL [Quadro4 380 XGL] 018c NV18GL [Quadro NVS 50 PCI] 018d NV18M [GeForce4 448 Go] - 018f NV18 0190 G80 [GeForce 8800 GTS / 8800 GTX] 0191 G80 [GeForce 8800 GTX] 0192 G80 [GeForce 8800 GTS] @@ -9464,6 +9617,7 @@ 040f G84GL [Quadro FX 1700] 0410 G92 [GeForce GT 330] 0414 G92 [GeForce 9800 GT] + 0418 G92 [GeForce GT 330 OEM] 0420 G86 [GeForce 8400 SE] 0421 G86 [GeForce 8500 GT] 1462 0960 NX8500GT-TD512EH/M2 @@ -10324,10 +10478,12 @@ 0f00 GF108 [GeForce GT 630] 0f01 GF108 [GeForce GT 620] 0f02 GF108 [GeForce GT 730] + 0f03 GF108 [GeForce GT 610] 0f06 GF108 [GeForce GT 730] 0fb0 GM200 High Definition Audio 0fb8 GP108 High Definition Audio Controller 0fb9 GP107GL High Definition Audio Controller + 0fba GM206 High Definition Audio Controller 0fbb GM204 High Definition Audio Controller 0fc0 GK107 [GeForce GT 640 OEM] 0fc1 GK107 [GeForce GT 640] @@ -10509,6 +10665,9 @@ 10ef GP102 HDMI Audio Controller 10f0 GP104 High Definition Audio Controller 10f1 GP106 High Definition Audio Controller + 10f7 TU102 High Definition Audio Controller + 10f9 TU106 High Definition Audio Controller + 1043 8673 TURBO-RTX2070-8G 1140 GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] 1019 0799 GeForce 820M 1019 999f GeForce GT 720M @@ -11047,6 +11206,7 @@ 1392 GM107M [GeForce GTX 860M] 1393 GM107M [GeForce 840M] 1398 GM107M [GeForce 845M] + 1399 GM107M [GeForce 945M] 139a GM107M [GeForce GTX 950M] 17aa 362c GeForce GTX 950A 17aa 362f GeForce GTX 950A @@ -11121,13 +11281,20 @@ 174d GM108M [GeForce MX130] 174e GM108M [GeForce MX110] 1789 GM107GL [GRID M3-3020] + 179c GM107 [GeForce 940MX] 17c2 GM200 [GeForce GTX TITAN X] 17c8 GM200 [GeForce GTX 980 Ti] 17f0 GM200GL [Quadro M6000] 17f1 GM200GL [Quadro M6000 24GB] 17fd GM200GL [Tesla M40] + 1ad6 TU102 USB 3.1 Controller + 1ad7 TU102 UCSI Controller + 1ada TU106 USB 3.1 Host Controller + 1043 8673 TURBO-RTX2070-8G + 1adb TU106 USB Type-C Port Policy Controller + 1043 8673 TURBO-RTX2070-8G 1b00 GP102 [TITAN X] - 1b01 GP102 + 1b01 GP102 [GeForce GTX 1080 Ti 10GB] 1b02 GP102 [TITAN Xp] 1b04 GP102 1b06 GP102 [GeForce GTX 1080 Ti] @@ -11149,18 +11316,23 @@ 1462 11e9 GeForce GTX 1070 Max-Q 1558 9501 GeForce GTX 1070 Max-Q 1ba2 GP104M [GeForce GTX 1070 Mobile] + 1ba9 GP104M + 1baa GP104M 1bad GP104 [GeForce GTX 1070 Engineering Sample] 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL [Quadro P4000] 1bb3 GP104GL [Tesla P4] 1bb4 GP104GL [Tesla P6] 1bb5 GP104GLM [Quadro P5200 Mobile] + 103c 842f P5200 [Zbook 17 G5 mobile workstation] 1bb6 GP104GLM [Quadro P5000 Mobile] 1bb7 GP104GLM [Quadro P4000 Mobile] 1462 11e9 Quadro P4000 Max-Q 1bb8 GP104GLM [Quadro P3000 Mobile] 1bb9 GP104GLM [Quadro P4200 Mobile] + 103c 842f P4200 [Zbook 17 G5 mobile workstation] 1bbb GP104GLM [Quadro P3200 Mobile] + 103c 842f P3200 [Zbook 17 G5 moble workstation] 1bc7 GP104 [P104-101] 1be0 GP104BM [GeForce GTX 1080 Mobile] 1028 07c0 GeForce GTX 1080 Max-Q @@ -11178,6 +11350,9 @@ 17aa 39b9 GeForce GTX 1060 Max-Q 3GB 1c21 GP106M [GeForce GTX 1050 Ti Mobile] 1c22 GP106M [GeForce GTX 1050 Mobile] + 1c23 GP106M [GeForce GTX 1060 Mobile Rev. 2] + 1414 0020 GTX 1060 Mobile + 1c2d GP106M 1c30 GP106GL [Quadro P2000] 1c35 GP106 1c60 GP106BM [GeForce GTX 1060 Mobile 6GB] @@ -11201,17 +11376,28 @@ 1cb3 GP107GL [Quadro P400] 1cb6 GP107GL [Quadro P620] 1cba GP107GLM [Quadro P2000 Mobile] + 103c 842c P2000 [Zbook 15 G5 mobile workstation] + 103c 842f P2000 [Zbook 17 G5 mobile workstation] 1cbb GP107GLM [Quadro P1000 Mobile] + 103c 8429 P1000 [Zbook Studio G5 mobile workstation] + 103c 842c P1000 [Zbook 15 G5 mobile workstation] + 103c 842f P1000 [Zbook 17 G5 mobile workstation] + 103c 8451 P1000 [Zbook Studio x360 G5 mobile workstation] 1cbc GP107GLM [Quadro P600 Mobile] 1ccc GP107BM [GeForce GTX 1050 Ti Mobile] 1ccd GP107BM [GeForce GTX 1050 Mobile] 1d01 GP108 [GeForce GT 1030] 1d10 GP108M [GeForce MX150] + 17aa 225e ThinkPad T480 + 1d11 GP108M [GeForce MX230] 1d12 GP108M [GeForce MX150] 1d72 1701 Mi Notebook Pro [GeForce MX150] + 1d13 GP108M [GeForce MX250] 1d33 GP108GLM [Quadro P500 Mobile] + 1d52 GP108BM [GeForce MX250] 1d81 GV100 [TITAN V] 1db1 GV100GL [Tesla V100 SXM2 16GB] + 1db2 GV100 [Tesla V100-DGXS-16GB] 1db3 GV100GL [Tesla V100 FHHL 16GB] 1db4 GV100GL [Tesla V100 PCIe 16GB] 1db5 GV100GL [Tesla V100 SXM2 32GB] @@ -11219,11 +11405,41 @@ 1db7 GV100GL [Tesla V100 DGXS 32GB] 1dba GV100GL [Quadro GV100] 10de 12eb TITAN V CEO Edition - 1e07 GV102 - 1e3c GV102GL - 1e82 GV104 - 1e87 GV104 - 1eab GV104M + 1e02 TU102 [TITAN RTX] + 1e04 TU102 [GeForce RTX 2080 Ti] + 1e07 TU102 [GeForce RTX 2080 Ti Rev. A] + 1462 3715 RTX 2080 Ti GAMING X TRIO + 1e2d TU102B + 1e2e TU102B + 1e30 TU102GL [Quadro RTX 6000/8000] + 10de 129e Quadro RTX 8000 + 10de 12ba Quadro RTX 6000 + 1e38 TU102GL + 1e3c TU102GL + 1e3d TU102GL + 1e3e TU102GL + 1e82 TU104 [GeForce RTX 2080] + 1e87 TU104 [GeForce RTX 2080 Rev. A] + 1e90 TU104M [GeForce RTX 2080 Mobile] + 1eab TU104M + 1eae TU104M + 1eb0 TU104GL [Quadro RTX 5000] + 1eb1 TU104GL [Quadro RTX 4000] + 1eb8 TU104GL [Tesla T4] + 1ed0 TU104M [GeForce RTX 2080 Mobile] + 1f02 TU106 [GeForce RTX 2070] + 1043 8673 TURBO RTX 2070 + 1f04 TU106 + 1f07 TU106 [GeForce RTX 2070 Rev. A] + 1f08 TU106 [GeForce RTX 2060 Rev. A] + 1f10 TU106M [GeForce RTX 2070 Mobile] + 1f11 TU106M [GeForce RTX 2060 Mobile] + 1f2e TU106M + 1f50 TU106M [GeForce RTX 2070 Mobile] + 1f51 TU106M [GeForce RTX 2060 Mobile] + 1f82 TU107 + 1f92 TU107M + 1fbf TU107GL 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) 103c 1934 FlexFabric 20Gb 2-port 650M Adapter @@ -11264,6 +11480,7 @@ 10df e322 Lancer Gen6: LPe31000 Fibre Channel Host Adapter 10df e323 Lancer Gen6: LPe31000 Fibre Channel Host Adapter 10df e325 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + e333 Lancer Gen6: LPe32000 Fibre Channel Host Adapter f011 Saturn: LightPulse Fibre Channel Host Adapter f015 Saturn: LightPulse Fibre Channel Host Adapter f085 LP850 Fibre Channel Host Adapter @@ -11410,6 +11627,7 @@ 524a RTS524A PCI Express Card Reader 5250 RTS5250 PCI Express Card Reader 525a RTS525A PCI Express Card Reader + 1028 06dc Latitude E7470 1028 06e4 XPS 15 9550 17aa 224f ThinkPad X1 Carbon 5th Gen 5286 RTS5286 PCI Express Card Reader @@ -11570,6 +11788,7 @@ 10ec 8739 Dell Wireless 1801 b822 RTL8822BE 802.11a/b/g/n/ac WiFi adapter c821 RTL8821CE 802.11ac PCIe Wireless Network Adapter + d723 RTL8723DE 802.11b/g/n PCIe Adapter 10ed Ascii Corporation 7310 V7310 10ee Xilinx Corporation @@ -11599,6 +11818,7 @@ ebf0 SED Systems Modulator/Demodulator ebf1 SED Systems Audio Interface Card ebf2 SED Systems Common PCI Interface + ebf3 SED Systems PCIe-AXI Bridge 10ef Racore Computer Products, Inc. 8154 M815x Token Ring Adapter 10f0 Peritek Corporation @@ -13089,6 +13309,15 @@ 1137 012e VIC 1227 PCIe Ethernet NIC 1137 0137 VIC 1380 Mezzanine Ethernet NIC 1137 014d VIC 1385 PCIe Ethernet NIC + 1137 015d VIC 1387 MLOM Ethernet NIC + 1137 0215 VIC 1440 Mezzanine Ethernet NIC + 1137 0216 VIC 1480 MLOM Ethernet NIC + 1137 0217 VIC 1455 PCIe Ethernet NIC + 1137 0218 VIC 1457 MLOM Ethernet NIC + 1137 0219 VIC 1485 PCIe Ethernet NIC + 1137 021a VIC 1487 MLOM Ethernet NIC + 1137 024a VIC 1495 PCIe Ethernet NIC + 1137 024b VIC 1497 MLOM Ethernet NIC 0044 VIC Ethernet NIC Dynamic 1137 0047 VIC P81E PCIe Ethernet NIC Dynamic 1137 0048 VIC M81KR Mezzanine Ethernet NIC Dynamic @@ -13134,6 +13363,7 @@ 1137 012c VIC 1340 MLOM Userspace NIC 1137 012e VIC 1227 PCIe Userspace NIC 1137 0137 VIC 1380 Mezzanine Userspace NIC + 023e 1GigE I350 LOM 1138 Ziatech Corporation 8905 8905 [STD 32 Bridge] 1139 Dynamic Pictures, Inc @@ -13509,6 +13739,13 @@ 0102 Extended IDE Controller 0103 EX-IDE Type-B 010f NVMe Controller + 0110 NVMe SSD Controller Cx5 + 1028 1ffb Express Flash NVMe 960G (RI) U.2 (CD5) + 1028 1ffc Express Flash NVMe 1.92T (RI) U.2 (CD5) + 1028 1ffd Express Flash NVMe 3.84T (RI) U.2 (CD5) + 1028 1ffe Express Flash NVMe 7.68T (RI) U.2 (CD5) + 1d49 4039 Thinksystem U.2 CM5 NVMe SSD + 1d49 403a Thinksystem AIC CM5 NVMe SSD 0115 XG4 NVMe SSD Controller 0404 DVD Decoder card 0406 Tecra Video Capture device @@ -13611,7 +13848,7 @@ 14ef 0220 PCD-RP-220S 17aa 201c ThinkPad X60/X60s 17aa 20c4 ThinkPad T61/R61 - 17aa 20c6 ThinkPad R61 + 17aa 20c6 ThinkPad R61/T400 0477 RL5c477 0478 RL5c478 1014 0184 ThinkPad A30p @@ -13646,7 +13883,7 @@ 1043 1237 A6J-Q008 1043 1967 V6800V 144d c018 X20 IV - 17aa 20ca ThinkPad T61 + 17aa 20ca ThinkPad T61/T400 0811 R5C811 0822 R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter 1014 0556 ThinkPad X40 / X41 / X60s / Z60t @@ -13668,7 +13905,7 @@ 144d c018 X20 IV 17aa 201d ThinkPad X60/X60s 17aa 20c7 ThinkPad T61 - 17aa 20c8 ThinkPad W500 + 17aa 20c8 ThinkPad T400/W500 0832 R5C832 IEEE 1394 Controller 1025 0121 Aspire 5920G 1028 01d7 XPS M1210 @@ -13705,6 +13942,7 @@ 1043 1967 V6800V 1180 0852 Pavilion 2410us 1324 10cf P7120 + 17aa 20cb ThinkPad T400 e230 R5U2xx (R5U230 / R5U231 / R5U241) [Memory Stick Host Controller] e476 CardBus bridge 1028 040a Latitude E6410 @@ -13712,6 +13950,7 @@ e822 MMC/SD Host Controller 1028 040a Latitude E6410 1028 040b Latitude E6510 + 17aa 21cf ThinkPad T520 e823 PCIe SDXC/MMC Host Controller 17aa 21cf ThinkPad T520 e832 R5C832 PCIe IEEE 1394 Controller @@ -14376,6 +14615,7 @@ 7384 PM7384 [FREEDM - 84P672 Frm Engine & Datalink Mgr] 8000 PM8000 [SPC - SAS Protocol Controller] 8009 PM8009 SPCve 8x6G + 8018 PM8018 Adaptec SAS Adaptor ASA-70165H PCIe Gen3 x8 6 Gbps 16-lane 4x SFF-8644 8032 PM8032 Tachyon QE8 117c 003a Celerity FC-81EN Fibre Channel Adapter 117c 003b Celerity FC-82EN Fibre Channel Adapter @@ -16194,6 +16434,7 @@ 1043 8428 Virtuoso 100 (Xonar Xense) 1043 8467 CMI8786 (Xonar DG) 1043 8521 CMI8786 (Xonar DGX) + 1043 8522 Xonar DSX 1043 85f4 Virtuoso 100 (Xonar Essence STX II) 13f6 8782 PCI 2.0 HD Audio 13f6 ffff CMI8787-HG2PCI @@ -16225,15 +16466,19 @@ 1612 0004 PCI-1612 4-port RS-232/422/485 1603 PCI-1603 2-port isolated RS-232/current loop 1604 PCI-1604 2-port RS-232 + 1680 PCI-1680 Rev.A1 2-port CAN-bus with isolation protection 16ff PCI-16xx series PCI multiport serial board (function 1: RX/TX steering CPLD) 1601 0000 PCI-1601 2-port unisolated RS-422/485 PCI communications card 1602 0000 PCI-1602 2-port isolated RS-422/485 1612 0000 PCI-1612 4-port RS-232/422/485 1711 PCI-1711 16-channel data acquisition card 12-bit, 100kS/s + 1713 PCI-1713 32-channel isolated analog input card 1733 PCI-1733 32-channel isolated digital input card - 1752 PCI-1752 - 1754 PCI-1754 - 1756 PCI-1756 + 1734 PCI-1734 32-channel isolated digital output card + 1752 PCI-1752 64-channel Isolated Digital Output Card + 1754 PCI-1754 64-channel Isolated Digital Input Card + 1756 PCI-1756 64-ch Isolated Digital I/O PCI Card + a004 PCI-1612 4-port RS-232/422/485 # FPGA bridge to two SJA1000 c302 MIOe-3680 2-Port CAN-Bus MIOe Module with Isolation Protection *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Mon Feb 4 10:19:28 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B93914C5F4E; Mon, 4 Feb 2019 10:19:28 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 D0E9B76E82; Mon, 4 Feb 2019 10:19:27 +0000 (UTC) (envelope-from gonzo@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 BF9234A3A; Mon, 4 Feb 2019 10:19:27 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14AJRWu028077; Mon, 4 Feb 2019 10:19:27 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14AJRGa028076; Mon, 4 Feb 2019 10:19:27 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902041019.x14AJRGa028076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 4 Feb 2019 10:19:27 +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: r343737 - in stable/12/sys/dev/usb: . quirk X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in stable/12/sys/dev/usb: . quirk X-SVN-Commit-Revision: 343737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D0E9B76E82 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 10:19:28 -0000 Author: gonzo Date: Mon Feb 4 10:19:27 2019 New Revision: 343737 URL: https://svnweb.freebsd.org/changeset/base/343737 Log: MFC r343224, r343533 r343224: Add KBD_BOOTPROTO quirk for Logitech G510s USB keyboard PR: 232136 Submitted by: dgilbert@eicat.ca r343533: [usb] Add UQ_KBD_BOOTPROTO quirk for Corsair K68 keyboard PR: 222114 Submitted by: Zane C. Bowers-Hadley Modified: stable/12/sys/dev/usb/quirk/usb_quirk.c stable/12/sys/dev/usb/usbdevs Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/12/sys/dev/usb/quirk/usb_quirk.c Mon Feb 4 09:08:36 2019 (r343736) +++ stable/12/sys/dev/usb/quirk/usb_quirk.c Mon Feb 4 10:19:27 2019 (r343737) @@ -96,6 +96,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(TELEX, MIC1, 0x009, 0x009, UQ_AU_NO_FRAC), USB_QUIRK(SILICONPORTALS, YAPPHONE, 0x100, 0x100, UQ_AU_INP_ASYNC), USB_QUIRK(LOGITECH, UN53B, 0x0000, 0xffff, UQ_NO_STRINGS), + USB_QUIRK(LOGITECH, G510S, 0x0000, 0xFFFF, UQ_KBD_BOOTPROTO), USB_QUIRK(REALTEK, RTL8196EU, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(ELSA, MODEM1, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(PLANEX2, MZKUE150N, 0x0000, 0xffff, UQ_CFG_INDEX_1), @@ -164,6 +165,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE), /* Quirk for Corsair Vengeance K60 keyboard */ USB_QUIRK(CORSAIR, K60, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), + /* Quirk for Corsair Gaming K68 keyboard */ + USB_QUIRK(CORSAIR, K68, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), /* Quirk for Corsair Vengeance K70 keyboard */ USB_QUIRK(CORSAIR, K70, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), /* Quirk for Corsair K70 RGB keyboard */ Modified: stable/12/sys/dev/usb/usbdevs ============================================================================== --- stable/12/sys/dev/usb/usbdevs Mon Feb 4 09:08:36 2019 (r343736) +++ stable/12/sys/dev/usb/usbdevs Mon Feb 4 10:19:27 2019 (r343737) @@ -1581,6 +1581,7 @@ product COREGA FETHER_USB_TXC 0x9601 FEther USB-TXC /* Corsair products */ product CORSAIR K60 0x0a60 Corsair Vengeance K60 keyboard +product CORSAIR K68 0x1b3f Corsair Gaming K68 keyboard product CORSAIR K70 0x1b09 Corsair Vengeance K70 keyboard product CORSAIR K70_RGB 0x1b13 Corsair K70 RGB Keyboard product CORSAIR STRAFE 0x1b15 Corsair STRAFE Gaming keyboard @@ -2841,6 +2842,7 @@ product LOGITECH UN58A 0xc030 iFeel Mouse product LOGITECH UN53B 0xc032 iFeel MouseMan product LOGITECH WMPAD 0xc208 WingMan GamePad Extreme product LOGITECH WMRPAD 0xc20a WingMan RumblePad +product LOGITECH G510S 0xc22d G510s Keyboard product LOGITECH WMJOY 0xc281 WingMan Force joystick product LOGITECH BB13 0xc401 USB-PS/2 Trackball product LOGITECH RK53 0xc501 Cordless mouse From owner-svn-src-stable@freebsd.org Mon Feb 4 10:20:49 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 031F214C61C1; Mon, 4 Feb 2019 10:20:49 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 9CBAE770A9; Mon, 4 Feb 2019 10:20:48 +0000 (UTC) (envelope-from gonzo@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 8D7E54A58; Mon, 4 Feb 2019 10:20:48 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14AKmUW028237; Mon, 4 Feb 2019 10:20:48 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14AKmY2028236; Mon, 4 Feb 2019 10:20:48 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902041020.x14AKmY2028236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 4 Feb 2019 10:20: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: r343738 - stable/12/sys/dev/aic7xxx X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/sys/dev/aic7xxx X-SVN-Commit-Revision: 343738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9CBAE770A9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 10:20:49 -0000 Author: gonzo Date: Mon Feb 4 10:20:48 2019 New Revision: 343738 URL: https://svnweb.freebsd.org/changeset/base/343738 Log: MFC r343170: [aic7xxx] Use correct product name 29320LPE instead of non-existent 39320LPE The PCI id belongs to Adaptec 29320LPE controller. The same fix also was merged[1] to OpenBSD driver ~6 years ago. [1] https://github.com/openbsd/src/commit/f997b5 PR: 172133 Submitted by: henning.petersen@t-online.de Modified: stable/12/sys/dev/aic7xxx/aic79xx_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/aic7xxx/aic79xx_pci.c ============================================================================== --- stable/12/sys/dev/aic7xxx/aic79xx_pci.c Mon Feb 4 10:19:27 2019 (r343737) +++ stable/12/sys/dev/aic7xxx/aic79xx_pci.c Mon Feb 4 10:20:48 2019 (r343738) @@ -75,6 +75,7 @@ ahd_compose_id(u_int device, u_int vendor, u_int subde #define ID_AIC7901 0x800F9005FFFF9005ull #define ID_AHA_29320A 0x8000900500609005ull #define ID_AHA_29320ALP 0x8017900500449005ull +#define ID_AHA_29320LPE 0x8017900500459005ull #define ID_AIC7901A 0x801E9005FFFF9005ull #define ID_AHA_29320LP 0x8014900500449005ull @@ -91,7 +92,6 @@ ahd_compose_id(u_int device, u_int vendor, u_int subde #define ID_AHA_39320D_B 0x801C900500419005ull #define ID_AHA_39320D_HP 0x8011900500AC0E11ull #define ID_AHA_39320D_B_HP 0x801C900500AC0E11ull -#define ID_AHA_39320LPE 0x8017900500459005ull #define ID_AIC7902_PCI_REV_A4 0x3 #define ID_AIC7902_PCI_REV_B0 0x10 #define SUBID_HP 0x0E11 @@ -144,6 +144,12 @@ struct ahd_pci_identity ahd_pci_ident_table [] = "Adaptec 29320ALP Ultra320 SCSI adapter", ahd_aic7901_setup }, + { + ID_AHA_29320LPE, + ID_ALL_MASK, + "Adaptec 29320LPE Ultra320 SCSI adapter", + ahd_aic7901_setup + }, /* aic7901A based controllers */ { ID_AHA_29320LP, @@ -210,12 +216,6 @@ struct ahd_pci_identity ahd_pci_ident_table [] = ID_AHA_39320D_B_HP, ID_ALL_MASK, "Adaptec (HP OEM) 39320D Ultra320 SCSI adapter", - ahd_aic7902_setup - }, - { - ID_AHA_39320LPE, - ID_ALL_MASK, - "Adaptec 39320LPE Ultra320 SCSI adapter", ahd_aic7902_setup }, /* Generic chip probes for devices we don't know 'exactly' */ From owner-svn-src-stable@freebsd.org Mon Feb 4 10:24:17 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD5A714C62F2; Mon, 4 Feb 2019 10:24:17 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 604E0774A3; Mon, 4 Feb 2019 10:24:17 +0000 (UTC) (envelope-from gonzo@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 509D34BE1; Mon, 4 Feb 2019 10:24:17 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14AOHpI033394; Mon, 4 Feb 2019 10:24:17 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14AOHnp033393; Mon, 4 Feb 2019 10:24:17 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902041024.x14AOHnp033393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 4 Feb 2019 10:24: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: r343739 - stable/12/tools/tools/tinybsd X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/tools/tools/tinybsd X-SVN-Commit-Revision: 343739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 604E0774A3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 10:24:17 -0000 Author: gonzo Date: Mon Feb 4 10:24:16 2019 New Revision: 343739 URL: https://svnweb.freebsd.org/changeset/base/343739 Log: MFC r343391: Fix prompt for MFSROOT in tinybsd tinybsd offers two choices when prompting user for MFSROOT: 'YES' and 'NO'. Script logic only handles 'yes'. Change offered values to lower case. PR: 131059 Submitted by: Brock Williams Modified: stable/12/tools/tools/tinybsd/tinybsd Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/tinybsd/tinybsd ============================================================================== --- stable/12/tools/tools/tinybsd/tinybsd Mon Feb 4 10:20:48 2019 (r343738) +++ stable/12/tools/tools/tinybsd/tinybsd Mon Feb 4 10:24:16 2019 (r343739) @@ -206,7 +206,7 @@ loadconfig () { break fi done - MFSROOT=`confirm_action "$MFSROOT" "Use an MFSROOT? (YES/NO)"` + MFSROOT=`confirm_action "$MFSROOT" "Use an MFSROOT? (yes/no)"` IMG=`confirm_action "$IMG" "Image file to generate?"` # example of formatted value (NNN in this case) From owner-svn-src-stable@freebsd.org Mon Feb 4 10:24:58 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F2D914C6375; Mon, 4 Feb 2019 10:24:58 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 C3C99775DF; Mon, 4 Feb 2019 10:24:57 +0000 (UTC) (envelope-from gonzo@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 B7D054BE3; Mon, 4 Feb 2019 10:24:57 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14AOvbc033487; Mon, 4 Feb 2019 10:24:57 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14AOvkN033486; Mon, 4 Feb 2019 10:24:57 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902041024.x14AOvkN033486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 4 Feb 2019 10:24: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: r343740 - stable/12/sys/dev/bhnd/cores/pmu X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/sys/dev/bhnd/cores/pmu X-SVN-Commit-Revision: 343740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C3C99775DF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 10:24:58 -0000 Author: gonzo Date: Mon Feb 4 10:24:57 2019 New Revision: 343740 URL: https://svnweb.freebsd.org/changeset/base/343740 Log: MFC r343458: Fix format/arg mismatch USe correct format for int arguments PR: 229549 Submitted by: David Binderman Modified: stable/12/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c ============================================================================== --- stable/12/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c Mon Feb 4 10:24:16 2019 (r343739) +++ stable/12/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c Mon Feb 4 10:24:57 2019 (r343740) @@ -1036,7 +1036,7 @@ bhnd_pmu_res_init(struct bhnd_pmu_softc *sc) return (error); } - PMU_DEBUG(sc, "Applying %s=%s to rsrc %d res_updn_timer\n", + PMU_DEBUG(sc, "Applying %s=%d to rsrc %d res_updn_timer\n", name, val, i); BHND_PMU_WRITE_4(sc, BHND_PMU_RES_TABLE_SEL, i); @@ -1111,7 +1111,7 @@ bhnd_pmu_res_init(struct bhnd_pmu_softc *sc) return (error); } - PMU_DEBUG(sc, "Applying %s=%s to rsrc %d res_dep_mask\n", name, + PMU_DEBUG(sc, "Applying %s=%d to rsrc %d res_dep_mask\n", name, val, i); BHND_PMU_WRITE_4(sc, BHND_PMU_RES_TABLE_SEL, i); From owner-svn-src-stable@freebsd.org Mon Feb 4 10:25:30 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEDEB14C63F8; Mon, 4 Feb 2019 10:25:30 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 54F117772C; Mon, 4 Feb 2019 10:25:30 +0000 (UTC) (envelope-from gonzo@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 17F574BE5; Mon, 4 Feb 2019 10:25:30 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14APTwA033586; Mon, 4 Feb 2019 10:25:29 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14APT7P033585; Mon, 4 Feb 2019 10:25:29 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902041025.x14APT7P033585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 4 Feb 2019 10:25: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: r343741 - stable/12/usr.bin/find X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/usr.bin/find X-SVN-Commit-Revision: 343741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 54F117772C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 10:25:30 -0000 Author: gonzo Date: Mon Feb 4 10:25:29 2019 New Revision: 343741 URL: https://svnweb.freebsd.org/changeset/base/343741 Log: MFC r343516: Fix whiteout support in find(1) find(1) ignores -type w passed to it. With this patch find(1) properly identifies and prints whiteouts. PR: 126384, 156703 Submitted by: oleg@mamontov.net Modified: stable/12/usr.bin/find/find.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/find/find.c ============================================================================== --- stable/12/usr.bin/find/find.c Mon Feb 4 10:24:57 2019 (r343740) +++ stable/12/usr.bin/find/find.c Mon Feb 4 10:25:29 2019 (r343741) @@ -208,8 +208,10 @@ find_execute(PLAN *plan, char *paths[]) entry->fts_path, strerror(entry->fts_errno)); exitstatus = 1; continue; -#ifdef FTS_W +#if defined(FTS_W) && defined(FTS_WHITEOUT) case FTS_W: + if (ftsoptions & FTS_WHITEOUT) + break; continue; #endif /* FTS_W */ } From owner-svn-src-stable@freebsd.org Mon Feb 4 22:38:35 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 193CE14B5148; Mon, 4 Feb 2019 22:38:35 +0000 (UTC) (envelope-from brooks@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) server-signature RSA-PSS (4096 bits) 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 B53EC75C8C; Mon, 4 Feb 2019 22:38:34 +0000 (UTC) (envelope-from brooks@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 7F307C899; Mon, 4 Feb 2019 22:38:34 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14McYdQ026776; Mon, 4 Feb 2019 22:38:34 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14McYi3026775; Mon, 4 Feb 2019 22:38:34 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201902042238.x14McYi3026775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 4 Feb 2019 22:38: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: r343756 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 343756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B53EC75C8C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.931,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 22:38:35 -0000 Author: brooks Date: Mon Feb 4 22:38:34 2019 New Revision: 343756 URL: https://svnweb.freebsd.org/changeset/base/343756 Log: MFC r343587: Add a simple port filter to SIFTR. SIFTR does not allow any kind of filtering, but captures every packet processed by the TCP stack. Often, only a specific session or service is of interest, and doing the filtering in post-processing of the log adds to the overhead of SIFTR. This adds a new sysctl net.inet.siftr.port_filter. When set to zero, all packets get captured as previously. If set to any other value, only packets where either the source or the destination ports match, are captured in the log file. Submitted by: Richard Scheffenegger Reviewed by: Cheng Cui Differential Revision: https://reviews.freebsd.org/D18897 Modified: stable/12/sys/netinet/siftr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/siftr.c ============================================================================== --- stable/12/sys/netinet/siftr.c Mon Feb 4 21:28:25 2019 (r343755) +++ stable/12/sys/netinet/siftr.c Mon Feb 4 22:38:34 2019 (r343756) @@ -272,6 +272,7 @@ static volatile unsigned int siftr_exit_pkt_manager_th static unsigned int siftr_enabled = 0; static unsigned int siftr_pkts_per_log = 1; static unsigned int siftr_generate_hashes = 0; +static uint16_t siftr_port_filter = 0; /* static unsigned int siftr_binary_log = 0; */ static char siftr_logfile[PATH_MAX] = "/var/log/siftr.log"; static char siftr_logfile_shadow[PATH_MAX] = "/var/log/siftr.log"; @@ -317,6 +318,10 @@ SYSCTL_UINT(_net_inet_siftr, OID_AUTO, genhashes, CTLF &siftr_generate_hashes, 0, "enable packet hash generation"); +SYSCTL_U16(_net_inet_siftr, OID_AUTO, port_filter, CTLFLAG_RW, + &siftr_port_filter, 0, + "enable packet filter on a TCP port"); + /* XXX: TODO SYSCTL_UINT(_net_inet_siftr, OID_AUTO, binary, CTLFLAG_RW, &siftr_binary_log, 0, @@ -907,6 +912,16 @@ siftr_chkpkt(void *arg, struct mbuf **m, struct ifnet goto inp_unlock; } + /* + * Only pkts selected by the tcp port filter + * can be inserted into the pkt_queue + */ + if ((siftr_port_filter != 0) && + (siftr_port_filter != ntohs(inp->inp_lport)) && + (siftr_port_filter != ntohs(inp->inp_fport))) { + goto inp_unlock; + } + pn = malloc(sizeof(struct pkt_node), M_SIFTR_PKTNODE, M_NOWAIT|M_ZERO); if (pn == NULL) { @@ -1080,6 +1095,16 @@ siftr_chkpkt6(void *arg, struct mbuf **m, struct ifnet else ss->nskip_out_tcpcb++; + goto inp_unlock6; + } + + /* + * Only pkts selected by the tcp port filter + * can be inserted into the pkt_queue + */ + if ((siftr_port_filter != 0) && + (siftr_port_filter != ntohs(inp->inp_lport)) && + (siftr_port_filter != ntohs(inp->inp_fport))) { goto inp_unlock6; } From owner-svn-src-stable@freebsd.org Tue Feb 5 02:33:59 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0700314C454E; Tue, 5 Feb 2019 02:33:59 +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) server-signature RSA-PSS (4096 bits) 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 A2E1B88889; Tue, 5 Feb 2019 02:33:58 +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 94E38F645; Tue, 5 Feb 2019 02:33:58 +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 x152XwjW052907; Tue, 5 Feb 2019 02:33:58 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x152XwKC052906; Tue, 5 Feb 2019 02:33:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902050233.x152XwKC052906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 5 Feb 2019 02:33:58 +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: r343759 - in stable: 11/contrib/ipfilter/ipsd 11/contrib/ipfilter/ipsd/Celler 12/contrib/ipfilter/ipsd 12/contrib/ipfilter/ipsd/Celler X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter/ipsd 11/contrib/ipfilter/ipsd/Celler 12/contrib/ipfilter/ipsd 12/contrib/ipfilter/ipsd/Celler X-SVN-Commit-Revision: 343759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A2E1B88889 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 02:33:59 -0000 Author: cy Date: Tue Feb 5 02:33:57 2019 New Revision: 343759 URL: https://svnweb.freebsd.org/changeset/base/343759 Log: MFC r342815: Remove ipsd (IP Scan Detetor). It is unused and to my knowledge has never been used on any platform that ipfilter has been on. However it looks like it could be a useful utility, therefore there are plans to make it a port one day. It lacks a man page as well. Deleted: stable/12/contrib/ipfilter/ipsd/Celler/ip_compat.h stable/12/contrib/ipfilter/ipsd/Makefile stable/12/contrib/ipfilter/ipsd/README stable/12/contrib/ipfilter/ipsd/ipsd.c stable/12/contrib/ipfilter/ipsd/ipsd.h stable/12/contrib/ipfilter/ipsd/ipsdr.c stable/12/contrib/ipfilter/ipsd/linux.h stable/12/contrib/ipfilter/ipsd/sbpf.c stable/12/contrib/ipfilter/ipsd/sdlpi.c stable/12/contrib/ipfilter/ipsd/slinux.c stable/12/contrib/ipfilter/ipsd/snit.c Modified: Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Deleted: stable/11/contrib/ipfilter/ipsd/Celler/ip_compat.h stable/11/contrib/ipfilter/ipsd/Makefile stable/11/contrib/ipfilter/ipsd/README stable/11/contrib/ipfilter/ipsd/ipsd.c stable/11/contrib/ipfilter/ipsd/ipsd.h stable/11/contrib/ipfilter/ipsd/ipsdr.c stable/11/contrib/ipfilter/ipsd/linux.h stable/11/contrib/ipfilter/ipsd/sbpf.c stable/11/contrib/ipfilter/ipsd/sdlpi.c stable/11/contrib/ipfilter/ipsd/slinux.c stable/11/contrib/ipfilter/ipsd/snit.c Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable@freebsd.org Tue Feb 5 02:33:58 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B000D14C454A; Tue, 5 Feb 2019 02:33:58 +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) server-signature RSA-PSS (4096 bits) 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 5599C88888; Tue, 5 Feb 2019 02:33:58 +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 48AE4F644; Tue, 5 Feb 2019 02:33:58 +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 x152XwdE052901; Tue, 5 Feb 2019 02:33:58 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x152Xwof052900; Tue, 5 Feb 2019 02:33:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902050233.x152Xwof052900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 5 Feb 2019 02:33:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343759 - in stable: 11/contrib/ipfilter/ipsd 11/contrib/ipfilter/ipsd/Celler 12/contrib/ipfilter/ipsd 12/contrib/ipfilter/ipsd/Celler X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter/ipsd 11/contrib/ipfilter/ipsd/Celler 12/contrib/ipfilter/ipsd 12/contrib/ipfilter/ipsd/Celler X-SVN-Commit-Revision: 343759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5599C88888 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 02:33:58 -0000 Author: cy Date: Tue Feb 5 02:33:57 2019 New Revision: 343759 URL: https://svnweb.freebsd.org/changeset/base/343759 Log: MFC r342815: Remove ipsd (IP Scan Detetor). It is unused and to my knowledge has never been used on any platform that ipfilter has been on. However it looks like it could be a useful utility, therefore there are plans to make it a port one day. It lacks a man page as well. Deleted: stable/11/contrib/ipfilter/ipsd/Celler/ip_compat.h stable/11/contrib/ipfilter/ipsd/Makefile stable/11/contrib/ipfilter/ipsd/README stable/11/contrib/ipfilter/ipsd/ipsd.c stable/11/contrib/ipfilter/ipsd/ipsd.h stable/11/contrib/ipfilter/ipsd/ipsdr.c stable/11/contrib/ipfilter/ipsd/linux.h stable/11/contrib/ipfilter/ipsd/sbpf.c stable/11/contrib/ipfilter/ipsd/sdlpi.c stable/11/contrib/ipfilter/ipsd/slinux.c stable/11/contrib/ipfilter/ipsd/snit.c Modified: Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Deleted: stable/12/contrib/ipfilter/ipsd/Celler/ip_compat.h stable/12/contrib/ipfilter/ipsd/Makefile stable/12/contrib/ipfilter/ipsd/README stable/12/contrib/ipfilter/ipsd/ipsd.c stable/12/contrib/ipfilter/ipsd/ipsd.h stable/12/contrib/ipfilter/ipsd/ipsdr.c stable/12/contrib/ipfilter/ipsd/linux.h stable/12/contrib/ipfilter/ipsd/sbpf.c stable/12/contrib/ipfilter/ipsd/sdlpi.c stable/12/contrib/ipfilter/ipsd/slinux.c stable/12/contrib/ipfilter/ipsd/snit.c Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-stable@freebsd.org Tue Feb 5 03:01:12 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B171614C5BAA; Tue, 5 Feb 2019 03:01:12 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 5348389A1F; Tue, 5 Feb 2019 03:01:12 +0000 (UTC) (envelope-from avos@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 2CC9AFA5D; Tue, 5 Feb 2019 03:01:12 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1531CTL065805; Tue, 5 Feb 2019 03:01:12 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1531Avo065793; Tue, 5 Feb 2019 03:01:10 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902050301.x1531Avo065793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 5 Feb 2019 03:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343760 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5348389A1F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 03:01:12 -0000 Author: avos Date: Tue Feb 5 03:01:10 2019 New Revision: 343760 URL: https://svnweb.freebsd.org/changeset/base/343760 Log: MFC r343541: Drop some unneeded includes from wireless USB drivers. Modified: stable/11/sys/dev/usb/wlan/if_rsu.c stable/11/sys/dev/usb/wlan/if_rum.c stable/11/sys/dev/usb/wlan/if_run.c stable/11/sys/dev/usb/wlan/if_uath.c stable/11/sys/dev/usb/wlan/if_upgt.c stable/11/sys/dev/usb/wlan/if_ural.c stable/11/sys/dev/usb/wlan/if_urtw.c stable/11/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/usb/wlan/if_rsu.c stable/10/sys/dev/usb/wlan/if_rum.c stable/10/sys/dev/usb/wlan/if_run.c stable/10/sys/dev/usb/wlan/if_uath.c stable/10/sys/dev/usb/wlan/if_upgt.c stable/10/sys/dev/usb/wlan/if_ural.c stable/10/sys/dev/usb/wlan/if_urtw.c stable/10/sys/dev/usb/wlan/if_zyd.c stable/12/sys/dev/usb/wlan/if_rsu.c stable/12/sys/dev/usb/wlan/if_rum.c stable/12/sys/dev/usb/wlan/if_run.c stable/12/sys/dev/usb/wlan/if_uath.c stable/12/sys/dev/usb/wlan/if_upgt.c stable/12/sys/dev/usb/wlan/if_ural.c stable/12/sys/dev/usb/wlan/if_urtw.c stable/12/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsu.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/11/sys/dev/usb/wlan/if_rsu.c Tue Feb 5 03:01:10 2019 (r343760) @@ -40,12 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include - -#include -#include #include #include Modified: stable/11/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rum.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/11/sys/dev/usb/wlan/if_rum.c Tue Feb 5 03:01:10 2019 (r343760) @@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/11/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_run.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/11/sys/dev/usb/wlan/if_run.c Tue Feb 5 03:01:10 2019 (r343760) @@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/11/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_uath.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/11/sys/dev/usb/wlan/if_uath.c Tue Feb 5 03:01:10 2019 (r343760) @@ -80,10 +80,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/11/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_upgt.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/11/sys/dev/usb/wlan/if_upgt.c Tue Feb 5 03:01:10 2019 (r343760) @@ -39,7 +39,6 @@ #include #include -#include #include #include Modified: stable/11/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_ural.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/11/sys/dev/usb/wlan/if_ural.c Tue Feb 5 03:01:10 2019 (r343760) @@ -43,10 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/11/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_urtw.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/11/sys/dev/usb/wlan/if_urtw.c Tue Feb 5 03:01:10 2019 (r343760) @@ -31,10 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/11/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_zyd.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/11/sys/dev/usb/wlan/if_zyd.c Tue Feb 5 03:01:10 2019 (r343760) @@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include From owner-svn-src-stable@freebsd.org Tue Feb 5 03:01:15 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AF6814C5BB5; Tue, 5 Feb 2019 03:01:15 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 52E1589A33; Tue, 5 Feb 2019 03:01:14 +0000 (UTC) (envelope-from avos@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 21B0AFA64; Tue, 5 Feb 2019 03:01:14 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1531Eha065819; Tue, 5 Feb 2019 03:01:14 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1531Cw1065810; Tue, 5 Feb 2019 03:01:12 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902050301.x1531Cw1065810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 5 Feb 2019 03:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343760 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 52E1589A33 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 03:01:15 -0000 Author: avos Date: Tue Feb 5 03:01:10 2019 New Revision: 343760 URL: https://svnweb.freebsd.org/changeset/base/343760 Log: MFC r343541: Drop some unneeded includes from wireless USB drivers. Modified: stable/10/sys/dev/usb/wlan/if_rsu.c stable/10/sys/dev/usb/wlan/if_rum.c stable/10/sys/dev/usb/wlan/if_run.c stable/10/sys/dev/usb/wlan/if_uath.c stable/10/sys/dev/usb/wlan/if_upgt.c stable/10/sys/dev/usb/wlan/if_ural.c stable/10/sys/dev/usb/wlan/if_urtw.c stable/10/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/usb/wlan/if_rsu.c stable/11/sys/dev/usb/wlan/if_rum.c stable/11/sys/dev/usb/wlan/if_run.c stable/11/sys/dev/usb/wlan/if_uath.c stable/11/sys/dev/usb/wlan/if_upgt.c stable/11/sys/dev/usb/wlan/if_ural.c stable/11/sys/dev/usb/wlan/if_urtw.c stable/11/sys/dev/usb/wlan/if_zyd.c stable/12/sys/dev/usb/wlan/if_rsu.c stable/12/sys/dev/usb/wlan/if_rum.c stable/12/sys/dev/usb/wlan/if_run.c stable/12/sys/dev/usb/wlan/if_uath.c stable/12/sys/dev/usb/wlan/if_upgt.c stable/12/sys/dev/usb/wlan/if_ural.c stable/12/sys/dev/usb/wlan/if_urtw.c stable/12/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_rsu.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_rsu.c Tue Feb 5 03:01:10 2019 (r343760) @@ -35,12 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include - -#include -#include #include #include Modified: stable/10/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_rum.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_rum.c Tue Feb 5 03:01:10 2019 (r343760) @@ -41,10 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/10/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_run.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_run.c Tue Feb 5 03:01:10 2019 (r343760) @@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/10/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_uath.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_uath.c Tue Feb 5 03:01:10 2019 (r343760) @@ -80,10 +80,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/10/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_upgt.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_upgt.c Tue Feb 5 03:01:10 2019 (r343760) @@ -38,7 +38,6 @@ #include #include -#include #include #include Modified: stable/10/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_ural.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_ural.c Tue Feb 5 03:01:10 2019 (r343760) @@ -43,10 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/10/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_urtw.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_urtw.c Tue Feb 5 03:01:10 2019 (r343760) @@ -31,10 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/10/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_zyd.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/10/sys/dev/usb/wlan/if_zyd.c Tue Feb 5 03:01:10 2019 (r343760) @@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include From owner-svn-src-stable@freebsd.org Tue Feb 5 03:01:17 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07A8B14C5BDF; Tue, 5 Feb 2019 03:01:17 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 951CF89A53; Tue, 5 Feb 2019 03:01:16 +0000 (UTC) (envelope-from avos@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 13E18FA6B; Tue, 5 Feb 2019 03:01:16 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1531Fmg065832; Tue, 5 Feb 2019 03:01:15 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1531EGc065824; Tue, 5 Feb 2019 03:01:14 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902050301.x1531EGc065824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 5 Feb 2019 03:01:14 +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: r343760 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 951CF89A53 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 03:01:17 -0000 Author: avos Date: Tue Feb 5 03:01:10 2019 New Revision: 343760 URL: https://svnweb.freebsd.org/changeset/base/343760 Log: MFC r343541: Drop some unneeded includes from wireless USB drivers. Modified: stable/12/sys/dev/usb/wlan/if_rsu.c stable/12/sys/dev/usb/wlan/if_rum.c stable/12/sys/dev/usb/wlan/if_run.c stable/12/sys/dev/usb/wlan/if_uath.c stable/12/sys/dev/usb/wlan/if_upgt.c stable/12/sys/dev/usb/wlan/if_ural.c stable/12/sys/dev/usb/wlan/if_urtw.c stable/12/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/usb/wlan/if_rsu.c stable/10/sys/dev/usb/wlan/if_rum.c stable/10/sys/dev/usb/wlan/if_run.c stable/10/sys/dev/usb/wlan/if_uath.c stable/10/sys/dev/usb/wlan/if_upgt.c stable/10/sys/dev/usb/wlan/if_ural.c stable/10/sys/dev/usb/wlan/if_urtw.c stable/10/sys/dev/usb/wlan/if_zyd.c stable/11/sys/dev/usb/wlan/if_rsu.c stable/11/sys/dev/usb/wlan/if_rum.c stable/11/sys/dev/usb/wlan/if_run.c stable/11/sys/dev/usb/wlan/if_uath.c stable/11/sys/dev/usb/wlan/if_upgt.c stable/11/sys/dev/usb/wlan/if_ural.c stable/11/sys/dev/usb/wlan/if_urtw.c stable/11/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rsu.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/12/sys/dev/usb/wlan/if_rsu.c Tue Feb 5 03:01:10 2019 (r343760) @@ -39,12 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include - -#include -#include #include #include Modified: stable/12/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rum.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/12/sys/dev/usb/wlan/if_rum.c Tue Feb 5 03:01:10 2019 (r343760) @@ -44,10 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/12/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_run.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/12/sys/dev/usb/wlan/if_run.c Tue Feb 5 03:01:10 2019 (r343760) @@ -44,10 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/12/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_uath.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/12/sys/dev/usb/wlan/if_uath.c Tue Feb 5 03:01:10 2019 (r343760) @@ -85,10 +85,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/12/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_upgt.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/12/sys/dev/usb/wlan/if_upgt.c Tue Feb 5 03:01:10 2019 (r343760) @@ -41,7 +41,6 @@ #include #include -#include #include #include Modified: stable/12/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_ural.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/12/sys/dev/usb/wlan/if_ural.c Tue Feb 5 03:01:10 2019 (r343760) @@ -45,10 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/12/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_urtw.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/12/sys/dev/usb/wlan/if_urtw.c Tue Feb 5 03:01:10 2019 (r343760) @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include Modified: stable/12/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_zyd.c Tue Feb 5 02:33:57 2019 (r343759) +++ stable/12/sys/dev/usb/wlan/if_zyd.c Tue Feb 5 03:01:10 2019 (r343760) @@ -44,10 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include From owner-svn-src-stable@freebsd.org Tue Feb 5 08:05:46 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B059614D3EB1; Tue, 5 Feb 2019 08:05:46 +0000 (UTC) (envelope-from delphij@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) server-signature RSA-PSS (4096 bits) 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 47FDB93B32; Tue, 5 Feb 2019 08:05:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34E791B04E; Tue, 5 Feb 2019 08:05:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1585kxW026443; Tue, 5 Feb 2019 08:05:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1585hAO026424; Tue, 5 Feb 2019 08:05:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201902050805.x1585hAO026424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 5 Feb 2019 08:05: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: r343765 - stable/12/usr.bin/mkimg X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/usr.bin/mkimg X-SVN-Commit-Revision: 343765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 47FDB93B32 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 08:05:47 -0000 Author: delphij Date: Tue Feb 5 08:05:42 2019 New Revision: 343765 URL: https://svnweb.freebsd.org/changeset/base/343765 Log: MFC r342813: Remove unneeded headers. Modified: stable/12/usr.bin/mkimg/apm.c stable/12/usr.bin/mkimg/bsd.c stable/12/usr.bin/mkimg/ebr.c stable/12/usr.bin/mkimg/endian.h stable/12/usr.bin/mkimg/format.c stable/12/usr.bin/mkimg/gpt.c stable/12/usr.bin/mkimg/mbr.c stable/12/usr.bin/mkimg/qcow.c stable/12/usr.bin/mkimg/raw.c stable/12/usr.bin/mkimg/scheme.c stable/12/usr.bin/mkimg/uuid.c stable/12/usr.bin/mkimg/vhd.c stable/12/usr.bin/mkimg/vmdk.c stable/12/usr.bin/mkimg/vtoc8.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/mkimg/apm.c ============================================================================== --- stable/12/usr.bin/mkimg/apm.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/apm.c Tue Feb 5 08:05:42 2019 (r343765) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: stable/12/usr.bin/mkimg/bsd.c ============================================================================== --- stable/12/usr.bin/mkimg/bsd.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/bsd.c Tue Feb 5 08:05:42 2019 (r343765) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: stable/12/usr.bin/mkimg/ebr.c ============================================================================== --- stable/12/usr.bin/mkimg/ebr.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/ebr.c Tue Feb 5 08:05:42 2019 (r343765) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: stable/12/usr.bin/mkimg/endian.h ============================================================================== --- stable/12/usr.bin/mkimg/endian.h Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/endian.h Tue Feb 5 08:05:42 2019 (r343765) @@ -29,6 +29,8 @@ #ifndef _MKIMG_ENDIAN_H_ #define _MKIMG_ENDIAN_H_ +#include + static __inline uint16_t be16dec(const void *pp) { Modified: stable/12/usr.bin/mkimg/format.c ============================================================================== --- stable/12/usr.bin/mkimg/format.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/format.c Tue Feb 5 08:05:42 2019 (r343765) @@ -28,16 +28,11 @@ __FBSDID("$FreeBSD$"); #include -#include #include -#include -#include #include -#include #include "image.h" #include "format.h" -#include "mkimg.h" static struct mkimg_format *first; static struct mkimg_format *format; Modified: stable/12/usr.bin/mkimg/gpt.c ============================================================================== --- stable/12/usr.bin/mkimg/gpt.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/gpt.c Tue Feb 5 08:05:42 2019 (r343765) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: stable/12/usr.bin/mkimg/mbr.c ============================================================================== --- stable/12/usr.bin/mkimg/mbr.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/mbr.c Tue Feb 5 08:05:42 2019 (r343765) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: stable/12/usr.bin/mkimg/qcow.c ============================================================================== --- stable/12/usr.bin/mkimg/qcow.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/qcow.c Tue Feb 5 08:05:42 2019 (r343765) @@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include -#include #include "endian.h" #include "image.h" Modified: stable/12/usr.bin/mkimg/raw.c ============================================================================== --- stable/12/usr.bin/mkimg/raw.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/raw.c Tue Feb 5 08:05:42 2019 (r343765) @@ -28,14 +28,10 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include #include #include "image.h" #include "format.h" -#include "mkimg.h" static int raw_resize(lba_t imgsz __unused) Modified: stable/12/usr.bin/mkimg/scheme.c ============================================================================== --- stable/12/usr.bin/mkimg/scheme.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/scheme.c Tue Feb 5 08:05:42 2019 (r343765) @@ -29,10 +29,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include -#include #include #include #include Modified: stable/12/usr.bin/mkimg/uuid.c ============================================================================== --- stable/12/usr.bin/mkimg/uuid.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/uuid.c Tue Feb 5 08:05:42 2019 (r343765) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include "endian.h" Modified: stable/12/usr.bin/mkimg/vhd.c ============================================================================== --- stable/12/usr.bin/mkimg/vhd.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/vhd.c Tue Feb 5 08:05:42 2019 (r343765) @@ -28,11 +28,9 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include -#include #include "endian.h" #include "image.h" Modified: stable/12/usr.bin/mkimg/vmdk.c ============================================================================== --- stable/12/usr.bin/mkimg/vmdk.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/vmdk.c Tue Feb 5 08:05:42 2019 (r343765) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "endian.h" #include "image.h" Modified: stable/12/usr.bin/mkimg/vtoc8.c ============================================================================== --- stable/12/usr.bin/mkimg/vtoc8.c Tue Feb 5 06:25:35 2019 (r343764) +++ stable/12/usr.bin/mkimg/vtoc8.c Tue Feb 5 08:05:42 2019 (r343765) @@ -30,9 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include From owner-svn-src-stable@freebsd.org Tue Feb 5 10:33:23 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3F1914AFBB5; Tue, 5 Feb 2019 10:33:23 +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) server-signature RSA-PSS (4096 bits) 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 6137C6AFC0; Tue, 5 Feb 2019 10:33:23 +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 521A81CACA; Tue, 5 Feb 2019 10:33:23 +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 x15AXNeA004842; Tue, 5 Feb 2019 10:33:23 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15AXM8M004839; Tue, 5 Feb 2019 10:33:22 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902051033.x15AXM8M004839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 5 Feb 2019 10:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343771 - stable/11/sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/sys/dev/netmap X-SVN-Commit-Revision: 343771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6137C6AFC0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 10:33:24 -0000 Author: vmaffione Date: Tue Feb 5 10:33:22 2019 New Revision: 343771 URL: https://svnweb.freebsd.org/changeset/base/343771 Log: netmap: small cleanup on em, lem, igb, ixgbe Replace D, ND and RD macros with the corresponding nm_pr* ones. Modified: stable/11/sys/dev/netmap/if_em_netmap.h stable/11/sys/dev/netmap/if_igb_netmap.h stable/11/sys/dev/netmap/if_lem_netmap.h stable/11/sys/dev/netmap/ixgbe_netmap.h Modified: stable/11/sys/dev/netmap/if_em_netmap.h ============================================================================== --- stable/11/sys/dev/netmap/if_em_netmap.h Tue Feb 5 10:29:31 2019 (r343770) +++ stable/11/sys/dev/netmap/if_em_netmap.h Tue Feb 5 10:33:22 2019 (r343771) @@ -188,8 +188,8 @@ em_netmap_txsync(struct netmap_kring *kring, int flags if (flags & NAF_FORCE_RECLAIM || nm_kr_txempty(kring)) { /* record completed transmissions using TDH */ nic_i = E1000_READ_REG(&adapter->hw, E1000_TDH(kring->ring_id)); - if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */ - D("TDH wrap %d", nic_i); + if (unlikely(nic_i >= kring->nkr_num_slots)) { + nm_prerr("TDH wrap at idx %d", nic_i); nic_i -= kring->nkr_num_slots; } if (nic_i != txr->next_to_clean) { Modified: stable/11/sys/dev/netmap/if_igb_netmap.h ============================================================================== --- stable/11/sys/dev/netmap/if_igb_netmap.h Tue Feb 5 10:29:31 2019 (r343770) +++ stable/11/sys/dev/netmap/if_igb_netmap.h Tue Feb 5 10:33:22 2019 (r343771) @@ -172,8 +172,8 @@ igb_netmap_txsync(struct netmap_kring *kring, int flag if (flags & NAF_FORCE_RECLAIM || nm_kr_txempty(kring)) { /* record completed transmissions using TDH */ nic_i = E1000_READ_REG(&adapter->hw, E1000_TDH(kring->ring_id)); - if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */ - D("TDH wrap %d", nic_i); + if (unlikely(nic_i >= kring->nkr_num_slots)) { + nm_prerr("TDH wrap at idx %d", nic_i); nic_i -= kring->nkr_num_slots; } txr->next_to_clean = nic_i; Modified: stable/11/sys/dev/netmap/if_lem_netmap.h ============================================================================== --- stable/11/sys/dev/netmap/if_lem_netmap.h Tue Feb 5 10:29:31 2019 (r343770) +++ stable/11/sys/dev/netmap/if_lem_netmap.h Tue Feb 5 10:33:22 2019 (r343771) @@ -172,8 +172,8 @@ lem_netmap_txsync(struct netmap_kring *kring, int flag kring->last_reclaim = ticks; /* record completed transmissions using TDH */ nic_i = E1000_READ_REG(&adapter->hw, E1000_TDH(0)); - if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */ - D("TDH wrap %d", nic_i); + if (unlikely(nic_i >= kring->nkr_num_slots)) { + nm_prerr("TDH wrap at idx %d", nic_i); nic_i -= kring->nkr_num_slots; } adapter->next_tx_to_clean = nic_i; @@ -226,7 +226,7 @@ lem_netmap_rxsync(struct netmap_kring *kring, int flag break; len = le16toh(curr->length) - 4; // CRC if (len < 0) { - RD(5, "bogus pkt (%d) size %d nic idx %d", n, len, nic_i); + nm_prlim(2, "bogus pkt (%d) size %d nic idx %d", n, len, nic_i); len = 0; } ring->slot[nm_i].len = len; @@ -238,7 +238,7 @@ lem_netmap_rxsync(struct netmap_kring *kring, int flag nic_i = nm_next(nic_i, lim); } if (n) { /* update the state variables */ - ND("%d new packets at nic %d nm %d tail %d", + nm_prdis("%d new packets at nic %d nm %d tail %d", n, adapter->next_rx_desc_to_check, netmap_idx_n2k(kring, adapter->next_rx_desc_to_check), Modified: stable/11/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- stable/11/sys/dev/netmap/ixgbe_netmap.h Tue Feb 5 10:29:31 2019 (r343770) +++ stable/11/sys/dev/netmap/ixgbe_netmap.h Tue Feb 5 10:33:22 2019 (r343771) @@ -88,7 +88,7 @@ set_crcstrip(struct ixgbe_hw *hw, int onoff) hl = IXGBE_READ_REG(hw, IXGBE_HLREG0); rxc = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); if (netmap_verbose) - D("%s read HLREG 0x%x rxc 0x%x", + nm_prinf("%s read HLREG 0x%x rxc 0x%x", onoff ? "enter" : "exit", hl, rxc); /* hw requirements ... */ rxc &= ~IXGBE_RDRXCTL_RSCFRSTSIZE; @@ -103,7 +103,7 @@ set_crcstrip(struct ixgbe_hw *hw, int onoff) rxc |= IXGBE_RDRXCTL_CRCSTRIP; } if (netmap_verbose) - D("%s write HLREG 0x%x rxc 0x%x", + nm_prinf("%s write HLREG 0x%x rxc 0x%x", onoff ? "enter" : "exit", hl, rxc); IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hl); IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rxc); @@ -326,8 +326,8 @@ ixgbe_netmap_txsync(struct netmap_kring *kring, int fl */ nic_i = IXGBE_READ_REG(&adapter->hw, IXGBE_IS_VF(adapter) ? IXGBE_VFTDH(kring->ring_id) : IXGBE_TDH(kring->ring_id)); - if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */ - D("TDH wrap %d", nic_i); + if (unlikely(nic_i >= kring->nkr_num_slots)) { + nm_prerr("TDH wrap at idx %d", nic_i); nic_i -= kring->nkr_num_slots; } if (nic_i != txr->next_to_clean) { From owner-svn-src-stable@freebsd.org Tue Feb 5 13:48:28 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F061D14B9202; Tue, 5 Feb 2019 13:48:27 +0000 (UTC) (envelope-from bcr@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) server-signature RSA-PSS (4096 bits) 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 8A452724EF; Tue, 5 Feb 2019 13:48:27 +0000 (UTC) (envelope-from bcr@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 698EB1EB47; Tue, 5 Feb 2019 13:48:27 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15DmR8A005115; Tue, 5 Feb 2019 13:48:27 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15DmRI9005114; Tue, 5 Feb 2019 13:48:27 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201902051348.x15DmRI9005114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Tue, 5 Feb 2019 13:48:27 +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: r343773 - stable/12/usr.bin/fortune/datfiles X-SVN-Group: stable-12 X-SVN-Commit-Author: bcr X-SVN-Commit-Paths: stable/12/usr.bin/fortune/datfiles X-SVN-Commit-Revision: 343773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8A452724EF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 13:48:28 -0000 Author: bcr (doc committer) Date: Tue Feb 5 13:48:26 2019 New Revision: 343773 URL: https://svnweb.freebsd.org/changeset/base/343773 Log: MFC r343532: A few corrections and clarifications to r343406. - Use "in" instead of "on" when referring to directory and UFS partition. - Switch from hw.physmem to hw.realmem and add a description to distinguish the two. - Explain why the "df" command is having trouble displaying ZFS sizes correctly. Add a bit more descriptive text to help why the output of "zfs list -o space" should be used. - Switch to vmstat instead of iostat display for systat(1) as it shows more information on one screen. Describe what is displayed based on the text of the man page. Change the list of the other values accordingly. - Sort the flags to "zfs destroy" alphabetically. Reviewed by: rgrimes Approved by: rgrimes Differential Revision: https://reviews.freebsd.org/D18993 Modified: stable/12/usr.bin/fortune/datfiles/freebsd-tips Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/fortune/datfiles/freebsd-tips ============================================================================== --- stable/12/usr.bin/fortune/datfiles/freebsd-tips Tue Feb 5 12:10:48 2019 (r343772) +++ stable/12/usr.bin/fortune/datfiles/freebsd-tips Tue Feb 5 13:48:26 2019 (r343773) @@ -275,7 +275,7 @@ To see how much disk space is left on your UFS partiti df -h -- Dru % -To see the 10 largest files on a directory or UFS partition, use +To see the 10 largest files in a directory or on a UFS partition, use du -h /partition_or_directory_name | sort -rh | head -- Dru @@ -560,31 +560,38 @@ curl -v -d "nickname=$USER" -d "description=FreeBSD/$( $(kenv smbios.system.maker) $(kenv smbios.system.product)" -d "do=addd" \ --data-urlencode 'dmesg@/var/run/dmesg.boot' http://dmesgd.nycbug.org/index.cgi % -Want to know how much memory (in bytes) your machine has available? Let +Want to know how much memory (in bytes) your machine has installed? Let sysctl(8) tell you with the following command: -sysctl hw.physmem +sysctl hw.realmem +The realmem value is memory before the kernel and modules are loaded, whereas +hw.physmem is what is left after they were loaded. + The number of active CPUs is displayed using this command: sysctl hw.ncpu -- Benedict Reuschling % -When using ZFS as the file system the "df" command will display confusing -values. Use the built-in "zfs list" command to get an overview of space usage: +When using ZFS as the file system the "df" command is reporting the pool size +and not file system sizes. It also does not know about descendent ZFS +datasets, snapshots, quotas, and reservations with their individual space usage. +Use the built-in "zfs list" command to get a better overview of space usage: zfs list -o space -- Benedict Reuschling % To learn more about what your system is doing, take a look at systat(1). For -example, to get an overview of I/O happening in the system, run: +example, to get various of statistics related to virtual memory usage, process +scheduling, device interrupts, system name translation caching, and disk I/O, +enter the following: -systat -iostat +systat -vmstat -Other values are icmp, icmp6, ifstat, ip, ip6, netstat, pigs, sctp, swap, tcp, -vmstat, or zarc. You can switch between displays using : and exit +Other values are icmp, icmp6, ifstat, iostat, ip, ip6, netstat, pigs, sctp, +swap, tcp, or zarc. You can switch between displays using : and exit back to your shell by typing :quit @@ -694,7 +701,7 @@ dataset/snapshot and not any dependent ones. ZFS will action when -n is combined with the -v option without actually performing it: -zfs destroy -rvn mypool@mysnap +zfs destroy -nrv mypool@mysnap Once you are sure this is exactly what you intend to do, remove the -n parameter to execute the destroy operation. From owner-svn-src-stable@freebsd.org Tue Feb 5 17:52:07 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9EE414C27B4; Tue, 5 Feb 2019 17:52:07 +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) server-signature RSA-PSS (4096 bits) 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 7251185FEE; Tue, 5 Feb 2019 17:52:07 +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 5D3C4215D3; Tue, 5 Feb 2019 17:52:07 +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 x15Hq7nb037387; Tue, 5 Feb 2019 17:52:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15Hq7Op037386; Tue, 5 Feb 2019 17:52:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902051752.x15Hq7Op037386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 5 Feb 2019 17:52:07 +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: r343781 - stable/12/sys/amd64/amd64 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/amd64/amd64 X-SVN-Commit-Revision: 343781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7251185FEE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:52:08 -0000 Author: kib Date: Tue Feb 5 17:52:06 2019 New Revision: 343781 URL: https://svnweb.freebsd.org/changeset/base/343781 Log: MFC r343780: amd64: clear callee-preserved registers on syscall exit. Approved by: so Security: CVE-2019-5595 Modified: stable/12/sys/amd64/amd64/exception.S Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/exception.S ============================================================================== --- stable/12/sys/amd64/amd64/exception.S Tue Feb 5 17:49:27 2019 (r343780) +++ stable/12/sys/amd64/amd64/exception.S Tue Feb 5 17:52:06 2019 (r343781) @@ -521,12 +521,14 @@ fast_syscall_common: movq TF_RFLAGS(%rsp),%r11 /* original %rflags */ movq TF_RIP(%rsp),%rcx /* original %rip */ movq TF_RSP(%rsp),%rsp /* user stack pointer */ + xorl %r8d,%r8d /* zero the rest of GPRs */ + xorl %r10d,%r10d cmpq $~0,PCPU(UCR3) je 2f movq PCPU(UCR3),%r9 movq %r9,%cr3 - xorl %r9d,%r9d -2: swapgs +2: xorl %r9d,%r9d + swapgs sysretq 3: /* AST scheduled. */ From owner-svn-src-stable@freebsd.org Tue Feb 5 17:54:03 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26FA914C2894; Tue, 5 Feb 2019 17:54:03 +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) server-signature RSA-PSS (4096 bits) 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 9FA16861CD; Tue, 5 Feb 2019 17:54:02 +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 928EE215FB; Tue, 5 Feb 2019 17:54:02 +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 x15Hs2Vq040722; Tue, 5 Feb 2019 17:54:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15Hs2XZ040721; Tue, 5 Feb 2019 17:54:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902051754.x15Hs2XZ040721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 5 Feb 2019 17:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343782 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 343782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9FA16861CD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:54:03 -0000 Author: kib Date: Tue Feb 5 17:54:02 2019 New Revision: 343782 URL: https://svnweb.freebsd.org/changeset/base/343782 Log: MFC r343780: amd64: clear callee-preserved registers on syscall exit. Approved by: so Security: CVE-2019-5595 Modified: stable/11/sys/amd64/amd64/exception.S Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/exception.S ============================================================================== --- stable/11/sys/amd64/amd64/exception.S Tue Feb 5 17:52:06 2019 (r343781) +++ stable/11/sys/amd64/amd64/exception.S Tue Feb 5 17:54:02 2019 (r343782) @@ -511,12 +511,14 @@ fast_syscall_common: movq TF_RFLAGS(%rsp),%r11 /* original %rflags */ movq TF_RIP(%rsp),%rcx /* original %rip */ movq TF_RSP(%rsp),%rsp /* user stack pointer */ + xorl %r8d,%r8d /* zero the rest of GPRs */ + xorl %r10d,%r10d cmpq $~0,PCPU(UCR3) je 2f movq PCPU(UCR3),%r9 movq %r9,%cr3 - xorl %r9d,%r9d -2: swapgs +2: xorl %r9d,%r9d + swapgs sysretq 3: /* AST scheduled. */ From owner-svn-src-stable@freebsd.org Tue Feb 5 17:56:23 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 368A014C2A8A; Tue, 5 Feb 2019 17:56:23 +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) server-signature RSA-PSS (4096 bits) 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 CF389865FD; Tue, 5 Feb 2019 17:56:22 +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 C0CFE215FF; Tue, 5 Feb 2019 17:56:22 +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 x15HuMJX040973; Tue, 5 Feb 2019 17:56:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15HuMUX040972; Tue, 5 Feb 2019 17:56:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201902051756.x15HuMUX040972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 5 Feb 2019 17:56:22 +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: r343785 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 343785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CF389865FD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:56:23 -0000 Author: markj Date: Tue Feb 5 17:56:22 2019 New Revision: 343785 URL: https://svnweb.freebsd.org/changeset/base/343785 Log: MFC r343784: Avoid leaking fp references when truncating SCM_RIGHTS control messages. Approved by: so Security: CVE-2019-5596 Modified: stable/12/sys/kern/uipc_syscalls.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/uipc_syscalls.c ============================================================================== --- stable/12/sys/kern/uipc_syscalls.c Tue Feb 5 17:55:08 2019 (r343784) +++ stable/12/sys/kern/uipc_syscalls.c Tue Feb 5 17:56:22 2019 (r343785) @@ -1607,8 +1607,10 @@ m_dispose_extcontrolm(struct mbuf *m) fd = *fds++; error = fget(td, fd, &cap_no_rights, &fp); - if (error == 0) + if (error == 0) { fdclose(td, fp, fd); + fdrop(fp, td); + } } } clen -= datalen; From owner-svn-src-stable@freebsd.org Tue Feb 5 17:57:31 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54F7514C2B1A; Tue, 5 Feb 2019 17:57:31 +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) server-signature RSA-PSS (4096 bits) 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 E882D86754; Tue, 5 Feb 2019 17:57:30 +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 DBF7221600; Tue, 5 Feb 2019 17:57:30 +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 x15HvURX041066; Tue, 5 Feb 2019 17:57:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15HvUGH041065; Tue, 5 Feb 2019 17:57:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201902051757.x15HvUGH041065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 5 Feb 2019 17:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343786 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 343786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E882D86754 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:57:31 -0000 Author: markj Date: Tue Feb 5 17:57:30 2019 New Revision: 343786 URL: https://svnweb.freebsd.org/changeset/base/343786 Log: MFC r343784: Avoid leaking fp references when truncating SCM_RIGHTS control messages. Approved by: so Security: CVE-2019-5596 Modified: stable/11/sys/kern/uipc_syscalls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/uipc_syscalls.c ============================================================================== --- stable/11/sys/kern/uipc_syscalls.c Tue Feb 5 17:56:22 2019 (r343785) +++ stable/11/sys/kern/uipc_syscalls.c Tue Feb 5 17:57:30 2019 (r343786) @@ -1831,8 +1831,10 @@ m_dispose_extcontrolm(struct mbuf *m) fd = *fds++; error = fget(td, fd, cap_rights_init(&rights), &fp); - if (error == 0) + if (error == 0) { fdclose(td, fp, fd); + fdrop(fp, td); + } } } clen -= datalen; From owner-svn-src-stable@freebsd.org Tue Feb 5 22:08:50 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74B8614D209D; Tue, 5 Feb 2019 22:08:50 +0000 (UTC) (envelope-from gjb@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) server-signature RSA-PSS (4096 bits) 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 13F546CBBB; Tue, 5 Feb 2019 22:08:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 061612408E; Tue, 5 Feb 2019 22:08:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15M8nne074633; Tue, 5 Feb 2019 22:08:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15M8niI074632; Tue, 5 Feb 2019 22:08:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201902052208.x15M8niI074632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 5 Feb 2019 22:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343813 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/share/xml X-SVN-Commit-Revision: 343813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 13F546CBBB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 22:08:50 -0000 Author: gjb Date: Tue Feb 5 22:08:49 2019 New Revision: 343813 URL: https://svnweb.freebsd.org/changeset/base/343813 Log: Document SA-19:01 and SA-19:02. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Tue Feb 5 21:37:45 2019 (r343812) +++ stable/11/release/doc/share/xml/security.xml Tue Feb 5 22:08:49 2019 (r343813) @@ -77,6 +77,21 @@ 19 December 2018 Buffer overflow + + + FreeBSD-SA-19:01.syscall + 5 February 2019 + Kernel data register leak + + + + FreeBSD-SA-19:02.fd + 5 February 2019 + File description reference count + leak + From owner-svn-src-stable@freebsd.org Wed Feb 6 01:42:27 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5D6414D7CEC; Wed, 6 Feb 2019 01:42:27 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 69D1674E60; Wed, 6 Feb 2019 01:42:27 +0000 (UTC) (envelope-from avos@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 5DFC2265B1; Wed, 6 Feb 2019 01:42:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x161gRWa089852; Wed, 6 Feb 2019 01:42:27 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161gRQI089851; Wed, 6 Feb 2019 01:42:27 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060142.x161gRQI089851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:42:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343816 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 69D1674E60 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:42:28 -0000 Author: avos Date: Wed Feb 6 01:42:26 2019 New Revision: 343816 URL: https://svnweb.freebsd.org/changeset/base/343816 Log: MFC r343542: upgt(4): unbreak build with UPGT_DEBUG Modified: stable/10/sys/dev/usb/wlan/if_upgt.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/usb/wlan/if_upgt.c stable/12/sys/dev/usb/wlan/if_upgt.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_upgt.c Wed Feb 6 01:34:14 2019 (r343815) +++ stable/10/sys/dev/usb/wlan/if_upgt.c Wed Feb 6 01:42:26 2019 (r343816) @@ -1700,7 +1700,7 @@ upgt_fw_load(struct upgt_softc *sc) data_cmd->buflen = bsize; upgt_bulk_tx(sc, data_cmd); - DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%d, read=%d, sent=%d\n", + DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%zu, read=%d, sent=%d\n", offset, n, bsize); bsize = n; } @@ -1857,7 +1857,7 @@ upgt_fw_verify(struct upgt_softc *sc) } DPRINTF(sc, UPGT_DEBUG_FW, - "firmware Boot Record Area found at offset %d\n", offset); + "firmware Boot Record Area found at offset %zu\n", offset); /* * Parse Boot Record Area (BRA) options. From owner-svn-src-stable@freebsd.org Wed Feb 6 01:42:27 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EE2214D7CE6; Wed, 6 Feb 2019 01:42:27 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 1437A74E5F; Wed, 6 Feb 2019 01:42:27 +0000 (UTC) (envelope-from avos@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 09405265B0; Wed, 6 Feb 2019 01:42:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x161gQiL089846; Wed, 6 Feb 2019 01:42:26 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161gQ3x089845; Wed, 6 Feb 2019 01:42:26 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060142.x161gQ3x089845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:42:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343816 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1437A74E5F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:42:27 -0000 Author: avos Date: Wed Feb 6 01:42:26 2019 New Revision: 343816 URL: https://svnweb.freebsd.org/changeset/base/343816 Log: MFC r343542: upgt(4): unbreak build with UPGT_DEBUG Modified: stable/11/sys/dev/usb/wlan/if_upgt.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/usb/wlan/if_upgt.c stable/12/sys/dev/usb/wlan/if_upgt.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_upgt.c Wed Feb 6 01:34:14 2019 (r343815) +++ stable/11/sys/dev/usb/wlan/if_upgt.c Wed Feb 6 01:42:26 2019 (r343816) @@ -1613,7 +1613,7 @@ upgt_fw_load(struct upgt_softc *sc) data_cmd->buflen = bsize; upgt_bulk_tx(sc, data_cmd); - DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%d, read=%d, sent=%d\n", + DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%zu, read=%d, sent=%d\n", offset, n, bsize); bsize = n; } @@ -1770,7 +1770,7 @@ upgt_fw_verify(struct upgt_softc *sc) } DPRINTF(sc, UPGT_DEBUG_FW, - "firmware Boot Record Area found at offset %d\n", offset); + "firmware Boot Record Area found at offset %zu\n", offset); /* * Parse Boot Record Area (BRA) options. From owner-svn-src-stable@freebsd.org Wed Feb 6 01:42:28 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F01414D7CF5; Wed, 6 Feb 2019 01:42:28 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 034D074E68; Wed, 6 Feb 2019 01:42:28 +0000 (UTC) (envelope-from avos@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 B0195265B2; Wed, 6 Feb 2019 01:42:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x161gRw0089858; Wed, 6 Feb 2019 01:42:27 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161gR7p089857; Wed, 6 Feb 2019 01:42:27 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060142.x161gR7p089857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:42:27 +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: r343816 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 034D074E68 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:42:28 -0000 Author: avos Date: Wed Feb 6 01:42:26 2019 New Revision: 343816 URL: https://svnweb.freebsd.org/changeset/base/343816 Log: MFC r343542: upgt(4): unbreak build with UPGT_DEBUG Modified: stable/12/sys/dev/usb/wlan/if_upgt.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/usb/wlan/if_upgt.c stable/11/sys/dev/usb/wlan/if_upgt.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_upgt.c Wed Feb 6 01:34:14 2019 (r343815) +++ stable/12/sys/dev/usb/wlan/if_upgt.c Wed Feb 6 01:42:26 2019 (r343816) @@ -1615,7 +1615,7 @@ upgt_fw_load(struct upgt_softc *sc) data_cmd->buflen = bsize; upgt_bulk_tx(sc, data_cmd); - DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%d, read=%d, sent=%d\n", + DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%zu, read=%d, sent=%d\n", offset, n, bsize); bsize = n; } @@ -1772,7 +1772,7 @@ upgt_fw_verify(struct upgt_softc *sc) } DPRINTF(sc, UPGT_DEBUG_FW, - "firmware Boot Record Area found at offset %d\n", offset); + "firmware Boot Record Area found at offset %zu\n", offset); /* * Parse Boot Record Area (BRA) options. From owner-svn-src-stable@freebsd.org Wed Feb 6 01:47:23 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F02C914D8124; Wed, 6 Feb 2019 01:47:22 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 8E96F7546C; Wed, 6 Feb 2019 01:47:22 +0000 (UTC) (envelope-from avos@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 82BF1265BD; Wed, 6 Feb 2019 01:47:22 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x161lM5R090156; Wed, 6 Feb 2019 01:47:22 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161lMU9090155; Wed, 6 Feb 2019 01:47:22 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060147.x161lMU9090155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343817 - in stable: 11/sys/net80211 12/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sys/net80211 12/sys/net80211 X-SVN-Commit-Revision: 343817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E96F7546C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:47:23 -0000 Author: avos Date: Wed Feb 6 01:47:22 2019 New Revision: 343817 URL: https://svnweb.freebsd.org/changeset/base/343817 Log: MFC r343684: Drop unused M_80211_COM malloc(9) type. It is not used since r287197. Modified: stable/11/sys/net80211/ieee80211_freebsd.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/net80211/ieee80211_freebsd.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/net80211/ieee80211_freebsd.c ============================================================================== --- stable/11/sys/net80211/ieee80211_freebsd.c Wed Feb 6 01:42:26 2019 (r343816) +++ stable/11/sys/net80211/ieee80211_freebsd.c Wed Feb 6 01:47:22 2019 (r343817) @@ -66,8 +66,6 @@ SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, &ie 0, "debugging printfs"); #endif -static MALLOC_DEFINE(M_80211_COM, "80211com", "802.11 com state"); - static const char wlanname[] = "wlan"; static struct if_clone *wlan_cloner; From owner-svn-src-stable@freebsd.org Wed Feb 6 01:47:23 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F3B814D8128; Wed, 6 Feb 2019 01:47:23 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 E22007546F; Wed, 6 Feb 2019 01:47:22 +0000 (UTC) (envelope-from avos@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 D4665265BE; Wed, 6 Feb 2019 01:47:22 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x161lMs8090162; Wed, 6 Feb 2019 01:47:22 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161lMOc090161; Wed, 6 Feb 2019 01:47:22 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060147.x161lMOc090161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:47:22 +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: r343817 - in stable: 11/sys/net80211 12/sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sys/net80211 12/sys/net80211 X-SVN-Commit-Revision: 343817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E22007546F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:47:23 -0000 Author: avos Date: Wed Feb 6 01:47:22 2019 New Revision: 343817 URL: https://svnweb.freebsd.org/changeset/base/343817 Log: MFC r343684: Drop unused M_80211_COM malloc(9) type. It is not used since r287197. Modified: stable/12/sys/net80211/ieee80211_freebsd.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/net80211/ieee80211_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/net80211/ieee80211_freebsd.c ============================================================================== --- stable/12/sys/net80211/ieee80211_freebsd.c Wed Feb 6 01:42:26 2019 (r343816) +++ stable/12/sys/net80211/ieee80211_freebsd.c Wed Feb 6 01:47:22 2019 (r343817) @@ -68,8 +68,6 @@ SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, &ie 0, "debugging printfs"); #endif -static MALLOC_DEFINE(M_80211_COM, "80211com", "802.11 com state"); - static const char wlanname[] = "wlan"; static struct if_clone *wlan_cloner; From owner-svn-src-stable@freebsd.org Wed Feb 6 01:53:02 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D634414D8611; Wed, 6 Feb 2019 01:53:02 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 7983C75B44; Wed, 6 Feb 2019 01:53:02 +0000 (UTC) (envelope-from avos@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 6C2BA2678E; Wed, 6 Feb 2019 01:53:02 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x161r2ww094970; Wed, 6 Feb 2019 01:53:02 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161r2q9094969; Wed, 6 Feb 2019 01:53:02 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060153.x161r2q9094969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343818 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Commit-Revision: 343818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7983C75B44 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:53:03 -0000 Author: avos Date: Wed Feb 6 01:53:01 2019 New Revision: 343818 URL: https://svnweb.freebsd.org/changeset/base/343818 Log: MFC r343697: net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto' Do not try to clear 'basic rate' bit from roamRate; it cannot be here and, actually, this operation clears 'MCS rate' bit instead, breaking comparison for 11n / 11ac modes. Modified: stable/11/sys/net80211/ieee80211_scan_sta.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/net80211/ieee80211_scan_sta.c stable/12/sys/net80211/ieee80211_scan_sta.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- stable/11/sys/net80211/ieee80211_scan_sta.c Wed Feb 6 01:47:22 2019 (r343817) +++ stable/11/sys/net80211/ieee80211_scan_sta.c Wed Feb 6 01:53:01 2019 (r343818) @@ -1329,7 +1329,6 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct curRssi = ic->ic_node_getrssi(ni); if (ucastRate == IEEE80211_FIXED_RATE_NONE) { curRate = ni->ni_txrate; - roamRate &= IEEE80211_RATE_VAL; IEEE80211_DPRINTF(vap, IEEE80211_MSG_ROAM, "%s: currssi %d currate %u roamrssi %d roamrate %u\n", __func__, curRssi, curRate, roamRssi, roamRate); From owner-svn-src-stable@freebsd.org Wed Feb 6 01:53:03 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E7A314D8615; Wed, 6 Feb 2019 01:53:03 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 CAE0B75B45; Wed, 6 Feb 2019 01:53:02 +0000 (UTC) (envelope-from avos@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 BE1A12678F; Wed, 6 Feb 2019 01:53:02 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x161r2Oi094976; Wed, 6 Feb 2019 01:53:02 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161r2OA094975; Wed, 6 Feb 2019 01:53:02 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060153.x161r2OA094975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343818 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Commit-Revision: 343818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CAE0B75B45 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:53:03 -0000 Author: avos Date: Wed Feb 6 01:53:01 2019 New Revision: 343818 URL: https://svnweb.freebsd.org/changeset/base/343818 Log: MFC r343697: net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto' Do not try to clear 'basic rate' bit from roamRate; it cannot be here and, actually, this operation clears 'MCS rate' bit instead, breaking comparison for 11n / 11ac modes. Modified: stable/10/sys/net80211/ieee80211_scan_sta.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/net80211/ieee80211_scan_sta.c stable/12/sys/net80211/ieee80211_scan_sta.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- stable/10/sys/net80211/ieee80211_scan_sta.c Wed Feb 6 01:47:22 2019 (r343817) +++ stable/10/sys/net80211/ieee80211_scan_sta.c Wed Feb 6 01:53:01 2019 (r343818) @@ -1311,7 +1311,6 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct curRssi = ic->ic_node_getrssi(ni); if (ucastRate == IEEE80211_FIXED_RATE_NONE) { curRate = ni->ni_txrate; - roamRate &= IEEE80211_RATE_VAL; IEEE80211_DPRINTF(vap, IEEE80211_MSG_ROAM, "%s: currssi %d currate %u roamrssi %d roamrate %u\n", __func__, curRssi, curRate, roamRssi, roamRate); From owner-svn-src-stable@freebsd.org Wed Feb 6 01:53:03 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CE2914D8619; Wed, 6 Feb 2019 01:53:03 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 44BC575B4A; Wed, 6 Feb 2019 01:53:03 +0000 (UTC) (envelope-from avos@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 373FC26790; Wed, 6 Feb 2019 01:53:03 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x161r2TQ094983; Wed, 6 Feb 2019 01:53:03 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161r2hZ094982; Wed, 6 Feb 2019 01:53:02 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060153.x161r2hZ094982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:53: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: r343818 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Commit-Revision: 343818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 44BC575B4A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:53:03 -0000 Author: avos Date: Wed Feb 6 01:53:01 2019 New Revision: 343818 URL: https://svnweb.freebsd.org/changeset/base/343818 Log: MFC r343697: net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto' Do not try to clear 'basic rate' bit from roamRate; it cannot be here and, actually, this operation clears 'MCS rate' bit instead, breaking comparison for 11n / 11ac modes. Modified: stable/12/sys/net80211/ieee80211_scan_sta.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/net80211/ieee80211_scan_sta.c stable/11/sys/net80211/ieee80211_scan_sta.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- stable/12/sys/net80211/ieee80211_scan_sta.c Wed Feb 6 01:47:22 2019 (r343817) +++ stable/12/sys/net80211/ieee80211_scan_sta.c Wed Feb 6 01:53:01 2019 (r343818) @@ -1359,7 +1359,6 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct curRssi = ic->ic_node_getrssi(ni); if (ucastRate == IEEE80211_FIXED_RATE_NONE) { curRate = ni->ni_txrate; - roamRate &= IEEE80211_RATE_VAL; IEEE80211_DPRINTF(vap, IEEE80211_MSG_ROAM, "%s: currssi %d currate %u roamrssi %d roamrate %u\n", __func__, curRssi, curRate, roamRssi, roamRate); From owner-svn-src-stable@freebsd.org Wed Feb 6 02:06:01 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B158714D892D; Wed, 6 Feb 2019 02:06:01 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 47B9A762BC; Wed, 6 Feb 2019 02:06:01 +0000 (UTC) (envelope-from avos@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 3054926935; Wed, 6 Feb 2019 02:06:01 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x16261hj000549; Wed, 6 Feb 2019 02:06:01 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16260Om000545; Wed, 6 Feb 2019 02:06:00 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060206.x16260Om000545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343819 - in stable: 11/sys/compat/ndis 11/sys/dev/if_ndis 12/sys/compat/ndis 12/sys/dev/if_ndis X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sys/compat/ndis 11/sys/dev/if_ndis 12/sys/compat/ndis 12/sys/dev/if_ndis X-SVN-Commit-Revision: 343819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 47B9A762BC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:06:02 -0000 Author: avos Date: Wed Feb 6 02:06:00 2019 New Revision: 343819 URL: https://svnweb.freebsd.org/changeset/base/343819 Log: MFC r343574: Fix compilation with 'option NDISAPI + device ndis' and without 'device pccard' in the kernel config file. PR: 171532 Reported by: Robert Bonomi Modified: stable/11/sys/compat/ndis/ndis_var.h stable/11/sys/dev/if_ndis/if_ndis.c stable/11/sys/dev/if_ndis/if_ndis_pccard.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/compat/ndis/ndis_var.h stable/12/sys/dev/if_ndis/if_ndis.c stable/12/sys/dev/if_ndis/if_ndis_pccard.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/compat/ndis/ndis_var.h ============================================================================== --- stable/11/sys/compat/ndis/ndis_var.h Wed Feb 6 01:53:01 2019 (r343818) +++ stable/11/sys/compat/ndis/ndis_var.h Wed Feb 6 02:06:00 2019 (r343819) @@ -1734,8 +1734,6 @@ extern int ndis_get_supported_oids(void *, ndis_oid ** extern int ndis_send_packets(void *, ndis_packet **, int); extern int ndis_send_packet(void *, ndis_packet *); extern int ndis_convert_res(void *); -extern int ndis_alloc_amem(void *); -extern void ndis_free_amem(void *); extern void ndis_free_packet(ndis_packet *); extern void ndis_free_bufs(ndis_buffer *); extern int ndis_reset_nic(void *); Modified: stable/11/sys/dev/if_ndis/if_ndis.c ============================================================================== --- stable/11/sys/dev/if_ndis/if_ndis.c Wed Feb 6 01:53:01 2019 (r343818) +++ stable/11/sys/dev/if_ndis/if_ndis.c Wed Feb 6 02:06:00 2019 (r343819) @@ -566,15 +566,6 @@ ndis_attach(device_t dev) callout_init(&sc->ndis_stat_callout, 1); mbufq_init(&sc->ndis_rxqueue, INT_MAX); /* XXXGL: sane maximum */ - if (sc->ndis_iftype == PCMCIABus) { - error = ndis_alloc_amem(sc); - if (error) { - device_printf(dev, "failed to allocate " - "attribute memory\n"); - goto fail; - } - } - /* Create sysctl registry nodes */ ndis_create_sysctls(sc); @@ -1095,9 +1086,6 @@ ndis_detach(device_t dev) if (ifp != NULL) if_free(ifp); - - if (sc->ndis_iftype == PCMCIABus) - ndis_free_amem(sc); if (sc->ndis_sc) ndis_destroy_dma(sc); Modified: stable/11/sys/dev/if_ndis/if_ndis_pccard.c ============================================================================== --- stable/11/sys/dev/if_ndis/if_ndis_pccard.c Wed Feb 6 01:53:01 2019 (r343818) +++ stable/11/sys/dev/if_ndis/if_ndis_pccard.c Wed Feb 6 02:06:00 2019 (r343819) @@ -72,6 +72,7 @@ MODULE_DEPEND(ndis, pccard, 1, 1, 1); static int ndis_probe_pccard (device_t); static int ndis_attach_pccard (device_t); +static int ndis_detach_pccard (device_t); static struct resource_list *ndis_get_resource_list (device_t, device_t); static int ndis_devcompare (interface_type, @@ -89,7 +90,7 @@ static device_method_t ndis_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ndis_probe_pccard), DEVMETHOD(device_attach, ndis_attach_pccard), - DEVMETHOD(device_detach, ndis_detach), + DEVMETHOD(device_detach, ndis_detach_pccard), DEVMETHOD(device_shutdown, ndis_shutdown), DEVMETHOD(device_suspend, ndis_suspend), DEVMETHOD(device_resume, ndis_resume), @@ -173,6 +174,50 @@ ndis_probe_pccard(dev) return(ENXIO); } +#define NDIS_AM_RID 3 + +static int +ndis_alloc_amem(struct ndis_softc *sc) +{ + int error, rid; + + rid = NDIS_AM_RID; + sc->ndis_res_am = bus_alloc_resource_anywhere(sc->ndis_dev, + SYS_RES_MEMORY, &rid, 0x1000, RF_ACTIVE); + + if (sc->ndis_res_am == NULL) { + device_printf(sc->ndis_dev, + "failed to allocate attribute memory\n"); + return(ENXIO); + } + sc->ndis_rescnt++; + resource_list_add(&sc->ndis_rl, SYS_RES_MEMORY, rid, + rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am), + rman_get_size(sc->ndis_res_am)); + + error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev), + sc->ndis_dev, rid, 0, NULL); + + if (error) { + device_printf(sc->ndis_dev, + "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error); + return(error); + } + + error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev), + sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR); + + if (error) { + device_printf(sc->ndis_dev, + "CARD_SET_RES_FLAGS() returned 0x%x\n", error); + return(error); + } + + sc->ndis_am_rid = rid; + + return(0); +} + /* * Attach the interface. Allocate softc structures, do ifmedia * setup and ethernet/BPF attach. @@ -249,88 +294,40 @@ ndis_attach_pccard(dev) sc->ndis_devidx = devidx; + error = ndis_alloc_amem(sc); + if (error) { + device_printf(dev, "failed to allocate attribute memory\n"); + goto fail; + } + error = ndis_attach(dev); fail: return(error); } -static struct resource_list * -ndis_get_resource_list(dev, child) - device_t dev; - device_t child; +static int +ndis_detach_pccard(device_t dev) { - struct ndis_softc *sc; + struct ndis_softc *sc = device_get_softc(dev); - sc = device_get_softc(dev); - return (&sc->ndis_rl); -} + (void) ndis_detach(dev); -#define NDIS_AM_RID 3 + if (sc->ndis_res_am != NULL) + bus_release_resource(sc->ndis_dev, SYS_RES_MEMORY, + sc->ndis_am_rid, sc->ndis_res_am); + resource_list_free(&sc->ndis_rl); -int -ndis_alloc_amem(arg) - void *arg; -{ - struct ndis_softc *sc; - int error, rid; - - if (arg == NULL) - return(EINVAL); - - sc = arg; - rid = NDIS_AM_RID; - sc->ndis_res_am = bus_alloc_resource_anywhere(sc->ndis_dev, - SYS_RES_MEMORY, &rid, 0x1000, RF_ACTIVE); - - if (sc->ndis_res_am == NULL) { - device_printf(sc->ndis_dev, - "failed to allocate attribute memory\n"); - return(ENXIO); - } - sc->ndis_rescnt++; - resource_list_add(&sc->ndis_rl, SYS_RES_MEMORY, rid, - rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am), - rman_get_size(sc->ndis_res_am)); - - error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev), - sc->ndis_dev, rid, 0, NULL); - - if (error) { - device_printf(sc->ndis_dev, - "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error); - return(error); - } - - error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev), - sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR); - - if (error) { - device_printf(sc->ndis_dev, - "CARD_SET_RES_FLAGS() returned 0x%x\n", error); - return(error); - } - - sc->ndis_am_rid = rid; - - return(0); + return (0); } -void -ndis_free_amem(arg) - void *arg; +static struct resource_list * +ndis_get_resource_list(dev, child) + device_t dev; + device_t child; { struct ndis_softc *sc; - if (arg == NULL) - return; - - sc = arg; - - if (sc->ndis_res_am != NULL) - bus_release_resource(sc->ndis_dev, SYS_RES_MEMORY, - sc->ndis_am_rid, sc->ndis_res_am); - resource_list_free(&sc->ndis_rl); - - return; + sc = device_get_softc(dev); + return (&sc->ndis_rl); } From owner-svn-src-stable@freebsd.org Wed Feb 6 02:06:02 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B4F314D8933; Wed, 6 Feb 2019 02:06:02 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 2D85C762BD; Wed, 6 Feb 2019 02:06:02 +0000 (UTC) (envelope-from avos@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 15AC926936; Wed, 6 Feb 2019 02:06:02 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x16261ag000558; Wed, 6 Feb 2019 02:06:01 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16261Ii000555; Wed, 6 Feb 2019 02:06:01 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060206.x16261Ii000555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:06:01 +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: r343819 - in stable: 11/sys/compat/ndis 11/sys/dev/if_ndis 12/sys/compat/ndis 12/sys/dev/if_ndis X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sys/compat/ndis 11/sys/dev/if_ndis 12/sys/compat/ndis 12/sys/dev/if_ndis X-SVN-Commit-Revision: 343819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2D85C762BD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:06:02 -0000 Author: avos Date: Wed Feb 6 02:06:00 2019 New Revision: 343819 URL: https://svnweb.freebsd.org/changeset/base/343819 Log: MFC r343574: Fix compilation with 'option NDISAPI + device ndis' and without 'device pccard' in the kernel config file. PR: 171532 Reported by: Robert Bonomi Modified: stable/12/sys/compat/ndis/ndis_var.h stable/12/sys/dev/if_ndis/if_ndis.c stable/12/sys/dev/if_ndis/if_ndis_pccard.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/compat/ndis/ndis_var.h stable/11/sys/dev/if_ndis/if_ndis.c stable/11/sys/dev/if_ndis/if_ndis_pccard.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/compat/ndis/ndis_var.h ============================================================================== --- stable/12/sys/compat/ndis/ndis_var.h Wed Feb 6 01:53:01 2019 (r343818) +++ stable/12/sys/compat/ndis/ndis_var.h Wed Feb 6 02:06:00 2019 (r343819) @@ -1736,8 +1736,6 @@ extern int ndis_get_supported_oids(void *, ndis_oid ** extern int ndis_send_packets(void *, ndis_packet **, int); extern int ndis_send_packet(void *, ndis_packet *); extern int ndis_convert_res(void *); -extern int ndis_alloc_amem(void *); -extern void ndis_free_amem(void *); extern void ndis_free_packet(ndis_packet *); extern void ndis_free_bufs(ndis_buffer *); extern int ndis_reset_nic(void *); Modified: stable/12/sys/dev/if_ndis/if_ndis.c ============================================================================== --- stable/12/sys/dev/if_ndis/if_ndis.c Wed Feb 6 01:53:01 2019 (r343818) +++ stable/12/sys/dev/if_ndis/if_ndis.c Wed Feb 6 02:06:00 2019 (r343819) @@ -568,15 +568,6 @@ ndis_attach(device_t dev) callout_init(&sc->ndis_stat_callout, 1); mbufq_init(&sc->ndis_rxqueue, INT_MAX); /* XXXGL: sane maximum */ - if (sc->ndis_iftype == PCMCIABus) { - error = ndis_alloc_amem(sc); - if (error) { - device_printf(dev, "failed to allocate " - "attribute memory\n"); - goto fail; - } - } - /* Create sysctl registry nodes */ ndis_create_sysctls(sc); @@ -1097,9 +1088,6 @@ ndis_detach(device_t dev) if (ifp != NULL) if_free(ifp); - - if (sc->ndis_iftype == PCMCIABus) - ndis_free_amem(sc); if (sc->ndis_sc) ndis_destroy_dma(sc); Modified: stable/12/sys/dev/if_ndis/if_ndis_pccard.c ============================================================================== --- stable/12/sys/dev/if_ndis/if_ndis_pccard.c Wed Feb 6 01:53:01 2019 (r343818) +++ stable/12/sys/dev/if_ndis/if_ndis_pccard.c Wed Feb 6 02:06:00 2019 (r343819) @@ -74,6 +74,7 @@ MODULE_DEPEND(ndis, pccard, 1, 1, 1); static int ndis_probe_pccard (device_t); static int ndis_attach_pccard (device_t); +static int ndis_detach_pccard (device_t); static struct resource_list *ndis_get_resource_list (device_t, device_t); static int ndis_devcompare (interface_type, @@ -91,7 +92,7 @@ static device_method_t ndis_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ndis_probe_pccard), DEVMETHOD(device_attach, ndis_attach_pccard), - DEVMETHOD(device_detach, ndis_detach), + DEVMETHOD(device_detach, ndis_detach_pccard), DEVMETHOD(device_shutdown, ndis_shutdown), DEVMETHOD(device_suspend, ndis_suspend), DEVMETHOD(device_resume, ndis_resume), @@ -175,6 +176,50 @@ ndis_probe_pccard(dev) return(ENXIO); } +#define NDIS_AM_RID 3 + +static int +ndis_alloc_amem(struct ndis_softc *sc) +{ + int error, rid; + + rid = NDIS_AM_RID; + sc->ndis_res_am = bus_alloc_resource_anywhere(sc->ndis_dev, + SYS_RES_MEMORY, &rid, 0x1000, RF_ACTIVE); + + if (sc->ndis_res_am == NULL) { + device_printf(sc->ndis_dev, + "failed to allocate attribute memory\n"); + return(ENXIO); + } + sc->ndis_rescnt++; + resource_list_add(&sc->ndis_rl, SYS_RES_MEMORY, rid, + rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am), + rman_get_size(sc->ndis_res_am)); + + error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev), + sc->ndis_dev, rid, 0, NULL); + + if (error) { + device_printf(sc->ndis_dev, + "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error); + return(error); + } + + error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev), + sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR); + + if (error) { + device_printf(sc->ndis_dev, + "CARD_SET_RES_FLAGS() returned 0x%x\n", error); + return(error); + } + + sc->ndis_am_rid = rid; + + return(0); +} + /* * Attach the interface. Allocate softc structures, do ifmedia * setup and ethernet/BPF attach. @@ -251,88 +296,40 @@ ndis_attach_pccard(dev) sc->ndis_devidx = devidx; + error = ndis_alloc_amem(sc); + if (error) { + device_printf(dev, "failed to allocate attribute memory\n"); + goto fail; + } + error = ndis_attach(dev); fail: return(error); } -static struct resource_list * -ndis_get_resource_list(dev, child) - device_t dev; - device_t child; +static int +ndis_detach_pccard(device_t dev) { - struct ndis_softc *sc; + struct ndis_softc *sc = device_get_softc(dev); - sc = device_get_softc(dev); - return (&sc->ndis_rl); -} + (void) ndis_detach(dev); -#define NDIS_AM_RID 3 + if (sc->ndis_res_am != NULL) + bus_release_resource(sc->ndis_dev, SYS_RES_MEMORY, + sc->ndis_am_rid, sc->ndis_res_am); + resource_list_free(&sc->ndis_rl); -int -ndis_alloc_amem(arg) - void *arg; -{ - struct ndis_softc *sc; - int error, rid; - - if (arg == NULL) - return(EINVAL); - - sc = arg; - rid = NDIS_AM_RID; - sc->ndis_res_am = bus_alloc_resource_anywhere(sc->ndis_dev, - SYS_RES_MEMORY, &rid, 0x1000, RF_ACTIVE); - - if (sc->ndis_res_am == NULL) { - device_printf(sc->ndis_dev, - "failed to allocate attribute memory\n"); - return(ENXIO); - } - sc->ndis_rescnt++; - resource_list_add(&sc->ndis_rl, SYS_RES_MEMORY, rid, - rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am), - rman_get_size(sc->ndis_res_am)); - - error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev), - sc->ndis_dev, rid, 0, NULL); - - if (error) { - device_printf(sc->ndis_dev, - "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error); - return(error); - } - - error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev), - sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR); - - if (error) { - device_printf(sc->ndis_dev, - "CARD_SET_RES_FLAGS() returned 0x%x\n", error); - return(error); - } - - sc->ndis_am_rid = rid; - - return(0); + return (0); } -void -ndis_free_amem(arg) - void *arg; +static struct resource_list * +ndis_get_resource_list(dev, child) + device_t dev; + device_t child; { struct ndis_softc *sc; - if (arg == NULL) - return; - - sc = arg; - - if (sc->ndis_res_am != NULL) - bus_release_resource(sc->ndis_dev, SYS_RES_MEMORY, - sc->ndis_am_rid, sc->ndis_res_am); - resource_list_free(&sc->ndis_rl); - - return; + sc = device_get_softc(dev); + return (&sc->ndis_rl); } From owner-svn-src-stable@freebsd.org Wed Feb 6 02:07:38 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 581CE14D8A6F; Wed, 6 Feb 2019 02:07:38 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 EE549765C8; Wed, 6 Feb 2019 02:07:37 +0000 (UTC) (envelope-from avos@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 E14952693A; Wed, 6 Feb 2019 02:07:37 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1627bvV000679; Wed, 6 Feb 2019 02:07:37 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1627bcT000676; Wed, 6 Feb 2019 02:07:37 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060207.x1627bcT000676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:07:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343820 - in stable/10/sys: compat/ndis dev/if_ndis X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable/10/sys: compat/ndis dev/if_ndis X-SVN-Commit-Revision: 343820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EE549765C8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:07:38 -0000 Author: avos Date: Wed Feb 6 02:07:37 2019 New Revision: 343820 URL: https://svnweb.freebsd.org/changeset/base/343820 Log: MFC r343574: Fix compilation with 'option NDISAPI + device ndis' and without 'device pccard' in the kernel config file. PR: 171532 Reported by: Robert Bonomi Modified: stable/10/sys/compat/ndis/ndis_var.h stable/10/sys/dev/if_ndis/if_ndis.c stable/10/sys/dev/if_ndis/if_ndis_pccard.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/ndis/ndis_var.h ============================================================================== --- stable/10/sys/compat/ndis/ndis_var.h Wed Feb 6 02:06:00 2019 (r343819) +++ stable/10/sys/compat/ndis/ndis_var.h Wed Feb 6 02:07:37 2019 (r343820) @@ -1734,8 +1734,6 @@ extern int ndis_get_supported_oids(void *, ndis_oid ** extern int ndis_send_packets(void *, ndis_packet **, int); extern int ndis_send_packet(void *, ndis_packet *); extern int ndis_convert_res(void *); -extern int ndis_alloc_amem(void *); -extern void ndis_free_amem(void *); extern void ndis_free_packet(ndis_packet *); extern void ndis_free_bufs(ndis_buffer *); extern int ndis_reset_nic(void *); Modified: stable/10/sys/dev/if_ndis/if_ndis.c ============================================================================== --- stable/10/sys/dev/if_ndis/if_ndis.c Wed Feb 6 02:06:00 2019 (r343819) +++ stable/10/sys/dev/if_ndis/if_ndis.c Wed Feb 6 02:07:37 2019 (r343820) @@ -559,15 +559,6 @@ ndis_attach(dev) InitializeListHead(&sc->ndisusb_xferdonelist); callout_init(&sc->ndis_stat_callout, 1); - if (sc->ndis_iftype == PCMCIABus) { - error = ndis_alloc_amem(sc); - if (error) { - device_printf(dev, "failed to allocate " - "attribute memory\n"); - goto fail; - } - } - /* Create sysctl registry nodes */ ndis_create_sysctls(sc); @@ -1078,9 +1069,6 @@ ndis_detach(dev) if (ifp != NULL) if_free(ifp); - - if (sc->ndis_iftype == PCMCIABus) - ndis_free_amem(sc); if (sc->ndis_sc) ndis_destroy_dma(sc); Modified: stable/10/sys/dev/if_ndis/if_ndis_pccard.c ============================================================================== --- stable/10/sys/dev/if_ndis/if_ndis_pccard.c Wed Feb 6 02:06:00 2019 (r343819) +++ stable/10/sys/dev/if_ndis/if_ndis_pccard.c Wed Feb 6 02:07:37 2019 (r343820) @@ -70,6 +70,7 @@ MODULE_DEPEND(ndis, pccard, 1, 1, 1); static int ndis_probe_pccard (device_t); static int ndis_attach_pccard (device_t); +static int ndis_detach_pccard (device_t); static struct resource_list *ndis_get_resource_list (device_t, device_t); static int ndis_devcompare (interface_type, @@ -87,7 +88,7 @@ static device_method_t ndis_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ndis_probe_pccard), DEVMETHOD(device_attach, ndis_attach_pccard), - DEVMETHOD(device_detach, ndis_detach), + DEVMETHOD(device_detach, ndis_detach_pccard), DEVMETHOD(device_shutdown, ndis_shutdown), DEVMETHOD(device_suspend, ndis_suspend), DEVMETHOD(device_resume, ndis_resume), @@ -171,6 +172,50 @@ ndis_probe_pccard(dev) return(ENXIO); } +#define NDIS_AM_RID 3 + +static int +ndis_alloc_amem(struct ndis_softc *sc) +{ + int error, rid; + + rid = NDIS_AM_RID; + sc->ndis_res_am = bus_alloc_resource(sc->ndis_dev, SYS_RES_MEMORY, + &rid, 0UL, ~0UL, 0x1000, RF_ACTIVE); + + if (sc->ndis_res_am == NULL) { + device_printf(sc->ndis_dev, + "failed to allocate attribute memory\n"); + return(ENXIO); + } + sc->ndis_rescnt++; + resource_list_add(&sc->ndis_rl, SYS_RES_MEMORY, rid, + rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am), + rman_get_size(sc->ndis_res_am)); + + error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev), + sc->ndis_dev, rid, 0, NULL); + + if (error) { + device_printf(sc->ndis_dev, + "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error); + return(error); + } + + error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev), + sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR); + + if (error) { + device_printf(sc->ndis_dev, + "CARD_SET_RES_FLAGS() returned 0x%x\n", error); + return(error); + } + + sc->ndis_am_rid = rid; + + return(0); +} + /* * Attach the interface. Allocate softc structures, do ifmedia * setup and ethernet/BPF attach. @@ -247,88 +292,40 @@ ndis_attach_pccard(dev) sc->ndis_devidx = devidx; + error = ndis_alloc_amem(sc); + if (error) { + device_printf(dev, "failed to allocate attribute memory\n"); + goto fail; + } + error = ndis_attach(dev); fail: return(error); } -static struct resource_list * -ndis_get_resource_list(dev, child) - device_t dev; - device_t child; +static int +ndis_detach_pccard(device_t dev) { - struct ndis_softc *sc; + struct ndis_softc *sc = device_get_softc(dev); - sc = device_get_softc(dev); - return (&sc->ndis_rl); -} + (void) ndis_detach(dev); -#define NDIS_AM_RID 3 + if (sc->ndis_res_am != NULL) + bus_release_resource(sc->ndis_dev, SYS_RES_MEMORY, + sc->ndis_am_rid, sc->ndis_res_am); + resource_list_free(&sc->ndis_rl); -int -ndis_alloc_amem(arg) - void *arg; -{ - struct ndis_softc *sc; - int error, rid; - - if (arg == NULL) - return(EINVAL); - - sc = arg; - rid = NDIS_AM_RID; - sc->ndis_res_am = bus_alloc_resource(sc->ndis_dev, SYS_RES_MEMORY, - &rid, 0UL, ~0UL, 0x1000, RF_ACTIVE); - - if (sc->ndis_res_am == NULL) { - device_printf(sc->ndis_dev, - "failed to allocate attribute memory\n"); - return(ENXIO); - } - sc->ndis_rescnt++; - resource_list_add(&sc->ndis_rl, SYS_RES_MEMORY, rid, - rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am), - rman_get_size(sc->ndis_res_am)); - - error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev), - sc->ndis_dev, rid, 0, NULL); - - if (error) { - device_printf(sc->ndis_dev, - "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error); - return(error); - } - - error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev), - sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR); - - if (error) { - device_printf(sc->ndis_dev, - "CARD_SET_RES_FLAGS() returned 0x%x\n", error); - return(error); - } - - sc->ndis_am_rid = rid; - - return(0); + return (0); } -void -ndis_free_amem(arg) - void *arg; +static struct resource_list * +ndis_get_resource_list(dev, child) + device_t dev; + device_t child; { struct ndis_softc *sc; - if (arg == NULL) - return; - - sc = arg; - - if (sc->ndis_res_am != NULL) - bus_release_resource(sc->ndis_dev, SYS_RES_MEMORY, - sc->ndis_am_rid, sc->ndis_res_am); - resource_list_free(&sc->ndis_rl); - - return; + sc = device_get_softc(dev); + return (&sc->ndis_rl); } From owner-svn-src-stable@freebsd.org Wed Feb 6 02:18:13 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C5E214D959C; Wed, 6 Feb 2019 02:18:13 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 B5A6F7715C; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@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 A739526AEA; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x162ICSj005986; Wed, 6 Feb 2019 02:18:12 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x162ICVE005985; Wed, 6 Feb 2019 02:18:12 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060218.x162ICVE005985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:18: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: r343821 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B5A6F7715C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:18:13 -0000 Author: avos Date: Wed Feb 6 02:18:11 2019 New Revision: 343821 URL: https://svnweb.freebsd.org/changeset/base/343821 Log: MFC r343681: run(4): fix allocated memory type for ieee80211_node(4) PR: 177366 Modified: stable/12/sys/dev/usb/wlan/if_run.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/usb/wlan/if_run.c stable/11/sys/dev/usb/wlan/if_run.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_run.c Wed Feb 6 02:07:37 2019 (r343820) +++ stable/12/sys/dev/usb/wlan/if_run.c Wed Feb 6 02:18:11 2019 (r343821) @@ -2029,7 +2029,8 @@ run_read_eeprom(struct run_softc *sc) static struct ieee80211_node * run_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) { - return malloc(sizeof (struct run_node), M_DEVBUF, M_NOWAIT | M_ZERO); + return malloc(sizeof (struct run_node), M_80211_NODE, + M_NOWAIT | M_ZERO); } static int From owner-svn-src-stable@freebsd.org Wed Feb 6 02:18:12 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93FFE14D9594; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 110407715A; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@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 021B526AE8; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x162IBbB005974; Wed, 6 Feb 2019 02:18:11 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x162IBSd005973; Wed, 6 Feb 2019 02:18:11 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060218.x162IBSd005973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343821 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 110407715A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:18:12 -0000 Author: avos Date: Wed Feb 6 02:18:11 2019 New Revision: 343821 URL: https://svnweb.freebsd.org/changeset/base/343821 Log: MFC r343681: run(4): fix allocated memory type for ieee80211_node(4) PR: 177366 Modified: stable/11/sys/dev/usb/wlan/if_run.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/usb/wlan/if_run.c stable/12/sys/dev/usb/wlan/if_run.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_run.c Wed Feb 6 02:07:37 2019 (r343820) +++ stable/11/sys/dev/usb/wlan/if_run.c Wed Feb 6 02:18:11 2019 (r343821) @@ -1982,7 +1982,8 @@ run_read_eeprom(struct run_softc *sc) static struct ieee80211_node * run_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) { - return malloc(sizeof (struct run_node), M_DEVBUF, M_NOWAIT | M_ZERO); + return malloc(sizeof (struct run_node), M_80211_NODE, + M_NOWAIT | M_ZERO); } static int From owner-svn-src-stable@freebsd.org Wed Feb 6 02:18:13 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA37314D9598; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 8257F7715B; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@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 6BA9426AE9; Wed, 6 Feb 2019 02:18:12 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x162ICAr005980; Wed, 6 Feb 2019 02:18:12 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x162ICVi005979; Wed, 6 Feb 2019 02:18:12 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060218.x162ICVi005979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343821 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8257F7715B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:18:13 -0000 Author: avos Date: Wed Feb 6 02:18:11 2019 New Revision: 343821 URL: https://svnweb.freebsd.org/changeset/base/343821 Log: MFC r343681: run(4): fix allocated memory type for ieee80211_node(4) PR: 177366 Modified: stable/10/sys/dev/usb/wlan/if_run.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/usb/wlan/if_run.c stable/12/sys/dev/usb/wlan/if_run.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_run.c Wed Feb 6 02:07:37 2019 (r343820) +++ stable/10/sys/dev/usb/wlan/if_run.c Wed Feb 6 02:18:11 2019 (r343821) @@ -1987,7 +1987,8 @@ run_read_eeprom(struct run_softc *sc) static struct ieee80211_node * run_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) { - return malloc(sizeof (struct run_node), M_DEVBUF, M_NOWAIT | M_ZERO); + return malloc(sizeof (struct run_node), M_80211_NODE, + M_NOWAIT | M_ZERO); } static int From owner-svn-src-stable@freebsd.org Wed Feb 6 02:30:16 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E940314D996C; Wed, 6 Feb 2019 02:30:15 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 899A27785C; Wed, 6 Feb 2019 02:30:15 +0000 (UTC) (envelope-from avos@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 7D1D426CA9; Wed, 6 Feb 2019 02:30:15 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x162UFf1011301; Wed, 6 Feb 2019 02:30:15 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x162UFkA011300; Wed, 6 Feb 2019 02:30:15 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060230.x162UFkA011300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:30:15 +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: r343822 - stable/12/sys/dev/usb/wlan X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/12/sys/dev/usb/wlan X-SVN-Commit-Revision: 343822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 899A27785C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:30:16 -0000 Author: avos Date: Wed Feb 6 02:30:14 2019 New Revision: 343822 URL: https://svnweb.freebsd.org/changeset/base/343822 Log: MFC r343577: rsu(4): add support for ifconfig(8) 'maxretry' option Modified: stable/12/sys/dev/usb/wlan/if_rsu.c stable/12/sys/dev/usb/wlan/if_rsureg.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rsu.c Wed Feb 6 02:18:11 2019 (r343821) +++ stable/12/sys/dev/usb/wlan/if_rsu.c Wed Feb 6 02:30:14 2019 (r343822) @@ -2759,7 +2759,7 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; struct r92s_tx_desc *txd; - uint8_t rate, ridx, type, cipher; + uint8_t rate, ridx, type, cipher, qos; int prio = 0; uint8_t which; int hasqos; @@ -2808,12 +2808,14 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no prio = M_WME_GETAC(m0); which = rsu_wme_ac_xfer_map[prio]; hasqos = 1; + qos = ((const struct ieee80211_qosframe *)wh)->i_qos[0]; } else { /* Non-QoS TID */ /* XXX TODO: tid=0 for non-qos TID? */ which = rsu_wme_ac_xfer_map[WME_AC_BE]; hasqos = 0; prio = 0; + qos = 0; } qid = rsu_ac2qid[prio]; @@ -2871,6 +2873,12 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no txd->txdw2 |= htole32(R92S_TXDW2_BK); if (ismcast) txd->txdw2 |= htole32(R92S_TXDW2_BMCAST); + + if (!ismcast && (!qos || (qos & IEEE80211_QOS_ACKPOLICY) != + IEEE80211_QOS_ACKPOLICY_NOACK)) { + txd->txdw2 |= htole32(R92S_TXDW2_RTY_LMT_ENA); + txd->txdw2 |= htole32(SM(R92S_TXDW2_RTY_LMT, tp->maxretry)); + } /* Force mgmt / mcast / ucast rate if needed. */ if (rate != 0) { Modified: stable/12/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rsureg.h Wed Feb 6 02:18:11 2019 (r343821) +++ stable/12/sys/dev/usb/wlan/if_rsureg.h Wed Feb 6 02:30:14 2019 (r343822) @@ -688,6 +688,9 @@ struct r92s_tx_desc { #define R92S_TXDW1_HWPC 0x80000000 uint32_t txdw2; +#define R92S_TXDW2_RTY_LMT_M 0x0000003f +#define R92S_TXDW2_RTY_LMT_S 0 +#define R92S_TXDW2_RTY_LMT_ENA 0x00000040 #define R92S_TXDW2_BMCAST 0x00000080 #define R92S_TXDW2_AGGEN 0x20000000 #define R92S_TXDW2_BK 0x40000000 From owner-svn-src-stable@freebsd.org Wed Feb 6 02:35:57 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 561F714D9B47; Wed, 6 Feb 2019 02:35:57 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 E845577C55; Wed, 6 Feb 2019 02:35:56 +0000 (UTC) (envelope-from avos@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 D5ABA26E48; Wed, 6 Feb 2019 02:35:56 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x162ZuIA016111; Wed, 6 Feb 2019 02:35:56 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x162ZuV5016110; Wed, 6 Feb 2019 02:35:56 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060235.x162ZuV5016110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343823 - in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap X-SVN-Commit-Revision: 343823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E845577C55 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:35:57 -0000 Author: avos Date: Wed Feb 6 02:35:56 2019 New Revision: 343823 URL: https://svnweb.freebsd.org/changeset/base/343823 Log: MFC r343682: sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and drop unneeded cast. Modified: stable/11/sys/dev/wtap/if_wtap.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/wtap/if_wtap.c stable/12/sys/dev/wtap/if_wtap.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/sys/dev/wtap/if_wtap.c ============================================================================== --- stable/11/sys/dev/wtap/if_wtap.c Wed Feb 6 02:30:14 2019 (r343822) +++ stable/11/sys/dev/wtap/if_wtap.c Wed Feb 6 02:35:56 2019 (r343823) @@ -370,7 +370,7 @@ wtap_vap_delete(struct ieee80211vap *vap) destroy_dev(avp->av_dev); callout_stop(&avp->av_swba); ieee80211_vap_detach(vap); - free((struct wtap_vap*) vap, M_80211_VAP); + free(avp, M_80211_VAP); } static void @@ -599,6 +599,8 @@ wtap_node_alloc(struct ieee80211vap *vap, const uint8_ ni = malloc(sizeof(struct ieee80211_node), M_80211_NODE, M_NOWAIT|M_ZERO); + if (ni == NULL) + return (NULL); ni->ni_txrate = 130; return ni; From owner-svn-src-stable@freebsd.org Wed Feb 6 02:35:58 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16E6314D9B50; Wed, 6 Feb 2019 02:35:58 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 A7AE877C59; Wed, 6 Feb 2019 02:35:57 +0000 (UTC) (envelope-from avos@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 932DD26E4A; Wed, 6 Feb 2019 02:35:57 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x162ZvXq016123; Wed, 6 Feb 2019 02:35:57 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x162Zvs1016122; Wed, 6 Feb 2019 02:35:57 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060235.x162Zvs1016122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:35: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: r343823 - in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap X-SVN-Commit-Revision: 343823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A7AE877C59 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:35:58 -0000 Author: avos Date: Wed Feb 6 02:35:56 2019 New Revision: 343823 URL: https://svnweb.freebsd.org/changeset/base/343823 Log: MFC r343682: sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and drop unneeded cast. Modified: stable/12/sys/dev/wtap/if_wtap.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/wtap/if_wtap.c stable/11/sys/dev/wtap/if_wtap.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/sys/dev/wtap/if_wtap.c ============================================================================== --- stable/12/sys/dev/wtap/if_wtap.c Wed Feb 6 02:30:14 2019 (r343822) +++ stable/12/sys/dev/wtap/if_wtap.c Wed Feb 6 02:35:56 2019 (r343823) @@ -372,7 +372,7 @@ wtap_vap_delete(struct ieee80211vap *vap) destroy_dev(avp->av_dev); callout_stop(&avp->av_swba); ieee80211_vap_detach(vap); - free((struct wtap_vap*) vap, M_80211_VAP); + free(avp, M_80211_VAP); } static void @@ -601,6 +601,8 @@ wtap_node_alloc(struct ieee80211vap *vap, const uint8_ ni = malloc(sizeof(struct ieee80211_node), M_80211_NODE, M_NOWAIT|M_ZERO); + if (ni == NULL) + return (NULL); ni->ni_txrate = 130; return ni; From owner-svn-src-stable@freebsd.org Wed Feb 6 02:35:57 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E39914D9B4B; Wed, 6 Feb 2019 02:35:57 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 3BC2477C56; Wed, 6 Feb 2019 02:35:57 +0000 (UTC) (envelope-from avos@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 2D66226E49; Wed, 6 Feb 2019 02:35:57 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x162ZvV1016117; Wed, 6 Feb 2019 02:35:57 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x162ZvfM016116; Wed, 6 Feb 2019 02:35:57 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060235.x162ZvfM016116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 02:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343823 - in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap X-SVN-Commit-Revision: 343823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3BC2477C56 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 02:35:57 -0000 Author: avos Date: Wed Feb 6 02:35:56 2019 New Revision: 343823 URL: https://svnweb.freebsd.org/changeset/base/343823 Log: MFC r343682: sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and drop unneeded cast. Modified: stable/10/sys/dev/wtap/if_wtap.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/wtap/if_wtap.c stable/12/sys/dev/wtap/if_wtap.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/wtap/if_wtap.c ============================================================================== --- stable/10/sys/dev/wtap/if_wtap.c Wed Feb 6 02:30:14 2019 (r343822) +++ stable/10/sys/dev/wtap/if_wtap.c Wed Feb 6 02:35:56 2019 (r343823) @@ -371,7 +371,7 @@ wtap_vap_delete(struct ieee80211vap *vap) destroy_dev(avp->av_dev); callout_stop(&avp->av_swba); ieee80211_vap_detach(vap); - free((struct wtap_vap*) vap, M_80211_VAP); + free(avp, M_80211_VAP); } /* NB: This function is not used. @@ -744,6 +744,8 @@ wtap_node_alloc(struct ieee80211vap *vap, const uint8_ ni = malloc(sizeof(struct ieee80211_node), M_80211_NODE, M_NOWAIT|M_ZERO); + if (ni == NULL) + return (NULL); ni->ni_txrate = 130; return ni; From owner-svn-src-stable@freebsd.org Wed Feb 6 09:21:45 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC04314C8B4C; Wed, 6 Feb 2019 09:21:45 +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) server-signature RSA-PSS (4096 bits) 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 6E01C8C4AA; Wed, 6 Feb 2019 09:21:45 +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 602BC34FE; Wed, 6 Feb 2019 09:21:45 +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 x169Lj5V027170; Wed, 6 Feb 2019 09:21:45 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x169LimN027167; Wed, 6 Feb 2019 09:21:44 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902060921.x169LimN027167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 6 Feb 2019 09:21:44 +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: r343829 - stable/12/sys/dev/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/dev/netmap X-SVN-Commit-Revision: 343829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E01C8C4AA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 09:21:46 -0000 Author: vmaffione Date: Wed Feb 6 09:21:44 2019 New Revision: 343829 URL: https://svnweb.freebsd.org/changeset/base/343829 Log: MFC r343344 netmap: fix knote() argument to match the mutex state The nm_os_selwakeup function needs to call knote() to wake up kqueue(9) users. However, this function can be called from different code paths, with different lock requirements. This patch fixes the knote() call argument to match the relavant lock state. Also, comments have been updated to reflect current code. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219846 Reported by: Aleksandr Fedorov Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18876 Modified: stable/12/sys/dev/netmap/netmap.c stable/12/sys/dev/netmap/netmap_freebsd.c stable/12/sys/dev/netmap/netmap_kern.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/netmap.c ============================================================================== --- stable/12/sys/dev/netmap/netmap.c Wed Feb 6 06:03:44 2019 (r343828) +++ stable/12/sys/dev/netmap/netmap.c Wed Feb 6 09:21:44 2019 (r343829) @@ -2531,7 +2531,6 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c } nifp = priv->np_nifp; - priv->np_td = td; /* for debugging purposes */ /* return the offset of the netmap_if object */ req->nr_rx_rings = na->num_rx_rings; @@ -3207,8 +3206,8 @@ nmreq_checkoptions(struct nmreq_header *hdr) * * Can be called for one or more queues. * Return true the event mask corresponding to ready events. - * If there are no ready events, do a selrecord on either individual - * selinfo or on the global one. + * If there are no ready events (and 'sr' is not NULL), do a + * selrecord on either individual selinfo or on the global one. * Device-dependent parts (locking and sync of tx/rx rings) * are done through callbacks. * Modified: stable/12/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- stable/12/sys/dev/netmap/netmap_freebsd.c Wed Feb 6 06:03:44 2019 (r343828) +++ stable/12/sys/dev/netmap/netmap_freebsd.c Wed Feb 6 09:21:44 2019 (r343829) @@ -85,7 +85,7 @@ void nm_os_selinfo_uninit(NM_SELINFO_T *si) { /* XXX kqueue(9) needed; these will mirror knlist_init. */ - knlist_delete(&si->si.si_note, curthread, 0 /* not locked */ ); + knlist_delete(&si->si.si_note, curthread, /*islocked=*/0); knlist_destroy(&si->si.si_note); /* now we don't need the mutex anymore */ mtx_destroy(&si->m); @@ -1294,21 +1294,21 @@ nm_os_kctx_destroy(struct nm_kctx *nmk) /******************** kqueue support ****************/ /* - * nm_os_selwakeup also needs to issue a KNOTE_UNLOCKED. - * We use a non-zero argument to distinguish the call from the one - * in kevent_scan() which instead also needs to run netmap_poll(). - * The knote uses a global mutex for the time being. We might - * try to reuse the one in the si, but it is not allocated - * permanently so it might be a bit tricky. + * In addition to calling selwakeuppri(), nm_os_selwakeup() also + * needs to call KNOTE to wake up kqueue listeners. + * We use a non-zero 'hint' argument to inform the netmap_knrw() + * function that it is being called from 'nm_os_selwakeup'; this + * is necessary because when netmap_knrw() is called by the kevent + * subsystem (i.e. kevent_scan()) we also need to call netmap_poll(). + * The knote uses a private mutex associated to the 'si' (see struct + * selinfo, struct nm_selinfo, and nm_os_selinfo_init). * - * The *kqfilter function registers one or another f_event - * depending on read or write mode. - * In the call to f_event() td_fpop is NULL so any child function - * calling devfs_get_cdevpriv() would fail - and we need it in - * netmap_poll(). As a workaround we store priv into kn->kn_hook - * and pass it as first argument to netmap_poll(), which then - * uses the failure to tell that we are called from f_event() - * and do not need the selrecord(). + * The netmap_kqfilter() function registers one or another f_event + * depending on read or write mode. A pointer to the struct + * 'netmap_priv_d' is stored into kn->kn_hook, so that it can later + * be passed to netmap_poll(). We pass NULL as a third argument to + * netmap_poll(), so that the latter only runs the txsync/rxsync + * (if necessary), and skips the nm_os_selrecord() calls. */ @@ -1316,12 +1316,13 @@ void nm_os_selwakeup(struct nm_selinfo *si) { if (netmap_verbose) - D("on knote %p", &si->si.si_note); + nm_prinf("on knote %p", &si->si.si_note); selwakeuppri(&si->si, PI_NET); - /* use a non-zero hint to tell the notification from the - * call done in kqueue_scan() which uses 0 + /* We use a non-zero hint to distinguish this notification call + * from the call done in kqueue_scan(), which uses hint=0. */ - KNOTE_UNLOCKED(&si->si.si_note, 0x100 /* notification */); + KNOTE(&si->si.si_note, /*hint=*/0x100, + mtx_owned(&si->m) ? KNF_LISTLOCKED : 0); } void @@ -1337,7 +1338,7 @@ netmap_knrdetach(struct knote *kn) struct selinfo *si = &priv->np_si[NR_RX]->si; D("remove selinfo %p", si); - knlist_remove(&si->si_note, kn, 0); + knlist_remove(&si->si_note, kn, /*islocked=*/0); } static void @@ -1347,14 +1348,15 @@ netmap_knwdetach(struct knote *kn) struct selinfo *si = &priv->np_si[NR_TX]->si; D("remove selinfo %p", si); - knlist_remove(&si->si_note, kn, 0); + knlist_remove(&si->si_note, kn, /*islocked=*/0); } /* - * callback from notifies (generated externally) and our - * calls to kevent(). The former we just return 1 (ready) - * since we do not know better. - * In the latter we call netmap_poll and return 0/1 accordingly. + * Callback triggered by netmap notifications (see netmap_notify()), + * and by the application calling kevent(). In the former case we + * just return 1 (events ready), since we are not able to do better. + * In the latter case we use netmap_poll() to see which events are + * ready. */ static int netmap_knrw(struct knote *kn, long hint, int events) @@ -1363,21 +1365,17 @@ netmap_knrw(struct knote *kn, long hint, int events) int revents; if (hint != 0) { - ND(5, "call from notify"); - return 1; /* assume we are ready */ - } - priv = kn->kn_hook; - /* the notification may come from an external thread, - * in which case we do not want to run the netmap_poll - * This should be filtered above, but check just in case. - */ - if (curthread != priv->np_td) { /* should not happen */ - RD(5, "curthread changed %p %p", curthread, priv->np_td); + /* Called from netmap_notify(), typically from a + * thread different from the one issuing kevent(). + * Assume we are ready. */ return 1; - } else { - revents = netmap_poll(priv, events, NULL); - return (events & revents) ? 1 : 0; } + + /* Called from kevent(). */ + priv = kn->kn_hook; + revents = netmap_poll(priv, events, /*thread=*/NULL); + + return (events & revents) ? 1 : 0; } static int @@ -1408,7 +1406,7 @@ static struct filterops netmap_wfiltops = { /* * This is called when a thread invokes kevent() to record * a change in the configuration of the kqueue(). - * The 'priv' should be the same as in the netmap device. + * The 'priv' is the one associated to the open netmap device. */ static int netmap_kqfilter(struct cdev *dev, struct knote *kn) @@ -1435,16 +1433,11 @@ netmap_kqfilter(struct cdev *dev, struct knote *kn) } /* the si is indicated in the priv */ si = priv->np_si[(ev == EVFILT_WRITE) ? NR_TX : NR_RX]; - // XXX lock(priv) ? kn->kn_fop = (ev == EVFILT_WRITE) ? &netmap_wfiltops : &netmap_rfiltops; kn->kn_hook = priv; - knlist_add(&si->si.si_note, kn, 0); - // XXX unlock(priv) - ND("register %p %s td %p priv %p kn %p np_nifp %p kn_fp/fpop %s", - na, na->ifp->if_xname, curthread, priv, kn, - priv->np_nifp, - kn->kn_fp == curthread->td_fpop ? "match" : "MISMATCH"); + knlist_add(&si->si.si_note, kn, /*islocked=*/0); + return 0; } Modified: stable/12/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/12/sys/dev/netmap/netmap_kern.h Wed Feb 6 06:03:44 2019 (r343828) +++ stable/12/sys/dev/netmap/netmap_kern.h Wed Feb 6 09:21:44 2019 (r343829) @@ -1946,7 +1946,6 @@ struct netmap_priv_d { * (N entries). */ struct nm_csb_ktoa *np_csb_ktoa_base; - struct thread *np_td; /* kqueue, just debugging */ #ifdef linux struct file *np_filp; /* used by sync kloop */ #endif /* linux */ From owner-svn-src-stable@freebsd.org Wed Feb 6 09:23:41 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4398D14C8BDA; Wed, 6 Feb 2019 09:23:41 +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) server-signature RSA-PSS (4096 bits) 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 AEB3C8C7A4; Wed, 6 Feb 2019 09:23:40 +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 9B70F36D8; Wed, 6 Feb 2019 09:23:40 +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 x169NeYp030304; Wed, 6 Feb 2019 09:23:40 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x169NdwL030300; Wed, 6 Feb 2019 09:23:39 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902060923.x169NdwL030300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 6 Feb 2019 09:23:39 +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: r343830 - in stable/12/sys: dev/netmap net X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/12/sys: dev/netmap net X-SVN-Commit-Revision: 343830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AEB3C8C7A4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 09:23:41 -0000 Author: vmaffione Date: Wed Feb 6 09:23:39 2019 New Revision: 343830 URL: https://svnweb.freebsd.org/changeset/base/343830 Log: MFC r343346 netmap: improvements to the netmap kloop (CSB mode) Changelist: - Add the proper memory barriers in the kloop ring processing functions. - Fix memory barriers usage in the user helpers (nm_sync_kloop_appl_write, nm_sync_kloop_appl_read). - Fix nm_kr_txempty() helper to look at rhead rather than rcur. This is important since the kloop can read a value of rcur which is ahead of the value of rhead (see explanation in nm_sync_kloop_appl_write) - Remove obsolete ptnetmap_guest_write_kring_csb() and ptnet_guest_read_kring_csb(), and update if_ptnet(4) to use those. - Prepare in advance the arguments for netmap_sync_kloop_[tr]x_ring(), to make the kloop faster. - Provide kernel and user implementation for nm_ldld_barrier() and nm_ldst_barrier() Modified: stable/12/sys/dev/netmap/if_ptnet.c stable/12/sys/dev/netmap/netmap_kern.h stable/12/sys/dev/netmap/netmap_kloop.c stable/12/sys/net/netmap.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/if_ptnet.c ============================================================================== --- stable/12/sys/dev/netmap/if_ptnet.c Wed Feb 6 09:21:44 2019 (r343829) +++ stable/12/sys/dev/netmap/if_ptnet.c Wed Feb 6 09:23:39 2019 (r343830) @@ -1688,7 +1688,7 @@ ptnet_ring_update(struct ptnet_queue *pq, struct netma /* Mimic nm_txsync_prologue/nm_rxsync_prologue. */ kring->rcur = kring->rhead = head; - ptnetmap_guest_write_kring_csb(atok, kring->rcur, kring->rhead); + nm_sync_kloop_appl_write(atok, kring->rcur, kring->rhead); /* Kick the host if needed. */ if (NM_ACCESS_ONCE(ktoa->kern_need_kick)) { @@ -1764,7 +1764,12 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns * the host. */ atok->appl_need_kick = 1; - /* Double-check. */ + /* Double check. We need a full barrier to + * prevent the store to atok->appl_need_kick + * to be reordered with the load from + * ktoa->hwcur and ktoa->hwtail (store-load + * barrier). */ + nm_stld_barrier(); ptnet_sync_tail(ktoa, kring); if (likely(PTNET_TX_NOSPACE(head, kring, minspace))) { @@ -2046,7 +2051,12 @@ host_sync: * last interrupt. */ atok->appl_need_kick = 1; - /* Double-check. */ + /* Double check for more completed RX slots. + * We need a full barrier to prevent the store + * to atok->appl_need_kick to be reordered with + * the load from ktoa->hwcur and ktoa->hwtail + * (store-load barrier). */ + nm_stld_barrier(); ptnet_sync_tail(ktoa, kring); if (likely(head == ring->tail)) { break; Modified: stable/12/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/12/sys/dev/netmap/netmap_kern.h Wed Feb 6 09:21:44 2019 (r343829) +++ stable/12/sys/dev/netmap/netmap_kern.h Wed Feb 6 09:23:39 2019 (r343830) @@ -1159,7 +1159,7 @@ nm_kr_rxspace(struct netmap_kring *k) static inline int nm_kr_txempty(struct netmap_kring *kring) { - return kring->rcur == kring->nr_hwtail; + return kring->rhead == kring->nr_hwtail; } /* True if no more completed slots in the rx ring, only valid after @@ -2245,61 +2245,14 @@ int ptnet_nm_krings_create(struct netmap_adapter *na); void ptnet_nm_krings_delete(struct netmap_adapter *na); void ptnet_nm_dtor(struct netmap_adapter *na); -/* Guest driver: Write kring pointers (cur, head) to the CSB. - * This routine is coupled with ptnetmap_host_read_kring_csb(). */ +/* Helper function wrapping nm_sync_kloop_appl_read(). */ static inline void -ptnetmap_guest_write_kring_csb(struct nm_csb_atok *atok, uint32_t cur, - uint32_t head) -{ - /* - * We need to write cur and head to the CSB but we cannot do it atomically. - * There is no way we can prevent the host from reading the updated value - * of one of the two and the old value of the other. However, if we make - * sure that the host never reads a value of head more recent than the - * value of cur we are safe. We can allow the host to read a value of cur - * more recent than the value of head, since in the netmap ring cur can be - * ahead of head and cur cannot wrap around head because it must be behind - * tail. Inverting the order of writes below could instead result into the - * host to think head went ahead of cur, which would cause the sync - * prologue to fail. - * - * The following memory barrier scheme is used to make this happen: - * - * Guest Host - * - * STORE(cur) LOAD(head) - * mb() <-----------> mb() - * STORE(head) LOAD(cur) - */ - atok->cur = cur; - nm_stst_barrier(); - atok->head = head; -} - -/* Guest driver: Read kring pointers (hwcur, hwtail) from the CSB. - * This routine is coupled with ptnetmap_host_write_kring_csb(). */ -static inline void -ptnetmap_guest_read_kring_csb(struct nm_csb_ktoa *ktoa, - struct netmap_kring *kring) -{ - /* - * We place a memory barrier to make sure that the update of hwtail never - * overtakes the update of hwcur. - * (see explanation in ptnetmap_host_write_kring_csb). - */ - kring->nr_hwtail = ktoa->hwtail; - nm_stst_barrier(); - kring->nr_hwcur = ktoa->hwcur; -} - -/* Helper function wrapping ptnetmap_guest_read_kring_csb(). */ -static inline void ptnet_sync_tail(struct nm_csb_ktoa *ktoa, struct netmap_kring *kring) { struct netmap_ring *ring = kring->ring; /* Update hwcur and hwtail as known by the host. */ - ptnetmap_guest_read_kring_csb(ktoa, kring); + nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, &kring->nr_hwcur); /* nm_sync_finalize */ ring->tail = kring->rtail = kring->nr_hwtail; Modified: stable/12/sys/dev/netmap/netmap_kloop.c ============================================================================== --- stable/12/sys/dev/netmap/netmap_kloop.c Wed Feb 6 09:21:44 2019 (r343829) +++ stable/12/sys/dev/netmap/netmap_kloop.c Wed Feb 6 09:23:39 2019 (r343830) @@ -66,8 +66,12 @@ static inline void sync_kloop_kernel_write(struct nm_csb_ktoa __user *ptr, uint32_t hwcur, uint32_t hwtail) { + /* Issue a first store-store barrier to make sure writes to the + * netmap ring do not overcome updates on ktoa->hwcur and ktoa->hwtail. */ + nm_stst_barrier(); + /* - * The same scheme used in ptnetmap_guest_write_kring_csb() applies here. + * The same scheme used in nm_sync_kloop_appl_write() applies here. * We allow the application to read a value of hwcur more recent than the value * of hwtail, since this would anyway result in a consistent view of the * ring state (and hwcur can never wraparound hwtail, since hwcur must be @@ -75,11 +79,11 @@ sync_kloop_kernel_write(struct nm_csb_ktoa __user *ptr * * The following memory barrier scheme is used to make this happen: * - * Application Kernel + * Application Kernel * - * STORE(hwcur) LOAD(hwtail) - * mb() <-------------> mb() - * STORE(hwtail) LOAD(hwcur) + * STORE(hwcur) LOAD(hwtail) + * wmb() <-------------> rmb() + * STORE(hwtail) LOAD(hwcur) */ CSB_WRITE(ptr, hwcur, hwcur); nm_stst_barrier(); @@ -96,12 +100,16 @@ sync_kloop_kernel_read(struct nm_csb_atok __user *ptr, /* * We place a memory barrier to make sure that the update of head never * overtakes the update of cur. - * (see explanation in ptnetmap_guest_write_kring_csb). + * (see explanation in sync_kloop_kernel_write). */ CSB_READ(ptr, head, shadow_ring->head); - nm_stst_barrier(); + nm_ldld_barrier(); CSB_READ(ptr, cur, shadow_ring->cur); CSB_READ(ptr, sync_flags, shadow_ring->flags); + + /* Make sure that loads from atok->head and atok->cur are not delayed + * after the loads from the netmap ring. */ + nm_ldld_barrier(); } /* Enable or disable application --> kernel kicks. */ @@ -127,10 +135,10 @@ csb_atok_intr_enabled(struct nm_csb_atok __user *csb_a static inline void sync_kloop_kring_dump(const char *title, const struct netmap_kring *kring) { - nm_prinf("%s - name: %s hwcur: %d hwtail: %d " - "rhead: %d rcur: %d rtail: %d", - title, kring->name, kring->nr_hwcur, kring->nr_hwtail, - kring->rhead, kring->rcur, kring->rtail); + nm_prinf("%s, kring %s, hwcur %d, rhead %d, " + "rcur %d, rtail %d, hwtail %d", + title, kring->name, kring->nr_hwcur, kring->rhead, + kring->rcur, kring->rtail, kring->nr_hwtail); } struct sync_kloop_ring_args { @@ -240,7 +248,8 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring */ /* Reenable notifications. */ csb_ktoa_kick_enable(csb_ktoa, 1); - /* Doublecheck. */ + /* Double check, with store-load memory barrier. */ + nm_stld_barrier(); sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); if (shadow_ring.head != kring->rhead) { /* We won the race condition, there are more packets to @@ -358,7 +367,8 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring */ /* Reenable notifications. */ csb_ktoa_kick_enable(csb_ktoa, 1); - /* Doublecheck. */ + /* Double check, with store-load memory barrier. */ + nm_stld_barrier(); sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); if (!sync_kloop_norxslots(kring, shadow_ring.head)) { /* We won the race condition, more slots are available. Disable @@ -439,6 +449,7 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n struct sync_kloop_poll_ctx *poll_ctx = NULL; #endif /* SYNC_KLOOP_POLL */ int num_rx_rings, num_tx_rings, num_rings; + struct sync_kloop_ring_args *args = NULL; uint32_t sleep_us = req->sleep_us; struct nm_csb_atok* csb_atok_base; struct nm_csb_ktoa* csb_ktoa_base; @@ -488,6 +499,12 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n num_tx_rings = priv->np_qlast[NR_TX] - priv->np_qfirst[NR_TX]; num_rings = num_tx_rings + num_rx_rings; + args = nm_os_malloc(num_rings * sizeof(args[0])); + if (!args) { + err = ENOMEM; + goto out; + } + /* Validate notification options. */ opt = nmreq_findoption((struct nmreq_option *)(uintptr_t)hdr->nr_options, NETMAP_REQ_OPT_SYNC_KLOOP_EVENTFDS); @@ -558,8 +575,8 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n si[NR_TX] = nm_si_user(priv, NR_TX) ? &na->si[NR_TX] : &na->tx_rings[priv->np_qfirst[NR_TX]]->si; NMG_UNLOCK(); - poll_wait(priv->np_filp, si[NR_RX], &poll_ctx->wait_table); poll_wait(priv->np_filp, si[NR_TX], &poll_ctx->wait_table); + poll_wait(priv->np_filp, si[NR_RX], &poll_ctx->wait_table); } #else /* SYNC_KLOOP_POLL */ opt->nro_status = EOPNOTSUPP; @@ -567,6 +584,31 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n #endif /* SYNC_KLOOP_POLL */ } + /* Prepare the arguments for netmap_sync_kloop_tx_ring() + * and netmap_sync_kloop_rx_ring(). */ + for (i = 0; i < num_tx_rings; i++) { + struct sync_kloop_ring_args *a = args + i; + + a->kring = NMR(na, NR_TX)[i + priv->np_qfirst[NR_TX]]; + a->csb_atok = csb_atok_base + i; + a->csb_ktoa = csb_ktoa_base + i; +#ifdef SYNC_KLOOP_POLL + if (poll_ctx) + a->irq_ctx = poll_ctx->entries[i].irq_ctx; +#endif /* SYNC_KLOOP_POLL */ + } + for (i = 0; i < num_rx_rings; i++) { + struct sync_kloop_ring_args *a = args + num_tx_rings + i; + + a->kring = NMR(na, NR_RX)[i + priv->np_qfirst[NR_RX]]; + a->csb_atok = csb_atok_base + num_tx_rings + i; + a->csb_ktoa = csb_ktoa_base + num_tx_rings + i; +#ifdef SYNC_KLOOP_POLL + if (poll_ctx) + a->irq_ctx = poll_ctx->entries[num_tx_rings + i].irq_ctx; +#endif /* SYNC_KLOOP_POLL */ + } + /* Main loop. */ for (;;) { if (unlikely(NM_ACCESS_ONCE(priv->np_kloop_state) & NM_SYNC_KLOOP_STOPPING)) { @@ -574,47 +616,40 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n } #ifdef SYNC_KLOOP_POLL - if (poll_ctx) - __set_current_state(TASK_INTERRUPTIBLE); + if (poll_ctx) { + /* It is important to set the task state as + * interruptible before processing any TX/RX ring, + * so that if a notification on ring Y comes after + * we have processed ring Y, but before we call + * schedule(), we don't miss it. This is true because + * the wake up function will change the the task state, + * and therefore the schedule_timeout() call below + * will observe the change). + */ + set_current_state(TASK_INTERRUPTIBLE); + } #endif /* SYNC_KLOOP_POLL */ /* Process all the TX rings bound to this file descriptor. */ for (i = 0; i < num_tx_rings; i++) { - struct sync_kloop_ring_args a = { - .kring = NMR(na, NR_TX)[i + priv->np_qfirst[NR_TX]], - .csb_atok = csb_atok_base + i, - .csb_ktoa = csb_ktoa_base + i, - }; + struct sync_kloop_ring_args *a = args + i; -#ifdef SYNC_KLOOP_POLL - if (poll_ctx) - a.irq_ctx = poll_ctx->entries[i].irq_ctx; -#endif /* SYNC_KLOOP_POLL */ - if (unlikely(nm_kr_tryget(a.kring, 1, NULL))) { + if (unlikely(nm_kr_tryget(a->kring, 1, NULL))) { continue; } - netmap_sync_kloop_tx_ring(&a); - nm_kr_put(a.kring); + netmap_sync_kloop_tx_ring(a); + nm_kr_put(a->kring); } /* Process all the RX rings bound to this file descriptor. */ for (i = 0; i < num_rx_rings; i++) { - struct sync_kloop_ring_args a = { - .kring = NMR(na, NR_RX)[i + priv->np_qfirst[NR_RX]], - .csb_atok = csb_atok_base + num_tx_rings + i, - .csb_ktoa = csb_ktoa_base + num_tx_rings + i, - }; + struct sync_kloop_ring_args *a = args + num_tx_rings + i; -#ifdef SYNC_KLOOP_POLL - if (poll_ctx) - a.irq_ctx = poll_ctx->entries[num_tx_rings + i].irq_ctx; -#endif /* SYNC_KLOOP_POLL */ - - if (unlikely(nm_kr_tryget(a.kring, 1, NULL))) { + if (unlikely(nm_kr_tryget(a->kring, 1, NULL))) { continue; } - netmap_sync_kloop_rx_ring(&a); - nm_kr_put(a.kring); + netmap_sync_kloop_rx_ring(a); + nm_kr_put(a->kring); } #ifdef SYNC_KLOOP_POLL @@ -622,7 +657,7 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n /* If a poll context is present, yield to the scheduler * waiting for a notification to come either from * netmap or the application. */ - schedule_timeout_interruptible(msecs_to_jiffies(1000)); + schedule_timeout(msecs_to_jiffies(20000)); } else #endif /* SYNC_KLOOP_POLL */ { @@ -657,6 +692,11 @@ out: } #endif /* SYNC_KLOOP_POLL */ + if (args) { + nm_os_free(args); + args = NULL; + } + /* Reset the kloop state. */ NMG_LOCK(); priv->np_kloop_state = 0; @@ -719,7 +759,7 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc * packets. */ kring->nr_hwcur = ktoa->hwcur; - ptnetmap_guest_write_kring_csb(atok, kring->rcur, kring->rhead); + nm_sync_kloop_appl_write(atok, kring->rcur, kring->rhead); /* Ask for a kick from a guest to the host if needed. */ if (((kring->rhead != kring->nr_hwcur || nm_kr_txempty(kring)) @@ -733,7 +773,8 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc * Second part: reclaim buffers for completed transmissions. */ if (nm_kr_txempty(kring) || (flags & NAF_FORCE_RECLAIM)) { - ptnetmap_guest_read_kring_csb(ktoa, kring); + nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, + &kring->nr_hwcur); } /* @@ -744,8 +785,10 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc if (nm_kr_txempty(kring) && !(kring->nr_kflags & NKR_NOINTR)) { /* Reenable notifications. */ atok->appl_need_kick = 1; - /* Double check */ - ptnetmap_guest_read_kring_csb(ktoa, kring); + /* Double check, with store-load memory barrier. */ + nm_stld_barrier(); + nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, + &kring->nr_hwcur); /* If there is new free space, disable notifications */ if (unlikely(!nm_kr_txempty(kring))) { atok->appl_need_kick = 0; @@ -784,7 +827,7 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc * hwtail to the hwtail known from the host (read from the CSB). * This also updates the kring hwcur. */ - ptnetmap_guest_read_kring_csb(ktoa, kring); + nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, &kring->nr_hwcur); kring->nr_kflags &= ~NKR_PENDINTR; /* @@ -792,8 +835,7 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc * released, by updating cur and head in the CSB. */ if (kring->rhead != kring->nr_hwcur) { - ptnetmap_guest_write_kring_csb(atok, kring->rcur, - kring->rhead); + nm_sync_kloop_appl_write(atok, kring->rcur, kring->rhead); /* Ask for a kick from the guest to the host if needed. */ if (NM_ACCESS_ONCE(ktoa->kern_need_kick)) { atok->sync_flags = flags; @@ -809,8 +851,10 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc if (nm_kr_rxempty(kring) && !(kring->nr_kflags & NKR_NOINTR)) { /* Reenable notifications. */ atok->appl_need_kick = 1; - /* Double check */ - ptnetmap_guest_read_kring_csb(ktoa, kring); + /* Double check, with store-load memory barrier. */ + nm_stld_barrier(); + nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, + &kring->nr_hwcur); /* If there are new slots, disable notifications. */ if (!nm_kr_rxempty(kring)) { atok->appl_need_kick = 0; Modified: stable/12/sys/net/netmap.h ============================================================================== --- stable/12/sys/net/netmap.h Wed Feb 6 09:21:44 2019 (r343829) +++ stable/12/sys/net/netmap.h Wed Feb 6 09:23:39 2019 (r343830) @@ -769,6 +769,8 @@ struct nm_csb_ktoa { #ifdef __KERNEL__ #define nm_stst_barrier smp_wmb +#define nm_ldld_barrier smp_rmb +#define nm_stld_barrier smp_mb #else /* !__KERNEL__ */ static inline void nm_stst_barrier(void) { @@ -777,18 +779,31 @@ static inline void nm_stst_barrier(void) * which is fine for us. */ __atomic_thread_fence(__ATOMIC_RELEASE); } +static inline void nm_ldld_barrier(void) +{ + /* A memory barrier with acquire semantic has the combined + * effect of a load-load barrier and a store-load barrier, + * which is fine for us. */ + __atomic_thread_fence(__ATOMIC_ACQUIRE); +} #endif /* !__KERNEL__ */ #elif defined(__FreeBSD__) #ifdef _KERNEL #define nm_stst_barrier atomic_thread_fence_rel +#define nm_ldld_barrier atomic_thread_fence_acq +#define nm_stld_barrier atomic_thread_fence_seq_cst #else /* !_KERNEL */ #include static inline void nm_stst_barrier(void) { atomic_thread_fence(memory_order_release); } +static inline void nm_ldld_barrier(void) +{ + atomic_thread_fence(memory_order_acquire); +} #endif /* !_KERNEL */ #else /* !__linux__ && !__FreeBSD__ */ @@ -801,6 +816,10 @@ static inline void nm_sync_kloop_appl_write(struct nm_csb_atok *atok, uint32_t cur, uint32_t head) { + /* Issue a first store-store barrier to make sure writes to the + * netmap ring do not overcome updates on atok->cur and atok->head. */ + nm_stst_barrier(); + /* * We need to write cur and head to the CSB but we cannot do it atomically. * There is no way we can prevent the host from reading the updated value @@ -815,11 +834,11 @@ nm_sync_kloop_appl_write(struct nm_csb_atok *atok, uin * * The following memory barrier scheme is used to make this happen: * - * Guest Host + * Guest Host * - * STORE(cur) LOAD(head) - * mb() <-----------> mb() - * STORE(head) LOAD(cur) + * STORE(cur) LOAD(head) + * wmb() <-----------> rmb() + * STORE(head) LOAD(cur) * */ atok->cur = cur; @@ -839,8 +858,12 @@ nm_sync_kloop_appl_read(struct nm_csb_ktoa *ktoa, uint * (see explanation in sync_kloop_kernel_write). */ *hwtail = ktoa->hwtail; - nm_stst_barrier(); + nm_ldld_barrier(); *hwcur = ktoa->hwcur; + + /* Make sure that loads from ktoa->hwtail and ktoa->hwcur are not delayed + * after the loads from the netmap ring. */ + nm_ldld_barrier(); } /* From owner-svn-src-stable@freebsd.org Wed Feb 6 09:38:45 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2B4214C90C1; Wed, 6 Feb 2019 09:38:45 +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) server-signature RSA-PSS (4096 bits) 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 51F4A8CEB8; Wed, 6 Feb 2019 09:38:45 +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 3EFDA388E; Wed, 6 Feb 2019 09:38:45 +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 x169cjHS035620; Wed, 6 Feb 2019 09:38:45 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x169ciks035618; Wed, 6 Feb 2019 09:38:44 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902060938.x169ciks035618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 6 Feb 2019 09:38:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343831 - stable/11/sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/sys/dev/netmap X-SVN-Commit-Revision: 343831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 51F4A8CEB8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 09:38:46 -0000 Author: vmaffione Date: Wed Feb 6 09:38:44 2019 New Revision: 343831 URL: https://svnweb.freebsd.org/changeset/base/343831 Log: MFC r343344 netmap: fix knote() argument to match the mutex state The nm_os_selwakeup function needs to call knote() to wake up kqueue(9) users. However, this function can be called from different code paths, with different lock requirements. This patch fixes the knote() call argument to match the relavant lock state. Also, comments have been updated to reflect current code. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219846 Reported by: Aleksandr Fedorov Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D18876 Modified: stable/11/sys/dev/netmap/netmap.c stable/11/sys/dev/netmap/netmap_freebsd.c stable/11/sys/dev/netmap/netmap_kern.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap.c ============================================================================== --- stable/11/sys/dev/netmap/netmap.c Wed Feb 6 09:23:39 2019 (r343830) +++ stable/11/sys/dev/netmap/netmap.c Wed Feb 6 09:38:44 2019 (r343831) @@ -2532,7 +2532,6 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c } nifp = priv->np_nifp; - priv->np_td = td; /* for debugging purposes */ /* return the offset of the netmap_if object */ req->nr_rx_rings = na->num_rx_rings; @@ -3208,8 +3207,8 @@ nmreq_checkoptions(struct nmreq_header *hdr) * * Can be called for one or more queues. * Return true the event mask corresponding to ready events. - * If there are no ready events, do a selrecord on either individual - * selinfo or on the global one. + * If there are no ready events (and 'sr' is not NULL), do a + * selrecord on either individual selinfo or on the global one. * Device-dependent parts (locking and sync of tx/rx rings) * are done through callbacks. * Modified: stable/11/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_freebsd.c Wed Feb 6 09:23:39 2019 (r343830) +++ stable/11/sys/dev/netmap/netmap_freebsd.c Wed Feb 6 09:38:44 2019 (r343831) @@ -83,7 +83,7 @@ void nm_os_selinfo_uninit(NM_SELINFO_T *si) { /* XXX kqueue(9) needed; these will mirror knlist_init. */ - knlist_delete(&si->si.si_note, curthread, 0 /* not locked */ ); + knlist_delete(&si->si.si_note, curthread, /*islocked=*/0); knlist_destroy(&si->si.si_note); /* now we don't need the mutex anymore */ mtx_destroy(&si->m); @@ -1292,21 +1292,21 @@ nm_os_kctx_destroy(struct nm_kctx *nmk) /******************** kqueue support ****************/ /* - * nm_os_selwakeup also needs to issue a KNOTE_UNLOCKED. - * We use a non-zero argument to distinguish the call from the one - * in kevent_scan() which instead also needs to run netmap_poll(). - * The knote uses a global mutex for the time being. We might - * try to reuse the one in the si, but it is not allocated - * permanently so it might be a bit tricky. + * In addition to calling selwakeuppri(), nm_os_selwakeup() also + * needs to call KNOTE to wake up kqueue listeners. + * We use a non-zero 'hint' argument to inform the netmap_knrw() + * function that it is being called from 'nm_os_selwakeup'; this + * is necessary because when netmap_knrw() is called by the kevent + * subsystem (i.e. kevent_scan()) we also need to call netmap_poll(). + * The knote uses a private mutex associated to the 'si' (see struct + * selinfo, struct nm_selinfo, and nm_os_selinfo_init). * - * The *kqfilter function registers one or another f_event - * depending on read or write mode. - * In the call to f_event() td_fpop is NULL so any child function - * calling devfs_get_cdevpriv() would fail - and we need it in - * netmap_poll(). As a workaround we store priv into kn->kn_hook - * and pass it as first argument to netmap_poll(), which then - * uses the failure to tell that we are called from f_event() - * and do not need the selrecord(). + * The netmap_kqfilter() function registers one or another f_event + * depending on read or write mode. A pointer to the struct + * 'netmap_priv_d' is stored into kn->kn_hook, so that it can later + * be passed to netmap_poll(). We pass NULL as a third argument to + * netmap_poll(), so that the latter only runs the txsync/rxsync + * (if necessary), and skips the nm_os_selrecord() calls. */ @@ -1314,12 +1314,13 @@ void nm_os_selwakeup(struct nm_selinfo *si) { if (netmap_verbose) - D("on knote %p", &si->si.si_note); + nm_prinf("on knote %p", &si->si.si_note); selwakeuppri(&si->si, PI_NET); - /* use a non-zero hint to tell the notification from the - * call done in kqueue_scan() which uses 0 + /* We use a non-zero hint to distinguish this notification call + * from the call done in kqueue_scan(), which uses hint=0. */ - KNOTE_UNLOCKED(&si->si.si_note, 0x100 /* notification */); + KNOTE(&si->si.si_note, /*hint=*/0x100, + mtx_owned(&si->m) ? KNF_LISTLOCKED : 0); } void @@ -1335,7 +1336,7 @@ netmap_knrdetach(struct knote *kn) struct selinfo *si = &priv->np_si[NR_RX]->si; D("remove selinfo %p", si); - knlist_remove(&si->si_note, kn, 0); + knlist_remove(&si->si_note, kn, /*islocked=*/0); } static void @@ -1345,14 +1346,15 @@ netmap_knwdetach(struct knote *kn) struct selinfo *si = &priv->np_si[NR_TX]->si; D("remove selinfo %p", si); - knlist_remove(&si->si_note, kn, 0); + knlist_remove(&si->si_note, kn, /*islocked=*/0); } /* - * callback from notifies (generated externally) and our - * calls to kevent(). The former we just return 1 (ready) - * since we do not know better. - * In the latter we call netmap_poll and return 0/1 accordingly. + * Callback triggered by netmap notifications (see netmap_notify()), + * and by the application calling kevent(). In the former case we + * just return 1 (events ready), since we are not able to do better. + * In the latter case we use netmap_poll() to see which events are + * ready. */ static int netmap_knrw(struct knote *kn, long hint, int events) @@ -1361,21 +1363,17 @@ netmap_knrw(struct knote *kn, long hint, int events) int revents; if (hint != 0) { - ND(5, "call from notify"); - return 1; /* assume we are ready */ - } - priv = kn->kn_hook; - /* the notification may come from an external thread, - * in which case we do not want to run the netmap_poll - * This should be filtered above, but check just in case. - */ - if (curthread != priv->np_td) { /* should not happen */ - RD(5, "curthread changed %p %p", curthread, priv->np_td); + /* Called from netmap_notify(), typically from a + * thread different from the one issuing kevent(). + * Assume we are ready. */ return 1; - } else { - revents = netmap_poll(priv, events, NULL); - return (events & revents) ? 1 : 0; } + + /* Called from kevent(). */ + priv = kn->kn_hook; + revents = netmap_poll(priv, events, /*thread=*/NULL); + + return (events & revents) ? 1 : 0; } static int @@ -1406,7 +1404,7 @@ static struct filterops netmap_wfiltops = { /* * This is called when a thread invokes kevent() to record * a change in the configuration of the kqueue(). - * The 'priv' should be the same as in the netmap device. + * The 'priv' is the one associated to the open netmap device. */ static int netmap_kqfilter(struct cdev *dev, struct knote *kn) @@ -1433,16 +1431,11 @@ netmap_kqfilter(struct cdev *dev, struct knote *kn) } /* the si is indicated in the priv */ si = priv->np_si[(ev == EVFILT_WRITE) ? NR_TX : NR_RX]; - // XXX lock(priv) ? kn->kn_fop = (ev == EVFILT_WRITE) ? &netmap_wfiltops : &netmap_rfiltops; kn->kn_hook = priv; - knlist_add(&si->si.si_note, kn, 0); - // XXX unlock(priv) - ND("register %p %s td %p priv %p kn %p np_nifp %p kn_fp/fpop %s", - na, na->ifp->if_xname, curthread, priv, kn, - priv->np_nifp, - kn->kn_fp == curthread->td_fpop ? "match" : "MISMATCH"); + knlist_add(&si->si.si_note, kn, /*islocked=*/0); + return 0; } Modified: stable/11/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/11/sys/dev/netmap/netmap_kern.h Wed Feb 6 09:23:39 2019 (r343830) +++ stable/11/sys/dev/netmap/netmap_kern.h Wed Feb 6 09:38:44 2019 (r343831) @@ -1944,7 +1944,6 @@ struct netmap_priv_d { * (N entries). */ struct nm_csb_ktoa *np_csb_ktoa_base; - struct thread *np_td; /* kqueue, just debugging */ #ifdef linux struct file *np_filp; /* used by sync kloop */ #endif /* linux */ From owner-svn-src-stable@freebsd.org Wed Feb 6 09:49:43 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9560914C954E; Wed, 6 Feb 2019 09:49:43 +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) server-signature RSA-PSS (4096 bits) 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 363908D372; Wed, 6 Feb 2019 09:49: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 092ED3AC5; Wed, 6 Feb 2019 09:49: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 x169nhcV041214; Wed, 6 Feb 2019 09:49:43 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x169ngZI041212; Wed, 6 Feb 2019 09:49:42 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902060949.x169ngZI041212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 6 Feb 2019 09:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343832 - in stable/11/sys: dev/netmap net X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/11/sys: dev/netmap net X-SVN-Commit-Revision: 343832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 363908D372 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 09:49:43 -0000 Author: vmaffione Date: Wed Feb 6 09:49:42 2019 New Revision: 343832 URL: https://svnweb.freebsd.org/changeset/base/343832 Log: MFC r343346 netmap: improvements to the netmap kloop (CSB mode) Changelist: - Add the proper memory barriers in the kloop ring processing functions. - Fix memory barriers usage in the user helpers (nm_sync_kloop_appl_write, nm_sync_kloop_appl_read). - Fix nm_kr_txempty() helper to look at rhead rather than rcur. This is important since the kloop can read a value of rcur which is ahead of the value of rhead (see explanation in nm_sync_kloop_appl_write) - Remove obsolete ptnetmap_guest_write_kring_csb() and ptnet_guest_read_kring_csb(). - Prepare in advance the arguments for netmap_sync_kloop_[tr]x_ring(), to make the kloop faster. - Provide kernel and user implementation for nm_ldld_barrier() and nm_ldst_barrier() Modified: stable/11/sys/dev/netmap/netmap_kern.h stable/11/sys/dev/netmap/netmap_kloop.c stable/11/sys/net/netmap.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/11/sys/dev/netmap/netmap_kern.h Wed Feb 6 09:38:44 2019 (r343831) +++ stable/11/sys/dev/netmap/netmap_kern.h Wed Feb 6 09:49:42 2019 (r343832) @@ -1157,7 +1157,7 @@ nm_kr_rxspace(struct netmap_kring *k) static inline int nm_kr_txempty(struct netmap_kring *kring) { - return kring->rcur == kring->nr_hwtail; + return kring->rhead == kring->nr_hwtail; } /* True if no more completed slots in the rx ring, only valid after @@ -2243,61 +2243,14 @@ int ptnet_nm_krings_create(struct netmap_adapter *na); void ptnet_nm_krings_delete(struct netmap_adapter *na); void ptnet_nm_dtor(struct netmap_adapter *na); -/* Guest driver: Write kring pointers (cur, head) to the CSB. - * This routine is coupled with ptnetmap_host_read_kring_csb(). */ +/* Helper function wrapping nm_sync_kloop_appl_read(). */ static inline void -ptnetmap_guest_write_kring_csb(struct nm_csb_atok *atok, uint32_t cur, - uint32_t head) -{ - /* - * We need to write cur and head to the CSB but we cannot do it atomically. - * There is no way we can prevent the host from reading the updated value - * of one of the two and the old value of the other. However, if we make - * sure that the host never reads a value of head more recent than the - * value of cur we are safe. We can allow the host to read a value of cur - * more recent than the value of head, since in the netmap ring cur can be - * ahead of head and cur cannot wrap around head because it must be behind - * tail. Inverting the order of writes below could instead result into the - * host to think head went ahead of cur, which would cause the sync - * prologue to fail. - * - * The following memory barrier scheme is used to make this happen: - * - * Guest Host - * - * STORE(cur) LOAD(head) - * mb() <-----------> mb() - * STORE(head) LOAD(cur) - */ - atok->cur = cur; - nm_stst_barrier(); - atok->head = head; -} - -/* Guest driver: Read kring pointers (hwcur, hwtail) from the CSB. - * This routine is coupled with ptnetmap_host_write_kring_csb(). */ -static inline void -ptnetmap_guest_read_kring_csb(struct nm_csb_ktoa *ktoa, - struct netmap_kring *kring) -{ - /* - * We place a memory barrier to make sure that the update of hwtail never - * overtakes the update of hwcur. - * (see explanation in ptnetmap_host_write_kring_csb). - */ - kring->nr_hwtail = ktoa->hwtail; - nm_stst_barrier(); - kring->nr_hwcur = ktoa->hwcur; -} - -/* Helper function wrapping ptnetmap_guest_read_kring_csb(). */ -static inline void ptnet_sync_tail(struct nm_csb_ktoa *ktoa, struct netmap_kring *kring) { struct netmap_ring *ring = kring->ring; /* Update hwcur and hwtail as known by the host. */ - ptnetmap_guest_read_kring_csb(ktoa, kring); + nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, &kring->nr_hwcur); /* nm_sync_finalize */ ring->tail = kring->rtail = kring->nr_hwtail; Modified: stable/11/sys/dev/netmap/netmap_kloop.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_kloop.c Wed Feb 6 09:38:44 2019 (r343831) +++ stable/11/sys/dev/netmap/netmap_kloop.c Wed Feb 6 09:49:42 2019 (r343832) @@ -66,8 +66,12 @@ static inline void sync_kloop_kernel_write(struct nm_csb_ktoa __user *ptr, uint32_t hwcur, uint32_t hwtail) { + /* Issue a first store-store barrier to make sure writes to the + * netmap ring do not overcome updates on ktoa->hwcur and ktoa->hwtail. */ + nm_stst_barrier(); + /* - * The same scheme used in ptnetmap_guest_write_kring_csb() applies here. + * The same scheme used in nm_sync_kloop_appl_write() applies here. * We allow the application to read a value of hwcur more recent than the value * of hwtail, since this would anyway result in a consistent view of the * ring state (and hwcur can never wraparound hwtail, since hwcur must be @@ -75,11 +79,11 @@ sync_kloop_kernel_write(struct nm_csb_ktoa __user *ptr * * The following memory barrier scheme is used to make this happen: * - * Application Kernel + * Application Kernel * - * STORE(hwcur) LOAD(hwtail) - * mb() <-------------> mb() - * STORE(hwtail) LOAD(hwcur) + * STORE(hwcur) LOAD(hwtail) + * wmb() <-------------> rmb() + * STORE(hwtail) LOAD(hwcur) */ CSB_WRITE(ptr, hwcur, hwcur); nm_stst_barrier(); @@ -96,12 +100,16 @@ sync_kloop_kernel_read(struct nm_csb_atok __user *ptr, /* * We place a memory barrier to make sure that the update of head never * overtakes the update of cur. - * (see explanation in ptnetmap_guest_write_kring_csb). + * (see explanation in sync_kloop_kernel_write). */ CSB_READ(ptr, head, shadow_ring->head); - nm_stst_barrier(); + nm_ldld_barrier(); CSB_READ(ptr, cur, shadow_ring->cur); CSB_READ(ptr, sync_flags, shadow_ring->flags); + + /* Make sure that loads from atok->head and atok->cur are not delayed + * after the loads from the netmap ring. */ + nm_ldld_barrier(); } /* Enable or disable application --> kernel kicks. */ @@ -127,10 +135,10 @@ csb_atok_intr_enabled(struct nm_csb_atok __user *csb_a static inline void sync_kloop_kring_dump(const char *title, const struct netmap_kring *kring) { - nm_prinf("%s - name: %s hwcur: %d hwtail: %d " - "rhead: %d rcur: %d rtail: %d", - title, kring->name, kring->nr_hwcur, kring->nr_hwtail, - kring->rhead, kring->rcur, kring->rtail); + nm_prinf("%s, kring %s, hwcur %d, rhead %d, " + "rcur %d, rtail %d, hwtail %d", + title, kring->name, kring->nr_hwcur, kring->rhead, + kring->rcur, kring->rtail, kring->nr_hwtail); } struct sync_kloop_ring_args { @@ -240,7 +248,8 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring */ /* Reenable notifications. */ csb_ktoa_kick_enable(csb_ktoa, 1); - /* Doublecheck. */ + /* Double check, with store-load memory barrier. */ + nm_stld_barrier(); sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); if (shadow_ring.head != kring->rhead) { /* We won the race condition, there are more packets to @@ -358,7 +367,8 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring */ /* Reenable notifications. */ csb_ktoa_kick_enable(csb_ktoa, 1); - /* Doublecheck. */ + /* Double check, with store-load memory barrier. */ + nm_stld_barrier(); sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); if (!sync_kloop_norxslots(kring, shadow_ring.head)) { /* We won the race condition, more slots are available. Disable @@ -439,6 +449,7 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n struct sync_kloop_poll_ctx *poll_ctx = NULL; #endif /* SYNC_KLOOP_POLL */ int num_rx_rings, num_tx_rings, num_rings; + struct sync_kloop_ring_args *args = NULL; uint32_t sleep_us = req->sleep_us; struct nm_csb_atok* csb_atok_base; struct nm_csb_ktoa* csb_ktoa_base; @@ -488,6 +499,12 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n num_tx_rings = priv->np_qlast[NR_TX] - priv->np_qfirst[NR_TX]; num_rings = num_tx_rings + num_rx_rings; + args = nm_os_malloc(num_rings * sizeof(args[0])); + if (!args) { + err = ENOMEM; + goto out; + } + /* Validate notification options. */ opt = nmreq_findoption((struct nmreq_option *)(uintptr_t)hdr->nr_options, NETMAP_REQ_OPT_SYNC_KLOOP_EVENTFDS); @@ -558,8 +575,8 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n si[NR_TX] = nm_si_user(priv, NR_TX) ? &na->si[NR_TX] : &na->tx_rings[priv->np_qfirst[NR_TX]]->si; NMG_UNLOCK(); - poll_wait(priv->np_filp, si[NR_RX], &poll_ctx->wait_table); poll_wait(priv->np_filp, si[NR_TX], &poll_ctx->wait_table); + poll_wait(priv->np_filp, si[NR_RX], &poll_ctx->wait_table); } #else /* SYNC_KLOOP_POLL */ opt->nro_status = EOPNOTSUPP; @@ -567,6 +584,31 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n #endif /* SYNC_KLOOP_POLL */ } + /* Prepare the arguments for netmap_sync_kloop_tx_ring() + * and netmap_sync_kloop_rx_ring(). */ + for (i = 0; i < num_tx_rings; i++) { + struct sync_kloop_ring_args *a = args + i; + + a->kring = NMR(na, NR_TX)[i + priv->np_qfirst[NR_TX]]; + a->csb_atok = csb_atok_base + i; + a->csb_ktoa = csb_ktoa_base + i; +#ifdef SYNC_KLOOP_POLL + if (poll_ctx) + a->irq_ctx = poll_ctx->entries[i].irq_ctx; +#endif /* SYNC_KLOOP_POLL */ + } + for (i = 0; i < num_rx_rings; i++) { + struct sync_kloop_ring_args *a = args + num_tx_rings + i; + + a->kring = NMR(na, NR_RX)[i + priv->np_qfirst[NR_RX]]; + a->csb_atok = csb_atok_base + num_tx_rings + i; + a->csb_ktoa = csb_ktoa_base + num_tx_rings + i; +#ifdef SYNC_KLOOP_POLL + if (poll_ctx) + a->irq_ctx = poll_ctx->entries[num_tx_rings + i].irq_ctx; +#endif /* SYNC_KLOOP_POLL */ + } + /* Main loop. */ for (;;) { if (unlikely(NM_ACCESS_ONCE(priv->np_kloop_state) & NM_SYNC_KLOOP_STOPPING)) { @@ -574,47 +616,40 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n } #ifdef SYNC_KLOOP_POLL - if (poll_ctx) - __set_current_state(TASK_INTERRUPTIBLE); + if (poll_ctx) { + /* It is important to set the task state as + * interruptible before processing any TX/RX ring, + * so that if a notification on ring Y comes after + * we have processed ring Y, but before we call + * schedule(), we don't miss it. This is true because + * the wake up function will change the the task state, + * and therefore the schedule_timeout() call below + * will observe the change). + */ + set_current_state(TASK_INTERRUPTIBLE); + } #endif /* SYNC_KLOOP_POLL */ /* Process all the TX rings bound to this file descriptor. */ for (i = 0; i < num_tx_rings; i++) { - struct sync_kloop_ring_args a = { - .kring = NMR(na, NR_TX)[i + priv->np_qfirst[NR_TX]], - .csb_atok = csb_atok_base + i, - .csb_ktoa = csb_ktoa_base + i, - }; + struct sync_kloop_ring_args *a = args + i; -#ifdef SYNC_KLOOP_POLL - if (poll_ctx) - a.irq_ctx = poll_ctx->entries[i].irq_ctx; -#endif /* SYNC_KLOOP_POLL */ - if (unlikely(nm_kr_tryget(a.kring, 1, NULL))) { + if (unlikely(nm_kr_tryget(a->kring, 1, NULL))) { continue; } - netmap_sync_kloop_tx_ring(&a); - nm_kr_put(a.kring); + netmap_sync_kloop_tx_ring(a); + nm_kr_put(a->kring); } /* Process all the RX rings bound to this file descriptor. */ for (i = 0; i < num_rx_rings; i++) { - struct sync_kloop_ring_args a = { - .kring = NMR(na, NR_RX)[i + priv->np_qfirst[NR_RX]], - .csb_atok = csb_atok_base + num_tx_rings + i, - .csb_ktoa = csb_ktoa_base + num_tx_rings + i, - }; + struct sync_kloop_ring_args *a = args + num_tx_rings + i; -#ifdef SYNC_KLOOP_POLL - if (poll_ctx) - a.irq_ctx = poll_ctx->entries[num_tx_rings + i].irq_ctx; -#endif /* SYNC_KLOOP_POLL */ - - if (unlikely(nm_kr_tryget(a.kring, 1, NULL))) { + if (unlikely(nm_kr_tryget(a->kring, 1, NULL))) { continue; } - netmap_sync_kloop_rx_ring(&a); - nm_kr_put(a.kring); + netmap_sync_kloop_rx_ring(a); + nm_kr_put(a->kring); } #ifdef SYNC_KLOOP_POLL @@ -622,7 +657,7 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n /* If a poll context is present, yield to the scheduler * waiting for a notification to come either from * netmap or the application. */ - schedule_timeout_interruptible(msecs_to_jiffies(1000)); + schedule_timeout(msecs_to_jiffies(20000)); } else #endif /* SYNC_KLOOP_POLL */ { @@ -657,6 +692,11 @@ out: } #endif /* SYNC_KLOOP_POLL */ + if (args) { + nm_os_free(args); + args = NULL; + } + /* Reset the kloop state. */ NMG_LOCK(); priv->np_kloop_state = 0; @@ -719,7 +759,7 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc * packets. */ kring->nr_hwcur = ktoa->hwcur; - ptnetmap_guest_write_kring_csb(atok, kring->rcur, kring->rhead); + nm_sync_kloop_appl_write(atok, kring->rcur, kring->rhead); /* Ask for a kick from a guest to the host if needed. */ if (((kring->rhead != kring->nr_hwcur || nm_kr_txempty(kring)) @@ -733,7 +773,8 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc * Second part: reclaim buffers for completed transmissions. */ if (nm_kr_txempty(kring) || (flags & NAF_FORCE_RECLAIM)) { - ptnetmap_guest_read_kring_csb(ktoa, kring); + nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, + &kring->nr_hwcur); } /* @@ -744,8 +785,10 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc if (nm_kr_txempty(kring) && !(kring->nr_kflags & NKR_NOINTR)) { /* Reenable notifications. */ atok->appl_need_kick = 1; - /* Double check */ - ptnetmap_guest_read_kring_csb(ktoa, kring); + /* Double check, with store-load memory barrier. */ + nm_stld_barrier(); + nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, + &kring->nr_hwcur); /* If there is new free space, disable notifications */ if (unlikely(!nm_kr_txempty(kring))) { atok->appl_need_kick = 0; @@ -784,7 +827,7 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc * hwtail to the hwtail known from the host (read from the CSB). * This also updates the kring hwcur. */ - ptnetmap_guest_read_kring_csb(ktoa, kring); + nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, &kring->nr_hwcur); kring->nr_kflags &= ~NKR_PENDINTR; /* @@ -792,8 +835,7 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc * released, by updating cur and head in the CSB. */ if (kring->rhead != kring->nr_hwcur) { - ptnetmap_guest_write_kring_csb(atok, kring->rcur, - kring->rhead); + nm_sync_kloop_appl_write(atok, kring->rcur, kring->rhead); /* Ask for a kick from the guest to the host if needed. */ if (NM_ACCESS_ONCE(ktoa->kern_need_kick)) { atok->sync_flags = flags; @@ -809,8 +851,10 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc if (nm_kr_rxempty(kring) && !(kring->nr_kflags & NKR_NOINTR)) { /* Reenable notifications. */ atok->appl_need_kick = 1; - /* Double check */ - ptnetmap_guest_read_kring_csb(ktoa, kring); + /* Double check, with store-load memory barrier. */ + nm_stld_barrier(); + nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, + &kring->nr_hwcur); /* If there are new slots, disable notifications. */ if (!nm_kr_rxempty(kring)) { atok->appl_need_kick = 0; Modified: stable/11/sys/net/netmap.h ============================================================================== --- stable/11/sys/net/netmap.h Wed Feb 6 09:38:44 2019 (r343831) +++ stable/11/sys/net/netmap.h Wed Feb 6 09:49:42 2019 (r343832) @@ -767,6 +767,8 @@ struct nm_csb_ktoa { #ifdef __KERNEL__ #define nm_stst_barrier smp_wmb +#define nm_ldld_barrier smp_rmb +#define nm_stld_barrier smp_mb #else /* !__KERNEL__ */ static inline void nm_stst_barrier(void) { @@ -775,18 +777,31 @@ static inline void nm_stst_barrier(void) * which is fine for us. */ __atomic_thread_fence(__ATOMIC_RELEASE); } +static inline void nm_ldld_barrier(void) +{ + /* A memory barrier with acquire semantic has the combined + * effect of a load-load barrier and a store-load barrier, + * which is fine for us. */ + __atomic_thread_fence(__ATOMIC_ACQUIRE); +} #endif /* !__KERNEL__ */ #elif defined(__FreeBSD__) #ifdef _KERNEL #define nm_stst_barrier atomic_thread_fence_rel +#define nm_ldld_barrier atomic_thread_fence_acq +#define nm_stld_barrier atomic_thread_fence_seq_cst #else /* !_KERNEL */ #include static inline void nm_stst_barrier(void) { atomic_thread_fence(memory_order_release); } +static inline void nm_ldld_barrier(void) +{ + atomic_thread_fence(memory_order_acquire); +} #endif /* !_KERNEL */ #else /* !__linux__ && !__FreeBSD__ */ @@ -799,6 +814,10 @@ static inline void nm_sync_kloop_appl_write(struct nm_csb_atok *atok, uint32_t cur, uint32_t head) { + /* Issue a first store-store barrier to make sure writes to the + * netmap ring do not overcome updates on atok->cur and atok->head. */ + nm_stst_barrier(); + /* * We need to write cur and head to the CSB but we cannot do it atomically. * There is no way we can prevent the host from reading the updated value @@ -813,11 +832,11 @@ nm_sync_kloop_appl_write(struct nm_csb_atok *atok, uin * * The following memory barrier scheme is used to make this happen: * - * Guest Host + * Guest Host * - * STORE(cur) LOAD(head) - * mb() <-----------> mb() - * STORE(head) LOAD(cur) + * STORE(cur) LOAD(head) + * wmb() <-----------> rmb() + * STORE(head) LOAD(cur) * */ atok->cur = cur; @@ -837,8 +856,12 @@ nm_sync_kloop_appl_read(struct nm_csb_ktoa *ktoa, uint * (see explanation in sync_kloop_kernel_write). */ *hwtail = ktoa->hwtail; - nm_stst_barrier(); + nm_ldld_barrier(); *hwcur = ktoa->hwcur; + + /* Make sure that loads from ktoa->hwtail and ktoa->hwcur are not delayed + * after the loads from the netmap ring. */ + nm_ldld_barrier(); } /* From owner-svn-src-stable@freebsd.org Wed Feb 6 09:59:22 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 138DF14C9972; Wed, 6 Feb 2019 09:59:22 +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) server-signature RSA-PSS (4096 bits) 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 A92F88D800; Wed, 6 Feb 2019 09:59:21 +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 7FA483CB5; Wed, 6 Feb 2019 09:59:21 +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 x169xLVq046523; Wed, 6 Feb 2019 09:59:21 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x169xKS2046520; Wed, 6 Feb 2019 09:59:20 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902060959.x169xKS2046520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 6 Feb 2019 09:59:20 +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: r343833 - stable/12/sys/dev/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/dev/netmap X-SVN-Commit-Revision: 343833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A92F88D800 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 09:59:22 -0000 Author: vmaffione Date: Wed Feb 6 09:59:20 2019 New Revision: 343833 URL: https://svnweb.freebsd.org/changeset/base/343833 Log: MFC r343549 netmap: add notifications on kloop stop On sync-kloop stop, send a wake-up signal to the kloop, so that waiting for the timeout is not needed. Also, improve logging in netmap_freebsd.c. Modified: stable/12/sys/dev/netmap/netmap_bdg.c stable/12/sys/dev/netmap/netmap_freebsd.c stable/12/sys/dev/netmap/netmap_kloop.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/netmap_bdg.c ============================================================================== --- stable/12/sys/dev/netmap/netmap_bdg.c Wed Feb 6 09:49:42 2019 (r343832) +++ stable/12/sys/dev/netmap/netmap_bdg.c Wed Feb 6 09:59:20 2019 (r343833) @@ -1141,8 +1141,8 @@ netmap_bwrap_intr_notify(struct netmap_kring *kring, i goto put_out; if (kring->nr_hwcur == kring->nr_hwtail) { if (netmap_verbose) - nm_prerr("how strange, interrupt with no packets on %s", - na->name); + nm_prlim(1, "interrupt with no packets on %s", + kring->name); goto put_out; } Modified: stable/12/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- stable/12/sys/dev/netmap/netmap_freebsd.c Wed Feb 6 09:49:42 2019 (r343832) +++ stable/12/sys/dev/netmap/netmap_freebsd.c Wed Feb 6 09:59:20 2019 (r343833) @@ -240,7 +240,7 @@ nm_os_csum_tcpudp_ipv4(struct nm_iphdr *iph, void *dat static int notsupported = 0; if (!notsupported) { notsupported = 1; - D("inet4 segmentation not supported"); + nm_prerr("inet4 segmentation not supported"); } #endif } @@ -256,7 +256,7 @@ nm_os_csum_tcpudp_ipv6(struct nm_ipv6hdr *ip6h, void * static int notsupported = 0; if (!notsupported) { notsupported = 1; - D("inet6 segmentation not supported"); + nm_prerr("inet6 segmentation not supported"); } #endif } @@ -288,8 +288,9 @@ freebsd_generic_rx_handler(struct ifnet *ifp, struct m { int stolen; - if (!NM_NA_VALID(ifp)) { - RD(1, "Warning: got RX packet for invalid emulated adapter"); + if (unlikely(!NM_NA_VALID(ifp))) { + nm_prlim(1, "Warning: RX packet intercepted, but no" + " emulated adapter"); return; } @@ -315,15 +316,16 @@ nm_os_catch_rx(struct netmap_generic_adapter *gna, int nm_os_ifnet_lock(); if (intercept) { if (gna->save_if_input) { - D("cannot intercept again"); - ret = EINVAL; /* already set */ + nm_prerr("RX on %s already intercepted", na->name); + ret = EBUSY; /* already set */ goto out; } gna->save_if_input = ifp->if_input; ifp->if_input = freebsd_generic_rx_handler; } else { - if (!gna->save_if_input){ - D("cannot restore"); + if (!gna->save_if_input) { + nm_prerr("Failed to undo RX intercept on %s", + na->name); ret = EINVAL; /* not saved */ goto out; } @@ -392,11 +394,11 @@ nm_os_generic_xmit_frame(struct nm_os_gen_arg *a) * we need to copy from the cluster to the netmap buffer. */ if (MBUF_REFCNT(m) != 1) { - D("invalid refcnt %d for %p", MBUF_REFCNT(m), m); + nm_prerr("invalid refcnt %d for %p", MBUF_REFCNT(m), m); panic("in generic_xmit_frame"); } if (m->m_ext.ext_size < len) { - RD(5, "size %d < len %d", m->m_ext.ext_size, len); + nm_prlim(2, "size %d < len %d", m->m_ext.ext_size, len); len = m->m_ext.ext_size; } bcopy(a->addr, m->m_data, len); @@ -459,7 +461,6 @@ nm_os_generic_set_features(struct netmap_generic_adapt void nm_os_mitigation_init(struct nm_generic_mit *mit, int idx, struct netmap_adapter *na) { - ND("called"); mit->mit_pending = 0; mit->mit_ring_idx = idx; mit->mit_na = na; @@ -469,21 +470,19 @@ nm_os_mitigation_init(struct nm_generic_mit *mit, int void nm_os_mitigation_start(struct nm_generic_mit *mit) { - ND("called"); } void nm_os_mitigation_restart(struct nm_generic_mit *mit) { - ND("called"); } int nm_os_mitigation_active(struct nm_generic_mit *mit) { - ND("called"); + return 0; } @@ -491,12 +490,12 @@ nm_os_mitigation_active(struct nm_generic_mit *mit) void nm_os_mitigation_cleanup(struct nm_generic_mit *mit) { - ND("called"); } static int nm_vi_dummy(struct ifnet *ifp, u_long cmd, caddr_t addr) { + return EINVAL; } @@ -559,7 +558,7 @@ nm_vi_free_index(uint8_t val) } } if (lim == nm_vi_indices.active) - D("funny, index %u didn't found", val); + nm_prerr("Index %u not found", val); mtx_unlock(&nm_vi_indices.lock); } #undef NM_VI_MAX @@ -597,7 +596,7 @@ nm_os_vi_persist(const char *name, struct ifnet **ret) ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - D("if_alloc failed"); + nm_prerr("if_alloc failed"); return ENOMEM; } if_initname(ifp, name, IF_DUNIT_NONE); @@ -638,7 +637,7 @@ struct nm_os_extmem { void nm_os_extmem_delete(struct nm_os_extmem *e) { - D("freeing %zx bytes", (size_t)e->size); + nm_prinf("freeing %zx bytes", (size_t)e->size); vm_map_remove(kernel_map, e->kva, e->kva + e->size); nm_os_free(e); } @@ -688,7 +687,7 @@ nm_os_extmem_create(unsigned long p, struct nmreq_pool rv = vm_map_lookup(&map, p, VM_PROT_RW, &entry, &obj, &index, &prot, &wired); if (rv != KERN_SUCCESS) { - D("address %lx not found", p); + nm_prerr("address %lx not found", p); goto out_free; } /* check that we are given the whole vm_object ? */ @@ -707,13 +706,13 @@ nm_os_extmem_create(unsigned long p, struct nmreq_pool VMFS_OPTIMAL_SPACE, VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | VM_PROT_WRITE, 0); if (rv != KERN_SUCCESS) { - D("vm_map_find(%zx) failed", (size_t)e->size); + nm_prerr("vm_map_find(%zx) failed", (size_t)e->size); goto out_rel; } rv = vm_map_wire(kernel_map, e->kva, e->kva + e->size, VM_MAP_WIRE_SYSTEM | VM_MAP_WIRE_NOHOLES); if (rv != KERN_SUCCESS) { - D("vm_map_wire failed"); + nm_prerr("vm_map_wire failed"); goto out_rem; } @@ -795,7 +794,7 @@ nm_os_pt_memdev_iomap(struct ptnetmap_memdev *ptn_dev, { int rid; - D("ptn_memdev_driver iomap"); + nm_prinf("ptn_memdev_driver iomap"); rid = PCIR_BAR(PTNETMAP_MEM_PCI_BAR); *mem_size = bus_read_4(ptn_dev->pci_io, PTNET_MDEV_IO_MEMSIZE_HI); @@ -814,7 +813,7 @@ nm_os_pt_memdev_iomap(struct ptnetmap_memdev *ptn_dev, *nm_paddr = rman_get_start(ptn_dev->pci_mem); *nm_addr = rman_get_virtual(ptn_dev->pci_mem); - D("=== BAR %d start %lx len %lx mem_size %lx ===", + nm_prinf("=== BAR %d start %lx len %lx mem_size %lx ===", PTNETMAP_MEM_PCI_BAR, (unsigned long)(*nm_paddr), (unsigned long)rman_get_size(ptn_dev->pci_mem), @@ -832,7 +831,7 @@ nm_os_pt_memdev_ioread(struct ptnetmap_memdev *ptn_dev void nm_os_pt_memdev_iounmap(struct ptnetmap_memdev *ptn_dev) { - D("ptn_memdev_driver iounmap"); + nm_prinf("ptn_memdev_driver iounmap"); if (ptn_dev->pci_mem) { bus_release_resource(ptn_dev->dev, SYS_RES_MEMORY, @@ -868,8 +867,6 @@ ptn_memdev_attach(device_t dev) int rid; uint16_t mem_id; - D("ptn_memdev_driver attach"); - ptn_dev = device_get_softc(dev); ptn_dev->dev = dev; @@ -893,7 +890,7 @@ ptn_memdev_attach(device_t dev) } netmap_mem_get(ptn_dev->nm_mem); - D("ptn_memdev_driver probe OK - host_mem_id: %d", mem_id); + nm_prinf("ptnetmap memdev attached, host memid: %u", mem_id); return (0); } @@ -904,10 +901,11 @@ ptn_memdev_detach(device_t dev) { struct ptnetmap_memdev *ptn_dev; - D("ptn_memdev_driver detach"); ptn_dev = device_get_softc(dev); if (ptn_dev->nm_mem) { + nm_prinf("ptnetmap memdev detached, host memid %u", + netmap_mem_get_id(ptn_dev->nm_mem)); netmap_mem_put(ptn_dev->nm_mem); ptn_dev->nm_mem = NULL; } @@ -928,7 +926,6 @@ ptn_memdev_detach(device_t dev) static int ptn_memdev_shutdown(device_t dev) { - D("ptn_memdev_driver shutdown"); return bus_generic_shutdown(dev); } @@ -953,7 +950,7 @@ netmap_dev_pager_ctor(void *handle, vm_ooffset_t size, struct netmap_vm_handle_t *vmh = handle; if (netmap_verbose) - D("handle %p size %jd prot %d foff %jd", + nm_prinf("handle %p size %jd prot %d foff %jd", handle, (intmax_t)size, prot, (intmax_t)foff); if (color) *color = 0; @@ -970,7 +967,7 @@ netmap_dev_pager_dtor(void *handle) struct netmap_priv_d *priv = vmh->priv; if (netmap_verbose) - D("handle %p", handle); + nm_prinf("handle %p", handle); netmap_dtor(priv); free(vmh, M_DEVBUF); dev_rel(dev); @@ -989,7 +986,7 @@ netmap_dev_pager_fault(vm_object_t object, vm_ooffset_ vm_memattr_t memattr; vm_pindex_t pidx; - ND("object %p offset %jd prot %d mres %p", + nm_prdis("object %p offset %jd prot %d mres %p", object, (intmax_t)offset, prot, mres); memattr = object->memattr; pidx = OFF_TO_IDX(offset); @@ -1045,7 +1042,7 @@ netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *fo vm_object_t obj; if (netmap_verbose) - D("cdev %p foff %jd size %jd objp %p prot %d", cdev, + nm_prinf("cdev %p foff %jd size %jd objp %p prot %d", cdev, (intmax_t )*foff, (intmax_t )objsize, objp, prot); vmh = malloc(sizeof(struct netmap_vm_handle_t), M_DEVBUF, @@ -1070,7 +1067,7 @@ netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *fo &netmap_cdev_pager_ops, objsize, prot, *foff, NULL); if (obj == NULL) { - D("cdev_pager_allocate failed"); + nm_prerr("cdev_pager_allocate failed"); error = EINVAL; goto err_deref; } @@ -1104,7 +1101,7 @@ static int netmap_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { if (netmap_verbose) - D("dev %p fflag 0x%x devtype %d td %p", + nm_prinf("dev %p fflag 0x%x devtype %d td %p", dev, fflag, devtype, td); return 0; } @@ -1255,11 +1252,11 @@ nm_os_kctx_worker_start(struct nm_kctx *nmk) goto err; } - D("nm_kthread started td %p", nmk->worker); + nm_prinf("nm_kthread started td %p", nmk->worker); return 0; err: - D("nm_kthread start failed err %d", error); + nm_prerr("nm_kthread start failed err %d", error); nmk->worker = NULL; return error; } @@ -1337,7 +1334,7 @@ netmap_knrdetach(struct knote *kn) struct netmap_priv_d *priv = (struct netmap_priv_d *)kn->kn_hook; struct selinfo *si = &priv->np_si[NR_RX]->si; - D("remove selinfo %p", si); + nm_prinf("remove selinfo %p", si); knlist_remove(&si->si_note, kn, /*islocked=*/0); } @@ -1347,7 +1344,7 @@ netmap_knwdetach(struct knote *kn) struct netmap_priv_d *priv = (struct netmap_priv_d *)kn->kn_hook; struct selinfo *si = &priv->np_si[NR_TX]->si; - D("remove selinfo %p", si); + nm_prinf("remove selinfo %p", si); knlist_remove(&si->si_note, kn, /*islocked=*/0); } @@ -1418,17 +1415,17 @@ netmap_kqfilter(struct cdev *dev, struct knote *kn) int ev = kn->kn_filter; if (ev != EVFILT_READ && ev != EVFILT_WRITE) { - D("bad filter request %d", ev); + nm_prerr("bad filter request %d", ev); return 1; } error = devfs_get_cdevpriv((void**)&priv); if (error) { - D("device not yet setup"); + nm_prerr("device not yet setup"); return 1; } na = priv->np_na; if (na == NULL) { - D("no netmap adapter for this file descriptor"); + nm_prerr("no netmap adapter for this file descriptor"); return 1; } /* the si is indicated in the priv */ @@ -1535,7 +1532,7 @@ netmap_loader(__unused struct module *module, int even * then the module can not be unloaded. */ if (netmap_use_count) { - D("netmap module can not be unloaded - netmap_use_count: %d", + nm_prerr("netmap module can not be unloaded - netmap_use_count: %d", netmap_use_count); error = EBUSY; break; Modified: stable/12/sys/dev/netmap/netmap_kloop.c ============================================================================== --- stable/12/sys/dev/netmap/netmap_kloop.c Wed Feb 6 09:49:42 2019 (r343832) +++ stable/12/sys/dev/netmap/netmap_kloop.c Wed Feb 6 09:59:20 2019 (r343833) @@ -567,16 +567,12 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n /* Poll for notifications coming from the netmap rings bound to * this file descriptor. */ { - NM_SELINFO_T *si[NR_TXRX]; - NMG_LOCK(); - si[NR_RX] = nm_si_user(priv, NR_RX) ? &na->si[NR_RX] : - &na->rx_rings[priv->np_qfirst[NR_RX]]->si; - si[NR_TX] = nm_si_user(priv, NR_TX) ? &na->si[NR_TX] : - &na->tx_rings[priv->np_qfirst[NR_TX]]->si; + poll_wait(priv->np_filp, priv->np_si[NR_TX], + &poll_ctx->wait_table); + poll_wait(priv->np_filp, priv->np_si[NR_RX], + &poll_ctx->wait_table); NMG_UNLOCK(); - poll_wait(priv->np_filp, si[NR_TX], &poll_ctx->wait_table); - poll_wait(priv->np_filp, si[NR_RX], &poll_ctx->wait_table); } #else /* SYNC_KLOOP_POLL */ opt->nro_status = EOPNOTSUPP; @@ -657,7 +653,7 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n /* If a poll context is present, yield to the scheduler * waiting for a notification to come either from * netmap or the application. */ - schedule_timeout(msecs_to_jiffies(20000)); + schedule_timeout(msecs_to_jiffies(3000)); } else #endif /* SYNC_KLOOP_POLL */ { @@ -708,12 +704,31 @@ out: int netmap_sync_kloop_stop(struct netmap_priv_d *priv) { + struct netmap_adapter *na; bool running = true; int err = 0; + if (priv->np_nifp == NULL) { + return ENXIO; + } + mb(); /* make sure following reads are not from cache */ + + na = priv->np_na; + if (!nm_netmap_on(na)) { + return ENXIO; + } + + /* Set the kloop stopping flag. */ NMG_LOCK(); priv->np_kloop_state |= NM_SYNC_KLOOP_STOPPING; NMG_UNLOCK(); + + /* Send a notification to the kloop, in case it is blocked in + * schedule_timeout(). We can use either RX or TX, because the + * kloop is waiting on both. */ + nm_os_selwakeup(priv->np_si[NR_RX]); + + /* Wait for the kloop to actually terminate. */ while (running) { usleep_range(1000, 1500); NMG_LOCK(); From owner-svn-src-stable@freebsd.org Wed Feb 6 10:00:42 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D21C114C9A11; Wed, 6 Feb 2019 10:00:41 +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) server-signature RSA-PSS (4096 bits) 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 70B4E8D96F; Wed, 6 Feb 2019 10:00:41 +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 4D4543DC1; Wed, 6 Feb 2019 10:00:41 +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 x16A0fd9047401; Wed, 6 Feb 2019 10:00:41 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16A0eEw047398; Wed, 6 Feb 2019 10:00:40 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902061000.x16A0eEw047398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 6 Feb 2019 10:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343834 - stable/11/sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/sys/dev/netmap X-SVN-Commit-Revision: 343834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 70B4E8D96F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 10:00:42 -0000 Author: vmaffione Date: Wed Feb 6 10:00:40 2019 New Revision: 343834 URL: https://svnweb.freebsd.org/changeset/base/343834 Log: MFC r343549 netmap: add notifications on kloop stop On sync-kloop stop, send a wake-up signal to the kloop, so that waiting for the timeout is not needed. Also, improve logging in netmap_freebsd.c. Modified: stable/11/sys/dev/netmap/netmap_bdg.c stable/11/sys/dev/netmap/netmap_freebsd.c stable/11/sys/dev/netmap/netmap_kloop.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap_bdg.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_bdg.c Wed Feb 6 09:59:20 2019 (r343833) +++ stable/11/sys/dev/netmap/netmap_bdg.c Wed Feb 6 10:00:40 2019 (r343834) @@ -1141,8 +1141,8 @@ netmap_bwrap_intr_notify(struct netmap_kring *kring, i goto put_out; if (kring->nr_hwcur == kring->nr_hwtail) { if (netmap_verbose) - nm_prerr("how strange, interrupt with no packets on %s", - na->name); + nm_prlim(1, "interrupt with no packets on %s", + kring->name); goto put_out; } Modified: stable/11/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_freebsd.c Wed Feb 6 09:59:20 2019 (r343833) +++ stable/11/sys/dev/netmap/netmap_freebsd.c Wed Feb 6 10:00:40 2019 (r343834) @@ -238,7 +238,7 @@ nm_os_csum_tcpudp_ipv4(struct nm_iphdr *iph, void *dat static int notsupported = 0; if (!notsupported) { notsupported = 1; - D("inet4 segmentation not supported"); + nm_prerr("inet4 segmentation not supported"); } #endif } @@ -254,7 +254,7 @@ nm_os_csum_tcpudp_ipv6(struct nm_ipv6hdr *ip6h, void * static int notsupported = 0; if (!notsupported) { notsupported = 1; - D("inet6 segmentation not supported"); + nm_prerr("inet6 segmentation not supported"); } #endif } @@ -286,8 +286,9 @@ freebsd_generic_rx_handler(struct ifnet *ifp, struct m { int stolen; - if (!NM_NA_VALID(ifp)) { - RD(1, "Warning: got RX packet for invalid emulated adapter"); + if (unlikely(!NM_NA_VALID(ifp))) { + nm_prlim(1, "Warning: RX packet intercepted, but no" + " emulated adapter"); return; } @@ -313,15 +314,16 @@ nm_os_catch_rx(struct netmap_generic_adapter *gna, int nm_os_ifnet_lock(); if (intercept) { if (gna->save_if_input) { - D("cannot intercept again"); - ret = EINVAL; /* already set */ + nm_prerr("RX on %s already intercepted", na->name); + ret = EBUSY; /* already set */ goto out; } gna->save_if_input = ifp->if_input; ifp->if_input = freebsd_generic_rx_handler; } else { - if (!gna->save_if_input){ - D("cannot restore"); + if (!gna->save_if_input) { + nm_prerr("Failed to undo RX intercept on %s", + na->name); ret = EINVAL; /* not saved */ goto out; } @@ -390,11 +392,11 @@ nm_os_generic_xmit_frame(struct nm_os_gen_arg *a) * we need to copy from the cluster to the netmap buffer. */ if (MBUF_REFCNT(m) != 1) { - D("invalid refcnt %d for %p", MBUF_REFCNT(m), m); + nm_prerr("invalid refcnt %d for %p", MBUF_REFCNT(m), m); panic("in generic_xmit_frame"); } if (m->m_ext.ext_size < len) { - RD(5, "size %d < len %d", m->m_ext.ext_size, len); + nm_prlim(2, "size %d < len %d", m->m_ext.ext_size, len); len = m->m_ext.ext_size; } bcopy(a->addr, m->m_data, len); @@ -457,7 +459,6 @@ nm_os_generic_set_features(struct netmap_generic_adapt void nm_os_mitigation_init(struct nm_generic_mit *mit, int idx, struct netmap_adapter *na) { - ND("called"); mit->mit_pending = 0; mit->mit_ring_idx = idx; mit->mit_na = na; @@ -467,21 +468,19 @@ nm_os_mitigation_init(struct nm_generic_mit *mit, int void nm_os_mitigation_start(struct nm_generic_mit *mit) { - ND("called"); } void nm_os_mitigation_restart(struct nm_generic_mit *mit) { - ND("called"); } int nm_os_mitigation_active(struct nm_generic_mit *mit) { - ND("called"); + return 0; } @@ -489,12 +488,12 @@ nm_os_mitigation_active(struct nm_generic_mit *mit) void nm_os_mitigation_cleanup(struct nm_generic_mit *mit) { - ND("called"); } static int nm_vi_dummy(struct ifnet *ifp, u_long cmd, caddr_t addr) { + return EINVAL; } @@ -557,7 +556,7 @@ nm_vi_free_index(uint8_t val) } } if (lim == nm_vi_indices.active) - D("funny, index %u didn't found", val); + nm_prerr("Index %u not found", val); mtx_unlock(&nm_vi_indices.lock); } #undef NM_VI_MAX @@ -595,7 +594,7 @@ nm_os_vi_persist(const char *name, struct ifnet **ret) ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - D("if_alloc failed"); + nm_prerr("if_alloc failed"); return ENOMEM; } if_initname(ifp, name, IF_DUNIT_NONE); @@ -636,7 +635,7 @@ struct nm_os_extmem { void nm_os_extmem_delete(struct nm_os_extmem *e) { - D("freeing %zx bytes", (size_t)e->size); + nm_prinf("freeing %zx bytes", (size_t)e->size); vm_map_remove(kernel_map, e->kva, e->kva + e->size); nm_os_free(e); } @@ -686,7 +685,7 @@ nm_os_extmem_create(unsigned long p, struct nmreq_pool rv = vm_map_lookup(&map, p, VM_PROT_RW, &entry, &obj, &index, &prot, &wired); if (rv != KERN_SUCCESS) { - D("address %lx not found", p); + nm_prerr("address %lx not found", p); goto out_free; } /* check that we are given the whole vm_object ? */ @@ -705,13 +704,13 @@ nm_os_extmem_create(unsigned long p, struct nmreq_pool VMFS_OPTIMAL_SPACE, VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | VM_PROT_WRITE, 0); if (rv != KERN_SUCCESS) { - D("vm_map_find(%zx) failed", (size_t)e->size); + nm_prerr("vm_map_find(%zx) failed", (size_t)e->size); goto out_rel; } rv = vm_map_wire(kernel_map, e->kva, e->kva + e->size, VM_MAP_WIRE_SYSTEM | VM_MAP_WIRE_NOHOLES); if (rv != KERN_SUCCESS) { - D("vm_map_wire failed"); + nm_prerr("vm_map_wire failed"); goto out_rem; } @@ -793,7 +792,7 @@ nm_os_pt_memdev_iomap(struct ptnetmap_memdev *ptn_dev, { int rid; - D("ptn_memdev_driver iomap"); + nm_prinf("ptn_memdev_driver iomap"); rid = PCIR_BAR(PTNETMAP_MEM_PCI_BAR); *mem_size = bus_read_4(ptn_dev->pci_io, PTNET_MDEV_IO_MEMSIZE_HI); @@ -812,7 +811,7 @@ nm_os_pt_memdev_iomap(struct ptnetmap_memdev *ptn_dev, *nm_paddr = rman_get_start(ptn_dev->pci_mem); *nm_addr = rman_get_virtual(ptn_dev->pci_mem); - D("=== BAR %d start %lx len %lx mem_size %lx ===", + nm_prinf("=== BAR %d start %lx len %lx mem_size %lx ===", PTNETMAP_MEM_PCI_BAR, (unsigned long)(*nm_paddr), (unsigned long)rman_get_size(ptn_dev->pci_mem), @@ -830,7 +829,7 @@ nm_os_pt_memdev_ioread(struct ptnetmap_memdev *ptn_dev void nm_os_pt_memdev_iounmap(struct ptnetmap_memdev *ptn_dev) { - D("ptn_memdev_driver iounmap"); + nm_prinf("ptn_memdev_driver iounmap"); if (ptn_dev->pci_mem) { bus_release_resource(ptn_dev->dev, SYS_RES_MEMORY, @@ -866,8 +865,6 @@ ptn_memdev_attach(device_t dev) int rid; uint16_t mem_id; - D("ptn_memdev_driver attach"); - ptn_dev = device_get_softc(dev); ptn_dev->dev = dev; @@ -891,7 +888,7 @@ ptn_memdev_attach(device_t dev) } netmap_mem_get(ptn_dev->nm_mem); - D("ptn_memdev_driver probe OK - host_mem_id: %d", mem_id); + nm_prinf("ptnetmap memdev attached, host memid: %u", mem_id); return (0); } @@ -902,10 +899,11 @@ ptn_memdev_detach(device_t dev) { struct ptnetmap_memdev *ptn_dev; - D("ptn_memdev_driver detach"); ptn_dev = device_get_softc(dev); if (ptn_dev->nm_mem) { + nm_prinf("ptnetmap memdev detached, host memid %u", + netmap_mem_get_id(ptn_dev->nm_mem)); netmap_mem_put(ptn_dev->nm_mem); ptn_dev->nm_mem = NULL; } @@ -926,7 +924,6 @@ ptn_memdev_detach(device_t dev) static int ptn_memdev_shutdown(device_t dev) { - D("ptn_memdev_driver shutdown"); return bus_generic_shutdown(dev); } @@ -951,7 +948,7 @@ netmap_dev_pager_ctor(void *handle, vm_ooffset_t size, struct netmap_vm_handle_t *vmh = handle; if (netmap_verbose) - D("handle %p size %jd prot %d foff %jd", + nm_prinf("handle %p size %jd prot %d foff %jd", handle, (intmax_t)size, prot, (intmax_t)foff); if (color) *color = 0; @@ -968,7 +965,7 @@ netmap_dev_pager_dtor(void *handle) struct netmap_priv_d *priv = vmh->priv; if (netmap_verbose) - D("handle %p", handle); + nm_prinf("handle %p", handle); netmap_dtor(priv); free(vmh, M_DEVBUF); dev_rel(dev); @@ -987,7 +984,7 @@ netmap_dev_pager_fault(vm_object_t object, vm_ooffset_ vm_memattr_t memattr; vm_pindex_t pidx; - ND("object %p offset %jd prot %d mres %p", + nm_prdis("object %p offset %jd prot %d mres %p", object, (intmax_t)offset, prot, mres); memattr = object->memattr; pidx = OFF_TO_IDX(offset); @@ -1043,7 +1040,7 @@ netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *fo vm_object_t obj; if (netmap_verbose) - D("cdev %p foff %jd size %jd objp %p prot %d", cdev, + nm_prinf("cdev %p foff %jd size %jd objp %p prot %d", cdev, (intmax_t )*foff, (intmax_t )objsize, objp, prot); vmh = malloc(sizeof(struct netmap_vm_handle_t), M_DEVBUF, @@ -1068,7 +1065,7 @@ netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *fo &netmap_cdev_pager_ops, objsize, prot, *foff, NULL); if (obj == NULL) { - D("cdev_pager_allocate failed"); + nm_prerr("cdev_pager_allocate failed"); error = EINVAL; goto err_deref; } @@ -1102,7 +1099,7 @@ static int netmap_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { if (netmap_verbose) - D("dev %p fflag 0x%x devtype %d td %p", + nm_prinf("dev %p fflag 0x%x devtype %d td %p", dev, fflag, devtype, td); return 0; } @@ -1253,11 +1250,11 @@ nm_os_kctx_worker_start(struct nm_kctx *nmk) goto err; } - D("nm_kthread started td %p", nmk->worker); + nm_prinf("nm_kthread started td %p", nmk->worker); return 0; err: - D("nm_kthread start failed err %d", error); + nm_prerr("nm_kthread start failed err %d", error); nmk->worker = NULL; return error; } @@ -1335,7 +1332,7 @@ netmap_knrdetach(struct knote *kn) struct netmap_priv_d *priv = (struct netmap_priv_d *)kn->kn_hook; struct selinfo *si = &priv->np_si[NR_RX]->si; - D("remove selinfo %p", si); + nm_prinf("remove selinfo %p", si); knlist_remove(&si->si_note, kn, /*islocked=*/0); } @@ -1345,7 +1342,7 @@ netmap_knwdetach(struct knote *kn) struct netmap_priv_d *priv = (struct netmap_priv_d *)kn->kn_hook; struct selinfo *si = &priv->np_si[NR_TX]->si; - D("remove selinfo %p", si); + nm_prinf("remove selinfo %p", si); knlist_remove(&si->si_note, kn, /*islocked=*/0); } @@ -1416,17 +1413,17 @@ netmap_kqfilter(struct cdev *dev, struct knote *kn) int ev = kn->kn_filter; if (ev != EVFILT_READ && ev != EVFILT_WRITE) { - D("bad filter request %d", ev); + nm_prerr("bad filter request %d", ev); return 1; } error = devfs_get_cdevpriv((void**)&priv); if (error) { - D("device not yet setup"); + nm_prerr("device not yet setup"); return 1; } na = priv->np_na; if (na == NULL) { - D("no netmap adapter for this file descriptor"); + nm_prerr("no netmap adapter for this file descriptor"); return 1; } /* the si is indicated in the priv */ @@ -1533,7 +1530,7 @@ netmap_loader(__unused struct module *module, int even * then the module can not be unloaded. */ if (netmap_use_count) { - D("netmap module can not be unloaded - netmap_use_count: %d", + nm_prerr("netmap module can not be unloaded - netmap_use_count: %d", netmap_use_count); error = EBUSY; break; Modified: stable/11/sys/dev/netmap/netmap_kloop.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_kloop.c Wed Feb 6 09:59:20 2019 (r343833) +++ stable/11/sys/dev/netmap/netmap_kloop.c Wed Feb 6 10:00:40 2019 (r343834) @@ -567,16 +567,12 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n /* Poll for notifications coming from the netmap rings bound to * this file descriptor. */ { - NM_SELINFO_T *si[NR_TXRX]; - NMG_LOCK(); - si[NR_RX] = nm_si_user(priv, NR_RX) ? &na->si[NR_RX] : - &na->rx_rings[priv->np_qfirst[NR_RX]]->si; - si[NR_TX] = nm_si_user(priv, NR_TX) ? &na->si[NR_TX] : - &na->tx_rings[priv->np_qfirst[NR_TX]]->si; + poll_wait(priv->np_filp, priv->np_si[NR_TX], + &poll_ctx->wait_table); + poll_wait(priv->np_filp, priv->np_si[NR_RX], + &poll_ctx->wait_table); NMG_UNLOCK(); - poll_wait(priv->np_filp, si[NR_TX], &poll_ctx->wait_table); - poll_wait(priv->np_filp, si[NR_RX], &poll_ctx->wait_table); } #else /* SYNC_KLOOP_POLL */ opt->nro_status = EOPNOTSUPP; @@ -657,7 +653,7 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n /* If a poll context is present, yield to the scheduler * waiting for a notification to come either from * netmap or the application. */ - schedule_timeout(msecs_to_jiffies(20000)); + schedule_timeout(msecs_to_jiffies(3000)); } else #endif /* SYNC_KLOOP_POLL */ { @@ -708,12 +704,31 @@ out: int netmap_sync_kloop_stop(struct netmap_priv_d *priv) { + struct netmap_adapter *na; bool running = true; int err = 0; + if (priv->np_nifp == NULL) { + return ENXIO; + } + mb(); /* make sure following reads are not from cache */ + + na = priv->np_na; + if (!nm_netmap_on(na)) { + return ENXIO; + } + + /* Set the kloop stopping flag. */ NMG_LOCK(); priv->np_kloop_state |= NM_SYNC_KLOOP_STOPPING; NMG_UNLOCK(); + + /* Send a notification to the kloop, in case it is blocked in + * schedule_timeout(). We can use either RX or TX, because the + * kloop is waiting on both. */ + nm_os_selwakeup(priv->np_si[NR_RX]); + + /* Wait for the kloop to actually terminate. */ while (running) { usleep_range(1000, 1500); NMG_LOCK(); From owner-svn-src-stable@freebsd.org Wed Feb 6 18:02:44 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D72414DAAFA; Wed, 6 Feb 2019 18:02:44 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 3336F77437; Wed, 6 Feb 2019 18:02:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 274608FF5; Wed, 6 Feb 2019 18:02:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x16I2ixM003522; Wed, 6 Feb 2019 18:02:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16I2i0T003521; Wed, 6 Feb 2019 18:02:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201902061802.x16I2i0T003521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 6 Feb 2019 18:02:44 +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: r343840 - stable/12/sys/dev/sound/usb X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/sound/usb X-SVN-Commit-Revision: 343840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3336F77437 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 18:02:44 -0000 Author: hselasky Date: Wed Feb 6 18:02:43 2019 New Revision: 343840 URL: https://svnweb.freebsd.org/changeset/base/343840 Log: MFC r343584: Export vendor specific USB MIDI device list to PnP info. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/sound/usb/uaudio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/12/sys/dev/sound/usb/uaudio.c Wed Feb 6 17:21:25 2019 (r343839) +++ stable/12/sys/dev/sound/usb/uaudio.c Wed Feb 6 18:02:43 2019 (r343840) @@ -6285,3 +6285,4 @@ MODULE_DEPEND(uaudio, usb, 1, 1, 1); MODULE_DEPEND(uaudio, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); MODULE_VERSION(uaudio, 1); USB_PNP_HOST_INFO(uaudio_devs); +USB_PNP_HOST_INFO(uaudio_vendor_midi); From owner-svn-src-stable@freebsd.org Wed Feb 6 18:43:31 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1931214DB9B3; Wed, 6 Feb 2019 18:43:31 +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) server-signature RSA-PSS (4096 bits) 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 B35AD80807; Wed, 6 Feb 2019 18:43:30 +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 A6D4696AC; Wed, 6 Feb 2019 18:43:30 +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 x16IhUL8024186; Wed, 6 Feb 2019 18:43:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16IhUGM024185; Wed, 6 Feb 2019 18:43:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201902061843.x16IhUGM024185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 6 Feb 2019 18:43:30 +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: r343841 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 343841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B35AD80807 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 18:43:31 -0000 Author: markj Date: Wed Feb 6 18:43:30 2019 New Revision: 343841 URL: https://svnweb.freebsd.org/changeset/base/343841 Log: MFC r343719: Fix a race in vm_page_dequeue_deferred(). Modified: stable/12/sys/vm/vm_page.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_page.c ============================================================================== --- stable/12/sys/vm/vm_page.c Wed Feb 6 18:02:43 2019 (r343840) +++ stable/12/sys/vm/vm_page.c Wed Feb 6 18:43:30 2019 (r343841) @@ -3275,18 +3275,13 @@ vm_page_dequeue_complete(vm_page_t m) void vm_page_dequeue_deferred(vm_page_t m) { - int queue; + uint8_t queue; vm_page_assert_locked(m); - queue = atomic_load_8(&m->queue); - if (queue == PQ_NONE) { - KASSERT((m->aflags & PGA_QUEUE_STATE_MASK) == 0, - ("page %p has queue state", m)); + if ((queue = vm_page_queue(m)) == PQ_NONE) return; - } - if ((m->aflags & PGA_DEQUEUE) == 0) - vm_page_aflag_set(m, PGA_DEQUEUE); + vm_page_aflag_set(m, PGA_DEQUEUE); vm_pqbatch_submit_page(m, queue); } @@ -3382,7 +3377,7 @@ vm_page_requeue(vm_page_t m) { vm_page_assert_locked(m); - KASSERT(m->queue != PQ_NONE, + KASSERT(vm_page_queue(m) != PQ_NONE, ("%s: page %p is not logically enqueued", __func__, m)); if ((m->aflags & PGA_REQUEUE) == 0) From owner-svn-src-stable@freebsd.org Thu Feb 7 01:50:00 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 709A514BA83D; Thu, 7 Feb 2019 01:50:00 +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) server-signature RSA-PSS (4096 bits) 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 0CC5A8E5F0; Thu, 7 Feb 2019 01:50:00 +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 F1F46DF78; Thu, 7 Feb 2019 01:49:59 +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 x171nx4a057421; Thu, 7 Feb 2019 01:49:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x171nx2L057418; Thu, 7 Feb 2019 01:49:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902070149.x171nx2L057418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Feb 2019 01:49: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: r343846 - stable/12/sys/dev/nvdimm X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/dev/nvdimm X-SVN-Commit-Revision: 343846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0CC5A8E5F0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 01:50:00 -0000 Author: kib Date: Thu Feb 7 01:49:59 2019 New Revision: 343846 URL: https://svnweb.freebsd.org/changeset/base/343846 Log: MFC r343628: nvdimm: enumerate NVDIMM SPA ranges from the root device Modified: stable/12/sys/dev/nvdimm/nvdimm.c stable/12/sys/dev/nvdimm/nvdimm_spa.c stable/12/sys/dev/nvdimm/nvdimm_var.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvdimm/nvdimm.c ============================================================================== --- stable/12/sys/dev/nvdimm/nvdimm.c Wed Feb 6 21:24:44 2019 (r343845) +++ stable/12/sys/dev/nvdimm/nvdimm.c Thu Feb 7 01:49:59 2019 (r343846) @@ -227,6 +227,31 @@ nvdimm_resume(device_t dev) return (0); } +static int +nvdimm_root_create_spa(void *nfitsubtbl, void *arg) +{ + enum SPA_mapping_type spa_type; + ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr; + struct SPA_mapping *spa; + struct nvdimm_root_dev *dev; + int error; + + nfitaddr = nfitsubtbl; + dev = arg; + spa_type = nvdimm_spa_type_from_uuid( + (struct uuid *)nfitaddr->RangeGuid); + if (spa_type == SPA_TYPE_UNKNOWN) + return (0); + spa = malloc(sizeof(struct SPA_mapping), M_NVDIMM, M_WAITOK | M_ZERO); + error = nvdimm_spa_init(spa, nfitaddr, spa_type); + if (error != 0) { + nvdimm_spa_fini(spa); + free(spa, M_NVDIMM); + } + SLIST_INSERT_HEAD(&dev->spas, spa, link); + return (0); +} + static ACPI_STATUS nvdimm_root_create_dev(ACPI_HANDLE handle, UINT32 nesting_level, void *context, void **return_value) @@ -276,6 +301,7 @@ nvdimm_root_attach(device_t dev) { ACPI_HANDLE handle; ACPI_STATUS status; + ACPI_TABLE_NFIT *nfitbl; int error; handle = acpi_get_handle(dev); @@ -284,15 +310,33 @@ nvdimm_root_attach(device_t dev) if (ACPI_FAILURE(status)) device_printf(dev, "failed adding children\n"); error = bus_generic_attach(dev); + if (error != 0) + return (error); + status = AcpiGetTable(ACPI_SIG_NFIT, 1, (ACPI_TABLE_HEADER **)&nfitbl); + if (ACPI_FAILURE(status)) { + device_printf(dev, "cannot get NFIT\n"); + return (ENXIO); + } + error = nvdimm_iterate_nfit(nfitbl, ACPI_NFIT_TYPE_SYSTEM_ADDRESS, + nvdimm_root_create_spa, device_get_softc(dev)); + AcpiPutTable(&nfitbl->Header); return (error); } static int nvdimm_root_detach(device_t dev) { + struct nvdimm_root_dev *root; + struct SPA_mapping *spa, *next; device_t *children; int i, error, num_children; + root = device_get_softc(dev); + SLIST_FOREACH_SAFE(spa, &root->spas, link, next) { + nvdimm_spa_fini(spa); + SLIST_REMOVE_HEAD(&root->spas, link); + free(spa, M_NVDIMM); + } error = bus_generic_detach(dev); if (error != 0) return (error); @@ -356,6 +400,7 @@ static device_method_t nvdimm_root_methods[] = { static driver_t nvdimm_root_driver = { "nvdimm_root", nvdimm_root_methods, + sizeof(struct nvdimm_root_dev), }; DRIVER_MODULE(nvdimm_root, acpi, nvdimm_root_driver, nvdimm_root_devclass, NULL, Modified: stable/12/sys/dev/nvdimm/nvdimm_spa.c ============================================================================== --- stable/12/sys/dev/nvdimm/nvdimm_spa.c Wed Feb 6 21:24:44 2019 (r343845) +++ stable/12/sys/dev/nvdimm/nvdimm_spa.c Thu Feb 7 01:49:59 2019 (r343846) @@ -82,19 +82,6 @@ __FBSDID("$FreeBSD$"); #define UUID_INITIALIZER_PERSISTENT_VIRTUAL_CD \ {0x08018188,0x42cd,0xbb48,0x10,0x0f,{0x53,0x87,0xd5,0x3d,0xed,0x3d}} -struct SPA_mapping *spa_mappings; -int spa_mappings_cnt; - -static int -nvdimm_spa_count(void *nfitsubtbl __unused, void *arg) -{ - int *cnt; - - cnt = arg; - (*cnt)++; - return (0); -} - static struct nvdimm_SPA_uuid_list_elm { const char *u_name; struct uuid u_id; @@ -418,22 +405,17 @@ nvdimm_spa_g_access(struct g_provider *pp, int r, int return (0); } -static g_init_t nvdimm_spa_g_init; -static g_fini_t nvdimm_spa_g_fini; - struct g_class nvdimm_spa_g_class = { .name = "SPA", .version = G_VERSION, .start = nvdimm_spa_g_start, .access = nvdimm_spa_g_access, - .init = nvdimm_spa_g_init, - .fini = nvdimm_spa_g_fini, }; DECLARE_GEOM_CLASS(nvdimm_spa_g_class, g_spa); -static int -nvdimm_spa_init_one(struct SPA_mapping *spa, ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr, - int spa_type) +int +nvdimm_spa_init(struct SPA_mapping *spa, ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr, + enum SPA_mapping_type spa_type) { struct make_dev_args mda; struct sglist *spa_sg; @@ -511,7 +493,7 @@ nvdimm_spa_init_one(struct SPA_mapping *spa, ACPI_NFIT if (error1 == 0) error1 = error; } else { - g_topology_assert(); + g_topology_lock(); spa->spa_g = g_new_geomf(&nvdimm_spa_g_class, "spa%d", spa->spa_nfit_idx); spa->spa_g->softc = spa; @@ -525,12 +507,13 @@ nvdimm_spa_init_one(struct SPA_mapping *spa, ACPI_NFIT spa->spa_g_devstat = devstat_new_entry("spa", spa->spa_nfit_idx, DEV_BSIZE, DEVSTAT_ALL_SUPPORTED, DEVSTAT_TYPE_DIRECT, DEVSTAT_PRIORITY_MAX); + g_topology_unlock(); } return (error1); } -static void -nvdimm_spa_fini_one(struct SPA_mapping *spa) +void +nvdimm_spa_fini(struct SPA_mapping *spa) { mtx_lock(&spa->spa_g_mtx); @@ -561,88 +544,4 @@ nvdimm_spa_fini_one(struct SPA_mapping *spa) } mtx_destroy(&spa->spa_g_mtx); mtx_destroy(&spa->spa_g_stat_mtx); -} - -static int -nvdimm_spa_parse(void *nfitsubtbl, void *arg) -{ - ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr; - struct SPA_mapping *spa; - enum SPA_mapping_type spa_type; - int error, *i; - - i = arg; - spa = &spa_mappings[(*i)++]; - nfitaddr = nfitsubtbl; - spa_type = nvdimm_spa_type_from_uuid( - (struct uuid *)&nfitaddr->RangeGuid); - if (spa_type == SPA_TYPE_UNKNOWN) { - printf("Unknown SPA UUID %d ", nfitaddr->RangeIndex); - printf_uuid((struct uuid *)&nfitaddr->RangeGuid); - printf("\n"); - return (0); - } - error = nvdimm_spa_init_one(spa, nfitaddr, spa_type); - if (error != 0) - nvdimm_spa_fini_one(spa); - return (0); -} - -static int -nvdimm_spa_init1(ACPI_TABLE_NFIT *nfitbl) -{ - int error, i; - - error = nvdimm_iterate_nfit(nfitbl, ACPI_NFIT_TYPE_SYSTEM_ADDRESS, - nvdimm_spa_count, &spa_mappings_cnt); - if (error != 0) - return (error); - spa_mappings = malloc(sizeof(struct SPA_mapping) * spa_mappings_cnt, - M_NVDIMM, M_WAITOK | M_ZERO); - i = 0; - error = nvdimm_iterate_nfit(nfitbl, ACPI_NFIT_TYPE_SYSTEM_ADDRESS, - nvdimm_spa_parse, &i); - if (error != 0) { - free(spa_mappings, M_NVDIMM); - spa_mappings = NULL; - return (error); - } - return (0); -} - -static void -nvdimm_spa_g_init(struct g_class *mp __unused) -{ - ACPI_TABLE_NFIT *nfitbl; - ACPI_STATUS status; - int error; - - spa_mappings_cnt = 0; - spa_mappings = NULL; - if (acpi_disabled("nvdimm")) - return; - status = AcpiGetTable(ACPI_SIG_NFIT, 1, (ACPI_TABLE_HEADER **)&nfitbl); - if (ACPI_FAILURE(status)) { - if (bootverbose) - printf("nvdimm_spa_g_init: cannot find NFIT\n"); - return; - } - error = nvdimm_spa_init1(nfitbl); - if (error != 0) - printf("nvdimm_spa_g_init: error %d\n", error); - AcpiPutTable(&nfitbl->Header); -} - -static void -nvdimm_spa_g_fini(struct g_class *mp __unused) -{ - int i; - - if (spa_mappings == NULL) - return; - for (i = 0; i < spa_mappings_cnt; i++) - nvdimm_spa_fini_one(&spa_mappings[i]); - free(spa_mappings, M_NVDIMM); - spa_mappings = NULL; - spa_mappings_cnt = 0; } Modified: stable/12/sys/dev/nvdimm/nvdimm_var.h ============================================================================== --- stable/12/sys/dev/nvdimm/nvdimm_var.h Wed Feb 6 21:24:44 2019 (r343845) +++ stable/12/sys/dev/nvdimm/nvdimm_var.h Thu Feb 7 01:49:59 2019 (r343846) @@ -44,6 +44,10 @@ __BUS_ACCESSOR(nvdimm_root, acpi_handle, NVDIMM_ROOT, __BUS_ACCESSOR(nvdimm_root, device_handle, NVDIMM_ROOT, DEVICE_HANDLE, nfit_handle_t) +struct nvdimm_root_dev { + SLIST_HEAD(, SPA_mapping) spas; +}; + struct nvdimm_dev { device_t nv_dev; nfit_handle_t nv_handle; @@ -64,6 +68,7 @@ enum SPA_mapping_type { }; struct SPA_mapping { + SLIST_ENTRY(SPA_mapping) link; enum SPA_mapping_type spa_type; int spa_domain; int spa_nfit_idx; @@ -84,14 +89,14 @@ struct SPA_mapping { bool spa_g_proc_exiting; }; -extern struct SPA_mapping *spa_mappings; -extern int spa_mappings_cnt; - MALLOC_DECLARE(M_NVDIMM); enum SPA_mapping_type nvdimm_spa_type_from_uuid(struct uuid *); struct nvdimm_dev *nvdimm_find_by_handle(nfit_handle_t nv_handle); int nvdimm_iterate_nfit(ACPI_TABLE_NFIT *nfitbl, enum AcpiNfitType type, int (*cb)(void *, void *), void *arg); +int nvdimm_spa_init(struct SPA_mapping *spa, ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr, + enum SPA_mapping_type spa_type); +void nvdimm_spa_fini(struct SPA_mapping *spa); #endif /* __DEV_NVDIMM_VAR_H__ */ From owner-svn-src-stable@freebsd.org Thu Feb 7 01:51:54 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED8A814BA9BB; Thu, 7 Feb 2019 01:51:53 +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) server-signature RSA-PSS (4096 bits) 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 9C79F8E82F; Thu, 7 Feb 2019 01:51:53 +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 91797DFDE; Thu, 7 Feb 2019 01:51:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x171pr6v061466; Thu, 7 Feb 2019 01:51:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x171pqiw061463; Thu, 7 Feb 2019 01:51:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902070151.x171pqiw061463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Feb 2019 01:51: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: r343847 - in stable/12/sys: dev/nvdimm modules/nvdimm X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: dev/nvdimm modules/nvdimm X-SVN-Commit-Revision: 343847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9C79F8E82F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 01:51:54 -0000 Author: kib Date: Thu Feb 7 01:51:52 2019 New Revision: 343847 URL: https://svnweb.freebsd.org/changeset/base/343847 Log: MFC r343629: nvdimm: only enumerate present nvdimm devices Added: stable/12/sys/dev/nvdimm/nvdimm_nfit.c - copied unchanged from r343629, head/sys/dev/nvdimm/nvdimm_nfit.c Modified: stable/12/sys/dev/nvdimm/nvdimm.c stable/12/sys/dev/nvdimm/nvdimm_var.h stable/12/sys/modules/nvdimm/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvdimm/nvdimm.c ============================================================================== --- stable/12/sys/dev/nvdimm/nvdimm.c Thu Feb 7 01:49:59 2019 (r343846) +++ stable/12/sys/dev/nvdimm/nvdimm.c Thu Feb 7 01:51:52 2019 (r343847) @@ -77,99 +77,6 @@ nvdimm_find_by_handle(nfit_handle_t nv_handle) } static int -nvdimm_parse_flush_addr(void *nfitsubtbl, void *arg) -{ - ACPI_NFIT_FLUSH_ADDRESS *nfitflshaddr; - struct nvdimm_dev *nv; - int i; - - nfitflshaddr = nfitsubtbl; - nv = arg; - if (nfitflshaddr->DeviceHandle != nv->nv_handle) - return (0); - - MPASS(nv->nv_flush_addr == NULL && nv->nv_flush_addr_cnt == 0); - nv->nv_flush_addr = mallocarray(nfitflshaddr->HintCount, - sizeof(uint64_t *), M_NVDIMM, M_WAITOK); - for (i = 0; i < nfitflshaddr->HintCount; i++) - nv->nv_flush_addr[i] = (uint64_t *)nfitflshaddr->HintAddress[i]; - nv->nv_flush_addr_cnt = nfitflshaddr->HintCount; - return (0); -} - -int -nvdimm_iterate_nfit(ACPI_TABLE_NFIT *nfitbl, enum AcpiNfitType type, - int (*cb)(void *, void *), void *arg) -{ - ACPI_NFIT_HEADER *nfithdr; - ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr; - ACPI_NFIT_MEMORY_MAP *nfitmap; - ACPI_NFIT_INTERLEAVE *nfitintrl; - ACPI_NFIT_SMBIOS *nfitsmbios; - ACPI_NFIT_CONTROL_REGION *nfitctlreg; - ACPI_NFIT_DATA_REGION *nfitdtreg; - ACPI_NFIT_FLUSH_ADDRESS *nfitflshaddr; - char *ptr; - int error; - - error = 0; - for (ptr = (char *)(nfitbl + 1); - ptr < (char *)nfitbl + nfitbl->Header.Length; - ptr += nfithdr->Length) { - nfithdr = (ACPI_NFIT_HEADER *)ptr; - if (nfithdr->Type != type) - continue; - switch (nfithdr->Type) { - case ACPI_NFIT_TYPE_SYSTEM_ADDRESS: - nfitaddr = __containerof(nfithdr, - ACPI_NFIT_SYSTEM_ADDRESS, Header); - error = cb(nfitaddr, arg); - break; - case ACPI_NFIT_TYPE_MEMORY_MAP: - nfitmap = __containerof(nfithdr, - ACPI_NFIT_MEMORY_MAP, Header); - error = cb(nfitmap, arg); - break; - case ACPI_NFIT_TYPE_INTERLEAVE: - nfitintrl = __containerof(nfithdr, - ACPI_NFIT_INTERLEAVE, Header); - error = cb(nfitintrl, arg); - break; - case ACPI_NFIT_TYPE_SMBIOS: - nfitsmbios = __containerof(nfithdr, - ACPI_NFIT_SMBIOS, Header); - error = cb(nfitsmbios, arg); - break; - case ACPI_NFIT_TYPE_CONTROL_REGION: - nfitctlreg = __containerof(nfithdr, - ACPI_NFIT_CONTROL_REGION, Header); - error = cb(nfitctlreg, arg); - break; - case ACPI_NFIT_TYPE_DATA_REGION: - nfitdtreg = __containerof(nfithdr, - ACPI_NFIT_DATA_REGION, Header); - error = cb(nfitdtreg, arg); - break; - case ACPI_NFIT_TYPE_FLUSH_ADDRESS: - nfitflshaddr = __containerof(nfithdr, - ACPI_NFIT_FLUSH_ADDRESS, Header); - error = cb(nfitflshaddr, arg); - break; - case ACPI_NFIT_TYPE_RESERVED: - default: - if (bootverbose) - printf("NFIT subtype %d unknown\n", - nfithdr->Type); - error = 0; - break; - } - if (error != 0) - break; - } - return (error); -} - -static int nvdimm_probe(device_t dev) { @@ -197,8 +104,8 @@ nvdimm_attach(device_t dev) device_printf(dev, "cannot get NFIT\n"); return (ENXIO); } - nvdimm_iterate_nfit(nfitbl, ACPI_NFIT_TYPE_FLUSH_ADDRESS, - nvdimm_parse_flush_addr, nv); + acpi_nfit_get_flush_addrs(nfitbl, nv->nv_handle, &nv->nv_flush_addr, + &nv->nv_flush_addr_cnt); AcpiPutTable(&nfitbl->Header); return (0); } @@ -227,57 +134,92 @@ nvdimm_resume(device_t dev) return (0); } -static int -nvdimm_root_create_spa(void *nfitsubtbl, void *arg) +static ACPI_STATUS +find_dimm(ACPI_HANDLE handle, UINT32 nesting_level, void *context, + void **return_value) { - enum SPA_mapping_type spa_type; - ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr; - struct SPA_mapping *spa; - struct nvdimm_root_dev *dev; - int error; + ACPI_DEVICE_INFO *device_info; + ACPI_STATUS status; - nfitaddr = nfitsubtbl; - dev = arg; - spa_type = nvdimm_spa_type_from_uuid( - (struct uuid *)nfitaddr->RangeGuid); - if (spa_type == SPA_TYPE_UNKNOWN) - return (0); - spa = malloc(sizeof(struct SPA_mapping), M_NVDIMM, M_WAITOK | M_ZERO); - error = nvdimm_spa_init(spa, nfitaddr, spa_type); - if (error != 0) { - nvdimm_spa_fini(spa); - free(spa, M_NVDIMM); + status = AcpiGetObjectInfo(handle, &device_info); + if (ACPI_FAILURE(status)) + return_ACPI_STATUS(AE_ERROR); + if (device_info->Address == (uintptr_t)context) { + *(ACPI_HANDLE *)return_value = handle; + return_ACPI_STATUS(AE_CTRL_TERMINATE); } - SLIST_INSERT_HEAD(&dev->spas, spa, link); - return (0); + return_ACPI_STATUS(AE_OK); } -static ACPI_STATUS -nvdimm_root_create_dev(ACPI_HANDLE handle, UINT32 nesting_level, void *context, - void **return_value) +static ACPI_HANDLE +get_dimm_acpi_handle(ACPI_HANDLE root_handle, nfit_handle_t adr) { + ACPI_HANDLE res; ACPI_STATUS status; - ACPI_DEVICE_INFO *device_info; - device_t parent, child; + + res = NULL; + status = AcpiWalkNamespace(ACPI_TYPE_DEVICE, root_handle, 1, find_dimm, + NULL, (void *)(uintptr_t)adr, &res); + if (ACPI_FAILURE(status)) + res = NULL; + return (res); +} + +static int +nvdimm_root_create_devs(device_t dev, ACPI_TABLE_NFIT *nfitbl) +{ + ACPI_HANDLE root_handle, dimm_handle; + device_t child; + nfit_handle_t *dimm_ids, *dimm; uintptr_t *ivars; + int num_dimm_ids; - parent = context; - child = BUS_ADD_CHILD(parent, 100, "nvdimm", -1); - if (child == NULL) { - device_printf(parent, "failed to create nvdimm\n"); - return_ACPI_STATUS(AE_ERROR); + root_handle = acpi_get_handle(dev); + acpi_nfit_get_dimm_ids(nfitbl, &dimm_ids, &num_dimm_ids); + for (dimm = dimm_ids; dimm < dimm_ids + num_dimm_ids; dimm++) { + dimm_handle = get_dimm_acpi_handle(root_handle, *dimm); + child = BUS_ADD_CHILD(dev, 100, "nvdimm", -1); + if (child == NULL) { + device_printf(dev, "failed to create nvdimm\n"); + return (ENXIO); + } + ivars = mallocarray(NVDIMM_ROOT_IVAR_MAX, sizeof(uintptr_t), + M_NVDIMM, M_ZERO | M_WAITOK); + device_set_ivars(child, ivars); + nvdimm_root_set_acpi_handle(child, dimm_handle); + nvdimm_root_set_device_handle(child, *dimm); } - status = AcpiGetObjectInfo(handle, &device_info); - if (ACPI_FAILURE(status)) { - device_printf(parent, "failed to get nvdimm device info\n"); - return_ACPI_STATUS(AE_ERROR); + free(dimm_ids, M_NVDIMM); + return (0); +} + +static int +nvdimm_root_create_spas(struct nvdimm_root_dev *dev, ACPI_TABLE_NFIT *nfitbl) +{ + ACPI_NFIT_SYSTEM_ADDRESS **spas, **spa; + struct SPA_mapping *spa_mapping; + enum SPA_mapping_type spa_type; + int error, num_spas; + + error = 0; + acpi_nfit_get_spa_ranges(nfitbl, &spas, &num_spas); + for (spa = spas; spa < spas + num_spas; spa++) { + spa_type = nvdimm_spa_type_from_uuid( + (struct uuid *)(*spa)->RangeGuid); + if (spa_type == SPA_TYPE_UNKNOWN) + continue; + spa_mapping = malloc(sizeof(struct SPA_mapping), M_NVDIMM, + M_WAITOK | M_ZERO); + error = nvdimm_spa_init(spa_mapping, *spa, spa_type); + if (error != 0) { + nvdimm_spa_fini(spa_mapping); + free(spa, M_NVDIMM); + break; + } + SLIST_INSERT_HEAD(&dev->spas, spa_mapping, link); } - ivars = mallocarray(NVDIMM_ROOT_IVAR_MAX - 1, sizeof(uintptr_t), - M_NVDIMM, M_ZERO | M_WAITOK); - device_set_ivars(child, ivars); - nvdimm_root_set_acpi_handle(child, handle); - nvdimm_root_set_device_handle(child, device_info->Address); - return_ACPI_STATUS(AE_OK); + free(spas, M_NVDIMM); + return (error); } static char *nvdimm_root_id[] = {"ACPI0012", NULL}; @@ -299,26 +241,24 @@ nvdimm_root_probe(device_t dev) static int nvdimm_root_attach(device_t dev) { - ACPI_HANDLE handle; - ACPI_STATUS status; + struct nvdimm_root_dev *root; ACPI_TABLE_NFIT *nfitbl; + ACPI_STATUS status; int error; - handle = acpi_get_handle(dev); - status = AcpiWalkNamespace(ACPI_TYPE_DEVICE, handle, 1, - nvdimm_root_create_dev, NULL, dev, NULL); - if (ACPI_FAILURE(status)) - device_printf(dev, "failed adding children\n"); - error = bus_generic_attach(dev); - if (error != 0) - return (error); status = AcpiGetTable(ACPI_SIG_NFIT, 1, (ACPI_TABLE_HEADER **)&nfitbl); if (ACPI_FAILURE(status)) { device_printf(dev, "cannot get NFIT\n"); return (ENXIO); } - error = nvdimm_iterate_nfit(nfitbl, ACPI_NFIT_TYPE_SYSTEM_ADDRESS, - nvdimm_root_create_spa, device_get_softc(dev)); + error = nvdimm_root_create_devs(dev, nfitbl); + if (error != 0) + return (error); + error = bus_generic_attach(dev); + if (error != 0) + return (error); + root = device_get_softc(dev); + error = nvdimm_root_create_spas(root, nfitbl); AcpiPutTable(&nfitbl->Header); return (error); } Copied: stable/12/sys/dev/nvdimm/nvdimm_nfit.c (from r343629, head/sys/dev/nvdimm/nvdimm_nfit.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dev/nvdimm/nvdimm_nfit.c Thu Feb 7 01:51:52 2019 (r343847, copy of r343629, head/sys/dev/nvdimm/nvdimm_nfit.c) @@ -0,0 +1,203 @@ +/*- + * Copyright (c) 2018 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include + +static int +uint32_t_compare(const void *a, const void *b) +{ + + return (*(const uint32_t *)a - *(const uint32_t *)b); +} + +static int +find_matches(ACPI_TABLE_NFIT *nfitbl, uint16_t type, uint16_t offset, + uint64_t mask, uint64_t value, void **ptrs, int ptrs_len) +{ + ACPI_NFIT_HEADER *h, *end; + uint64_t val; + size_t load_size; + int count; + + h = (ACPI_NFIT_HEADER *)(nfitbl + 1); + end = (ACPI_NFIT_HEADER *)((char *)nfitbl + + nfitbl->Header.Length); + load_size = roundup2(flsl(mask), 8) / 8; + count = 0; + + while (h < end) { + if (h->Type == type) { + bcopy((char *)h + offset, &val, load_size); + val &= mask; + if (val == value) { + if (ptrs_len > 0) { + ptrs[count] = h; + ptrs_len--; + } + count++; + } + } + if (h->Length == 0) + break; + h = (ACPI_NFIT_HEADER *)((char *)h + h->Length); + } + return (count); +} + +static void +malloc_find_matches(ACPI_TABLE_NFIT *nfitbl, uint16_t type, uint16_t offset, + uint64_t mask, uint64_t value, void ***ptrs, int *ptrs_len) +{ + int count; + + count = find_matches(nfitbl, type, offset, mask, value, NULL, 0); + *ptrs_len = count; + if (count == 0) { + *ptrs = NULL; + return; + } + *ptrs = mallocarray(count, sizeof(void *), M_NVDIMM, M_WAITOK); + find_matches(nfitbl, type, offset, mask, value, *ptrs, *ptrs_len); +} + +void +acpi_nfit_get_dimm_ids(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t **listp, + int *countp) +{ + ACPI_NFIT_SYSTEM_ADDRESS **spas; + ACPI_NFIT_MEMORY_MAP ***regions; + int i, j, k, maxids, num_spas, *region_counts; + + acpi_nfit_get_spa_ranges(nfitbl, &spas, &num_spas); + if (num_spas == 0) { + *listp = NULL; + *countp = 0; + return; + } + regions = mallocarray(num_spas, sizeof(uint16_t *), M_NVDIMM, + M_WAITOK); + region_counts = mallocarray(num_spas, sizeof(int), M_NVDIMM, M_WAITOK); + for (i = 0; i < num_spas; i++) { + acpi_nfit_get_region_mappings_by_spa_range(nfitbl, + spas[i]->RangeIndex, ®ions[i], ®ion_counts[i]); + } + maxids = 0; + for (i = 0; i < num_spas; i++) { + maxids += region_counts[i]; + } + *listp = mallocarray(maxids, sizeof(nfit_handle_t), M_NVDIMM, M_WAITOK); + k = 0; + for (i = 0; i < num_spas; i++) { + for (j = 0; j < region_counts[i]; j++) + (*listp)[k++] = regions[i][j]->DeviceHandle; + } + qsort((*listp), maxids, sizeof(uint32_t), uint32_t_compare); + i = 0; + for (j = 1; j < maxids; j++) { + if ((*listp)[i] != (*listp)[j]) + (*listp)[++i] = (*listp)[j]; + } + *countp = i + 1; + free(region_counts, M_NVDIMM); + for (i = 0; i < num_spas; i++) + free(regions[i], M_NVDIMM); + free(regions, M_NVDIMM); + free(spas, M_NVDIMM); +} + +void +acpi_nfit_get_spa_range(ACPI_TABLE_NFIT *nfitbl, uint16_t range_index, + ACPI_NFIT_SYSTEM_ADDRESS **spa) +{ + + *spa = NULL; + find_matches(nfitbl, ACPI_NFIT_TYPE_SYSTEM_ADDRESS, + offsetof(ACPI_NFIT_SYSTEM_ADDRESS, RangeIndex), UINT16_MAX, + range_index, (void **)spa, 1); +} + +void +acpi_nfit_get_spa_ranges(ACPI_TABLE_NFIT *nfitbl, + ACPI_NFIT_SYSTEM_ADDRESS ***listp, int *countp) +{ + + malloc_find_matches(nfitbl, ACPI_NFIT_TYPE_SYSTEM_ADDRESS, 0, 0, 0, + (void ***)listp, countp); +} + +void +acpi_nfit_get_region_mappings_by_spa_range(ACPI_TABLE_NFIT *nfitbl, + uint16_t spa_range_index, ACPI_NFIT_MEMORY_MAP ***listp, int *countp) +{ + + malloc_find_matches(nfitbl, ACPI_NFIT_TYPE_MEMORY_MAP, + offsetof(ACPI_NFIT_MEMORY_MAP, RangeIndex), UINT16_MAX, + spa_range_index, (void ***)listp, countp); +} + +void acpi_nfit_get_control_region(ACPI_TABLE_NFIT *nfitbl, + uint16_t control_region_index, ACPI_NFIT_CONTROL_REGION **out) +{ + + *out = NULL; + find_matches(nfitbl, ACPI_NFIT_TYPE_CONTROL_REGION, + offsetof(ACPI_NFIT_CONTROL_REGION, RegionIndex), UINT16_MAX, + control_region_index, (void **)out, 1); +} + +void +acpi_nfit_get_flush_addrs(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, + uint64_t ***listp, int *countp) +{ + ACPI_NFIT_FLUSH_ADDRESS *subtable; + int i; + + subtable = NULL; + find_matches(nfitbl, ACPI_NFIT_TYPE_FLUSH_ADDRESS, + offsetof(ACPI_NFIT_FLUSH_ADDRESS, DeviceHandle), UINT32_MAX, + dimm, (void **)&subtable, 1); + if (subtable == NULL || subtable->HintCount == 0) { + *listp = NULL; + *countp = 0; + return; + } + *countp = subtable->HintCount; + *listp = mallocarray(subtable->HintCount, sizeof(uint64_t *), M_NVDIMM, + M_WAITOK); + for (i = 0; i < subtable->HintCount; i++) + (*listp)[i] = (uint64_t *)(intptr_t)subtable->HintAddress[i]; +} Modified: stable/12/sys/dev/nvdimm/nvdimm_var.h ============================================================================== --- stable/12/sys/dev/nvdimm/nvdimm_var.h Thu Feb 7 01:49:59 2019 (r343846) +++ stable/12/sys/dev/nvdimm/nvdimm_var.h Thu Feb 7 01:51:52 2019 (r343847) @@ -91,10 +91,20 @@ struct SPA_mapping { MALLOC_DECLARE(M_NVDIMM); +void acpi_nfit_get_dimm_ids(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t **listp, + int *countp); +void acpi_nfit_get_spa_range(ACPI_TABLE_NFIT *nfitbl, uint16_t range_index, + ACPI_NFIT_SYSTEM_ADDRESS **spa); +void acpi_nfit_get_spa_ranges(ACPI_TABLE_NFIT *nfitbl, + ACPI_NFIT_SYSTEM_ADDRESS ***listp, int *countp); +void acpi_nfit_get_region_mappings_by_spa_range(ACPI_TABLE_NFIT *nfitbl, + uint16_t spa_range_index, ACPI_NFIT_MEMORY_MAP ***listp, int *countp); +void acpi_nfit_get_control_region(ACPI_TABLE_NFIT *nfitbl, + uint16_t control_region_index, ACPI_NFIT_CONTROL_REGION **out); +void acpi_nfit_get_flush_addrs(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, + uint64_t ***listp, int *countp); enum SPA_mapping_type nvdimm_spa_type_from_uuid(struct uuid *); struct nvdimm_dev *nvdimm_find_by_handle(nfit_handle_t nv_handle); -int nvdimm_iterate_nfit(ACPI_TABLE_NFIT *nfitbl, enum AcpiNfitType type, - int (*cb)(void *, void *), void *arg); int nvdimm_spa_init(struct SPA_mapping *spa, ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr, enum SPA_mapping_type spa_type); void nvdimm_spa_fini(struct SPA_mapping *spa); Modified: stable/12/sys/modules/nvdimm/Makefile ============================================================================== --- stable/12/sys/modules/nvdimm/Makefile Thu Feb 7 01:49:59 2019 (r343846) +++ stable/12/sys/modules/nvdimm/Makefile Thu Feb 7 01:51:52 2019 (r343847) @@ -4,6 +4,7 @@ KMOD= nvdimm SRCS= nvdimm.c \ + nvdimm_nfit.c \ nvdimm_spa.c SRCS+= acpi_if.h bus_if.h device_if.h From owner-svn-src-stable@freebsd.org Thu Feb 7 01:54:35 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87A9D14BACCE; Thu, 7 Feb 2019 01:54:35 +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) server-signature RSA-PSS (4096 bits) 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 2542D8EB5F; Thu, 7 Feb 2019 01:54:35 +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 17999E135; Thu, 7 Feb 2019 01:54:35 +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 x171sYrK062542; Thu, 7 Feb 2019 01:54:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x171sYPu062540; Thu, 7 Feb 2019 01:54:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902070154.x171sYPu062540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Feb 2019 01:54: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: r343848 - in stable/12/sys/x86: include x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys/x86: include x86 X-SVN-Commit-Revision: 343848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2542D8EB5F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 01:54:35 -0000 Author: kib Date: Thu Feb 7 01:54:34 2019 New Revision: 343848 URL: https://svnweb.freebsd.org/changeset/base/343848 Log: MFC r343757: Update CPUID bits definitions and CPU identification based on changes in SDM rev. 069. Modified: stable/12/sys/x86/include/specialreg.h stable/12/sys/x86/x86/identcpu.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/x86/include/specialreg.h ============================================================================== --- stable/12/sys/x86/include/specialreg.h Thu Feb 7 01:51:52 2019 (r343847) +++ stable/12/sys/x86/include/specialreg.h Thu Feb 7 01:54:34 2019 (r343848) @@ -419,7 +419,12 @@ #define CPUID_STDEXT2_UMIP 0x00000004 #define CPUID_STDEXT2_PKU 0x00000008 #define CPUID_STDEXT2_OSPKE 0x00000010 +#define CPUID_STDEXT2_WAITPKG 0x00000020 +#define CPUID_STDEXT2_GFNI 0x00000100 #define CPUID_STDEXT2_RDPID 0x00400000 +#define CPUID_STDEXT2_CLDEMOTE 0x02000000 +#define CPUID_STDEXT2_MOVDIRI 0x08000000 +#define CPUID_STDEXT2_MOVDIRI64B 0x10000000 #define CPUID_STDEXT2_SGXLC 0x40000000 /* @@ -429,6 +434,7 @@ #define CPUID_STDEXT3_STIBP 0x08000000 #define CPUID_STDEXT3_L1D_FLUSH 0x10000000 #define CPUID_STDEXT3_ARCH_CAP 0x20000000 +#define CPUID_STDEXT3_CORE_CAP 0x40000000 #define CPUID_STDEXT3_SSBD 0x80000000 /* MSR IA32_ARCH_CAP(ABILITIES) bits */ Modified: stable/12/sys/x86/x86/identcpu.c ============================================================================== --- stable/12/sys/x86/x86/identcpu.c Thu Feb 7 01:51:52 2019 (r343847) +++ stable/12/sys/x86/x86/identcpu.c Thu Feb 7 01:54:34 2019 (r343848) @@ -978,7 +978,12 @@ printcpuinfo(void) "\003UMIP" "\004PKU" "\005OSPKE" + "\006WAITPKG" + "\011GFNI" "\027RDPID" + "\032CLDEMOTE" + "\034MOVDIRI" + "\035MOVDIRI64B" "\037SGXLC" ); } @@ -991,6 +996,7 @@ printcpuinfo(void) "\034STIBP" "\035L1DFL" "\036ARCH_CAP" + "\037CORE_CAP" "\040SSBD" ); } From owner-svn-src-stable@freebsd.org Thu Feb 7 01:55:13 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D58CA14BAD59; Thu, 7 Feb 2019 01:55:12 +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) server-signature RSA-PSS (4096 bits) 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 77E3B8EC99; Thu, 7 Feb 2019 01:55:12 +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 6D988E137; Thu, 7 Feb 2019 01:55:12 +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 x171tCDH062655; Thu, 7 Feb 2019 01:55:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x171tCoQ062653; Thu, 7 Feb 2019 01:55:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902070155.x171tCoQ062653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Feb 2019 01:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343849 - in stable/11/sys/x86: include x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys/x86: include x86 X-SVN-Commit-Revision: 343849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 77E3B8EC99 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 01:55:13 -0000 Author: kib Date: Thu Feb 7 01:55:11 2019 New Revision: 343849 URL: https://svnweb.freebsd.org/changeset/base/343849 Log: MFC r343757: Update CPUID bits definitions and CPU identification based on changes in SDM rev. 069. Modified: stable/11/sys/x86/include/specialreg.h stable/11/sys/x86/x86/identcpu.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/include/specialreg.h ============================================================================== --- stable/11/sys/x86/include/specialreg.h Thu Feb 7 01:54:34 2019 (r343848) +++ stable/11/sys/x86/include/specialreg.h Thu Feb 7 01:55:11 2019 (r343849) @@ -379,7 +379,12 @@ #define CPUID_STDEXT2_UMIP 0x00000004 #define CPUID_STDEXT2_PKU 0x00000008 #define CPUID_STDEXT2_OSPKE 0x00000010 +#define CPUID_STDEXT2_WAITPKG 0x00000020 +#define CPUID_STDEXT2_GFNI 0x00000100 #define CPUID_STDEXT2_RDPID 0x00400000 +#define CPUID_STDEXT2_CLDEMOTE 0x02000000 +#define CPUID_STDEXT2_MOVDIRI 0x08000000 +#define CPUID_STDEXT2_MOVDIRI64B 0x10000000 #define CPUID_STDEXT2_SGXLC 0x40000000 /* @@ -389,6 +394,7 @@ #define CPUID_STDEXT3_STIBP 0x08000000 #define CPUID_STDEXT3_L1D_FLUSH 0x10000000 #define CPUID_STDEXT3_ARCH_CAP 0x20000000 +#define CPUID_STDEXT3_CORE_CAP 0x40000000 #define CPUID_STDEXT3_SSBD 0x80000000 /* MSR IA32_ARCH_CAP(ABILITIES) bits */ Modified: stable/11/sys/x86/x86/identcpu.c ============================================================================== --- stable/11/sys/x86/x86/identcpu.c Thu Feb 7 01:54:34 2019 (r343848) +++ stable/11/sys/x86/x86/identcpu.c Thu Feb 7 01:55:11 2019 (r343849) @@ -977,7 +977,12 @@ printcpuinfo(void) "\003UMIP" "\004PKU" "\005OSPKE" + "\006WAITPKG" + "\011GFNI" "\027RDPID" + "\032CLDEMOTE" + "\034MOVDIRI" + "\035MOVDIRI64B" "\037SGXLC" ); } @@ -990,6 +995,7 @@ printcpuinfo(void) "\034STIBP" "\035L1DFL" "\036ARCH_CAP" + "\037CORE_CAP" "\040SSBD" ); } From owner-svn-src-stable@freebsd.org Thu Feb 7 06:55:27 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17EBC14C8881; Thu, 7 Feb 2019 06:55:27 +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) server-signature RSA-PSS (4096 bits) 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 A691172502; Thu, 7 Feb 2019 06:55:26 +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 954061962E; Thu, 7 Feb 2019 06:55:26 +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 x176tQ28019860; Thu, 7 Feb 2019 06:55:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x176tQnJ019859; Thu, 7 Feb 2019 06:55:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902070655.x176tQnJ019859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 7 Feb 2019 06:55:26 +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: r343863 - in stable: 11/sys/i386/i386 12/sys/i386/i386 X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/i386/i386 12/sys/i386/i386 X-SVN-Commit-Revision: 343863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A691172502 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 06:55:27 -0000 Author: dim Date: Thu Feb 7 06:55:26 2019 New Revision: 343863 URL: https://svnweb.freebsd.org/changeset/base/343863 Log: MFC r343748: Use NLDT to get number of LDTs on i386 Compiling a GENERIC kernel for i386 with clang 8.0 results in the following warning: /usr/src/sys/i386/i386/sys_machdep.c:542:40: error: 'sizeof ((ldt))' will return the size of the pointer, not the array itself [-Werror,-Wsizeof-pointer-div] nldt = pldt != NULL ? pldt->ldt_len : nitems(ldt); ^~~~~~~~~~~ /usr/src/sys/sys/param.h:299:32: note: expanded from macro 'nitems' #define nitems(x) (sizeof((x)) / sizeof((x)[0])) ~~~~~~~~~~~ ^ Indeed, 'ldt' is declared as 'union descriptor *', so nitems() is not the right way to determine the number of LDTs. Instead, the NLDT define from sys/x86/include/segments.h should be used. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D19074 Modified: stable/12/sys/i386/i386/sys_machdep.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/i386/i386/sys_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/i386/i386/sys_machdep.c ============================================================================== --- stable/12/sys/i386/i386/sys_machdep.c Thu Feb 7 05:40:51 2019 (r343862) +++ stable/12/sys/i386/i386/sys_machdep.c Thu Feb 7 06:55:26 2019 (r343863) @@ -539,7 +539,7 @@ i386_get_ldt(struct thread *td, struct i386_ldt_args * data = malloc(num * sizeof(union descriptor), M_TEMP, M_WAITOK); mtx_lock_spin(&dt_lock); pldt = td->td_proc->p_md.md_ldt; - nldt = pldt != NULL ? pldt->ldt_len : nitems(ldt); + nldt = pldt != NULL ? pldt->ldt_len : NLDT; if (uap->start >= nldt) { num = 0; } else { From owner-svn-src-stable@freebsd.org Thu Feb 7 06:55:27 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B29714C8882; Thu, 7 Feb 2019 06:55:27 +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) server-signature RSA-PSS (4096 bits) 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 F293972503; Thu, 7 Feb 2019 06:55:26 +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 E69621962F; Thu, 7 Feb 2019 06:55:26 +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 x176tQ7q019866; Thu, 7 Feb 2019 06:55:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x176tQR3019865; Thu, 7 Feb 2019 06:55:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902070655.x176tQR3019865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 7 Feb 2019 06:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343863 - in stable: 11/sys/i386/i386 12/sys/i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/i386/i386 12/sys/i386/i386 X-SVN-Commit-Revision: 343863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F293972503 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 06:55:27 -0000 Author: dim Date: Thu Feb 7 06:55:26 2019 New Revision: 343863 URL: https://svnweb.freebsd.org/changeset/base/343863 Log: MFC r343748: Use NLDT to get number of LDTs on i386 Compiling a GENERIC kernel for i386 with clang 8.0 results in the following warning: /usr/src/sys/i386/i386/sys_machdep.c:542:40: error: 'sizeof ((ldt))' will return the size of the pointer, not the array itself [-Werror,-Wsizeof-pointer-div] nldt = pldt != NULL ? pldt->ldt_len : nitems(ldt); ^~~~~~~~~~~ /usr/src/sys/sys/param.h:299:32: note: expanded from macro 'nitems' #define nitems(x) (sizeof((x)) / sizeof((x)[0])) ~~~~~~~~~~~ ^ Indeed, 'ldt' is declared as 'union descriptor *', so nitems() is not the right way to determine the number of LDTs. Instead, the NLDT define from sys/x86/include/segments.h should be used. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D19074 Modified: stable/11/sys/i386/i386/sys_machdep.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/i386/i386/sys_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/i386/i386/sys_machdep.c ============================================================================== --- stable/11/sys/i386/i386/sys_machdep.c Thu Feb 7 05:40:51 2019 (r343862) +++ stable/11/sys/i386/i386/sys_machdep.c Thu Feb 7 06:55:26 2019 (r343863) @@ -538,7 +538,7 @@ i386_get_ldt(struct thread *td, struct i386_ldt_args * data = malloc(num * sizeof(union descriptor), M_TEMP, M_WAITOK); mtx_lock_spin(&dt_lock); pldt = td->td_proc->p_md.md_ldt; - nldt = pldt != NULL ? pldt->ldt_len : nitems(ldt); + nldt = pldt != NULL ? pldt->ldt_len : NLDT; if (uap->start >= nldt) { num = 0; } else { From owner-svn-src-stable@freebsd.org Thu Feb 7 10:30:16 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18A6114D33E3; Thu, 7 Feb 2019 10:30:16 +0000 (UTC) (envelope-from marius@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) server-signature RSA-PSS (4096 bits) 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 A69A581DBF; Thu, 7 Feb 2019 10:30:15 +0000 (UTC) (envelope-from marius@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 D23811BA9B; Thu, 7 Feb 2019 10:30:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17AUDp6029944; Thu, 7 Feb 2019 10:30:13 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17AUBGC029932; Thu, 7 Feb 2019 10:30:11 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201902071030.x17AUBGC029932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 7 Feb 2019 10:30: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: r343864 - in stable/12/sys: dev/e1000 dev/ixgbe dev/ixl dev/vmware/vmxnet3 net X-SVN-Group: stable-12 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: in stable/12/sys: dev/e1000 dev/ixgbe dev/ixl dev/vmware/vmxnet3 net X-SVN-Commit-Revision: 343864 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A69A581DBF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 10:30:16 -0000 Author: marius Date: Thu Feb 7 10:30:11 2019 New Revision: 343864 URL: https://svnweb.freebsd.org/changeset/base/343864 Log: MFC: r343578 (partial) - Stop iflib(4) from leaking MSI messages on detachment by calling bus_teardown_intr(9) before pci_release_msi(9). - Ensure that iflib(4) and associated drivers pass correct RIDs to bus_release_resource(9) by obtaining the RIDs via rman_get_rid(9) on the corresponding resources instead of using the RIDs initially passed to bus_alloc_resource_any(9) as the latter function may change those RIDs. Solely em(4) for the ioport resource (but not others) and bnxt(4) were using the correct RIDs by caching the ones returned by bus_alloc_resource_any(9). - Change the logic of iflib_msix_init() around to only map the MSI-X BAR if MSI-X is actually supported, i. e. pci_msix_count(9) returns > 0. Otherwise the "Unable to map MSIX table " message triggers for devices that simply don't support MSI-X and the user may think that something is wrong while in fact everything works as expected. - Put some (mostly redundant) debug messages emitted by iflib(4) and em(4) during attachment under bootverbose. The non-verbose output of em(4) seen during attachment now is close to the one prior to the conversion to iflib(4). - Replace various variants of spelling "MSI-X" (several in messages) with "MSI-X" as used in the PCI specifications. - Remove some trailing whitespace from messages emitted by iflib(4) and change them to consistently start with uppercase. - Remove some obsolete comments about releasing interrupts from drivers and correct a few others. Reviewed by: erj, Jacob Keller, shurd Differential Revision: https://reviews.freebsd.org/D18980 Modified: stable/12/sys/dev/e1000/if_em.c stable/12/sys/dev/e1000/if_em.h stable/12/sys/dev/ixgbe/if_ix.c stable/12/sys/dev/ixgbe/if_ixv.c stable/12/sys/dev/ixl/if_iavf.c stable/12/sys/dev/ixl/if_ixl.c stable/12/sys/dev/ixl/ixl_iw.c stable/12/sys/dev/ixl/ixl_pf_main.c stable/12/sys/dev/vmware/vmxnet3/if_vmx.c stable/12/sys/net/iflib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/e1000/if_em.c ============================================================================== --- stable/12/sys/dev/e1000/if_em.c Thu Feb 7 06:55:26 2019 (r343863) +++ stable/12/sys/dev/e1000/if_em.c Thu Feb 7 10:30:11 2019 (r343864) @@ -293,7 +293,7 @@ static void em_disable_aspm(struct adapter *); int em_intr(void *arg); static void em_disable_promisc(if_ctx_t ctx); -/* MSIX handlers */ +/* MSI-X handlers */ static int em_if_msix_intr_assign(if_ctx_t, int); static int em_msix_link(void *); static void em_handle_link(void *context); @@ -780,7 +780,9 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); scctx->isc_tx_nsegments = EM_MAX_SCATTER; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); - device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); + if (bootverbose) + device_printf(dev, "attach_pre capping queues at %d\n", + scctx->isc_ntxqsets_max); if (adapter->hw.mac.type >= igb_mac_min) { int try_second_bar; @@ -1293,7 +1295,7 @@ em_if_init(if_ctx_t ctx) em_if_set_promisc(ctx, IFF_PROMISC); e1000_clear_hw_cntrs_base_generic(&adapter->hw); - /* MSI/X configuration for 82574 */ + /* MSI-X configuration for 82574 */ if (adapter->hw.mac.type == e1000_82574) { int tmp = E1000_READ_REG(&adapter->hw, E1000_CTRL_EXT); @@ -1419,7 +1421,7 @@ em_if_tx_queue_intr_enable(if_ctx_t ctx, uint16_t txqi /********************************************************************* * - * MSIX RX Interrupt Service routine + * MSI-X RX Interrupt Service routine * **********************************************************************/ static int @@ -1434,7 +1436,7 @@ em_msix_que(void *arg) /********************************************************************* * - * MSIX Link Fast Interrupt Service routine + * MSI-X Link Fast Interrupt Service routine * **********************************************************************/ static int @@ -1904,7 +1906,6 @@ em_allocate_pci_resources(if_ctx_t ctx) for (rid = PCIR_BAR(0); rid < PCIR_CIS;) { val = pci_read_config(dev, rid, 4); if (EM_BAR_TYPE(val) == EM_BAR_TYPE_IO) { - adapter->io_rid = rid; break; } rid += 4; @@ -1916,8 +1917,8 @@ em_allocate_pci_resources(if_ctx_t ctx) device_printf(dev, "Unable to locate IO BAR\n"); return (ENXIO); } - adapter->ioport = bus_alloc_resource_any(dev, - SYS_RES_IOPORT, &adapter->io_rid, RF_ACTIVE); + adapter->ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + &rid, RF_ACTIVE); if (adapter->ioport == NULL) { device_printf(dev, "Unable to allocate bus resource: " "ioport\n"); @@ -1937,7 +1938,7 @@ em_allocate_pci_resources(if_ctx_t ctx) /********************************************************************* * - * Setup the MSIX Interrupt handlers + * Set up the MSI-X Interrupt handlers * **********************************************************************/ static int @@ -1966,7 +1967,7 @@ em_if_msix_intr_assign(if_ctx_t ctx, int msix) * Set the bit to enable interrupt * in E1000_IMS -- bits 20 and 21 * are for RX0 and RX1, note this has - * NOTHING to do with the MSIX vector + * NOTHING to do with the MSI-X vector */ if (adapter->hw.mac.type == e1000_82574) { rx_que->eims = 1 << (20 + i); @@ -1993,7 +1994,7 @@ em_if_msix_intr_assign(if_ctx_t ctx, int msix) * Set the bit to enable interrupt * in E1000_IMS -- bits 22 and 23 * are for TX0 and TX1, note this has - * NOTHING to do with the MSIX vector + * NOTHING to do with the MSI-X vector */ if (adapter->hw.mac.type == e1000_82574) { tx_que->eims = 1 << (22 + i); @@ -2042,7 +2043,7 @@ igb_configure_queues(struct adapter *adapter) E1000_GPIE_MSIX_MODE | E1000_GPIE_EIAME | E1000_GPIE_PBA | E1000_GPIE_NSICR); - /* Turn on MSIX */ + /* Turn on MSI-X */ switch (adapter->hw.mac.type) { case e1000_82580: case e1000_i350: @@ -2176,7 +2177,7 @@ em_free_pci_resources(if_ctx_t ctx) struct em_rx_queue *que = adapter->rx_queues; device_t dev = iflib_get_dev(ctx); - /* Release all msix queue resources */ + /* Release all MSI-X queue resources */ if (adapter->intr_type == IFLIB_INTR_MSIX) iflib_irq_free(ctx, &adapter->irq); @@ -2184,24 +2185,26 @@ em_free_pci_resources(if_ctx_t ctx) iflib_irq_free(ctx, &que->que_irq); } - /* First release all the interrupt resources */ if (adapter->memory != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(0), adapter->memory); + rman_get_rid(adapter->memory), adapter->memory); adapter->memory = NULL; } if (adapter->flash != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, - EM_FLASH, adapter->flash); + rman_get_rid(adapter->flash), adapter->flash); adapter->flash = NULL; } - if (adapter->ioport != NULL) + + if (adapter->ioport != NULL) { bus_release_resource(dev, SYS_RES_IOPORT, - adapter->io_rid, adapter->ioport); + rman_get_rid(adapter->ioport), adapter->ioport); + adapter->ioport = NULL; + } } -/* Setup MSI or MSI/X */ +/* Set up MSI or MSI-X */ static int em_setup_msix(if_ctx_t ctx) { @@ -2843,7 +2846,9 @@ em_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, u txr->tx_paddr = paddrs[i*ntxqs]; } - device_printf(iflib_get_dev(ctx), "allocated for %d tx_queues\n", adapter->tx_num_queues); + if (bootverbose) + device_printf(iflib_get_dev(ctx), + "allocated for %d tx_queues\n", adapter->tx_num_queues); return (0); fail: em_if_queues_free(ctx); @@ -2881,9 +2886,11 @@ em_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, u rxr->rx_base = (union e1000_rx_desc_extended *)vaddrs[i*nrxqs]; rxr->rx_paddr = paddrs[i*nrxqs]; } + + if (bootverbose) + device_printf(iflib_get_dev(ctx), + "allocated for %d rx_queues\n", adapter->rx_num_queues); - device_printf(iflib_get_dev(ctx), "allocated for %d rx_queues\n", adapter->rx_num_queues); - return (0); fail: em_if_queues_free(ctx); @@ -3125,7 +3132,7 @@ em_initialize_receive_unit(if_ctx_t ctx) rfctl = E1000_READ_REG(hw, E1000_RFCTL); rfctl |= E1000_RFCTL_EXTEN; /* - * When using MSIX interrupts we need to throttle + * When using MSI-X interrupts we need to throttle * using the EITR register (82574 only) */ if (hw->mac.type == e1000_82574) { @@ -3999,7 +4006,7 @@ em_add_hw_stats(struct adapter *adapter) "Driver dropped packets"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "link_irq", CTLFLAG_RD, &adapter->link_irq, - "Link MSIX IRQ Handled"); + "Link MSI-X IRQ Handled"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "mbuf_defrag_fail", CTLFLAG_RD, &adapter->mbuf_defrag_failed, "Defragmenting mbuf chain failed"); @@ -4516,7 +4523,7 @@ em_print_debug_info(struct adapter *adapter) /* * 82574 only: - * Write a new value to the EEPROM increasing the number of MSIX + * Write a new value to the EEPROM increasing the number of MSI-X * vectors from 3 to 5, for proper multiqueue support. */ static void @@ -4531,7 +4538,7 @@ em_enable_vectors_82574(if_ctx_t ctx) printf("Current cap: %#06x\n", edata); if (((edata & EM_NVM_MSIX_N_MASK) >> EM_NVM_MSIX_N_SHIFT) != 4) { device_printf(dev, "Writing to eeprom: increasing " - "reported MSIX vectors from 3 to 5...\n"); + "reported MSI-X vectors from 3 to 5...\n"); edata &= ~(EM_NVM_MSIX_N_MASK); edata |= 4 << EM_NVM_MSIX_N_SHIFT; e1000_write_nvm(hw, EM_NVM_PCIE_CTRL, 1, &edata); Modified: stable/12/sys/dev/e1000/if_em.h ============================================================================== --- stable/12/sys/dev/e1000/if_em.h Thu Feb 7 06:55:26 2019 (r343863) +++ stable/12/sys/dev/e1000/if_em.h Thu Feb 7 10:30:11 2019 (r343864) @@ -352,8 +352,8 @@ /* * 82574 has a nonstandard address for EIAC - * and since its only used in MSIX, and in - * the em driver only 82574 uses MSIX we can + * and since its only used in MSI-X, and in + * the em driver only 82574 uses MSI-X we can * solve it just using this define. */ #define EM_EIAC 0x000DC @@ -468,7 +468,6 @@ struct adapter { struct resource *memory; struct resource *flash; struct resource *ioport; - int io_rid; struct resource *res; void *tag; Modified: stable/12/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/12/sys/dev/ixgbe/if_ix.c Thu Feb 7 06:55:26 2019 (r343863) +++ stable/12/sys/dev/ixgbe/if_ix.c Thu Feb 7 10:30:11 2019 (r343864) @@ -2020,7 +2020,7 @@ ixgbe_if_msix_intr_assign(if_ctx_t ctx, int msix) cpu_id = rss_getcpu(i % rss_getnumbuckets()); } else { /* - * Bind the msix vector, and thus the + * Bind the MSI-X vector, and thus the * rings to the corresponding cpu. * * This just happens to match the default RSS @@ -3813,7 +3813,7 @@ ixgbe_free_pci_resources(if_ctx_t ctx) struct ix_rx_queue *que = adapter->rx_queues; device_t dev = iflib_get_dev(ctx); - /* Release all msix queue resources */ + /* Release all MSI-X queue resources */ if (adapter->intr_type == IFLIB_INTR_MSIX) iflib_irq_free(ctx, &adapter->irq); @@ -3823,13 +3823,9 @@ ixgbe_free_pci_resources(if_ctx_t ctx) } } - /* - * Free link/admin interrupt - */ if (adapter->pci_mem != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(0), adapter->pci_mem); - + rman_get_rid(adapter->pci_mem), adapter->pci_mem); } /* ixgbe_free_pci_resources */ /************************************************************************ Modified: stable/12/sys/dev/ixgbe/if_ixv.c ============================================================================== --- stable/12/sys/dev/ixgbe/if_ixv.c Thu Feb 7 06:55:26 2019 (r343863) +++ stable/12/sys/dev/ixgbe/if_ixv.c Thu Feb 7 10:30:11 2019 (r343864) @@ -1132,7 +1132,7 @@ ixv_free_pci_resources(if_ctx_t ctx) struct ix_rx_queue *que = adapter->rx_queues; device_t dev = iflib_get_dev(ctx); - /* Release all msix queue resources */ + /* Release all MSI-X queue resources */ if (adapter->intr_type == IFLIB_INTR_MSIX) iflib_irq_free(ctx, &adapter->irq); @@ -1142,10 +1142,9 @@ ixv_free_pci_resources(if_ctx_t ctx) } } - /* Clean the Legacy or Link interrupt last */ if (adapter->pci_mem != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(0), adapter->pci_mem); + rman_get_rid(adapter->pci_mem), adapter->pci_mem); } /* ixv_free_pci_resources */ /************************************************************************ Modified: stable/12/sys/dev/ixl/if_iavf.c ============================================================================== --- stable/12/sys/dev/ixl/if_iavf.c Thu Feb 7 06:55:26 2019 (r343863) +++ stable/12/sys/dev/ixl/if_iavf.c Thu Feb 7 10:30:11 2019 (r343864) @@ -359,7 +359,7 @@ iavf_if_attach_pre(if_ctx_t ctx) goto err_early; } - iavf_dbg_init(sc, "Allocated PCI resources and MSIX vectors\n"); + iavf_dbg_init(sc, "Allocated PCI resources and MSI-X vectors\n"); /* * XXX: This is called by init_shared_code in the PF driver, @@ -408,7 +408,8 @@ iavf_if_attach_pre(if_ctx_t ctx) goto err_aq; } - device_printf(dev, "VSIs %d, QPs %d, MSIX %d, RSS sizes: key %d lut %d\n", + device_printf(dev, + "VSIs %d, QPs %d, MSI-X %d, RSS sizes: key %d lut %d\n", sc->vf_res->num_vsis, sc->vf_res->num_queue_pairs, sc->vf_res->max_vectors, @@ -1486,7 +1487,7 @@ iavf_free_pci_resources(struct iavf_sc *sc) struct ixl_rx_queue *rx_que = vsi->rx_queues; device_t dev = sc->dev; - /* We may get here before stations are setup */ + /* We may get here before stations are set up */ if (rx_que == NULL) goto early; @@ -1499,7 +1500,7 @@ iavf_free_pci_resources(struct iavf_sc *sc) early: if (sc->pci_mem != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(0), sc->pci_mem); + rman_get_rid(sc->pci_mem), sc->pci_mem); } Modified: stable/12/sys/dev/ixl/if_ixl.c ============================================================================== --- stable/12/sys/dev/ixl/if_ixl.c Thu Feb 7 06:55:26 2019 (r343863) +++ stable/12/sys/dev/ixl/if_ixl.c Thu Feb 7 10:30:11 2019 (r343864) @@ -299,7 +299,7 @@ int ixl_limit_iwarp_msix = IXL_IW_MAX_MSIX; #endif TUNABLE_INT("hw.ixl.limit_iwarp_msix", &ixl_limit_iwarp_msix); SYSCTL_INT(_hw_ixl, OID_AUTO, limit_iwarp_msix, CTLFLAG_RDTUN, - &ixl_limit_iwarp_msix, 0, "Limit MSIX vectors assigned to iWARP"); + &ixl_limit_iwarp_msix, 0, "Limit MSI-X vectors assigned to iWARP"); #endif extern struct if_txrx ixl_txrx_hwb; @@ -684,14 +684,14 @@ ixl_if_attach_post(if_ctx_t ctx) error = ixl_iw_pf_attach(pf); if (error) { device_printf(dev, - "interfacing to iwarp driver failed: %d\n", + "interfacing to iWARP driver failed: %d\n", error); goto err; } else device_printf(dev, "iWARP ready\n"); } else - device_printf(dev, - "iwarp disabled on this device (no msix vectors)\n"); + device_printf(dev, "iWARP disabled on this device " + "(no MSI-X vectors)\n"); } else { pf->iw_enabled = false; device_printf(dev, "The device is not iWARP enabled\n"); @@ -857,7 +857,7 @@ ixl_if_init(if_ctx_t ctx) /* Set up RSS */ ixl_config_rss(pf); - /* Set up MSI/X routing and the ITR settings */ + /* Set up MSI-X routing and the ITR settings */ if (vsi->shared->isc_intr == IFLIB_INTR_MSIX) { ixl_configure_queue_intr_msix(pf); ixl_configure_itr(pf); Modified: stable/12/sys/dev/ixl/ixl_iw.c ============================================================================== --- stable/12/sys/dev/ixl/ixl_iw.c Thu Feb 7 06:55:26 2019 (r343863) +++ stable/12/sys/dev/ixl/ixl_iw.c Thu Feb 7 10:30:11 2019 (r343864) @@ -333,7 +333,7 @@ ixl_iw_pf_msix_init(void *pf_handle, if ((msix_info->aeq_vector < IXL_IW_VEC_BASE(pf)) || (msix_info->aeq_vector >= IXL_IW_VEC_LIMIT(pf))) { - printf("%s: invalid MSIX vector (%i) for AEQ\n", + printf("%s: invalid MSI-X vector (%i) for AEQ\n", __func__, msix_info->aeq_vector); return (EINVAL); } Modified: stable/12/sys/dev/ixl/ixl_pf_main.c ============================================================================== --- stable/12/sys/dev/ixl/ixl_pf_main.c Thu Feb 7 06:55:26 2019 (r343863) +++ stable/12/sys/dev/ixl/ixl_pf_main.c Thu Feb 7 10:30:11 2019 (r343864) @@ -278,7 +278,8 @@ retry: } /* Print a subset of the capability information. */ - device_printf(dev, "PF-ID[%d]: VFs %d, MSIX %d, VF MSIX %d, QPs %d, %s\n", + device_printf(dev, + "PF-ID[%d]: VFs %d, MSI-X %d, VF MSI-X %d, QPs %d, %s\n", hw->pf_id, hw->func_caps.num_vfs, hw->func_caps.num_msix_vectors, hw->func_caps.num_msix_vectors_vf, hw->func_caps.num_tx_qp, (hw->func_caps.mdio_port_mode == 2) ? "I2C" : @@ -505,7 +506,7 @@ ixl_intr(void *arg) /********************************************************************* * - * MSIX VSI Interrupt Service routine + * MSI-X VSI Interrupt Service routine * **********************************************************************/ int @@ -524,7 +525,7 @@ ixl_msix_que(void *arg) /********************************************************************* * - * MSIX Admin Queue Interrupt Service routine + * MSI-X Admin Queue Interrupt Service routine * **********************************************************************/ int @@ -791,7 +792,7 @@ ixl_configure_intr0_msix(struct ixl_pf *pf) /* * 0x7FF is the end of the queue list. * This means we won't use MSI-X vector 0 for a queue interrupt - * in MSIX mode. + * in MSI-X mode. */ wr32(hw, I40E_PFINT_LNKLST0, 0x7FF); /* Value is in 2 usec units, so 0x3E is 62*2 = 124 usecs. */ @@ -909,12 +910,12 @@ ixl_free_pci_resources(struct ixl_pf *pf) device_t dev = iflib_get_dev(vsi->ctx); struct ixl_rx_queue *rx_que = vsi->rx_queues; - /* We may get here before stations are setup */ + /* We may get here before stations are set up */ if (rx_que == NULL) goto early; /* - ** Release all msix VSI resources: + ** Release all MSI-X VSI resources: */ iflib_irq_free(vsi->ctx, &vsi->irq); @@ -923,7 +924,7 @@ ixl_free_pci_resources(struct ixl_pf *pf) early: if (pf->pci_mem != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(0), pf->pci_mem); + rman_get_rid(pf->pci_mem), pf->pci_mem); } void Modified: stable/12/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/12/sys/dev/vmware/vmxnet3/if_vmx.c Thu Feb 7 06:55:26 2019 (r343863) +++ stable/12/sys/dev/vmware/vmxnet3/if_vmx.c Thu Feb 7 10:30:11 2019 (r343864) @@ -461,26 +461,24 @@ static void vmxnet3_free_resources(struct vmxnet3_softc *sc) { device_t dev; - int rid; dev = sc->vmx_dev; if (sc->vmx_res0 != NULL) { - rid = PCIR_BAR(0); - bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->vmx_res0); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->vmx_res0), sc->vmx_res0); sc->vmx_res0 = NULL; } if (sc->vmx_res1 != NULL) { - rid = PCIR_BAR(1); - bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->vmx_res1); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->vmx_res1), sc->vmx_res1); sc->vmx_res1 = NULL; } if (sc->vmx_msix_res != NULL) { - rid = PCIR_BAR(2); - bus_release_resource(dev, SYS_RES_MEMORY, rid, - sc->vmx_msix_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->vmx_msix_res), sc->vmx_msix_res); sc->vmx_msix_res = NULL; } } Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Thu Feb 7 06:55:26 2019 (r343863) +++ stable/12/sys/net/iflib.c Thu Feb 7 10:30:11 2019 (r343864) @@ -4408,8 +4408,8 @@ iflib_device_register(device_t dev, void *sc, if_share main_rxq = (sctx->isc_flags & IFLIB_HAS_RXCQ) ? 1 : 0; /* XXX change for per-queue sizes */ - device_printf(dev, "using %d tx descriptors and %d rx descriptors\n", - scctx->isc_ntxd[main_txq], scctx->isc_nrxd[main_rxq]); + device_printf(dev, "Using %d tx descriptors and %d rx descriptors\n", + scctx->isc_ntxd[main_txq], scctx->isc_nrxd[main_rxq]); for (i = 0; i < sctx->isc_nrxqs; i++) { if (!powerof2(scctx->isc_nrxd[i])) { /* round down instead? */ @@ -4471,9 +4471,8 @@ iflib_device_register(device_t dev, void *sc, if_share MPASS(CPU_COUNT(&ctx->ifc_cpus) > 0); /* - ** Now setup MSI or MSI/X, should - ** return us the number of supported - ** vectors. (Will be 1 for MSI) + ** Now set up MSI or MSI-X, should return us the number of supported + ** vectors (will be 1 for a legacy interrupt and MSI). */ if (sctx->isc_flags & IFLIB_SKIP_MSIX) { msix = scctx->isc_vectors; @@ -4668,8 +4667,8 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc main_rxq = (sctx->isc_flags & IFLIB_HAS_RXCQ) ? 1 : 0; /* XXX change for per-queue sizes */ - device_printf(dev, "using %d tx descriptors and %d rx descriptors\n", - scctx->isc_ntxd[main_txq], scctx->isc_nrxd[main_rxq]); + device_printf(dev, "Using %d tx descriptors and %d rx descriptors\n", + scctx->isc_ntxd[main_txq], scctx->isc_nrxd[main_rxq]); for (i = 0; i < sctx->isc_nrxqs; i++) { if (!powerof2(scctx->isc_nrxd[i])) { /* round down instead? */ @@ -4922,15 +4921,15 @@ static void iflib_free_intr_mem(if_ctx_t ctx) { - if (ctx->ifc_softc_ctx.isc_intr != IFLIB_INTR_LEGACY) { - pci_release_msi(ctx->ifc_dev); - } if (ctx->ifc_softc_ctx.isc_intr != IFLIB_INTR_MSIX) { iflib_irq_free(ctx, &ctx->ifc_legacy_irq); } + if (ctx->ifc_softc_ctx.isc_intr != IFLIB_INTR_LEGACY) { + pci_release_msi(ctx->ifc_dev); + } if (ctx->ifc_msix_mem != NULL) { bus_release_resource(ctx->ifc_dev, SYS_RES_MEMORY, - ctx->ifc_softc_ctx.isc_msix_bar, ctx->ifc_msix_mem); + rman_get_rid(ctx->ifc_msix_mem), ctx->ifc_msix_mem); ctx->ifc_msix_mem = NULL; } } @@ -5757,11 +5756,13 @@ iflib_softirq_alloc_generic(if_ctx_t ctx, if_irq_t irq void iflib_irq_free(if_ctx_t ctx, if_irq_t irq) { + if (irq->ii_tag) bus_teardown_intr(ctx->ifc_dev, irq->ii_res, irq->ii_tag); if (irq->ii_res) - bus_release_resource(ctx->ifc_dev, SYS_RES_IRQ, irq->ii_rid, irq->ii_res); + bus_release_resource(ctx->ifc_dev, SYS_RES_IRQ, + rman_get_rid(irq->ii_res), irq->ii_res); } static int @@ -5955,7 +5956,9 @@ iflib_msix_init(if_ctx_t ctx) iflib_num_tx_queues = ctx->ifc_sysctl_ntxqs; iflib_num_rx_queues = ctx->ifc_sysctl_nrxqs; - device_printf(dev, "msix_init qsets capped at %d\n", imax(scctx->isc_ntxqsets, scctx->isc_nrxqsets)); + if (bootverbose) + device_printf(dev, "msix_init qsets capped at %d\n", + imax(scctx->isc_ntxqsets, scctx->isc_nrxqsets)); bar = ctx->ifc_softc_ctx.isc_msix_bar; admincnt = sctx->isc_admin_intrcnt; @@ -5963,30 +5966,27 @@ iflib_msix_init(if_ctx_t ctx) if (scctx->isc_disable_msix) goto msi; + /* First try MSI-X */ + if ((msgs = pci_msix_count(dev)) == 0) { + if (bootverbose) + device_printf(dev, "MSI-X not supported or disabled\n"); + goto msi; + } /* * bar == -1 => "trust me I know what I'm doing" * Some drivers are for hardware that is so shoddily * documented that no one knows which bars are which * so the developer has to map all bars. This hack - * allows shoddy garbage to use msix in this framework. + * allows shoddy garbage to use MSI-X in this framework. */ if (bar != -1) { ctx->ifc_msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &bar, RF_ACTIVE); if (ctx->ifc_msix_mem == NULL) { - /* May not be enabled */ - device_printf(dev, "Unable to map MSIX table \n"); + device_printf(dev, "Unable to map MSI-X table\n"); goto msi; } } - /* First try MSI/X */ - if ((msgs = pci_msix_count(dev)) == 0) { /* system has msix disabled */ - device_printf(dev, "System has MSIX disabled \n"); - bus_release_resource(dev, SYS_RES_MEMORY, - bar, ctx->ifc_msix_mem); - ctx->ifc_msix_mem = NULL; - goto msi; - } #if IFLIB_DEBUG /* use only 1 qset in debug mode */ queuemsgs = min(msgs - admincnt, 1); @@ -5999,8 +5999,10 @@ iflib_msix_init(if_ctx_t ctx) queues = queuemsgs; #endif queues = imin(CPU_COUNT(&ctx->ifc_cpus), queues); - device_printf(dev, "pxm cpus: %d queue msgs: %d admincnt: %d\n", - CPU_COUNT(&ctx->ifc_cpus), queuemsgs, admincnt); + if (bootverbose) + device_printf(dev, + "intr CPUs: %d queue msgs: %d admincnt: %d\n", + CPU_COUNT(&ctx->ifc_cpus), queuemsgs, admincnt); #ifdef RSS /* If we're doing RSS, clamp at the number of RSS buckets */ if (queues > rss_getnumbuckets()) @@ -6036,11 +6038,13 @@ iflib_msix_init(if_ctx_t ctx) rx_queues = min(rx_queues, tx_queues); } - device_printf(dev, "using %d rx queues %d tx queues \n", rx_queues, tx_queues); + device_printf(dev, "Using %d rx queues %d tx queues\n", + rx_queues, tx_queues); vectors = rx_queues + admincnt; if ((err = pci_alloc_msix(dev, &vectors)) == 0) { - device_printf(dev, "Using MSIX interrupts with %d vectors\n", vectors); + device_printf(dev, "Using MSI-X interrupts with %d vectors\n", + vectors); scctx->isc_vectors = vectors; scctx->isc_nrxqsets = rx_queues; scctx->isc_ntxqsets = tx_queues; @@ -6049,7 +6053,8 @@ iflib_msix_init(if_ctx_t ctx) return (vectors); } else { device_printf(dev, - "failed to allocate %d msix vectors, err: %d - using MSI\n", vectors, err); + "failed to allocate %d MSI-X vectors, err: %d - using MSI\n", + vectors, err); bus_release_resource(dev, SYS_RES_MEMORY, bar, ctx->ifc_msix_mem); ctx->ifc_msix_mem = NULL; @@ -6185,7 +6190,7 @@ iflib_add_device_sysctl_pre(if_ctx_t ctx) "permit #txq != #rxq"); SYSCTL_ADD_INT(ctx_list, oid_list, OID_AUTO, "disable_msix", CTLFLAG_RWTUN, &ctx->ifc_softc_ctx.isc_disable_msix, 0, - "disable MSIX (default 0)"); + "disable MSI-X (default 0)"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "rx_budget", CTLFLAG_RWTUN, &ctx->ifc_sysctl_rx_budget, 0, "set the rx budget"); From owner-svn-src-stable@freebsd.org Thu Feb 7 10:44:04 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E69014D3B53; Thu, 7 Feb 2019 10:44:04 +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) server-signature RSA-PSS (4096 bits) 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 4615D828EF; Thu, 7 Feb 2019 10:44:04 +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 3A0111BE20; Thu, 7 Feb 2019 10:44: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 x17Ai4e7040106; Thu, 7 Feb 2019 10:44:04 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17Ai3HV040102; Thu, 7 Feb 2019 10:44:03 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902071044.x17Ai3HV040102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 7 Feb 2019 10:44: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: r343865 - in stable/12/sys: dev/netmap net X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/12/sys: dev/netmap net X-SVN-Commit-Revision: 343865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4615D828EF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 10:44:05 -0000 Author: vmaffione Date: Thu Feb 7 10:44:03 2019 New Revision: 343865 URL: https://svnweb.freebsd.org/changeset/base/343865 Log: MFC r343689 netmap: upgrade sync-kloop support Add SYNC_KLOOP_MODE option, and add support for direct mode, where application executes the TXSYNC and RXSYNC in the context of the ioeventfd wake up callback. Modified: stable/12/sys/dev/netmap/netmap.c stable/12/sys/dev/netmap/netmap_kern.h stable/12/sys/dev/netmap/netmap_kloop.c stable/12/sys/net/netmap.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/netmap.c ============================================================================== --- stable/12/sys/dev/netmap/netmap.c Thu Feb 7 10:30:11 2019 (r343864) +++ stable/12/sys/dev/netmap/netmap.c Thu Feb 7 10:44:03 2019 (r343865) @@ -2962,6 +2962,9 @@ nmreq_opt_size_by_type(uint32_t nro_reqtype, uint64_t case NETMAP_REQ_OPT_CSB: rv = sizeof(struct nmreq_opt_csb); break; + case NETMAP_REQ_OPT_SYNC_KLOOP_MODE: + rv = sizeof(struct nmreq_opt_sync_kloop_mode); + break; } /* subtract the common header */ return rv - sizeof(struct nmreq_option); @@ -3278,10 +3281,8 @@ netmap_poll(struct netmap_priv_d *priv, int events, NM * there are pending packets to send. The latter can be disabled * passing NETMAP_NO_TX_POLL in the NIOCREG call. */ - si[NR_RX] = nm_si_user(priv, NR_RX) ? &na->si[NR_RX] : - &na->rx_rings[priv->np_qfirst[NR_RX]]->si; - si[NR_TX] = nm_si_user(priv, NR_TX) ? &na->si[NR_TX] : - &na->tx_rings[priv->np_qfirst[NR_TX]]->si; + si[NR_RX] = priv->np_si[NR_RX]; + si[NR_TX] = priv->np_si[NR_TX]; #ifdef __FreeBSD__ /* Modified: stable/12/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/12/sys/dev/netmap/netmap_kern.h Thu Feb 7 10:30:11 2019 (r343864) +++ stable/12/sys/dev/netmap/netmap_kern.h Thu Feb 7 10:44:03 2019 (r343865) @@ -1166,6 +1166,15 @@ nm_kr_txempty(struct netmap_kring *kring) * rxsync_prologue */ #define nm_kr_rxempty(_k) nm_kr_txempty(_k) +/* True if the application needs to wait for more space on the ring + * (more received packets or more free tx slots). + * Only valid after *xsync_prologue. */ +static inline int +nm_kr_wouldblock(struct netmap_kring *kring) +{ + return kring->rcur == kring->nr_hwtail; +} + /* * protect against multiple threads using the same ring. * also check that the ring has not been stopped or locked Modified: stable/12/sys/dev/netmap/netmap_kloop.c ============================================================================== --- stable/12/sys/dev/netmap/netmap_kloop.c Thu Feb 7 10:30:11 2019 (r343864) +++ stable/12/sys/dev/netmap/netmap_kloop.c Thu Feb 7 10:44:03 2019 (r343865) @@ -141,6 +141,9 @@ sync_kloop_kring_dump(const char *title, const struct kring->rcur, kring->rtail, kring->nr_hwtail); } +/* Arguments for netmap_sync_kloop_tx_ring() and + * netmap_sync_kloop_rx_ring(). + */ struct sync_kloop_ring_args { struct netmap_kring *kring; struct nm_csb_atok *csb_atok; @@ -148,6 +151,10 @@ struct sync_kloop_ring_args { #ifdef SYNC_KLOOP_POLL struct eventfd_ctx *irq_ctx; #endif /* SYNC_KLOOP_POLL */ + /* Are we busy waiting rather than using a schedule() loop ? */ + bool busy_wait; + /* Are we processing in the context of VM exit ? */ + bool direct; }; static void @@ -161,10 +168,16 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring uint32_t num_slots; int batch; + if (unlikely(nm_kr_tryget(kring, 1, NULL))) { + return; + } + num_slots = kring->nkr_num_slots; /* Disable application --> kernel notifications. */ - csb_ktoa_kick_enable(csb_ktoa, 0); + if (!a->direct) { + csb_ktoa_kick_enable(csb_ktoa, 0); + } /* Copy the application kring pointers from the CSB */ sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); @@ -197,7 +210,9 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring if (unlikely(nm_txsync_prologue(kring, &shadow_ring) >= num_slots)) { /* Reinit ring and enable notifications. */ netmap_ring_reinit(kring); - csb_ktoa_kick_enable(csb_ktoa, 1); + if (!a->busy_wait) { + csb_ktoa_kick_enable(csb_ktoa, 1); + } break; } @@ -206,8 +221,10 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring } if (unlikely(kring->nm_sync(kring, shadow_ring.flags))) { - /* Reenable notifications. */ - csb_ktoa_kick_enable(csb_ktoa, 1); + if (!a->busy_wait) { + /* Reenable notifications. */ + csb_ktoa_kick_enable(csb_ktoa, 1); + } nm_prerr("txsync() failed"); break; } @@ -232,7 +249,8 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring /* Interrupt the application if needed. */ #ifdef SYNC_KLOOP_POLL if (a->irq_ctx && more_txspace && csb_atok_intr_enabled(csb_atok)) { - /* Disable application kick to avoid sending unnecessary kicks */ + /* We could disable kernel --> application kicks here, + * to avoid spurious interrupts. */ eventfd_signal(a->irq_ctx, 1); more_txspace = false; } @@ -241,6 +259,9 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring /* Read CSB to see if there is more work to do. */ sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); if (shadow_ring.head == kring->rhead) { + if (a->busy_wait) { + break; + } /* * No more packets to transmit. We enable notifications and * go to sleep, waiting for a kick from the application when new @@ -268,6 +289,8 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring } } + nm_kr_put(kring); + #ifdef SYNC_KLOOP_POLL if (a->irq_ctx && more_txspace && csb_atok_intr_enabled(csb_atok)) { eventfd_signal(a->irq_ctx, 1); @@ -297,13 +320,19 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring bool some_recvd = false; uint32_t num_slots; + if (unlikely(nm_kr_tryget(kring, 1, NULL))) { + return; + } + num_slots = kring->nkr_num_slots; /* Get RX csb_atok and csb_ktoa pointers from the CSB. */ num_slots = kring->nkr_num_slots; /* Disable notifications. */ - csb_ktoa_kick_enable(csb_ktoa, 0); + if (!a->direct) { + csb_ktoa_kick_enable(csb_ktoa, 0); + } /* Copy the application kring pointers from the CSB */ sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); @@ -315,7 +344,9 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring if (unlikely(nm_rxsync_prologue(kring, &shadow_ring) >= num_slots)) { /* Reinit ring and enable notifications. */ netmap_ring_reinit(kring); - csb_ktoa_kick_enable(csb_ktoa, 1); + if (!a->busy_wait) { + csb_ktoa_kick_enable(csb_ktoa, 1); + } break; } @@ -324,8 +355,10 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring } if (unlikely(kring->nm_sync(kring, shadow_ring.flags))) { - /* Reenable notifications. */ - csb_ktoa_kick_enable(csb_ktoa, 1); + if (!a->busy_wait) { + /* Reenable notifications. */ + csb_ktoa_kick_enable(csb_ktoa, 1); + } nm_prerr("rxsync() failed"); break; } @@ -351,7 +384,8 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring #ifdef SYNC_KLOOP_POLL /* Interrupt the application if needed. */ if (a->irq_ctx && some_recvd && csb_atok_intr_enabled(csb_atok)) { - /* Disable application kick to avoid sending unnecessary kicks */ + /* We could disable kernel --> application kicks here, + * to avoid spurious interrupts. */ eventfd_signal(a->irq_ctx, 1); some_recvd = false; } @@ -360,6 +394,9 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring /* Read CSB to see if there is more work to do. */ sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); if (sync_kloop_norxslots(kring, shadow_ring.head)) { + if (a->busy_wait) { + break; + } /* * No more slots available for reception. We enable notification and * go to sleep, waiting for a kick from the application when new receive @@ -401,6 +438,7 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring } #ifdef SYNC_KLOOP_POLL +struct sync_kloop_poll_ctx; struct sync_kloop_poll_entry { /* Support for receiving notifications from * a netmap ring or from the application. */ @@ -411,12 +449,24 @@ struct sync_kloop_poll_entry { /* Support for sending notifications to the application. */ struct eventfd_ctx *irq_ctx; struct file *irq_filp; + + /* Arguments for the ring processing function. Useful + * in case of custom wake-up function. */ + struct sync_kloop_ring_args *args; + struct sync_kloop_poll_ctx *parent; + }; struct sync_kloop_poll_ctx { poll_table wait_table; unsigned int next_entry; + int (*next_wake_fun)(wait_queue_t *, unsigned, int, void *); unsigned int num_entries; + unsigned int num_tx_rings; + unsigned int num_rings; + /* First num_tx_rings entries are for the TX kicks. + * Then the RX kicks entries follow. The last two + * entries are for TX irq, and RX irq. */ struct sync_kloop_poll_entry entries[0]; }; @@ -433,10 +483,78 @@ sync_kloop_poll_table_queue_proc(struct file *file, wa entry->wqh = wqh; entry->filp = file; /* Use the default wake up function. */ - init_waitqueue_entry(&entry->wait, current); + if (poll_ctx->next_wake_fun == NULL) { + init_waitqueue_entry(&entry->wait, current); + } else { + init_waitqueue_func_entry(&entry->wait, + poll_ctx->next_wake_fun); + } add_wait_queue(wqh, &entry->wait); - poll_ctx->next_entry++; } + +static int +sync_kloop_tx_kick_wake_fun(wait_queue_t *wait, unsigned mode, + int wake_flags, void *key) +{ + struct sync_kloop_poll_entry *entry = + container_of(wait, struct sync_kloop_poll_entry, wait); + + netmap_sync_kloop_tx_ring(entry->args); + + return 0; +} + +static int +sync_kloop_tx_irq_wake_fun(wait_queue_t *wait, unsigned mode, + int wake_flags, void *key) +{ + struct sync_kloop_poll_entry *entry = + container_of(wait, struct sync_kloop_poll_entry, wait); + struct sync_kloop_poll_ctx *poll_ctx = entry->parent; + int i; + + for (i = 0; i < poll_ctx->num_tx_rings; i++) { + struct eventfd_ctx *irq_ctx = poll_ctx->entries[i].irq_ctx; + + if (irq_ctx) { + eventfd_signal(irq_ctx, 1); + } + } + + return 0; +} + +static int +sync_kloop_rx_kick_wake_fun(wait_queue_t *wait, unsigned mode, + int wake_flags, void *key) +{ + struct sync_kloop_poll_entry *entry = + container_of(wait, struct sync_kloop_poll_entry, wait); + + netmap_sync_kloop_rx_ring(entry->args); + + return 0; +} + +static int +sync_kloop_rx_irq_wake_fun(wait_queue_t *wait, unsigned mode, + int wake_flags, void *key) +{ + struct sync_kloop_poll_entry *entry = + container_of(wait, struct sync_kloop_poll_entry, wait); + struct sync_kloop_poll_ctx *poll_ctx = entry->parent; + int i; + + for (i = poll_ctx->num_tx_rings; i < poll_ctx->num_rings; i++) { + struct eventfd_ctx *irq_ctx = poll_ctx->entries[i].irq_ctx; + + if (irq_ctx) { + eventfd_signal(irq_ctx, 1); + } + } + + return 0; +} #endif /* SYNC_KLOOP_POLL */ int @@ -455,6 +573,10 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n struct nm_csb_ktoa* csb_ktoa_base; struct netmap_adapter *na; struct nmreq_option *opt; + bool na_could_sleep = false; + bool busy_wait = true; + bool direct_tx = false; + bool direct_rx = false; int err = 0; int i; @@ -505,8 +627,44 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n goto out; } + /* Prepare the arguments for netmap_sync_kloop_tx_ring() + * and netmap_sync_kloop_rx_ring(). */ + for (i = 0; i < num_tx_rings; i++) { + struct sync_kloop_ring_args *a = args + i; + + a->kring = NMR(na, NR_TX)[i + priv->np_qfirst[NR_TX]]; + a->csb_atok = csb_atok_base + i; + a->csb_ktoa = csb_ktoa_base + i; + a->busy_wait = busy_wait; + a->direct = direct_tx; + } + for (i = 0; i < num_rx_rings; i++) { + struct sync_kloop_ring_args *a = args + num_tx_rings + i; + + a->kring = NMR(na, NR_RX)[i + priv->np_qfirst[NR_RX]]; + a->csb_atok = csb_atok_base + num_tx_rings + i; + a->csb_ktoa = csb_ktoa_base + num_tx_rings + i; + a->busy_wait = busy_wait; + a->direct = direct_rx; + } + /* Validate notification options. */ opt = nmreq_findoption((struct nmreq_option *)(uintptr_t)hdr->nr_options, + NETMAP_REQ_OPT_SYNC_KLOOP_MODE); + if (opt != NULL) { + struct nmreq_opt_sync_kloop_mode *mode_opt = + (struct nmreq_opt_sync_kloop_mode *)opt; + + direct_tx = !!(mode_opt->mode & NM_OPT_SYNC_KLOOP_DIRECT_TX); + direct_rx = !!(mode_opt->mode & NM_OPT_SYNC_KLOOP_DIRECT_RX); + if (mode_opt->mode & ~(NM_OPT_SYNC_KLOOP_DIRECT_TX | + NM_OPT_SYNC_KLOOP_DIRECT_RX)) { + opt->nro_status = err = EINVAL; + goto out; + } + opt->nro_status = 0; + } + opt = nmreq_findoption((struct nmreq_option *)(uintptr_t)hdr->nr_options, NETMAP_REQ_OPT_SYNC_KLOOP_EVENTFDS); if (opt != NULL) { err = nmreq_checkduplicate(opt); @@ -524,54 +682,132 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n #ifdef SYNC_KLOOP_POLL eventfds_opt = (struct nmreq_opt_sync_kloop_eventfds *)opt; opt->nro_status = 0; + + /* Check if some ioeventfd entry is not defined, and force sleep + * synchronization in that case. */ + busy_wait = false; + for (i = 0; i < num_rings; i++) { + if (eventfds_opt->eventfds[i].ioeventfd < 0) { + busy_wait = true; + break; + } + } + + if (busy_wait && (direct_tx || direct_rx)) { + /* For direct processing we need all the + * ioeventfds to be valid. */ + opt->nro_status = err = EINVAL; + goto out; + } + /* We need 2 poll entries for TX and RX notifications coming * from the netmap adapter, plus one entries per ring for the * notifications coming from the application. */ poll_ctx = nm_os_malloc(sizeof(*poll_ctx) + - (2 + num_rings) * sizeof(poll_ctx->entries[0])); + (num_rings + 2) * sizeof(poll_ctx->entries[0])); init_poll_funcptr(&poll_ctx->wait_table, sync_kloop_poll_table_queue_proc); poll_ctx->num_entries = 2 + num_rings; + poll_ctx->num_tx_rings = num_tx_rings; + poll_ctx->num_rings = num_rings; poll_ctx->next_entry = 0; + poll_ctx->next_wake_fun = NULL; + + if (direct_tx && (na->na_flags & NAF_BDG_MAYSLEEP)) { + /* In direct mode, VALE txsync is called from + * wake-up context, where it is not possible + * to sleep. + */ + na->na_flags &= ~NAF_BDG_MAYSLEEP; + na_could_sleep = true; + } + + for (i = 0; i < num_rings + 2; i++) { + poll_ctx->entries[i].args = args + i; + poll_ctx->entries[i].parent = poll_ctx; + } + /* Poll for notifications coming from the applications through - * eventfds . */ - for (i = 0; i < num_rings; i++) { - struct eventfd_ctx *irq; - struct file *filp; + * eventfds. */ + for (i = 0; i < num_rings; i++, poll_ctx->next_entry++) { + struct eventfd_ctx *irq = NULL; + struct file *filp = NULL; unsigned long mask; + bool tx_ring = (i < num_tx_rings); - filp = eventfd_fget(eventfds_opt->eventfds[i].ioeventfd); - if (IS_ERR(filp)) { - err = PTR_ERR(filp); - goto out; + if (eventfds_opt->eventfds[i].irqfd >= 0) { + filp = eventfd_fget( + eventfds_opt->eventfds[i].irqfd); + if (IS_ERR(filp)) { + err = PTR_ERR(filp); + goto out; + } + irq = eventfd_ctx_fileget(filp); + if (IS_ERR(irq)) { + err = PTR_ERR(irq); + goto out; + } } - mask = filp->f_op->poll(filp, &poll_ctx->wait_table); - if (mask & POLLERR) { - err = EINVAL; - goto out; - } - - filp = eventfd_fget(eventfds_opt->eventfds[i].irqfd); - if (IS_ERR(filp)) { - err = PTR_ERR(filp); - goto out; - } poll_ctx->entries[i].irq_filp = filp; - irq = eventfd_ctx_fileget(filp); - if (IS_ERR(irq)) { - err = PTR_ERR(irq); - goto out; - } poll_ctx->entries[i].irq_ctx = irq; + poll_ctx->entries[i].args->busy_wait = busy_wait; + /* Don't let netmap_sync_kloop_*x_ring() use + * IRQs in direct mode. */ + poll_ctx->entries[i].args->irq_ctx = + ((tx_ring && direct_tx) || + (!tx_ring && direct_rx)) ? NULL : + poll_ctx->entries[i].irq_ctx; + poll_ctx->entries[i].args->direct = + (tx_ring ? direct_tx : direct_rx); + + if (!busy_wait) { + filp = eventfd_fget( + eventfds_opt->eventfds[i].ioeventfd); + if (IS_ERR(filp)) { + err = PTR_ERR(filp); + goto out; + } + if (tx_ring && direct_tx) { + /* Override the wake up function + * so that it can directly call + * netmap_sync_kloop_tx_ring(). + */ + poll_ctx->next_wake_fun = + sync_kloop_tx_kick_wake_fun; + } else if (!tx_ring && direct_rx) { + /* Same for direct RX. */ + poll_ctx->next_wake_fun = + sync_kloop_rx_kick_wake_fun; + } else { + poll_ctx->next_wake_fun = NULL; + } + mask = filp->f_op->poll(filp, + &poll_ctx->wait_table); + if (mask & POLLERR) { + err = EINVAL; + goto out; + } + } } + /* Poll for notifications coming from the netmap rings bound to * this file descriptor. */ - { + if (!busy_wait) { NMG_LOCK(); + /* In direct mode, override the wake up function so + * that it can forward the netmap_tx_irq() to the + * guest. */ + poll_ctx->next_wake_fun = direct_tx ? + sync_kloop_tx_irq_wake_fun : NULL; poll_wait(priv->np_filp, priv->np_si[NR_TX], &poll_ctx->wait_table); + poll_ctx->next_entry++; + + poll_ctx->next_wake_fun = direct_rx ? + sync_kloop_rx_irq_wake_fun : NULL; poll_wait(priv->np_filp, priv->np_si[NR_RX], &poll_ctx->wait_table); + poll_ctx->next_entry++; NMG_UNLOCK(); } #else /* SYNC_KLOOP_POLL */ @@ -580,31 +816,10 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n #endif /* SYNC_KLOOP_POLL */ } - /* Prepare the arguments for netmap_sync_kloop_tx_ring() - * and netmap_sync_kloop_rx_ring(). */ - for (i = 0; i < num_tx_rings; i++) { - struct sync_kloop_ring_args *a = args + i; + nm_prinf("kloop busy_wait %u, direct_tx %u, direct_rx %u, " + "na_could_sleep %u", busy_wait, direct_tx, direct_rx, + na_could_sleep); - a->kring = NMR(na, NR_TX)[i + priv->np_qfirst[NR_TX]]; - a->csb_atok = csb_atok_base + i; - a->csb_ktoa = csb_ktoa_base + i; -#ifdef SYNC_KLOOP_POLL - if (poll_ctx) - a->irq_ctx = poll_ctx->entries[i].irq_ctx; -#endif /* SYNC_KLOOP_POLL */ - } - for (i = 0; i < num_rx_rings; i++) { - struct sync_kloop_ring_args *a = args + num_tx_rings + i; - - a->kring = NMR(na, NR_RX)[i + priv->np_qfirst[NR_RX]]; - a->csb_atok = csb_atok_base + num_tx_rings + i; - a->csb_ktoa = csb_ktoa_base + num_tx_rings + i; -#ifdef SYNC_KLOOP_POLL - if (poll_ctx) - a->irq_ctx = poll_ctx->entries[num_tx_rings + i].irq_ctx; -#endif /* SYNC_KLOOP_POLL */ - } - /* Main loop. */ for (;;) { if (unlikely(NM_ACCESS_ONCE(priv->np_kloop_state) & NM_SYNC_KLOOP_STOPPING)) { @@ -612,7 +827,7 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n } #ifdef SYNC_KLOOP_POLL - if (poll_ctx) { + if (!busy_wait) { /* It is important to set the task state as * interruptible before processing any TX/RX ring, * so that if a notification on ring Y comes after @@ -627,46 +842,37 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n #endif /* SYNC_KLOOP_POLL */ /* Process all the TX rings bound to this file descriptor. */ - for (i = 0; i < num_tx_rings; i++) { + for (i = 0; !direct_tx && i < num_tx_rings; i++) { struct sync_kloop_ring_args *a = args + i; - - if (unlikely(nm_kr_tryget(a->kring, 1, NULL))) { - continue; - } netmap_sync_kloop_tx_ring(a); - nm_kr_put(a->kring); } /* Process all the RX rings bound to this file descriptor. */ - for (i = 0; i < num_rx_rings; i++) { + for (i = 0; !direct_rx && i < num_rx_rings; i++) { struct sync_kloop_ring_args *a = args + num_tx_rings + i; - - if (unlikely(nm_kr_tryget(a->kring, 1, NULL))) { - continue; - } netmap_sync_kloop_rx_ring(a); - nm_kr_put(a->kring); } -#ifdef SYNC_KLOOP_POLL - if (poll_ctx) { - /* If a poll context is present, yield to the scheduler - * waiting for a notification to come either from - * netmap or the application. */ - schedule_timeout(msecs_to_jiffies(3000)); - } else -#endif /* SYNC_KLOOP_POLL */ - { + if (busy_wait) { /* Default synchronization method: sleep for a while. */ usleep_range(sleep_us, sleep_us); } +#ifdef SYNC_KLOOP_POLL + else { + /* Yield to the scheduler waiting for a notification + * to come either from netmap or the application. */ + schedule_timeout(msecs_to_jiffies(3000)); + } +#endif /* SYNC_KLOOP_POLL */ } out: #ifdef SYNC_KLOOP_POLL if (poll_ctx) { /* Stop polling from netmap and the eventfds, and deallocate * the poll context. */ - __set_current_state(TASK_RUNNING); + if (!busy_wait) { + __set_current_state(TASK_RUNNING); + } for (i = 0; i < poll_ctx->next_entry; i++) { struct sync_kloop_poll_entry *entry = poll_ctx->entries + i; @@ -696,6 +902,9 @@ out: /* Reset the kloop state. */ NMG_LOCK(); priv->np_kloop_state = 0; + if (na_could_sleep) { + na->na_flags |= NAF_BDG_MAYSLEEP; + } NMG_UNLOCK(); return err; @@ -770,14 +979,14 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc atok->appl_need_kick = 0; /* - * First part: tell the host (updating the CSB) to process the new - * packets. + * First part: tell the host to process the new packets, + * updating the CSB. */ kring->nr_hwcur = ktoa->hwcur; nm_sync_kloop_appl_write(atok, kring->rcur, kring->rhead); /* Ask for a kick from a guest to the host if needed. */ - if (((kring->rhead != kring->nr_hwcur || nm_kr_txempty(kring)) + if (((kring->rhead != kring->nr_hwcur || nm_kr_wouldblock(kring)) && NM_ACCESS_ONCE(ktoa->kern_need_kick)) || (flags & NAF_FORCE_RECLAIM)) { atok->sync_flags = flags; @@ -787,7 +996,7 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc /* * Second part: reclaim buffers for completed transmissions. */ - if (nm_kr_txempty(kring) || (flags & NAF_FORCE_RECLAIM)) { + if (nm_kr_wouldblock(kring) || (flags & NAF_FORCE_RECLAIM)) { nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, &kring->nr_hwcur); } @@ -797,7 +1006,7 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc * go to sleep and we need to be notified by the host when more free * space is available. */ - if (nm_kr_txempty(kring) && !(kring->nr_kflags & NKR_NOINTR)) { + if (nm_kr_wouldblock(kring) && !(kring->nr_kflags & NKR_NOINTR)) { /* Reenable notifications. */ atok->appl_need_kick = 1; /* Double check, with store-load memory barrier. */ @@ -805,7 +1014,7 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, &kring->nr_hwcur); /* If there is new free space, disable notifications */ - if (unlikely(!nm_kr_txempty(kring))) { + if (unlikely(!nm_kr_wouldblock(kring))) { atok->appl_need_kick = 0; } } @@ -851,11 +1060,6 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc */ if (kring->rhead != kring->nr_hwcur) { nm_sync_kloop_appl_write(atok, kring->rcur, kring->rhead); - /* Ask for a kick from the guest to the host if needed. */ - if (NM_ACCESS_ONCE(ktoa->kern_need_kick)) { - atok->sync_flags = flags; - notify = true; - } } /* @@ -863,7 +1067,7 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc * we need to be notified by the host when more RX slots have been * completed. */ - if (nm_kr_rxempty(kring) && !(kring->nr_kflags & NKR_NOINTR)) { + if (nm_kr_wouldblock(kring) && !(kring->nr_kflags & NKR_NOINTR)) { /* Reenable notifications. */ atok->appl_need_kick = 1; /* Double check, with store-load memory barrier. */ @@ -871,10 +1075,17 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, &kring->nr_hwcur); /* If there are new slots, disable notifications. */ - if (!nm_kr_rxempty(kring)) { + if (!nm_kr_wouldblock(kring)) { atok->appl_need_kick = 0; } } + + /* Ask for a kick from the guest to the host if needed. */ + if ((kring->rhead != kring->nr_hwcur || nm_kr_wouldblock(kring)) + && NM_ACCESS_ONCE(ktoa->kern_need_kick)) { + atok->sync_flags = flags; + notify = true; + } nm_prdis(1, "%s CSB(head:%u cur:%u hwtail:%u) KRING(head:%u cur:%u tail:%u)", kring->name, atok->head, atok->cur, ktoa->hwtail, Modified: stable/12/sys/net/netmap.h ============================================================================== --- stable/12/sys/net/netmap.h Thu Feb 7 10:30:11 2019 (r343864) +++ stable/12/sys/net/netmap.h Thu Feb 7 10:44:03 2019 (r343865) @@ -540,7 +540,8 @@ enum { enum { /* On NETMAP_REQ_REGISTER, ask netmap to use memory allocated - * from user-space allocated memory pools (e.g. hugepages). */ + * from user-space allocated memory pools (e.g. hugepages). + */ NETMAP_REQ_OPT_EXTMEM = 1, /* ON NETMAP_REQ_SYNC_KLOOP_START, ask netmap to use eventfd-based @@ -551,8 +552,15 @@ enum { /* On NETMAP_REQ_REGISTER, ask netmap to work in CSB mode, where * head, cur and tail pointers are not exchanged through the * struct netmap_ring header, but rather using an user-provided - * memory area (see struct nm_csb_atok and struct nm_csb_ktoa). */ + * memory area (see struct nm_csb_atok and struct nm_csb_ktoa). + */ NETMAP_REQ_OPT_CSB, + + /* An extension to NETMAP_REQ_OPT_SYNC_KLOOP_EVENTFDS, which specifies + * if the TX and/or RX rings are synced in the context of the VM exit. + * This requires the 'ioeventfd' fields to be valid (cannot be < 0). + */ + NETMAP_REQ_OPT_SYNC_KLOOP_MODE, }; /* @@ -877,6 +885,12 @@ struct nmreq_opt_sync_kloop_eventfds { * their order must agree with the CSB arrays passed in the * NETMAP_REQ_OPT_CSB option. Each entry contains a file descriptor * backed by an eventfd. + * + * If any of the 'ioeventfd' entries is < 0, the event loop uses + * the sleeping synchronization strategy (according to sleep_us), + * and keeps kern_need_kick always disabled. + * Each 'irqfd' can be < 0, and in that case the corresponding queue + * is never notified. */ struct { /* Notifier for the application --> kernel loop direction. */ @@ -884,6 +898,13 @@ struct nmreq_opt_sync_kloop_eventfds { /* Notifier for the kernel loop --> application direction. */ int32_t irqfd; } eventfds[0]; +}; + +struct nmreq_opt_sync_kloop_mode { + struct nmreq_option nro_opt; /* common header */ +#define NM_OPT_SYNC_KLOOP_DIRECT_TX (1 << 0) +#define NM_OPT_SYNC_KLOOP_DIRECT_RX (1 << 1) + uint32_t mode; }; struct nmreq_opt_extmem { From owner-svn-src-stable@freebsd.org Thu Feb 7 10:44:54 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73AC214D3C37; Thu, 7 Feb 2019 10:44:54 +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) server-signature RSA-PSS (4096 bits) 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 2658082A68; Thu, 7 Feb 2019 10:44:54 +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 14F6D1BE23; Thu, 7 Feb 2019 10:44:54 +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 x17AisUK040197; Thu, 7 Feb 2019 10:44:54 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17Airqn040191; Thu, 7 Feb 2019 10:44:53 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902071044.x17Airqn040191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 7 Feb 2019 10:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343866 - in stable/11/sys: dev/netmap net X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/11/sys: dev/netmap net X-SVN-Commit-Revision: 343866 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2658082A68 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 10:44:54 -0000 Author: vmaffione Date: Thu Feb 7 10:44:53 2019 New Revision: 343866 URL: https://svnweb.freebsd.org/changeset/base/343866 Log: MFC r343689 netmap: upgrade sync-kloop support Add SYNC_KLOOP_MODE option, and add support for direct mode, where application executes the TXSYNC and RXSYNC in the context of the ioeventfd wake up callback. Modified: stable/11/sys/dev/netmap/netmap.c stable/11/sys/dev/netmap/netmap_kern.h stable/11/sys/dev/netmap/netmap_kloop.c stable/11/sys/net/netmap.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap.c ============================================================================== --- stable/11/sys/dev/netmap/netmap.c Thu Feb 7 10:44:03 2019 (r343865) +++ stable/11/sys/dev/netmap/netmap.c Thu Feb 7 10:44:53 2019 (r343866) @@ -2963,6 +2963,9 @@ nmreq_opt_size_by_type(uint32_t nro_reqtype, uint64_t case NETMAP_REQ_OPT_CSB: rv = sizeof(struct nmreq_opt_csb); break; + case NETMAP_REQ_OPT_SYNC_KLOOP_MODE: + rv = sizeof(struct nmreq_opt_sync_kloop_mode); + break; } /* subtract the common header */ return rv - sizeof(struct nmreq_option); @@ -3279,10 +3282,8 @@ netmap_poll(struct netmap_priv_d *priv, int events, NM * there are pending packets to send. The latter can be disabled * passing NETMAP_NO_TX_POLL in the NIOCREG call. */ - si[NR_RX] = nm_si_user(priv, NR_RX) ? &na->si[NR_RX] : - &na->rx_rings[priv->np_qfirst[NR_RX]]->si; - si[NR_TX] = nm_si_user(priv, NR_TX) ? &na->si[NR_TX] : - &na->tx_rings[priv->np_qfirst[NR_TX]]->si; + si[NR_RX] = priv->np_si[NR_RX]; + si[NR_TX] = priv->np_si[NR_TX]; #ifdef __FreeBSD__ /* Modified: stable/11/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/11/sys/dev/netmap/netmap_kern.h Thu Feb 7 10:44:03 2019 (r343865) +++ stable/11/sys/dev/netmap/netmap_kern.h Thu Feb 7 10:44:53 2019 (r343866) @@ -1164,6 +1164,15 @@ nm_kr_txempty(struct netmap_kring *kring) * rxsync_prologue */ #define nm_kr_rxempty(_k) nm_kr_txempty(_k) +/* True if the application needs to wait for more space on the ring + * (more received packets or more free tx slots). + * Only valid after *xsync_prologue. */ +static inline int +nm_kr_wouldblock(struct netmap_kring *kring) +{ + return kring->rcur == kring->nr_hwtail; +} + /* * protect against multiple threads using the same ring. * also check that the ring has not been stopped or locked Modified: stable/11/sys/dev/netmap/netmap_kloop.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_kloop.c Thu Feb 7 10:44:03 2019 (r343865) +++ stable/11/sys/dev/netmap/netmap_kloop.c Thu Feb 7 10:44:53 2019 (r343866) @@ -141,6 +141,9 @@ sync_kloop_kring_dump(const char *title, const struct kring->rcur, kring->rtail, kring->nr_hwtail); } +/* Arguments for netmap_sync_kloop_tx_ring() and + * netmap_sync_kloop_rx_ring(). + */ struct sync_kloop_ring_args { struct netmap_kring *kring; struct nm_csb_atok *csb_atok; @@ -148,6 +151,10 @@ struct sync_kloop_ring_args { #ifdef SYNC_KLOOP_POLL struct eventfd_ctx *irq_ctx; #endif /* SYNC_KLOOP_POLL */ + /* Are we busy waiting rather than using a schedule() loop ? */ + bool busy_wait; + /* Are we processing in the context of VM exit ? */ + bool direct; }; static void @@ -161,10 +168,16 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring uint32_t num_slots; int batch; + if (unlikely(nm_kr_tryget(kring, 1, NULL))) { + return; + } + num_slots = kring->nkr_num_slots; /* Disable application --> kernel notifications. */ - csb_ktoa_kick_enable(csb_ktoa, 0); + if (!a->direct) { + csb_ktoa_kick_enable(csb_ktoa, 0); + } /* Copy the application kring pointers from the CSB */ sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); @@ -197,7 +210,9 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring if (unlikely(nm_txsync_prologue(kring, &shadow_ring) >= num_slots)) { /* Reinit ring and enable notifications. */ netmap_ring_reinit(kring); - csb_ktoa_kick_enable(csb_ktoa, 1); + if (!a->busy_wait) { + csb_ktoa_kick_enable(csb_ktoa, 1); + } break; } @@ -206,8 +221,10 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring } if (unlikely(kring->nm_sync(kring, shadow_ring.flags))) { - /* Reenable notifications. */ - csb_ktoa_kick_enable(csb_ktoa, 1); + if (!a->busy_wait) { + /* Reenable notifications. */ + csb_ktoa_kick_enable(csb_ktoa, 1); + } nm_prerr("txsync() failed"); break; } @@ -232,7 +249,8 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring /* Interrupt the application if needed. */ #ifdef SYNC_KLOOP_POLL if (a->irq_ctx && more_txspace && csb_atok_intr_enabled(csb_atok)) { - /* Disable application kick to avoid sending unnecessary kicks */ + /* We could disable kernel --> application kicks here, + * to avoid spurious interrupts. */ eventfd_signal(a->irq_ctx, 1); more_txspace = false; } @@ -241,6 +259,9 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring /* Read CSB to see if there is more work to do. */ sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); if (shadow_ring.head == kring->rhead) { + if (a->busy_wait) { + break; + } /* * No more packets to transmit. We enable notifications and * go to sleep, waiting for a kick from the application when new @@ -268,6 +289,8 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring } } + nm_kr_put(kring); + #ifdef SYNC_KLOOP_POLL if (a->irq_ctx && more_txspace && csb_atok_intr_enabled(csb_atok)) { eventfd_signal(a->irq_ctx, 1); @@ -297,13 +320,19 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring bool some_recvd = false; uint32_t num_slots; + if (unlikely(nm_kr_tryget(kring, 1, NULL))) { + return; + } + num_slots = kring->nkr_num_slots; /* Get RX csb_atok and csb_ktoa pointers from the CSB. */ num_slots = kring->nkr_num_slots; /* Disable notifications. */ - csb_ktoa_kick_enable(csb_ktoa, 0); + if (!a->direct) { + csb_ktoa_kick_enable(csb_ktoa, 0); + } /* Copy the application kring pointers from the CSB */ sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); @@ -315,7 +344,9 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring if (unlikely(nm_rxsync_prologue(kring, &shadow_ring) >= num_slots)) { /* Reinit ring and enable notifications. */ netmap_ring_reinit(kring); - csb_ktoa_kick_enable(csb_ktoa, 1); + if (!a->busy_wait) { + csb_ktoa_kick_enable(csb_ktoa, 1); + } break; } @@ -324,8 +355,10 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring } if (unlikely(kring->nm_sync(kring, shadow_ring.flags))) { - /* Reenable notifications. */ - csb_ktoa_kick_enable(csb_ktoa, 1); + if (!a->busy_wait) { + /* Reenable notifications. */ + csb_ktoa_kick_enable(csb_ktoa, 1); + } nm_prerr("rxsync() failed"); break; } @@ -351,7 +384,8 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring #ifdef SYNC_KLOOP_POLL /* Interrupt the application if needed. */ if (a->irq_ctx && some_recvd && csb_atok_intr_enabled(csb_atok)) { - /* Disable application kick to avoid sending unnecessary kicks */ + /* We could disable kernel --> application kicks here, + * to avoid spurious interrupts. */ eventfd_signal(a->irq_ctx, 1); some_recvd = false; } @@ -360,6 +394,9 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring /* Read CSB to see if there is more work to do. */ sync_kloop_kernel_read(csb_atok, &shadow_ring, num_slots); if (sync_kloop_norxslots(kring, shadow_ring.head)) { + if (a->busy_wait) { + break; + } /* * No more slots available for reception. We enable notification and * go to sleep, waiting for a kick from the application when new receive @@ -401,6 +438,7 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring } #ifdef SYNC_KLOOP_POLL +struct sync_kloop_poll_ctx; struct sync_kloop_poll_entry { /* Support for receiving notifications from * a netmap ring or from the application. */ @@ -411,12 +449,24 @@ struct sync_kloop_poll_entry { /* Support for sending notifications to the application. */ struct eventfd_ctx *irq_ctx; struct file *irq_filp; + + /* Arguments for the ring processing function. Useful + * in case of custom wake-up function. */ + struct sync_kloop_ring_args *args; + struct sync_kloop_poll_ctx *parent; + }; struct sync_kloop_poll_ctx { poll_table wait_table; unsigned int next_entry; + int (*next_wake_fun)(wait_queue_t *, unsigned, int, void *); unsigned int num_entries; + unsigned int num_tx_rings; + unsigned int num_rings; + /* First num_tx_rings entries are for the TX kicks. + * Then the RX kicks entries follow. The last two + * entries are for TX irq, and RX irq. */ struct sync_kloop_poll_entry entries[0]; }; @@ -433,10 +483,78 @@ sync_kloop_poll_table_queue_proc(struct file *file, wa entry->wqh = wqh; entry->filp = file; /* Use the default wake up function. */ - init_waitqueue_entry(&entry->wait, current); + if (poll_ctx->next_wake_fun == NULL) { + init_waitqueue_entry(&entry->wait, current); + } else { + init_waitqueue_func_entry(&entry->wait, + poll_ctx->next_wake_fun); + } add_wait_queue(wqh, &entry->wait); - poll_ctx->next_entry++; } + +static int +sync_kloop_tx_kick_wake_fun(wait_queue_t *wait, unsigned mode, + int wake_flags, void *key) +{ + struct sync_kloop_poll_entry *entry = + container_of(wait, struct sync_kloop_poll_entry, wait); + + netmap_sync_kloop_tx_ring(entry->args); + + return 0; +} + +static int +sync_kloop_tx_irq_wake_fun(wait_queue_t *wait, unsigned mode, + int wake_flags, void *key) +{ + struct sync_kloop_poll_entry *entry = + container_of(wait, struct sync_kloop_poll_entry, wait); + struct sync_kloop_poll_ctx *poll_ctx = entry->parent; + int i; + + for (i = 0; i < poll_ctx->num_tx_rings; i++) { + struct eventfd_ctx *irq_ctx = poll_ctx->entries[i].irq_ctx; + + if (irq_ctx) { + eventfd_signal(irq_ctx, 1); + } + } + + return 0; +} + +static int +sync_kloop_rx_kick_wake_fun(wait_queue_t *wait, unsigned mode, + int wake_flags, void *key) +{ + struct sync_kloop_poll_entry *entry = + container_of(wait, struct sync_kloop_poll_entry, wait); + + netmap_sync_kloop_rx_ring(entry->args); + + return 0; +} + +static int +sync_kloop_rx_irq_wake_fun(wait_queue_t *wait, unsigned mode, + int wake_flags, void *key) +{ + struct sync_kloop_poll_entry *entry = + container_of(wait, struct sync_kloop_poll_entry, wait); + struct sync_kloop_poll_ctx *poll_ctx = entry->parent; + int i; + + for (i = poll_ctx->num_tx_rings; i < poll_ctx->num_rings; i++) { + struct eventfd_ctx *irq_ctx = poll_ctx->entries[i].irq_ctx; + + if (irq_ctx) { + eventfd_signal(irq_ctx, 1); + } + } + + return 0; +} #endif /* SYNC_KLOOP_POLL */ int @@ -455,6 +573,10 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n struct nm_csb_ktoa* csb_ktoa_base; struct netmap_adapter *na; struct nmreq_option *opt; + bool na_could_sleep = false; + bool busy_wait = true; + bool direct_tx = false; + bool direct_rx = false; int err = 0; int i; @@ -505,8 +627,44 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n goto out; } + /* Prepare the arguments for netmap_sync_kloop_tx_ring() + * and netmap_sync_kloop_rx_ring(). */ + for (i = 0; i < num_tx_rings; i++) { + struct sync_kloop_ring_args *a = args + i; + + a->kring = NMR(na, NR_TX)[i + priv->np_qfirst[NR_TX]]; + a->csb_atok = csb_atok_base + i; + a->csb_ktoa = csb_ktoa_base + i; + a->busy_wait = busy_wait; + a->direct = direct_tx; + } + for (i = 0; i < num_rx_rings; i++) { + struct sync_kloop_ring_args *a = args + num_tx_rings + i; + + a->kring = NMR(na, NR_RX)[i + priv->np_qfirst[NR_RX]]; + a->csb_atok = csb_atok_base + num_tx_rings + i; + a->csb_ktoa = csb_ktoa_base + num_tx_rings + i; + a->busy_wait = busy_wait; + a->direct = direct_rx; + } + /* Validate notification options. */ opt = nmreq_findoption((struct nmreq_option *)(uintptr_t)hdr->nr_options, + NETMAP_REQ_OPT_SYNC_KLOOP_MODE); + if (opt != NULL) { + struct nmreq_opt_sync_kloop_mode *mode_opt = + (struct nmreq_opt_sync_kloop_mode *)opt; + + direct_tx = !!(mode_opt->mode & NM_OPT_SYNC_KLOOP_DIRECT_TX); + direct_rx = !!(mode_opt->mode & NM_OPT_SYNC_KLOOP_DIRECT_RX); + if (mode_opt->mode & ~(NM_OPT_SYNC_KLOOP_DIRECT_TX | + NM_OPT_SYNC_KLOOP_DIRECT_RX)) { + opt->nro_status = err = EINVAL; + goto out; + } + opt->nro_status = 0; + } + opt = nmreq_findoption((struct nmreq_option *)(uintptr_t)hdr->nr_options, NETMAP_REQ_OPT_SYNC_KLOOP_EVENTFDS); if (opt != NULL) { err = nmreq_checkduplicate(opt); @@ -524,54 +682,132 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n #ifdef SYNC_KLOOP_POLL eventfds_opt = (struct nmreq_opt_sync_kloop_eventfds *)opt; opt->nro_status = 0; + + /* Check if some ioeventfd entry is not defined, and force sleep + * synchronization in that case. */ + busy_wait = false; + for (i = 0; i < num_rings; i++) { + if (eventfds_opt->eventfds[i].ioeventfd < 0) { + busy_wait = true; + break; + } + } + + if (busy_wait && (direct_tx || direct_rx)) { + /* For direct processing we need all the + * ioeventfds to be valid. */ + opt->nro_status = err = EINVAL; + goto out; + } + /* We need 2 poll entries for TX and RX notifications coming * from the netmap adapter, plus one entries per ring for the * notifications coming from the application. */ poll_ctx = nm_os_malloc(sizeof(*poll_ctx) + - (2 + num_rings) * sizeof(poll_ctx->entries[0])); + (num_rings + 2) * sizeof(poll_ctx->entries[0])); init_poll_funcptr(&poll_ctx->wait_table, sync_kloop_poll_table_queue_proc); poll_ctx->num_entries = 2 + num_rings; + poll_ctx->num_tx_rings = num_tx_rings; + poll_ctx->num_rings = num_rings; poll_ctx->next_entry = 0; + poll_ctx->next_wake_fun = NULL; + + if (direct_tx && (na->na_flags & NAF_BDG_MAYSLEEP)) { + /* In direct mode, VALE txsync is called from + * wake-up context, where it is not possible + * to sleep. + */ + na->na_flags &= ~NAF_BDG_MAYSLEEP; + na_could_sleep = true; + } + + for (i = 0; i < num_rings + 2; i++) { + poll_ctx->entries[i].args = args + i; + poll_ctx->entries[i].parent = poll_ctx; + } + /* Poll for notifications coming from the applications through - * eventfds . */ - for (i = 0; i < num_rings; i++) { - struct eventfd_ctx *irq; - struct file *filp; + * eventfds. */ + for (i = 0; i < num_rings; i++, poll_ctx->next_entry++) { + struct eventfd_ctx *irq = NULL; + struct file *filp = NULL; unsigned long mask; + bool tx_ring = (i < num_tx_rings); - filp = eventfd_fget(eventfds_opt->eventfds[i].ioeventfd); - if (IS_ERR(filp)) { - err = PTR_ERR(filp); - goto out; + if (eventfds_opt->eventfds[i].irqfd >= 0) { + filp = eventfd_fget( + eventfds_opt->eventfds[i].irqfd); + if (IS_ERR(filp)) { + err = PTR_ERR(filp); + goto out; + } + irq = eventfd_ctx_fileget(filp); + if (IS_ERR(irq)) { + err = PTR_ERR(irq); + goto out; + } } - mask = filp->f_op->poll(filp, &poll_ctx->wait_table); - if (mask & POLLERR) { - err = EINVAL; - goto out; - } - - filp = eventfd_fget(eventfds_opt->eventfds[i].irqfd); - if (IS_ERR(filp)) { - err = PTR_ERR(filp); - goto out; - } poll_ctx->entries[i].irq_filp = filp; - irq = eventfd_ctx_fileget(filp); - if (IS_ERR(irq)) { - err = PTR_ERR(irq); - goto out; - } poll_ctx->entries[i].irq_ctx = irq; + poll_ctx->entries[i].args->busy_wait = busy_wait; + /* Don't let netmap_sync_kloop_*x_ring() use + * IRQs in direct mode. */ + poll_ctx->entries[i].args->irq_ctx = + ((tx_ring && direct_tx) || + (!tx_ring && direct_rx)) ? NULL : + poll_ctx->entries[i].irq_ctx; + poll_ctx->entries[i].args->direct = + (tx_ring ? direct_tx : direct_rx); + + if (!busy_wait) { + filp = eventfd_fget( + eventfds_opt->eventfds[i].ioeventfd); + if (IS_ERR(filp)) { + err = PTR_ERR(filp); + goto out; + } + if (tx_ring && direct_tx) { + /* Override the wake up function + * so that it can directly call + * netmap_sync_kloop_tx_ring(). + */ + poll_ctx->next_wake_fun = + sync_kloop_tx_kick_wake_fun; + } else if (!tx_ring && direct_rx) { + /* Same for direct RX. */ + poll_ctx->next_wake_fun = + sync_kloop_rx_kick_wake_fun; + } else { + poll_ctx->next_wake_fun = NULL; + } + mask = filp->f_op->poll(filp, + &poll_ctx->wait_table); + if (mask & POLLERR) { + err = EINVAL; + goto out; + } + } } + /* Poll for notifications coming from the netmap rings bound to * this file descriptor. */ - { + if (!busy_wait) { NMG_LOCK(); + /* In direct mode, override the wake up function so + * that it can forward the netmap_tx_irq() to the + * guest. */ + poll_ctx->next_wake_fun = direct_tx ? + sync_kloop_tx_irq_wake_fun : NULL; poll_wait(priv->np_filp, priv->np_si[NR_TX], &poll_ctx->wait_table); + poll_ctx->next_entry++; + + poll_ctx->next_wake_fun = direct_rx ? + sync_kloop_rx_irq_wake_fun : NULL; poll_wait(priv->np_filp, priv->np_si[NR_RX], &poll_ctx->wait_table); + poll_ctx->next_entry++; NMG_UNLOCK(); } #else /* SYNC_KLOOP_POLL */ @@ -580,31 +816,10 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n #endif /* SYNC_KLOOP_POLL */ } - /* Prepare the arguments for netmap_sync_kloop_tx_ring() - * and netmap_sync_kloop_rx_ring(). */ - for (i = 0; i < num_tx_rings; i++) { - struct sync_kloop_ring_args *a = args + i; + nm_prinf("kloop busy_wait %u, direct_tx %u, direct_rx %u, " + "na_could_sleep %u", busy_wait, direct_tx, direct_rx, + na_could_sleep); - a->kring = NMR(na, NR_TX)[i + priv->np_qfirst[NR_TX]]; - a->csb_atok = csb_atok_base + i; - a->csb_ktoa = csb_ktoa_base + i; -#ifdef SYNC_KLOOP_POLL - if (poll_ctx) - a->irq_ctx = poll_ctx->entries[i].irq_ctx; -#endif /* SYNC_KLOOP_POLL */ - } - for (i = 0; i < num_rx_rings; i++) { - struct sync_kloop_ring_args *a = args + num_tx_rings + i; - - a->kring = NMR(na, NR_RX)[i + priv->np_qfirst[NR_RX]]; - a->csb_atok = csb_atok_base + num_tx_rings + i; - a->csb_ktoa = csb_ktoa_base + num_tx_rings + i; -#ifdef SYNC_KLOOP_POLL - if (poll_ctx) - a->irq_ctx = poll_ctx->entries[num_tx_rings + i].irq_ctx; -#endif /* SYNC_KLOOP_POLL */ - } - /* Main loop. */ for (;;) { if (unlikely(NM_ACCESS_ONCE(priv->np_kloop_state) & NM_SYNC_KLOOP_STOPPING)) { @@ -612,7 +827,7 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n } #ifdef SYNC_KLOOP_POLL - if (poll_ctx) { + if (!busy_wait) { /* It is important to set the task state as * interruptible before processing any TX/RX ring, * so that if a notification on ring Y comes after @@ -627,46 +842,37 @@ netmap_sync_kloop(struct netmap_priv_d *priv, struct n #endif /* SYNC_KLOOP_POLL */ /* Process all the TX rings bound to this file descriptor. */ - for (i = 0; i < num_tx_rings; i++) { + for (i = 0; !direct_tx && i < num_tx_rings; i++) { struct sync_kloop_ring_args *a = args + i; - - if (unlikely(nm_kr_tryget(a->kring, 1, NULL))) { - continue; - } netmap_sync_kloop_tx_ring(a); - nm_kr_put(a->kring); } /* Process all the RX rings bound to this file descriptor. */ - for (i = 0; i < num_rx_rings; i++) { + for (i = 0; !direct_rx && i < num_rx_rings; i++) { struct sync_kloop_ring_args *a = args + num_tx_rings + i; - - if (unlikely(nm_kr_tryget(a->kring, 1, NULL))) { - continue; - } netmap_sync_kloop_rx_ring(a); - nm_kr_put(a->kring); } -#ifdef SYNC_KLOOP_POLL - if (poll_ctx) { - /* If a poll context is present, yield to the scheduler - * waiting for a notification to come either from - * netmap or the application. */ - schedule_timeout(msecs_to_jiffies(3000)); - } else -#endif /* SYNC_KLOOP_POLL */ - { + if (busy_wait) { /* Default synchronization method: sleep for a while. */ usleep_range(sleep_us, sleep_us); } +#ifdef SYNC_KLOOP_POLL + else { + /* Yield to the scheduler waiting for a notification + * to come either from netmap or the application. */ + schedule_timeout(msecs_to_jiffies(3000)); + } +#endif /* SYNC_KLOOP_POLL */ } out: #ifdef SYNC_KLOOP_POLL if (poll_ctx) { /* Stop polling from netmap and the eventfds, and deallocate * the poll context. */ - __set_current_state(TASK_RUNNING); + if (!busy_wait) { + __set_current_state(TASK_RUNNING); + } for (i = 0; i < poll_ctx->next_entry; i++) { struct sync_kloop_poll_entry *entry = poll_ctx->entries + i; @@ -696,6 +902,9 @@ out: /* Reset the kloop state. */ NMG_LOCK(); priv->np_kloop_state = 0; + if (na_could_sleep) { + na->na_flags |= NAF_BDG_MAYSLEEP; + } NMG_UNLOCK(); return err; @@ -770,14 +979,14 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc atok->appl_need_kick = 0; /* - * First part: tell the host (updating the CSB) to process the new - * packets. + * First part: tell the host to process the new packets, + * updating the CSB. */ kring->nr_hwcur = ktoa->hwcur; nm_sync_kloop_appl_write(atok, kring->rcur, kring->rhead); /* Ask for a kick from a guest to the host if needed. */ - if (((kring->rhead != kring->nr_hwcur || nm_kr_txempty(kring)) + if (((kring->rhead != kring->nr_hwcur || nm_kr_wouldblock(kring)) && NM_ACCESS_ONCE(ktoa->kern_need_kick)) || (flags & NAF_FORCE_RECLAIM)) { atok->sync_flags = flags; @@ -787,7 +996,7 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc /* * Second part: reclaim buffers for completed transmissions. */ - if (nm_kr_txempty(kring) || (flags & NAF_FORCE_RECLAIM)) { + if (nm_kr_wouldblock(kring) || (flags & NAF_FORCE_RECLAIM)) { nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, &kring->nr_hwcur); } @@ -797,7 +1006,7 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc * go to sleep and we need to be notified by the host when more free * space is available. */ - if (nm_kr_txempty(kring) && !(kring->nr_kflags & NKR_NOINTR)) { + if (nm_kr_wouldblock(kring) && !(kring->nr_kflags & NKR_NOINTR)) { /* Reenable notifications. */ atok->appl_need_kick = 1; /* Double check, with store-load memory barrier. */ @@ -805,7 +1014,7 @@ netmap_pt_guest_txsync(struct nm_csb_atok *atok, struc nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, &kring->nr_hwcur); /* If there is new free space, disable notifications */ - if (unlikely(!nm_kr_txempty(kring))) { + if (unlikely(!nm_kr_wouldblock(kring))) { atok->appl_need_kick = 0; } } @@ -851,11 +1060,6 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc */ if (kring->rhead != kring->nr_hwcur) { nm_sync_kloop_appl_write(atok, kring->rcur, kring->rhead); - /* Ask for a kick from the guest to the host if needed. */ - if (NM_ACCESS_ONCE(ktoa->kern_need_kick)) { - atok->sync_flags = flags; - notify = true; - } } /* @@ -863,7 +1067,7 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc * we need to be notified by the host when more RX slots have been * completed. */ - if (nm_kr_rxempty(kring) && !(kring->nr_kflags & NKR_NOINTR)) { + if (nm_kr_wouldblock(kring) && !(kring->nr_kflags & NKR_NOINTR)) { /* Reenable notifications. */ atok->appl_need_kick = 1; /* Double check, with store-load memory barrier. */ @@ -871,10 +1075,17 @@ netmap_pt_guest_rxsync(struct nm_csb_atok *atok, struc nm_sync_kloop_appl_read(ktoa, &kring->nr_hwtail, &kring->nr_hwcur); /* If there are new slots, disable notifications. */ - if (!nm_kr_rxempty(kring)) { + if (!nm_kr_wouldblock(kring)) { atok->appl_need_kick = 0; } } + + /* Ask for a kick from the guest to the host if needed. */ + if ((kring->rhead != kring->nr_hwcur || nm_kr_wouldblock(kring)) + && NM_ACCESS_ONCE(ktoa->kern_need_kick)) { + atok->sync_flags = flags; + notify = true; + } nm_prdis(1, "%s CSB(head:%u cur:%u hwtail:%u) KRING(head:%u cur:%u tail:%u)", kring->name, atok->head, atok->cur, ktoa->hwtail, Modified: stable/11/sys/net/netmap.h ============================================================================== --- stable/11/sys/net/netmap.h Thu Feb 7 10:44:03 2019 (r343865) +++ stable/11/sys/net/netmap.h Thu Feb 7 10:44:53 2019 (r343866) @@ -538,7 +538,8 @@ enum { enum { /* On NETMAP_REQ_REGISTER, ask netmap to use memory allocated - * from user-space allocated memory pools (e.g. hugepages). */ + * from user-space allocated memory pools (e.g. hugepages). + */ NETMAP_REQ_OPT_EXTMEM = 1, /* ON NETMAP_REQ_SYNC_KLOOP_START, ask netmap to use eventfd-based @@ -549,8 +550,15 @@ enum { /* On NETMAP_REQ_REGISTER, ask netmap to work in CSB mode, where * head, cur and tail pointers are not exchanged through the * struct netmap_ring header, but rather using an user-provided - * memory area (see struct nm_csb_atok and struct nm_csb_ktoa). */ + * memory area (see struct nm_csb_atok and struct nm_csb_ktoa). + */ NETMAP_REQ_OPT_CSB, + + /* An extension to NETMAP_REQ_OPT_SYNC_KLOOP_EVENTFDS, which specifies + * if the TX and/or RX rings are synced in the context of the VM exit. + * This requires the 'ioeventfd' fields to be valid (cannot be < 0). + */ + NETMAP_REQ_OPT_SYNC_KLOOP_MODE, }; /* @@ -875,6 +883,12 @@ struct nmreq_opt_sync_kloop_eventfds { * their order must agree with the CSB arrays passed in the * NETMAP_REQ_OPT_CSB option. Each entry contains a file descriptor * backed by an eventfd. + * + * If any of the 'ioeventfd' entries is < 0, the event loop uses + * the sleeping synchronization strategy (according to sleep_us), + * and keeps kern_need_kick always disabled. + * Each 'irqfd' can be < 0, and in that case the corresponding queue + * is never notified. */ struct { /* Notifier for the application --> kernel loop direction. */ @@ -882,6 +896,13 @@ struct nmreq_opt_sync_kloop_eventfds { /* Notifier for the kernel loop --> application direction. */ int32_t irqfd; } eventfds[0]; +}; + +struct nmreq_opt_sync_kloop_mode { + struct nmreq_option nro_opt; /* common header */ +#define NM_OPT_SYNC_KLOOP_DIRECT_TX (1 << 0) +#define NM_OPT_SYNC_KLOOP_DIRECT_RX (1 << 1) + uint32_t mode; }; struct nmreq_opt_extmem { From owner-svn-src-stable@freebsd.org Thu Feb 7 21:22:02 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15AF014C4579; Thu, 7 Feb 2019 21:22:02 +0000 (UTC) (envelope-from bdrewery@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) server-signature RSA-PSS (4096 bits) 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 AF9157470A; Thu, 7 Feb 2019 21:22:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1E8E6102; Thu, 7 Feb 2019 21:22:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17LM1NE075850; Thu, 7 Feb 2019 21:22:01 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17LM17i075849; Thu, 7 Feb 2019 21:22:01 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201902072122.x17LM17i075849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Feb 2019 21:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343878 - stable/11/usr.bin/shar X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11/usr.bin/shar X-SVN-Commit-Revision: 343878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF9157470A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 21:22:02 -0000 Author: bdrewery Date: Thu Feb 7 21:22:01 2019 New Revision: 343878 URL: https://svnweb.freebsd.org/changeset/base/343878 Log: MFC r343633: Shar files may be seen as binary by grep. Modified: stable/11/usr.bin/shar/shar.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/shar/shar.1 ============================================================================== --- stable/11/usr.bin/shar/shar.1 Thu Feb 7 21:05:44 2019 (r343877) +++ stable/11/usr.bin/shar/shar.1 Thu Feb 7 21:22:01 2019 (r343878) @@ -28,7 +28,7 @@ .\" @(#)shar.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd January 31, 2019 .Dt SHAR 1 .Os .Sh NAME @@ -103,5 +103,5 @@ Archives produced using this implementation of .Nm may be easily examined with the command: .Bd -literal -offset indent -egrep -v '^[X#]' shar.file +egrep -av '^[X#]' shar.file .Ed From owner-svn-src-stable@freebsd.org Thu Feb 7 21:37:07 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1536914C4C0A; Thu, 7 Feb 2019 21:37:07 +0000 (UTC) (envelope-from bdrewery@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) server-signature RSA-PSS (4096 bits) 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 AFC7E74E26; Thu, 7 Feb 2019 21:37:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2E6362FF; Thu, 7 Feb 2019 21:37:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17Lb6vk080987; Thu, 7 Feb 2019 21:37:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17Lb6ew080986; Thu, 7 Feb 2019 21:37:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201902072137.x17Lb6ew080986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Feb 2019 21:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343879 - stable/10/usr.bin/shar X-SVN-Group: stable-10 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/10/usr.bin/shar X-SVN-Commit-Revision: 343879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AFC7E74E26 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 21:37:07 -0000 Author: bdrewery Date: Thu Feb 7 21:37:06 2019 New Revision: 343879 URL: https://svnweb.freebsd.org/changeset/base/343879 Log: MFC r343633: Shar files may be seen as binary by grep. Modified: stable/10/usr.bin/shar/shar.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/shar/shar.1 ============================================================================== --- stable/10/usr.bin/shar/shar.1 Thu Feb 7 21:22:01 2019 (r343878) +++ stable/10/usr.bin/shar/shar.1 Thu Feb 7 21:37:06 2019 (r343879) @@ -28,7 +28,7 @@ .\" @(#)shar.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd January 31, 2019 .Dt SHAR 1 .Os .Sh NAME @@ -103,5 +103,5 @@ Archives produced using this implementation of .Nm may be easily examined with the command: .Bd -literal -offset indent -egrep -v '^[X#]' shar.file +egrep -av '^[X#]' shar.file .Ed From owner-svn-src-stable@freebsd.org Thu Feb 7 22:49:50 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CA5F14C741D; Thu, 7 Feb 2019 22:49:50 +0000 (UTC) (envelope-from bdrewery@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) server-signature RSA-PSS (4096 bits) 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 C284D77FA7; Thu, 7 Feb 2019 22:49:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B36916F60; Thu, 7 Feb 2019 22:49:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17MnnR5017608; Thu, 7 Feb 2019 22:49:49 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17Mnnke017607; Thu, 7 Feb 2019 22:49:49 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201902072249.x17Mnnke017607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Feb 2019 22:49: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: r343883 - stable/12/usr.bin/shar X-SVN-Group: stable-12 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/12/usr.bin/shar X-SVN-Commit-Revision: 343883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C284D77FA7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.92)[-0.923,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 22:49:50 -0000 Author: bdrewery Date: Thu Feb 7 22:49:49 2019 New Revision: 343883 URL: https://svnweb.freebsd.org/changeset/base/343883 Log: MFC r343633: Shar files may be seen as binary by grep. Modified: stable/12/usr.bin/shar/shar.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/shar/shar.1 ============================================================================== --- stable/12/usr.bin/shar/shar.1 Thu Feb 7 22:10:20 2019 (r343882) +++ stable/12/usr.bin/shar/shar.1 Thu Feb 7 22:49:49 2019 (r343883) @@ -28,7 +28,7 @@ .\" @(#)shar.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd January 31, 2019 .Dt SHAR 1 .Os .Sh NAME @@ -103,5 +103,5 @@ Archives produced using this implementation of .Nm may be easily examined with the command: .Bd -literal -offset indent -egrep -v '^[X#]' shar.file +egrep -av '^[X#]' shar.file .Ed From owner-svn-src-stable@freebsd.org Thu Feb 7 23:55:13 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E83FF14C94D2; Thu, 7 Feb 2019 23:55:12 +0000 (UTC) (envelope-from bdrewery@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) server-signature RSA-PSS (4096 bits) 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 8B31682FEF; Thu, 7 Feb 2019 23:55:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79BEE7B4C; Thu, 7 Feb 2019 23:55:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17NtC7o055351; Thu, 7 Feb 2019 23:55:12 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17NtCKV055349; Thu, 7 Feb 2019 23:55:12 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201902072355.x17NtCKV055349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Feb 2019 23:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343885 - stable/11/sys/dev/filemon X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11/sys/dev/filemon X-SVN-Commit-Revision: 343885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8B31682FEF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 23:55:13 -0000 Author: bdrewery Date: Thu Feb 7 23:55:11 2019 New Revision: 343885 URL: https://svnweb.freebsd.org/changeset/base/343885 Log: MFC r337272: Fix some filemon path logging issues. Modified: stable/11/sys/dev/filemon/filemon.c stable/11/sys/dev/filemon/filemon_wrapper.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/filemon/filemon.c ============================================================================== --- stable/11/sys/dev/filemon/filemon.c Thu Feb 7 23:17:44 2019 (r343884) +++ stable/11/sys/dev/filemon/filemon.c Thu Feb 7 23:55:11 2019 (r343885) @@ -88,7 +88,7 @@ struct filemon { struct ucred *cred; /* Credential of tracer. */ char fname1[MAXPATHLEN]; /* Temporary filename buffer. */ char fname2[MAXPATHLEN]; /* Temporary filename buffer. */ - char msgbufr[1024]; /* Output message buffer. */ + char msgbufr[2*MAXPATHLEN + 100]; /* Output message buffer. */ int error; /* Log write error, returned on close(2). */ u_int refcnt; /* Pointer reference count. */ u_int proccnt; /* Process count. */ @@ -200,8 +200,8 @@ filemon_write_header(struct filemon *filemon) "# filemon version %d\n# Target pid %d\n# Start %ju.%06ju\nV %d\n", FILEMON_VERSION, curproc->p_pid, (uintmax_t)now.tv_sec, (uintmax_t)now.tv_usec, FILEMON_VERSION); - - filemon_output(filemon, filemon->msgbufr, len); + if (len < sizeof(filemon->msgbufr)) + filemon_output(filemon, filemon->msgbufr, len); } /* @@ -268,7 +268,8 @@ filemon_close_log(struct filemon *filemon) "# Stop %ju.%06ju\n# Bye bye\n", (uintmax_t)now.tv_sec, (uintmax_t)now.tv_usec); - filemon_output(filemon, filemon->msgbufr, len); + if (len < sizeof(filemon->msgbufr)) + filemon_output(filemon, filemon->msgbufr, len); fp = filemon->fp; filemon->fp = NULL; Modified: stable/11/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- stable/11/sys/dev/filemon/filemon_wrapper.c Thu Feb 7 23:17:44 2019 (r343884) +++ stable/11/sys/dev/filemon/filemon_wrapper.c Thu Feb 7 23:55:11 2019 (r343885) @@ -37,8 +37,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "opt_compat.h" + +static void filemon_output_event(struct filemon *filemon, const char *fmt, ...) + __printflike(2, 3); + static eventhandler_tag filemon_exec_tag; static eventhandler_tag filemon_exit_tag; static eventhandler_tag filemon_fork_tag; @@ -71,11 +77,25 @@ filemon_output(struct filemon *filemon, char *msg, siz filemon->error = error; } +static void +filemon_output_event(struct filemon *filemon, const char *fmt, ...) +{ + va_list ap; + size_t len; + + va_start(ap, fmt); + len = vsnprintf(filemon->msgbufr, sizeof(filemon->msgbufr), fmt, ap); + va_end(ap); + /* The event is truncated but still worth logging. */ + if (len >= sizeof(filemon->msgbufr)) + len = sizeof(filemon->msgbufr) - 1; + filemon_output(filemon, filemon->msgbufr, len); +} + static int filemon_wrapper_chdir(struct thread *td, struct chdir_args *uap) { int error, ret; - size_t len; struct filemon *filemon; if ((ret = sys_chdir(td, uap)) == 0) { @@ -86,11 +106,8 @@ filemon_wrapper_chdir(struct thread *td, struct chdir_ goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "C %d %s\n", + filemon_output_event(filemon, "C %d %s\n", curproc->p_pid, filemon->fname1); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -104,16 +121,12 @@ filemon_event_process_exec(void *arg __unused, struct struct image_params *imgp) { struct filemon *filemon; - size_t len; if ((filemon = filemon_proc_get(p)) != NULL) { - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "E %d %s\n", + filemon_output_event(filemon, "E %d %s\n", p->p_pid, imgp->execpath != NULL ? imgp->execpath : ""); - filemon_output(filemon, filemon->msgbufr, len); - /* If the credentials changed then cease tracing. */ if (imgp->newcred != NULL && imgp->credential_setid && @@ -140,7 +153,6 @@ static void _filemon_wrapper_openat(struct thread *td, char *upath, int flags, int fd) { int error; - size_t len; struct file *fp; struct filemon *filemon; char *atpath, *freepath; @@ -166,10 +178,8 @@ _filemon_wrapper_openat(struct thread *td, char *upath * XXX: This may be able to come out with * the namecache lookup now. */ - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "A %d %s\n", + filemon_output_event(filemon, "A %d %s\n", curproc->p_pid, filemon->fname1); - filemon_output(filemon, filemon->msgbufr, len); /* * Try to resolve the path from the vnode using the * namecache. It may be inaccurate, but better @@ -187,19 +197,15 @@ _filemon_wrapper_openat(struct thread *td, char *upath * to also output an R to distinguish from * O_WRONLY. */ - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "R %d %s%s%s\n", + filemon_output_event(filemon, "R %d %s%s%s\n", curproc->p_pid, atpath, atpath[0] != '\0' ? "/" : "", filemon->fname1); - filemon_output(filemon, filemon->msgbufr, len); } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "%c %d %s%s%s\n", + filemon_output_event(filemon, "%c %d %s%s%s\n", (flags & O_ACCMODE) ? 'W':'R', curproc->p_pid, atpath, atpath[0] != '\0' ? "/" : "", filemon->fname1); - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); if (fp != NULL) @@ -234,7 +240,6 @@ static int filemon_wrapper_rename(struct thread *td, struct rename_args *uap) { int error, ret; - size_t len; struct filemon *filemon; if ((ret = sys_rename(td, uap)) == 0) { @@ -247,11 +252,8 @@ filemon_wrapper_rename(struct thread *td, struct renam goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "M %d '%s' '%s'\n", + filemon_output_event(filemon, "M %d '%s' '%s'\n", curproc->p_pid, filemon->fname1, filemon->fname2); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -264,7 +266,6 @@ static void _filemon_wrapper_link(struct thread *td, char *upath1, char *upath2) { struct filemon *filemon; - size_t len; int error; if ((filemon = filemon_proc_get(curproc)) != NULL) { @@ -276,11 +277,8 @@ _filemon_wrapper_link(struct thread *td, char *upath1, goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "L %d '%s' '%s'\n", + filemon_output_event(filemon, "L %d '%s' '%s'\n", curproc->p_pid, filemon->fname1, filemon->fname2); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -322,15 +320,12 @@ filemon_wrapper_linkat(struct thread *td, struct linka static void filemon_event_process_exit(void *arg __unused, struct proc *p) { - size_t len; struct filemon *filemon; if ((filemon = filemon_proc_get(p)) != NULL) { - len = snprintf(filemon->msgbufr, sizeof(filemon->msgbufr), - "X %d %d %d\n", p->p_pid, p->p_xexit, p->p_xsig); + filemon_output_event(filemon, "X %d %d %d\n", + p->p_pid, p->p_xexit, p->p_xsig); - filemon_output(filemon, filemon->msgbufr, len); - /* * filemon_untrack_processes() may have dropped this p_filemon * already while in filemon_proc_get() before acquiring the @@ -350,7 +345,6 @@ static int filemon_wrapper_unlink(struct thread *td, struct unlink_args *uap) { int error, ret; - size_t len; struct filemon *filemon; if ((ret = sys_unlink(td, uap)) == 0) { @@ -361,11 +355,8 @@ filemon_wrapper_unlink(struct thread *td, struct unlin goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "D %d %s\n", + filemon_output_event(filemon, "D %d %s\n", curproc->p_pid, filemon->fname1); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -378,15 +369,11 @@ static void filemon_event_process_fork(void *arg __unused, struct proc *p1, struct proc *p2, int flags __unused) { - size_t len; struct filemon *filemon; if ((filemon = filemon_proc_get(p1)) != NULL) { - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "F %d %d\n", + filemon_output_event(filemon, "F %d %d\n", p1->p_pid, p2->p_pid); - - filemon_output(filemon, filemon->msgbufr, len); /* * filemon_untrack_processes() or From owner-svn-src-stable@freebsd.org Thu Feb 7 23:57:29 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC2D314C979F; Thu, 7 Feb 2019 23:57:29 +0000 (UTC) (envelope-from bdrewery@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) server-signature RSA-PSS (4096 bits) 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 5BA6183177; Thu, 7 Feb 2019 23:57:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 489BA7B4F; Thu, 7 Feb 2019 23:57:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17NvTHo055487; Thu, 7 Feb 2019 23:57:29 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17NvSvS055485; Thu, 7 Feb 2019 23:57:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201902072357.x17NvSvS055485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Feb 2019 23:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343886 - stable/10/sys/dev/filemon X-SVN-Group: stable-10 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/10/sys/dev/filemon X-SVN-Commit-Revision: 343886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5BA6183177 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 23:57:30 -0000 Author: bdrewery Date: Thu Feb 7 23:57:28 2019 New Revision: 343886 URL: https://svnweb.freebsd.org/changeset/base/343886 Log: MFC r337272: Fix some filemon path logging issues. Modified: stable/10/sys/dev/filemon/filemon.c stable/10/sys/dev/filemon/filemon_wrapper.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/filemon/filemon.c ============================================================================== --- stable/10/sys/dev/filemon/filemon.c Thu Feb 7 23:55:11 2019 (r343885) +++ stable/10/sys/dev/filemon/filemon.c Thu Feb 7 23:57:28 2019 (r343886) @@ -88,7 +88,7 @@ struct filemon { struct ucred *cred; /* Credential of tracer. */ char fname1[MAXPATHLEN]; /* Temporary filename buffer. */ char fname2[MAXPATHLEN]; /* Temporary filename buffer. */ - char msgbufr[1024]; /* Output message buffer. */ + char msgbufr[2*MAXPATHLEN + 100]; /* Output message buffer. */ int error; /* Log write error, returned on close(2). */ u_int refcnt; /* Pointer reference count. */ u_int proccnt; /* Process count. */ @@ -200,8 +200,8 @@ filemon_write_header(struct filemon *filemon) "# filemon version %d\n# Target pid %d\n# Start %ju.%06ju\nV %d\n", FILEMON_VERSION, curproc->p_pid, (uintmax_t)now.tv_sec, (uintmax_t)now.tv_usec, FILEMON_VERSION); - - filemon_output(filemon, filemon->msgbufr, len); + if (len < sizeof(filemon->msgbufr)) + filemon_output(filemon, filemon->msgbufr, len); } /* @@ -268,7 +268,8 @@ filemon_close_log(struct filemon *filemon) "# Stop %ju.%06ju\n# Bye bye\n", (uintmax_t)now.tv_sec, (uintmax_t)now.tv_usec); - filemon_output(filemon, filemon->msgbufr, len); + if (len < sizeof(filemon->msgbufr)) + filemon_output(filemon, filemon->msgbufr, len); fp = filemon->fp; filemon->fp = NULL; Modified: stable/10/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- stable/10/sys/dev/filemon/filemon_wrapper.c Thu Feb 7 23:55:11 2019 (r343885) +++ stable/10/sys/dev/filemon/filemon_wrapper.c Thu Feb 7 23:57:28 2019 (r343886) @@ -37,8 +37,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "opt_compat.h" +static void filemon_output_event(struct filemon *filemon, const char *fmt, ...) + __printflike(2, 3); + static eventhandler_tag filemon_exec_tag; static eventhandler_tag filemon_exit_tag; static eventhandler_tag filemon_fork_tag; @@ -71,11 +76,25 @@ filemon_output(struct filemon *filemon, char *msg, siz filemon->error = error; } +static void +filemon_output_event(struct filemon *filemon, const char *fmt, ...) +{ + va_list ap; + size_t len; + + va_start(ap, fmt); + len = vsnprintf(filemon->msgbufr, sizeof(filemon->msgbufr), fmt, ap); + va_end(ap); + /* The event is truncated but still worth logging. */ + if (len >= sizeof(filemon->msgbufr)) + len = sizeof(filemon->msgbufr) - 1; + filemon_output(filemon, filemon->msgbufr, len); +} + static int filemon_wrapper_chdir(struct thread *td, struct chdir_args *uap) { int error, ret; - size_t len; struct filemon *filemon; if ((ret = sys_chdir(td, uap)) == 0) { @@ -86,11 +105,8 @@ filemon_wrapper_chdir(struct thread *td, struct chdir_ goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "C %d %s\n", + filemon_output_event(filemon, "C %d %s\n", curproc->p_pid, filemon->fname1); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -104,16 +120,12 @@ filemon_event_process_exec(void *arg __unused, struct struct image_params *imgp) { struct filemon *filemon; - size_t len; if ((filemon = filemon_proc_get(p)) != NULL) { - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "E %d %s\n", + filemon_output_event(filemon, "E %d %s\n", p->p_pid, imgp->execpath != NULL ? imgp->execpath : ""); - filemon_output(filemon, filemon->msgbufr, len); - /* If the credentials changed then cease tracing. */ if (imgp->newcred != NULL && imgp->credential_setid && @@ -140,7 +152,6 @@ static void _filemon_wrapper_openat(struct thread *td, char *upath, int flags, int fd) { int error; - size_t len; struct file *fp; struct filemon *filemon; char *atpath, *freepath; @@ -166,10 +177,8 @@ _filemon_wrapper_openat(struct thread *td, char *upath * XXX: This may be able to come out with * the namecache lookup now. */ - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "A %d %s\n", + filemon_output_event(filemon, "A %d %s\n", curproc->p_pid, filemon->fname1); - filemon_output(filemon, filemon->msgbufr, len); /* * Try to resolve the path from the vnode using the * namecache. It may be inaccurate, but better @@ -187,19 +196,15 @@ _filemon_wrapper_openat(struct thread *td, char *upath * to also output an R to distinguish from * O_WRONLY. */ - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "R %d %s%s%s\n", + filemon_output_event(filemon, "R %d %s%s%s\n", curproc->p_pid, atpath, atpath[0] != '\0' ? "/" : "", filemon->fname1); - filemon_output(filemon, filemon->msgbufr, len); } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "%c %d %s%s%s\n", + filemon_output_event(filemon, "%c %d %s%s%s\n", (flags & O_ACCMODE) ? 'W':'R', curproc->p_pid, atpath, atpath[0] != '\0' ? "/" : "", filemon->fname1); - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); if (fp != NULL) @@ -234,7 +239,6 @@ static int filemon_wrapper_rename(struct thread *td, struct rename_args *uap) { int error, ret; - size_t len; struct filemon *filemon; if ((ret = sys_rename(td, uap)) == 0) { @@ -247,11 +251,8 @@ filemon_wrapper_rename(struct thread *td, struct renam goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "M %d '%s' '%s'\n", + filemon_output_event(filemon, "M %d '%s' '%s'\n", curproc->p_pid, filemon->fname1, filemon->fname2); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -264,7 +265,6 @@ static void _filemon_wrapper_link(struct thread *td, char *upath1, char *upath2) { struct filemon *filemon; - size_t len; int error; if ((filemon = filemon_proc_get(curproc)) != NULL) { @@ -276,11 +276,8 @@ _filemon_wrapper_link(struct thread *td, char *upath1, goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "L %d '%s' '%s'\n", + filemon_output_event(filemon, "L %d '%s' '%s'\n", curproc->p_pid, filemon->fname1, filemon->fname2); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -322,15 +319,12 @@ filemon_wrapper_linkat(struct thread *td, struct linka static void filemon_event_process_exit(void *arg __unused, struct proc *p) { - size_t len; struct filemon *filemon; if ((filemon = filemon_proc_get(p)) != NULL) { - len = snprintf(filemon->msgbufr, sizeof(filemon->msgbufr), - "X %d %d\n", p->p_pid, W_EXITCODE(p->p_xstat, 0)); + filemon_output_event(filemon, "X %d %d\n", + p->p_pid, W_EXITCODE(p->p_xstat, 0)); - filemon_output(filemon, filemon->msgbufr, len); - /* * filemon_untrack_processes() may have dropped this p_filemon * already while in filemon_proc_get() before acquiring the @@ -350,7 +344,6 @@ static int filemon_wrapper_unlink(struct thread *td, struct unlink_args *uap) { int error, ret; - size_t len; struct filemon *filemon; if ((ret = sys_unlink(td, uap)) == 0) { @@ -361,11 +354,8 @@ filemon_wrapper_unlink(struct thread *td, struct unlin goto copyfail; } - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "D %d %s\n", + filemon_output_event(filemon, "D %d %s\n", curproc->p_pid, filemon->fname1); - - filemon_output(filemon, filemon->msgbufr, len); copyfail: filemon_drop(filemon); } @@ -378,15 +368,11 @@ static void filemon_event_process_fork(void *arg __unused, struct proc *p1, struct proc *p2, int flags __unused) { - size_t len; struct filemon *filemon; if ((filemon = filemon_proc_get(p1)) != NULL) { - len = snprintf(filemon->msgbufr, - sizeof(filemon->msgbufr), "F %d %d\n", + filemon_output_event(filemon, "F %d %d\n", p1->p_pid, p2->p_pid); - - filemon_output(filemon, filemon->msgbufr, len); /* * filemon_untrack_processes() or From owner-svn-src-stable@freebsd.org Fri Feb 8 03:25:39 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0C1014D23AD; Fri, 8 Feb 2019 03:25:39 +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) server-signature RSA-PSS (4096 bits) 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 5E219891DE; Fri, 8 Feb 2019 03:25:39 +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 4F4C29F4B; Fri, 8 Feb 2019 03:25:39 +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 x183PdMn065239; Fri, 8 Feb 2019 03:25:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x183PdBK065238; Fri, 8 Feb 2019 03:25:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902080325.x183PdBK065238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 8 Feb 2019 03:25:39 +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: r343887 - stable/12/sys/i386/i386 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/i386/i386 X-SVN-Commit-Revision: 343887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5E219891DE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 03:25:40 -0000 Author: kib Date: Fri Feb 8 03:25:38 2019 New Revision: 343887 URL: https://svnweb.freebsd.org/changeset/base/343887 Log: MFC r343808: Remove pointless initial value for i386 vm.pmap.pat_works sysctl definition. Modified: stable/12/sys/i386/i386/pmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/i386/i386/pmap.c ============================================================================== --- stable/12/sys/i386/i386/pmap.c Thu Feb 7 23:57:28 2019 (r343886) +++ stable/12/sys/i386/i386/pmap.c Fri Feb 8 03:25:38 2019 (r343887) @@ -216,7 +216,7 @@ static uma_zone_t pdptzone; static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); static int pat_works = 1; -SYSCTL_INT(_vm_pmap, OID_AUTO, pat_works, CTLFLAG_RD, &pat_works, 1, +SYSCTL_INT(_vm_pmap, OID_AUTO, pat_works, CTLFLAG_RD, &pat_works, 0, "Is page attribute table fully functional?"); static int pg_ps_enabled = 1; From owner-svn-src-stable@freebsd.org Fri Feb 8 03:29:18 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AC7914D24C5; Fri, 8 Feb 2019 03:29:18 +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) server-signature RSA-PSS (4096 bits) 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 0AE42893A3; Fri, 8 Feb 2019 03:29:18 +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 F2F2B9F57; Fri, 8 Feb 2019 03:29:17 +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 x183THAd065425; Fri, 8 Feb 2019 03:29:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x183THou065424; Fri, 8 Feb 2019 03:29:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902080329.x183THou065424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 8 Feb 2019 03:29:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343888 - stable/11/sys/i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/i386/i386 X-SVN-Commit-Revision: 343888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0AE42893A3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 03:29:18 -0000 Author: kib Date: Fri Feb 8 03:29:17 2019 New Revision: 343888 URL: https://svnweb.freebsd.org/changeset/base/343888 Log: MFC r343808: Remove pointless initial value for i386 vm.pmap.pat_works sysctl definition. Modified: stable/11/sys/i386/i386/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Fri Feb 8 03:25:38 2019 (r343887) +++ stable/11/sys/i386/i386/pmap.c Fri Feb 8 03:29:17 2019 (r343888) @@ -215,7 +215,7 @@ static uma_zone_t pdptzone; static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); static int pat_works = 1; -SYSCTL_INT(_vm_pmap, OID_AUTO, pat_works, CTLFLAG_RD, &pat_works, 1, +SYSCTL_INT(_vm_pmap, OID_AUTO, pat_works, CTLFLAG_RD, &pat_works, 0, "Is page attribute table fully functional?"); static int pg_ps_enabled = 1; From owner-svn-src-stable@freebsd.org Fri Feb 8 04:32:44 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E42C14D395A; Fri, 8 Feb 2019 04:32:44 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 DED0E8F77A; Fri, 8 Feb 2019 04:32:43 +0000 (UTC) (envelope-from avos@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 CD5D8C1B1; Fri, 8 Feb 2019 04:32:43 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x184WhPH001742; Fri, 8 Feb 2019 04:32:43 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x184Wgj4001734; Fri, 8 Feb 2019 04:32:42 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902080432.x184Wgj4001734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 04:32:42 +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: r343892 - in stable/12/sys: dev/rtwn/pci dev/rtwn/usb net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable/12/sys: dev/rtwn/pci dev/rtwn/usb net80211 X-SVN-Commit-Revision: 343892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DED0E8F77A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 04:32:44 -0000 Author: avos Date: Fri Feb 8 04:32:41 2019 New Revision: 343892 URL: https://svnweb.freebsd.org/changeset/base/343892 Log: MFC r343417: net80211: reuse TICKS_2_MSEC / MSEC_2_TICKS macros from sys/time.h Replace in-place implementation with system-wide one; since it guarantees non-zero result drop all less-than-one checks from drivers and net80211. Modified: stable/12/sys/dev/rtwn/pci/rtwn_pci_reg.c stable/12/sys/dev/rtwn/usb/rtwn_usb_reg.c stable/12/sys/net80211/ieee80211_amrr.c stable/12/sys/net80211/ieee80211_freebsd.c stable/12/sys/net80211/ieee80211_freebsd.h stable/12/sys/net80211/ieee80211_ioctl.c stable/12/sys/net80211/ieee80211_rssadapt.c stable/12/sys/net80211/ieee80211_scan.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/rtwn/pci/rtwn_pci_reg.c ============================================================================== --- stable/12/sys/dev/rtwn/pci/rtwn_pci_reg.c Fri Feb 8 04:18:17 2019 (r343891) +++ stable/12/sys/dev/rtwn/pci/rtwn_pci_reg.c Fri Feb 8 04:32:41 2019 (r343892) @@ -118,6 +118,6 @@ rtwn_pci_delay(struct rtwn_softc *sc, int usec) DELAY(usec); else { (void) mtx_sleep(sc, &sc->sc_mtx, 0, "rtwn_pci", - MAX(msecs_to_ticks(usec / 1000), 1)); + msecs_to_ticks(usec / 1000)); } } Modified: stable/12/sys/dev/rtwn/usb/rtwn_usb_reg.c ============================================================================== --- stable/12/sys/dev/rtwn/usb/rtwn_usb_reg.c Fri Feb 8 04:18:17 2019 (r343891) +++ stable/12/sys/dev/rtwn/usb/rtwn_usb_reg.c Fri Feb 8 04:32:41 2019 (r343892) @@ -172,8 +172,6 @@ rtwn_usb_delay(struct rtwn_softc *sc, int usec) /* 1ms delay as default is too big. */ if (usec < 1000) DELAY(usec); - else { - usb_pause_mtx(&sc->sc_mtx, - MAX(msecs_to_ticks(usec / 1000), 1)); - } + else + usb_pause_mtx(&sc->sc_mtx, msecs_to_ticks(usec / 1000)); } Modified: stable/12/sys/net80211/ieee80211_amrr.c ============================================================================== --- stable/12/sys/net80211/ieee80211_amrr.c Fri Feb 8 04:18:17 2019 (r343891) +++ stable/12/sys/net80211/ieee80211_amrr.c Fri Feb 8 04:32:41 2019 (r343892) @@ -102,15 +102,13 @@ static void amrr_setinterval(const struct ieee80211vap *vap, int msecs) { struct ieee80211_amrr *amrr = vap->iv_rs; - int t; if (!amrr) return; if (msecs < 100) msecs = 100; - t = msecs_to_ticks(msecs); - amrr->amrr_interval = (t < 1) ? 1 : t; + amrr->amrr_interval = msecs_to_ticks(msecs); } static void Modified: stable/12/sys/net80211/ieee80211_freebsd.c ============================================================================== --- stable/12/sys/net80211/ieee80211_freebsd.c Fri Feb 8 04:18:17 2019 (r343891) +++ stable/12/sys/net80211/ieee80211_freebsd.c Fri Feb 8 04:32:41 2019 (r343892) @@ -134,13 +134,12 @@ int ieee80211_sysctl_msecs_ticks(SYSCTL_HANDLER_ARGS) { int msecs = ticks_to_msecs(*(int *)arg1); - int error, t; + int error; error = sysctl_handle_int(oidp, &msecs, 0, req); if (error || !req->newptr) return error; - t = msecs_to_ticks(msecs); - *(int *)arg1 = (t < 1) ? 1 : t; + *(int *)arg1 = msecs_to_ticks(msecs); return 0; } @@ -345,9 +344,6 @@ ieee80211_com_vdetach(struct ieee80211vap *vap) int sleep_time; sleep_time = msecs_to_ticks(250); - if (sleep_time == 0) - sleep_time = 1; - atomic_set_32(&vap->iv_com_state, IEEE80211_COM_DETACHED); while (MS(atomic_load_32(&vap->iv_com_state), IEEE80211_COM_REF) != 0) pause("comref", sleep_time); Modified: stable/12/sys/net80211/ieee80211_freebsd.h ============================================================================== --- stable/12/sys/net80211/ieee80211_freebsd.h Fri Feb 8 04:18:17 2019 (r343891) +++ stable/12/sys/net80211/ieee80211_freebsd.h Fri Feb 8 04:32:41 2019 (r343892) @@ -38,6 +38,7 @@ #include #include #include +#include /* * Common state locking definitions. @@ -249,9 +250,8 @@ void ieee80211_vap_destroy(struct ieee80211vap *); (((_ifp)->if_flags & IFF_UP) && \ ((_ifp)->if_drv_flags & IFF_DRV_RUNNING)) -/* XXX TODO: cap these at 1, as hz may not be 1000 */ -#define msecs_to_ticks(ms) (((ms)*hz)/1000) -#define ticks_to_msecs(t) (1000*(t) / hz) +#define msecs_to_ticks(ms) MSEC_2_TICKS(ms) +#define ticks_to_msecs(t) TICKS_2_MSEC(t) #define ticks_to_secs(t) ((t) / hz) #define ieee80211_time_after(a,b) ((long)(b) - (long)(a) < 0) Modified: stable/12/sys/net80211/ieee80211_ioctl.c ============================================================================== --- stable/12/sys/net80211/ieee80211_ioctl.c Fri Feb 8 04:18:17 2019 (r343891) +++ stable/12/sys/net80211/ieee80211_ioctl.c Fri Feb 8 04:32:41 2019 (r343892) @@ -2515,20 +2515,12 @@ ieee80211_scanreq(struct ieee80211vap *vap, struct iee sr->sr_duration > IEEE80211_IOC_SCAN_DURATION_MAX) return EINVAL; sr->sr_duration = msecs_to_ticks(sr->sr_duration); - if (sr->sr_duration < 1) - sr->sr_duration = 1; } /* convert min/max channel dwell */ - if (sr->sr_mindwell != 0) { + if (sr->sr_mindwell != 0) sr->sr_mindwell = msecs_to_ticks(sr->sr_mindwell); - if (sr->sr_mindwell < 1) - sr->sr_mindwell = 1; - } - if (sr->sr_maxdwell != 0) { + if (sr->sr_maxdwell != 0) sr->sr_maxdwell = msecs_to_ticks(sr->sr_maxdwell); - if (sr->sr_maxdwell < 1) - sr->sr_maxdwell = 1; - } /* NB: silently reduce ssid count to what is supported */ if (sr->sr_nssid > IEEE80211_SCAN_MAX_SSID) sr->sr_nssid = IEEE80211_SCAN_MAX_SSID; Modified: stable/12/sys/net80211/ieee80211_rssadapt.c ============================================================================== --- stable/12/sys/net80211/ieee80211_rssadapt.c Fri Feb 8 04:18:17 2019 (r343891) +++ stable/12/sys/net80211/ieee80211_rssadapt.c Fri Feb 8 04:32:41 2019 (r343892) @@ -117,15 +117,13 @@ static void rssadapt_setinterval(const struct ieee80211vap *vap, int msecs) { struct ieee80211_rssadapt *rs = vap->iv_rs; - int t; if (!rs) return; if (msecs < 100) msecs = 100; - t = msecs_to_ticks(msecs); - rs->interval = (t < 1) ? 1 : t; + rs->interval = msecs_to_ticks(msecs); } static void Modified: stable/12/sys/net80211/ieee80211_scan.c ============================================================================== --- stable/12/sys/net80211/ieee80211_scan.c Fri Feb 8 04:18:17 2019 (r343891) +++ stable/12/sys/net80211/ieee80211_scan.c Fri Feb 8 04:32:41 2019 (r343892) @@ -294,7 +294,7 @@ ieee80211_scan_dump(struct ieee80211_scan_state *ss) if_printf(vap->iv_ifp, "scan set "); ieee80211_scan_dump_channels(ss); - printf(" dwell min %lums max %lums\n", + printf(" dwell min %ums max %ums\n", ticks_to_msecs(ss->ss_mindwell), ticks_to_msecs(ss->ss_maxdwell)); } #endif /* IEEE80211_DEBUG */ From owner-svn-src-stable@freebsd.org Fri Feb 8 04:36:31 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3A1D14D3B87; Fri, 8 Feb 2019 04:36:31 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 766238FA1A; Fri, 8 Feb 2019 04:36:31 +0000 (UTC) (envelope-from avos@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 636D0C1B5; Fri, 8 Feb 2019 04:36:31 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x184aVnL001963; Fri, 8 Feb 2019 04:36:31 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x184aVkY001962; Fri, 8 Feb 2019 04:36:31 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902080436.x184aVkY001962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 04:36: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: r343893 - stable/12/sbin/ifconfig X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/12/sbin/ifconfig X-SVN-Commit-Revision: 343893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 766238FA1A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 04:36:32 -0000 Author: avos Date: Fri Feb 8 04:36:30 2019 New Revision: 343893 URL: https://svnweb.freebsd.org/changeset/base/343893 Log: MFC r343690: ifconfig(8): interpret VHT rates correctly for 'list roam / txparam' options They are represented via MCS rate index, not as a 'speed in MBps' * 2. Modified: stable/12/sbin/ifconfig/ifieee80211.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/12/sbin/ifconfig/ifieee80211.c Fri Feb 8 04:32:41 2019 (r343892) +++ stable/12/sbin/ifconfig/ifieee80211.c Fri Feb 8 04:36:30 2019 (r343893) @@ -4132,7 +4132,10 @@ list_roam(int s) rp = &roamparams.params[mode]; if (rp->rssi == 0 && rp->rate == 0) continue; - if (mode == IEEE80211_MODE_11NA || mode == IEEE80211_MODE_11NG) { + if (mode == IEEE80211_MODE_11NA || + mode == IEEE80211_MODE_11NG || + mode == IEEE80211_MODE_VHT_2GHZ || + mode == IEEE80211_MODE_VHT_5GHZ) { if (rp->rssi & 1) LINE_CHECK("roam:%-7.7s rssi %2u.5dBm MCS %2u ", modename[mode], rp->rssi/2, @@ -4163,7 +4166,10 @@ list_txparams(int s) tp = &txparams.params[mode]; if (tp->mgmtrate == 0 && tp->mcastrate == 0) continue; - if (mode == IEEE80211_MODE_11NA || mode == IEEE80211_MODE_11NG) { + if (mode == IEEE80211_MODE_11NA || + mode == IEEE80211_MODE_11NG || + mode == IEEE80211_MODE_VHT_2GHZ || + mode == IEEE80211_MODE_VHT_5GHZ) { if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) LINE_CHECK("%-7.7s ucast NONE mgmt %2u MCS " "mcast %2u MCS maxretry %u", From owner-svn-src-stable@freebsd.org Fri Feb 8 04:48:14 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 735B114D40F3; Fri, 8 Feb 2019 04:48:14 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 19A8F680C1; Fri, 8 Feb 2019 04:48:14 +0000 (UTC) (envelope-from avos@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 06041C367; Fri, 8 Feb 2019 04:48:14 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x184mDB2007141; Fri, 8 Feb 2019 04:48:13 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x184mDqV007140; Fri, 8 Feb 2019 04:48:13 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902080448.x184mDqV007140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 04:48:13 +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: r343894 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Commit-Revision: 343894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 19A8F680C1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 04:48:14 -0000 Author: avos Date: Fri Feb 8 04:48:12 2019 New Revision: 343894 URL: https://svnweb.freebsd.org/changeset/base/343894 Log: MFC r343683: Do not acquire IEEE80211_LOCK twice in cac_timeout(); reuse locked function instead. It is externally visible since r257065. Modified: stable/12/sys/net80211/ieee80211_dfs.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/net80211/ieee80211_dfs.c stable/11/sys/net80211/ieee80211_dfs.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/sys/net80211/ieee80211_dfs.c ============================================================================== --- stable/12/sys/net80211/ieee80211_dfs.c Fri Feb 8 04:36:30 2019 (r343893) +++ stable/12/sys/net80211/ieee80211_dfs.c Fri Feb 8 04:48:12 2019 (r343894) @@ -156,8 +156,7 @@ cac_timeout(void *arg) /* XXX clobbers any existing desired channel */ /* NB: dfs->newchan may be NULL, that's ok */ vap->iv_des_chan = dfs->newchan; - /* XXX recursive lock need ieee80211_new_state_locked */ - ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); + ieee80211_new_state_locked(vap, IEEE80211_S_SCAN, 0); } else { if_printf(vap->iv_ifp, "CAC timer on channel %u (%u MHz) expired; " From owner-svn-src-stable@freebsd.org Fri Feb 8 04:48:13 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0A4314D40E8; Fri, 8 Feb 2019 04:48:13 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 62721680BC; Fri, 8 Feb 2019 04:48:13 +0000 (UTC) (envelope-from avos@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 52631C365; Fri, 8 Feb 2019 04:48:13 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x184mDT5007129; Fri, 8 Feb 2019 04:48:13 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x184mDWQ007128; Fri, 8 Feb 2019 04:48:13 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902080448.x184mDWQ007128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 04:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343894 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Commit-Revision: 343894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 62721680BC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 04:48:13 -0000 Author: avos Date: Fri Feb 8 04:48:12 2019 New Revision: 343894 URL: https://svnweb.freebsd.org/changeset/base/343894 Log: MFC r343683: Do not acquire IEEE80211_LOCK twice in cac_timeout(); reuse locked function instead. It is externally visible since r257065. Modified: stable/11/sys/net80211/ieee80211_dfs.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/net80211/ieee80211_dfs.c stable/12/sys/net80211/ieee80211_dfs.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/sys/net80211/ieee80211_dfs.c ============================================================================== --- stable/11/sys/net80211/ieee80211_dfs.c Fri Feb 8 04:36:30 2019 (r343893) +++ stable/11/sys/net80211/ieee80211_dfs.c Fri Feb 8 04:48:12 2019 (r343894) @@ -154,8 +154,7 @@ cac_timeout(void *arg) /* XXX clobbers any existing desired channel */ /* NB: dfs->newchan may be NULL, that's ok */ vap->iv_des_chan = dfs->newchan; - /* XXX recursive lock need ieee80211_new_state_locked */ - ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); + ieee80211_new_state_locked(vap, IEEE80211_S_SCAN, 0); } else { if_printf(vap->iv_ifp, "CAC timer on channel %u (%u MHz) expired; " From owner-svn-src-stable@freebsd.org Fri Feb 8 04:48:14 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F49414D40EE; Fri, 8 Feb 2019 04:48:14 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 B15B2680BE; Fri, 8 Feb 2019 04:48:13 +0000 (UTC) (envelope-from avos@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 A50C0C366; Fri, 8 Feb 2019 04:48:13 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x184mDCj007135; Fri, 8 Feb 2019 04:48:13 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x184mDWd007134; Fri, 8 Feb 2019 04:48:13 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902080448.x184mDWd007134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 04:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343894 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211 X-SVN-Commit-Revision: 343894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B15B2680BE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 04:48:14 -0000 Author: avos Date: Fri Feb 8 04:48:12 2019 New Revision: 343894 URL: https://svnweb.freebsd.org/changeset/base/343894 Log: MFC r343683: Do not acquire IEEE80211_LOCK twice in cac_timeout(); reuse locked function instead. It is externally visible since r257065. Modified: stable/10/sys/net80211/ieee80211_dfs.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/net80211/ieee80211_dfs.c stable/12/sys/net80211/ieee80211_dfs.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/net80211/ieee80211_dfs.c ============================================================================== --- stable/10/sys/net80211/ieee80211_dfs.c Fri Feb 8 04:36:30 2019 (r343893) +++ stable/10/sys/net80211/ieee80211_dfs.c Fri Feb 8 04:48:12 2019 (r343894) @@ -152,8 +152,7 @@ cac_timeout(void *arg) /* XXX clobbers any existing desired channel */ /* NB: dfs->newchan may be NULL, that's ok */ vap->iv_des_chan = dfs->newchan; - /* XXX recursive lock need ieee80211_new_state_locked */ - ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); + ieee80211_new_state_locked(vap, IEEE80211_S_SCAN, 0); } else { if_printf(vap->iv_ifp, "CAC timer on channel %u (%u MHz) expired; " From owner-svn-src-stable@freebsd.org Fri Feb 8 10:25:44 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2B0814DB281; Fri, 8 Feb 2019 10:25:44 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 54F69730F8; Fri, 8 Feb 2019 10:25:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 297A0FD40; Fri, 8 Feb 2019 10:25:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18APix2093624; Fri, 8 Feb 2019 10:25:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18APhew093619; Fri, 8 Feb 2019 10:25:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201902081025.x18APhew093619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Feb 2019 10:25: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: r343900 - in stable/12: lib/libsdp usr.sbin/bluetooth/sdpd X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12: lib/libsdp usr.sbin/bluetooth/sdpd X-SVN-Commit-Revision: 343900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 54F69730F8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 10:25:45 -0000 Author: hselasky Date: Fri Feb 8 10:25:42 2019 New Revision: 343900 URL: https://svnweb.freebsd.org/changeset/base/343900 Log: MFC r343572: Add support for Audio Sink and Audio Source profiles to sdpd(8). This allows user-space programs like virtual_oss(8) to act as a Bluetooth speaker device. Sponsored by: Mellanox Technologies Added: stable/12/usr.sbin/bluetooth/sdpd/audio_sink.c - copied unchanged from r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c stable/12/usr.sbin/bluetooth/sdpd/audio_source.c - copied unchanged from r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c Modified: stable/12/lib/libsdp/sdp.h stable/12/usr.sbin/bluetooth/sdpd/Makefile stable/12/usr.sbin/bluetooth/sdpd/profile.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libsdp/sdp.h ============================================================================== --- stable/12/lib/libsdp/sdp.h Fri Feb 8 08:20:18 2019 (r343899) +++ stable/12/lib/libsdp/sdp.h Fri Feb 8 10:25:42 2019 (r343900) @@ -586,6 +586,24 @@ void sdp_print (uint32_t level, uin #define SDP_PDU_SERVICE_UNREGISTER_REQUEST 0x82 #define SDP_PDU_SERVICE_CHANGE_REQUEST 0x83 +struct sdp_audio_sink_profile +{ + uint16_t psm; + uint16_t protover; + uint16_t features; +}; +typedef struct sdp_audio_sink_profile sdp_audio_sink_profile_t; +typedef struct sdp_audio_sink_profile *sdp_audio_sink_profile_p; + +struct sdp_audio_source_profile +{ + uint16_t psm; + uint16_t protover; + uint16_t features; +}; +typedef struct sdp_audio_source_profile sdp_audio_source_profile_t; +typedef struct sdp_audio_source_profile *sdp_audio_source_profile_p; + struct sdp_dun_profile { uint8_t server_channel; Modified: stable/12/usr.sbin/bluetooth/sdpd/Makefile ============================================================================== --- stable/12/usr.sbin/bluetooth/sdpd/Makefile Fri Feb 8 08:20:18 2019 (r343899) +++ stable/12/usr.sbin/bluetooth/sdpd/Makefile Fri Feb 8 10:25:42 2019 (r343900) @@ -3,7 +3,8 @@ PROG= sdpd MAN= sdpd.8 -SRCS= bgd.c dun.c ftrn.c gn.c irmc.c irmc_command.c lan.c log.c \ +SRCS= audio_sink.c audio_source.c \ + bgd.c dun.c ftrn.c gn.c irmc.c irmc_command.c lan.c log.c \ main.c nap.c opush.c panu.c profile.c provider.c sar.c scr.c \ sd.c server.c sp.c srr.c ssar.c ssr.c sur.c uuid.c Copied: stable/12/usr.sbin/bluetooth/sdpd/audio_sink.c (from r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.sbin/bluetooth/sdpd/audio_sink.c Fri Feb 8 10:25:42 2019 (r343900, copy of r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c) @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define L2CAP_SOCKET_CHECKED +#include +#include +#include +#include "profile.h" +#include "provider.h" + +static int32_t +audio_sink_profile_create_service_class_id_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t service_classes[] = { + SDP_SERVICE_CLASS_AUDIO_SINK, + }; + + return (common_profile_create_service_class_id_list( + buf, eob, + (uint8_t const *)service_classes, + sizeof(service_classes))); +} + +static int32_t +audio_sink_profile_create_protocol_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_sink_profile_p audio_sink = (sdp_audio_sink_profile_p) provider->data; + + if (buf + 18 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(16, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_L2CAP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->psm, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_AVDTP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->protover, buf); + + return (18); +} + +static int32_t +audio_sink_profile_create_browse_group_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + + if (buf + 5 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(3, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP, buf); + + return (5); +} + +static int32_t +audio_sink_profile_create_bluetooth_profile_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t profile_descriptor_list[] = { + SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION, + 0x0100 + }; + + return (common_profile_create_bluetooth_profile_descriptor_list( + buf, eob, + (uint8_t const *)profile_descriptor_list, + sizeof(profile_descriptor_list))); +} + +static int32_t +audio_sink_profile_create_service_name( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const char service_name[] = "Audio SNK"; + + return (common_profile_create_string8( + buf, eob, + (uint8_t const *)service_name, strlen(service_name))); +} + +static int32_t +audio_sink_create_supported_features( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_sink_profile_p audio_sink = (sdp_audio_sink_profile_p) provider->data; + + if (buf + 3 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->features, buf); + + return (3); +} + +static int32_t +audio_sink_profile_valid(uint8_t const *data, uint32_t datalen) +{ + + if (datalen < sizeof(struct sdp_audio_sink_profile)) + return (0); + return (1); +} + +static const attr_t audio_sink_profile_attrs[] = { + {SDP_ATTR_SERVICE_RECORD_HANDLE, + common_profile_create_service_record_handle}, + {SDP_ATTR_SERVICE_CLASS_ID_LIST, + audio_sink_profile_create_service_class_id_list}, + {SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, + audio_sink_profile_create_protocol_descriptor_list}, + {SDP_ATTR_BROWSE_GROUP_LIST, + audio_sink_profile_create_browse_group_list}, + {SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST, + common_profile_create_language_base_attribute_id_list}, + {SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, + audio_sink_profile_create_bluetooth_profile_descriptor_list}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, + audio_sink_profile_create_service_name}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_PROVIDER_NAME_OFFSET, + common_profile_create_service_provider_name}, + {SDP_ATTR_SUPPORTED_FEATURES, + audio_sink_create_supported_features}, + {} /* end entry */ +}; + +profile_t audio_sink_profile_descriptor = { + SDP_SERVICE_CLASS_AUDIO_SINK, + sizeof(sdp_audio_sink_profile_t), + audio_sink_profile_valid, + (attr_t const *const)&audio_sink_profile_attrs +}; Copied: stable/12/usr.sbin/bluetooth/sdpd/audio_source.c (from r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.sbin/bluetooth/sdpd/audio_source.c Fri Feb 8 10:25:42 2019 (r343900, copy of r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c) @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define L2CAP_SOCKET_CHECKED +#include +#include +#include +#include "profile.h" +#include "provider.h" + +static int32_t +audio_source_profile_create_service_class_id_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t service_classes[] = { + SDP_SERVICE_CLASS_AUDIO_SOURCE, + }; + + return (common_profile_create_service_class_id_list( + buf, eob, + (uint8_t const *)service_classes, + sizeof(service_classes))); +} + +static int32_t +audio_source_profile_create_protocol_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_source_profile_p audio_source = (sdp_audio_source_profile_p) provider->data; + + if (buf + 18 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(16, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_L2CAP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->psm, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_AVDTP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->protover, buf); + + return (18); +} + +static int32_t +audio_source_profile_create_browse_group_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + + if (buf + 5 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(3, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP, buf); + + return (5); +} + +static int32_t +audio_source_profile_create_bluetooth_profile_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t profile_descriptor_list[] = { + SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION, + 0x0100 + }; + + return (common_profile_create_bluetooth_profile_descriptor_list( + buf, eob, + (uint8_t const *)profile_descriptor_list, + sizeof(profile_descriptor_list))); +} + +static int32_t +audio_source_profile_create_service_name( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const char service_name[] = "Audio SRC"; + + return (common_profile_create_string8( + buf, eob, + (uint8_t const *)service_name, strlen(service_name))); +} + +static int32_t +audio_source_create_supported_features( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_source_profile_p audio_source = (sdp_audio_source_profile_p) provider->data; + + if (buf + 3 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->features, buf); + + return (3); +} + +static int32_t +audio_source_profile_valid(uint8_t const *data, uint32_t datalen) +{ + + if (datalen < sizeof(struct sdp_audio_source_profile)) + return (0); + return (1); +} + +static const attr_t audio_source_profile_attrs[] = { + {SDP_ATTR_SERVICE_RECORD_HANDLE, + common_profile_create_service_record_handle}, + {SDP_ATTR_SERVICE_CLASS_ID_LIST, + audio_source_profile_create_service_class_id_list}, + {SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, + audio_source_profile_create_protocol_descriptor_list}, + {SDP_ATTR_BROWSE_GROUP_LIST, + audio_source_profile_create_browse_group_list}, + {SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST, + common_profile_create_language_base_attribute_id_list}, + {SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, + audio_source_profile_create_bluetooth_profile_descriptor_list}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, + audio_source_profile_create_service_name}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_PROVIDER_NAME_OFFSET, + common_profile_create_service_provider_name}, + {SDP_ATTR_SUPPORTED_FEATURES, + audio_source_create_supported_features}, + {} /* end entry */ +}; + +profile_t audio_source_profile_descriptor = { + SDP_SERVICE_CLASS_AUDIO_SOURCE, + sizeof(sdp_audio_source_profile_t), + audio_source_profile_valid, + (attr_t const *const)&audio_source_profile_attrs +}; Modified: stable/12/usr.sbin/bluetooth/sdpd/profile.c ============================================================================== --- stable/12/usr.sbin/bluetooth/sdpd/profile.c Fri Feb 8 08:20:18 2019 (r343899) +++ stable/12/usr.sbin/bluetooth/sdpd/profile.c Fri Feb 8 10:25:42 2019 (r343900) @@ -48,6 +48,8 @@ profile_p profile_get_descriptor(uint16_t uuid) { + extern profile_t audio_sink_profile_descriptor; + extern profile_t audio_source_profile_descriptor; extern profile_t dun_profile_descriptor; extern profile_t ftrn_profile_descriptor; extern profile_t irmc_profile_descriptor; @@ -60,6 +62,8 @@ profile_get_descriptor(uint16_t uuid) extern profile_t panu_profile_descriptor; static const profile_p profiles[] = { + &audio_sink_profile_descriptor, + &audio_source_profile_descriptor, &dun_profile_descriptor, &ftrn_profile_descriptor, &irmc_profile_descriptor, From owner-svn-src-stable@freebsd.org Fri Feb 8 10:27:04 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4887E14DB6E6; Fri, 8 Feb 2019 10:27:04 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 EFEBA73472; Fri, 8 Feb 2019 10:27:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E080DFD44; Fri, 8 Feb 2019 10:27:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18AR3FA093741; Fri, 8 Feb 2019 10:27:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18AR38J093736; Fri, 8 Feb 2019 10:27:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201902081027.x18AR38J093736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Feb 2019 10:27:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343901 - in stable/11: lib/libsdp usr.sbin/bluetooth/sdpd X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11: lib/libsdp usr.sbin/bluetooth/sdpd X-SVN-Commit-Revision: 343901 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EFEBA73472 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.94)[-0.945,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 10:27:04 -0000 Author: hselasky Date: Fri Feb 8 10:27:02 2019 New Revision: 343901 URL: https://svnweb.freebsd.org/changeset/base/343901 Log: MFC r343572: Add support for Audio Sink and Audio Source profiles to sdpd(8). This allows user-space programs like virtual_oss(8) to act as a Bluetooth speaker device. Sponsored by: Mellanox Technologies Added: stable/11/usr.sbin/bluetooth/sdpd/audio_sink.c - copied unchanged from r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c stable/11/usr.sbin/bluetooth/sdpd/audio_source.c - copied unchanged from r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c Modified: stable/11/lib/libsdp/sdp.h stable/11/usr.sbin/bluetooth/sdpd/Makefile stable/11/usr.sbin/bluetooth/sdpd/profile.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsdp/sdp.h ============================================================================== --- stable/11/lib/libsdp/sdp.h Fri Feb 8 10:25:42 2019 (r343900) +++ stable/11/lib/libsdp/sdp.h Fri Feb 8 10:27:02 2019 (r343901) @@ -583,6 +583,24 @@ void sdp_print (uint32_t level, uin #define SDP_PDU_SERVICE_UNREGISTER_REQUEST 0x82 #define SDP_PDU_SERVICE_CHANGE_REQUEST 0x83 +struct sdp_audio_sink_profile +{ + uint16_t psm; + uint16_t protover; + uint16_t features; +}; +typedef struct sdp_audio_sink_profile sdp_audio_sink_profile_t; +typedef struct sdp_audio_sink_profile *sdp_audio_sink_profile_p; + +struct sdp_audio_source_profile +{ + uint16_t psm; + uint16_t protover; + uint16_t features; +}; +typedef struct sdp_audio_source_profile sdp_audio_source_profile_t; +typedef struct sdp_audio_source_profile *sdp_audio_source_profile_p; + struct sdp_dun_profile { uint8_t server_channel; Modified: stable/11/usr.sbin/bluetooth/sdpd/Makefile ============================================================================== --- stable/11/usr.sbin/bluetooth/sdpd/Makefile Fri Feb 8 10:25:42 2019 (r343900) +++ stable/11/usr.sbin/bluetooth/sdpd/Makefile Fri Feb 8 10:27:02 2019 (r343901) @@ -3,7 +3,8 @@ PROG= sdpd MAN= sdpd.8 -SRCS= bgd.c dun.c ftrn.c gn.c irmc.c irmc_command.c lan.c log.c \ +SRCS= audio_sink.c audio_source.c \ + bgd.c dun.c ftrn.c gn.c irmc.c irmc_command.c lan.c log.c \ main.c nap.c opush.c panu.c profile.c provider.c sar.c scr.c \ sd.c server.c sp.c srr.c ssar.c ssr.c sur.c uuid.c Copied: stable/11/usr.sbin/bluetooth/sdpd/audio_sink.c (from r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.sbin/bluetooth/sdpd/audio_sink.c Fri Feb 8 10:27:02 2019 (r343901, copy of r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c) @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define L2CAP_SOCKET_CHECKED +#include +#include +#include +#include "profile.h" +#include "provider.h" + +static int32_t +audio_sink_profile_create_service_class_id_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t service_classes[] = { + SDP_SERVICE_CLASS_AUDIO_SINK, + }; + + return (common_profile_create_service_class_id_list( + buf, eob, + (uint8_t const *)service_classes, + sizeof(service_classes))); +} + +static int32_t +audio_sink_profile_create_protocol_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_sink_profile_p audio_sink = (sdp_audio_sink_profile_p) provider->data; + + if (buf + 18 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(16, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_L2CAP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->psm, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_AVDTP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->protover, buf); + + return (18); +} + +static int32_t +audio_sink_profile_create_browse_group_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + + if (buf + 5 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(3, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP, buf); + + return (5); +} + +static int32_t +audio_sink_profile_create_bluetooth_profile_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t profile_descriptor_list[] = { + SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION, + 0x0100 + }; + + return (common_profile_create_bluetooth_profile_descriptor_list( + buf, eob, + (uint8_t const *)profile_descriptor_list, + sizeof(profile_descriptor_list))); +} + +static int32_t +audio_sink_profile_create_service_name( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const char service_name[] = "Audio SNK"; + + return (common_profile_create_string8( + buf, eob, + (uint8_t const *)service_name, strlen(service_name))); +} + +static int32_t +audio_sink_create_supported_features( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_sink_profile_p audio_sink = (sdp_audio_sink_profile_p) provider->data; + + if (buf + 3 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->features, buf); + + return (3); +} + +static int32_t +audio_sink_profile_valid(uint8_t const *data, uint32_t datalen) +{ + + if (datalen < sizeof(struct sdp_audio_sink_profile)) + return (0); + return (1); +} + +static const attr_t audio_sink_profile_attrs[] = { + {SDP_ATTR_SERVICE_RECORD_HANDLE, + common_profile_create_service_record_handle}, + {SDP_ATTR_SERVICE_CLASS_ID_LIST, + audio_sink_profile_create_service_class_id_list}, + {SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, + audio_sink_profile_create_protocol_descriptor_list}, + {SDP_ATTR_BROWSE_GROUP_LIST, + audio_sink_profile_create_browse_group_list}, + {SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST, + common_profile_create_language_base_attribute_id_list}, + {SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, + audio_sink_profile_create_bluetooth_profile_descriptor_list}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, + audio_sink_profile_create_service_name}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_PROVIDER_NAME_OFFSET, + common_profile_create_service_provider_name}, + {SDP_ATTR_SUPPORTED_FEATURES, + audio_sink_create_supported_features}, + {} /* end entry */ +}; + +profile_t audio_sink_profile_descriptor = { + SDP_SERVICE_CLASS_AUDIO_SINK, + sizeof(sdp_audio_sink_profile_t), + audio_sink_profile_valid, + (attr_t const *const)&audio_sink_profile_attrs +}; Copied: stable/11/usr.sbin/bluetooth/sdpd/audio_source.c (from r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.sbin/bluetooth/sdpd/audio_source.c Fri Feb 8 10:27:02 2019 (r343901, copy of r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c) @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define L2CAP_SOCKET_CHECKED +#include +#include +#include +#include "profile.h" +#include "provider.h" + +static int32_t +audio_source_profile_create_service_class_id_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t service_classes[] = { + SDP_SERVICE_CLASS_AUDIO_SOURCE, + }; + + return (common_profile_create_service_class_id_list( + buf, eob, + (uint8_t const *)service_classes, + sizeof(service_classes))); +} + +static int32_t +audio_source_profile_create_protocol_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_source_profile_p audio_source = (sdp_audio_source_profile_p) provider->data; + + if (buf + 18 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(16, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_L2CAP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->psm, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_AVDTP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->protover, buf); + + return (18); +} + +static int32_t +audio_source_profile_create_browse_group_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + + if (buf + 5 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(3, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP, buf); + + return (5); +} + +static int32_t +audio_source_profile_create_bluetooth_profile_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t profile_descriptor_list[] = { + SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION, + 0x0100 + }; + + return (common_profile_create_bluetooth_profile_descriptor_list( + buf, eob, + (uint8_t const *)profile_descriptor_list, + sizeof(profile_descriptor_list))); +} + +static int32_t +audio_source_profile_create_service_name( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const char service_name[] = "Audio SRC"; + + return (common_profile_create_string8( + buf, eob, + (uint8_t const *)service_name, strlen(service_name))); +} + +static int32_t +audio_source_create_supported_features( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_source_profile_p audio_source = (sdp_audio_source_profile_p) provider->data; + + if (buf + 3 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->features, buf); + + return (3); +} + +static int32_t +audio_source_profile_valid(uint8_t const *data, uint32_t datalen) +{ + + if (datalen < sizeof(struct sdp_audio_source_profile)) + return (0); + return (1); +} + +static const attr_t audio_source_profile_attrs[] = { + {SDP_ATTR_SERVICE_RECORD_HANDLE, + common_profile_create_service_record_handle}, + {SDP_ATTR_SERVICE_CLASS_ID_LIST, + audio_source_profile_create_service_class_id_list}, + {SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, + audio_source_profile_create_protocol_descriptor_list}, + {SDP_ATTR_BROWSE_GROUP_LIST, + audio_source_profile_create_browse_group_list}, + {SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST, + common_profile_create_language_base_attribute_id_list}, + {SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, + audio_source_profile_create_bluetooth_profile_descriptor_list}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, + audio_source_profile_create_service_name}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_PROVIDER_NAME_OFFSET, + common_profile_create_service_provider_name}, + {SDP_ATTR_SUPPORTED_FEATURES, + audio_source_create_supported_features}, + {} /* end entry */ +}; + +profile_t audio_source_profile_descriptor = { + SDP_SERVICE_CLASS_AUDIO_SOURCE, + sizeof(sdp_audio_source_profile_t), + audio_source_profile_valid, + (attr_t const *const)&audio_source_profile_attrs +}; Modified: stable/11/usr.sbin/bluetooth/sdpd/profile.c ============================================================================== --- stable/11/usr.sbin/bluetooth/sdpd/profile.c Fri Feb 8 10:25:42 2019 (r343900) +++ stable/11/usr.sbin/bluetooth/sdpd/profile.c Fri Feb 8 10:27:02 2019 (r343901) @@ -48,6 +48,8 @@ profile_p profile_get_descriptor(uint16_t uuid) { + extern profile_t audio_sink_profile_descriptor; + extern profile_t audio_source_profile_descriptor; extern profile_t dun_profile_descriptor; extern profile_t ftrn_profile_descriptor; extern profile_t irmc_profile_descriptor; @@ -60,6 +62,8 @@ profile_get_descriptor(uint16_t uuid) extern profile_t panu_profile_descriptor; static const profile_p profiles[] = { + &audio_sink_profile_descriptor, + &audio_source_profile_descriptor, &dun_profile_descriptor, &ftrn_profile_descriptor, &irmc_profile_descriptor, From owner-svn-src-stable@freebsd.org Fri Feb 8 10:28:15 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7790014DB860; Fri, 8 Feb 2019 10:28:15 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 26F187360F; Fri, 8 Feb 2019 10:28:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBF46FD46; Fri, 8 Feb 2019 10:28:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18ASEh6093852; Fri, 8 Feb 2019 10:28:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18ASEkQ093848; Fri, 8 Feb 2019 10:28:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201902081028.x18ASEkQ093848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Feb 2019 10:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343902 - in stable/10: lib/libsdp usr.sbin/bluetooth/sdpd X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10: lib/libsdp usr.sbin/bluetooth/sdpd X-SVN-Commit-Revision: 343902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 26F187360F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 10:28:15 -0000 Author: hselasky Date: Fri Feb 8 10:28:13 2019 New Revision: 343902 URL: https://svnweb.freebsd.org/changeset/base/343902 Log: MFC r343572: Add support for Audio Sink and Audio Source profiles to sdpd(8). This allows user-space programs like virtual_oss(8) to act as a Bluetooth speaker device. Sponsored by: Mellanox Technologies Added: stable/10/usr.sbin/bluetooth/sdpd/audio_sink.c - copied unchanged from r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c stable/10/usr.sbin/bluetooth/sdpd/audio_source.c - copied unchanged from r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c Modified: stable/10/lib/libsdp/sdp.h stable/10/usr.sbin/bluetooth/sdpd/Makefile stable/10/usr.sbin/bluetooth/sdpd/profile.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libsdp/sdp.h ============================================================================== --- stable/10/lib/libsdp/sdp.h Fri Feb 8 10:27:02 2019 (r343901) +++ stable/10/lib/libsdp/sdp.h Fri Feb 8 10:28:13 2019 (r343902) @@ -583,6 +583,24 @@ void sdp_print (uint32_t level, uin #define SDP_PDU_SERVICE_UNREGISTER_REQUEST 0x82 #define SDP_PDU_SERVICE_CHANGE_REQUEST 0x83 +struct sdp_audio_sink_profile +{ + uint16_t psm; + uint16_t protover; + uint16_t features; +}; +typedef struct sdp_audio_sink_profile sdp_audio_sink_profile_t; +typedef struct sdp_audio_sink_profile *sdp_audio_sink_profile_p; + +struct sdp_audio_source_profile +{ + uint16_t psm; + uint16_t protover; + uint16_t features; +}; +typedef struct sdp_audio_source_profile sdp_audio_source_profile_t; +typedef struct sdp_audio_source_profile *sdp_audio_source_profile_p; + struct sdp_dun_profile { uint8_t server_channel; Modified: stable/10/usr.sbin/bluetooth/sdpd/Makefile ============================================================================== --- stable/10/usr.sbin/bluetooth/sdpd/Makefile Fri Feb 8 10:27:02 2019 (r343901) +++ stable/10/usr.sbin/bluetooth/sdpd/Makefile Fri Feb 8 10:28:13 2019 (r343902) @@ -3,7 +3,8 @@ PROG= sdpd MAN= sdpd.8 -SRCS= bgd.c dun.c ftrn.c gn.c irmc.c irmc_command.c lan.c log.c \ +SRCS= audio_sink.c audio_source.c \ + bgd.c dun.c ftrn.c gn.c irmc.c irmc_command.c lan.c log.c \ main.c nap.c opush.c panu.c profile.c provider.c sar.c scr.c \ sd.c server.c sp.c srr.c ssar.c ssr.c sur.c uuid.c Copied: stable/10/usr.sbin/bluetooth/sdpd/audio_sink.c (from r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/bluetooth/sdpd/audio_sink.c Fri Feb 8 10:28:13 2019 (r343902, copy of r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c) @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define L2CAP_SOCKET_CHECKED +#include +#include +#include +#include "profile.h" +#include "provider.h" + +static int32_t +audio_sink_profile_create_service_class_id_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t service_classes[] = { + SDP_SERVICE_CLASS_AUDIO_SINK, + }; + + return (common_profile_create_service_class_id_list( + buf, eob, + (uint8_t const *)service_classes, + sizeof(service_classes))); +} + +static int32_t +audio_sink_profile_create_protocol_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_sink_profile_p audio_sink = (sdp_audio_sink_profile_p) provider->data; + + if (buf + 18 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(16, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_L2CAP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->psm, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_AVDTP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->protover, buf); + + return (18); +} + +static int32_t +audio_sink_profile_create_browse_group_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + + if (buf + 5 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(3, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP, buf); + + return (5); +} + +static int32_t +audio_sink_profile_create_bluetooth_profile_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t profile_descriptor_list[] = { + SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION, + 0x0100 + }; + + return (common_profile_create_bluetooth_profile_descriptor_list( + buf, eob, + (uint8_t const *)profile_descriptor_list, + sizeof(profile_descriptor_list))); +} + +static int32_t +audio_sink_profile_create_service_name( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const char service_name[] = "Audio SNK"; + + return (common_profile_create_string8( + buf, eob, + (uint8_t const *)service_name, strlen(service_name))); +} + +static int32_t +audio_sink_create_supported_features( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_sink_profile_p audio_sink = (sdp_audio_sink_profile_p) provider->data; + + if (buf + 3 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->features, buf); + + return (3); +} + +static int32_t +audio_sink_profile_valid(uint8_t const *data, uint32_t datalen) +{ + + if (datalen < sizeof(struct sdp_audio_sink_profile)) + return (0); + return (1); +} + +static const attr_t audio_sink_profile_attrs[] = { + {SDP_ATTR_SERVICE_RECORD_HANDLE, + common_profile_create_service_record_handle}, + {SDP_ATTR_SERVICE_CLASS_ID_LIST, + audio_sink_profile_create_service_class_id_list}, + {SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, + audio_sink_profile_create_protocol_descriptor_list}, + {SDP_ATTR_BROWSE_GROUP_LIST, + audio_sink_profile_create_browse_group_list}, + {SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST, + common_profile_create_language_base_attribute_id_list}, + {SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, + audio_sink_profile_create_bluetooth_profile_descriptor_list}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, + audio_sink_profile_create_service_name}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_PROVIDER_NAME_OFFSET, + common_profile_create_service_provider_name}, + {SDP_ATTR_SUPPORTED_FEATURES, + audio_sink_create_supported_features}, + {} /* end entry */ +}; + +profile_t audio_sink_profile_descriptor = { + SDP_SERVICE_CLASS_AUDIO_SINK, + sizeof(sdp_audio_sink_profile_t), + audio_sink_profile_valid, + (attr_t const *const)&audio_sink_profile_attrs +}; Copied: stable/10/usr.sbin/bluetooth/sdpd/audio_source.c (from r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/bluetooth/sdpd/audio_source.c Fri Feb 8 10:28:13 2019 (r343902, copy of r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c) @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define L2CAP_SOCKET_CHECKED +#include +#include +#include +#include "profile.h" +#include "provider.h" + +static int32_t +audio_source_profile_create_service_class_id_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t service_classes[] = { + SDP_SERVICE_CLASS_AUDIO_SOURCE, + }; + + return (common_profile_create_service_class_id_list( + buf, eob, + (uint8_t const *)service_classes, + sizeof(service_classes))); +} + +static int32_t +audio_source_profile_create_protocol_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_source_profile_p audio_source = (sdp_audio_source_profile_p) provider->data; + + if (buf + 18 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(16, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_L2CAP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->psm, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_AVDTP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->protover, buf); + + return (18); +} + +static int32_t +audio_source_profile_create_browse_group_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + + if (buf + 5 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(3, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP, buf); + + return (5); +} + +static int32_t +audio_source_profile_create_bluetooth_profile_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t profile_descriptor_list[] = { + SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION, + 0x0100 + }; + + return (common_profile_create_bluetooth_profile_descriptor_list( + buf, eob, + (uint8_t const *)profile_descriptor_list, + sizeof(profile_descriptor_list))); +} + +static int32_t +audio_source_profile_create_service_name( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const char service_name[] = "Audio SRC"; + + return (common_profile_create_string8( + buf, eob, + (uint8_t const *)service_name, strlen(service_name))); +} + +static int32_t +audio_source_create_supported_features( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_source_profile_p audio_source = (sdp_audio_source_profile_p) provider->data; + + if (buf + 3 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->features, buf); + + return (3); +} + +static int32_t +audio_source_profile_valid(uint8_t const *data, uint32_t datalen) +{ + + if (datalen < sizeof(struct sdp_audio_source_profile)) + return (0); + return (1); +} + +static const attr_t audio_source_profile_attrs[] = { + {SDP_ATTR_SERVICE_RECORD_HANDLE, + common_profile_create_service_record_handle}, + {SDP_ATTR_SERVICE_CLASS_ID_LIST, + audio_source_profile_create_service_class_id_list}, + {SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, + audio_source_profile_create_protocol_descriptor_list}, + {SDP_ATTR_BROWSE_GROUP_LIST, + audio_source_profile_create_browse_group_list}, + {SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST, + common_profile_create_language_base_attribute_id_list}, + {SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, + audio_source_profile_create_bluetooth_profile_descriptor_list}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, + audio_source_profile_create_service_name}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_PROVIDER_NAME_OFFSET, + common_profile_create_service_provider_name}, + {SDP_ATTR_SUPPORTED_FEATURES, + audio_source_create_supported_features}, + {} /* end entry */ +}; + +profile_t audio_source_profile_descriptor = { + SDP_SERVICE_CLASS_AUDIO_SOURCE, + sizeof(sdp_audio_source_profile_t), + audio_source_profile_valid, + (attr_t const *const)&audio_source_profile_attrs +}; Modified: stable/10/usr.sbin/bluetooth/sdpd/profile.c ============================================================================== --- stable/10/usr.sbin/bluetooth/sdpd/profile.c Fri Feb 8 10:27:02 2019 (r343901) +++ stable/10/usr.sbin/bluetooth/sdpd/profile.c Fri Feb 8 10:28:13 2019 (r343902) @@ -45,6 +45,8 @@ profile_p profile_get_descriptor(uint16_t uuid) { + extern profile_t audio_sink_profile_descriptor; + extern profile_t audio_source_profile_descriptor; extern profile_t dun_profile_descriptor; extern profile_t ftrn_profile_descriptor; extern profile_t irmc_profile_descriptor; @@ -57,6 +59,8 @@ profile_get_descriptor(uint16_t uuid) extern profile_t panu_profile_descriptor; static const profile_p profiles[] = { + &audio_sink_profile_descriptor, + &audio_source_profile_descriptor, &dun_profile_descriptor, &ftrn_profile_descriptor, &irmc_profile_descriptor, From owner-svn-src-stable@freebsd.org Fri Feb 8 10:31:47 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D90414DB9A6; Fri, 8 Feb 2019 10:31:47 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 DE428739ED; Fri, 8 Feb 2019 10:31:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8A78FEB2; Fri, 8 Feb 2019 10:31:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18AVkbC097048; Fri, 8 Feb 2019 10:31:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18AVjWE097043; Fri, 8 Feb 2019 10:31:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201902081031.x18AVjWE097043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Feb 2019 10:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r343903 - in stable/9: lib/libsdp usr.sbin/bluetooth/sdpd X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/9: lib/libsdp usr.sbin/bluetooth/sdpd X-SVN-Commit-Revision: 343903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DE428739ED X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.94)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 10:31:48 -0000 Author: hselasky Date: Fri Feb 8 10:31:45 2019 New Revision: 343903 URL: https://svnweb.freebsd.org/changeset/base/343903 Log: MFC r343572: Add support for Audio Sink and Audio Source profiles to sdpd(8). This allows user-space programs like virtual_oss(8) to act as a Bluetooth speaker device. Sponsored by: Mellanox Technologies Added: stable/9/usr.sbin/bluetooth/sdpd/audio_sink.c - copied unchanged from r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c stable/9/usr.sbin/bluetooth/sdpd/audio_source.c - copied unchanged from r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c Modified: stable/9/lib/libsdp/sdp.h stable/9/usr.sbin/bluetooth/sdpd/Makefile stable/9/usr.sbin/bluetooth/sdpd/profile.c Directory Properties: stable/9/lib/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bluetooth/sdpd/ (props changed) Modified: stable/9/lib/libsdp/sdp.h ============================================================================== --- stable/9/lib/libsdp/sdp.h Fri Feb 8 10:28:13 2019 (r343902) +++ stable/9/lib/libsdp/sdp.h Fri Feb 8 10:31:45 2019 (r343903) @@ -583,6 +583,24 @@ void sdp_print (uint32_t level, uin #define SDP_PDU_SERVICE_UNREGISTER_REQUEST 0x82 #define SDP_PDU_SERVICE_CHANGE_REQUEST 0x83 +struct sdp_audio_sink_profile +{ + uint16_t psm; + uint16_t protover; + uint16_t features; +}; +typedef struct sdp_audio_sink_profile sdp_audio_sink_profile_t; +typedef struct sdp_audio_sink_profile *sdp_audio_sink_profile_p; + +struct sdp_audio_source_profile +{ + uint16_t psm; + uint16_t protover; + uint16_t features; +}; +typedef struct sdp_audio_source_profile sdp_audio_source_profile_t; +typedef struct sdp_audio_source_profile *sdp_audio_source_profile_p; + struct sdp_dun_profile { uint8_t server_channel; Modified: stable/9/usr.sbin/bluetooth/sdpd/Makefile ============================================================================== --- stable/9/usr.sbin/bluetooth/sdpd/Makefile Fri Feb 8 10:28:13 2019 (r343902) +++ stable/9/usr.sbin/bluetooth/sdpd/Makefile Fri Feb 8 10:31:45 2019 (r343903) @@ -3,7 +3,8 @@ PROG= sdpd MAN= sdpd.8 -SRCS= bgd.c dun.c ftrn.c gn.c irmc.c irmc_command.c lan.c log.c \ +SRCS= audio_sink.c audio_source.c \ + bgd.c dun.c ftrn.c gn.c irmc.c irmc_command.c lan.c log.c \ main.c nap.c opush.c panu.c profile.c provider.c sar.c scr.c \ sd.c server.c sp.c srr.c ssar.c ssr.c sur.c uuid.c Copied: stable/9/usr.sbin/bluetooth/sdpd/audio_sink.c (from r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/usr.sbin/bluetooth/sdpd/audio_sink.c Fri Feb 8 10:31:45 2019 (r343903, copy of r343572, head/usr.sbin/bluetooth/sdpd/audio_sink.c) @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define L2CAP_SOCKET_CHECKED +#include +#include +#include +#include "profile.h" +#include "provider.h" + +static int32_t +audio_sink_profile_create_service_class_id_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t service_classes[] = { + SDP_SERVICE_CLASS_AUDIO_SINK, + }; + + return (common_profile_create_service_class_id_list( + buf, eob, + (uint8_t const *)service_classes, + sizeof(service_classes))); +} + +static int32_t +audio_sink_profile_create_protocol_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_sink_profile_p audio_sink = (sdp_audio_sink_profile_p) provider->data; + + if (buf + 18 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(16, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_L2CAP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->psm, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_AVDTP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->protover, buf); + + return (18); +} + +static int32_t +audio_sink_profile_create_browse_group_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + + if (buf + 5 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(3, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP, buf); + + return (5); +} + +static int32_t +audio_sink_profile_create_bluetooth_profile_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t profile_descriptor_list[] = { + SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION, + 0x0100 + }; + + return (common_profile_create_bluetooth_profile_descriptor_list( + buf, eob, + (uint8_t const *)profile_descriptor_list, + sizeof(profile_descriptor_list))); +} + +static int32_t +audio_sink_profile_create_service_name( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const char service_name[] = "Audio SNK"; + + return (common_profile_create_string8( + buf, eob, + (uint8_t const *)service_name, strlen(service_name))); +} + +static int32_t +audio_sink_create_supported_features( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_sink_profile_p audio_sink = (sdp_audio_sink_profile_p) provider->data; + + if (buf + 3 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_sink->features, buf); + + return (3); +} + +static int32_t +audio_sink_profile_valid(uint8_t const *data, uint32_t datalen) +{ + + if (datalen < sizeof(struct sdp_audio_sink_profile)) + return (0); + return (1); +} + +static const attr_t audio_sink_profile_attrs[] = { + {SDP_ATTR_SERVICE_RECORD_HANDLE, + common_profile_create_service_record_handle}, + {SDP_ATTR_SERVICE_CLASS_ID_LIST, + audio_sink_profile_create_service_class_id_list}, + {SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, + audio_sink_profile_create_protocol_descriptor_list}, + {SDP_ATTR_BROWSE_GROUP_LIST, + audio_sink_profile_create_browse_group_list}, + {SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST, + common_profile_create_language_base_attribute_id_list}, + {SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, + audio_sink_profile_create_bluetooth_profile_descriptor_list}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, + audio_sink_profile_create_service_name}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_PROVIDER_NAME_OFFSET, + common_profile_create_service_provider_name}, + {SDP_ATTR_SUPPORTED_FEATURES, + audio_sink_create_supported_features}, + {} /* end entry */ +}; + +profile_t audio_sink_profile_descriptor = { + SDP_SERVICE_CLASS_AUDIO_SINK, + sizeof(sdp_audio_sink_profile_t), + audio_sink_profile_valid, + (attr_t const *const)&audio_sink_profile_attrs +}; Copied: stable/9/usr.sbin/bluetooth/sdpd/audio_source.c (from r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/usr.sbin/bluetooth/sdpd/audio_source.c Fri Feb 8 10:31:45 2019 (r343903, copy of r343572, head/usr.sbin/bluetooth/sdpd/audio_source.c) @@ -0,0 +1,188 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define L2CAP_SOCKET_CHECKED +#include +#include +#include +#include "profile.h" +#include "provider.h" + +static int32_t +audio_source_profile_create_service_class_id_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t service_classes[] = { + SDP_SERVICE_CLASS_AUDIO_SOURCE, + }; + + return (common_profile_create_service_class_id_list( + buf, eob, + (uint8_t const *)service_classes, + sizeof(service_classes))); +} + +static int32_t +audio_source_profile_create_protocol_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_source_profile_p audio_source = (sdp_audio_source_profile_p) provider->data; + + if (buf + 18 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(16, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_L2CAP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->psm, buf); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(6, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_UUID_PROTOCOL_AVDTP, buf); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->protover, buf); + + return (18); +} + +static int32_t +audio_source_profile_create_browse_group_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + + if (buf + 5 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_SEQ8, buf); + SDP_PUT8(3, buf); + + SDP_PUT8(SDP_DATA_UUID16, buf); + SDP_PUT16(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP, buf); + + return (5); +} + +static int32_t +audio_source_profile_create_bluetooth_profile_descriptor_list( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const uint16_t profile_descriptor_list[] = { + SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION, + 0x0100 + }; + + return (common_profile_create_bluetooth_profile_descriptor_list( + buf, eob, + (uint8_t const *)profile_descriptor_list, + sizeof(profile_descriptor_list))); +} + +static int32_t +audio_source_profile_create_service_name( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + static const char service_name[] = "Audio SRC"; + + return (common_profile_create_string8( + buf, eob, + (uint8_t const *)service_name, strlen(service_name))); +} + +static int32_t +audio_source_create_supported_features( + uint8_t *buf, uint8_t const *const eob, + uint8_t const *data, uint32_t datalen) +{ + provider_p provider = (provider_p) data; + sdp_audio_source_profile_p audio_source = (sdp_audio_source_profile_p) provider->data; + + if (buf + 3 > eob) + return (-1); + + SDP_PUT8(SDP_DATA_UINT16, buf); + SDP_PUT16(audio_source->features, buf); + + return (3); +} + +static int32_t +audio_source_profile_valid(uint8_t const *data, uint32_t datalen) +{ + + if (datalen < sizeof(struct sdp_audio_source_profile)) + return (0); + return (1); +} + +static const attr_t audio_source_profile_attrs[] = { + {SDP_ATTR_SERVICE_RECORD_HANDLE, + common_profile_create_service_record_handle}, + {SDP_ATTR_SERVICE_CLASS_ID_LIST, + audio_source_profile_create_service_class_id_list}, + {SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, + audio_source_profile_create_protocol_descriptor_list}, + {SDP_ATTR_BROWSE_GROUP_LIST, + audio_source_profile_create_browse_group_list}, + {SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST, + common_profile_create_language_base_attribute_id_list}, + {SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, + audio_source_profile_create_bluetooth_profile_descriptor_list}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, + audio_source_profile_create_service_name}, + {SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_PROVIDER_NAME_OFFSET, + common_profile_create_service_provider_name}, + {SDP_ATTR_SUPPORTED_FEATURES, + audio_source_create_supported_features}, + {} /* end entry */ +}; + +profile_t audio_source_profile_descriptor = { + SDP_SERVICE_CLASS_AUDIO_SOURCE, + sizeof(sdp_audio_source_profile_t), + audio_source_profile_valid, + (attr_t const *const)&audio_source_profile_attrs +}; Modified: stable/9/usr.sbin/bluetooth/sdpd/profile.c ============================================================================== --- stable/9/usr.sbin/bluetooth/sdpd/profile.c Fri Feb 8 10:28:13 2019 (r343902) +++ stable/9/usr.sbin/bluetooth/sdpd/profile.c Fri Feb 8 10:31:45 2019 (r343903) @@ -45,6 +45,8 @@ profile_p profile_get_descriptor(uint16_t uuid) { + extern profile_t audio_sink_profile_descriptor; + extern profile_t audio_source_profile_descriptor; extern profile_t dun_profile_descriptor; extern profile_t ftrn_profile_descriptor; extern profile_t irmc_profile_descriptor; @@ -57,6 +59,8 @@ profile_get_descriptor(uint16_t uuid) extern profile_t panu_profile_descriptor; static const profile_p profiles[] = { + &audio_sink_profile_descriptor, + &audio_source_profile_descriptor, &dun_profile_descriptor, &ftrn_profile_descriptor, &irmc_profile_descriptor, From owner-svn-src-stable@freebsd.org Fri Feb 8 13:57:29 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17F1714E1884; Fri, 8 Feb 2019 13:57:29 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 AD44383BEA; Fri, 8 Feb 2019 13:57:28 +0000 (UTC) (envelope-from avos@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 9CEA31A108; Fri, 8 Feb 2019 13:57:28 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18DvSlV004970; Fri, 8 Feb 2019 13:57:28 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18DvSGX004969; Fri, 8 Feb 2019 13:57:28 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902081357.x18DvSGX004969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 13:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343907 - in stable: 10/sys/dev/ipw 11/sys/dev/ipw 12/sys/dev/ipw X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/ipw 11/sys/dev/ipw 12/sys/dev/ipw X-SVN-Commit-Revision: 343907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AD44383BEA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 13:57:29 -0000 Author: avos Date: Fri Feb 8 13:57:28 2019 New Revision: 343907 URL: https://svnweb.freebsd.org/changeset/base/343907 Log: MFC r343603: ipw(4): reuse ieee80211_tx_complete function This should partially fix 'netstat -b -I wlan0' output Modified: stable/11/sys/dev/ipw/if_ipw.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/ipw/if_ipw.c stable/12/sys/dev/ipw/if_ipw.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/11/sys/dev/ipw/if_ipw.c Fri Feb 8 13:54:16 2019 (r343906) +++ stable/11/sys/dev/ipw/if_ipw.c Fri Feb 8 13:57:28 2019 (r343907) @@ -1322,10 +1322,7 @@ ipw_release_sbd(struct ipw_softc *sc, struct ipw_soft_ bus_dmamap_unload(sc->txbuf_dmat, sbuf->map); SLIST_INSERT_HEAD(&sc->free_sbuf, sbuf, next); - if (sbuf->m->m_flags & M_TXCB) - ieee80211_process_callback(sbuf->ni, sbuf->m, 0/*XXX*/); - m_freem(sbuf->m); - ieee80211_free_node(sbuf->ni); + ieee80211_tx_complete(sbuf->ni, sbuf->m, 0/*XXX*/); sc->sc_tx_timer = 0; break; From owner-svn-src-stable@freebsd.org Fri Feb 8 13:57:29 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 688DA14E1888; Fri, 8 Feb 2019 13:57:29 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 08C1B83BEB; Fri, 8 Feb 2019 13:57:29 +0000 (UTC) (envelope-from avos@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 F02521A109; Fri, 8 Feb 2019 13:57:28 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18DvSVX004976; Fri, 8 Feb 2019 13:57:28 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18DvS8W004975; Fri, 8 Feb 2019 13:57:28 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902081357.x18DvS8W004975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 13:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343907 - in stable: 10/sys/dev/ipw 11/sys/dev/ipw 12/sys/dev/ipw X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/ipw 11/sys/dev/ipw 12/sys/dev/ipw X-SVN-Commit-Revision: 343907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 08C1B83BEB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 13:57:29 -0000 Author: avos Date: Fri Feb 8 13:57:28 2019 New Revision: 343907 URL: https://svnweb.freebsd.org/changeset/base/343907 Log: MFC r343603: ipw(4): reuse ieee80211_tx_complete function This should partially fix 'netstat -b -I wlan0' output Modified: stable/10/sys/dev/ipw/if_ipw.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/ipw/if_ipw.c stable/12/sys/dev/ipw/if_ipw.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/10/sys/dev/ipw/if_ipw.c Fri Feb 8 13:54:16 2019 (r343906) +++ stable/10/sys/dev/ipw/if_ipw.c Fri Feb 8 13:57:28 2019 (r343907) @@ -1357,10 +1357,7 @@ ipw_release_sbd(struct ipw_softc *sc, struct ipw_soft_ bus_dmamap_unload(sc->txbuf_dmat, sbuf->map); SLIST_INSERT_HEAD(&sc->free_sbuf, sbuf, next); - if (sbuf->m->m_flags & M_TXCB) - ieee80211_process_callback(sbuf->ni, sbuf->m, 0/*XXX*/); - m_freem(sbuf->m); - ieee80211_free_node(sbuf->ni); + ieee80211_tx_complete(sbuf->ni, sbuf->m, 0/*XXX*/); sc->sc_tx_timer = 0; break; From owner-svn-src-stable@freebsd.org Fri Feb 8 13:57:29 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E036014E188F; Fri, 8 Feb 2019 13:57:29 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 8409283BF3; Fri, 8 Feb 2019 13:57:29 +0000 (UTC) (envelope-from avos@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 515161A10A; Fri, 8 Feb 2019 13:57:29 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18DvTwk004982; Fri, 8 Feb 2019 13:57:29 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18DvTeQ004981; Fri, 8 Feb 2019 13:57:29 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902081357.x18DvTeQ004981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 13:57: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: r343907 - in stable: 10/sys/dev/ipw 11/sys/dev/ipw 12/sys/dev/ipw X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/sys/dev/ipw 11/sys/dev/ipw 12/sys/dev/ipw X-SVN-Commit-Revision: 343907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8409283BF3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 13:57:30 -0000 Author: avos Date: Fri Feb 8 13:57:28 2019 New Revision: 343907 URL: https://svnweb.freebsd.org/changeset/base/343907 Log: MFC r343603: ipw(4): reuse ieee80211_tx_complete function This should partially fix 'netstat -b -I wlan0' output Modified: stable/12/sys/dev/ipw/if_ipw.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/ipw/if_ipw.c stable/11/sys/dev/ipw/if_ipw.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/12/sys/dev/ipw/if_ipw.c Fri Feb 8 13:54:16 2019 (r343906) +++ stable/12/sys/dev/ipw/if_ipw.c Fri Feb 8 13:57:28 2019 (r343907) @@ -1326,10 +1326,7 @@ ipw_release_sbd(struct ipw_softc *sc, struct ipw_soft_ bus_dmamap_unload(sc->txbuf_dmat, sbuf->map); SLIST_INSERT_HEAD(&sc->free_sbuf, sbuf, next); - if (sbuf->m->m_flags & M_TXCB) - ieee80211_process_callback(sbuf->ni, sbuf->m, 0/*XXX*/); - m_freem(sbuf->m); - ieee80211_free_node(sbuf->ni); + ieee80211_tx_complete(sbuf->ni, sbuf->m, 0/*XXX*/); sc->sc_tx_timer = 0; break; From owner-svn-src-stable@freebsd.org Fri Feb 8 14:27:26 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76CEC14E2325; Fri, 8 Feb 2019 14:27:26 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 19735850BD; Fri, 8 Feb 2019 14:27:26 +0000 (UTC) (envelope-from avos@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 0B1C61A641; Fri, 8 Feb 2019 14:27:26 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18ERP6E020827; Fri, 8 Feb 2019 14:27:25 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18ERPWR020826; Fri, 8 Feb 2019 14:27:25 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902081427.x18ERPWR020826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 14:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343908 - in stable: 11/sys/dev/bwn 12/sys/dev/bwn X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sys/dev/bwn 12/sys/dev/bwn X-SVN-Commit-Revision: 343908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 19735850BD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 14:27:26 -0000 Author: avos Date: Fri Feb 8 14:27:25 2019 New Revision: 343908 URL: https://svnweb.freebsd.org/changeset/base/343908 Log: MFC r343604: bwn(4): reuse ieee80211_tx_complete function Modified: stable/11/sys/dev/bwn/if_bwn.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/dev/bwn/if_bwn.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/11/sys/dev/bwn/if_bwn.c Fri Feb 8 13:57:28 2019 (r343907) +++ stable/11/sys/dev/bwn/if_bwn.c Fri Feb 8 14:27:25 2019 (r343908) @@ -5992,7 +5992,6 @@ bwn_pio_handle_txeof(struct bwn_mac *mac, * Do any tx complete callback. Note this must * be done before releasing the node reference. */ - /* * If we don't get an ACK, then we should log the * full framecnt. That may be 0 if it's a PHY @@ -6012,12 +6011,9 @@ bwn_pio_handle_txeof(struct bwn_mac *mac, IEEE80211_RATECTL_TX_FAILURE, &retrycnt, 0); - if (tp->tp_m->m_flags & M_TXCB) - ieee80211_process_callback(tp->tp_ni, tp->tp_m, 0); - ieee80211_free_node(tp->tp_ni); - tp->tp_ni = NULL; } - m_freem(tp->tp_m); + ieee80211_tx_complete(tp->tp_ni, tp->tp_m, 0); + tp->tp_ni = NULL; tp->tp_m = NULL; TAILQ_INSERT_TAIL(&tq->tq_pktlist, tp, tp_list); From owner-svn-src-stable@freebsd.org Fri Feb 8 14:27:26 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9EDC14E2329; Fri, 8 Feb 2019 14:27:26 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 69405850BE; Fri, 8 Feb 2019 14:27:26 +0000 (UTC) (envelope-from avos@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 5CC6C1A642; Fri, 8 Feb 2019 14:27:26 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18ERQqC020833; Fri, 8 Feb 2019 14:27:26 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18ERQid020832; Fri, 8 Feb 2019 14:27:26 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902081427.x18ERQid020832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 14:27:26 +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: r343908 - in stable: 11/sys/dev/bwn 12/sys/dev/bwn X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sys/dev/bwn 12/sys/dev/bwn X-SVN-Commit-Revision: 343908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 69405850BE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 14:27:27 -0000 Author: avos Date: Fri Feb 8 14:27:25 2019 New Revision: 343908 URL: https://svnweb.freebsd.org/changeset/base/343908 Log: MFC r343604: bwn(4): reuse ieee80211_tx_complete function Modified: stable/12/sys/dev/bwn/if_bwn.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/bwn/if_bwn.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/12/sys/dev/bwn/if_bwn.c Fri Feb 8 13:57:28 2019 (r343907) +++ stable/12/sys/dev/bwn/if_bwn.c Fri Feb 8 14:27:25 2019 (r343908) @@ -6211,20 +6211,15 @@ bwn_pio_handle_txeof(struct bwn_mac *mac, tq->tq_used -= roundup(tp->tp_m->m_pkthdr.len + BWN_HDRSIZE(mac), 4); tq->tq_free++; - /* XXX ieee80211_tx_complete()? */ if (tp->tp_ni != NULL) { /* * Do any tx complete callback. Note this must * be done before releasing the node reference. */ - bwn_ratectl_tx_complete(tp->tp_ni, status); - if (tp->tp_m->m_flags & M_TXCB) - ieee80211_process_callback(tp->tp_ni, tp->tp_m, 0); - ieee80211_free_node(tp->tp_ni); - tp->tp_ni = NULL; } - m_freem(tp->tp_m); + ieee80211_tx_complete(tp->tp_ni, tp->tp_m, 0); + tp->tp_ni = NULL; tp->tp_m = NULL; TAILQ_INSERT_TAIL(&tq->tq_pktlist, tp, tp_list); From owner-svn-src-stable@freebsd.org Fri Feb 8 14:32:28 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E158A14E25D0; Fri, 8 Feb 2019 14:32:27 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 838CA857FC; Fri, 8 Feb 2019 14:32:27 +0000 (UTC) (envelope-from avos@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 775CB1A80E; Fri, 8 Feb 2019 14:32:27 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18EWRUT025629; Fri, 8 Feb 2019 14:32:27 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18EWRkH025628; Fri, 8 Feb 2019 14:32:27 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902081432.x18EWRkH025628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 14:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343910 - stable/10/sys/dev/bwn X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/10/sys/dev/bwn X-SVN-Commit-Revision: 343910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 838CA857FC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 14:32:28 -0000 Author: avos Date: Fri Feb 8 14:32:27 2019 New Revision: 343910 URL: https://svnweb.freebsd.org/changeset/base/343910 Log: MFC r343604: bwn(4): reuse ieee80211_tx_complete function Modified: stable/10/sys/dev/bwn/if_bwn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/10/sys/dev/bwn/if_bwn.c Fri Feb 8 14:31:44 2019 (r343909) +++ stable/10/sys/dev/bwn/if_bwn.c Fri Feb 8 14:32:27 2019 (r343910) @@ -9473,17 +9473,8 @@ bwn_pio_handle_txeof(struct bwn_mac *mac, tq->tq_used -= roundup(tp->tp_m->m_pkthdr.len + BWN_HDRSIZE(mac), 4); tq->tq_free++; - if (tp->tp_ni != NULL) { - /* - * Do any tx complete callback. Note this must - * be done before releasing the node reference. - */ - if (tp->tp_m->m_flags & M_TXCB) - ieee80211_process_callback(tp->tp_ni, tp->tp_m, 0); - ieee80211_free_node(tp->tp_ni); - tp->tp_ni = NULL; - } - m_freem(tp->tp_m); + ieee80211_tx_complete(tp->tp_ni, tp->tp_m, 0); + tp->tp_ni = NULL; tp->tp_m = NULL; TAILQ_INSERT_TAIL(&tq->tq_pktlist, tp, tp_list); From owner-svn-src-stable@freebsd.org Fri Feb 8 16:38:31 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6C0114B192F; Fri, 8 Feb 2019 16:38:31 +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) server-signature RSA-PSS (4096 bits) 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 493C48A04C; Fri, 8 Feb 2019 16:38:31 +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 36D041BC66; Fri, 8 Feb 2019 16:38:31 +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 x18GcVa5088560; Fri, 8 Feb 2019 16:38:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18GcVZ7088559; Fri, 8 Feb 2019 16:38:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201902081638.x18GcVZ7088559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 8 Feb 2019 16:38: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: r343914 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 343914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 493C48A04C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 16:38:31 -0000 Author: markj Date: Fri Feb 8 16:38:30 2019 New Revision: 343914 URL: https://svnweb.freebsd.org/changeset/base/343914 Log: MFC r343626: Prevent some kobj memory allocation failures from panicking the system. Modified: stable/12/sys/kern/subr_kobj.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/subr_kobj.c ============================================================================== --- stable/12/sys/kern/subr_kobj.c Fri Feb 8 16:18:17 2019 (r343913) +++ stable/12/sys/kern/subr_kobj.c Fri Feb 8 16:38:30 2019 (r343914) @@ -125,38 +125,43 @@ kobj_class_compile_common(kobj_class_t cls, kobj_ops_t cls->ops = ops; } -void -kobj_class_compile(kobj_class_t cls) +static int +kobj_class_compile1(kobj_class_t cls, int mflags) { kobj_ops_t ops; KOBJ_ASSERT(MA_NOTOWNED); - /* - * Allocate space for the compiled ops table. - */ - ops = malloc(sizeof(struct kobj_ops), M_KOBJ, M_NOWAIT); - if (!ops) - panic("%s: out of memory", __func__); + ops = malloc(sizeof(struct kobj_ops), M_KOBJ, mflags); + if (ops == NULL) + return (ENOMEM); - KOBJ_LOCK(); - /* * We may have lost a race for kobj_class_compile here - check * to make sure someone else hasn't already compiled this * class. */ + KOBJ_LOCK(); if (cls->ops) { KOBJ_UNLOCK(); free(ops, M_KOBJ); - return; + return (0); } - kobj_class_compile_common(cls, ops); KOBJ_UNLOCK(); + return (0); } void +kobj_class_compile(kobj_class_t cls) +{ + int error; + + error = kobj_class_compile1(cls, M_WAITOK); + KASSERT(error == 0, ("kobj_class_compile1 returned %d", error)); +} + +void kobj_class_compile_static(kobj_class_t cls, kobj_ops_t ops) { @@ -254,24 +259,6 @@ kobj_class_free(kobj_class_t cls) free(ops, M_KOBJ); } -kobj_t -kobj_create(kobj_class_t cls, - struct malloc_type *mtype, - int mflags) -{ - kobj_t obj; - - /* - * Allocate and initialise the new object. - */ - obj = malloc(cls->size, mtype, mflags | M_ZERO); - if (!obj) - return NULL; - kobj_init(obj, cls); - - return obj; -} - static void kobj_init_common(kobj_t obj, kobj_class_t cls) { @@ -280,30 +267,52 @@ kobj_init_common(kobj_t obj, kobj_class_t cls) cls->refs++; } -void -kobj_init(kobj_t obj, kobj_class_t cls) +static int +kobj_init1(kobj_t obj, kobj_class_t cls, int mflags) { - KOBJ_ASSERT(MA_NOTOWNED); - retry: - KOBJ_LOCK(); + int error; - /* - * Consider compiling the class' method table. - */ - if (!cls->ops) { + KOBJ_LOCK(); + while (cls->ops == NULL) { /* * kobj_class_compile doesn't want the lock held * because of the call to malloc - we drop the lock * and re-try. */ KOBJ_UNLOCK(); - kobj_class_compile(cls); - goto retry; + error = kobj_class_compile1(cls, mflags); + if (error != 0) + return (error); + KOBJ_LOCK(); } - kobj_init_common(obj, cls); - KOBJ_UNLOCK(); + return (0); +} + +kobj_t +kobj_create(kobj_class_t cls, struct malloc_type *mtype, int mflags) +{ + kobj_t obj; + + obj = malloc(cls->size, mtype, mflags | M_ZERO); + if (obj == NULL) + return (NULL); + if (kobj_init1(obj, cls, mflags) != 0) { + free(obj, mtype); + return (NULL); + } + return (obj); +} + +void +kobj_init(kobj_t obj, kobj_class_t cls) +{ + int error; + + error = kobj_init1(obj, cls, M_NOWAIT); + if (error != 0) + panic("kobj_init1 failed: error %d", error); } void From owner-svn-src-stable@freebsd.org Sat Feb 9 02:09:30 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64AEF14D2019; Sat, 9 Feb 2019 02:09:30 +0000 (UTC) (envelope-from mav@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) server-signature RSA-PSS (4096 bits) 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 036467749E; Sat, 9 Feb 2019 02:09:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E588B21E8C; Sat, 9 Feb 2019 02:09:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1929ThV089093; Sat, 9 Feb 2019 02:09:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1929Tfn089092; Sat, 9 Feb 2019 02:09:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201902090209.x1929Tfn089092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Feb 2019 02:09: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: r343925 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 343925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 036467749E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 02:09:30 -0000 Author: mav Date: Sat Feb 9 02:09:29 2019 New Revision: 343925 URL: https://svnweb.freebsd.org/changeset/base/343925 Log: MFC r343673: Fix integer math overflow in UMA hash_alloc(). 512GB of ZFS ABD ARC means abd_chunk zone of 128M 4KB items. To manage them UMA tries to allocate 2GB hash table, which size does not fit into the int variable, causing later allocation failure, which makes ARC shrink back below the 512GB, not letting it to use more RAM. With this change I easily reached >700GB ARC size on 768GB RAM machine. Sponsored by: iXsystems, Inc. Modified: stable/12/sys/vm/uma_core.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/uma_core.c ============================================================================== --- stable/12/sys/vm/uma_core.c Sat Feb 9 02:04:27 2019 (r343924) +++ stable/12/sys/vm/uma_core.c Sat Feb 9 02:09:29 2019 (r343925) @@ -631,7 +631,7 @@ static int hash_alloc(struct uma_hash *hash) { int oldsize; - int alloc; + size_t alloc; oldsize = hash->uh_hashsize; From owner-svn-src-stable@freebsd.org Sat Feb 9 02:10:04 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C21E414D2064; Sat, 9 Feb 2019 02:10:04 +0000 (UTC) (envelope-from mav@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) server-signature RSA-PSS (4096 bits) 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 655B4775B9; Sat, 9 Feb 2019 02:10:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58EB121E90; Sat, 9 Feb 2019 02:10:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x192A4p5089211; Sat, 9 Feb 2019 02:10:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x192A4Ea089210; Sat, 9 Feb 2019 02:10:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201902090210.x192A4Ea089210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Feb 2019 02:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343926 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 343926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 655B4775B9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 02:10:04 -0000 Author: mav Date: Sat Feb 9 02:10:03 2019 New Revision: 343926 URL: https://svnweb.freebsd.org/changeset/base/343926 Log: MFC r343673: Fix integer math overflow in UMA hash_alloc(). 512GB of ZFS ABD ARC means abd_chunk zone of 128M 4KB items. To manage them UMA tries to allocate 2GB hash table, which size does not fit into the int variable, causing later allocation failure, which makes ARC shrink back below the 512GB, not letting it to use more RAM. With this change I easily reached >700GB ARC size on 768GB RAM machine. Sponsored by: iXsystems, Inc. Modified: stable/11/sys/vm/uma_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/uma_core.c ============================================================================== --- stable/11/sys/vm/uma_core.c Sat Feb 9 02:09:29 2019 (r343925) +++ stable/11/sys/vm/uma_core.c Sat Feb 9 02:10:03 2019 (r343926) @@ -538,7 +538,7 @@ static int hash_alloc(struct uma_hash *hash) { int oldsize; - int alloc; + size_t alloc; oldsize = hash->uh_hashsize; From owner-svn-src-stable@freebsd.org Sat Feb 9 11:05:04 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BB5214DDEAC; Sat, 9 Feb 2019 11:05:04 +0000 (UTC) (envelope-from ae@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) server-signature RSA-PSS (4096 bits) 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 F19958DFED; Sat, 9 Feb 2019 11:05:03 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E38A227C3C; Sat, 9 Feb 2019 11:05:03 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19B53PG070108; Sat, 9 Feb 2019 11:05:03 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19B533o070104; Sat, 9 Feb 2019 11:05:03 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201902091105.x19B533o070104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 9 Feb 2019 11:05: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: r343931 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 343931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F19958DFED X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 11:05:04 -0000 Author: ae Date: Sat Feb 9 11:05:03 2019 New Revision: 343931 URL: https://svnweb.freebsd.org/changeset/base/343931 Log: MFC r342908: Reduce the size of struct ip_fw_args from 240 to 128 bytes on amd64. And refactor the code to avoid unneeded initialization to reduce overhead of per-packet processing. ipfw(4) can be invoked by pfil(9) framework for each packet several times. Each call uses on-stack variable of type struct ip_fw_args to keep the state of ipfw(4) processing. Currently this variable has 240 bytes size on amd64. Each time ipfw(4) does bzero() on it, and then it initializes some fields. glebius@ has reported that they at Netflix discovered, that initialization of this variable produces significant overhead on packet processing. After patching I managed to increase performance of packet processing on simple routing with ipfw(4) firewalling to about 11% from 9.8Mpps up to 11Mpps (Xeon E5-2660 v4@ + Mellanox 100G card). Introduced new field flags, it is used to keep track of what fields was initialized. Some fields were moved into the anonymous union, to reduce the size. They all are mutually exclusive. dummypar field was unused, and therefore it is removed. The hopstore6 field type was changed from sockaddr_in6 to a bit smaller struct ip_fw_nh6. And now the size of struct ip_fw_args is 128 bytes. ipfw_chk() was modified to properly handle ip_fw_args.flags instead of rely on checking for NULL pointers. Reviewed by: gallatin Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D18690 MFC r342909: Fix the build with INVARIANTS. MFC r343551: Fix the bug introduced in r342908, that causes problems with dynamic handling for protocols without ports numbers. Since port numbers were uninitialized for protocols like ICMP/ICMPv6, ipfw_chk() used some non-zero values to create dynamic states, and due this it failed to match replies with created states. Reported by: Oliver Hartmann, Boris Lytochkin Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c stable/12/sys/netpfil/ipfw/ip_fw_log.c stable/12/sys/netpfil/ipfw/ip_fw_pfil.c stable/12/sys/netpfil/ipfw/ip_fw_private.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw2.c Sat Feb 9 04:36:02 2019 (r343930) +++ stable/12/sys/netpfil/ipfw/ip_fw2.c Sat Feb 9 11:05:03 2019 (r343931) @@ -1191,6 +1191,7 @@ set_match(struct ip_fw_args *args, int slot, args->rule.slot = slot + 1; /* we use 0 as a marker */ args->rule.rule_id = 1 + chain->map[slot]->id; args->rule.rulenum = chain->map[slot]->rulenum; + args->flags |= IPFW_ARGS_REF; } #ifndef LINEAR_SKIPTO @@ -1376,17 +1377,12 @@ ipfw_chk(struct ip_fw_args *args) * Only valid for IPv4 packets. */ uint8_t proto; - uint16_t src_port = 0, dst_port = 0; /* NOTE: host format */ + uint16_t src_port, dst_port; /* NOTE: host format */ struct in_addr src_ip, dst_ip; /* NOTE: network format */ int iplen = 0; int pktlen; - uint16_t etype = 0; /* Host order stored ether type */ + uint16_t etype; /* Host order stored ether type */ - /* - * dyn_dir = MATCH_UNKNOWN when rules unchecked, - * MATCH_NONE when checked and not matched (q = NULL), - * MATCH_FORWARD or MATCH_REVERSE otherwise (q != NULL) - */ struct ipfw_dyn_info dyn_info; struct ip_fw *q = NULL; struct ip_fw_chain *chain = &V_layer3_chain; @@ -1414,10 +1410,8 @@ ipfw_chk(struct ip_fw_args *args) dst_ip.s_addr = 0; /* make sure it is initialized */ src_ip.s_addr = 0; /* make sure it is initialized */ + src_port = dst_port = 0; pktlen = m->m_pkthdr.len; - args->f_id.fib = M_GETFIB(m); /* note mbuf not altered) */ - proto = args->f_id.proto = 0; /* mark f_id invalid */ - /* XXX 0 is a valid proto: IP/IPv6 Hop-by-Hop Option */ DYN_INFO_INIT(&dyn_info); /* @@ -1441,18 +1435,19 @@ do { \ /* * if we have an ether header, */ - if (args->eh) + if (args->flags & IPFW_ARGS_ETHER) etype = ntohs(args->eh->ether_type); + else + etype = 0; /* Identify IP packets and fill up variables. */ if (pktlen >= sizeof(struct ip6_hdr) && - (args->eh == NULL || etype == ETHERTYPE_IPV6) && ip->ip_v == 6) { + (etype == 0 || etype == ETHERTYPE_IPV6) && ip->ip_v == 6) { struct ip6_hdr *ip6 = (struct ip6_hdr *)ip; + is_ipv6 = 1; - args->f_id.addr_type = 6; hlen = sizeof(struct ip6_hdr); proto = ip6->ip6_nxt; - /* Search extension headers to find upper layer protocols */ while (ulp == NULL && offset == 0) { switch (proto) { @@ -1625,20 +1620,18 @@ do { \ } ip = mtod(m, struct ip *); ip6 = (struct ip6_hdr *)ip; + args->f_id.addr_type = 6; args->f_id.src_ip6 = ip6->ip6_src; args->f_id.dst_ip6 = ip6->ip6_dst; - args->f_id.src_ip = 0; - args->f_id.dst_ip = 0; args->f_id.flow_id6 = ntohl(ip6->ip6_flow); iplen = ntohs(ip6->ip6_plen) + sizeof(*ip6); } else if (pktlen >= sizeof(struct ip) && - (args->eh == NULL || etype == ETHERTYPE_IP) && ip->ip_v == 4) { - is_ipv4 = 1; + (etype == 0 || etype == ETHERTYPE_IP) && ip->ip_v == 4) { + is_ipv4 = 1; hlen = ip->ip_hl << 2; - args->f_id.addr_type = 4; - /* - * Collect parameters into local variables for faster matching. + * Collect parameters into local variables for faster + * matching. */ proto = ip->ip_p; src_ip = ip->ip_src; @@ -1691,23 +1684,30 @@ do { \ } ip = mtod(m, struct ip *); + args->f_id.addr_type = 4; args->f_id.src_ip = ntohl(src_ip.s_addr); args->f_id.dst_ip = ntohl(dst_ip.s_addr); + } else { + proto = 0; + dst_ip.s_addr = src_ip.s_addr = 0; + + args->f_id.addr_type = 1; /* XXX */ } #undef PULLUP_TO pktlen = iplen < pktlen ? iplen: pktlen; - if (proto) { /* we may have port numbers, store them */ - args->f_id.proto = proto; - args->f_id.src_port = src_port = ntohs(src_port); - args->f_id.dst_port = dst_port = ntohs(dst_port); - } + /* Properly initialize the rest of f_id */ + args->f_id.proto = proto; + args->f_id.src_port = src_port = ntohs(src_port); + args->f_id.dst_port = dst_port = ntohs(dst_port); + args->f_id.fib = M_GETFIB(m); + IPFW_PF_RLOCK(chain); if (! V_ipfw_vnet_ready) { /* shutting down, leave NOW. */ IPFW_PF_RUNLOCK(chain); return (IP_FW_PASS); /* accept */ } - if (args->rule.slot) { + if (args->flags & IPFW_ARGS_REF) { /* * Packet has already been tagged as a result of a previous * match on rule args->rule aka args->rule_id (PIPE, QUEUE, @@ -1835,7 +1835,7 @@ do { \ break; case O_MACADDR2: - if (args->eh != NULL) { /* have MAC header */ + if (args->flags & IPFW_ARGS_ETHER) { u_int32_t *want = (u_int32_t *) ((ipfw_insn_mac *)cmd)->addr; u_int32_t *mask = (u_int32_t *) @@ -1850,7 +1850,7 @@ do { \ break; case O_MAC_TYPE: - if (args->eh != NULL) { + if (args->flags & IPFW_ARGS_ETHER) { u_int16_t *p = ((ipfw_insn_u16 *)cmd)->ports; int i; @@ -1871,19 +1871,21 @@ do { \ break; case O_LAYER2: - match = (args->eh != NULL); + match = (args->flags & IPFW_ARGS_ETHER); break; case O_DIVERTED: - { - /* For diverted packets, args->rule.info + if ((args->flags & IPFW_ARGS_REF) == 0) + break; + /* + * For diverted packets, args->rule.info * contains the divert port (in host format) * reason and direction. */ - uint32_t i = args->rule.info; - match = (i&IPFW_IS_MASK) == IPFW_IS_DIVERT && - cmd->arg1 & ((i & IPFW_INFO_IN) ? 1 : 2); - } + match = ((args->rule.info & IPFW_IS_MASK) == + IPFW_IS_DIVERT) && ( + ((args->rule.info & IPFW_INFO_IN) ? + 1: 2) & cmd->arg1); break; case O_PROTO: @@ -2055,7 +2057,8 @@ do { \ #ifdef INET6 /* FALLTHROUGH */ case O_IP6_SRC_ME: - match= is_ipv6 && ipfw_localip6(&args->f_id.src_ip6); + match = is_ipv6 && + ipfw_localip6(&args->f_id.src_ip6); #endif break; @@ -2091,7 +2094,8 @@ do { \ #ifdef INET6 /* FALLTHROUGH */ case O_IP6_DST_ME: - match= is_ipv6 && ipfw_localip6(&args->f_id.dst_ip6); + match = is_ipv6 && + ipfw_localip6(&args->f_id.dst_ip6); #endif break; @@ -2689,8 +2693,8 @@ do { \ case O_DIVERT: case O_TEE: - if (args->eh) /* not on layer 2 */ - break; + if (args->flags & IPFW_ARGS_ETHER) + break; /* not on layer 2 */ /* otherwise this is terminal */ l = 0; /* exit inner loop */ done = 1; /* exit outer loop */ @@ -2866,8 +2870,8 @@ do { \ break; case O_FORWARD_IP: - if (args->eh) /* not valid on layer2 pkts */ - break; + if (args->flags & IPFW_ARGS_ETHER) + break; /* not valid on layer2 pkts */ if (q != f || dyn_info.direction == MATCH_FORWARD) { struct sockaddr_in *sa; @@ -2884,32 +2888,22 @@ do { \ * table_value as next_hop6 address. */ if (is_ipv6) { - struct sockaddr_in6 *sa6; + struct ip_fw_nh6 *nh6; - sa6 = args->next_hop6 = - &args->hopstore6; - sa6->sin6_family = AF_INET6; - sa6->sin6_len = sizeof(*sa6); - sa6->sin6_addr = TARG_VAL( + args->flags |= IPFW_ARGS_NH6; + nh6 = &args->hopstore6; + nh6->sin6_addr = TARG_VAL( chain, tablearg, nh6); - sa6->sin6_port = sa->sin_port; - /* - * Set sin6_scope_id only for - * link-local unicast addresses. - */ - if (IN6_IS_ADDR_LINKLOCAL( - &sa6->sin6_addr)) - sa6->sin6_scope_id = - TARG_VAL(chain, - tablearg, - zoneid); + nh6->sin6_port = sa->sin_port; + nh6->sin6_scope_id = TARG_VAL( + chain, tablearg, zoneid); } else #endif { + args->flags |= IPFW_ARGS_NH4; args->hopstore.sin_port = sa->sin_port; - sa = args->next_hop = - &args->hopstore; + sa = &args->hopstore; sa->sin_family = AF_INET; sa->sin_len = sizeof(*sa); sa->sin_addr.s_addr = htonl( @@ -2917,7 +2911,8 @@ do { \ nh4)); } } else { - args->next_hop = sa; + args->flags |= IPFW_ARGS_NH4PTR; + args->next_hop = sa; } } retval = IP_FW_PASS; @@ -2927,13 +2922,14 @@ do { \ #ifdef INET6 case O_FORWARD_IP6: - if (args->eh) /* not valid on layer2 pkts */ - break; + if (args->flags & IPFW_ARGS_ETHER) + break; /* not valid on layer2 pkts */ if (q != f || dyn_info.direction == MATCH_FORWARD) { struct sockaddr_in6 *sin6; sin6 = &(((ipfw_insn_sa6 *)cmd)->sa); + args->flags |= IPFW_ARGS_NH6PTR; args->next_hop6 = sin6; } retval = IP_FW_PASS; @@ -2962,7 +2958,7 @@ do { \ if (fib >= rt_numfibs) fib = 0; M_SETFIB(m, fib); - args->f_id.fib = fib; + args->f_id.fib = fib; /* XXX */ l = 0; /* exit inner loop */ break; } @@ -3009,6 +3005,7 @@ do { \ struct cfg_nat *t; int nat_id; + args->rule.info = 0; set_match(args, f_pos, chain); /* Check if this is 'global' nat rule */ if (cmd->arg1 == IP_FW_NAT44_GLOBAL) { @@ -3061,6 +3058,7 @@ do { \ else ip->ip_sum = in_cksum(m, hlen); retval = IP_FW_REASS; + args->rule.info = 0; set_match(args, f_pos, chain); } done = 1; /* exit outer loop */ Modified: stable/12/sys/netpfil/ipfw/ip_fw_log.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw_log.c Sat Feb 9 04:36:02 2019 (r343930) +++ stable/12/sys/netpfil/ipfw/ip_fw_log.c Sat Feb 9 11:05:03 2019 (r343931) @@ -107,7 +107,7 @@ ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u char action2[92], proto[128], fragment[32]; if (V_fw_verbose == 0) { - if (args->eh) /* layer2, use orig hdr */ + if (args->flags & IPFW_ARGS_ETHER) /* layer2, use orig hdr */ ipfw_bpf_mtap2(args->eh, ETHER_HDR_LEN, m); else { /* Add fake header. Later we will store Modified: stable/12/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw_pfil.c Sat Feb 9 04:36:02 2019 (r343930) +++ stable/12/sys/netpfil/ipfw/ip_fw_pfil.c Sat Feb 9 11:05:03 2019 (r343931) @@ -126,13 +126,11 @@ ipfw_check_packet(void *arg, struct mbuf **m0, struct { struct ip_fw_args args; struct m_tag *tag; - int ipfw; - int ret; + int ipfw, ret; /* convert dir to IPFW values */ dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; - bzero(&args, sizeof(args)); - + args.flags = 0; again: /* * extract and remove the tag if present. If we are left @@ -144,6 +142,7 @@ again: m_tag_delete(*m0, tag); if (args.rule.info & IPFW_ONEPASS) return (0); + args.flags |= IPFW_ARGS_REF; } args.m = *m0; @@ -157,53 +156,82 @@ again: __func__)); /* breaking out of the switch means drop */ - ret = 0; /* default return value for pass */ switch (ipfw) { case IP_FW_PASS: /* next_hop may be set by ipfw_chk */ - if (args.next_hop == NULL && args.next_hop6 == NULL) - break; /* pass */ + if ((args.flags & (IPFW_ARGS_NH4 | IPFW_ARGS_NH4PTR | + IPFW_ARGS_NH6 | IPFW_ARGS_NH6PTR)) == 0) { + ret = 0; + break; + } #if (!defined(INET6) && !defined(INET)) ret = EACCES; #else { - struct m_tag *fwd_tag; + void *psa; size_t len; - - KASSERT(args.next_hop == NULL || args.next_hop6 == NULL, - ("%s: both next_hop=%p and next_hop6=%p not NULL", __func__, - args.next_hop, args.next_hop6)); -#ifdef INET6 - if (args.next_hop6 != NULL) - len = sizeof(struct sockaddr_in6); -#endif #ifdef INET - if (args.next_hop != NULL) + if (args.flags & (IPFW_ARGS_NH4 | IPFW_ARGS_NH4PTR)) { + MPASS((args.flags & (IPFW_ARGS_NH4 | + IPFW_ARGS_NH4PTR)) != (IPFW_ARGS_NH4 | + IPFW_ARGS_NH4PTR)); + MPASS((args.flags & (IPFW_ARGS_NH6 | + IPFW_ARGS_NH6PTR)) == 0); len = sizeof(struct sockaddr_in); -#endif - - /* Incoming packets should not be tagged so we do not + psa = (args.flags & IPFW_ARGS_NH4) ? + &args.hopstore : args.next_hop; + if (in_localip(satosin(psa)->sin_addr)) + (*m0)->m_flags |= M_FASTFWD_OURS; + (*m0)->m_flags |= M_IP_NEXTHOP; + } +#endif /* INET */ +#ifdef INET6 + if (args.flags & (IPFW_ARGS_NH6 | IPFW_ARGS_NH6PTR)) { + MPASS((args.flags & (IPFW_ARGS_NH6 | + IPFW_ARGS_NH6PTR)) != (IPFW_ARGS_NH6 | + IPFW_ARGS_NH6PTR)); + MPASS((args.flags & (IPFW_ARGS_NH4 | + IPFW_ARGS_NH4PTR)) == 0); + len = sizeof(struct sockaddr_in6); + psa = args.next_hop6; + (*m0)->m_flags |= M_IP6_NEXTHOP; + } +#endif /* INET6 */ + /* + * Incoming packets should not be tagged so we do not * m_tag_find. Outgoing packets may be tagged, so we * reuse the tag if present. */ - fwd_tag = (dir == DIR_IN) ? NULL : + tag = (dir == DIR_IN) ? NULL : m_tag_find(*m0, PACKET_TAG_IPFORWARD, NULL); - if (fwd_tag != NULL) { - m_tag_unlink(*m0, fwd_tag); + if (tag != NULL) { + m_tag_unlink(*m0, tag); } else { - fwd_tag = m_tag_get(PACKET_TAG_IPFORWARD, len, + tag = m_tag_get(PACKET_TAG_IPFORWARD, len, M_NOWAIT); - if (fwd_tag == NULL) { + if (tag == NULL) { ret = EACCES; break; /* i.e. drop */ } } + if ((args.flags & IPFW_ARGS_NH6) == 0) + bcopy(psa, tag + 1, len); + m_tag_prepend(*m0, tag); + ret = 0; #ifdef INET6 - if (args.next_hop6 != NULL) { + /* IPv6 next hop needs additional handling */ + if (args.flags & (IPFW_ARGS_NH6 | IPFW_ARGS_NH6PTR)) { struct sockaddr_in6 *sa6; - sa6 = (struct sockaddr_in6 *)(fwd_tag + 1); - bcopy(args.next_hop6, sa6, len); + sa6 = satosin6(tag + 1); + if (args.flags & IPFW_ARGS_NH6) { + sa6->sin6_family = AF_INET6; + sa6->sin6_len = sizeof(*sa6); + sa6->sin6_addr = args.hopstore6.sin6_addr; + sa6->sin6_port = args.hopstore6.sin6_port; + sa6->sin6_scope_id = + args.hopstore6.sin6_scope_id; + } /* * If nh6 address is link-local we should convert * it to kernel internal form before doing any @@ -215,18 +243,8 @@ again: } if (in6_localip(&sa6->sin6_addr)) (*m0)->m_flags |= M_FASTFWD_OURS; - (*m0)->m_flags |= M_IP6_NEXTHOP; } -#endif -#ifdef INET - if (args.next_hop != NULL) { - bcopy(args.next_hop, (fwd_tag+1), len); - if (in_localip(args.next_hop->sin_addr)) - (*m0)->m_flags |= M_FASTFWD_OURS; - (*m0)->m_flags |= M_IP_NEXTHOP; - } -#endif - m_tag_prepend(*m0, fwd_tag); +#endif /* INET6 */ } #endif /* INET || INET6 */ break; @@ -239,6 +257,7 @@ again: ret = EACCES; if (ip_dn_io_ptr == NULL) break; /* i.e. drop */ + MPASS(args.flags & IPFW_ARGS_REF); if (mtod(*m0, struct ip *)->ip_v == 4) ret = ip_dn_io_ptr(m0, dir, &args); else if (mtod(*m0, struct ip *)->ip_v == 6) @@ -262,6 +281,7 @@ again: ret = EACCES; break; /* i.e. drop */ } + MPASS(args.flags & IPFW_ARGS_REF); ret = ipfw_divert(m0, dir, &args.rule, (ipfw == IP_FW_TEE) ? 1 : 0); /* continue processing for the original packet (tee). */ @@ -275,6 +295,7 @@ again: ret = EACCES; break; /* i.e. drop */ } + MPASS(args.flags & IPFW_ARGS_REF); ret = ng_ipfw_input_p(m0, dir, &args, (ipfw == IP_FW_NGTEE) ? 1 : 0); if (ipfw == IP_FW_NGTEE) /* ignore errors for NGTEE */ @@ -283,13 +304,15 @@ again: case IP_FW_NAT: /* honor one-pass in case of successful nat */ - if (V_fw_one_pass) - break; /* ret is already 0 */ + if (V_fw_one_pass) { + ret = 0; + break; + } goto again; case IP_FW_REASS: goto again; /* continue with packet */ - + default: KASSERT(0, ("%s: unknown retval", __func__)); } @@ -300,7 +323,7 @@ again: *m0 = NULL; } - return ret; + return (ret); } /* @@ -310,15 +333,14 @@ int ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, struct inpcb *inp) { - struct ether_header *eh; + struct ip_fw_args args; struct ether_header save_eh; + struct ether_header *eh; + struct m_tag *mtag; struct mbuf *m; int i, ret; - struct ip_fw_args args; - struct m_tag *mtag; - bzero(&args, sizeof(args)); - + args.flags = IPFW_ARGS_ETHER; again: /* fetch start point from rule, if any. remove the tag if present. */ mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); @@ -327,6 +349,7 @@ again: m_tag_delete(*m0, mtag); if (args.rule.info & IPFW_ONEPASS) return (0); + args.flags |= IPFW_ARGS_REF; } /* I need some amt of data to be contiguous */ @@ -345,10 +368,8 @@ again: args.m = m; /* the packet we are looking at */ args.oif = dir == PFIL_OUT ? ifp: NULL; /* destination, if any */ - args.next_hop = NULL; /* we do not support forward yet */ - args.next_hop6 = NULL; /* we do not support forward yet */ args.eh = &save_eh; /* MAC header for bridged/MAC packets */ - args.inp = NULL; /* used by ipfw uid/gid/jail rules */ + args.inp = inp; /* used by ipfw uid/gid/jail rules */ i = ipfw_chk(&args); m = args.m; if (m != NULL) { @@ -379,14 +400,14 @@ again: case IP_FW_DUMMYNET: ret = EACCES; - int dir2; if (ip_dn_io_ptr == NULL) break; /* i.e. drop */ *m0 = NULL; - dir2 = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; - ip_dn_io_ptr(&m, dir2 | PROTO_LAYER2, &args); + dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; + MPASS(args.flags & IPFW_ARGS_REF); + ip_dn_io_ptr(&m, dir | PROTO_LAYER2, &args); return 0; case IP_FW_NGTEE: @@ -395,6 +416,7 @@ again: ret = EACCES; break; /* i.e. drop */ } + MPASS(args.flags & IPFW_ARGS_REF); ret = ng_ipfw_input_p(m0, (dir == PFIL_IN) ? DIR_IN : DIR_OUT, &args, (i == IP_FW_NGTEE) ? 1 : 0); if (i == IP_FW_NGTEE) /* ignore errors for NGTEE */ @@ -411,7 +433,7 @@ again: *m0 = NULL; } - return ret; + return (ret); } /* do the divert, return 1 on error 0 on success */ Modified: stable/12/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw_private.h Sat Feb 9 04:36:02 2019 (r343930) +++ stable/12/sys/netpfil/ipfw/ip_fw_private.h Sat Feb 9 11:05:03 2019 (r343931) @@ -83,11 +83,13 @@ struct _ip6dn_args { * efficient to pass variables around and extend the interface. */ struct ip_fw_args { - struct mbuf *m; /* the mbuf chain */ - struct ifnet *oif; /* output interface */ - struct sockaddr_in *next_hop; /* forward address */ - struct sockaddr_in6 *next_hop6; /* ipv6 forward address */ - + uint32_t flags; +#define IPFW_ARGS_ETHER 0x0001 /* has valid ethernet header */ +#define IPFW_ARGS_NH4 0x0002 /* has IPv4 next hop in hopstore */ +#define IPFW_ARGS_NH6 0x0004 /* has IPv6 next hop in hopstore */ +#define IPFW_ARGS_NH4PTR 0x0008 /* has IPv4 next hop in next_hop */ +#define IPFW_ARGS_NH6PTR 0x0010 /* has IPv6 next hop in next_hop6 */ +#define IPFW_ARGS_REF 0x0020 /* has valid ipfw_rule_ref */ /* * On return, it points to the matching rule. * On entry, rule.slot > 0 means the info is valid and @@ -95,19 +97,33 @@ struct ip_fw_args { * If chain_id == chain->id && slot >0 then jump to that slot. * Otherwise, we locate the first rule >= rulenum:rule_id */ - struct ipfw_rule_ref rule; /* match/restart info */ + struct ipfw_rule_ref rule; /* match/restart info */ - struct ether_header *eh; /* for bridged packets */ - - struct ipfw_flow_id f_id; /* grabbed from IP header */ - //uint32_t cookie; /* a cookie depending on rule action */ - struct inpcb *inp; - - struct _ip6dn_args dummypar; /* dummynet->ip6_output */ - union { /* store here if cannot use a pointer */ - struct sockaddr_in hopstore; - struct sockaddr_in6 hopstore6; + struct ifnet *oif; /* output interface */ + struct inpcb *inp; + union { + /* + * We don't support forwarding on layer2, thus we can + * keep eh pointer in this union. + * next_hop[6] pointers can be used to point to next hop + * stored in rule's opcode to avoid copying into hopstore. + * Also, it is expected that all 0x1-0x10 flags are mutually + * exclusive. + */ + struct ether_header *eh; /* for bridged packets */ + struct sockaddr_in *next_hop; + struct sockaddr_in6 *next_hop6; + /* ipfw next hop storage */ + struct sockaddr_in hopstore; + struct ip_fw_nh6 { + struct in6_addr sin6_addr; + uint32_t sin6_scope_id; + uint16_t sin6_port; + } hopstore6; }; + + struct mbuf *m; /* the mbuf chain */ + struct ipfw_flow_id f_id; /* grabbed from IP header */ }; MALLOC_DECLARE(M_IPFW); From owner-svn-src-stable@freebsd.org Sat Feb 9 11:49:09 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BF4614DF152; Sat, 9 Feb 2019 11:49:09 +0000 (UTC) (envelope-from marius@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) server-signature RSA-PSS (4096 bits) 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 A22428F1B4; Sat, 9 Feb 2019 11:49:08 +0000 (UTC) (envelope-from marius@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 6FCB434D; Sat, 9 Feb 2019 11:49:08 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19Bn8l4091194; Sat, 9 Feb 2019 11:49:08 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19Bn8Lb091193; Sat, 9 Feb 2019 11:49:08 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201902091149.x19Bn8Lb091193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 9 Feb 2019 11:49:08 +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: r343932 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 343932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A22428F1B4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 11:49:09 -0000 Author: marius Date: Sat Feb 9 11:49:07 2019 New Revision: 343932 URL: https://svnweb.freebsd.org/changeset/base/343932 Log: MFC: r343288 Fix various resource leaks that can occur in the error paths of iflib_device_register() and iflib_pseudo_register(). Reviewed by: shurd Differential Revision: https://reviews.freebsd.org/D18760 Modified: stable/12/sys/net/iflib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Sat Feb 9 11:05:03 2019 (r343931) +++ stable/12/sys/net/iflib.c Sat Feb 9 11:49:07 2019 (r343932) @@ -4369,11 +4369,8 @@ iflib_device_register(device_t dev, void *sc, if_share ctx->ifc_softc = sc; if ((err = iflib_register(ctx)) != 0) { - if (ctx->ifc_flags & IFC_SC_ALLOCATED) - free(sc, M_IFLIB); - free(ctx, M_IFLIB); device_printf(dev, "iflib_register failed %d\n", err); - return (err); + goto fail_ctx_free; } iflib_add_device_sysctl_pre(ctx); @@ -4383,9 +4380,8 @@ iflib_device_register(device_t dev, void *sc, if_share iflib_reset_qvalues(ctx); CTX_LOCK(ctx); if ((err = IFDI_ATTACH_PRE(ctx)) != 0) { - CTX_UNLOCK(ctx); device_printf(dev, "IFDI_ATTACH_PRE failed %d\n", err); - return (err); + goto fail_unlock; } _iflib_pre_assert(scctx); ctx->ifc_txrx = *scctx->isc_txrx; @@ -4415,7 +4411,7 @@ iflib_device_register(device_t dev, void *sc, if_share /* round down instead? */ device_printf(dev, "# rx descriptors must be a power of 2\n"); err = EINVAL; - goto fail; + goto fail_iflib_detach; } } for (i = 0; i < sctx->isc_ntxqs; i++) { @@ -4423,7 +4419,7 @@ iflib_device_register(device_t dev, void *sc, if_share device_printf(dev, "# tx descriptors must be a power of 2"); err = EINVAL; - goto fail; + goto fail_iflib_detach; } } @@ -4492,7 +4488,7 @@ iflib_device_register(device_t dev, void *sc, if_share /* Get memory for the station queues */ if ((err = iflib_queues_alloc(ctx))) { device_printf(dev, "Unable to allocate queue memory\n"); - goto fail; + goto fail_intr_free; } if ((err = iflib_qset_structures_setup(ctx))) @@ -4511,7 +4507,7 @@ iflib_device_register(device_t dev, void *sc, if_share IFDI_INTR_DISABLE(ctx); if (msix > 1 && (err = IFDI_MSIX_INTR_ASSIGN(ctx, msix)) != 0) { device_printf(dev, "IFDI_MSIX_INTR_ASSIGN failed %d\n", err); - goto fail_intr_free; + goto fail_queues; } if (msix <= 1) { rid = 0; @@ -4521,7 +4517,7 @@ iflib_device_register(device_t dev, void *sc, if_share } if ((err = iflib_legacy_setup(ctx, ctx->isc_legacy_intr, ctx->ifc_softc, &rid, "irq0")) != 0) { device_printf(dev, "iflib_legacy_setup failed %d\n", err); - goto fail_intr_free; + goto fail_queues; } } @@ -4557,14 +4553,18 @@ iflib_device_register(device_t dev, void *sc, if_share fail_detach: ether_ifdetach(ctx->ifc_ifp); fail_intr_free: + iflib_free_intr_mem(ctx); fail_queues: iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); -fail: - iflib_free_intr_mem(ctx); +fail_iflib_detach: IFDI_DETACH(ctx); +fail_unlock: CTX_UNLOCK(ctx); - +fail_ctx_free: + if (ctx->ifc_flags & IFC_SC_ALLOCATED) + free(ctx->ifc_softc, M_IFLIB); + free(ctx, M_IFLIB); return (err); } @@ -4593,9 +4593,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc if ((err = iflib_register(ctx)) != 0) { device_printf(dev, "%s: iflib_register failed %d\n", __func__, err); - free(sc, M_IFLIB); - free(ctx, M_IFLIB); - return (err); + goto fail_ctx_free; } iflib_add_device_sysctl_pre(ctx); @@ -4609,14 +4607,14 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc if ((err = IFDI_ATTACH_PRE(ctx)) != 0) { device_printf(dev, "IFDI_ATTACH_PRE failed %d\n", err); - return (err); + goto fail_ctx_free; } if (sctx->isc_flags & IFLIB_GEN_MAC) iflib_gen_mac(ctx); if ((err = IFDI_CLONEATTACH(ctx, clctx->cc_ifc, clctx->cc_name, clctx->cc_params)) != 0) { device_printf(dev, "IFDI_CLONEATTACH failed %d\n", err); - return (err); + goto fail_ctx_free; } ifmedia_add(&ctx->ifc_media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); ifmedia_add(&ctx->ifc_media, IFM_ETHER | IFM_AUTO, 0, NULL); @@ -4674,7 +4672,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc /* round down instead? */ device_printf(dev, "# rx descriptors must be a power of 2\n"); err = EINVAL; - goto fail; + goto fail_iflib_detach; } } for (i = 0; i < sctx->isc_ntxqs; i++) { @@ -4682,7 +4680,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc device_printf(dev, "# tx descriptors must be a power of 2"); err = EINVAL; - goto fail; + goto fail_iflib_detach; } } @@ -4728,7 +4726,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc /* Get memory for the station queues */ if ((err = iflib_queues_alloc(ctx))) { device_printf(dev, "Unable to allocate queue memory\n"); - goto fail; + goto fail_iflib_detach; } if ((err = iflib_qset_structures_setup(ctx))) { @@ -4768,8 +4766,11 @@ fail_detach: fail_queues: iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); -fail: +fail_iflib_detach: IFDI_DETACH(ctx); +fail_ctx_free: + free(ctx->ifc_softc, M_IFLIB); + free(ctx, M_IFLIB); return (err); } From owner-svn-src-stable@freebsd.org Sat Feb 9 11:52:00 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EFF614DF366; Sat, 9 Feb 2019 11:52:00 +0000 (UTC) (envelope-from marius@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) server-signature RSA-PSS (4096 bits) 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 4F0628F519; Sat, 9 Feb 2019 11:52:00 +0000 (UTC) (envelope-from marius@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 412A04CB; Sat, 9 Feb 2019 11:52:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19Bq0NB095061; Sat, 9 Feb 2019 11:52:00 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19Bq00P095060; Sat, 9 Feb 2019 11:52:00 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201902091152.x19Bq00P095060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 9 Feb 2019 11:52:00 +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: r343933 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 343933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F0628F519 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 11:52:00 -0000 Author: marius Date: Sat Feb 9 11:51:59 2019 New Revision: 343933 URL: https://svnweb.freebsd.org/changeset/base/343933 Log: MFC: r343753 o As illustrated by e. g. figure 7-14 of the Intel 82599 10 GbE controller datasheet revision 3.3, in the context of Ethernet MACs the control data describing the packet buffers typically are named "descriptors". Each of these descriptors references one buffer, multiple of which a packet can be composed of. By contrast, in comments, messages and the names of structure members, iflib(4) refers to DMA resources employed for RX and TX buffers (rather than control data) as "desc(riptors)". This odd naming convention of iflib(4) made reviewing r343085 and identifying wrong and missing bus_dmamap_sync(9) calls in particular way harder than it already is. This convention may also explain why the netmap(4) part of iflib(4) pairs the DMA tags for control data with DMA maps of buffers and vice versa in calls to bus_dma(9) functions. Therefore, change iflib(4) to refer to buf(fers) when buffers and not the usual understanding of descriptors is meant. This change does not include corrections to the DMA resources used in the netmap(4) parts. However, it revises error messages to state which kind of allocation/creation failed. Specifically, the "Unable to allocate tx_buffer (map) memory" copy & pasted inappropriately on several occasions was replaced with proper messages. o Enhance some other error messages to indicate which half - RX or TX - they apply to instead of using identical text in both cases and generally canonicalize them. o Correct the descriptions of iflib_{r,t}xsd_alloc() to reflect reality; current code doesn't use {r,t}x_buffer structures. o In iflib_queues_alloc(): - Remove redundant BUS_DMA_NOWAIT of iflib_dma_alloc() calls, - change the M_WAITOK from malloc(9) calls into M_NOWAIT. The return values are already checked, deferred DMA allocations not being an option at this point, BUS_DMA_NOWAIT has to be used anyway and prior malloc(9) calls in this function also specify M_NOWAIT. Reviewed by: shurd Differential Revision: https://reviews.freebsd.org/D19067 Modified: stable/12/sys/net/iflib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Sat Feb 9 11:49:07 2019 (r343932) +++ stable/12/sys/net/iflib.c Sat Feb 9 11:51:59 2019 (r343933) @@ -355,8 +355,8 @@ struct iflib_txq { uint8_t ift_closed; uint8_t ift_update_freq; struct iflib_filter_info ift_filter_info; - bus_dma_tag_t ift_desc_tag; - bus_dma_tag_t ift_tso_desc_tag; + bus_dma_tag_t ift_buf_tag; + bus_dma_tag_t ift_tso_buf_tag; iflib_dma_info_t ift_ifdi; #define MTX_NAME_LEN 16 char ift_mtx_name[MTX_NAME_LEN]; @@ -391,7 +391,7 @@ struct iflib_fl { iflib_rxsd_array_t ifl_sds; iflib_rxq_t ifl_rxq; uint8_t ifl_id; - bus_dma_tag_t ifl_desc_tag; + bus_dma_tag_t ifl_buf_tag; iflib_dma_info_t ifl_ifdi; uint64_t ifl_bus_addrs[IFLIB_MAX_RX_REFRESH] __aligned(CACHE_LINE_SIZE); caddr_t ifl_vm_addrs[IFLIB_MAX_RX_REFRESH]; @@ -924,10 +924,9 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl if_ctx_t ctx = ifp->if_softc; iflib_txq_t txq = &ctx->ifc_txqs[kring->ring_id]; - bus_dmamap_sync(txq->ift_desc_tag, txq->ift_ifdi->idi_map, + bus_dmamap_sync(txq->ift_buf_tag, txq->ift_ifdi->idi_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - /* * First part: process new packets to send. * nm_i is the current index in the netmap kring, @@ -994,7 +993,8 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl if (slot->flags & NS_BUF_CHANGED) { /* buffer has changed, reload map */ - netmap_reload_map(na, txq->ift_desc_tag, txq->ift_sds.ifsd_map[nic_i], addr); + netmap_reload_map(na, txq->ift_buf_tag, + txq->ift_sds.ifsd_map[nic_i], addr); } /* make sure changes to the buffer are synced */ bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_sds.ifsd_map[nic_i], @@ -1007,7 +1007,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl kring->nr_hwcur = nm_i; /* synchronize the NIC ring */ - bus_dmamap_sync(txq->ift_desc_tag, txq->ift_ifdi->idi_map, + bus_dmamap_sync(txq->ift_buf_tag, txq->ift_ifdi->idi_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); /* (re)start the tx unit up to slot nic_i (excluded) */ @@ -1074,8 +1074,9 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl for (i = 0, fl = rxq->ifr_fl; i < rxq->ifr_nfl; i++, fl++) { if (fl->ifl_sds.ifsd_map == NULL) continue; - bus_dmamap_sync(rxq->ifr_fl[i].ifl_desc_tag, fl->ifl_ifdi->idi_map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + bus_dmamap_sync(rxq->ifr_fl[i].ifl_buf_tag, + fl->ifl_ifdi->idi_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); } /* * First part: import newly received packets. @@ -1201,7 +1202,8 @@ iflib_netmap_txq_init(if_ctx_t ctx, iflib_txq_t txq) * netmap slot index, si */ int si = netmap_idx_n2k(na->tx_rings[txq->ift_id], i); - netmap_load_map(na, txq->ift_desc_tag, txq->ift_sds.ifsd_map[i], NMB(na, slot + si)); + netmap_load_map(na, txq->ift_buf_tag, txq->ift_sds.ifsd_map[i], + NMB(na, slot + si)); } } @@ -1571,12 +1573,13 @@ _iflib_irq_alloc(if_ctx_t ctx, if_irq_t irq, int rid, /********************************************************************* * - * Allocate memory for tx_buffer structures. The tx_buffer stores all - * the information needed to transmit a packet on the wire. This is - * called only once at attach, setup is done every reset. + * Allocate DMA resources for TX buffers as well as memory for the TX + * mbuf map. TX DMA maps (non-TSO/TSO) and TX mbuf map are kept in a + * iflib_sw_tx_desc_array structure, storing all the information that + * is needed to transmit a packet on the wire. This is called only + * once at attach, setup is done every reset. * **********************************************************************/ - static int iflib_txsd_alloc(iflib_txq_t txq) { @@ -1602,7 +1605,7 @@ iflib_txsd_alloc(iflib_txq_t txq) } /* - * Setup DMA descriptor areas. + * Set up DMA tags for TX buffers. */ if ((err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, /* alignment, bounds */ @@ -1615,7 +1618,7 @@ iflib_txsd_alloc(iflib_txq_t txq) 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockfuncarg */ - &txq->ift_desc_tag))) { + &txq->ift_buf_tag))) { device_printf(dev,"Unable to allocate TX DMA tag: %d\n", err); device_printf(dev,"maxsize: %ju nsegments: %d maxsegsize: %ju\n", (uintmax_t)sctx->isc_tx_maxsize, nsegments, (uintmax_t)sctx->isc_tx_maxsegsize); @@ -1633,38 +1636,42 @@ iflib_txsd_alloc(iflib_txq_t txq) 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockfuncarg */ - &txq->ift_tso_desc_tag))) { - device_printf(dev,"Unable to allocate TX TSO DMA tag: %d\n", err); + &txq->ift_tso_buf_tag))) { + device_printf(dev, "Unable to allocate TSO TX DMA tag: %d\n", + err); goto fail; } + + /* Allocate memory for the TX mbuf map. */ if (!(txq->ift_sds.ifsd_m = (struct mbuf **) malloc(sizeof(struct mbuf *) * scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { - device_printf(dev, "Unable to allocate tx_buffer memory\n"); + device_printf(dev, "Unable to allocate TX mbuf map memory\n"); err = ENOMEM; goto fail; } - /* Create the descriptor buffer dma maps */ + /* + * Create the DMA maps for TX buffers. + */ if ((txq->ift_sds.ifsd_map = (bus_dmamap_t *)malloc( sizeof(bus_dmamap_t) * scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { - device_printf(dev, "Unable to allocate tx_buffer map memory\n"); + device_printf(dev, + "Unable to allocate TX buffer DMA map memory\n"); err = ENOMEM; goto fail; } - if (tso && (txq->ift_sds.ifsd_tso_map = (bus_dmamap_t *)malloc( sizeof(bus_dmamap_t) * scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { - device_printf(dev, "Unable to allocate TSO tx_buffer " - "map memory\n"); + device_printf(dev, + "Unable to allocate TSO TX buffer map memory\n"); err = ENOMEM; goto fail; } - for (int i = 0; i < scctx->isc_ntxd[txq->ift_br_offset]; i++) { - err = bus_dmamap_create(txq->ift_desc_tag, 0, + err = bus_dmamap_create(txq->ift_buf_tag, 0, &txq->ift_sds.ifsd_map[i]); if (err != 0) { device_printf(dev, "Unable to create TX DMA map\n"); @@ -1672,7 +1679,7 @@ iflib_txsd_alloc(iflib_txq_t txq) } if (!tso) continue; - err = bus_dmamap_create(txq->ift_tso_desc_tag, 0, + err = bus_dmamap_create(txq->ift_tso_buf_tag, 0, &txq->ift_sds.ifsd_tso_map[i]); if (err != 0) { device_printf(dev, "Unable to create TSO TX DMA map\n"); @@ -1695,9 +1702,9 @@ iflib_txsd_destroy(if_ctx_t ctx, iflib_txq_t txq, int if (txq->ift_sds.ifsd_map != NULL) map = txq->ift_sds.ifsd_map[i]; if (map != NULL) { - bus_dmamap_sync(txq->ift_desc_tag, map, BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_desc_tag, map); - bus_dmamap_destroy(txq->ift_desc_tag, map); + bus_dmamap_sync(txq->ift_buf_tag, map, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(txq->ift_buf_tag, map); + bus_dmamap_destroy(txq->ift_buf_tag, map); txq->ift_sds.ifsd_map[i] = NULL; } @@ -1705,10 +1712,10 @@ iflib_txsd_destroy(if_ctx_t ctx, iflib_txq_t txq, int if (txq->ift_sds.ifsd_tso_map != NULL) map = txq->ift_sds.ifsd_tso_map[i]; if (map != NULL) { - bus_dmamap_sync(txq->ift_tso_desc_tag, map, + bus_dmamap_sync(txq->ift_tso_buf_tag, map, BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_tso_desc_tag, map); - bus_dmamap_destroy(txq->ift_tso_desc_tag, map); + bus_dmamap_unload(txq->ift_tso_buf_tag, map); + bus_dmamap_destroy(txq->ift_tso_buf_tag, map); txq->ift_sds.ifsd_tso_map[i] = NULL; } } @@ -1732,13 +1739,13 @@ iflib_txq_destroy(iflib_txq_t txq) free(txq->ift_sds.ifsd_m, M_IFLIB); txq->ift_sds.ifsd_m = NULL; } - if (txq->ift_desc_tag != NULL) { - bus_dma_tag_destroy(txq->ift_desc_tag); - txq->ift_desc_tag = NULL; + if (txq->ift_buf_tag != NULL) { + bus_dma_tag_destroy(txq->ift_buf_tag); + txq->ift_buf_tag = NULL; } - if (txq->ift_tso_desc_tag != NULL) { - bus_dma_tag_destroy(txq->ift_tso_desc_tag); - txq->ift_tso_desc_tag = NULL; + if (txq->ift_tso_buf_tag != NULL) { + bus_dma_tag_destroy(txq->ift_tso_buf_tag); + txq->ift_tso_buf_tag = NULL; } } @@ -1752,14 +1759,14 @@ iflib_txsd_free(if_ctx_t ctx, iflib_txq_t txq, int i) return; if (txq->ift_sds.ifsd_map != NULL) { - bus_dmamap_sync(txq->ift_desc_tag, + bus_dmamap_sync(txq->ift_buf_tag, txq->ift_sds.ifsd_map[i], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_desc_tag, txq->ift_sds.ifsd_map[i]); + bus_dmamap_unload(txq->ift_buf_tag, txq->ift_sds.ifsd_map[i]); } if (txq->ift_sds.ifsd_tso_map != NULL) { - bus_dmamap_sync(txq->ift_tso_desc_tag, + bus_dmamap_sync(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[i], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_tso_desc_tag, + bus_dmamap_unload(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[i]); } m_free(*mp); @@ -1798,10 +1805,13 @@ iflib_txq_setup(iflib_txq_t txq) /********************************************************************* * - * Allocate memory for rx_buffer structures. Since we use one - * rx_buffer per received packet, the maximum number of rx_buffer's - * that we'll need is equal to the number of receive descriptors - * that we've allocated. + * Allocate DMA resources for RX buffers as well as memory for the RX + * mbuf map, direct RX cluster pointer map and RX cluster bus address + * map. RX DMA map, RX mbuf map, direct RX cluster pointer map and + * RX cluster map are kept in a iflib_sw_rx_desc_array structure. + * Since we use use one entry in iflib_sw_rx_desc_array per received + * packet, the maximum number of entries we'll need is equal to the + * number of hardware receive descriptors that we've allocated. * **********************************************************************/ static int @@ -1820,6 +1830,7 @@ iflib_rxsd_alloc(iflib_rxq_t rxq) fl = rxq->ifr_fl; for (int i = 0; i < rxq->ifr_nfl; i++, fl++) { fl->ifl_size = scctx->isc_nrxd[rxq->ifr_fl_offset]; /* this isn't necessarily the same */ + /* Set up DMA tag for RX buffers. */ err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ @@ -1831,45 +1842,56 @@ iflib_rxsd_alloc(iflib_rxq_t rxq) 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ - &fl->ifl_desc_tag); + &fl->ifl_buf_tag); if (err) { - device_printf(dev, "%s: bus_dma_tag_create failed %d\n", - __func__, err); + device_printf(dev, + "Unable to allocate RX DMA tag: %d\n", err); goto fail; } + + /* Allocate memory for the RX mbuf map. */ if (!(fl->ifl_sds.ifsd_m = (struct mbuf **) malloc(sizeof(struct mbuf *) * scctx->isc_nrxd[rxq->ifr_fl_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { - device_printf(dev, "Unable to allocate tx_buffer memory\n"); + device_printf(dev, + "Unable to allocate RX mbuf map memory\n"); err = ENOMEM; goto fail; } + + /* Allocate memory for the direct RX cluster pointer map. */ if (!(fl->ifl_sds.ifsd_cl = (caddr_t *) malloc(sizeof(caddr_t) * scctx->isc_nrxd[rxq->ifr_fl_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { - device_printf(dev, "Unable to allocate tx_buffer memory\n"); + device_printf(dev, + "Unable to allocate RX cluster map memory\n"); err = ENOMEM; goto fail; } + /* Allocate memory for the RX cluster bus address map. */ if (!(fl->ifl_sds.ifsd_ba = (bus_addr_t *) malloc(sizeof(bus_addr_t) * scctx->isc_nrxd[rxq->ifr_fl_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { - device_printf(dev, "Unable to allocate rx bus addr memory\n"); + device_printf(dev, + "Unable to allocate RX bus address map memory\n"); err = ENOMEM; goto fail; } - /* Create the descriptor buffer dma maps */ + /* + * Create the DMA maps for RX buffers. + */ if (!(fl->ifl_sds.ifsd_map = (bus_dmamap_t *) malloc(sizeof(bus_dmamap_t) * scctx->isc_nrxd[rxq->ifr_fl_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { - device_printf(dev, "Unable to allocate tx_buffer map memory\n"); + device_printf(dev, + "Unable to allocate RX buffer DMA map memory\n"); err = ENOMEM; goto fail; } - for (int i = 0; i < scctx->isc_nrxd[rxq->ifr_fl_offset]; i++) { - err = bus_dmamap_create(fl->ifl_desc_tag, 0, &fl->ifl_sds.ifsd_map[i]); + err = bus_dmamap_create(fl->ifl_buf_tag, 0, + &fl->ifl_sds.ifsd_map[i]); if (err != 0) { device_printf(dev, "Unable to create RX buffer DMA map\n"); goto fail; @@ -1969,7 +1991,7 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun cb_arg.error = 0; MPASS(sd_map != NULL); - err = bus_dmamap_load(fl->ifl_desc_tag, sd_map[frag_idx], + err = bus_dmamap_load(fl->ifl_buf_tag, sd_map[frag_idx], cl, fl->ifl_buf_size, _rxq_refill_cb, &cb_arg, BUS_DMA_NOWAIT); if (err != 0 || cb_arg.error) { @@ -1981,7 +2003,7 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun break; } - bus_dmamap_sync(fl->ifl_desc_tag, sd_map[frag_idx], + bus_dmamap_sync(fl->ifl_buf_tag, sd_map[frag_idx], BUS_DMASYNC_PREREAD); sd_ba[frag_idx] = bus_addr = cb_arg.seg.ds_addr; sd_cl[frag_idx] = cl; @@ -2082,14 +2104,14 @@ iflib_fl_bufs_free(iflib_fl_t fl) if (*sd_cl != NULL) { sd_map = fl->ifl_sds.ifsd_map[i]; - bus_dmamap_sync(fl->ifl_desc_tag, sd_map, + bus_dmamap_sync(fl->ifl_buf_tag, sd_map, BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(fl->ifl_desc_tag, sd_map); + bus_dmamap_unload(fl->ifl_buf_tag, sd_map); if (*sd_cl != NULL) uma_zfree(fl->ifl_zone, *sd_cl); // XXX: Should this get moved out? if (iflib_in_detach(fl->ifl_rxq->ifr_ctx)) - bus_dmamap_destroy(fl->ifl_desc_tag, sd_map); + bus_dmamap_destroy(fl->ifl_buf_tag, sd_map); if (*sd_m != NULL) { m_init(*sd_m, M_NOWAIT, MT_DATA, 0); uma_zfree(zone_mbuf, *sd_m); @@ -2191,23 +2213,23 @@ iflib_rx_sds_free(iflib_rxq_t rxq) if (rxq->ifr_fl != NULL) { for (i = 0; i < rxq->ifr_nfl; i++) { fl = &rxq->ifr_fl[i]; - if (fl->ifl_desc_tag != NULL) { + if (fl->ifl_buf_tag != NULL) { if (fl->ifl_sds.ifsd_map != NULL) { for (j = 0; j < fl->ifl_size; j++) { if (fl->ifl_sds.ifsd_map[j] == NULL) continue; bus_dmamap_sync( - fl->ifl_desc_tag, + fl->ifl_buf_tag, fl->ifl_sds.ifsd_map[j], BUS_DMASYNC_POSTREAD); bus_dmamap_unload( - fl->ifl_desc_tag, + fl->ifl_buf_tag, fl->ifl_sds.ifsd_map[j]); } } - bus_dma_tag_destroy(fl->ifl_desc_tag); - fl->ifl_desc_tag = NULL; + bus_dma_tag_destroy(fl->ifl_buf_tag); + fl->ifl_buf_tag = NULL; } free(fl->ifl_sds.ifsd_m, M_IFLIB); free(fl->ifl_sds.ifsd_cl, M_IFLIB); @@ -2492,9 +2514,9 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, int /* not valid assert if bxe really does SGE from non-contiguous elements */ MPASS(fl->ifl_cidx == cidx); - bus_dmamap_sync(fl->ifl_desc_tag, map, BUS_DMASYNC_POSTREAD); + bus_dmamap_sync(fl->ifl_buf_tag, map, BUS_DMASYNC_POSTREAD); if (unload) - bus_dmamap_unload(fl->ifl_desc_tag, map); + bus_dmamap_unload(fl->ifl_buf_tag, map); fl->ifl_cidx = (fl->ifl_cidx + 1) & (fl->ifl_size-1); if (__predict_false(fl->ifl_cidx == 0)) fl->ifl_gen = 0; @@ -2577,7 +2599,7 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri) m->m_data += 2; #endif memcpy(m->m_data, *sd.ifsd_cl, ri->iri_len); - bus_dmamap_sync(rxq->ifr_fl->ifl_desc_tag, + bus_dmamap_sync(rxq->ifr_fl->ifl_buf_tag, rxq->ifr_fl->ifl_sds.ifsd_map[ri->iri_frags[0].irf_idx], BUS_DMASYNC_PREREAD); m->m_len = ri->iri_frags[0].irf_len; @@ -3078,9 +3100,9 @@ iflib_remove_mbuf(iflib_txq_t txq) ifsd_m = txq->ift_sds.ifsd_m; m = ifsd_m[pidx]; ifsd_m[pidx] = NULL; - bus_dmamap_unload(txq->ift_desc_tag, txq->ift_sds.ifsd_map[pidx]); + bus_dmamap_unload(txq->ift_buf_tag, txq->ift_sds.ifsd_map[pidx]); if (txq->ift_sds.ifsd_tso_map != NULL) - bus_dmamap_unload(txq->ift_tso_desc_tag, + bus_dmamap_unload(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[pidx]); #if MEMORY_LOGGING txq->ift_dequeued++; @@ -3157,6 +3179,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) if_ctx_t ctx; if_shared_ctx_t sctx; if_softc_ctx_t scctx; + bus_dma_tag_t buf_tag; bus_dma_segment_t *segs; struct mbuf *m_head, **ifsd_m; void *next_txd; @@ -3164,7 +3187,6 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) struct if_pkt_info pi; int remap = 0; int err, nsegs, ndesc, max_segs, pidx, cidx, next, ntxd; - bus_dma_tag_t desc_tag; ctx = txq->ift_ctx; sctx = ctx->ifc_sctx; @@ -3195,13 +3217,13 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) ifsd_m = txq->ift_sds.ifsd_m; if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { - desc_tag = txq->ift_tso_desc_tag; + buf_tag = txq->ift_tso_buf_tag; max_segs = scctx->isc_tx_tso_segments_max; map = txq->ift_sds.ifsd_tso_map[pidx]; - MPASS(desc_tag != NULL); + MPASS(buf_tag != NULL); MPASS(max_segs > 0); } else { - desc_tag = txq->ift_desc_tag; + buf_tag = txq->ift_buf_tag; max_segs = scctx->isc_tx_nsegments; map = txq->ift_sds.ifsd_map[pidx]; } @@ -3233,7 +3255,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) } retry: - err = bus_dmamap_load_mbuf_sg(desc_tag, map, m_head, segs, &nsegs, + err = bus_dmamap_load_mbuf_sg(buf_tag, map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); defrag: if (__predict_false(err)) { @@ -3279,7 +3301,7 @@ defrag: */ if (__predict_false(nsegs + 2 > TXQ_AVAIL(txq))) { txq->ift_no_desc_avail++; - bus_dmamap_unload(desc_tag, map); + bus_dmamap_unload(buf_tag, map); DBG_COUNTER_INC(encap_txq_avail_fail); DBG_COUNTER_INC(encap_txd_encap_fail); if ((txq->ift_task.gt_task.ta_flags & TASK_ENQUEUED) == 0) @@ -3306,7 +3328,7 @@ defrag: #ifdef PKT_DEBUG print_pkt(&pi); #endif - bus_dmamap_sync(desc_tag, map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(buf_tag, map, BUS_DMASYNC_PREWRITE); if ((err = ctx->isc_txd_encap(ctx->ifc_softc, &pi)) == 0) { bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -3382,16 +3404,16 @@ iflib_tx_desc_free(iflib_txq_t txq, int n) if ((m = ifsd_m[cidx]) != NULL) { prefetch(&ifsd_m[(cidx + CACHE_PTR_INCREMENT) & mask]); if (m->m_pkthdr.csum_flags & CSUM_TSO) { - bus_dmamap_sync(txq->ift_tso_desc_tag, + bus_dmamap_sync(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[cidx], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_tso_desc_tag, + bus_dmamap_unload(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[cidx]); } else { - bus_dmamap_sync(txq->ift_desc_tag, + bus_dmamap_sync(txq->ift_buf_tag, txq->ift_sds.ifsd_map[cidx], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_desc_tag, + bus_dmamap_unload(txq->ift_buf_tag, txq->ift_sds.ifsd_map[cidx]); } /* XXX we don't support any drivers that batch packets yet */ @@ -5198,15 +5220,18 @@ iflib_queues_alloc(if_ctx_t ctx) for (txconf = i = 0, cpu = CPU_FIRST(); i < ntxqsets; i++, txconf++, txq++, cpu = CPU_NEXT(cpu)) { /* Set up some basics */ - if ((ifdip = malloc(sizeof(struct iflib_dma_info) * ntxqs, M_IFLIB, M_WAITOK|M_ZERO)) == NULL) { - device_printf(dev, "failed to allocate iflib_dma_info\n"); + if ((ifdip = malloc(sizeof(struct iflib_dma_info) * ntxqs, + M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { + device_printf(dev, + "Unable to allocate TX DMA info memory\n"); err = ENOMEM; goto err_tx_desc; } txq->ift_ifdi = ifdip; for (j = 0; j < ntxqs; j++, ifdip++) { - if (iflib_dma_alloc(ctx, txqsizes[j], ifdip, BUS_DMA_NOWAIT)) { - device_printf(dev, "Unable to allocate Descriptor memory\n"); + if (iflib_dma_alloc(ctx, txqsizes[j], ifdip, 0)) { + device_printf(dev, + "Unable to allocate TX descriptors\n"); err = ENOMEM; goto err_tx_desc; } @@ -5250,8 +5275,10 @@ iflib_queues_alloc(if_ctx_t ctx) for (rxconf = i = 0; i < nrxqsets; i++, rxconf++, rxq++) { /* Set up some basics */ - if ((ifdip = malloc(sizeof(struct iflib_dma_info) * nrxqs, M_IFLIB, M_WAITOK|M_ZERO)) == NULL) { - device_printf(dev, "failed to allocate iflib_dma_info\n"); + if ((ifdip = malloc(sizeof(struct iflib_dma_info) * nrxqs, + M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { + device_printf(dev, + "Unable to allocate RX DMA info memory\n"); err = ENOMEM; goto err_tx_desc; } @@ -5261,8 +5288,9 @@ iflib_queues_alloc(if_ctx_t ctx) rxq->ifr_ntxqirq = 1; rxq->ifr_txqid[0] = i; for (j = 0; j < nrxqs; j++, ifdip++) { - if (iflib_dma_alloc(ctx, rxqsizes[j], ifdip, BUS_DMA_NOWAIT)) { - device_printf(dev, "Unable to allocate Descriptor memory\n"); + if (iflib_dma_alloc(ctx, rxqsizes[j], ifdip, 0)) { + device_printf(dev, + "Unable to allocate RX descriptors\n"); err = ENOMEM; goto err_tx_desc; } @@ -5314,7 +5342,8 @@ iflib_queues_alloc(if_ctx_t ctx) } } if ((err = IFDI_TX_QUEUES_ALLOC(ctx, vaddrs, paddrs, ntxqs, ntxqsets)) != 0) { - device_printf(ctx->ifc_dev, "device queue allocation failed\n"); + device_printf(ctx->ifc_dev, + "Unable to allocate device TX queue\n"); iflib_tx_structures_free(ctx); free(vaddrs, M_IFLIB); free(paddrs, M_IFLIB); @@ -5335,7 +5364,8 @@ iflib_queues_alloc(if_ctx_t ctx) } } if ((err = IFDI_RX_QUEUES_ALLOC(ctx, vaddrs, paddrs, nrxqs, nrxqsets)) != 0) { - device_printf(ctx->ifc_dev, "device queue allocation failed\n"); + device_printf(ctx->ifc_dev, + "Unable to allocate device RX queue\n"); iflib_tx_structures_free(ctx); free(vaddrs, M_IFLIB); free(paddrs, M_IFLIB); From owner-svn-src-stable@freebsd.org Sat Feb 9 12:01:11 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 544AC14DFC26; Sat, 9 Feb 2019 12:01:11 +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) server-signature RSA-PSS (4096 bits) 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 E97518FCFC; Sat, 9 Feb 2019 12:01:10 +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 C3B2364D; Sat, 9 Feb 2019 12:01:10 +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 x19C1AXP098375; Sat, 9 Feb 2019 12:01:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19C1Alp098374; Sat, 9 Feb 2019 12:01:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902091201.x19C1Alp098374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 9 Feb 2019 12:01: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: r343935 - in stable: 11/contrib/llvm/lib/CodeGen/SelectionDAG 12/contrib/llvm/lib/CodeGen/SelectionDAG X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm/lib/CodeGen/SelectionDAG 12/contrib/llvm/lib/CodeGen/SelectionDAG X-SVN-Commit-Revision: 343935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E97518FCFC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 12:01:11 -0000 Author: dim Date: Sat Feb 9 12:01:10 2019 New Revision: 343935 URL: https://svnweb.freebsd.org/changeset/base/343935 Log: MFC r342592: Pull in r342397 from upstream llvm trunk (by Amara Emerson): Revert "Revert r342183 "[DAGCombine] Fix crash when store merging created an extract_subvector with invalid index."" Fixed the assertion failure. Differential Revision: https://reviews.llvm.org/D51831 This fixes 'Assertion failed: ((VT.getVectorNumElements() + N2C->getZExtValue() <= N1.getValueType().getVectorNumElements()) && "Extract subvector overflow!"), function getNode' when building the multimedia/aom port (with AVX2 enabled). Reported by: jbeich PR: 234480 Modified: stable/12/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ============================================================================== --- stable/12/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Feb 9 11:58:40 2019 (r343934) +++ stable/12/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Feb 9 12:01:10 2019 (r343935) @@ -12851,17 +12851,24 @@ bool DAGCombiner::MergeStoresOfConstantsOrVecElts( Val.getOpcode() == ISD::EXTRACT_SUBVECTOR)) { SDValue Vec = Val.getOperand(0); EVT MemVTScalarTy = MemVT.getScalarType(); + SDValue Idx = Val.getOperand(1); // We may need to add a bitcast here to get types to line up. if (MemVTScalarTy != Vec.getValueType()) { unsigned Elts = Vec.getValueType().getSizeInBits() / MemVTScalarTy.getSizeInBits(); + if (Val.getValueType().isVector() && MemVT.isVector()) { + unsigned IdxC = cast(Idx)->getZExtValue(); + unsigned NewIdx = + ((uint64_t)IdxC * MemVT.getVectorNumElements()) / Elts; + Idx = DAG.getConstant(NewIdx, SDLoc(Val), Idx.getValueType()); + } EVT NewVecTy = EVT::getVectorVT(*DAG.getContext(), MemVTScalarTy, Elts); Vec = DAG.getBitcast(NewVecTy, Vec); } auto OpC = (MemVT.isVector()) ? ISD::EXTRACT_SUBVECTOR : ISD::EXTRACT_VECTOR_ELT; - Val = DAG.getNode(OpC, SDLoc(Val), MemVT, Vec, Val.getOperand(1)); + Val = DAG.getNode(OpC, SDLoc(Val), MemVT, Vec, Idx); } Ops.push_back(Val); } From owner-svn-src-stable@freebsd.org Sat Feb 9 12:01:12 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D96EC14DFC3D; Sat, 9 Feb 2019 12:01:11 +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) server-signature RSA-PSS (4096 bits) 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 449FD8FCFF; Sat, 9 Feb 2019 12:01:11 +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 1C57D64E; Sat, 9 Feb 2019 12:01:11 +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 x19C1AZS098381; Sat, 9 Feb 2019 12:01:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19C1AP9098380; Sat, 9 Feb 2019 12:01:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902091201.x19C1AP9098380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 9 Feb 2019 12:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343935 - in stable: 11/contrib/llvm/lib/CodeGen/SelectionDAG 12/contrib/llvm/lib/CodeGen/SelectionDAG X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm/lib/CodeGen/SelectionDAG 12/contrib/llvm/lib/CodeGen/SelectionDAG X-SVN-Commit-Revision: 343935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 449FD8FCFF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 12:01:12 -0000 Author: dim Date: Sat Feb 9 12:01:10 2019 New Revision: 343935 URL: https://svnweb.freebsd.org/changeset/base/343935 Log: MFC r342592: Pull in r342397 from upstream llvm trunk (by Amara Emerson): Revert "Revert r342183 "[DAGCombine] Fix crash when store merging created an extract_subvector with invalid index."" Fixed the assertion failure. Differential Revision: https://reviews.llvm.org/D51831 This fixes 'Assertion failed: ((VT.getVectorNumElements() + N2C->getZExtValue() <= N1.getValueType().getVectorNumElements()) && "Extract subvector overflow!"), function getNode' when building the multimedia/aom port (with AVX2 enabled). Reported by: jbeich PR: 234480 Modified: stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ============================================================================== --- stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Feb 9 11:58:40 2019 (r343934) +++ stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Feb 9 12:01:10 2019 (r343935) @@ -12851,17 +12851,24 @@ bool DAGCombiner::MergeStoresOfConstantsOrVecElts( Val.getOpcode() == ISD::EXTRACT_SUBVECTOR)) { SDValue Vec = Val.getOperand(0); EVT MemVTScalarTy = MemVT.getScalarType(); + SDValue Idx = Val.getOperand(1); // We may need to add a bitcast here to get types to line up. if (MemVTScalarTy != Vec.getValueType()) { unsigned Elts = Vec.getValueType().getSizeInBits() / MemVTScalarTy.getSizeInBits(); + if (Val.getValueType().isVector() && MemVT.isVector()) { + unsigned IdxC = cast(Idx)->getZExtValue(); + unsigned NewIdx = + ((uint64_t)IdxC * MemVT.getVectorNumElements()) / Elts; + Idx = DAG.getConstant(NewIdx, SDLoc(Val), Idx.getValueType()); + } EVT NewVecTy = EVT::getVectorVT(*DAG.getContext(), MemVTScalarTy, Elts); Vec = DAG.getBitcast(NewVecTy, Vec); } auto OpC = (MemVT.isVector()) ? ISD::EXTRACT_SUBVECTOR : ISD::EXTRACT_VECTOR_ELT; - Val = DAG.getNode(OpC, SDLoc(Val), MemVT, Vec, Val.getOperand(1)); + Val = DAG.getNode(OpC, SDLoc(Val), MemVT, Vec, Idx); } Ops.push_back(Val); } From owner-svn-src-stable@freebsd.org Sat Feb 9 14:07:06 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50CFB14E295F; Sat, 9 Feb 2019 14:07:06 +0000 (UTC) (envelope-from se@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) server-signature RSA-PSS (4096 bits) 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 D67BB6D064; Sat, 9 Feb 2019 14:07:05 +0000 (UTC) (envelope-from se@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 94B0E1AF4; Sat, 9 Feb 2019 14:07:04 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19E74aY063911; Sat, 9 Feb 2019 14:07:04 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19E74lJ063910; Sat, 9 Feb 2019 14:07:04 GMT (envelope-from se@FreeBSD.org) Message-Id: <201902091407.x19E74lJ063910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Sat, 9 Feb 2019 14:07: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: r343936 - stable/12/usr.sbin/kbdmap X-SVN-Group: stable-12 X-SVN-Commit-Author: se X-SVN-Commit-Paths: stable/12/usr.sbin/kbdmap X-SVN-Commit-Revision: 343936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D67BB6D064 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 14:07:06 -0000 Author: se Date: Sat Feb 9 14:07:04 2019 New Revision: 343936 URL: https://svnweb.freebsd.org/changeset/base/343936 Log: MFC r343303: Silence a CI warning regarding the use of strcpy(). While this is a false positive (a sufficiently large buffer has been allocated in the line above), the use of strdup() simplifies and clarifies the code. Modified: stable/12/usr.sbin/kbdmap/kbdmap.c Modified: stable/12/usr.sbin/kbdmap/kbdmap.c ============================================================================== --- stable/12/usr.sbin/kbdmap/kbdmap.c Sat Feb 9 12:01:10 2019 (r343935) +++ stable/12/usr.sbin/kbdmap/kbdmap.c Sat Feb 9 14:07:04 2019 (r343936) @@ -241,8 +241,7 @@ get_font(void) if (strcmp(buf, "NO")) { if (fnt) free(fnt); - fnt = (char *) malloc(strlen(buf) + 1); - strcpy(fnt, buf); + fnt = strdup(buf); } } } From owner-svn-src-stable@freebsd.org Sat Feb 9 14:13:50 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BDB514E2BDF; Sat, 9 Feb 2019 14:13:50 +0000 (UTC) (envelope-from se@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) server-signature RSA-PSS (4096 bits) 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 8E2856D4CC; Sat, 9 Feb 2019 14:13:49 +0000 (UTC) (envelope-from se@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 7BDDB1CB0; Sat, 9 Feb 2019 14:13:49 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19EDn84069168; Sat, 9 Feb 2019 14:13:49 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19EDnIb069167; Sat, 9 Feb 2019 14:13:49 GMT (envelope-from se@FreeBSD.org) Message-Id: <201902091413.x19EDnIb069167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Sat, 9 Feb 2019 14:13: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: r343937 - stable/12/usr.sbin/kbdcontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: se X-SVN-Commit-Paths: stable/12/usr.sbin/kbdcontrol X-SVN-Commit-Revision: 343937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E2856D4CC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 14:13:50 -0000 Author: se Date: Sat Feb 9 14:13:49 2019 New Revision: 343937 URL: https://svnweb.freebsd.org/changeset/base/343937 Log: MFC r343339: Silence Clang Scan warning about use of unitialized variable. The logic is changed to depend on actual "beep" parameters instead of on a flag that may be set for invalid parameters. An embedded literal escape character is replaced by "\e". Modified: stable/12/usr.sbin/kbdcontrol/kbdcontrol.c Modified: stable/12/usr.sbin/kbdcontrol/kbdcontrol.c ============================================================================== --- stable/12/usr.sbin/kbdcontrol/kbdcontrol.c Sat Feb 9 14:07:04 2019 (r343936) +++ stable/12/usr.sbin/kbdcontrol/kbdcontrol.c Sat Feb 9 14:13:49 2019 (r343937) @@ -961,6 +961,8 @@ set_bell_values(char *opt) int bell, duration, pitch; bell = 0; + duration = 0; + pitch = 0; if (!strncmp(opt, "quiet.", 6)) { bell = CONS_QUIET_BELL; opt += 6; @@ -991,8 +993,8 @@ badopt: } ioctl(0, CONS_BELLTYPE, &bell); - if (!(bell & CONS_VISUAL_BELL)) - fprintf(stderr, "[=%d;%dB", pitch, duration); + if (duration > 0 && pitch > 0) + fprintf(stderr, "\e[=%d;%dB", pitch, duration); } static void From owner-svn-src-stable@freebsd.org Sat Feb 9 14:19:11 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB63E14E2CBB; Sat, 9 Feb 2019 14:19:10 +0000 (UTC) (envelope-from se@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) server-signature RSA-PSS (4096 bits) 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 793486D67D; Sat, 9 Feb 2019 14:19:10 +0000 (UTC) (envelope-from se@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 669721CB3; Sat, 9 Feb 2019 14:19:10 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19EJAjb069457; Sat, 9 Feb 2019 14:19:10 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19EJAVX069456; Sat, 9 Feb 2019 14:19:10 GMT (envelope-from se@FreeBSD.org) Message-Id: <201902091419.x19EJAVX069456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Sat, 9 Feb 2019 14:19: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: r343938 - stable/12/usr.bin/whereis X-SVN-Group: stable-12 X-SVN-Commit-Author: se X-SVN-Commit-Paths: stable/12/usr.bin/whereis X-SVN-Commit-Revision: 343938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 793486D67D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 14:19:11 -0000 Author: se Date: Sat Feb 9 14:19:09 2019 New Revision: 343938 URL: https://svnweb.freebsd.org/changeset/base/343938 Log: MFC r343408: Silence Clang Scan warnings regarding unsafe use of strcp(). While these warnings are false positives, the use of strdup() instead of malloc() and strcpy() simplifies and clarifies the code. A bogus assignment to a variable (whose previous value may be required in a later block) has also been removed. Modified: stable/12/usr.bin/whereis/whereis.c Modified: stable/12/usr.bin/whereis/whereis.c ============================================================================== --- stable/12/usr.bin/whereis/whereis.c Sat Feb 9 14:13:49 2019 (r343937) +++ stable/12/usr.bin/whereis/whereis.c Sat Feb 9 14:19:09 2019 (r343938) @@ -285,9 +285,9 @@ defaults(void) bindirs[nele] = NULL; if ((cp = getenv("PATH")) != NULL) { /* don't destroy the original environment... */ - if ((b = malloc(strlen(cp) + 1)) == NULL) + b = strdup(cp); + if (b == NULL) abort(); - strcpy(b, cp); decolonify(b, &bindirs, &nele); } } @@ -301,18 +301,18 @@ defaults(void) err(EX_OSERR, "error processing manpath results"); if ((b = strchr(buf, '\n')) != NULL) *b = '\0'; - if ((b = malloc(strlen(buf) + 1)) == NULL) + b = strdup(buf); + if (b == NULL) abort(); - strcpy(b, buf); nele = 0; decolonify(b, &mandirs, &nele); } /* -s defaults to precompiled list, plus subdirs of /usr/ports */ if (!sourcedirs) { - if ((b = malloc(strlen(sourcepath) + 1)) == NULL) + b = strdup(sourcepath); + if (b == NULL) abort(); - strcpy(b, sourcepath); nele = 0; decolonify(b, &sourcedirs, &nele); @@ -523,11 +523,9 @@ main(int argc, char **argv) * man -w found plain source * page, use it. */ - s = strlen(buf); - cp2 = malloc(s + 1); + cp2 = strdup(buf); if (cp2 == NULL) abort(); - strcpy(cp2, buf); } if (man == NULL) { From owner-svn-src-stable@freebsd.org Sat Feb 9 14:21:30 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEABD14E2DB4; Sat, 9 Feb 2019 14:21:30 +0000 (UTC) (envelope-from se@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) server-signature RSA-PSS (4096 bits) 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 569426D9DA; Sat, 9 Feb 2019 14:21:30 +0000 (UTC) (envelope-from se@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 46D981E06; Sat, 9 Feb 2019 14:21:30 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19ELUNc071261; Sat, 9 Feb 2019 14:21:30 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19ELUAd071260; Sat, 9 Feb 2019 14:21:30 GMT (envelope-from se@FreeBSD.org) Message-Id: <201902091421.x19ELUAd071260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Sat, 9 Feb 2019 14:21:30 +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: r343939 - stable/12/libexec/getty X-SVN-Group: stable-12 X-SVN-Commit-Author: se X-SVN-Commit-Paths: stable/12/libexec/getty X-SVN-Commit-Revision: 343939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 569426D9DA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 14:21:30 -0000 Author: se Date: Sat Feb 9 14:21:29 2019 New Revision: 343939 URL: https://svnweb.freebsd.org/changeset/base/343939 Log: MFC r343479: Fix potential buffer overflow and undefined behavior. The buffer allocated in read_chat() could be 1 element too short, if the chatstr parameter passed in is 1 or 3 charachters long (e.g. "a" or "a b"). The allocation of the pointer array does not account for the terminating NULL pointer in that case. Overlapping source and destination strings are undefined in strcpy(). Instead of moving a string to the left by one character just increment the char pointer before it is assigned to the results array. Modified: stable/12/libexec/getty/chat.c Modified: stable/12/libexec/getty/chat.c ============================================================================== --- stable/12/libexec/getty/chat.c Sat Feb 9 14:19:09 2019 (r343938) +++ stable/12/libexec/getty/chat.c Sat Feb 9 14:21:29 2019 (r343939) @@ -141,7 +141,7 @@ read_chat(char **chatstr) int l; if ((l=strlen(str)) > 0 && (tmp=malloc(l + 1)) != NULL && - (res=malloc((l / 2 + 1) * sizeof(char *))) != NULL) { + (res=malloc(((l + 1) / 2 + 1) * sizeof(char *))) != NULL) { static char ws[] = " \t"; char * p; @@ -216,7 +216,7 @@ read_chat(char **chatstr) q = strrchr(p+1, *p); if (q != NULL && *q == *p && q[1] == '\0') { *q = '\0'; - strcpy(p, p+1); + p++; } } From owner-svn-src-stable@freebsd.org Sat Feb 9 14:33:48 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FECF14E318D; Sat, 9 Feb 2019 14:33:48 +0000 (UTC) (envelope-from se@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) server-signature RSA-PSS (4096 bits) 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 03A776E000; Sat, 9 Feb 2019 14:33:48 +0000 (UTC) (envelope-from se@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 946301FFB; Sat, 9 Feb 2019 14:33:44 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19EXiM2079729; Sat, 9 Feb 2019 14:33:44 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19EXhev079726; Sat, 9 Feb 2019 14:33:43 GMT (envelope-from se@FreeBSD.org) Message-Id: <201902091433.x19EXhev079726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Sat, 9 Feb 2019 14:33: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: r343940 - in stable/12/usr.sbin/timed: timed timedc X-SVN-Group: stable-12 X-SVN-Commit-Author: se X-SVN-Commit-Paths: in stable/12/usr.sbin/timed: timed timedc X-SVN-Commit-Revision: 343940 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 03A776E000 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 14:33:48 -0000 Author: se Date: Sat Feb 9 14:33:43 2019 New Revision: 343940 URL: https://svnweb.freebsd.org/changeset/base/343940 Log: Add notes regarding the deprecation and removal of timed and timedc in -CURRENT to binaries and man-pages. This is a direct commit to -STABLE, since the removal from -CURRENT has already been done. Modified: stable/12/usr.sbin/timed/timed/timed.8 stable/12/usr.sbin/timed/timed/timed.c stable/12/usr.sbin/timed/timedc/timedc.8 stable/12/usr.sbin/timed/timedc/timedc.c Modified: stable/12/usr.sbin/timed/timed/timed.8 ============================================================================== --- stable/12/usr.sbin/timed/timed/timed.8 Sat Feb 9 14:21:29 2019 (r343939) +++ stable/12/usr.sbin/timed/timed/timed.8 Sat Feb 9 14:33:43 2019 (r343940) @@ -286,3 +286,9 @@ The .Nm utility appeared in .Bx 4.3 . +.Pp +The latest +.Nm +code has been made available as a port (net/timed) in preparation of removal +from base in +.Fx 13.0 . Modified: stable/12/usr.sbin/timed/timed/timed.c ============================================================================== --- stable/12/usr.sbin/timed/timed/timed.c Sat Feb 9 14:21:29 2019 (r343939) +++ stable/12/usr.sbin/timed/timed/timed.c Sat Feb 9 14:33:43 2019 (r343940) @@ -192,6 +192,9 @@ main(int argc, char *argv[]) if (optind < argc) usage(); + fprintf(stderr, "TIMED will be removed from FreeBSD-13, and will be " + "provided as a port (net/timed) or package (timed).\n"); + /* If we care about which machine is the master, then we must * be willing to be a master */ Modified: stable/12/usr.sbin/timed/timedc/timedc.8 ============================================================================== --- stable/12/usr.sbin/timed/timedc/timedc.8 Sat Feb 9 14:21:29 2019 (r343939) +++ stable/12/usr.sbin/timed/timedc/timedc.8 Sat Feb 9 14:33:43 2019 (r343940) @@ -139,3 +139,9 @@ The .Nm utility appeared in .Bx 4.3 . +.Pp +The latest +.Nm +code has been made available as a port (net/timed) in preparation of removal +from base in +.Fx 13.0 . Modified: stable/12/usr.sbin/timed/timedc/timedc.c ============================================================================== --- stable/12/usr.sbin/timed/timedc/timedc.c Sat Feb 9 14:21:29 2019 (r343939) +++ stable/12/usr.sbin/timed/timedc/timedc.c Sat Feb 9 14:33:43 2019 (r343940) @@ -97,6 +97,9 @@ main(int argc, char *argv[]) } fromatty = isatty(fileno(stdin)); + if (fromatty) + printf("TIMEDC will be removed from FreeBSD-13, and will be " + "provided as a port (net/timed) or package (timed).\n"); if (setjmp(toplevel)) putchar('\n'); (void) signal(SIGINT, intr); From owner-svn-src-stable@freebsd.org Sat Feb 9 14:44:18 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6F7D14E3820; Sat, 9 Feb 2019 14:44:18 +0000 (UTC) (envelope-from se@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) server-signature RSA-PSS (4096 bits) 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 74DC06E8AD; Sat, 9 Feb 2019 14:44:18 +0000 (UTC) (envelope-from se@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 6932F21B5; Sat, 9 Feb 2019 14:44:18 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19EiIhM085145; Sat, 9 Feb 2019 14:44:18 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19EiI9w085144; Sat, 9 Feb 2019 14:44:18 GMT (envelope-from se@FreeBSD.org) Message-Id: <201902091444.x19EiI9w085144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Sat, 9 Feb 2019 14:44:18 +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: r343941 - stable/12/lib/libfigpar X-SVN-Group: stable-12 X-SVN-Commit-Author: se X-SVN-Commit-Paths: stable/12/lib/libfigpar X-SVN-Commit-Revision: 343941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 74DC06E8AD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 14:44:19 -0000 Author: se Date: Sat Feb 9 14:44:17 2019 New Revision: 343941 URL: https://svnweb.freebsd.org/changeset/base/343941 Log: MFC r343480,343482: Silence Clang Scan warning about unsafe use of strcpy. Replace strcpy() by memcpy to the previously allocated range of known size. Modified: stable/12/lib/libfigpar/string_m.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libfigpar/string_m.c ============================================================================== --- stable/12/lib/libfigpar/string_m.c Sat Feb 9 14:33:43 2019 (r343940) +++ stable/12/lib/libfigpar/string_m.c Sat Feb 9 14:44:17 2019 (r343941) @@ -120,9 +120,9 @@ replaceall(char *source, const char *find, const char /* If replace is longer than find, we'll need to create a temp copy */ if (rlen > flen) { temp = malloc(slen + 1); - if (errno != 0) /* could not allocate memory */ + if (temp == NULL) /* could not allocate memory */ return (-1); - strcpy(temp, source); + memcpy(temp, source, slen + 1); } else temp = source; From owner-svn-src-stable@freebsd.org Sat Feb 9 15:38:12 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A855914E4587; Sat, 9 Feb 2019 15:38:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1E5D6FDED; Sat, 9 Feb 2019 15:38:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x19Fc6sB060785; Sat, 9 Feb 2019 07:38:06 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x19Fc6DV060784; Sat, 9 Feb 2019 07:38:06 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201902091538.x19Fc6DV060784@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343940 - in stable/12/usr.sbin/timed: timed timedc In-Reply-To: <201902091433.x19EXhev079726@repo.freebsd.org> To: Stefan Esser Date: Sat, 9 Feb 2019 07:38:06 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: A1E5D6FDED X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 15:38:12 -0000 > Author: se > Date: Sat Feb 9 14:33:43 2019 > New Revision: 343940 > URL: https://svnweb.freebsd.org/changeset/base/343940 > > Log: > Add notes regarding the deprecation and removal of timed and timedc in > -CURRENT to binaries and man-pages. > > This is a direct commit to -STABLE, since the removal from -CURRENT has > already been done. Thank you for cleaning this up. -- Rod Grimes rgrimes@freebsd.org