From owner-svn-src-stable-11@freebsd.org Sun Feb 3 00:36:13 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-11@freebsd.org Sun Feb 3 00:44:27 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-11@freebsd.org Sun Feb 3 00:45:53 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-11@freebsd.org Mon Feb 4 03:44:08 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-11@freebsd.org Mon Feb 4 08:37:17 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-11@freebsd.org Tue Feb 5 02:33:58 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-11@freebsd.org Tue Feb 5 03:01:12 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-11@freebsd.org Tue Feb 5 10:33:23 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-11@freebsd.org Tue Feb 5 17:54:03 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-11@freebsd.org Tue Feb 5 17:57:31 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-11@freebsd.org Tue Feb 5 22:08:50 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-11@freebsd.org Wed Feb 6 01:42:27 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-11@freebsd.org Wed Feb 6 01:47:23 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-11@freebsd.org Wed Feb 6 01:53:02 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-11@freebsd.org Wed Feb 6 02:06:01 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-11@freebsd.org Wed Feb 6 02:18:12 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-11@freebsd.org Wed Feb 6 02:35:57 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-11@freebsd.org Wed Feb 6 09:38:45 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-11@freebsd.org Wed Feb 6 09:49:43 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-11@freebsd.org Wed Feb 6 10:00:42 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-11@freebsd.org Thu Feb 7 01:55:13 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-11@freebsd.org Thu Feb 7 06:55:27 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-11@freebsd.org Thu Feb 7 10:44:54 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-11@freebsd.org Thu Feb 7 21:22:02 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-11@freebsd.org Thu Feb 7 23:55:13 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-11@freebsd.org Fri Feb 8 03:29:18 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-11@freebsd.org Fri Feb 8 04:48:13 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-11@freebsd.org Fri Feb 8 10:27:04 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-11@freebsd.org Fri Feb 8 13:57:29 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-11@freebsd.org Fri Feb 8 14:27:26 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-11@freebsd.org Sat Feb 9 02:10:04 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-11@freebsd.org Sat Feb 9 12:01:12 2019 Return-Path: Delivered-To: svn-src-stable-11@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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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); }