From owner-svn-src-stable-11@freebsd.org Sun Feb 23 03:13:40 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 230B3256E99; Sun, 23 Feb 2020 03:13:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 48Q9JM6f83z4CDw; Sun, 23 Feb 2020 03:13:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D39DB6004; Sun, 23 Feb 2020 03:13:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01N3DdSK071790; Sun, 23 Feb 2020 03:13:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01N3DcAD071785; Sun, 23 Feb 2020 03:13:38 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002230313.01N3DcAD071785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 23 Feb 2020 03:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358255 - in stable: 11/usr.sbin/cron/cron 11/usr.sbin/cron/lib 12/usr.sbin/cron/cron 12/usr.sbin/cron/lib X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.sbin/cron/cron 11/usr.sbin/cron/lib 12/usr.sbin/cron/cron 12/usr.sbin/cron/lib X-SVN-Commit-Revision: 358255 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 23 Feb 2020 03:13:40 -0000 Author: kevans Date: Sun Feb 23 03:13:38 2020 New Revision: 358255 URL: https://svnweb.freebsd.org/changeset/base/358255 Log: MFC r357714-r357715: cron(8): rip out some legacy bits r357714: cron(8): convert vfork() usage to fork() vfork() is error-prone, and the usage here definitely grew to not be clearly OK given vfork-semantics; e.g. setusercontext(3) within the child. Rip out vfork() and the rest of the references to it. fork is heavier, but it's unclear that the difference will be all that obvious. Reported by: Andrew Gierth and sigsys@gmail.com r357715: cron(8): rip out do_univ This was an old Dynix hack, the function is a NOP on FreeBSD. We have no need to retain this; Dynix was discontinued long ago. Modified: stable/11/usr.sbin/cron/cron/compat.h stable/11/usr.sbin/cron/cron/do_command.c stable/11/usr.sbin/cron/cron/externs.h stable/11/usr.sbin/cron/cron/popen.c stable/11/usr.sbin/cron/lib/compat.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.sbin/cron/cron/compat.h stable/12/usr.sbin/cron/cron/do_command.c stable/12/usr.sbin/cron/cron/externs.h stable/12/usr.sbin/cron/cron/popen.c stable/12/usr.sbin/cron/lib/compat.c Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.sbin/cron/cron/compat.h ============================================================================== --- stable/11/usr.sbin/cron/cron/compat.h Sat Feb 22 23:36:10 2020 (r358254) +++ stable/11/usr.sbin/cron/cron/compat.h Sun Feb 23 03:13:38 2020 (r358255) @@ -76,10 +76,6 @@ /*****************************************************************/ -#if !defined(BSD) && !defined(HPUX) && !defined(CONVEX) && !defined(__linux) -# define NEED_VFORK -#endif - #if (!defined(BSD) || (BSD < 198902)) && !defined(__linux) && \ !defined(IRIX) && !defined(NeXT) && !defined(HPUX) # define NEED_STRCASECMP Modified: stable/11/usr.sbin/cron/cron/do_command.c ============================================================================== --- stable/11/usr.sbin/cron/cron/do_command.c Sat Feb 22 23:36:10 2020 (r358254) +++ stable/11/usr.sbin/cron/cron/do_command.c Sun Feb 23 03:13:38 2020 (r358255) @@ -38,8 +38,7 @@ static const char rcsid[] = #endif -static void child_process(entry *, user *), - do_univ(user *); +static void child_process(entry *, user *); static WAIT_T wait_on_child(PID_T, const char *); @@ -56,9 +55,6 @@ do_command(e, u) /* fork to become asynchronous -- parent process is done immediately, * and continues to run the normal cron code, which means return to * tick(). the child and grandchild don't leave this function, alive. - * - * vfork() is unsuitable, since we have much to do, and the parent - * needs to be able to run off and fork other processes. */ switch ((pid = fork())) { case -1: @@ -220,13 +216,13 @@ child_process(e, u) /* fork again, this time so we can exec the user's command. */ - switch (jobpid = vfork()) { + switch (jobpid = fork()) { case -1: - log_it("CRON",getpid(),"error","can't vfork"); + log_it("CRON",getpid(),"error","can't fork"); exit(ERROR_EXIT); /*NOTREACHED*/ case 0: - Debug(DPROC, ("[%d] grandchild process Vfork()'ed\n", + Debug(DPROC, ("[%d] grandchild process fork()'ed\n", getpid())) if (e->uid == ROOT_UID) @@ -279,12 +275,6 @@ child_process(e, u) close(stdin_pipe[READ_PIPE]); close(stdout_pipe[WRITE_PIPE]); - /* set our login universe. Do this in the grandchild - * so that the child can invoke /usr/lib/sendmail - * without surprises. - */ - do_univ(u); - # if defined(LOGIN_CAP) /* Set user's entire context, but skip the environment * as cron provides a separate interface for this @@ -311,24 +301,24 @@ child_process(e, u) if (setgid(e->gid) != 0) { log_it(usernm, getpid(), "error", "setgid failed"); - exit(ERROR_EXIT); + _exit(ERROR_EXIT); } # if defined(BSD) if (initgroups(usernm, e->gid) != 0) { log_it(usernm, getpid(), "error", "initgroups failed"); - exit(ERROR_EXIT); + _exit(ERROR_EXIT); } # endif if (setlogin(usernm) != 0) { log_it(usernm, getpid(), "error", "setlogin failed"); - exit(ERROR_EXIT); + _exit(ERROR_EXIT); } if (setuid(e->uid) != 0) { log_it(usernm, getpid(), "error", "setuid failed"); - exit(ERROR_EXIT); + _exit(ERROR_EXIT); } /* we aren't root after this..*/ #if defined(LOGIN_CAP) @@ -626,42 +616,4 @@ wait_on_child(PID_T childpid, const char *name) { Debug(DPROC, ("\n")) return waiter; -} - - -static void -do_univ(u) - user *u; -{ -#if defined(sequent) -/* Dynix (Sequent) hack to put the user associated with - * the passed user structure into the ATT universe if - * necessary. We have to dig the gecos info out of - * the user's password entry to see if the magic - * "universe(att)" string is present. - */ - - struct passwd *p; - char *s; - int i; - - p = getpwuid(u->uid); - (void) endpwent(); - - if (p == NULL) - return; - - s = p->pw_gecos; - - for (i = 0; i < 4; i++) - { - if ((s = strchr(s, ',')) == NULL) - return; - s++; - } - if (strcmp(s, "universe(att)")) - return; - - (void) universe(U_ATT); -#endif } Modified: stable/11/usr.sbin/cron/cron/externs.h ============================================================================== --- stable/11/usr.sbin/cron/cron/externs.h Sat Feb 22 23:36:10 2020 (r358254) +++ stable/11/usr.sbin/cron/cron/externs.h Sun Feb 23 03:13:38 2020 (r358255) @@ -141,7 +141,3 @@ extern int getdtablesize(void); #ifdef NEED_SETENV extern int setenv(char *, char *, int); #endif - -#ifdef NEED_VFORK -extern PID_T vfork(void); -#endif Modified: stable/11/usr.sbin/cron/cron/popen.c ============================================================================== --- stable/11/usr.sbin/cron/cron/popen.c Sat Feb 22 23:36:10 2020 (r358254) +++ stable/11/usr.sbin/cron/cron/popen.c Sun Feb 23 03:13:38 2020 (r358255) @@ -112,7 +112,7 @@ cron_popen(program, type, e, pidptr) #endif iop = NULL; - switch(pid = vfork()) { + switch(pid = fork()) { case -1: /* error */ (void)close(pdes[0]); (void)close(pdes[1]); Modified: stable/11/usr.sbin/cron/lib/compat.c ============================================================================== --- stable/11/usr.sbin/cron/lib/compat.c Sat Feb 22 23:36:10 2020 (r358254) +++ stable/11/usr.sbin/cron/lib/compat.c Sun Feb 23 03:13:38 2020 (r358255) @@ -35,18 +35,6 @@ static char rcsid[] = "$FreeBSD$"; #include -/* the code does not depend on any of vfork's - * side-effects; it just uses it as a quick - * fork-and-exec. - */ -#ifdef NEED_VFORK -PID_T -vfork() { - return (fork()); -} -#endif - - #ifdef NEED_STRDUP char * strdup(str) From owner-svn-src-stable-11@freebsd.org Sun Feb 23 15:18:30 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09EBD23F6BE; Sun, 23 Feb 2020 15:18:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 48QTNj16yyz4BnR; Sun, 23 Feb 2020 15:18:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEE66E611; Sun, 23 Feb 2020 15:18:28 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01NFIS3r006357; Sun, 23 Feb 2020 15:18:28 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01NFISn2006356; Sun, 23 Feb 2020 15:18:28 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <202002231518.01NFISn2006356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 23 Feb 2020 15:18: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: r358259 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 358259 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 23 Feb 2020 15:18:30 -0000 Author: pfg Date: Sun Feb 23 15:18:28 2020 New Revision: 358259 URL: https://svnweb.freebsd.org/changeset/base/358259 Log: MFC r357414, r357415, r357417, r357423, r357424, r357587, r357655: ethernet: add some more Ethertypes. Add some types based on other BSDs and also add EtherCat, PROFINET, Powerlink and Sercos III which are IEC standards. There is a public list (CSV format) at: https://standards.ieee.org/products-services/regauth/ Spacing cleanups. No functional change. Modified: stable/11/sys/net/ethernet.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ethernet.h ============================================================================== --- stable/11/sys/net/ethernet.h Sun Feb 23 03:32:16 2020 (r358258) +++ stable/11/sys/net/ethernet.h Sun Feb 23 15:18:28 2020 (r358259) @@ -6,7 +6,7 @@ */ #ifndef _NET_ETHERNET_H_ -#define _NET_ETHERNET_H_ +#define _NET_ETHERNET_H_ /* * Some basic Ethernet constants. @@ -95,6 +95,11 @@ struct ether_vlan_header { ((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) /* + * Ethernet protocol types. + * + * A public list is available from the IEEE Registration Authority: + * https://standards.ieee.org/products-services/regauth/ + * * NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields. * However, there are some conflicts. */ @@ -263,7 +268,7 @@ struct ether_vlan_header { #define ETHERTYPE_AARP 0x80F3 /* AppleTalk AARP */ /* 0x80F4 - 0x80F5 Kinetics */ #define ETHERTYPE_APOLLO 0x80F7 /* Apollo Computer */ -#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging (XXX conflicts) */ +#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging (XXX conflicts) */ /* 0x80FF - 0x8101 Wellfleet Communications (XXX conflicts) */ #define ETHERTYPE_BOFL 0x8102 /* Wellfleet; BOFL (Breath OF Life) pkts [every 5-10 secs.] */ #define ETHERTYPE_WELLFLEET 0x8103 /* Wellfleet Communications */ @@ -336,15 +341,24 @@ struct ether_vlan_header { #define ETHERTYPE_SLOW 0x8809 /* 802.3ad link aggregation (LACP) */ #define ETHERTYPE_PPP 0x880B /* PPP (obsolete by PPPoE) */ #define ETHERTYPE_HITACHI 0x8820 /* Hitachi Cable (Optoelectronic Systems Laboratory) */ -#define ETHERTYPE_TEST 0x8822 /* Network Conformance Testing */ +#define ETHERTYPE_TEST 0x8822 /* Network Conformance Testing */ #define ETHERTYPE_MPLS 0x8847 /* MPLS Unicast */ #define ETHERTYPE_MPLS_MCAST 0x8848 /* MPLS Multicast */ #define ETHERTYPE_AXIS 0x8856 /* Axis Communications AB proprietary bootstrap/config */ #define ETHERTYPE_PPPOEDISC 0x8863 /* PPP Over Ethernet Discovery Stage */ #define ETHERTYPE_PPPOE 0x8864 /* PPP Over Ethernet Session Stage */ #define ETHERTYPE_LANPROBE 0x8888 /* HP LanProbe test? */ -#define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */ +#define ETHERTYPE_PAE 0x888E /* EAPOL PAE/802.1x */ +#define ETHERTYPE_PROFINET 0x8892 /* PROFINET RT Protocol */ +#define ETHERTYPE_AOE 0x88A2 /* ATA Protocol */ +#define ETHERTYPE_ETHERCAT 0x88A4 /* EtherCat Protocol */ #define ETHERTYPE_QINQ 0x88A8 /* 802.1ad VLAN stacking */ +#define ETHERTYPE_POWERLINK 0x88AB /* Ethernet Powerlink (EPL) */ +#define ETHERTYPE_LLDP 0x88CC /* Link Layer Discovery Protocol */ +#define ETHERTYPE_SERCOS 0x88CD /* SERCOS III Protocol */ +#define ETHERTYPE_MACSEC 0x88E5 /* 802.1AE MAC Security */ +#define ETHERTYPE_PBB 0x88E7 /* 802.1Q Provider Backbone Bridges */ +#define ETHERTYPE_FCOE 0x8906 /* Fibre Channel over Ethernet */ #define ETHERTYPE_LOOPBACK 0x9000 /* Loopback: used to test interfaces */ #define ETHERTYPE_LBACK ETHERTYPE_LOOPBACK /* DEC MOP loopback */ #define ETHERTYPE_XNSSM 0x9001 /* 3Com (Formerly Bridge Communications), XNS Systems Management */ @@ -375,7 +389,7 @@ struct ether_vlan_header { * ether_vlan_mtap. This function will re-insert VLAN tags for the duration * of the tap, so they show up properly for network analyzers. */ -#define ETHER_BPF_MTAP(_ifp, _m) do { \ +#define ETHER_BPF_MTAP(_ifp, _m) do { \ if (bpf_peers_present((_ifp)->if_bpf)) { \ M_ASSERTVALID(_m); \ if (((_m)->m_flags & M_VLANTAG) != 0) \ From owner-svn-src-stable-11@freebsd.org Mon Feb 24 09:50:20 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B2C5257475; Mon, 24 Feb 2020 09:50:20 +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 48Qy3c2WTMz4TrJ; Mon, 24 Feb 2020 09:50:20 +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 4997C2359D; Mon, 24 Feb 2020 09:50:20 +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 01O9oKRu079675; Mon, 24 Feb 2020 09:50:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01O9oK19079674; Mon, 24 Feb 2020 09:50:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002240950.01O9oK19079674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 24 Feb 2020 09:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358272 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 358272 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 24 Feb 2020 09:50:20 -0000 Author: hselasky Date: Mon Feb 24 09:50:19 2020 New Revision: 358272 URL: https://svnweb.freebsd.org/changeset/base/358272 Log: MFC r357799: Make sure the so-called end of receive interrupts don't starve in iflib. When the receive ring cannot be filled with mbufs, due to lack of memory, no more interrupts may be generated to fill the receive ring later on. Make sure to have a watchdog, to try refilling the receive ring from time to time, hopefully when more mbufs are available. Differential Revision: https://reviews.freebsd.org/D23315 Reviewed by: gallatin@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/net/iflib.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/iflib.c ============================================================================== --- stable/11/sys/net/iflib.c Mon Feb 24 09:38:47 2020 (r358271) +++ stable/11/sys/net/iflib.c Mon Feb 24 09:50:19 2020 (r358272) @@ -137,6 +137,9 @@ __FBSDID("$FreeBSD$"); */ static MALLOC_DEFINE(M_IFLIB, "iflib", "ifnet library"); +#define IFLIB_RXEOF_MORE (1U << 0) +#define IFLIB_RXEOF_EMPTY (2U << 0) + struct iflib_txq; typedef struct iflib_txq *iflib_txq_t; struct iflib_rxq; @@ -460,6 +463,7 @@ struct iflib_rxq { uint8_t ifr_txqid[IFLIB_MAX_TX_SHARED_INTR]; struct lro_ctrl ifr_lc; struct grouptask ifr_task; + struct callout ifr_watchdog; struct iflib_filter_info ifr_filter_info; iflib_dma_info_t ifr_ifdi; @@ -1806,7 +1810,7 @@ _rxq_refill_cb(void *arg, bus_dma_segment_t *segs, int * (Re)populate an rxq free-buffer list with up to @n new packet buffers. * The caller must assure that @n does not exceed the queue's capacity. */ -static void +static uint8_t _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count) { struct mbuf *m; @@ -1945,9 +1949,11 @@ done: BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, fl->ifl_id, pidx); fl->ifl_fragidx = frag_idx; + + return (n == -1 ? 0 : IFLIB_RXEOF_EMPTY); } -static __inline void +static __inline uint8_t __iflib_fl_refill_lt(if_ctx_t ctx, iflib_fl_t fl, int max) { /* we avoid allowing pidx to catch up with cidx as it confuses ixl */ @@ -1960,7 +1966,8 @@ __iflib_fl_refill_lt(if_ctx_t ctx, iflib_fl_t fl, int MPASS(reclaimable == delta); if (reclaimable > 0) - _iflib_fl_refill(ctx, fl, min(max, reclaimable)); + return (_iflib_fl_refill(ctx, fl, min(max, reclaimable))); + return (0); } uint8_t @@ -2052,7 +2059,7 @@ iflib_fl_setup(iflib_fl_t fl) /* avoid pre-allocating zillions of clusters to an idle card * potentially speeding up attach */ - _iflib_fl_refill(ctx, fl, min(128, fl->ifl_size)); + (void) _iflib_fl_refill(ctx, fl, min(128, fl->ifl_size)); MPASS(min(128, fl->ifl_size) == fl->ifl_credits); if (min(128, fl->ifl_size) != fl->ifl_credits) return (ENOBUFS); @@ -2536,7 +2543,15 @@ iflib_get_ip_forwarding(struct lro_ctrl *lc __unused, } #endif -static bool +static void +_task_fn_rx_watchdog(void *context) +{ + iflib_rxq_t rxq = context; + + GROUPTASK_ENQUEUE(&rxq->ifr_task); +} + +static uint8_t iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) { if_ctx_t ctx = rxq->ifr_ctx; @@ -2551,6 +2566,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) int lro_enabled; bool lro_possible = false; bool v4_forwarding, v6_forwarding; + uint8_t retval = 0; /* * XXX early demux data packets so that if_input processing only handles @@ -2568,9 +2584,9 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) cidxp = &rxq->ifr_fl[0].ifl_cidx; if ((avail = iflib_rxd_avail(ctx, rxq, *cidxp, budget)) == 0) { for (i = 0, fl = &rxq->ifr_fl[0]; i < sctx->isc_nfl; i++, fl++) - __iflib_fl_refill_lt(ctx, fl, budget + 8); + retval |= __iflib_fl_refill_lt(ctx, fl, budget + 8); DBG_COUNTER_INC(rx_unavail); - return (false); + return (retval); } for (budget_left = budget; (budget_left > 0) && (avail > 0); budget_left--, avail--) { @@ -2624,7 +2640,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) } /* make sure that we can refill faster than drain */ for (i = 0, fl = &rxq->ifr_fl[0]; i < sctx->isc_nfl; i++, fl++) - __iflib_fl_refill_lt(ctx, fl, budget + 8); + retval |= __iflib_fl_refill_lt(ctx, fl, budget + 8); lro_enabled = (if_getcapenable(ifp) & IFCAP_LRO); if (lro_enabled) @@ -2683,15 +2699,15 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) #if defined(INET6) || defined(INET) tcp_lro_flush_all(&rxq->ifr_lc); #endif - if (avail) - return true; - return (iflib_rxd_avail(ctx, rxq, *cidxp, 1)); + if (avail != 0 || iflib_rxd_avail(ctx, rxq, *cidxp, 1) != 0) + retval |= IFLIB_RXEOF_MORE; + return (retval); err: STATE_LOCK(ctx); ctx->ifc_flags |= IFC_DO_RESET; iflib_admin_intr_deferred(ctx); STATE_UNLOCK(ctx); - return (false); + return (0); } #define TXD_NOTIFY_COUNT(txq) (((txq)->ift_size / (txq)->ift_update_freq)-1) @@ -3701,7 +3717,7 @@ _task_fn_rx(void *context) { iflib_rxq_t rxq = context; if_ctx_t ctx = rxq->ifr_ctx; - bool more; + uint8_t more; int rc; uint16_t budget; @@ -3711,19 +3727,23 @@ _task_fn_rx(void *context) DBG_COUNTER_INC(task_fn_rxs); if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) return; - more = true; #ifdef DEV_NETMAP if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP) { u_int work = 0; if (netmap_rx_irq(ctx->ifc_ifp, rxq->ifr_id, &work)) { - more = false; + more = 0; + goto skip_rxeof; } } #endif budget = ctx->ifc_sysctl_rx_budget; if (budget == 0) budget = 16; /* XXX */ - if (more == false || (more = iflib_rxeof(rxq, budget)) == false) { + more = iflib_rxeof(rxq, budget); +#ifdef DEV_NETMAP +skip_rxeof: +#endif + if ((more & IFLIB_RXEOF_MORE) == 0) { if (ctx->ifc_flags & IFC_LEGACY) IFDI_INTR_ENABLE(ctx); else { @@ -3734,8 +3754,11 @@ _task_fn_rx(void *context) } if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) return; - if (more) + + if (more & IFLIB_RXEOF_MORE) GROUPTASK_ENQUEUE(&rxq->ifr_task); + else if (more & IFLIB_RXEOF_EMPTY) + callout_reset_curcpu(&rxq->ifr_watchdog, 1, &_task_fn_rx_watchdog, rxq); } static void @@ -4539,6 +4562,7 @@ iflib_device_deregister(if_ctx_t ctx) taskqgroup_detach(tqg, &txq->ift_task); } for (i = 0, rxq = ctx->ifc_rxqs; i < NRXQSETS(ctx); i++, rxq++) { + callout_drain(&rxq->ifr_watchdog); if (rxq->ifr_task.gt_uniq != NULL) taskqgroup_detach(tqg, &rxq->ifr_task); @@ -4898,6 +4922,7 @@ iflib_queues_alloc(if_ctx_t ctx) for (rxconf = i = 0; i < nrxqsets; i++, rxconf++, rxq++) { /* Set up some basics */ + callout_init(&rxq->ifr_watchdog, 1); if ((ifdip = malloc(sizeof(struct iflib_dma_info) * nrxqs, M_IFLIB, M_WAITOK|M_ZERO)) == NULL) { device_printf(dev, "failed to allocate iflib_dma_info\n"); From owner-svn-src-stable-11@freebsd.org Mon Feb 24 09:58:58 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBA6C257773; Mon, 24 Feb 2020 09:58:58 +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 48QyFZ4XWLz3Knc; Mon, 24 Feb 2020 09:58:58 +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 4A5102377F; Mon, 24 Feb 2020 09:58:58 +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 01O9wwXO085560; Mon, 24 Feb 2020 09:58:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01O9wvBp085557; Mon, 24 Feb 2020 09:58:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002240958.01O9wvBp085557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 24 Feb 2020 09:58:57 +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: r358274 - in stable/11/sys: net netinet netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys: net netinet netinet6 X-SVN-Commit-Revision: 358274 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 24 Feb 2020 09:58:59 -0000 Author: hselasky Date: Mon Feb 24 09:58:57 2020 New Revision: 358274 URL: https://svnweb.freebsd.org/changeset/base/358274 Log: MFC r358013: Fix kernel panic while trying to read multicast stream. When VIMAGE is enabled make sure the "m_pkthdr.rcvif" pointer is set for all mbufs being input by the IGMP/MLD6 code. Else there will be a NULL-pointer dereference in the netisr code when trying to set the VNET based on the incoming mbuf. Add an assert to catch this when queueing mbufs on a netisr to make debugging of similar cases easier. Found by: Vladislav V. Prodan PR: 244002 Reviewed by: bz@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/net/netisr.c stable/11/sys/netinet/igmp.c stable/11/sys/netinet6/mld6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/netisr.c ============================================================================== --- stable/11/sys/net/netisr.c Mon Feb 24 09:57:47 2020 (r358273) +++ stable/11/sys/net/netisr.c Mon Feb 24 09:58:57 2020 (r358274) @@ -1053,6 +1053,8 @@ netisr_queue_src(u_int proto, uintptr_t source, struct if (m != NULL) { KASSERT(!CPU_ABSENT(cpuid), ("%s: CPU %u absent", __func__, cpuid)); + VNET_ASSERT(m->m_pkthdr.rcvif != NULL, + ("%s:%d rcvif == NULL: m=%p", __func__, __LINE__, m)); error = netisr_queue_internal(proto, m, cpuid); } else error = ENOBUFS; Modified: stable/11/sys/netinet/igmp.c ============================================================================== --- stable/11/sys/netinet/igmp.c Mon Feb 24 09:57:47 2020 (r358273) +++ stable/11/sys/netinet/igmp.c Mon Feb 24 09:58:57 2020 (r358274) @@ -301,6 +301,7 @@ igmp_save_context(struct mbuf *m, struct ifnet *ifp) #ifdef VIMAGE m->m_pkthdr.PH_loc.ptr = ifp->if_vnet; #endif /* VIMAGE */ + m->m_pkthdr.rcvif = ifp; m->m_pkthdr.flowid = ifp->if_index; } Modified: stable/11/sys/netinet6/mld6.c ============================================================================== --- stable/11/sys/netinet6/mld6.c Mon Feb 24 09:57:47 2020 (r358273) +++ stable/11/sys/netinet6/mld6.c Mon Feb 24 09:58:57 2020 (r358274) @@ -277,6 +277,7 @@ mld_save_context(struct mbuf *m, struct ifnet *ifp) #ifdef VIMAGE m->m_pkthdr.PH_loc.ptr = ifp->if_vnet; #endif /* VIMAGE */ + m->m_pkthdr.rcvif = ifp; m->m_pkthdr.flowid = ifp->if_index; } From owner-svn-src-stable-11@freebsd.org Mon Feb 24 10:42:38 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6129258AD0; Mon, 24 Feb 2020 10:42:38 +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 48QzCy2tymz46g2; Mon, 24 Feb 2020 10:42:38 +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 D13CA240AD; Mon, 24 Feb 2020 10:42:37 +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 01OAgbrA016024; Mon, 24 Feb 2020 10:42:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OAgbiL016022; Mon, 24 Feb 2020 10:42:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002241042.01OAgbiL016022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 24 Feb 2020 10:42:37 +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: r358282 - stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 358282 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 24 Feb 2020 10:42:38 -0000 Author: hselasky Date: Mon Feb 24 10:42:37 2020 New Revision: 358282 URL: https://svnweb.freebsd.org/changeset/base/358282 Log: MFC r358220: Fix broken MLX5_IB_INDEX() macro in mlx5ib(4). The index should be computed as distance from arg[0] and not the beginning of struct mlx5_ib_congestion . While at it fix a use of zero length array to avoid depending on undefined compiler behaviour. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib.h stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib.h Mon Feb 24 10:41:36 2020 (r358281) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib.h Mon Feb 24 10:42:37 2020 (r358282) @@ -650,9 +650,13 @@ struct mlx5_ib_congestion { struct sysctl_ctx_list ctx; struct sx lock; struct delayed_work dwork; - u64 arg [0]; - MLX5_IB_CONG_PARAMS(MLX5_IB_STATS_VAR) - MLX5_IB_CONG_STATS(MLX5_IB_STATS_VAR) + union { + u64 arg[1]; + struct { + MLX5_IB_CONG_PARAMS(MLX5_IB_STATS_VAR) + MLX5_IB_CONG_STATS(MLX5_IB_STATS_VAR) + }; + }; }; struct mlx5_ib_dev { Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Mon Feb 24 10:41:36 2020 (r358281) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Mon Feb 24 10:42:37 2020 (r358282) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2020, Mellanox Technologies, Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -37,7 +37,9 @@ static const char *mlx5_ib_cong_stats_desc[] = { MLX5_IB_CONG_STATS(MLX5_IB_STATS_DESC) }; -#define MLX5_IB_INDEX(field) (__offsetof(struct mlx5_ib_congestion, field) / sizeof(u64)) +#define MLX5_IB_INDEX(field) ( \ + (__offsetof(struct mlx5_ib_congestion, field) - \ + __offsetof(struct mlx5_ib_congestion, arg[0])) / sizeof(u64)) #define MLX5_IB_FLD_MAX(type, field) ((1ULL << __mlx5_bit_sz(type, field)) - 1ULL) #define MLX5_IB_SET_CLIPPED(type, ptr, field, var) do { \ /* rangecheck */ \ From owner-svn-src-stable-11@freebsd.org Tue Feb 25 15:53:18 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94F9525ED31; Tue, 25 Feb 2020 15:53:18 +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 48Rk3y3VLqz4D09; Tue, 25 Feb 2020 15:53:18 +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 5C7DE18F2A; Tue, 25 Feb 2020 15:53:18 +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 01PFrIMD075681; Tue, 25 Feb 2020 15:53:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PFrHbl075678; Tue, 25 Feb 2020 15:53:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002251553.01PFrHbl075678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 25 Feb 2020 15:53: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: r358313 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 358313 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 25 Feb 2020 15:53:18 -0000 Author: mav Date: Tue Feb 25 15:53:17 2020 New Revision: 358313 URL: https://svnweb.freebsd.org/changeset/base/358313 Log: MFC r349381: Avoid extra taskq_dispatch() calls by DMU. DMU sync code calls taskq_dispatch() for each sublist of os_dirty_dnodes and os_synced_dnodes. Since the number of sublists by default is equal to number of CPUs, it will dispatch equal, potentially large, number of tasks, waking up many CPUs to handle them, even if only one or few of sublists actually have any work to do. This change adds check for empty sublists to avoid this. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Feb 25 15:52:35 2020 (r358312) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Feb 25 15:53:17 2020 (r358313) @@ -1294,6 +1294,8 @@ dmu_objset_sync(objset_t *os, zio_t *pio, dmu_tx_t *tx zio_t *zio; list_t *list; dbuf_dirty_record_t *dr; + int num_sublists; + multilist_t *ml; blkptr_t *blkptr_copy = kmem_alloc(sizeof (*os->os_rootbp), KM_SLEEP); *blkptr_copy = *os->os_rootbp; @@ -1362,10 +1364,13 @@ dmu_objset_sync(objset_t *os, zio_t *pio, dmu_tx_t *tx } } - for (int i = 0; - i < multilist_get_num_sublists(os->os_dirty_dnodes[txgoff]); i++) { + ml = os->os_dirty_dnodes[txgoff]; + num_sublists = multilist_get_num_sublists(ml); + for (int i = 0; i < num_sublists; i++) { + if (multilist_sublist_is_empty_idx(ml, i)) + continue; sync_dnodes_arg_t *sda = kmem_alloc(sizeof (*sda), KM_SLEEP); - sda->sda_list = os->os_dirty_dnodes[txgoff]; + sda->sda_list = ml; sda->sda_sublist_idx = i; sda->sda_tx = tx; (void) taskq_dispatch(dmu_objset_pool(os)->dp_sync_taskq, @@ -1579,6 +1584,8 @@ userquota_updates_task(void *arg) void dmu_objset_do_userquota_updates(objset_t *os, dmu_tx_t *tx) { + int num_sublists; + if (!dmu_objset_userused_enabled(os)) return; @@ -1592,8 +1599,10 @@ dmu_objset_do_userquota_updates(objset_t *os, dmu_tx_t DMU_OT_USERGROUP_USED, DMU_OT_NONE, 0, tx)); } - for (int i = 0; - i < multilist_get_num_sublists(os->os_synced_dnodes); i++) { + num_sublists = multilist_get_num_sublists(os->os_synced_dnodes); + for (int i = 0; i < num_sublists; i++) { + if (multilist_sublist_is_empty_idx(os->os_synced_dnodes, i)) + continue; userquota_updates_arg_t *uua = kmem_alloc(sizeof (*uua), KM_SLEEP); uua->uua_os = os; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c Tue Feb 25 15:52:35 2020 (r358312) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c Tue Feb 25 15:53:17 2020 (r358313) @@ -360,6 +360,28 @@ multilist_sublist_remove(multilist_sublist_t *mls, voi list_remove(&mls->mls_list, obj); } +int +multilist_sublist_is_empty(multilist_sublist_t *mls) +{ + ASSERT(MUTEX_HELD(&mls->mls_lock)); + return (list_is_empty(&mls->mls_list)); +} + +int +multilist_sublist_is_empty_idx(multilist_t *ml, unsigned int sublist_idx) +{ + multilist_sublist_t *mls; + int empty; + + ASSERT3U(sublist_idx, <, ml->ml_num_sublists); + mls = &ml->ml_sublists[sublist_idx]; + ASSERT(!MUTEX_HELD(&mls->mls_lock)); + mutex_enter(&mls->mls_lock); + empty = list_is_empty(&mls->mls_list); + mutex_exit(&mls->mls_lock); + return (empty); +} + void * multilist_sublist_head(multilist_sublist_t *mls) { Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Tue Feb 25 15:52:35 2020 (r358312) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Tue Feb 25 15:53:17 2020 (r358313) @@ -90,6 +90,8 @@ void multilist_sublist_insert_head(multilist_sublist_t void multilist_sublist_insert_tail(multilist_sublist_t *, void *); void multilist_sublist_move_forward(multilist_sublist_t *mls, void *obj); void multilist_sublist_remove(multilist_sublist_t *, void *); +int multilist_sublist_is_empty(multilist_sublist_t *); +int multilist_sublist_is_empty_idx(multilist_t *, unsigned int); void *multilist_sublist_head(multilist_sublist_t *); void *multilist_sublist_tail(multilist_sublist_t *); From owner-svn-src-stable-11@freebsd.org Tue Feb 25 21:02:53 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 260B12402E0; Tue, 25 Feb 2020 21:02:53 +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 48Rrx90HQ4z3K69; Tue, 25 Feb 2020 21:02:53 +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 04A851CA3D; Tue, 25 Feb 2020 21:02:53 +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 01PL2q8t065269; Tue, 25 Feb 2020 21:02:52 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PL2qa9065268; Tue, 25 Feb 2020 21:02:52 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202002252102.01PL2qa9065268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 25 Feb 2020 21:02: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: r358321 - in stable: 11/contrib/ipfilter/man 11/contrib/ipfilter/tools 12/contrib/ipfilter/man 12/contrib/ipfilter/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter/man 11/contrib/ipfilter/tools 12/contrib/ipfilter/man 12/contrib/ipfilter/tools X-SVN-Commit-Revision: 358321 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 25 Feb 2020 21:02:53 -0000 Author: cy Date: Tue Feb 25 21:02:52 2020 New Revision: 358321 URL: https://svnweb.freebsd.org/changeset/base/358321 Log: MFC r358064: As with ipf(8), give ippool(8) the ability to load IP pools from multiple files. This allows for loading, during the same invocation of ippool, of multiple sources of input using multiple tools to concurrently maintain the files such as fail2ban, macro preprocessors, and manually. Modified: stable/11/contrib/ipfilter/man/ippool.8 stable/11/contrib/ipfilter/tools/ippool.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/ipfilter/man/ippool.8 stable/12/contrib/ipfilter/tools/ippool.c Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/ipfilter/man/ippool.8 ============================================================================== --- stable/11/contrib/ipfilter/man/ippool.8 Tue Feb 25 19:29:05 2020 (r358320) +++ stable/11/contrib/ipfilter/man/ippool.8 Tue Feb 25 21:02:52 2020 (r358321) @@ -12,7 +12,7 @@ ippool \- user interface to the IPFilter pools -A [-dnv] [-m ] [-o ] [-S ] -t .br .B ippool --f [-dnuv] +-f [-dnuv] [-f ] [-t ] Modified: stable/11/contrib/ipfilter/tools/ippool.c ============================================================================== --- stable/11/contrib/ipfilter/tools/ippool.c Tue Feb 25 19:29:05 2020 (r358320) +++ stable/11/contrib/ipfilter/tools/ippool.c Tue Feb 25 21:02:52 2020 (r358321) @@ -377,12 +377,16 @@ loadpoolfile(argc, argv, infile) { int c; - while ((c = getopt(argc, argv, "dnuv")) != -1) + while ((c = getopt(argc, argv, "dnuvf:")) != -1) switch (c) { case 'd' : opts |= OPT_DEBUG; ippool_yydebug++; + break; + case 'f' : + if (loadpoolfile(argc, argv, optarg) != 0) + return(-1); break; case 'n' : opts |= OPT_DONOTHING|OPT_DONTOPEN; From owner-svn-src-stable-11@freebsd.org Thu Feb 27 00:57:03 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8AB8924D01A; Thu, 27 Feb 2020 00:57: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 48SZ4v12vlz3PdD; Thu, 27 Feb 2020 00:57:03 +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 F37838726; Thu, 27 Feb 2020 00:57: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 01R0v2LO064521; Thu, 27 Feb 2020 00:57:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01R0v2GY064520; Thu, 27 Feb 2020 00:57:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002270057.01R0v2GY064520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 27 Feb 2020 00:57: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: r358361 - stable/11/sys/dev/pci X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/pci X-SVN-Commit-Revision: 358361 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 27 Feb 2020 00:57:03 -0000 Author: kib Date: Thu Feb 27 00:57:02 2020 New Revision: 358361 URL: https://svnweb.freebsd.org/changeset/base/358361 Log: MFC r358174: Add more values for PCI capabilities, PCIe extended capabilities, and subclasses. Modified: stable/11/sys/dev/pci/pcireg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pci/pcireg.h ============================================================================== --- stable/11/sys/dev/pci/pcireg.h Thu Feb 27 00:55:31 2020 (r358360) +++ stable/11/sys/dev/pci/pcireg.h Thu Feb 27 00:57:02 2020 (r358361) @@ -150,6 +150,7 @@ #define PCIY_SATA 0x12 /* SATA */ #define PCIY_PCIAF 0x13 /* PCI Advanced Features */ #define PCIY_EA 0x14 /* PCI Extended Allocation */ +#define PCIY_FPB 0x15 /* Flattening Portal Bridge */ /* Extended Capability Register Fields */ @@ -193,6 +194,20 @@ #define PCIZ_LN_REQ 0x001c /* LN Requester */ #define PCIZ_DPC 0x001d /* Downstream Port Containment */ #define PCIZ_L1PM 0x001e /* L1 PM Substates */ +#define PCIZ_PTM 0x001f /* Precision Time Measurement */ +#define PCIZ_M_PCIE 0x0020 /* PCIe over M-PHY */ +#define PCIZ_FRS 0x0021 /* FRS Queuing */ +#define PCIZ_RTR 0x0022 /* Readiness Time Reporting */ +#define PCIZ_DVSEC 0x0023 /* Designated Vendor-Specific */ +#define PCIZ_VF_REBAR 0x0024 /* VF Resizable BAR */ +#define PCIZ_DLNK 0x0025 /* Data Link Feature */ +#define PCIZ_16GT 0x0026 /* Physical Layer 16.0 GT/s */ +#define PCIZ_LMR 0x0027 /* Lane Margining at Receiver */ +#define PCIZ_HIER_ID 0x0028 /* Hierarchy ID */ +#define PCIZ_NPEM 0x0029 /* Native PCIe Enclosure Management */ +#define PCIZ_PL32 0x002a /* Physical Layer 32.0 GT/s */ +#define PCIZ_AP 0x002b /* Alternate Protocol */ +#define PCIZ_SFI 0x002c /* System Firmware Intermediary */ /* config registers for header type 0 devices */ @@ -333,6 +348,8 @@ #define PCIS_STORAGE_NVM 0x08 #define PCIP_STORAGE_NVM_NVMHCI_1_0 0x01 #define PCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0 0x02 +#define PCIS_STORAGE_UFS 0x09 +#define PCIP_STORAGE_UFS_UFSHCI_1_0 0x01 #define PCIS_STORAGE_OTHER 0x80 #define PCIC_NETWORK 0x02 @@ -343,6 +360,8 @@ #define PCIS_NETWORK_ISDN 0x04 #define PCIS_NETWORK_WORLDFIP 0x05 #define PCIS_NETWORK_PICMG 0x06 +#define PCIS_NETWORK_INFINIBAND 0x07 +#define PCIS_NETWORK_HFC 0x08 #define PCIS_NETWORK_OTHER 0x80 #define PCIC_DISPLAY 0x03 @@ -356,6 +375,7 @@ #define PCIS_MULTIMEDIA_AUDIO 0x01 #define PCIS_MULTIMEDIA_TELE 0x02 #define PCIS_MULTIMEDIA_HDA 0x03 +#define PCIP_MULTIMEDIA_HDA_VENDOR 0x01 #define PCIS_MULTIMEDIA_OTHER 0x80 #define PCIC_MEMORY 0x05 @@ -376,6 +396,8 @@ #define PCIS_BRIDGE_RACEWAY 0x08 #define PCIS_BRIDGE_PCI_TRANSPARENT 0x09 #define PCIS_BRIDGE_INFINIBAND 0x0a +#define PCIS_BRIDGE_AS_PCI 0x0b +#define PCIS_BRIDGE_AS_PCI_ASI_SIG 0x01 #define PCIS_BRIDGE_OTHER 0x80 #define PCIC_SIMPLECOMM 0x07 @@ -407,6 +429,7 @@ #define PCIS_BASEPERIPH_PCIHOT 0x04 #define PCIS_BASEPERIPH_SDHC 0x05 #define PCIS_BASEPERIPH_IOMMU 0x06 +#define PCIS_BASEPERIPH_RCEC 0x07 #define PCIS_BASEPERIPH_OTHER 0x80 #define PCIC_INPUTDEV 0x09 @@ -449,6 +472,7 @@ #define PCIP_SERIALBUS_IPMI_BT 0x02 #define PCIS_SERIALBUS_SERCOS 0x08 #define PCIS_SERIALBUS_CANBUS 0x09 +#define PCIS_SERIALBUS_MIPI_I3C 0x0a #define PCIC_WIRELESS 0x0d #define PCIS_WIRELESS_IRDA 0x00 @@ -458,6 +482,8 @@ #define PCIS_WIRELESS_BROADBAND 0x12 #define PCIS_WIRELESS_80211A 0x20 #define PCIS_WIRELESS_80211B 0x21 +#define PCIS_WIRELESS_CELL 0x40 +#define PCIS_WIRELESS_CELL_E 0x41 #define PCIS_WIRELESS_OTHER 0x80 #define PCIC_INTELLIIO 0x0e From owner-svn-src-stable-11@freebsd.org Thu Feb 27 00:57:37 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F4F524D0E9; Thu, 27 Feb 2020 00:57:37 +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 48SZ5Y1tp8z3QnH; Thu, 27 Feb 2020 00:57:37 +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 2E8E88728; Thu, 27 Feb 2020 00:57:37 +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 01R0vbYP064603; Thu, 27 Feb 2020 00:57:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01R0van7064601; Thu, 27 Feb 2020 00:57:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002270057.01R0van7064601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 27 Feb 2020 00:57:36 +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: r358362 - stable/11/usr.sbin/pciconf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/usr.sbin/pciconf X-SVN-Commit-Revision: 358362 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 27 Feb 2020 00:57:37 -0000 Author: kib Date: Thu Feb 27 00:57:36 2020 New Revision: 358362 URL: https://svnweb.freebsd.org/changeset/base/358362 Log: MFC r358175: Print out some newly added PCIe extended capabilities and subclasses. Modified: stable/11/usr.sbin/pciconf/cap.c stable/11/usr.sbin/pciconf/pciconf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/pciconf/cap.c ============================================================================== --- stable/11/usr.sbin/pciconf/cap.c Thu Feb 27 00:57:02 2020 (r358361) +++ stable/11/usr.sbin/pciconf/cap.c Thu Feb 27 00:57:36 2020 (r358362) @@ -979,6 +979,20 @@ static struct { { PCIZ_LN_REQ, "LN Requester" }, { PCIZ_DPC, "Downstream Port Containment" }, { PCIZ_L1PM, "L1 PM Substates" }, + { PCIZ_PTM, "Precision Time Measurement" }, + { PCIZ_M_PCIE, "PCIe over M-PHY" }, + { PCIZ_FRS, "FRS Queuing" }, + { PCIZ_RTR, "Readiness Time Reporting" }, + { PCIZ_DVSEC, "Designated Vendor-Specific" }, + { PCIZ_VF_REBAR, "VF Resizable BAR" }, + { PCIZ_DLNK, "Data Link Feature" }, + { PCIZ_16GT, "Physical Layer 16.0 GT/s" }, + { PCIZ_LMR, "Lane Margining at Receiver" }, + { PCIZ_HIER_ID, "Hierarchy ID" }, + { PCIZ_NPEM, "Native PCIe Enclosure Management" }, + { PCIZ_PL32, "Physical Layer 32.0 GT/s" }, + { PCIZ_AP, "Alternate Protocol" }, + { PCIZ_SFI, "System Firmware Intermediary" }, { 0, NULL } }; Modified: stable/11/usr.sbin/pciconf/pciconf.c ============================================================================== --- stable/11/usr.sbin/pciconf/pciconf.c Thu Feb 27 00:57:02 2020 (r358361) +++ stable/11/usr.sbin/pciconf/pciconf.c Thu Feb 27 00:57:36 2020 (r358362) @@ -625,12 +625,17 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM"}, + {PCIC_STORAGE, PCIS_STORAGE_UFS, "UFS"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, {PCIC_NETWORK, PCIS_NETWORK_FDDI, "fddi"}, {PCIC_NETWORK, PCIS_NETWORK_ATM, "ATM"}, {PCIC_NETWORK, PCIS_NETWORK_ISDN, "ISDN"}, + {PCIC_NETWORK, PCIS_NETWORK_WORLDFIP, "WorldFip"}, + {PCIC_NETWORK, PCIS_NETWORK_PICMG, "PICMG"}, + {PCIC_NETWORK, PCIS_NETWORK_INFINIBAND, "InfiniBand"}, + {PCIC_NETWORK, PCIS_NETWORK_HFC, "host fabric"}, {PCIC_DISPLAY, -1, "display"}, {PCIC_DISPLAY, PCIS_DISPLAY_VGA, "VGA"}, {PCIC_DISPLAY, PCIS_DISPLAY_XGA, "XGA"}, @@ -653,6 +658,11 @@ static struct {PCIC_BRIDGE, PCIS_BRIDGE_NUBUS, "PCI-NuBus"}, {PCIC_BRIDGE, PCIS_BRIDGE_CARDBUS, "PCI-CardBus"}, {PCIC_BRIDGE, PCIS_BRIDGE_RACEWAY, "PCI-RACEway"}, + {PCIC_BRIDGE, PCIS_BRIDGE_PCI_TRANSPARENT, + "Semi-transparent PCI-to-PCI"}, + {PCIC_BRIDGE, PCIS_BRIDGE_INFINIBAND, "InfiniBand-PCI"}, + {PCIC_BRIDGE, PCIS_BRIDGE_AS_PCI, + "AdvancedSwitching-PCI"}, {PCIC_SIMPLECOMM, -1, "simple comms"}, {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_UART, "UART"}, /* could detect 16550 */ {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_PAR, "parallel port"}, @@ -666,6 +676,8 @@ static struct {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, "PCI hot-plug controller"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, "SD host controller"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_IOMMU, "IOMMU"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RCEC, + "Root Complex Event Collector"}, {PCIC_INPUTDEV, -1, "input device"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, "keyboard"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,"digitizer"}, @@ -681,10 +693,23 @@ static struct {PCIC_SERIALBUS, PCIS_SERIALBUS_USB, "USB"}, {PCIC_SERIALBUS, PCIS_SERIALBUS_FC, "Fibre Channel"}, {PCIC_SERIALBUS, PCIS_SERIALBUS_SMBUS, "SMBus"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_INFINIBAND, "InfiniBand"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_IPMI, "IPMI"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_SERCOS, "SERCOS"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_CANBUS, "CANbus"}, + {PCIC_SERIALBUS, PCIS_SERIALBUS_MIPI_I3C, "MIPI I3C"}, {PCIC_WIRELESS, -1, "wireless controller"}, {PCIC_WIRELESS, PCIS_WIRELESS_IRDA, "iRDA"}, {PCIC_WIRELESS, PCIS_WIRELESS_IR, "IR"}, {PCIC_WIRELESS, PCIS_WIRELESS_RF, "RF"}, + {PCIC_WIRELESS, PCIS_WIRELESS_BLUETOOTH, "bluetooth"}, + {PCIC_WIRELESS, PCIS_WIRELESS_BROADBAND, "broadband"}, + {PCIC_WIRELESS, PCIS_WIRELESS_80211A, "ethernet 802.11a"}, + {PCIC_WIRELESS, PCIS_WIRELESS_80211B, "ethernet 802.11b"}, + {PCIC_WIRELESS, PCIS_WIRELESS_CELL, + "cellular controller/modem"}, + {PCIC_WIRELESS, PCIS_WIRELESS_CELL_E, + "cellular controller/modem plus ethernet"}, {PCIC_INTELLIIO, -1, "intelligent I/O controller"}, {PCIC_INTELLIIO, PCIS_INTELLIIO_I2O, "I2O"}, {PCIC_SATCOM, -1, "satellite communication"}, From owner-svn-src-stable-11@freebsd.org Fri Feb 28 18:34:18 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03EB5241811; Fri, 28 Feb 2020 18:34:18 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 48TdVK630tz4CFh; Fri, 28 Feb 2020 18:34:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5089604C; Fri, 28 Feb 2020 18:34:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SIYH7R071905; Fri, 28 Feb 2020 18:34:17 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SIYHlS071904; Fri, 28 Feb 2020 18:34:17 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002281834.01SIYHlS071904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 28 Feb 2020 18:34: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: r358441 - in stable: 11/usr.sbin/certctl 12/usr.sbin/certctl X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.sbin/certctl 12/usr.sbin/certctl X-SVN-Commit-Revision: 358441 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 28 Feb 2020 18:34:18 -0000 Author: kevans Date: Fri Feb 28 18:34:17 2020 New Revision: 358441 URL: https://svnweb.freebsd.org/changeset/base/358441 Log: MFC r358091: certctl(8): switch to install(1) to fix DESTDIR support "Oops" - ln(1) is fine and dandy, but when you're using DESTDIR...it's not- the path will almost certainly be invalid once the root you've just installed to is relocated, perhaps to /. Switch to install(1) using `-l rs` to calculate the relative symlink between the two, which should work just fine in all cases. Modified: stable/11/usr.sbin/certctl/certctl.sh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.sbin/certctl/certctl.sh Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.sbin/certctl/certctl.sh ============================================================================== --- stable/11/usr.sbin/certctl/certctl.sh Fri Feb 28 18:32:40 2020 (r358440) +++ stable/11/usr.sbin/certctl/certctl.sh Fri Feb 28 18:34:17 2020 (r358441) @@ -69,7 +69,7 @@ create_trusted_link() return 1 fi [ $VERBOSE -gt 0 ] && echo "Adding $hash.0 to trust store" - [ $NOOP -eq 0 ] && ln -fs $(realpath "$1") "$CERTDESTDIR/$hash.0" + [ $NOOP -eq 0 ] && install -lrs $(realpath "$1") "$CERTDESTDIR/$hash.0" } create_blacklisted() @@ -88,7 +88,7 @@ create_blacklisted() return fi [ $VERBOSE -gt 0 ] && echo "Adding $filename to blacklist" - [ $NOOP -eq 0 ] && ln -fs "$srcfile" "$BLACKLISTDESTDIR/$filename" + [ $NOOP -eq 0 ] && install -lrs "$srcfile" "$BLACKLISTDESTDIR/$filename" } do_scan() From owner-svn-src-stable-11@freebsd.org Fri Feb 28 18:35:38 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48127241918; Fri, 28 Feb 2020 18:35:38 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 48TdWs0r0cz4Fpn; Fri, 28 Feb 2020 18:35:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABC1E6055; Fri, 28 Feb 2020 18:35:36 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SIZac3072051; Fri, 28 Feb 2020 18:35:36 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SIZadF072050; Fri, 28 Feb 2020 18:35:36 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002281835.01SIZadF072050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 28 Feb 2020 18:35:36 +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: r358442 - in stable: 11/stand/common 12/stand/common X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/common 12/stand/common X-SVN-Commit-Revision: 358442 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 28 Feb 2020 18:35:38 -0000 Author: kevans Date: Fri Feb 28 18:35:36 2020 New Revision: 358442 URL: https://svnweb.freebsd.org/changeset/base/358442 Log: MFC r357828: interp_lua: fix bogus indentation, NFC Modified: stable/11/stand/common/interp_lua.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/common/interp_lua.c Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/common/interp_lua.c ============================================================================== --- stable/11/stand/common/interp_lua.c Fri Feb 28 18:34:17 2020 (r358441) +++ stable/11/stand/common/interp_lua.c Fri Feb 28 18:35:36 2020 (r358442) @@ -124,10 +124,10 @@ interp_init(void) filename = LOADER_LUA; if (interp_include(filename) != 0) { - const char *errstr = lua_tostring(luap, -1); - errstr = errstr == NULL ? "unknown" : errstr; - printf("Startup error in %s:\nLUA ERROR: %s.\n", filename, errstr); - lua_pop(luap, 1); + const char *errstr = lua_tostring(luap, -1); + errstr = errstr == NULL ? "unknown" : errstr; + printf("Startup error in %s:\nLUA ERROR: %s.\n", filename, errstr); + lua_pop(luap, 1); setenv("autoboot_delay", "NO", 1); } } @@ -144,7 +144,7 @@ interp_run(const char *line) luap = softc->luap; LDBG("executing line..."); if ((status = luaL_dostring(luap, line)) != 0) { - lua_pop(luap, 1); + lua_pop(luap, 1); /* * The line wasn't executable as lua; run it through parse to * to get consistent parsing of command line arguments, then From owner-svn-src-stable-11@freebsd.org Fri Feb 28 22:00:51 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2284B2471B2; Fri, 28 Feb 2020 22:00:51 +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 48Tk4f6RpWz3F9y; Fri, 28 Feb 2020 22:00:50 +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 D7FBC86AF; Fri, 28 Feb 2020 22:00:50 +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 01SM0oje097507; Fri, 28 Feb 2020 22:00:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SM0oEb097506; Fri, 28 Feb 2020 22:00:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002282200.01SM0oEb097506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 28 Feb 2020 22:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358453 - stable/11/sys/dev/usb/input X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/input X-SVN-Commit-Revision: 358453 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-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, 28 Feb 2020 22:00:51 -0000 Author: hselasky Date: Fri Feb 28 22:00:50 2020 New Revision: 358453 URL: https://svnweb.freebsd.org/changeset/base/358453 Log: MFC r358310: Use hid_get_data_unsigned() instead of hid_get_data() when reading the key-codes from the USB keyboard. Negative key-codes are currently skipped. While at it use the bit size value provided by the HID location structure instead of assuming a value of 8. This fixes a regression issue after r357861. Reported by: Minoru TANABE PR: 224592 PR: 233884 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/input/ukbd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/11/sys/dev/usb/input/ukbd.c Fri Feb 28 22:00:01 2020 (r358452) +++ stable/11/sys/dev/usb/input/ukbd.c Fri Feb 28 22:00:50 2020 (r358453) @@ -723,13 +723,15 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t } else if (id != sc->sc_id_loc_key[i]) { continue; /* invalid HID ID */ } else if (i == 0) { - offset = sc->sc_loc_key[0].count; - if (offset < 0 || offset > len) - offset = len; - while (offset--) { + struct hid_location tmp_loc = sc->sc_loc_key[0]; + /* range check array size */ + if (tmp_loc.count > UKBD_NKEYCODE) + tmp_loc.count = UKBD_NKEYCODE; + while (tmp_loc.count--) { uint32_t key = - hid_get_data(sc->sc_buffer + offset, len - offset, - &sc->sc_loc_key[i]); + hid_get_data_unsigned(sc->sc_buffer, len, &tmp_loc); + /* advance to next location */ + tmp_loc.pos += tmp_loc.size; if (modifiers & MOD_FN) key = ukbd_apple_fn(key); if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP)