From owner-svn-src-stable@freebsd.org Sun Mar 24 22:10:29 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CC6C15461DA; Sun, 24 Mar 2019 22:10:29 +0000 (UTC) (envelope-from jilles@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 D33386AC22; Sun, 24 Mar 2019 22:10:28 +0000 (UTC) (envelope-from jilles@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 AC23126648; Sun, 24 Mar 2019 22:10:28 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OMAS9M016025; Sun, 24 Mar 2019 22:10:28 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OMAQIT016012; Sun, 24 Mar 2019 22:10:26 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903242210.x2OMAQIT016012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 24 Mar 2019 22:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345487 - in stable/12/bin/sh: . tests/execution X-SVN-Group: stable-12 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in stable/12/bin/sh: . tests/execution X-SVN-Commit-Revision: 345487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D33386AC22 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 22:10:29 -0000 Author: jilles Date: Sun Mar 24 22:10:26 2019 New Revision: 345487 URL: https://svnweb.freebsd.org/changeset/base/345487 Log: MFC r344502: sh: Add set -o pipefail The pipefail option allows checking the exit status of all commands in a pipeline more easily, at a limited cost of complexity in sh itself. It works similarly to the option in bash, ksh93 and mksh. Like ksh93 and unlike bash and mksh, the state of the option is saved when a pipeline is started. Therefore, even in the case of commands like A | B & a later change of the option does not affect the exit status, the same way (A | B) & works. Since SIGPIPE is not handled specially, more work in the script is required for a proper exit status for pipelines containing commands such as head that may terminate successfully without reading all input. This can be something like ( cmd1 r=$? if [ "$r" -gt 128 ] && [ "$(kill -l "$r")" = PIPE ]; then exit 0 else exit "$r" fi ) | head PR: 244270 Relnotes: yes Added: stable/12/bin/sh/tests/execution/pipefail1.0 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail1.0 stable/12/bin/sh/tests/execution/pipefail2.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail2.42 stable/12/bin/sh/tests/execution/pipefail3.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail3.42 stable/12/bin/sh/tests/execution/pipefail4.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail4.42 stable/12/bin/sh/tests/execution/pipefail5.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail5.42 stable/12/bin/sh/tests/execution/pipefail6.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail6.42 stable/12/bin/sh/tests/execution/pipefail7.0 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail7.0 Modified: stable/12/bin/sh/jobs.c stable/12/bin/sh/options.h stable/12/bin/sh/sh.1 stable/12/bin/sh/tests/execution/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/sh/jobs.c ============================================================================== --- stable/12/bin/sh/jobs.c Sun Mar 24 20:43:21 2019 (r345486) +++ stable/12/bin/sh/jobs.c Sun Mar 24 22:10:26 2019 (r345487) @@ -104,6 +104,7 @@ struct job { char changed; /* true if status has changed */ char foreground; /* true if running in the foreground */ char remembered; /* true if $! referenced */ + char pipefail; /* pass any non-zero status */ #if JOBS char jobctl; /* job running under job control */ struct job *next; /* job used after this one */ @@ -143,6 +144,7 @@ static void setcurjob(struct job *); static void deljob(struct job *); static struct job *getcurjob(struct job *); #endif +static int getjobstatus(const struct job *); static void printjobcmd(struct job *); static void showjob(struct job *, int); @@ -340,6 +342,20 @@ jobscmd(int argc __unused, char *argv[] __unused) return (0); } +static int getjobstatus(const struct job *jp) +{ + int i, status; + + if (!jp->pipefail) + return (jp->ps[jp->nprocs - 1].status); + for (i = jp->nprocs - 1; i >= 0; i--) { + status = jp->ps[i].status; + if (status != 0) + return (status); + } + return (0); +} + static void printjobcmd(struct job *jp) { @@ -376,7 +392,7 @@ showjob(struct job *jp, int mode) } #endif coredump = ""; - status = jp->ps[jp->nprocs - 1].status; + status = getjobstatus(jp); if (jp->state == 0) { statestr = "Running"; #if JOBS @@ -555,7 +571,7 @@ waitcmdloop(struct job *job) do { if (job != NULL) { if (job->state == JOBDONE) { - status = job->ps[job->nprocs - 1].status; + status = getjobstatus(job); if (WIFEXITED(status)) retval = WEXITSTATUS(status); else @@ -780,6 +796,7 @@ makejob(union node *node __unused, int nprocs) jp->nprocs = 0; jp->foreground = 0; jp->remembered = 0; + jp->pipefail = pipefailflag; #if JOBS jp->jobctl = jobctl; jp->next = NULL; @@ -1075,7 +1092,7 @@ waitforjob(struct job *jp, int *signaled) if (jp->state == JOBSTOPPED) setcurjob(jp); #endif - status = jp->ps[jp->nprocs - 1].status; + status = getjobstatus(jp); if (signaled != NULL) *signaled = WIFSIGNALED(status); /* convert to 8 bits */ Modified: stable/12/bin/sh/options.h ============================================================================== --- stable/12/bin/sh/options.h Sun Mar 24 20:43:21 2019 (r345486) +++ stable/12/bin/sh/options.h Sun Mar 24 22:10:26 2019 (r345487) @@ -67,9 +67,10 @@ struct shparam { #define Pflag optval[17] #define hflag optval[18] #define nologflag optval[19] +#define pipefailflag optval[20] #define NSHORTOPTS 19 -#define NOPTS 20 +#define NOPTS 21 extern char optval[NOPTS]; extern const char optletter[NSHORTOPTS]; @@ -97,6 +98,7 @@ static const unsigned char optname[] = "\010physical" "\010trackall" "\005nolog" + "\010pipefail" ; #endif Modified: stable/12/bin/sh/sh.1 ============================================================================== --- stable/12/bin/sh/sh.1 Sun Mar 24 20:43:21 2019 (r345486) +++ stable/12/bin/sh/sh.1 Sun Mar 24 22:10:26 2019 (r345487) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd July 19, 2018 +.Dd February 24, 2019 .Dt SH 1 .Os .Sh NAME @@ -343,6 +343,18 @@ Useful for debugging. .It Li nolog Another do-nothing option for POSIX compliance. It only has a long name. +.It Li pipefail +Change the exit status of a pipeline to the last non-zero exit status of +any command in the pipeline, if any. +Since an exit due to +.Dv SIGPIPE +counts as a non-zero exit status, +this option may cause non-zero exit status for successful pipelines +if a command such as +.Xr head 1 +in the pipeline terminates with status 0 without reading its +input completely. +This option only has a long name. .El .Pp The @@ -856,12 +868,15 @@ If the keyword .Ic !\& does not precede the pipeline, the exit status is the exit status of the last command specified -in the pipeline. +in the pipeline if the +.Cm pipefail +option is not set or all commands returned zero, +or the last non-zero exit status of any command in the pipeline otherwise. Otherwise, the exit status is the logical -NOT of the exit status of the last command. +NOT of that exit status. That is, if -the last command returns zero, the exit status is 1; if -the last command returns greater than zero, the exit status +that status is zero, the exit status is 1; if +that status is greater than zero, the exit status is zero. .Pp Because pipeline assignment of standard input or standard Modified: stable/12/bin/sh/tests/execution/Makefile ============================================================================== --- stable/12/bin/sh/tests/execution/Makefile Sun Mar 24 20:43:21 2019 (r345486) +++ stable/12/bin/sh/tests/execution/Makefile Sun Mar 24 22:10:26 2019 (r345487) @@ -30,6 +30,13 @@ ${PACKAGE}FILES+= killed2.0 ${PACKAGE}FILES+= not1.0 ${PACKAGE}FILES+= not2.0 ${PACKAGE}FILES+= path1.0 +${PACKAGE}FILES+= pipefail1.0 +${PACKAGE}FILES+= pipefail2.42 +${PACKAGE}FILES+= pipefail3.42 +${PACKAGE}FILES+= pipefail4.42 +${PACKAGE}FILES+= pipefail5.42 +${PACKAGE}FILES+= pipefail6.42 +${PACKAGE}FILES+= pipefail7.0 ${PACKAGE}FILES+= redir1.0 ${PACKAGE}FILES+= redir2.0 ${PACKAGE}FILES+= redir3.0 Copied: stable/12/bin/sh/tests/execution/pipefail1.0 (from r344502, head/bin/sh/tests/execution/pipefail1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail1.0 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail1.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +: && : | : && : | : | : && : | : | : | : Copied: stable/12/bin/sh/tests/execution/pipefail2.42 (from r344502, head/bin/sh/tests/execution/pipefail2.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail2.42 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail2.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : Copied: stable/12/bin/sh/tests/execution/pipefail3.42 (from r344502, head/bin/sh/tests/execution/pipefail3.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail3.42 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail3.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +: | (exit 42) Copied: stable/12/bin/sh/tests/execution/pipefail4.42 (from r344502, head/bin/sh/tests/execution/pipefail4.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail4.42 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail4.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +(exit 43) | (exit 42) Copied: stable/12/bin/sh/tests/execution/pipefail5.42 (from r344502, head/bin/sh/tests/execution/pipefail5.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail5.42 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail5.42) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : & +wait %+ Copied: stable/12/bin/sh/tests/execution/pipefail6.42 (from r344502, head/bin/sh/tests/execution/pipefail6.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail6.42 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail6.42) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : & +set +o pipefail +wait %+ Copied: stable/12/bin/sh/tests/execution/pipefail7.0 (from r344502, head/bin/sh/tests/execution/pipefail7.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail7.0 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail7.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +(exit 42) | : & +set -o pipefail +wait %+ From owner-svn-src-stable@freebsd.org Mon Mar 25 14:04:25 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E90241562A3B; Mon, 25 Mar 2019 14:04:24 +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 8E40A6D73B; Mon, 25 Mar 2019 14:04:24 +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 69D6A8DBE; Mon, 25 Mar 2019 14:04:24 +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 x2PE4OeO049284; Mon, 25 Mar 2019 14:04:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PE4Ok5049283; Mon, 25 Mar 2019 14:04:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903251404.x2PE4Ok5049283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Mar 2019 14:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345500 - stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall X-SVN-Commit-Revision: 345500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E40A6D73B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 14:04:25 -0000 Author: markj Date: Mon Mar 25 14:04:23 2019 New Revision: 345500 URL: https://svnweb.freebsd.org/changeset/base/345500 Log: MFC r345355: Ensure that we use a 64-bit value for the last mmap() argument. Modified: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Mon Mar 25 13:50:38 2019 (r345499) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Mon Mar 25 14:04:23 2019 (r345500) @@ -35,7 +35,8 @@ int main(int argc, char **argv) { for (;;) { - (void) __syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678); + (void) __syscall(SYS_mmap, NULL, (size_t)1, 2, 3, -1, + (off_t)0x12345678); } return (0); From owner-svn-src-stable@freebsd.org Mon Mar 25 14:05:37 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 506BF1562AAF; Mon, 25 Mar 2019 14:05:37 +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 8FA886D886; Mon, 25 Mar 2019 14:05:36 +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 6B5338DBF; Mon, 25 Mar 2019 14:05:36 +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 x2PE5aN9049445; Mon, 25 Mar 2019 14:05:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PE5aoh049444; Mon, 25 Mar 2019 14:05:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903251405.x2PE5aoh049444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Mar 2019 14:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345501 - in stable/12: contrib/netbsd-tests/lib/libpthread lib/libthr/thread X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12: contrib/netbsd-tests/lib/libpthread lib/libthr/thread X-SVN-Commit-Revision: 345501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8FA886D886 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 14:05:37 -0000 Author: markj Date: Mon Mar 25 14:05:35 2019 New Revision: 345501 URL: https://svnweb.freebsd.org/changeset/base/345501 Log: MFC r344935: Have pthread_cond_destroy() return EBUSY if the condvar has waiters. PR: 234805 Modified: stable/12/contrib/netbsd-tests/lib/libpthread/t_cond.c stable/12/lib/libthr/thread/thr_cond.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/netbsd-tests/lib/libpthread/t_cond.c ============================================================================== --- stable/12/contrib/netbsd-tests/lib/libpthread/t_cond.c Mon Mar 25 14:04:23 2019 (r345500) +++ stable/12/contrib/netbsd-tests/lib/libpthread/t_cond.c Mon Mar 25 14:05:35 2019 (r345501) @@ -493,6 +493,51 @@ ATF_TC_BODY(bogus_timedwaits, tc) PTHREAD_REQUIRE(pthread_mutex_unlock(&static_mutex)); } +#ifdef __FreeBSD__ +static void * +destroy_busy_threadfunc(void *arg) +{ + PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + + share = 1; + PTHREAD_REQUIRE(pthread_cond_broadcast(&cond)); + PTHREAD_REQUIRE(pthread_cond_wait(&cond, &mutex)); + + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); + + return NULL; +} + +ATF_TC(destroy_busy); +ATF_TC_HEAD(destroy_busy, tc) +{ + atf_tc_set_md_var(tc, "descr", "Checks non-standard behaviour of " + "returning EBUSY when attempting to destroy an active condvar"); +} +ATF_TC_BODY(destroy_busy, tc) +{ + pthread_t thread; + + PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); + PTHREAD_REQUIRE(pthread_cond_init(&cond, NULL)); + PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(pthread_create(&thread, NULL, destroy_busy_threadfunc, + NULL)); + + while (share == 0) { + PTHREAD_REQUIRE(pthread_cond_wait(&cond, &mutex)); + } + + PTHREAD_REQUIRE_STATUS(pthread_cond_destroy(&cond), EBUSY); + PTHREAD_REQUIRE(pthread_cond_signal(&cond)); + PTHREAD_REQUIRE(pthread_cond_destroy(&cond)); + + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); + PTHREAD_REQUIRE(pthread_join(thread, NULL)); + PTHREAD_REQUIRE(pthread_mutex_destroy(&mutex)); +} +#endif + static void unlock(void *arg) { @@ -547,6 +592,49 @@ ATF_TC_BODY(destroy_after_cancel, tc) PTHREAD_REQUIRE(pthread_mutex_destroy(&mutex)); } +static void * +destroy_after_signal_threadfunc(void *arg) +{ + PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + + share = 1; + PTHREAD_REQUIRE(pthread_cond_broadcast(&cond)); + PTHREAD_REQUIRE(pthread_cond_wait(&cond, &mutex)); + + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); + + return NULL; +} + +ATF_TC(destroy_after_signal); +ATF_TC_HEAD(destroy_after_signal, tc) +{ + atf_tc_set_md_var(tc, "descr", "Checks destroying a condition variable " + "immediately after signaling waiters"); +} +ATF_TC_BODY(destroy_after_signal, tc) +{ + pthread_t thread; + + PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); + PTHREAD_REQUIRE(pthread_cond_init(&cond, NULL)); + PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(pthread_create(&thread, NULL, + destroy_after_signal_threadfunc, NULL)); + + while (share == 0) { + PTHREAD_REQUIRE(pthread_cond_wait(&cond, &mutex)); + } + + PTHREAD_REQUIRE(pthread_cond_signal(&cond)); + PTHREAD_REQUIRE(pthread_cond_destroy(&cond)); + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); + + PTHREAD_REQUIRE(pthread_join(thread, NULL)); + + PTHREAD_REQUIRE(pthread_mutex_destroy(&mutex)); +} + ATF_TC(condattr); ATF_TC_HEAD(condattr, tc) { @@ -577,7 +665,11 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, cond_timedwait_race); ATF_TP_ADD_TC(tp, broadcast); ATF_TP_ADD_TC(tp, bogus_timedwaits); +#ifdef __FreeBSD__ + ATF_TP_ADD_TC(tp, destroy_busy); +#endif ATF_TP_ADD_TC(tp, destroy_after_cancel); + ATF_TP_ADD_TC(tp, destroy_after_signal); ATF_TP_ADD_TC(tp, condattr); return atf_no_error(); Modified: stable/12/lib/libthr/thread/thr_cond.c ============================================================================== --- stable/12/lib/libthr/thread/thr_cond.c Mon Mar 25 14:04:23 2019 (r345500) +++ stable/12/lib/libthr/thread/thr_cond.c Mon Mar 25 14:05:35 2019 (r345501) @@ -166,17 +166,26 @@ _pthread_cond_destroy(pthread_cond_t *cond) error = 0; if (*cond == THR_PSHARED_PTR) { cvp = __thr_pshared_offpage(cond, 0); - if (cvp != NULL) - __thr_pshared_destroy(cond); - *cond = THR_COND_DESTROYED; + if (cvp != NULL) { + if (cvp->kcond.c_has_waiters) + error = EBUSY; + else + __thr_pshared_destroy(cond); + } + if (error == 0) + *cond = THR_COND_DESTROYED; } else if ((cvp = *cond) == THR_COND_INITIALIZER) { /* nothing */ } else if (cvp == THR_COND_DESTROYED) { error = EINVAL; } else { cvp = *cond; - *cond = THR_COND_DESTROYED; - free(cvp); + if (cvp->__has_user_waiters || cvp->kcond.c_has_waiters) + error = EBUSY; + else { + *cond = THR_COND_DESTROYED; + free(cvp); + } } return (error); } From owner-svn-src-stable@freebsd.org Mon Mar 25 14:08:51 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4C131562C90; Mon, 25 Mar 2019 14:08:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 888BD6DC0B; Mon, 25 Mar 2019 14:08:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63B998DDE; Mon, 25 Mar 2019 14:08:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PE8oZu049800; Mon, 25 Mar 2019 14:08:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PE8nVS049794; Mon, 25 Mar 2019 14:08:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903251408.x2PE8nVS049794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Mar 2019 14:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345502 - in stable/12: sys/kern sys/sys usr.bin/procstat X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12: sys/kern sys/sys usr.bin/procstat X-SVN-Commit-Revision: 345502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 888BD6DC0B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 14:08:51 -0000 Author: markj Date: Mon Mar 25 14:08:49 2019 New Revision: 345502 URL: https://svnweb.freebsd.org/changeset/base/345502 Log: MFC r344823: Show wiring state of map entries in procstat -v. Modified: stable/12/sys/kern/kern_proc.c stable/12/sys/sys/user.h stable/12/usr.bin/procstat/procstat.1 stable/12/usr.bin/procstat/procstat_vm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_proc.c ============================================================================== --- stable/12/sys/kern/kern_proc.c Mon Mar 25 14:05:35 2019 (r345501) +++ stable/12/sys/kern/kern_proc.c Mon Mar 25 14:08:49 2019 (r345502) @@ -2460,6 +2460,8 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, s kve->kve_flags |= KVME_FLAG_GROWS_UP; if (entry->eflags & MAP_ENTRY_GROWS_DOWN) kve->kve_flags |= KVME_FLAG_GROWS_DOWN; + if (entry->eflags & MAP_ENTRY_USER_WIRED) + kve->kve_flags |= KVME_FLAG_USER_WIRED; last_timestamp = map->timestamp; vm_map_unlock_read(map); Modified: stable/12/sys/sys/user.h ============================================================================== --- stable/12/sys/sys/user.h Mon Mar 25 14:05:35 2019 (r345501) +++ stable/12/sys/sys/user.h Mon Mar 25 14:08:49 2019 (r345502) @@ -471,6 +471,7 @@ struct kinfo_file { #define KVME_FLAG_SUPER 0x00000008 #define KVME_FLAG_GROWS_UP 0x00000010 #define KVME_FLAG_GROWS_DOWN 0x00000020 +#define KVME_FLAG_USER_WIRED 0x00000040 #if defined(__amd64__) #define KINFO_OVMENTRY_SIZE 1168 Modified: stable/12/usr.bin/procstat/procstat.1 ============================================================================== --- stable/12/usr.bin/procstat/procstat.1 Mon Mar 25 14:05:35 2019 (r345501) +++ stable/12/usr.bin/procstat/procstat.1 Mon Mar 25 14:08:49 2019 (r345502) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2017 +.Dd March 4, 2019 .Dt PROCSTAT 1 .Os .Sh NAME @@ -662,6 +662,11 @@ one or more superpage mappings are used grows down (top-down stack) .It U grows up (bottom-up stack) +.It W +pages in this range are locked by +.Xr mlock 2 +or +.Xr mlockall 2 .El .Ss ELF Auxiliary Vector Display ELF auxiliary vector values: @@ -684,6 +689,8 @@ auxiliary vector value .Xr sockstat 1 , .Xr cap_enter 2 , .Xr cap_rights_limit 2 , +.Xr mlock 2 , +.Xr mlockall 2 , .Xr libprocstat 3 , .Xr libxo 3 , .Xr signal 3 , Modified: stable/12/usr.bin/procstat/procstat_vm.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_vm.c Mon Mar 25 14:05:35 2019 (r345501) +++ stable/12/usr.bin/procstat/procstat_vm.c Mon Mar 25 14:08:49 2019 (r345502) @@ -53,7 +53,7 @@ procstat_vm(struct procstat *procstat, struct kinfo_pr ptrwidth = 2*sizeof(void *) + 2; if ((procstat_opts & PS_OPT_NOHEADER) == 0) - xo_emit("{T:/%5s %*s %*s %3s %4s %4s %3s %3s %-4s %-2s %-s}\n", + xo_emit("{T:/%5s %*s %*s %3s %4s %4s %3s %3s %-5s %-2s %-s}\n", "PID", ptrwidth, "START", ptrwidth, "END", "PRT", "RES", "PRES", "REF", "SHD", "FLAG", "TP", "PATH"); @@ -98,9 +98,11 @@ procstat_vm(struct procstat *procstat, struct kinfo_pr KVME_FLAG_NEEDS_COPY ? "N" : "-"); xo_emit("{d:super_pages/%-1s}", kve->kve_flags & KVME_FLAG_SUPER ? "S" : "-"); - xo_emit("{d:grows_down/%-1s} ", kve->kve_flags & + xo_emit("{d:grows_down/%-1s}", kve->kve_flags & KVME_FLAG_GROWS_UP ? "U" : kve->kve_flags & KVME_FLAG_GROWS_DOWN ? "D" : "-"); + xo_emit("{d:wired/%-1s} ", kve->kve_flags & + KVME_FLAG_USER_WIRED ? "W" : "-"); xo_open_container("kve_flags"); xo_emit("{en:copy_on_write/%s}", kve->kve_flags & KVME_FLAG_COW ? "true" : "false"); @@ -112,6 +114,8 @@ procstat_vm(struct procstat *procstat, struct kinfo_pr KVME_FLAG_GROWS_UP ? "true" : "false"); xo_emit("{en:grows_down/%s}", kve->kve_flags & KVME_FLAG_GROWS_DOWN ? "true" : "false"); + xo_emit("{en:wired/%s}", kve->kve_flags & + KVME_FLAG_USER_WIRED ? "true" : "false"); xo_close_container("kve_flags"); switch (kve->kve_type) { case KVME_TYPE_NONE: From owner-svn-src-stable@freebsd.org Mon Mar 25 14:50:40 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BD4F1563DC1; Mon, 25 Mar 2019 14:50:40 +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 C3D736F7F8; Mon, 25 Mar 2019 14:50:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E37494C3; Mon, 25 Mar 2019 14:50:39 +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 x2PEodJI073540; Mon, 25 Mar 2019 14:50:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PEodCZ073538; Mon, 25 Mar 2019 14:50:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201903251450.x2PEodCZ073538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 25 Mar 2019 14:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345503 - stable/12/release/arm64 X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12/release/arm64 X-SVN-Commit-Revision: 345503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C3D736F7F8 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.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 14:50:40 -0000 Author: gjb Date: Mon Mar 25 14:50:38 2019 New Revision: 345503 URL: https://svnweb.freebsd.org/changeset/base/345503 Log: MFC 345379: Bump the IMAGE_SIZE for arm64 SoC images to prevent failures due to full filesystem. This makes the size of the arm64 SoC images consistent with armv6 and armv7. Sponsored by: The FreeBSD Foundation Modified: stable/12/release/arm64/PINE64-LTS.conf stable/12/release/arm64/PINE64.conf stable/12/release/arm64/RPI3.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/release/arm64/PINE64-LTS.conf ============================================================================== --- stable/12/release/arm64/PINE64-LTS.conf Mon Mar 25 14:08:49 2019 (r345502) +++ stable/12/release/arm64/PINE64-LTS.conf Mon Mar 25 14:50:38 2019 (r345503) @@ -9,7 +9,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-sopine" FAT_SIZE="54m -b 1m" FAT_TYPE="16" -IMAGE_SIZE="2560M" +IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 Modified: stable/12/release/arm64/PINE64.conf ============================================================================== --- stable/12/release/arm64/PINE64.conf Mon Mar 25 14:08:49 2019 (r345502) +++ stable/12/release/arm64/PINE64.conf Mon Mar 25 14:50:38 2019 (r345503) @@ -9,7 +9,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-pine64" FAT_SIZE="54m -b 1m" FAT_TYPE="16" -IMAGE_SIZE="2560M" +IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 Modified: stable/12/release/arm64/RPI3.conf ============================================================================== --- stable/12/release/arm64/RPI3.conf Mon Mar 25 14:08:49 2019 (r345502) +++ stable/12/release/arm64/RPI3.conf Mon Mar 25 14:50:38 2019 (r345503) @@ -11,7 +11,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-rpi3 sysutils/rpi-firmware" FAT_SIZE="50m -b 1m" FAT_TYPE="16" -IMAGE_SIZE="2560M" +IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 From owner-svn-src-stable@freebsd.org Mon Mar 25 17:03:40 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 641851546100; Mon, 25 Mar 2019 17:03:40 +0000 (UTC) (envelope-from dab@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 C8CCA75900; Mon, 25 Mar 2019 17:03:39 +0000 (UTC) (envelope-from dab@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 B668CACB2; Mon, 25 Mar 2019 17:03:39 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PH3dpa059332; Mon, 25 Mar 2019 17:03:39 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PH3dHC059331; Mon, 25 Mar 2019 17:03:39 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201903251703.x2PH3dHC059331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 25 Mar 2019 17:03:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345506 - stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Group: stable-12 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Commit-Revision: 345506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C8CCA75900 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_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:03:40 -0000 Author: dab Date: Mon Mar 25 17:03:39 2019 New Revision: 345506 URL: https://svnweb.freebsd.org/changeset/base/345506 Log: MFC r345009: Fix a scribbler in the PMS driver. The ESGL bit was left uninitialized when executing the REPORT LUNS ioctl. This could allow a zeroed data buffer to be treated as a scatter/gather list. The firmware would eventually walk past the end of the data buffer, potentially find what looked like a valid address/length pair, and write the result to semi-random memory. Obtained from: Dell EMC Isilon Sponsored by: Dell EMC Isilon Modified: stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c ============================================================================== --- stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 16:40:54 2019 (r345505) +++ stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:03:39 2019 (r345506) @@ -1874,7 +1874,9 @@ tiNumOfLunIOCTLreq( agSSPFrame->dataLength = REPORT_LUN_LEN; agSSPFrame->agSgl.len = sizeof(agsaSSPCmdInfoUnit_t); - + agSSPFrame->agSgl.extReserved = 0; + CLEAR_ESGL_EXTEND(agSSPFrame->agSgl.extReserved); + status = saSSPStart(agRoot, agIORequest, 0, agDevHandle, agRequestType,agSASRequestBody,agNULL, &ossaSSPIoctlCompleted); if(status != AGSA_RC_SUCCESS) From owner-svn-src-stable@freebsd.org Mon Mar 25 17:04:15 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80D1F1546179; Mon, 25 Mar 2019 17:04:15 +0000 (UTC) (envelope-from dab@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 25C7775A3E; Mon, 25 Mar 2019 17:04:15 +0000 (UTC) (envelope-from dab@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 00C34ACB5; Mon, 25 Mar 2019 17:04:15 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PH4EaG059467; Mon, 25 Mar 2019 17:04:14 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PH4EQ5059466; Mon, 25 Mar 2019 17:04:14 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201903251704.x2PH4EQ5059466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 25 Mar 2019 17:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345507 - stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Group: stable-11 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Commit-Revision: 345507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 25C7775A3E 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)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:04:15 -0000 Author: dab Date: Mon Mar 25 17:04:14 2019 New Revision: 345507 URL: https://svnweb.freebsd.org/changeset/base/345507 Log: MFC r345009: Fix a scribbler in the PMS driver. The ESGL bit was left uninitialized when executing the REPORT LUNS ioctl. This could allow a zeroed data buffer to be treated as a scatter/gather list. The firmware would eventually walk past the end of the data buffer, potentially find what looked like a valid address/length pair, and write the result to semi-random memory. Obtained from: Dell EMC Isilon Sponsored by: Dell EMC Isilon Modified: stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c ============================================================================== --- stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:03:39 2019 (r345506) +++ stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:04:14 2019 (r345507) @@ -1874,7 +1874,9 @@ tiNumOfLunIOCTLreq( agSSPFrame->dataLength = REPORT_LUN_LEN; agSSPFrame->agSgl.len = sizeof(agsaSSPCmdInfoUnit_t); - + agSSPFrame->agSgl.extReserved = 0; + CLEAR_ESGL_EXTEND(agSSPFrame->agSgl.extReserved); + status = saSSPStart(agRoot, agIORequest, 0, agDevHandle, agRequestType,agSASRequestBody,agNULL, &ossaSSPIoctlCompleted); if(status != AGSA_RC_SUCCESS) From owner-svn-src-stable@freebsd.org Mon Mar 25 17:04:34 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 327B415461EB; Mon, 25 Mar 2019 17:04:34 +0000 (UTC) (envelope-from dab@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 CAAEF75B76; Mon, 25 Mar 2019 17:04:33 +0000 (UTC) (envelope-from dab@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 A7DD1ACB6; Mon, 25 Mar 2019 17:04:33 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PH4Xbs059558; Mon, 25 Mar 2019 17:04:33 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PH4Xld059557; Mon, 25 Mar 2019 17:04:33 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201903251704.x2PH4Xld059557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 25 Mar 2019 17:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r345508 - stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Group: stable-10 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Commit-Revision: 345508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CAAEF75B76 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]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:04:34 -0000 Author: dab Date: Mon Mar 25 17:04:33 2019 New Revision: 345508 URL: https://svnweb.freebsd.org/changeset/base/345508 Log: MFC r345009: Fix a scribbler in the PMS driver. The ESGL bit was left uninitialized when executing the REPORT LUNS ioctl. This could allow a zeroed data buffer to be treated as a scatter/gather list. The firmware would eventually walk past the end of the data buffer, potentially find what looked like a valid address/length pair, and write the result to semi-random memory. Obtained from: Dell EMC Isilon Sponsored by: Dell EMC Isilon Modified: stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c ============================================================================== --- stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:04:14 2019 (r345507) +++ stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:04:33 2019 (r345508) @@ -1874,7 +1874,9 @@ tiNumOfLunIOCTLreq( agSSPFrame->dataLength = REPORT_LUN_LEN; agSSPFrame->agSgl.len = sizeof(agsaSSPCmdInfoUnit_t); - + agSSPFrame->agSgl.extReserved = 0; + CLEAR_ESGL_EXTEND(agSSPFrame->agSgl.extReserved); + status = saSSPStart(agRoot, agIORequest, 0, agDevHandle, agRequestType,agSASRequestBody,agNULL, &ossaSSPIoctlCompleted); if(status != AGSA_RC_SUCCESS) From owner-svn-src-stable@freebsd.org Mon Mar 25 17:45:49 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1827154778B; Mon, 25 Mar 2019 17:45:49 +0000 (UTC) (envelope-from jkim@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 42445778B7; Mon, 25 Mar 2019 17:45:49 +0000 (UTC) (envelope-from jkim@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 1EC4BB3A6; Mon, 25 Mar 2019 17:45:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PHjnfE085166; Mon, 25 Mar 2019 17:45:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PHjmIs085163; Mon, 25 Mar 2019 17:45:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201903251745.x2PHjmIs085163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 25 Mar 2019 17:45:48 +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: r345509 - in stable: 11/share/examples/etc 11/share/mk 12/share/examples/etc 12/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable: 11/share/examples/etc 11/share/mk 12/share/examples/etc 12/share/mk X-SVN-Commit-Revision: 345509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 42445778B7 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.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:45:49 -0000 Author: jkim Date: Mon Mar 25 17:45:47 2019 New Revision: 345509 URL: https://svnweb.freebsd.org/changeset/base/345509 Log: MFC: r345387 Catch up with Clang 7.0. Modified: stable/11/share/examples/etc/make.conf stable/11/share/mk/bsd.cpu.mk Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/share/examples/etc/make.conf stable/12/share/mk/bsd.cpu.mk Directory Properties: stable/12/ (props changed) Modified: stable/11/share/examples/etc/make.conf ============================================================================== --- stable/11/share/examples/etc/make.conf Mon Mar 25 17:04:33 2019 (r345508) +++ stable/11/share/examples/etc/make.conf Mon Mar 25 17:45:47 2019 (r345509) @@ -45,7 +45,8 @@ # Additionally the following CPU types are recognized by clang: # Intel x86 architecture (for both amd64 and i386): # (AMD CPUs) znver1, bdver4, bdver3, bdver2, bdver1, btver2, btver1 -# (Intel CPUs) cannonlake, knm, skylake-avx512, knl, goldmont, +# (Intel CPUs) tremont, goldmont-plus, icelake-server, icelake-client, +# cannonlake, knm, skylake-avx512, knl, goldmont, # skylake, broadwell, haswell, ivybridge, # sandybridge, westmere, nehalem, silvermont, bonnell # Modified: stable/11/share/mk/bsd.cpu.mk ============================================================================== --- stable/11/share/mk/bsd.cpu.mk Mon Mar 25 17:04:33 2019 (r345508) +++ stable/11/share/mk/bsd.cpu.mk Mon Mar 25 17:45:47 2019 (r345509) @@ -31,6 +31,8 @@ MACHINE_CPU = ultrasparc . if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "barcelona" CPUTYPE = amdfam10 +. elif ${CPUTYPE} == "skx" +CPUTYPE = skylake-avx512 . elif ${CPUTYPE} == "core-avx2" CPUTYPE = haswell . elif ${CPUTYPE} == "core-avx-i" @@ -202,7 +204,8 @@ MACHINE_CPU = 3dnow mmx k6 k5 i586 MACHINE_CPU = mmx k6 k5 i586 . elif ${CPUTYPE} == "k5" MACHINE_CPU = k5 i586 -. elif ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ +. elif ${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ + ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ @@ -210,7 +213,8 @@ MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 s MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 -. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ +. elif ${CPUTYPE} == "tremont" || ${CPUTYPE} == "goldmont-plus" || \ + ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ ${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "penryn" @@ -265,7 +269,8 @@ MACHINE_CPU = k8 3dnow sse3 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ ${CPUTYPE} == "athlon-fx" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow -. elif ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ +. elif ${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ + ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ @@ -273,7 +278,8 @@ MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 -. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ +. elif ${CPUTYPE} == "tremont" || ${CPUTYPE} == "goldmont-plus" || \ + ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ ${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "penryn" From owner-svn-src-stable@freebsd.org Mon Mar 25 17:45:49 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86641154778A; Mon, 25 Mar 2019 17:45:49 +0000 (UTC) (envelope-from jkim@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 DDB6A778B6; Mon, 25 Mar 2019 17:45:48 +0000 (UTC) (envelope-from jkim@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 AC834B3A5; Mon, 25 Mar 2019 17:45:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PHjmdj085158; Mon, 25 Mar 2019 17:45:48 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PHjmmJ085155; Mon, 25 Mar 2019 17:45:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201903251745.x2PHjmmJ085155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 25 Mar 2019 17:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345509 - in stable: 11/share/examples/etc 11/share/mk 12/share/examples/etc 12/share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable: 11/share/examples/etc 11/share/mk 12/share/examples/etc 12/share/mk X-SVN-Commit-Revision: 345509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DDB6A778B6 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.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:45:49 -0000 Author: jkim Date: Mon Mar 25 17:45:47 2019 New Revision: 345509 URL: https://svnweb.freebsd.org/changeset/base/345509 Log: MFC: r345387 Catch up with Clang 7.0. Modified: stable/12/share/examples/etc/make.conf stable/12/share/mk/bsd.cpu.mk Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/examples/etc/make.conf stable/11/share/mk/bsd.cpu.mk Directory Properties: stable/11/ (props changed) Modified: stable/12/share/examples/etc/make.conf ============================================================================== --- stable/12/share/examples/etc/make.conf Mon Mar 25 17:04:33 2019 (r345508) +++ stable/12/share/examples/etc/make.conf Mon Mar 25 17:45:47 2019 (r345509) @@ -45,7 +45,8 @@ # Additionally the following CPU types are recognized by clang: # Intel x86 architecture (for both amd64 and i386): # (AMD CPUs) znver1, bdver4, bdver3, bdver2, bdver1, btver2, btver1 -# (Intel CPUs) cannonlake, knm, skylake-avx512, knl, goldmont, +# (Intel CPUs) tremont, goldmont-plus, icelake-server, icelake-client, +# cannonlake, knm, skylake-avx512, knl, goldmont, # skylake, broadwell, haswell, ivybridge, # sandybridge, westmere, nehalem, silvermont, bonnell # Modified: stable/12/share/mk/bsd.cpu.mk ============================================================================== --- stable/12/share/mk/bsd.cpu.mk Mon Mar 25 17:04:33 2019 (r345508) +++ stable/12/share/mk/bsd.cpu.mk Mon Mar 25 17:45:47 2019 (r345509) @@ -31,6 +31,8 @@ MACHINE_CPU = ultrasparc . if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "barcelona" CPUTYPE = amdfam10 +. elif ${CPUTYPE} == "skx" +CPUTYPE = skylake-avx512 . elif ${CPUTYPE} == "core-avx2" CPUTYPE = haswell . elif ${CPUTYPE} == "core-avx-i" @@ -199,7 +201,8 @@ MACHINE_CPU = 3dnow mmx k6 k5 i586 MACHINE_CPU = mmx k6 k5 i586 . elif ${CPUTYPE} == "k5" MACHINE_CPU = k5 i586 -. elif ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ +. elif ${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ + ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ @@ -207,7 +210,8 @@ MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 s MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 -. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ +. elif ${CPUTYPE} == "tremont" || ${CPUTYPE} == "goldmont-plus" || \ + ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ ${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "penryn" @@ -262,7 +266,8 @@ MACHINE_CPU = k8 3dnow sse3 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ ${CPUTYPE} == "athlon-fx" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow -. elif ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ +. elif ${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ + ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ @@ -270,7 +275,8 @@ MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 -. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ +. elif ${CPUTYPE} == "tremont" || ${CPUTYPE} == "goldmont-plus" || \ + ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ ${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "penryn" From owner-svn-src-stable@freebsd.org Mon Mar 25 18:19:38 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77AED1548699; Mon, 25 Mar 2019 18:19:38 +0000 (UTC) (envelope-from glebius@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 1BCD58148E; Mon, 25 Mar 2019 18:19:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB77EB8C0; Mon, 25 Mar 2019 18:19:37 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PIJbUr005341; Mon, 25 Mar 2019 18:19:37 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PIJbNE005340; Mon, 25 Mar 2019 18:19:37 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903251819.x2PIJbNE005340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 25 Mar 2019 18:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345511 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 345511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1BCD58148E 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_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 18:19:38 -0000 Author: glebius Date: Mon Mar 25 18:19:37 2019 New Revision: 345511 URL: https://svnweb.freebsd.org/changeset/base/345511 Log: Merge r344741: Remove bogus assert that I added in r319722. It is a legitimate case to call soabort() on a newborn socket created by sonewconn() in case if further setup of PCB failed. Code in sofree() handles such socket correctly. Submitted by: jtl, rrs Modified: stable/12/sys/kern/uipc_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/uipc_socket.c ============================================================================== --- stable/12/sys/kern/uipc_socket.c Mon Mar 25 18:02:04 2019 (r345510) +++ stable/12/sys/kern/uipc_socket.c Mon Mar 25 18:19:37 2019 (r345511) @@ -1174,7 +1174,6 @@ soabort(struct socket *so) KASSERT(so->so_count == 0, ("soabort: so_count")); KASSERT((so->so_state & SS_PROTOREF) == 0, ("soabort: SS_PROTOREF")); KASSERT(so->so_state & SS_NOFDREF, ("soabort: !SS_NOFDREF")); - KASSERT(so->so_qstate == SQ_NONE, ("soabort: !SQ_NONE")); VNET_SO_ASSERT(so); if (so->so_proto->pr_usrreqs->pru_abort != NULL) From owner-svn-src-stable@freebsd.org Tue Mar 26 10:58:31 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3199D154C958; Tue, 26 Mar 2019 10:58:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 CE5578B271; Tue, 26 Mar 2019 10:58:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A79381EB44; Tue, 26 Mar 2019 10:58:30 +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 x2QAwUqr045993; Tue, 26 Mar 2019 10:58:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QAwUF5045991; Tue, 26 Mar 2019 10:58:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903261058.x2QAwUF5045991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 26 Mar 2019 10:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345528 - in stable/12: . share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: . share/man/man4 X-SVN-Commit-Revision: 345528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CE5578B271 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 10:58:31 -0000 Author: kib Date: Tue Mar 26 10:58:29 2019 New Revision: 345528 URL: https://svnweb.freebsd.org/changeset/base/345528 Log: MFC r345442: Add UPDATING note for geom_uzip(4)/xz, and bump geom_uzip(4) man page date. Modified: stable/12/UPDATING stable/12/share/man/man4/geom_uzip.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/UPDATING ============================================================================== --- stable/12/UPDATING Tue Mar 26 10:41:27 2019 (r345527) +++ stable/12/UPDATING Tue Mar 26 10:58:29 2019 (r345528) @@ -27,6 +27,11 @@ from older version of current across the gcc/clang cut prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. +20190226: + geom_uzip(4) depends on the new module xz. If geom_uzip is statically + compiled into your custom kernel, add 'device xz' statement to the + kernel config. + 20190214: Iflib is no longer unconditionally compiled into the kernel. Drivers using iflib and statically compiled into the kernel, now require Modified: stable/12/share/man/man4/geom_uzip.4 ============================================================================== --- stable/12/share/man/man4/geom_uzip.4 Tue Mar 26 10:41:27 2019 (r345527) +++ stable/12/share/man/man4/geom_uzip.4 Tue Mar 26 10:58:29 2019 (r345528) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 9, 2006 +.Dd February 26, 2019 .Dt GEOM_UZIP 4 .Os .Sh NAME From owner-svn-src-stable@freebsd.org Tue Mar 26 11:01:31 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AC37154CC79; Tue, 26 Mar 2019 11:01:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 ABE858B897; Tue, 26 Mar 2019 11:01:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 839D71EB98; Tue, 26 Mar 2019 11:01:30 +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 x2QB1Ugc048048; Tue, 26 Mar 2019 11:01:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QB1UFW048047; Tue, 26 Mar 2019 11:01:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903261101.x2QB1UFW048047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 26 Mar 2019 11:01: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: r345529 - in stable/11: . share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: . share/man/man4 X-SVN-Commit-Revision: 345529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ABE858B897 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 11:01:31 -0000 Author: kib Date: Tue Mar 26 11:01:29 2019 New Revision: 345529 URL: https://svnweb.freebsd.org/changeset/base/345529 Log: MFC r345442: Add UPDATING note for geom_uzip(4)/xz, and bump geom_uzip(4) man page date. Modified: stable/11/UPDATING stable/11/share/man/man4/geom_uzip.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Tue Mar 26 10:58:29 2019 (r345528) +++ stable/11/UPDATING Tue Mar 26 11:01:29 2019 (r345529) @@ -16,6 +16,11 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20190226: + geom_uzip(4) depends on the new module xz. If geom_uzip is statically + compiled into your custom kernel, add 'device xz' statement to the + kernel config. + 20190220: Co-existance for Forth and Lua interpreters in bootloaders has now been merged to ease testing of lualoader. LOADER_DEFAULT_INTERP, documented Modified: stable/11/share/man/man4/geom_uzip.4 ============================================================================== --- stable/11/share/man/man4/geom_uzip.4 Tue Mar 26 10:58:29 2019 (r345528) +++ stable/11/share/man/man4/geom_uzip.4 Tue Mar 26 11:01:29 2019 (r345529) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 9, 2006 +.Dd February 26, 2019 .Dt GEOM_UZIP 4 .Os .Sh NAME From owner-svn-src-stable@freebsd.org Tue Mar 26 11:03:10 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8998154CFBB; Tue, 26 Mar 2019 11:03:10 +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 4AE4E8BB40; Tue, 26 Mar 2019 11:03:10 +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 233A41ED13; Tue, 26 Mar 2019 11:03:10 +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 x2QB3Aoa051349; Tue, 26 Mar 2019 11:03:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QB398m051346; Tue, 26 Mar 2019 11:03:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903261103.x2QB398m051346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 26 Mar 2019 11:03:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345530 - stable/12/sys/dev/isci X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/dev/isci X-SVN-Commit-Revision: 345530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4AE4E8BB40 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 11:03:10 -0000 Author: kib Date: Tue Mar 26 11:03:09 2019 New Revision: 345530 URL: https://svnweb.freebsd.org/changeset/base/345530 Log: MFC r345070: isci(4): Use controller->lock for busdma tags. Modified: stable/12/sys/dev/isci/isci.c stable/12/sys/dev/isci/isci.h stable/12/sys/dev/isci/isci_controller.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/isci/isci.c ============================================================================== --- stable/12/sys/dev/isci/isci.c Tue Mar 26 11:01:29 2019 (r345529) +++ stable/12/sys/dev/isci/isci.c Tue Mar 26 11:03:09 2019 (r345530) @@ -408,7 +408,8 @@ isci_allocate_dma_buffer_callback(void *arg, bus_dma_s } int -isci_allocate_dma_buffer(device_t device, struct ISCI_MEMORY *memory) +isci_allocate_dma_buffer(device_t device, struct ISCI_CONTROLLER *controller, + struct ISCI_MEMORY *memory) { uint32_t status; @@ -416,7 +417,8 @@ isci_allocate_dma_buffer(device_t device, struct ISCI_ 0x40 /* cacheline alignment */, 0x0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, memory->size, 0x1 /* we want physically contiguous */, - memory->size, 0, NULL, NULL, &memory->dma_tag); + memory->size, 0, busdma_lock_mutex, &controller->lock, + &memory->dma_tag); if(status == ENOMEM) { isci_log_message(0, "ISCI", "bus_dma_tag_create failed\n"); Modified: stable/12/sys/dev/isci/isci.h ============================================================================== --- stable/12/sys/dev/isci/isci.h Tue Mar 26 11:01:29 2019 (r345529) +++ stable/12/sys/dev/isci/isci.h Tue Mar 26 11:03:09 2019 (r345530) @@ -253,7 +253,8 @@ struct isci_softc { int isci_allocate_resources(device_t device); -int isci_allocate_dma_buffer(device_t device, struct ISCI_MEMORY *memory); +int isci_allocate_dma_buffer(device_t device, struct ISCI_CONTROLLER *lock, + struct ISCI_MEMORY *memory); void isci_remote_device_reset(struct ISCI_REMOTE_DEVICE *remote_device, union ccb *ccb); Modified: stable/12/sys/dev/isci/isci_controller.c ============================================================================== --- stable/12/sys/dev/isci/isci_controller.c Tue Mar 26 11:01:29 2019 (r345529) +++ stable/12/sys/dev/isci/isci_controller.c Tue Mar 26 11:03:09 2019 (r345530) @@ -428,7 +428,8 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO uncached_controller_memory->size = sci_mdl_decorator_get_memory_size( controller->mdl, SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS); - error = isci_allocate_dma_buffer(device, uncached_controller_memory); + error = isci_allocate_dma_buffer(device, controller, + uncached_controller_memory); if (error != 0) return (error); @@ -443,7 +444,8 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO SCI_MDE_ATTRIBUTE_CACHEABLE | SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS ); - error = isci_allocate_dma_buffer(device, cached_controller_memory); + error = isci_allocate_dma_buffer(device, controller, + cached_controller_memory); if (error != 0) return (error); @@ -456,7 +458,7 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO request_memory->size = controller->queue_depth * isci_io_request_get_object_size(); - error = isci_allocate_dma_buffer(device, request_memory); + error = isci_allocate_dma_buffer(device, controller, request_memory); if (error != 0) return (error); @@ -478,7 +480,8 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO status = bus_dma_tag_create(bus_get_dma_tag(device), 0x1, 0x0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, isci_io_request_get_max_io_size(), - SCI_MAX_SCATTER_GATHER_ELEMENTS, max_segment_size, 0, NULL, NULL, + SCI_MAX_SCATTER_GATHER_ELEMENTS, max_segment_size, 0, + busdma_lock_mutex, &controller->lock, &controller->buffer_dma_tag); sci_pool_initialize(controller->request_pool); From owner-svn-src-stable@freebsd.org Tue Mar 26 13:33:37 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C61991552900; Tue, 26 Mar 2019 13:33:37 +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 6AEC86AC3E; Tue, 26 Mar 2019 13:33:37 +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 41AFF20704; Tue, 26 Mar 2019 13:33: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 x2QDXbUK030683; Tue, 26 Mar 2019 13:33:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDXbqU030682; Tue, 26 Mar 2019 13:33:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261333.x2QDXbqU030682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345531 - stable/12/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 345531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6AEC86AC3E 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]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:33:38 -0000 Author: hselasky Date: Tue Mar 26 13:33:36 2019 New Revision: 345531 URL: https://svnweb.freebsd.org/changeset/base/345531 Log: MFC r344919: Don't hold state lock while detaching network device instance in mlx4en(4). It can happen during shutdown that the lock will recurse when the mlx4en(4) instance is part of a lagg interface. Call ether_ifdetach() unlocked. Backtrace: panic(): _sx_xlock_hard: recursed on non-recursive sx &mdev->state_lock _sx_xlock_hard() _sx_xlock() mlx4_en_ioctl() if_setlladdr() lagg_port_destroy() lagg_port_ifdetach() if_detach() mlx4_en_destroy_netdev() mlx4_en_remove() mlx4_remove_device() mlx4_unregister_device() mlx4_unload_one() mlx4_shutdown() linux_pci_shutdown() bus_generic_shutdown() Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 11:03:09 2019 (r345530) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:33:36 2019 (r345531) @@ -1779,11 +1779,8 @@ void mlx4_en_destroy_netdev(struct net_device *dev) EVENTHANDLER_DEREGISTER(vlan_unconfig, priv->vlan_detach); /* Unregister device - this will close the port if it was up */ - if (priv->registered) { - mutex_lock(&mdev->state_lock); + if (priv->registered) ether_ifdetach(dev); - mutex_unlock(&mdev->state_lock); - } mutex_lock(&mdev->state_lock); mlx4_en_stop_port(dev); From owner-svn-src-stable@freebsd.org Tue Mar 26 13:35:24 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F6721552A30; Tue, 26 Mar 2019 13:35:24 +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 434DD6AE28; Tue, 26 Mar 2019 13:35:24 +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 29AFC20705; Tue, 26 Mar 2019 13:35:24 +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 x2QDZNCe030831; Tue, 26 Mar 2019 13:35:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDZN90030830; Tue, 26 Mar 2019 13:35:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261335.x2QDZN90030830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345532 - stable/11/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 345532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 434DD6AE28 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.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:35:24 -0000 Author: hselasky Date: Tue Mar 26 13:35:23 2019 New Revision: 345532 URL: https://svnweb.freebsd.org/changeset/base/345532 Log: MFC r344919: Don't hold state lock while detaching network device instance in mlx4en(4). It can happen during shutdown that the lock will recurse when the mlx4en(4) instance is part of a lagg interface. Call ether_ifdetach() unlocked. Backtrace: panic(): _sx_xlock_hard: recursed on non-recursive sx &mdev->state_lock _sx_xlock_hard() _sx_xlock() mlx4_en_ioctl() if_setlladdr() lagg_port_destroy() lagg_port_ifdetach() if_detach() mlx4_en_destroy_netdev() mlx4_en_remove() mlx4_remove_device() mlx4_unregister_device() mlx4_unload_one() mlx4_shutdown() linux_pci_shutdown() bus_generic_shutdown() Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:33:36 2019 (r345531) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:35:23 2019 (r345532) @@ -1777,11 +1777,8 @@ void mlx4_en_destroy_netdev(struct net_device *dev) EVENTHANDLER_DEREGISTER(vlan_unconfig, priv->vlan_detach); /* Unregister device - this will close the port if it was up */ - if (priv->registered) { - mutex_lock(&mdev->state_lock); + if (priv->registered) ether_ifdetach(dev); - mutex_unlock(&mdev->state_lock); - } mutex_lock(&mdev->state_lock); mlx4_en_stop_port(dev); From owner-svn-src-stable@freebsd.org Tue Mar 26 13:37:57 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D429E1552F2A; Tue, 26 Mar 2019 13:37:57 +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 595826B230; Tue, 26 Mar 2019 13:37:57 +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 3304120707; Tue, 26 Mar 2019 13:37:57 +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 x2QDbuwK031022; Tue, 26 Mar 2019 13:37:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDbuaA031021; Tue, 26 Mar 2019 13:37:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261337.x2QDbuaA031021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345533 - stable/12/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 345533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 595826B230 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.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:37:58 -0000 Author: hselasky Date: Tue Mar 26 13:37:56 2019 New Revision: 345533 URL: https://svnweb.freebsd.org/changeset/base/345533 Log: MFC r344920: Teardown ifnet after stopping port in the mlx4en(4) driver. mlx4_en_stop_port() calls mlx4_en_put_qp() which can refer the link level address of the network interface, which in turn will be freed by the network interface detach function. Make sure the port is stopped before detaching the network interface. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:35:23 2019 (r345532) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:37:56 2019 (r345533) @@ -1778,13 +1778,13 @@ void mlx4_en_destroy_netdev(struct net_device *dev) if (priv->vlan_detach != NULL) EVENTHANDLER_DEREGISTER(vlan_unconfig, priv->vlan_detach); - /* Unregister device - this will close the port if it was up */ - if (priv->registered) - ether_ifdetach(dev); - mutex_lock(&mdev->state_lock); mlx4_en_stop_port(dev); mutex_unlock(&mdev->state_lock); + + /* Unregister device - this will close the port if it was up */ + if (priv->registered) + ether_ifdetach(dev); if (priv->allocated) mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); From owner-svn-src-stable@freebsd.org Tue Mar 26 13:38:50 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5247155300A; Tue, 26 Mar 2019 13:38:50 +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 592D06B3A4; Tue, 26 Mar 2019 13:38: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 319D720708; Tue, 26 Mar 2019 13:38: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 x2QDco4r031122; Tue, 26 Mar 2019 13:38:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDcoU4031121; Tue, 26 Mar 2019 13:38:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261338.x2QDcoU4031121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:38: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: r345534 - stable/11/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 345534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 592D06B3A4 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.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:38:50 -0000 Author: hselasky Date: Tue Mar 26 13:38:49 2019 New Revision: 345534 URL: https://svnweb.freebsd.org/changeset/base/345534 Log: MFC r344920: Teardown ifnet after stopping port in the mlx4en(4) driver. mlx4_en_stop_port() calls mlx4_en_put_qp() which can refer the link level address of the network interface, which in turn will be freed by the network interface detach function. Make sure the port is stopped before detaching the network interface. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:37:56 2019 (r345533) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:38:49 2019 (r345534) @@ -1776,13 +1776,13 @@ void mlx4_en_destroy_netdev(struct net_device *dev) if (priv->vlan_detach != NULL) EVENTHANDLER_DEREGISTER(vlan_unconfig, priv->vlan_detach); - /* Unregister device - this will close the port if it was up */ - if (priv->registered) - ether_ifdetach(dev); - mutex_lock(&mdev->state_lock); mlx4_en_stop_port(dev); mutex_unlock(&mdev->state_lock); + + /* Unregister device - this will close the port if it was up */ + if (priv->registered) + ether_ifdetach(dev); if (priv->allocated) mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); From owner-svn-src-stable@freebsd.org Tue Mar 26 13:40:35 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11026155314C; Tue, 26 Mar 2019 13:40:35 +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 9D5A56B749; Tue, 26 Mar 2019 13:40:34 +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 5DC302070E; Tue, 26 Mar 2019 13:40:34 +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 x2QDeYAl031492; Tue, 26 Mar 2019 13:40:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDeYUm031491; Tue, 26 Mar 2019 13:40:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261340.x2QDeYUm031491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345535 - stable/12/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 345535 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9D5A56B749 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.952,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:40:35 -0000 Author: hselasky Date: Tue Mar 26 13:40:33 2019 New Revision: 345535 URL: https://svnweb.freebsd.org/changeset/base/345535 Log: MFC r345010: Improve support for switching to and from command polling mode in mlx4core. Make sure the enter and leave polling routines can be called multiple times with same setting. Ignore setting polling or event mode twice. This fixes a deadlock during shutdown if polling mode was already selected. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_cmd.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Tue Mar 26 13:38:49 2019 (r345534) +++ stable/12/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Tue Mar 26 13:40:33 2019 (r345535) @@ -2490,6 +2490,7 @@ int mlx4_cmd_init(struct mlx4_dev *dev) init_rwsem(&priv->cmd.switch_sem); mutex_init(&priv->cmd.slave_cmd_mutex); sema_init(&priv->cmd.poll_sem, 1); + sema_init(&priv->cmd.event_sem, 0); priv->cmd.use_events = 0; priv->cmd.toggle = 1; priv->cmd.initialized = 1; @@ -2617,8 +2618,10 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) { struct mlx4_priv *priv = mlx4_priv(dev); int i; - int err = 0; + if (priv->cmd.use_events != 0) + return 0; + priv->cmd.context = kmalloc(priv->cmd.max_cmds * sizeof (struct mlx4_cmd_context), GFP_KERNEL); @@ -2639,7 +2642,8 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) priv->cmd.context[priv->cmd.max_cmds - 1].next = -1; priv->cmd.free_head = 0; - sema_init(&priv->cmd.event_sem, priv->cmd.max_cmds); + for (i = 0; i != priv->cmd.max_cmds; i++) + up(&priv->cmd.event_sem); for (priv->cmd.token_mask = 1; priv->cmd.token_mask < priv->cmd.max_cmds; @@ -2651,7 +2655,7 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) priv->cmd.use_events = 1; up_write(&priv->cmd.switch_sem); - return err; + return 0; } /* @@ -2662,6 +2666,9 @@ void mlx4_cmd_use_polling(struct mlx4_dev *dev) struct mlx4_priv *priv = mlx4_priv(dev); int i; + if (priv->cmd.use_events == 0) + return; + down_write(&priv->cmd.switch_sem); priv->cmd.use_events = 0; @@ -2669,6 +2676,7 @@ void mlx4_cmd_use_polling(struct mlx4_dev *dev) down(&priv->cmd.event_sem); kfree(priv->cmd.context); + priv->cmd.context = NULL; up(&priv->cmd.poll_sem); up_write(&priv->cmd.switch_sem); @@ -2740,11 +2748,11 @@ void mlx4_cmd_wake_completions(struct mlx4_dev *dev) int i; spin_lock(&priv->cmd.context_lock); - if (priv->cmd.context) { + if (priv->cmd.context != NULL) { for (i = 0; i < priv->cmd.max_cmds; ++i) { context = &priv->cmd.context[i]; context->fw_status = CMD_STAT_INTERNAL_ERR; - context->result = + context->result = mlx4_status_to_errno(CMD_STAT_INTERNAL_ERR); complete(&context->done); } From owner-svn-src-stable@freebsd.org Tue Mar 26 13:41:29 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAB931553326; Tue, 26 Mar 2019 13:41:28 +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 803816B967; Tue, 26 Mar 2019 13:41:28 +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 3E8BA20755; Tue, 26 Mar 2019 13:41:28 +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 x2QDfSP9033125; Tue, 26 Mar 2019 13:41:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDfSUq033124; Tue, 26 Mar 2019 13:41:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261341.x2QDfSUq033124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:41: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: r345536 - stable/11/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 345536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 803816B967 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.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:41:29 -0000 Author: hselasky Date: Tue Mar 26 13:41:27 2019 New Revision: 345536 URL: https://svnweb.freebsd.org/changeset/base/345536 Log: MFC r345010: Improve support for switching to and from command polling mode in mlx4core. Make sure the enter and leave polling routines can be called multiple times with same setting. Ignore setting polling or event mode twice. This fixes a deadlock during shutdown if polling mode was already selected. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Tue Mar 26 13:40:33 2019 (r345535) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Tue Mar 26 13:41:27 2019 (r345536) @@ -2490,6 +2490,7 @@ int mlx4_cmd_init(struct mlx4_dev *dev) init_rwsem(&priv->cmd.switch_sem); mutex_init(&priv->cmd.slave_cmd_mutex); sema_init(&priv->cmd.poll_sem, 1); + sema_init(&priv->cmd.event_sem, 0); priv->cmd.use_events = 0; priv->cmd.toggle = 1; priv->cmd.initialized = 1; @@ -2617,8 +2618,10 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) { struct mlx4_priv *priv = mlx4_priv(dev); int i; - int err = 0; + if (priv->cmd.use_events != 0) + return 0; + priv->cmd.context = kmalloc(priv->cmd.max_cmds * sizeof (struct mlx4_cmd_context), GFP_KERNEL); @@ -2639,7 +2642,8 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) priv->cmd.context[priv->cmd.max_cmds - 1].next = -1; priv->cmd.free_head = 0; - sema_init(&priv->cmd.event_sem, priv->cmd.max_cmds); + for (i = 0; i != priv->cmd.max_cmds; i++) + up(&priv->cmd.event_sem); for (priv->cmd.token_mask = 1; priv->cmd.token_mask < priv->cmd.max_cmds; @@ -2651,7 +2655,7 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) priv->cmd.use_events = 1; up_write(&priv->cmd.switch_sem); - return err; + return 0; } /* @@ -2662,6 +2666,9 @@ void mlx4_cmd_use_polling(struct mlx4_dev *dev) struct mlx4_priv *priv = mlx4_priv(dev); int i; + if (priv->cmd.use_events == 0) + return; + down_write(&priv->cmd.switch_sem); priv->cmd.use_events = 0; @@ -2669,6 +2676,7 @@ void mlx4_cmd_use_polling(struct mlx4_dev *dev) down(&priv->cmd.event_sem); kfree(priv->cmd.context); + priv->cmd.context = NULL; up(&priv->cmd.poll_sem); up_write(&priv->cmd.switch_sem); @@ -2740,11 +2748,11 @@ void mlx4_cmd_wake_completions(struct mlx4_dev *dev) int i; spin_lock(&priv->cmd.context_lock); - if (priv->cmd.context) { + if (priv->cmd.context != NULL) { for (i = 0; i < priv->cmd.max_cmds; ++i) { context = &priv->cmd.context[i]; context->fw_status = CMD_STAT_INTERNAL_ERR; - context->result = + context->result = mlx4_status_to_errno(CMD_STAT_INTERNAL_ERR); complete(&context->done); } From owner-svn-src-stable@freebsd.org Tue Mar 26 13:42:45 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A9A6155340A; Tue, 26 Mar 2019 13:42:45 +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 854446BBC8; Tue, 26 Mar 2019 13:42:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73F4D208AD; Tue, 26 Mar 2019 13:42:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2QDgi0b036204; Tue, 26 Mar 2019 13:42:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDgiqP036203; Tue, 26 Mar 2019 13:42:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261342.x2QDgiqP036203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:42:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345537 - stable/12/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 345537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 854446BBC8 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_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:42:45 -0000 Author: hselasky Date: Tue Mar 26 13:42:44 2019 New Revision: 345537 URL: https://svnweb.freebsd.org/changeset/base/345537 Log: MFC r345011: Eliminate useless warning message when reading sysctl node in mlx4core. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Tue Mar 26 13:41:27 2019 (r345536) +++ stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Tue Mar 26 13:42:44 2019 (r345537) @@ -1236,9 +1236,6 @@ static ssize_t show_port_ib_mtu(struct device *dev, port_mtu_attr); struct mlx4_dev *mdev = info->dev; - if (mdev->caps.port_type[info->port] == MLX4_PORT_TYPE_ETH) - mlx4_warn(mdev, "port level mtu is only used for IB ports\n"); - sprintf(buf, "%d\n", ibta_mtu_to_int(mdev->caps.port_ib_mtu[info->port])); return strlen(buf); From owner-svn-src-stable@freebsd.org Tue Mar 26 13:43:33 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 061F51553481; Tue, 26 Mar 2019 13:43:33 +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 9543C6BD08; Tue, 26 Mar 2019 13:43:32 +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 76465208AE; Tue, 26 Mar 2019 13:43:32 +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 x2QDhW2b036300; Tue, 26 Mar 2019 13:43:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDhWi2036299; Tue, 26 Mar 2019 13:43:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261343.x2QDhWi2036299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:43:32 +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: r345538 - stable/11/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 345538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9543C6BD08 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.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:43:33 -0000 Author: hselasky Date: Tue Mar 26 13:43:32 2019 New Revision: 345538 URL: https://svnweb.freebsd.org/changeset/base/345538 Log: MFC r345011: Eliminate useless warning message when reading sysctl node in mlx4core. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Tue Mar 26 13:42:44 2019 (r345537) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Tue Mar 26 13:43:32 2019 (r345538) @@ -1236,9 +1236,6 @@ static ssize_t show_port_ib_mtu(struct device *dev, port_mtu_attr); struct mlx4_dev *mdev = info->dev; - if (mdev->caps.port_type[info->port] == MLX4_PORT_TYPE_ETH) - mlx4_warn(mdev, "port level mtu is only used for IB ports\n"); - sprintf(buf, "%d\n", ibta_mtu_to_int(mdev->caps.port_ib_mtu[info->port])); return strlen(buf); From owner-svn-src-stable@freebsd.org Tue Mar 26 13:45:12 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18A5A1553574; Tue, 26 Mar 2019 13:45:12 +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 AB9E66BEAB; Tue, 26 Mar 2019 13:45:11 +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 8B047208B0; Tue, 26 Mar 2019 13:45:11 +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 x2QDjBQ0036461; Tue, 26 Mar 2019 13:45:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDjBAq036460; Tue, 26 Mar 2019 13:45:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261345.x2QDjBAq036460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345539 - stable/12/lib/libusb X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/lib/libusb X-SVN-Commit-Revision: 345539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AB9E66BEAB 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_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:45:12 -0000 Author: hselasky Date: Tue Mar 26 13:45:11 2019 New Revision: 345539 URL: https://svnweb.freebsd.org/changeset/base/345539 Log: MFC r344795: Fix typos in libusb. Found by: Denis Ahrens Sponsored by: Mellanox Technologies Modified: stable/12/lib/libusb/libusb10.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libusb/libusb10.c ============================================================================== --- stable/12/lib/libusb/libusb10.c Tue Mar 26 13:43:32 2019 (r345538) +++ stable/12/lib/libusb/libusb10.c Tue Mar 26 13:45:11 2019 (r345539) @@ -539,7 +539,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, u if (ctx == NULL) return (NULL); /* be NULL safe */ - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid enter"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_with_vid_pid enter"); if ((i = libusb_get_device_list(ctx, &devs)) < 0) return (NULL); @@ -563,7 +563,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, u } libusb_free_device_list(devs, 1); - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid leave"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_with_vid_pid leave"); return (pdev); } From owner-svn-src-stable@freebsd.org Tue Mar 26 13:46:01 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C64A1553605; Tue, 26 Mar 2019 13:46:01 +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 AF2B26BFF8; Tue, 26 Mar 2019 13:46:00 +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 8A829208B1; Tue, 26 Mar 2019 13:46:00 +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 x2QDk0lh036563; Tue, 26 Mar 2019 13:46:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDk0YY036562; Tue, 26 Mar 2019 13:46:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261346.x2QDk0YY036562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:46: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: r345540 - stable/11/lib/libusb X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/lib/libusb X-SVN-Commit-Revision: 345540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF2B26BFF8 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.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:46:01 -0000 Author: hselasky Date: Tue Mar 26 13:46:00 2019 New Revision: 345540 URL: https://svnweb.freebsd.org/changeset/base/345540 Log: MFC r344795: Fix typos in libusb. Found by: Denis Ahrens Sponsored by: Mellanox Technologies Modified: stable/11/lib/libusb/libusb10.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libusb/libusb10.c ============================================================================== --- stable/11/lib/libusb/libusb10.c Tue Mar 26 13:45:11 2019 (r345539) +++ stable/11/lib/libusb/libusb10.c Tue Mar 26 13:46:00 2019 (r345540) @@ -537,7 +537,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, u if (ctx == NULL) return (NULL); /* be NULL safe */ - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid enter"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_with_vid_pid enter"); if ((i = libusb_get_device_list(ctx, &devs)) < 0) return (NULL); @@ -561,7 +561,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, u } libusb_free_device_list(devs, 1); - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid leave"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_with_vid_pid leave"); return (pdev); } From owner-svn-src-stable@freebsd.org Tue Mar 26 13:46:48 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1833215536B4; Tue, 26 Mar 2019 13:46:48 +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 A7BBD6C17B; Tue, 26 Mar 2019 13:46:47 +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 7FF00208B4; Tue, 26 Mar 2019 13:46:47 +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 x2QDklhI036654; Tue, 26 Mar 2019 13:46:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDklDW036653; Tue, 26 Mar 2019 13:46:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261346.x2QDklDW036653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r345541 - stable/10/lib/libusb X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/lib/libusb X-SVN-Commit-Revision: 345541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A7BBD6C17B 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.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:46:48 -0000 Author: hselasky Date: Tue Mar 26 13:46:47 2019 New Revision: 345541 URL: https://svnweb.freebsd.org/changeset/base/345541 Log: MFC r344795: Fix typos in libusb. Found by: Denis Ahrens Sponsored by: Mellanox Technologies Modified: stable/10/lib/libusb/libusb10.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb10.c ============================================================================== --- stable/10/lib/libusb/libusb10.c Tue Mar 26 13:46:00 2019 (r345540) +++ stable/10/lib/libusb/libusb10.c Tue Mar 26 13:46:47 2019 (r345541) @@ -537,7 +537,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, u if (ctx == NULL) return (NULL); /* be NULL safe */ - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid enter"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_with_vid_pid enter"); if ((i = libusb_get_device_list(ctx, &devs)) < 0) return (NULL); @@ -561,7 +561,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, u } libusb_free_device_list(devs, 1); - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid leave"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_with_vid_pid leave"); return (pdev); } From owner-svn-src-stable@freebsd.org Tue Mar 26 13:49:00 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3BC115538A0; Tue, 26 Mar 2019 13:49:00 +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 44AB66C3E7; Tue, 26 Mar 2019 13:49:00 +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 1DCB0208B6; Tue, 26 Mar 2019 13:49:00 +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 x2QDmx0e036820; Tue, 26 Mar 2019 13:48:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDmxWX036819; Tue, 26 Mar 2019 13:48:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261348.x2QDmxWX036819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345542 - in stable/12/sys/dev/usb: . quirk X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/usb: . quirk X-SVN-Commit-Revision: 345542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 44AB66C3E7 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.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:49:00 -0000 Author: hselasky Date: Tue Mar 26 13:48:59 2019 New Revision: 345542 URL: https://svnweb.freebsd.org/changeset/base/345542 Log: MFC r343352: Add USB quirk. Submitted by: Gary Jennejohn Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/usb/quirk/usb_quirk.c stable/12/sys/dev/usb/usbdevs Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/12/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:46:47 2019 (r345541) +++ stable/12/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:48:59 2019 (r345542) @@ -279,6 +279,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(IOMEGA, ZIP100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY), /* XXX ZIP drives can also use ATAPI */ + USB_QUIRK(JMICRON, JMS566, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(JMICRON, JMS567, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, Modified: stable/12/sys/dev/usb/usbdevs ============================================================================== --- stable/12/sys/dev/usb/usbdevs Tue Mar 26 13:46:47 2019 (r345541) +++ stable/12/sys/dev/usb/usbdevs Tue Mar 26 13:48:59 2019 (r345542) @@ -2648,6 +2648,7 @@ product JATON EDA 0x5704 Ethernet product JETI SPC1201 0x04b2 FTDI compatible adapter /* JMicron products */ +product JMICRON JMS566 0x3569 USB to SATA 3.0Gb/s bridge product JMICRON JMS567 0x0567 USB to SATA 6.0Gb/s bridge product JMICRON JM20336 0x2336 USB to SATA Bridge product JMICRON JM20337 0x2338 USB to ATA/ATAPI Bridge From owner-svn-src-stable@freebsd.org Tue Mar 26 13:49:46 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06E141553926; Tue, 26 Mar 2019 13:49:46 +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 9FA346C50D; Tue, 26 Mar 2019 13:49:45 +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 77C92208B7; Tue, 26 Mar 2019 13:49:45 +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 x2QDnjYr036911; Tue, 26 Mar 2019 13:49:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDnjRL036910; Tue, 26 Mar 2019 13:49:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261349.x2QDnjRL036910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345543 - in stable/11/sys/dev/usb: . quirk X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/usb: . quirk X-SVN-Commit-Revision: 345543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9FA346C50D 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.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:49:46 -0000 Author: hselasky Date: Tue Mar 26 13:49:44 2019 New Revision: 345543 URL: https://svnweb.freebsd.org/changeset/base/345543 Log: MFC r343352: Add USB quirk. Submitted by: Gary Jennejohn Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/11/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:48:59 2019 (r345542) +++ stable/11/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:49:44 2019 (r345543) @@ -246,6 +246,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(IOMEGA, ZIP100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY), /* XXX ZIP drives can also use ATAPI */ + USB_QUIRK(JMICRON, JMS566, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(JMICRON, JMS567, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, Modified: stable/11/sys/dev/usb/usbdevs ============================================================================== --- stable/11/sys/dev/usb/usbdevs Tue Mar 26 13:48:59 2019 (r345542) +++ stable/11/sys/dev/usb/usbdevs Tue Mar 26 13:49:44 2019 (r345543) @@ -2553,6 +2553,7 @@ product JATON EDA 0x5704 Ethernet product JETI SPC1201 0x04b2 FTDI compatible adapter /* JMicron products */ +product JMICRON JMS566 0x3569 USB to SATA 3.0Gb/s bridge product JMICRON JMS567 0x0567 USB to SATA 6.0Gb/s bridge product JMICRON JM20336 0x2336 USB to SATA Bridge product JMICRON JM20337 0x2338 USB to ATA/ATAPI Bridge From owner-svn-src-stable@freebsd.org Tue Mar 26 13:52:02 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2AE11553BD5; Tue, 26 Mar 2019 13:52:02 +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 4E4CB6C92E; Tue, 26 Mar 2019 13:52:02 +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 2794F2092E; Tue, 26 Mar 2019 13:52:02 +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 x2QDq2NT041842; Tue, 26 Mar 2019 13:52:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDq1Nf041838; Tue, 26 Mar 2019 13:52:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261352.x2QDq1Nf041838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:52:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345544 - in stable/12/sys/dev: sound/usb usb usb/quirk X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev: sound/usb usb usb/quirk X-SVN-Commit-Revision: 345544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E4CB6C92E 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.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:52:03 -0000 Author: hselasky Date: Tue Mar 26 13:52:01 2019 New Revision: 345544 URL: https://svnweb.freebsd.org/changeset/base/345544 Log: MFC r342961: snd_uaudio: Add quirks for Edirol UA-25EX in advanced driver mode. Extend the vendor class USB audio quirk to cover devices without the USB audio control descriptor. PR: 234794 Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/sound/usb/uaudio.c stable/12/sys/dev/sound/usb/uaudioreg.h stable/12/sys/dev/usb/quirk/usb_quirk.c stable/12/sys/dev/usb/usbdevs Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/12/sys/dev/sound/usb/uaudio.c Tue Mar 26 13:49:44 2019 (r345543) +++ stable/12/sys/dev/sound/usb/uaudio.c Tue Mar 26 13:52:01 2019 (r345544) @@ -1745,7 +1745,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str continue; } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_INTERFACE) && (desc->bDescriptorSubtype == AS_GENERAL) && (asid.v1 == NULL)) { @@ -1761,7 +1761,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str } } } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_INTERFACE) && (desc->bDescriptorSubtype == FORMAT_TYPE) && (asf1d.v1 == NULL)) { @@ -1800,7 +1800,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str continue; } } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_ENDPOINT) && (desc->bDescriptorSubtype == AS_GENERAL) && (sed.v1 == NULL)) { Modified: stable/12/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/12/sys/dev/sound/usb/uaudioreg.h Tue Mar 26 13:49:44 2019 (r345543) +++ stable/12/sys/dev/sound/usb/uaudioreg.h Tue Mar 26 13:52:01 2019 (r345544) @@ -36,7 +36,7 @@ #ifndef _UAUDIOREG_H_ #define _UAUDIOREG_H_ -#define UAUDIO_VERSION 0x0100 +#define UAUDIO_VERSION_10 0x0100 #define UAUDIO_VERSION_20 0x0200 #define UAUDIO_VERSION_30 0x0300 Modified: stable/12/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/12/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:49:44 2019 (r345543) +++ stable/12/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:52:01 2019 (r345544) @@ -564,6 +564,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(CMEDIA, CM6206, 0x0000, 0xffff, UQ_AU_SET_SPDIF_CM6206), USB_QUIRK(PLOYTEC, SPL_CRIMSON_1, 0x0000, 0xffff, UQ_CFG_INDEX_1), + USB_QUIRK(ROLAND, UA25EX_AD, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), /* * Quirks for manufacturers which USB devices does not respond Modified: stable/12/sys/dev/usb/usbdevs ============================================================================== --- stable/12/sys/dev/usb/usbdevs Tue Mar 26 13:49:44 2019 (r345543) +++ stable/12/sys/dev/usb/usbdevs Tue Mar 26 13:52:01 2019 (r345544) @@ -4026,6 +4026,8 @@ product ROLAND SD20 0x0027 SD-20 MIDI Synth product ROLAND SD80 0x0029 SD-80 MIDI Synth product ROLAND UA700 0x002b UA-700 Audio I/F product ROLAND PCR300 0x0033 EDIROL PCR-300 MIDI I/F +product ROLAND UA25EX_AD 0x00e6 EDIROL UA-25EX (Advanced Driver) +product ROLAND UA25EX_CC 0x00e7 EDIROL UA-25EX (Class Compliant) /* Rockfire products */ product ROCKFIRE GAMEPAD 0x2033 gamepad 203USB From owner-svn-src-stable@freebsd.org Tue Mar 26 13:52:48 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82E9D1553C35; Tue, 26 Mar 2019 13:52:48 +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 257F66CAC6; Tue, 26 Mar 2019 13:52:48 +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 E442B20A5B; Tue, 26 Mar 2019 13:52:47 +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 x2QDqlol041947; Tue, 26 Mar 2019 13:52:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDqlO9041943; Tue, 26 Mar 2019 13:52:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261352.x2QDqlO9041943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345545 - in stable/11/sys/dev: sound/usb usb usb/quirk X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev: sound/usb usb usb/quirk X-SVN-Commit-Revision: 345545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 257F66CAC6 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.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:52:48 -0000 Author: hselasky Date: Tue Mar 26 13:52:46 2019 New Revision: 345545 URL: https://svnweb.freebsd.org/changeset/base/345545 Log: MFC r342961: snd_uaudio: Add quirks for Edirol UA-25EX in advanced driver mode. Extend the vendor class USB audio quirk to cover devices without the USB audio control descriptor. PR: 234794 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/sound/usb/uaudio.c stable/11/sys/dev/sound/usb/uaudioreg.h stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/11/sys/dev/sound/usb/uaudio.c Tue Mar 26 13:52:01 2019 (r345544) +++ stable/11/sys/dev/sound/usb/uaudio.c Tue Mar 26 13:52:46 2019 (r345545) @@ -1743,7 +1743,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str continue; } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_INTERFACE) && (desc->bDescriptorSubtype == AS_GENERAL) && (asid.v1 == NULL)) { @@ -1759,7 +1759,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str } } } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_INTERFACE) && (desc->bDescriptorSubtype == FORMAT_TYPE) && (asf1d.v1 == NULL)) { @@ -1798,7 +1798,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str continue; } } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_ENDPOINT) && (desc->bDescriptorSubtype == AS_GENERAL) && (sed.v1 == NULL)) { Modified: stable/11/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/11/sys/dev/sound/usb/uaudioreg.h Tue Mar 26 13:52:01 2019 (r345544) +++ stable/11/sys/dev/sound/usb/uaudioreg.h Tue Mar 26 13:52:46 2019 (r345545) @@ -34,7 +34,7 @@ #ifndef _UAUDIOREG_H_ #define _UAUDIOREG_H_ -#define UAUDIO_VERSION 0x0100 +#define UAUDIO_VERSION_10 0x0100 #define UAUDIO_VERSION_20 0x0200 #define UAUDIO_VERSION_30 0x0300 Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/11/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:52:01 2019 (r345544) +++ stable/11/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:52:46 2019 (r345545) @@ -530,6 +530,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(CMEDIA, CM6206, 0x0000, 0xffff, UQ_AU_SET_SPDIF_CM6206), USB_QUIRK(PLOYTEC, SPL_CRIMSON_1, 0x0000, 0xffff, UQ_CFG_INDEX_1), + USB_QUIRK(ROLAND, UA25EX_AD, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), /* * Quirks for manufacturers which USB devices does not respond Modified: stable/11/sys/dev/usb/usbdevs ============================================================================== --- stable/11/sys/dev/usb/usbdevs Tue Mar 26 13:52:01 2019 (r345544) +++ stable/11/sys/dev/usb/usbdevs Tue Mar 26 13:52:46 2019 (r345545) @@ -3888,6 +3888,8 @@ product ROLAND SD20 0x0027 SD-20 MIDI Synth product ROLAND SD80 0x0029 SD-80 MIDI Synth product ROLAND UA700 0x002b UA-700 Audio I/F product ROLAND PCR300 0x0033 EDIROL PCR-300 MIDI I/F +product ROLAND UA25EX_AD 0x00e6 EDIROL UA-25EX (Advanced Driver) +product ROLAND UA25EX_CC 0x00e7 EDIROL UA-25EX (Class Compliant) /* Rockfire products */ product ROCKFIRE GAMEPAD 0x2033 gamepad 203USB From owner-svn-src-stable@freebsd.org Tue Mar 26 13:53:35 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF0771553CB5; Tue, 26 Mar 2019 13:53:34 +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 41DBF6CC17; Tue, 26 Mar 2019 13:53:34 +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 1485220A5D; Tue, 26 Mar 2019 13:53:34 +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 x2QDrX8g042061; Tue, 26 Mar 2019 13:53:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDrX9B042058; Tue, 26 Mar 2019 13:53:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261353.x2QDrX9B042058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:53:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r345546 - in stable/10/sys/dev: sound/usb usb usb/quirk X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10/sys/dev: sound/usb usb usb/quirk X-SVN-Commit-Revision: 345546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41DBF6CC17 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.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:53:35 -0000 Author: hselasky Date: Tue Mar 26 13:53:33 2019 New Revision: 345546 URL: https://svnweb.freebsd.org/changeset/base/345546 Log: MFC r342961: snd_uaudio: Add quirks for Edirol UA-25EX in advanced driver mode. Extend the vendor class USB audio quirk to cover devices without the USB audio control descriptor. PR: 234794 Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/sound/usb/uaudio.c stable/10/sys/dev/sound/usb/uaudioreg.h stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Tue Mar 26 13:52:46 2019 (r345545) +++ stable/10/sys/dev/sound/usb/uaudio.c Tue Mar 26 13:53:33 2019 (r345546) @@ -1749,7 +1749,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str continue; } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_INTERFACE) && (desc->bDescriptorSubtype == AS_GENERAL) && (asid.v1 == NULL)) { @@ -1765,7 +1765,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str } } } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_INTERFACE) && (desc->bDescriptorSubtype == FORMAT_TYPE) && (asf1d.v1 == NULL)) { @@ -1804,7 +1804,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str continue; } } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_ENDPOINT) && (desc->bDescriptorSubtype == AS_GENERAL) && (sed.v1 == NULL)) { Modified: stable/10/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/10/sys/dev/sound/usb/uaudioreg.h Tue Mar 26 13:52:46 2019 (r345545) +++ stable/10/sys/dev/sound/usb/uaudioreg.h Tue Mar 26 13:53:33 2019 (r345546) @@ -34,7 +34,7 @@ #ifndef _UAUDIOREG_H_ #define _UAUDIOREG_H_ -#define UAUDIO_VERSION 0x0100 +#define UAUDIO_VERSION_10 0x0100 #define UAUDIO_VERSION_20 0x0200 #define UAUDIO_VERSION_30 0x0300 Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:52:46 2019 (r345545) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:53:33 2019 (r345546) @@ -526,6 +526,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(CMEDIA, CM6206, 0x0000, 0xffff, UQ_AU_SET_SPDIF_CM6206), USB_QUIRK(PLOYTEC, SPL_CRIMSON_1, 0x0000, 0xffff, UQ_CFG_INDEX_1), + USB_QUIRK(ROLAND, UA25EX_AD, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), /* * Quirks for manufacturers which USB devices does not respond Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Tue Mar 26 13:52:46 2019 (r345545) +++ stable/10/sys/dev/usb/usbdevs Tue Mar 26 13:53:33 2019 (r345546) @@ -3871,6 +3871,8 @@ product ROLAND SD20 0x0027 SD-20 MIDI Synth product ROLAND SD80 0x0029 SD-80 MIDI Synth product ROLAND UA700 0x002b UA-700 Audio I/F product ROLAND PCR300 0x0033 EDIROL PCR-300 MIDI I/F +product ROLAND UA25EX_AD 0x00e6 EDIROL UA-25EX (Advanced Driver) +product ROLAND UA25EX_CC 0x00e7 EDIROL UA-25EX (Class Compliant) /* Rockfire products */ product ROCKFIRE GAMEPAD 0x2033 gamepad 203USB From owner-svn-src-stable@freebsd.org Tue Mar 26 20:47:32 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0D10155F278; Tue, 26 Mar 2019 20:47:31 +0000 (UTC) (envelope-from jilles@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 8315C85E47; Tue, 26 Mar 2019 20:47:31 +0000 (UTC) (envelope-from jilles@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 5B4482504E; Tue, 26 Mar 2019 20:47:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2QKlVIN058409; Tue, 26 Mar 2019 20:47:31 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QKlVVi058407; Tue, 26 Mar 2019 20:47:31 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903262047.x2QKlVVi058407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 26 Mar 2019 20:47:31 +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: r345556 - stable/11/bin/sh X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/11/bin/sh X-SVN-Commit-Revision: 345556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8315C85E47 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)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 20:47:32 -0000 Author: jilles Date: Tue Mar 26 20:47:30 2019 New Revision: 345556 URL: https://svnweb.freebsd.org/changeset/base/345556 Log: MFC r327475: sh: Move various structs from jobs.h to jobs.c These implementation details of jobs.c need not be exposed. PR: 224270 Modified: stable/11/bin/sh/jobs.c stable/11/bin/sh/jobs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/jobs.c ============================================================================== --- stable/11/bin/sh/jobs.c Tue Mar 26 20:44:02 2019 (r345555) +++ stable/11/bin/sh/jobs.c Tue Mar 26 20:47:30 2019 (r345556) @@ -75,6 +75,42 @@ __FBSDID("$FreeBSD$"); #include "builtins.h" +/* + * A job structure contains information about a job. A job is either a + * single process or a set of processes contained in a pipeline. In the + * latter case, pidlist will be non-NULL, and will point to a -1 terminated + * array of pids. + */ + +struct procstat { + pid_t pid; /* process id */ + int status; /* status flags (defined above) */ + char *cmd; /* text of command being run */ +}; + + +/* states */ +#define JOBSTOPPED 1 /* all procs are stopped */ +#define JOBDONE 2 /* all procs are completed */ + + +struct job { + struct procstat ps0; /* status of process */ + struct procstat *ps; /* status or processes when more than one */ + short nprocs; /* number of processes */ + pid_t pgrp; /* process group of this job */ + char state; /* true if job is finished */ + char used; /* true if this entry is in used */ + char changed; /* true if status has changed */ + char foreground; /* true if running in the foreground */ + char remembered; /* true if $! referenced */ +#if JOBS + char jobctl; /* job running under job control */ + struct job *next; /* job used after this one */ +#endif +}; + + static struct job *jobtab; /* array of jobs */ static int njobs; /* size of array */ static pid_t backgndpid = -1; /* pid of last background process */ Modified: stable/11/bin/sh/jobs.h ============================================================================== --- stable/11/bin/sh/jobs.h Tue Mar 26 20:44:02 2019 (r345555) +++ stable/11/bin/sh/jobs.h Tue Mar 26 20:47:30 2019 (r345556) @@ -40,40 +40,7 @@ #include /* for sig_atomic_t */ -/* - * A job structure contains information about a job. A job is either a - * single process or a set of processes contained in a pipeline. In the - * latter case, pidlist will be non-NULL, and will point to a -1 terminated - * array of pids. - */ - -struct procstat { - pid_t pid; /* process id */ - int status; /* status flags (defined above) */ - char *cmd; /* text of command being run */ -}; - - -/* states */ -#define JOBSTOPPED 1 /* all procs are stopped */ -#define JOBDONE 2 /* all procs are completed */ - - -struct job { - struct procstat ps0; /* status of process */ - struct procstat *ps; /* status or processes when more than one */ - short nprocs; /* number of processes */ - pid_t pgrp; /* process group of this job */ - char state; /* true if job is finished */ - char used; /* true if this entry is in used */ - char changed; /* true if status has changed */ - char foreground; /* true if running in the foreground */ - char remembered; /* true if $! referenced */ -#if JOBS - char jobctl; /* job running under job control */ - struct job *next; /* job used after this one */ -#endif -}; +struct job; enum { SHOWJOBS_DEFAULT, /* job number, status, command */ From owner-svn-src-stable@freebsd.org Tue Mar 26 21:30:27 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E17F155FDA9; Tue, 26 Mar 2019 21:30:27 +0000 (UTC) (envelope-from jilles@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 111418745E; Tue, 26 Mar 2019 21:30:27 +0000 (UTC) (envelope-from jilles@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 DEC952574F; Tue, 26 Mar 2019 21:30:26 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2QLUQR7079664; Tue, 26 Mar 2019 21:30:26 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QLUQWE079663; Tue, 26 Mar 2019 21:30:26 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903262130.x2QLUQWE079663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 26 Mar 2019 21:30: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: r345559 - stable/11/bin/sh X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/11/bin/sh X-SVN-Commit-Revision: 345559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 111418745E 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.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 21:30:27 -0000 Author: jilles Date: Tue Mar 26 21:30:26 2019 New Revision: 345559 URL: https://svnweb.freebsd.org/changeset/base/345559 Log: MFC r328818: sh: Refactor job status printing, preparing for -o pipefail and similar No functional change is intended. PR: 224270 Modified: stable/11/bin/sh/jobs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/jobs.c ============================================================================== --- stable/11/bin/sh/jobs.c Tue Mar 26 21:20:42 2019 (r345558) +++ stable/11/bin/sh/jobs.c Tue Mar 26 21:30:26 2019 (r345559) @@ -362,7 +362,7 @@ showjob(struct job *jp, int mode) const char *statestr, *coredump; struct procstat *ps; struct job *j; - int col, curr, i, jobno, prev, procno; + int col, curr, i, jobno, prev, procno, status; char c; procno = (mode == SHOWJOBS_PGIDS) ? 1 : jp->nprocs; @@ -376,11 +376,12 @@ showjob(struct job *jp, int mode) } #endif coredump = ""; - ps = jp->ps + jp->nprocs - 1; + status = jp->ps[jp->nprocs - 1].status; if (jp->state == 0) { statestr = "Running"; #if JOBS } else if (jp->state == JOBSTOPPED) { + ps = jp->ps + jp->nprocs - 1; while (!WIFSTOPPED(ps->status) && ps > jp->ps) ps--; if (WIFSTOPPED(ps->status)) @@ -391,20 +392,20 @@ showjob(struct job *jp, int mode) if (statestr == NULL) statestr = "Suspended"; #endif - } else if (WIFEXITED(ps->status)) { - if (WEXITSTATUS(ps->status) == 0) + } else if (WIFEXITED(status)) { + if (WEXITSTATUS(status) == 0) statestr = "Done"; else { fmtstr(statebuf, sizeof(statebuf), "Done(%d)", - WEXITSTATUS(ps->status)); + WEXITSTATUS(status)); statestr = statebuf; } } else { - i = WTERMSIG(ps->status); + i = WTERMSIG(status); statestr = strsignal(i); if (statestr == NULL) statestr = "Unknown signal"; - if (WCOREDUMP(ps->status)) + if (WCOREDUMP(status)) coredump = " (core dumped)"; } From owner-svn-src-stable@freebsd.org Tue Mar 26 22:34:10 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8F6C15620AB; Tue, 26 Mar 2019 22:34:10 +0000 (UTC) (envelope-from jilles@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 584E289FA3; Tue, 26 Mar 2019 22:34:10 +0000 (UTC) (envelope-from jilles@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 30AC526322; Tue, 26 Mar 2019 22:34:10 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2QMY9BQ016351; Tue, 26 Mar 2019 22:34:09 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QMY7iG016340; Tue, 26 Mar 2019 22:34:07 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903262234.x2QMY7iG016340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 26 Mar 2019 22:34: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: r345561 - in stable/11/bin/sh: . tests/execution X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in stable/11/bin/sh: . tests/execution X-SVN-Commit-Revision: 345561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 584E289FA3 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(-0.99)[-0.989,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)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 22:34:11 -0000 Author: jilles Date: Tue Mar 26 22:34:07 2019 New Revision: 345561 URL: https://svnweb.freebsd.org/changeset/base/345561 Log: MFC r344502: sh: Add set -o pipefail The pipefail option allows checking the exit status of all commands in a pipeline more easily, at a limited cost of complexity in sh itself. It works similarly to the option in bash, ksh93 and mksh. Like ksh93 and unlike bash and mksh, the state of the option is saved when a pipeline is started. Therefore, even in the case of commands like A | B & a later change of the option does not change the exit status, the same way (A | B) & works. Since SIGPIPE is not handled specially, more work in the script is required for a proper exit status for pipelines containing commands such as head that may terminate successfully without reading all input. This can be something like ( cmd1 r=$? if [ "$r" -gt 128 ] && [ "$(kill -l "$r")" = PIPE ]; then exit 0 else exit "$r" fi ) | head PR: 224270 Relnotes: yes Added: stable/11/bin/sh/tests/execution/pipefail1.0 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail1.0 stable/11/bin/sh/tests/execution/pipefail2.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail2.42 stable/11/bin/sh/tests/execution/pipefail3.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail3.42 stable/11/bin/sh/tests/execution/pipefail4.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail4.42 stable/11/bin/sh/tests/execution/pipefail5.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail5.42 stable/11/bin/sh/tests/execution/pipefail6.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail6.42 stable/11/bin/sh/tests/execution/pipefail7.0 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail7.0 Modified: stable/11/bin/sh/jobs.c stable/11/bin/sh/options.h stable/11/bin/sh/sh.1 stable/11/bin/sh/tests/execution/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/jobs.c ============================================================================== --- stable/11/bin/sh/jobs.c Tue Mar 26 22:14:50 2019 (r345560) +++ stable/11/bin/sh/jobs.c Tue Mar 26 22:34:07 2019 (r345561) @@ -104,6 +104,7 @@ struct job { char changed; /* true if status has changed */ char foreground; /* true if running in the foreground */ char remembered; /* true if $! referenced */ + char pipefail; /* pass any non-zero status */ #if JOBS char jobctl; /* job running under job control */ struct job *next; /* job used after this one */ @@ -143,6 +144,7 @@ static void setcurjob(struct job *); static void deljob(struct job *); static struct job *getcurjob(struct job *); #endif +static int getjobstatus(const struct job *); static void printjobcmd(struct job *); static void showjob(struct job *, int); @@ -340,6 +342,20 @@ jobscmd(int argc __unused, char *argv[] __unused) return (0); } +static int getjobstatus(const struct job *jp) +{ + int i, status; + + if (!jp->pipefail) + return (jp->ps[jp->nprocs - 1].status); + for (i = jp->nprocs - 1; i >= 0; i--) { + status = jp->ps[i].status; + if (status != 0) + return (status); + } + return (0); +} + static void printjobcmd(struct job *jp) { @@ -376,7 +392,7 @@ showjob(struct job *jp, int mode) } #endif coredump = ""; - status = jp->ps[jp->nprocs - 1].status; + status = getjobstatus(jp); if (jp->state == 0) { statestr = "Running"; #if JOBS @@ -555,7 +571,7 @@ waitcmdloop(struct job *job) do { if (job != NULL) { if (job->state == JOBDONE) { - status = job->ps[job->nprocs - 1].status; + status = getjobstatus(job); if (WIFEXITED(status)) retval = WEXITSTATUS(status); else @@ -780,6 +796,7 @@ makejob(union node *node __unused, int nprocs) jp->nprocs = 0; jp->foreground = 0; jp->remembered = 0; + jp->pipefail = pipefailflag; #if JOBS jp->jobctl = jobctl; jp->next = NULL; @@ -1075,7 +1092,7 @@ waitforjob(struct job *jp, int *origstatus) if (jp->state == JOBSTOPPED) setcurjob(jp); #endif - status = jp->ps[jp->nprocs - 1].status; + status = getjobstatus(jp); if (origstatus != NULL) *origstatus = status; /* convert to 8 bits */ Modified: stable/11/bin/sh/options.h ============================================================================== --- stable/11/bin/sh/options.h Tue Mar 26 22:14:50 2019 (r345560) +++ stable/11/bin/sh/options.h Tue Mar 26 22:34:07 2019 (r345561) @@ -65,9 +65,10 @@ struct shparam { #define Pflag optval[17] #define hflag optval[18] #define nologflag optval[19] +#define pipefailflag optval[20] #define NSHORTOPTS 19 -#define NOPTS 20 +#define NOPTS 21 extern char optval[NOPTS]; extern const char optletter[NSHORTOPTS]; @@ -95,6 +96,7 @@ static const unsigned char optname[] = "\010physical" "\010trackall" "\005nolog" + "\010pipefail" ; #endif Modified: stable/11/bin/sh/sh.1 ============================================================================== --- stable/11/bin/sh/sh.1 Tue Mar 26 22:14:50 2019 (r345560) +++ stable/11/bin/sh/sh.1 Tue Mar 26 22:34:07 2019 (r345561) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd May 30, 2016 +.Dd February 24, 2019 .Dt SH 1 .Os .Sh NAME @@ -348,6 +348,18 @@ Another do-nothing option for .Tn POSIX compliance. It only has a long name. +.It Li pipefail +Change the exit status of a pipeline to the last non-zero exit status of +any command in the pipeline, if any. +Since an exit due to +.Dv SIGPIPE +counts as a non-zero exit status, +this option may cause non-zero exit status for successful pipelines +if a command such as +.Xr head 1 +in the pipeline terminates with status 0 without reading its +input completely. +This option only has a long name. .El .Pp The @@ -865,12 +877,15 @@ If the keyword .Ic !\& does not precede the pipeline, the exit status is the exit status of the last command specified -in the pipeline. +in the pipeline if the +.Cm pipefail +option is not set or all commands returned zero, +or the last non-zero exit status of any command in the pipeline otherwise. Otherwise, the exit status is the logical -NOT of the exit status of the last command. +NOT of that exit status. That is, if -the last command returns zero, the exit status is 1; if -the last command returns greater than zero, the exit status +that status is zero, the exit status is 1; if +that status is greater than zero, the exit status is zero. .Pp Because pipeline assignment of standard input or standard Modified: stable/11/bin/sh/tests/execution/Makefile ============================================================================== --- stable/11/bin/sh/tests/execution/Makefile Tue Mar 26 22:14:50 2019 (r345560) +++ stable/11/bin/sh/tests/execution/Makefile Tue Mar 26 22:34:07 2019 (r345561) @@ -30,6 +30,13 @@ ${PACKAGE}FILES+= killed2.0 ${PACKAGE}FILES+= not1.0 ${PACKAGE}FILES+= not2.0 ${PACKAGE}FILES+= path1.0 +${PACKAGE}FILES+= pipefail1.0 +${PACKAGE}FILES+= pipefail2.42 +${PACKAGE}FILES+= pipefail3.42 +${PACKAGE}FILES+= pipefail4.42 +${PACKAGE}FILES+= pipefail5.42 +${PACKAGE}FILES+= pipefail6.42 +${PACKAGE}FILES+= pipefail7.0 ${PACKAGE}FILES+= redir1.0 ${PACKAGE}FILES+= redir2.0 ${PACKAGE}FILES+= redir3.0 Copied: stable/11/bin/sh/tests/execution/pipefail1.0 (from r344502, head/bin/sh/tests/execution/pipefail1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail1.0 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail1.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +: && : | : && : | : | : && : | : | : | : Copied: stable/11/bin/sh/tests/execution/pipefail2.42 (from r344502, head/bin/sh/tests/execution/pipefail2.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail2.42 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail2.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : Copied: stable/11/bin/sh/tests/execution/pipefail3.42 (from r344502, head/bin/sh/tests/execution/pipefail3.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail3.42 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail3.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +: | (exit 42) Copied: stable/11/bin/sh/tests/execution/pipefail4.42 (from r344502, head/bin/sh/tests/execution/pipefail4.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail4.42 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail4.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +(exit 43) | (exit 42) Copied: stable/11/bin/sh/tests/execution/pipefail5.42 (from r344502, head/bin/sh/tests/execution/pipefail5.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail5.42 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail5.42) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : & +wait %+ Copied: stable/11/bin/sh/tests/execution/pipefail6.42 (from r344502, head/bin/sh/tests/execution/pipefail6.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail6.42 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail6.42) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : & +set +o pipefail +wait %+ Copied: stable/11/bin/sh/tests/execution/pipefail7.0 (from r344502, head/bin/sh/tests/execution/pipefail7.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail7.0 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail7.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +(exit 42) | : & +set -o pipefail +wait %+ From owner-svn-src-stable@freebsd.org Wed Mar 27 08:56:00 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E8F515489F7; Wed, 27 Mar 2019 08:56:00 +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 1E53B6C2BA; Wed, 27 Mar 2019 08:56:00 +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 E750A4F71; Wed, 27 Mar 2019 08:55:59 +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 x2R8txa9040142; Wed, 27 Mar 2019 08:55:59 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2R8txnK040141; Wed, 27 Mar 2019 08:55:59 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903270855.x2R8txnK040141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 27 Mar 2019 08:55:59 +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: r345569 - in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf X-SVN-Commit-Revision: 345569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1E53B6C2BA 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.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 08:56:00 -0000 Author: avos Date: Wed Mar 27 08:55:59 2019 New Revision: 345569 URL: https://svnweb.freebsd.org/changeset/base/345569 Log: MFC r345318: lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not exist Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation. Was checked with a command from PR 210770: lockf -n /tmp/doesnotexist echo; echo $? PR: 210770 Modified: stable/11/usr.bin/lockf/lockf.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/lockf/lockf.c stable/12/usr.bin/lockf/lockf.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/usr.bin/lockf/lockf.c ============================================================================== --- stable/11/usr.bin/lockf/lockf.c Wed Mar 27 08:02:55 2019 (r345568) +++ stable/11/usr.bin/lockf/lockf.c Wed Mar 27 08:55:59 2019 (r345569) @@ -174,6 +174,8 @@ acquire_lock(const char *name, int flags) if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); + else if (errno == ENOENT && (flags & O_CREAT) == 0) + err(EX_UNAVAILABLE, "%s", name); err(EX_CANTCREAT, "cannot open %s", name); } return (fd); From owner-svn-src-stable@freebsd.org Wed Mar 27 08:56:00 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0BB415489FB; Wed, 27 Mar 2019 08:56:00 +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 6DC7B6C2BB; Wed, 27 Mar 2019 08:56:00 +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 452B04F72; Wed, 27 Mar 2019 08:56:00 +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 x2R8u0mU040152; Wed, 27 Mar 2019 08:56:00 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2R8u0li040151; Wed, 27 Mar 2019 08:56:00 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903270856.x2R8u0li040151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 27 Mar 2019 08:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r345569 - in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf X-SVN-Commit-Revision: 345569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6DC7B6C2BB 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.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 08:56:01 -0000 Author: avos Date: Wed Mar 27 08:55:59 2019 New Revision: 345569 URL: https://svnweb.freebsd.org/changeset/base/345569 Log: MFC r345318: lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not exist Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation. Was checked with a command from PR 210770: lockf -n /tmp/doesnotexist echo; echo $? PR: 210770 Modified: stable/10/usr.bin/lockf/lockf.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/lockf/lockf.c stable/12/usr.bin/lockf/lockf.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/usr.bin/lockf/lockf.c ============================================================================== --- stable/10/usr.bin/lockf/lockf.c Wed Mar 27 08:02:55 2019 (r345568) +++ stable/10/usr.bin/lockf/lockf.c Wed Mar 27 08:55:59 2019 (r345569) @@ -172,6 +172,8 @@ acquire_lock(const char *name, int flags) if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); + else if (errno == ENOENT && (flags & O_CREAT) == 0) + err(EX_UNAVAILABLE, "%s", name); err(EX_CANTCREAT, "cannot open %s", name); } return (fd); From owner-svn-src-stable@freebsd.org Wed Mar 27 08:56:01 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3826A1548A02; Wed, 27 Mar 2019 08:56: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 CCC9D6C2BE; Wed, 27 Mar 2019 08:56:00 +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 981A34F73; Wed, 27 Mar 2019 08:56:00 +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 x2R8u0eL040158; Wed, 27 Mar 2019 08:56:00 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2R8u0PF040157; Wed, 27 Mar 2019 08:56:00 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903270856.x2R8u0PF040157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 27 Mar 2019 08:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345569 - in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf X-SVN-Commit-Revision: 345569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CCC9D6C2BE 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.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 08:56:01 -0000 Author: avos Date: Wed Mar 27 08:55:59 2019 New Revision: 345569 URL: https://svnweb.freebsd.org/changeset/base/345569 Log: MFC r345318: lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not exist Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation. Was checked with a command from PR 210770: lockf -n /tmp/doesnotexist echo; echo $? PR: 210770 Modified: stable/12/usr.bin/lockf/lockf.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/lockf/lockf.c stable/11/usr.bin/lockf/lockf.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/usr.bin/lockf/lockf.c ============================================================================== --- stable/12/usr.bin/lockf/lockf.c Wed Mar 27 08:02:55 2019 (r345568) +++ stable/12/usr.bin/lockf/lockf.c Wed Mar 27 08:55:59 2019 (r345569) @@ -174,6 +174,8 @@ acquire_lock(const char *name, int flags) if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); + else if (errno == ENOENT && (flags & O_CREAT) == 0) + err(EX_UNAVAILABLE, "%s", name); err(EX_CANTCREAT, "cannot open %s", name); } return (fd); From owner-svn-src-stable@freebsd.org Wed Mar 27 09:18:36 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E702F1549F8E; Wed, 27 Mar 2019 09:18:35 +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 86AC46D2D3; Wed, 27 Mar 2019 09:18:35 +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 5922D52D6; Wed, 27 Mar 2019 09:18:35 +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 x2R9IZnF051221; Wed, 27 Mar 2019 09:18:35 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2R9IZ71051220; Wed, 27 Mar 2019 09:18:35 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903270918.x2R9IZ71051220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 27 Mar 2019 09:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345570 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 345570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 86AC46D2D3 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(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 09:18:36 -0000 Author: avos Date: Wed Mar 27 09:18:34 2019 New Revision: 345570 URL: https://svnweb.freebsd.org/changeset/base/345570 Log: MFC r344994: urtw(4): add promiscuous mode callback Also, pass control frames to the host while in MONITOR mode and / or when promiscuous mode is enabled. Was tested with Netgear WG111 v3 (RTL8187B), STA / MONITOR modes. Modified: stable/12/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_urtw.c Wed Mar 27 08:55:59 2019 (r345569) +++ stable/12/sys/dev/usb/wlan/if_urtw.c Wed Mar 27 09:18:34 2019 (r345570) @@ -670,6 +670,7 @@ static void urtw_scan_end(struct ieee80211com *); static void urtw_getradiocaps(struct ieee80211com *, int, int *, struct ieee80211_channel[]); static void urtw_set_channel(struct ieee80211com *); +static void urtw_update_promisc(struct ieee80211com *); static void urtw_update_mcast(struct ieee80211com *); static int urtw_tx_start(struct urtw_softc *, struct ieee80211_node *, struct mbuf *, @@ -896,6 +897,7 @@ urtw_attach(device_t dev) ic->ic_updateslot = urtw_updateslot; ic->ic_vap_create = urtw_vap_create; ic->ic_vap_delete = urtw_vap_delete; + ic->ic_update_promisc = urtw_update_promisc; ic->ic_update_mcast = urtw_update_mcast; ic->ic_parent = urtw_parent; ic->ic_transmit = urtw_transmit; @@ -1631,6 +1633,17 @@ fail: } static void +urtw_update_promisc(struct ieee80211com *ic) +{ + struct urtw_softc *sc = ic->ic_softc; + + URTW_LOCK(sc); + if (sc->sc_flags & URTW_RUNNING) + urtw_rx_setconf(sc); + URTW_UNLOCK(sc); +} + +static void urtw_update_mcast(struct ieee80211com *ic) { @@ -3877,7 +3890,6 @@ urtw_rx_setconf(struct urtw_softc *sc) if (sc->sc_flags & URTW_RTL8187B) { data = data | URTW_RX_FILTER_MNG | URTW_RX_FILTER_DATA | URTW_RX_FILTER_MCAST | URTW_RX_FILTER_BCAST | - URTW_RX_FILTER_NICMAC | URTW_RX_CHECK_BSSID | URTW_RX_FIFO_THRESHOLD_NONE | URTW_MAX_RX_DMA_2048 | URTW_RX_AUTORESETPHY | URTW_RCR_ONLYERLPKT; @@ -3892,19 +3904,21 @@ urtw_rx_setconf(struct urtw_softc *sc) if (sc->sc_crcmon == 1 && ic->ic_opmode == IEEE80211_M_MONITOR) data = data | URTW_RX_FILTER_CRCERR; - if (ic->ic_opmode == IEEE80211_M_MONITOR || - ic->ic_promisc > 0 || ic->ic_allmulti > 0) { - data = data | URTW_RX_FILTER_ALLMAC; - } else { - data = data | URTW_RX_FILTER_NICMAC; - data = data | URTW_RX_CHECK_BSSID; - } - data = data &~ URTW_RX_FIFO_THRESHOLD_MASK; data = data | URTW_RX_FIFO_THRESHOLD_NONE | URTW_RX_AUTORESETPHY; data = data &~ URTW_MAX_RX_DMA_MASK; data = data | URTW_MAX_RX_DMA_2048 | URTW_RCR_ONLYERLPKT; + } + + /* XXX allmulti should not be checked here... */ + if (ic->ic_opmode == IEEE80211_M_MONITOR || + ic->ic_promisc > 0 || ic->ic_allmulti > 0) { + data = data | URTW_RX_FILTER_CTL; + data = data | URTW_RX_FILTER_ALLMAC; + } else { + data = data | URTW_RX_FILTER_NICMAC; + data = data | URTW_RX_CHECK_BSSID; } urtw_write32_m(sc, URTW_RX, data); From owner-svn-src-stable@freebsd.org Wed Mar 27 09:18:35 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B02E21549F8D; Wed, 27 Mar 2019 09:18:35 +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 4F7EC6D2D2; Wed, 27 Mar 2019 09:18:35 +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 1DF3F52D5; Wed, 27 Mar 2019 09:18:35 +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 x2R9IYHG051215; Wed, 27 Mar 2019 09:18:34 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2R9IYOn051214; Wed, 27 Mar 2019 09:18:34 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903270918.x2R9IYOn051214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 27 Mar 2019 09:18:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345570 - in stable: 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: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 345570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F7EC6D2D2 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(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 09:18:36 -0000 Author: avos Date: Wed Mar 27 09:18:34 2019 New Revision: 345570 URL: https://svnweb.freebsd.org/changeset/base/345570 Log: MFC r344994: urtw(4): add promiscuous mode callback Also, pass control frames to the host while in MONITOR mode and / or when promiscuous mode is enabled. Was tested with Netgear WG111 v3 (RTL8187B), STA / MONITOR modes. Modified: stable/11/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_urtw.c Wed Mar 27 08:55:59 2019 (r345569) +++ stable/11/sys/dev/usb/wlan/if_urtw.c Wed Mar 27 09:18:34 2019 (r345570) @@ -661,6 +661,7 @@ static void urtw_scan_end(struct ieee80211com *); static void urtw_getradiocaps(struct ieee80211com *, int, int *, struct ieee80211_channel[]); static void urtw_set_channel(struct ieee80211com *); +static void urtw_update_promisc(struct ieee80211com *); static void urtw_update_mcast(struct ieee80211com *); static int urtw_tx_start(struct urtw_softc *, struct ieee80211_node *, struct mbuf *, @@ -888,6 +889,7 @@ urtw_attach(device_t dev) ic->ic_updateslot = urtw_updateslot; ic->ic_vap_create = urtw_vap_create; ic->ic_vap_delete = urtw_vap_delete; + ic->ic_update_promisc = urtw_update_promisc; ic->ic_update_mcast = urtw_update_mcast; ic->ic_parent = urtw_parent; ic->ic_transmit = urtw_transmit; @@ -1623,6 +1625,17 @@ fail: } static void +urtw_update_promisc(struct ieee80211com *ic) +{ + struct urtw_softc *sc = ic->ic_softc; + + URTW_LOCK(sc); + if (sc->sc_flags & URTW_RUNNING) + urtw_rx_setconf(sc); + URTW_UNLOCK(sc); +} + +static void urtw_update_mcast(struct ieee80211com *ic) { @@ -3882,7 +3895,6 @@ urtw_rx_setconf(struct urtw_softc *sc) if (sc->sc_flags & URTW_RTL8187B) { data = data | URTW_RX_FILTER_MNG | URTW_RX_FILTER_DATA | URTW_RX_FILTER_MCAST | URTW_RX_FILTER_BCAST | - URTW_RX_FILTER_NICMAC | URTW_RX_CHECK_BSSID | URTW_RX_FIFO_THRESHOLD_NONE | URTW_MAX_RX_DMA_2048 | URTW_RX_AUTORESETPHY | URTW_RCR_ONLYERLPKT; @@ -3897,19 +3909,21 @@ urtw_rx_setconf(struct urtw_softc *sc) if (sc->sc_crcmon == 1 && ic->ic_opmode == IEEE80211_M_MONITOR) data = data | URTW_RX_FILTER_CRCERR; - if (ic->ic_opmode == IEEE80211_M_MONITOR || - ic->ic_promisc > 0 || ic->ic_allmulti > 0) { - data = data | URTW_RX_FILTER_ALLMAC; - } else { - data = data | URTW_RX_FILTER_NICMAC; - data = data | URTW_RX_CHECK_BSSID; - } - data = data &~ URTW_RX_FIFO_THRESHOLD_MASK; data = data | URTW_RX_FIFO_THRESHOLD_NONE | URTW_RX_AUTORESETPHY; data = data &~ URTW_MAX_RX_DMA_MASK; data = data | URTW_MAX_RX_DMA_2048 | URTW_RCR_ONLYERLPKT; + } + + /* XXX allmulti should not be checked here... */ + if (ic->ic_opmode == IEEE80211_M_MONITOR || + ic->ic_promisc > 0 || ic->ic_allmulti > 0) { + data = data | URTW_RX_FILTER_CTL; + data = data | URTW_RX_FILTER_ALLMAC; + } else { + data = data | URTW_RX_FILTER_NICMAC; + data = data | URTW_RX_CHECK_BSSID; } urtw_write32_m(sc, URTW_RX, data); From owner-svn-src-stable@freebsd.org Wed Mar 27 10:58:38 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62809154C61E; Wed, 27 Mar 2019 10:58:38 +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 BBF8F70068; Wed, 27 Mar 2019 10:58: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 8ECBB63AE; Wed, 27 Mar 2019 10:58: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 x2RAwbjG003290; Wed, 27 Mar 2019 10:58:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RAwb1h003289; Wed, 27 Mar 2019 10:58:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903271058.x2RAwb1h003289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Mar 2019 10:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345571 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 345571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BBF8F70068 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 10:58:38 -0000 Author: kib Date: Wed Mar 27 10:58:37 2019 New Revision: 345571 URL: https://svnweb.freebsd.org/changeset/base/345571 Log: MFC r345324: vm_fault_copy_entry: accept invalid source pages. Modified: stable/12/sys/vm/vm_fault.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_fault.c ============================================================================== --- stable/12/sys/vm/vm_fault.c Wed Mar 27 09:18:34 2019 (r345570) +++ stable/12/sys/vm/vm_fault.c Wed Mar 27 10:58:37 2019 (r345571) @@ -1745,8 +1745,7 @@ again: } pmap_copy_page(src_m, dst_m); VM_OBJECT_RUNLOCK(object); - dst_m->valid = VM_PAGE_BITS_ALL; - dst_m->dirty = VM_PAGE_BITS_ALL; + dst_m->dirty = dst_m->valid = src_m->valid; } else { dst_m = src_m; if (vm_page_sleep_if_busy(dst_m, "fltupg")) @@ -1759,8 +1758,6 @@ again: */ break; vm_page_xbusy(dst_m); - KASSERT(dst_m->valid == VM_PAGE_BITS_ALL, - ("invalid dst page %p", dst_m)); } VM_OBJECT_WUNLOCK(dst_object); @@ -1768,9 +1765,18 @@ again: * Enter it in the pmap. If a wired, copy-on-write * mapping is being replaced by a write-enabled * mapping, then wire that new mapping. + * + * The page can be invalid if the user called + * msync(MS_INVALIDATE) or truncated the backing vnode + * or shared memory object. In this case, do not + * insert it into pmap, but still do the copy so that + * all copies of the wired map entry have similar + * backing pages. */ - pmap_enter(dst_map->pmap, vaddr, dst_m, prot, - access | (upgrade ? PMAP_ENTER_WIRED : 0), 0); + if (dst_m->valid == VM_PAGE_BITS_ALL) { + pmap_enter(dst_map->pmap, vaddr, dst_m, prot, + access | (upgrade ? PMAP_ENTER_WIRED : 0), 0); + } /* * Mark it no longer busy, and put it on the active list. From owner-svn-src-stable@freebsd.org Wed Mar 27 11:03:08 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EDDC154C94B; Wed, 27 Mar 2019 11:03:08 +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 3EA827059F; Wed, 27 Mar 2019 11:03:08 +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 2108F656B; Wed, 27 Mar 2019 11:03:08 +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 x2RB37et008284; Wed, 27 Mar 2019 11:03:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RB375S008283; Wed, 27 Mar 2019 11:03:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903271103.x2RB375S008283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Mar 2019 11:03: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: r345572 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 345572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3EA827059F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 11:03:08 -0000 Author: kib Date: Wed Mar 27 11:03:07 2019 New Revision: 345572 URL: https://svnweb.freebsd.org/changeset/base/345572 Log: MFC r345324: vm_fault_copy_entry: accept invalid source pages. Modified: stable/11/sys/vm/vm_fault.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_fault.c ============================================================================== --- stable/11/sys/vm/vm_fault.c Wed Mar 27 10:58:37 2019 (r345571) +++ stable/11/sys/vm/vm_fault.c Wed Mar 27 11:03:07 2019 (r345572) @@ -1705,8 +1705,7 @@ again: } pmap_copy_page(src_m, dst_m); VM_OBJECT_RUNLOCK(object); - dst_m->valid = VM_PAGE_BITS_ALL; - dst_m->dirty = VM_PAGE_BITS_ALL; + dst_m->dirty = dst_m->valid = src_m->valid; } else { dst_m = src_m; if (vm_page_sleep_if_busy(dst_m, "fltupg")) @@ -1719,8 +1718,6 @@ again: */ break; vm_page_xbusy(dst_m); - KASSERT(dst_m->valid == VM_PAGE_BITS_ALL, - ("invalid dst page %p", dst_m)); } VM_OBJECT_WUNLOCK(dst_object); @@ -1728,9 +1725,18 @@ again: * Enter it in the pmap. If a wired, copy-on-write * mapping is being replaced by a write-enabled * mapping, then wire that new mapping. + * + * The page can be invalid if the user called + * msync(MS_INVALIDATE) or truncated the backing vnode + * or shared memory object. In this case, do not + * insert it into pmap, but still do the copy so that + * all copies of the wired map entry have similar + * backing pages. */ - pmap_enter(dst_map->pmap, vaddr, dst_m, prot, - access | (upgrade ? PMAP_ENTER_WIRED : 0), 0); + if (dst_m->valid == VM_PAGE_BITS_ALL) { + pmap_enter(dst_map->pmap, vaddr, dst_m, prot, + access | (upgrade ? PMAP_ENTER_WIRED : 0), 0); + } /* * Mark it no longer busy, and put it on the active list. From owner-svn-src-stable@freebsd.org Wed Mar 27 14:47:12 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 894CF15520C5; Wed, 27 Mar 2019 14:47:12 +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 2C8C177B9E; Wed, 27 Mar 2019 14:47:12 +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 055228ACE; Wed, 27 Mar 2019 14:47:12 +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 x2RElBq3024127; Wed, 27 Mar 2019 14:47:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RElBxk024122; Wed, 27 Mar 2019 14:47:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201903271447.x2RElBxk024122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 27 Mar 2019 14:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345577 - stable/12/usr.bin/calendar X-SVN-Group: stable-12 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/12/usr.bin/calendar X-SVN-Commit-Revision: 345577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2C8C177B9E 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.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 14:47:12 -0000 Author: bapt Date: Wed Mar 27 14:47:10 2019 New Revision: 345577 URL: https://svnweb.freebsd.org/changeset/base/345577 Log: MFC r344340: calendar: use iconv to respect the output encoding calendar(1) can have input in various encoding, specifying LANG= to enable calendar(1) to determine which one to use. The problem is the content of the calendar itself is exposed as is making it unreadable in many cases. For example french calendar which is encoded ISO8859-1 is rendered badly in a fr_FR.UTF-8 environment. Using iconv allows to solve this issue. This will also allow to keep only 1 encoding in base for those files without breaking user existing setup Reported by: many Differential Revision: https://reviews.freebsd.org/D19221 Modified: stable/12/usr.bin/calendar/Makefile stable/12/usr.bin/calendar/calendar.c stable/12/usr.bin/calendar/calendar.h stable/12/usr.bin/calendar/events.c stable/12/usr.bin/calendar/io.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/calendar/Makefile ============================================================================== --- stable/12/usr.bin/calendar/Makefile Wed Mar 27 14:35:38 2019 (r345576) +++ stable/12/usr.bin/calendar/Makefile Wed Mar 27 14:47:10 2019 (r345577) @@ -13,6 +13,10 @@ INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_F DE_LINKS= de_DE.ISO8859-15 FR_LINKS= fr_FR.ISO8859-15 +.if ${MK_ICONV} == "yes" +CFLAGS+= -DWITH_ICONV +.endif + FILESGROUPS+= CALS CALS= calendars/calendar.all \ calendars/calendar.australia \ Modified: stable/12/usr.bin/calendar/calendar.c ============================================================================== --- stable/12/usr.bin/calendar/calendar.c Wed Mar 27 14:35:38 2019 (r345576) +++ stable/12/usr.bin/calendar/calendar.c Wed Mar 27 14:47:10 2019 (r345577) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -66,6 +67,9 @@ static char *DEBUG = NULL; static time_t f_time = 0; double UTCOffset = UTCOFFSET_NOTSET; int EastLongitude = LONGITUDE_NOTSET; +#ifdef WITH_ICONV +const char *outputEncoding; +#endif static void usage(void) __dead2; @@ -80,6 +84,12 @@ main(int argc, char *argv[]) struct tm tp1, tp2; (void)setlocale(LC_ALL, ""); +#ifdef WITH_ICONV + /* save the information about the encoding used in the terminal */ + outputEncoding = strdup(nl_langinfo(CODESET)); + if (outputEncoding == NULL) + errx(1, "cannot allocate memory"); +#endif while ((ch = getopt(argc, argv, "-A:aB:D:dF:f:l:t:U:W:?")) != -1) switch (ch) { Modified: stable/12/usr.bin/calendar/calendar.h ============================================================================== --- stable/12/usr.bin/calendar/calendar.h Wed Mar 27 14:35:38 2019 (r345576) +++ stable/12/usr.bin/calendar/calendar.h Wed Mar 27 14:47:10 2019 (r345577) @@ -59,6 +59,9 @@ extern struct fixs neaster, npaskha, ncny, nfullmoon, extern struct fixs nmarequinox, nsepequinox, njunsolstice, ndecsolstice; extern double UTCOffset; extern int EastLongitude; +#ifdef WITH_ICONV +extern const char *outputEncoding; +#endif #define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) @@ -197,3 +200,7 @@ void fpom(int year, double utcoffset, double *ffms, do void equinoxsolstice(int year, double UTCoffset, int *equinoxdays, int *solsticedays); void fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsticedays); int calculatesunlongitude30(int year, int degreeGMToffset, int *ichinesemonths); + +#ifdef WITH_ICONV +void set_new_encoding(void); +#endif Modified: stable/12/usr.bin/calendar/events.c ============================================================================== --- stable/12/usr.bin/calendar/events.c Wed Mar 27 14:35:38 2019 (r345576) +++ stable/12/usr.bin/calendar/events.c Wed Mar 27 14:47:10 2019 (r345577) @@ -35,10 +35,120 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef WITH_ICONV +#include +#include +#include +static iconv_t conv = (iconv_t)-1; +static char *currentEncoding = NULL; + +#endif + #include "pathnames.h" #include "calendar.h" +#ifdef WITH_ICONV +void +set_new_encoding(void) +{ + const char *newenc; + + newenc = nl_langinfo(CODESET); + if (currentEncoding == NULL) { + currentEncoding = strdup(newenc); + if (currentEncoding == NULL) + errx(1, "set_new_encoding: cannot allocate memory"); + return; + } + if (strcmp(currentEncoding, newenc) == 0) + return; + free(currentEncoding); + currentEncoding = strdup(newenc); + if (currentEncoding == NULL) + errx(1, "set_new_encoding: cannot allocate memory"); + if (conv != (iconv_t) -1) { + iconv_close(conv); + conv = (iconv_t) -1; + } +} +#endif + +static char * +convert(char *input) +{ + char *output; +#ifdef WITH_ICONV + size_t inleft, outleft, converted = 0; + char *outbuf, *tmp; + char *inbuf; + size_t outlen; + + if (currentEncoding == NULL) { + output = strdup(input); + if (output == NULL) + errx(1, "convert: cannot allocate memory"); + return (output); + } + if (conv == (iconv_t)-1) { + conv = iconv_open(outputEncoding, currentEncoding); + if (conv == (iconv_t)-1) { + if (errno == EINVAL) + errx(1, "Conversion is not supported"); + else + err(1, "Initialization failure"); + } + } + + inleft = strlen(input); + inbuf = input; + + outlen = inleft; + if ((output = malloc(outlen + 1)) == NULL) + errx(1, "convert: cannot allocate memory"); + + for (;;) { + errno = 0; + outbuf = output + converted; + outleft = outlen - converted; + + converted = iconv(conv, (char **) &inbuf, &inleft, &outbuf, &outleft); + if (converted != (size_t) -1 || errno == EINVAL) { + /* finished or invalid multibyte, so truncate and ignore */ + break; + } + + if (errno != E2BIG) { + free(output); + err(1, "convert"); + } + + converted = outbuf - output; + outlen += inleft * 2; + + if ((tmp = realloc(output, outlen + 1)) == NULL) { + free(output); + errx(1, "convert: cannot allocate memory"); + } + + output = tmp; + outbuf = output + converted; + } + + /* flush the iconv conversion */ + iconv(conv, NULL, NULL, &outbuf, &outleft); + + /* null terminate the string */ + *outbuf = '\0'; +#else + output = strdup(input); + if (output == NULL) + errx(1, "convert: cannot allocate memory"); +#endif + + return (output); +} + struct event * event_add(int year, int month, int day, char *date, int var, char *txt, char *extra) @@ -58,15 +168,15 @@ event_add(int year, int month, int day, char *date, in e->month = month; e->day = day; e->var = var; - e->date = strdup(date); + e->date = convert(date); if (e->date == NULL) errx(1, "event_add: cannot allocate memory"); - e->text = strdup(txt); + e->text = convert(txt); if (e->text == NULL) errx(1, "event_add: cannot allocate memory"); e->extra = NULL; if (extra != NULL && extra[0] != '\0') - e->extra = strdup(extra); + e->extra = convert(extra); addtodate(e, year, month, day); return (e); } @@ -74,23 +184,17 @@ event_add(int year, int month, int day, char *date, in void event_continue(struct event *e, char *txt) { - char *text; + char *oldtext, *text; - /* - * Adding text to the event: - * - Save a copy of the old text (unknown length, so strdup()) - * - Allocate enough space for old text + \n + new text + 0 - * - Store the old text + \n + new text - * - Destroy the saved copy. - */ - text = strdup(e->text); - if (text == NULL) + text = convert(txt); + oldtext = e->text; + if (oldtext == NULL) errx(1, "event_continue: cannot allocate memory"); - free(e->text); - asprintf(&e->text, "%s\n%s", text, txt); + asprintf(&e->text, "%s\n%s", oldtext, text); if (e->text == NULL) errx(1, "event_continue: cannot allocate memory"); + free(oldtext); free(text); return; Modified: stable/12/usr.bin/calendar/io.c ============================================================================== --- stable/12/usr.bin/calendar/io.c Wed Mar 27 14:35:38 2019 (r345576) +++ stable/12/usr.bin/calendar/io.c Wed Mar 27 14:47:10 2019 (r345577) @@ -294,6 +294,9 @@ cal_parse(FILE *in, FILE *out) if (strncmp(buf, "LANG=", 5) == 0) { (void)setlocale(LC_ALL, buf + 5); d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); +#ifdef WITH_ICONV + set_new_encoding(); +#endif setnnames(); continue; } From owner-svn-src-stable@freebsd.org Wed Mar 27 14:51:05 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F0651552200; Wed, 27 Mar 2019 14:51:05 +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 1A89D77EF3; Wed, 27 Mar 2019 14:51:05 +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 E79DB8AF4; Wed, 27 Mar 2019 14:51:04 +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 x2REp4wP028043; Wed, 27 Mar 2019 14:51:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2REp42k027330; Wed, 27 Mar 2019 14:51:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201903271451.x2REp42k027330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 27 Mar 2019 14:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345578 - in stable/12/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-SVN-Group: stable-12 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in stable/12/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-SVN-Commit-Revision: 345578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A89D77EF3 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.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 14:51:05 -0000 Author: bapt Date: Wed Mar 27 14:51:03 2019 New Revision: 345578 URL: https://svnweb.freebsd.org/changeset/base/345578 Log: MFC r344569, r344618, r344621 r344569: Implement parallel mounting for ZFS filesystem It was first implemented on Illumos and then ported to ZoL. This patch is a port to FreeBSD of the ZoL version. This patch also includes a fix for a race condition that was amended With such patch Delphix has seen a huge decrease in latency of the mount phase (https://github.com/openzfs/openzfs/commit/a3f0e2b569 for details). With that current change Gandi has measured improvments that are on par with those reported by Delphix. Zol commits incorporated: https://github.com/zfsonlinux/zfs/commit/a10d50f999511d304f910852c7825c70c9c9e303 https://github.com/zfsonlinux/zfs/commit/e63ac16d25fbe991a356489c86d4077567dfea21 Reviewed by: avg, sef Approved by: avg, sef Obtained from: ZoL Relnotes: yes Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D19098 r344618: Fix regression introduced in r344569 Reported by: cy Tested by: cy Submitted by: Fatih Acar r344621: Fix a regression introduced in r344569 Import a fix from illumos (thanks Toomas Soomas for pointing at it) See https://www.illumos.org/issues/10205 for more details Illumos commit: https://github.com/illumos/illumos-gate/commit/247b7da039fd88350c50e3d7fef15bdab6bef215 Submitted by: jack@gandi.net Reported by: cy Reviewed by: tsoome, cy, bapt Obtained from: Illumos Modified: stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Wed Mar 27 14:47:10 2019 (r345577) +++ stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Wed Mar 27 14:51:03 2019 (r345578) @@ -5812,8 +5812,13 @@ zfs_do_holds(int argc, char **argv) #define CHECK_SPINNER 30 #define SPINNER_TIME 3 /* seconds */ -#define MOUNT_TIME 5 /* seconds */ +#define MOUNT_TIME 1 /* seconds */ +typedef struct get_all_state { + boolean_t ga_verbose; + get_all_cb_t *ga_cbp; +} get_all_state_t; + static int get_one_dataset(zfs_handle_t *zhp, void *data) { @@ -5821,10 +5826,10 @@ get_one_dataset(zfs_handle_t *zhp, void *data) static int spinval = 0; static int spincheck = 0; static time_t last_spin_time = (time_t)0; - get_all_cb_t *cbp = data; + get_all_state_t *state = data; zfs_type_t type = zfs_get_type(zhp); - if (cbp->cb_verbose) { + if (state->ga_verbose) { if (--spincheck < 0) { time_t now = time(NULL); if (last_spin_time + SPINNER_TIME < now) { @@ -5850,26 +5855,24 @@ get_one_dataset(zfs_handle_t *zhp, void *data) zfs_close(zhp); return (0); } - libzfs_add_handle(cbp, zhp); - assert(cbp->cb_used <= cbp->cb_alloc); + libzfs_add_handle(state->ga_cbp, zhp); + assert(state->ga_cbp->cb_used <= state->ga_cbp->cb_alloc); return (0); } static void -get_all_datasets(zfs_handle_t ***dslist, size_t *count, boolean_t verbose) +get_all_datasets(get_all_cb_t *cbp, boolean_t verbose) { - get_all_cb_t cb = { 0 }; - cb.cb_verbose = verbose; - cb.cb_getone = get_one_dataset; + get_all_state_t state = { + .ga_verbose = verbose, + .ga_cbp = cbp + }; if (verbose) set_progress_header(gettext("Reading ZFS config")); - (void) zfs_iter_root(g_zfs, get_one_dataset, &cb); + (void) zfs_iter_root(g_zfs, get_one_dataset, &state); - *dslist = cb.cb_handles; - *count = cb.cb_used; - if (verbose) finish_progress(gettext("done.")); } @@ -5879,9 +5882,20 @@ get_all_datasets(zfs_handle_t ***dslist, size_t *count * similar, we have a common function with an extra parameter to determine which * mode we are using. */ -#define OP_SHARE 0x1 -#define OP_MOUNT 0x2 +typedef enum { OP_SHARE, OP_MOUNT } share_mount_op_t; +typedef struct share_mount_state { + share_mount_op_t sm_op; + boolean_t sm_verbose; + int sm_flags; + char *sm_options; + char *sm_proto; /* only valid for OP_SHARE */ + pthread_mutex_t sm_lock; /* protects the remaining fields */ + uint_t sm_total; /* number of filesystems to process */ + uint_t sm_done; /* number of filesystems processed */ + int sm_status; /* -1 if any of the share/mount operations failed */ +} share_mount_state_t; + /* * Share or mount a dataset. */ @@ -6101,9 +6115,6 @@ report_mount_progress(int current, int total) time_t now = time(NULL); char info[32]; - /* report 1..n instead of 0..n-1 */ - ++current; - /* display header if we're here for the first time */ if (current == 1) { set_progress_header(gettext("Mounting ZFS filesystems")); @@ -6122,6 +6133,29 @@ report_mount_progress(int current, int total) update_progress(info); } +/* + * zfs_foreach_mountpoint() callback that mounts or shares on filesystem and + * updates the progress meter + */ +static int +share_mount_one_cb(zfs_handle_t *zhp, void *arg) +{ + share_mount_state_t *sms = arg; + int ret; + + ret = share_mount_one(zhp, sms->sm_op, sms->sm_flags, sms->sm_proto, + B_FALSE, sms->sm_options); + + pthread_mutex_lock(&sms->sm_lock); + if (ret != 0) + sms->sm_status = ret; + sms->sm_done++; + if (sms->sm_verbose) + report_mount_progress(sms->sm_done, sms->sm_total); + pthread_mutex_unlock(&sms->sm_lock); + return (ret); +} + static void append_options(char *mntopts, char *newopts) { @@ -6194,8 +6228,6 @@ share_mount(int op, int argc, char **argv) /* check number of arguments */ if (do_all) { - zfs_handle_t **dslist = NULL; - size_t i, count = 0; char *protocol = NULL; if (op == OP_SHARE && argc > 0) { @@ -6216,35 +6248,48 @@ share_mount(int op, int argc, char **argv) } start_progress_timer(); - get_all_datasets(&dslist, &count, verbose); + get_all_cb_t cb = { 0 }; + get_all_datasets(&cb, verbose); - if (count == 0) + if (cb.cb_used == 0) { + if (options != NULL) + free(options); return (0); + } - qsort(dslist, count, sizeof (void *), libzfs_dataset_cmp); #ifdef illumos - sa_init_selective_arg_t sharearg; - sharearg.zhandle_arr = dslist; - sharearg.zhandle_len = count; - if ((ret = zfs_init_libshare_arg(zfs_get_handle(dslist[0]), - SA_INIT_SHARE_API_SELECTIVE, &sharearg)) != SA_OK) { - (void) fprintf(stderr, - gettext("Could not initialize libshare, %d"), ret); - return (ret); + if (op == OP_SHARE) { + sa_init_selective_arg_t sharearg; + sharearg.zhandle_arr = cb.cb_handles; + sharearg.zhandle_len = cb.cb_used; + if ((ret = zfs_init_libshare_arg(g_zfs, + SA_INIT_SHARE_API_SELECTIVE, &sharearg)) != SA_OK) { + (void) fprintf(stderr, gettext( + "Could not initialize libshare, %d"), ret); + return (ret); + } } #endif + share_mount_state_t share_mount_state = { 0 }; + share_mount_state.sm_op = op; + share_mount_state.sm_verbose = verbose; + share_mount_state.sm_flags = flags; + share_mount_state.sm_options = options; + share_mount_state.sm_proto = protocol; + share_mount_state.sm_total = cb.cb_used; + pthread_mutex_init(&share_mount_state.sm_lock, NULL); - for (i = 0; i < count; i++) { - if (verbose) - report_mount_progress(i, count); + /* + * libshare isn't mt-safe, so only do the operation in parallel + * if we're mounting. + */ + zfs_foreach_mountpoint(g_zfs, cb.cb_handles, cb.cb_used, + share_mount_one_cb, &share_mount_state, op == OP_MOUNT); + ret = share_mount_state.sm_status; - if (share_mount_one(dslist[i], op, flags, protocol, - B_FALSE, options) != 0) - ret = 1; - zfs_close(dslist[i]); - } - - free(dslist); + for (int i = 0; i < cb.cb_used; i++) + zfs_close(cb.cb_handles[i]); + free(cb.cb_handles); } else if (argc == 0) { struct mnttab entry; Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Mar 27 14:47:10 2019 (r345577) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Mar 27 14:51:03 2019 (r345578) @@ -579,12 +579,12 @@ typedef struct get_all_cb { zfs_handle_t **cb_handles; size_t cb_alloc; size_t cb_used; - boolean_t cb_verbose; - int (*cb_getone)(zfs_handle_t *, void *); } get_all_cb_t; +void zfs_foreach_mountpoint(libzfs_handle_t *, zfs_handle_t **, size_t, + zfs_iter_f, void*, boolean_t); + void libzfs_add_handle(get_all_cb_t *, zfs_handle_t *); -int libzfs_dataset_cmp(const void *, const void *); /* * Functions to create and destroy datasets. Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Mar 27 14:47:10 2019 (r345577) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Mar 27 14:51:03 2019 (r345578) @@ -799,6 +799,7 @@ libzfs_mnttab_cache_compare(const void *arg1, const vo void libzfs_mnttab_init(libzfs_handle_t *hdl) { + pthread_mutex_init(&hdl->libzfs_mnttab_cache_lock, NULL); assert(avl_numnodes(&hdl->libzfs_mnttab_cache) == 0); avl_create(&hdl->libzfs_mnttab_cache, libzfs_mnttab_cache_compare, sizeof (mnttab_node_t), offsetof(mnttab_node_t, mtn_node)); @@ -839,6 +840,7 @@ libzfs_mnttab_fini(libzfs_handle_t *hdl) free(mtn); } avl_destroy(&hdl->libzfs_mnttab_cache); + (void) pthread_mutex_destroy(&hdl->libzfs_mnttab_cache_lock); } void @@ -853,6 +855,7 @@ libzfs_mnttab_find(libzfs_handle_t *hdl, const char *f { mnttab_node_t find; mnttab_node_t *mtn; + int ret = ENOENT; if (!hdl->libzfs_mnttab_enable) { struct mnttab srch = { 0 }; @@ -868,6 +871,7 @@ libzfs_mnttab_find(libzfs_handle_t *hdl, const char *f return (ENOENT); } + pthread_mutex_lock(&hdl->libzfs_mnttab_cache_lock); if (avl_numnodes(&hdl->libzfs_mnttab_cache) == 0) libzfs_mnttab_update(hdl); @@ -875,9 +879,10 @@ libzfs_mnttab_find(libzfs_handle_t *hdl, const char *f mtn = avl_find(&hdl->libzfs_mnttab_cache, &find, NULL); if (mtn) { *entry = mtn->mtn_mt; - return (0); + ret = 0; } - return (ENOENT); + pthread_mutex_unlock(&hdl->libzfs_mnttab_cache_lock); + return (ret); } void @@ -886,15 +891,17 @@ libzfs_mnttab_add(libzfs_handle_t *hdl, const char *sp { mnttab_node_t *mtn; - if (avl_numnodes(&hdl->libzfs_mnttab_cache) == 0) - return; - mtn = zfs_alloc(hdl, sizeof (mnttab_node_t)); - mtn->mtn_mt.mnt_special = zfs_strdup(hdl, special); - mtn->mtn_mt.mnt_mountp = zfs_strdup(hdl, mountp); - mtn->mtn_mt.mnt_fstype = zfs_strdup(hdl, MNTTYPE_ZFS); - mtn->mtn_mt.mnt_mntopts = zfs_strdup(hdl, mntopts); - avl_add(&hdl->libzfs_mnttab_cache, mtn); -} + pthread_mutex_lock(&hdl->libzfs_mnttab_cache_lock); + if (avl_numnodes(&hdl->libzfs_mnttab_cache) == 0) { + mtn = zfs_alloc(hdl, sizeof (mnttab_node_t)); + mtn->mtn_mt.mnt_special = zfs_strdup(hdl, special); + mtn->mtn_mt.mnt_mountp = zfs_strdup(hdl, mountp); + mtn->mtn_mt.mnt_fstype = zfs_strdup(hdl, MNTTYPE_ZFS); + mtn->mtn_mt.mnt_mntopts = zfs_strdup(hdl, mntopts); + avl_add(&hdl->libzfs_mnttab_cache, mtn); + } + pthread_mutex_unlock(&hdl->libzfs_mnttab_cache_lock); +} void libzfs_mnttab_remove(libzfs_handle_t *hdl, const char *fsname) @@ -902,6 +909,7 @@ libzfs_mnttab_remove(libzfs_handle_t *hdl, const char mnttab_node_t find; mnttab_node_t *ret; + pthread_mutex_lock(&hdl->libzfs_mnttab_cache_lock); find.mtn_mt.mnt_special = (char *)fsname; if ((ret = avl_find(&hdl->libzfs_mnttab_cache, (void *)&find, NULL)) != NULL) { @@ -912,6 +920,7 @@ libzfs_mnttab_remove(libzfs_handle_t *hdl, const char free(ret->mtn_mt.mnt_mntopts); free(ret); } + pthread_mutex_unlock(&hdl->libzfs_mnttab_cache_lock); } int Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Wed Mar 27 14:47:10 2019 (r345577) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Wed Mar 27 14:51:03 2019 (r345578) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 Martin Matuska . All rights reserved. */ @@ -73,6 +73,13 @@ struct libzfs_handle { int libzfs_storeerr; /* stuff error messages into buffer */ void *libzfs_sharehdl; /* libshare handle */ boolean_t libzfs_mnttab_enable; + /* + * We need a lock to handle the case where parallel mount + * threads are populating the mnttab cache simultaneously. The + * lock only protects the integrity of the avl tree, and does + * not protect the contents of the mnttab entries themselves. + */ + pthread_mutex_t libzfs_mnttab_cache_lock; avl_tree_t libzfs_mnttab_cache; int libzfs_pool_iter; libzfs_fru_t **libzfs_fru_hash; Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Mar 27 14:47:10 2019 (r345577) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Mar 27 14:51:03 2019 (r345578) @@ -26,6 +26,7 @@ * Copyright 2016 Igor Kozhukhov * Copyright 2017 Joyent, Inc. * Copyright 2017 RackTop Systems. + * Copyright 2018 OmniOS Community Edition (OmniOSce) Association. */ /* @@ -34,25 +35,25 @@ * they are used by mount and unmount and when changing a filesystem's * mountpoint. * - * zfs_is_mounted() - * zfs_mount() - * zfs_unmount() - * zfs_unmountall() + * zfs_is_mounted() + * zfs_mount() + * zfs_unmount() + * zfs_unmountall() * * This file also contains the functions used to manage sharing filesystems via * NFS and iSCSI: * - * zfs_is_shared() - * zfs_share() - * zfs_unshare() + * zfs_is_shared() + * zfs_share() + * zfs_unshare() * - * zfs_is_shared_nfs() - * zfs_is_shared_smb() - * zfs_share_proto() - * zfs_shareall(); - * zfs_unshare_nfs() - * zfs_unshare_smb() - * zfs_unshareall_nfs() + * zfs_is_shared_nfs() + * zfs_is_shared_smb() + * zfs_share_proto() + * zfs_shareall(); + * zfs_unshare_nfs() + * zfs_unshare_smb() + * zfs_unshareall_nfs() * zfs_unshareall_smb() * zfs_unshareall() * zfs_unshareall_bypath() @@ -60,8 +61,8 @@ * The following functions are available for pool consumers, and will * mount/unmount and share/unshare all datasets within pool: * - * zpool_enable_datasets() - * zpool_disable_datasets() + * zpool_enable_datasets() + * zpool_disable_datasets() */ #include @@ -83,10 +84,14 @@ #include #include "libzfs_impl.h" +#include #include #define MAXISALEN 257 /* based on sysinfo(2) man page */ +static int mount_tp_nthr = 512; /* tpool threads for multi-threaded mounting */ + +static void zfs_mount_task(void *); static int zfs_share_proto(zfs_handle_t *, zfs_share_proto_t *); zfs_share_type_t zfs_is_shared_proto(zfs_handle_t *, char **, zfs_share_proto_t); @@ -1134,25 +1139,32 @@ remove_mountpoint(zfs_handle_t *zhp) } } +/* + * Add the given zfs handle to the cb_handles array, dynamically reallocating + * the array if it is out of space + */ void libzfs_add_handle(get_all_cb_t *cbp, zfs_handle_t *zhp) { if (cbp->cb_alloc == cbp->cb_used) { size_t newsz; - void *ptr; + zfs_handle_t **newhandles; - newsz = cbp->cb_alloc ? cbp->cb_alloc * 2 : 64; - ptr = zfs_realloc(zhp->zfs_hdl, - cbp->cb_handles, cbp->cb_alloc * sizeof (void *), - newsz * sizeof (void *)); - cbp->cb_handles = ptr; + newsz = cbp->cb_alloc != 0 ? cbp->cb_alloc * 2 : 64; + newhandles = zfs_realloc(zhp->zfs_hdl, + cbp->cb_handles, cbp->cb_alloc * sizeof (zfs_handle_t *), + newsz * sizeof (zfs_handle_t *)); + cbp->cb_handles = newhandles; cbp->cb_alloc = newsz; } cbp->cb_handles[cbp->cb_used++] = zhp; } +/* + * Recursive helper function used during file system enumeration + */ static int -mount_cb(zfs_handle_t *zhp, void *data) +zfs_iter_cb(zfs_handle_t *zhp, void *data) { get_all_cb_t *cbp = data; @@ -1178,104 +1190,362 @@ mount_cb(zfs_handle_t *zhp, void *data) } libzfs_add_handle(cbp, zhp); - if (zfs_iter_filesystems(zhp, mount_cb, cbp) != 0) { + if (zfs_iter_filesystems(zhp, zfs_iter_cb, cbp) != 0) { zfs_close(zhp); return (-1); } return (0); } -int -libzfs_dataset_cmp(const void *a, const void *b) +/* + * Sort comparator that compares two mountpoint paths. We sort these paths so + * that subdirectories immediately follow their parents. This means that we + * effectively treat the '/' character as the lowest value non-nul char. + * Since filesystems from non-global zones can have the same mountpoint + * as other filesystems, the comparator sorts global zone filesystems to + * the top of the list. This means that the global zone will traverse the + * filesystem list in the correct order and can stop when it sees the + * first zoned filesystem. In a non-global zone, only the delegated + * filesystems are seen. + * + * An example sorted list using this comparator would look like: + * + * /foo + * /foo/bar + * /foo/bar/baz + * /foo/baz + * /foo.bar + * /foo (NGZ1) + * /foo (NGZ2) + * + * The mount code depend on this ordering to deterministically iterate + * over filesystems in order to spawn parallel mount tasks. + */ +static int +mountpoint_cmp(const void *arga, const void *argb) { - zfs_handle_t **za = (zfs_handle_t **)a; - zfs_handle_t **zb = (zfs_handle_t **)b; + zfs_handle_t *const *zap = arga; + zfs_handle_t *za = *zap; + zfs_handle_t *const *zbp = argb; + zfs_handle_t *zb = *zbp; char mounta[MAXPATHLEN]; char mountb[MAXPATHLEN]; + const char *a = mounta; + const char *b = mountb; boolean_t gota, gotb; + uint64_t zoneda, zonedb; - if ((gota = (zfs_get_type(*za) == ZFS_TYPE_FILESYSTEM)) != 0) - verify(zfs_prop_get(*za, ZFS_PROP_MOUNTPOINT, mounta, + zoneda = zfs_prop_get_int(za, ZFS_PROP_ZONED); + zonedb = zfs_prop_get_int(zb, ZFS_PROP_ZONED); + if (zoneda && !zonedb) + return (1); + if (!zoneda && zonedb) + return (-1); + gota = (zfs_get_type(za) == ZFS_TYPE_FILESYSTEM); + if (gota) + verify(zfs_prop_get(za, ZFS_PROP_MOUNTPOINT, mounta, sizeof (mounta), NULL, NULL, 0, B_FALSE) == 0); - if ((gotb = (zfs_get_type(*zb) == ZFS_TYPE_FILESYSTEM)) != 0) - verify(zfs_prop_get(*zb, ZFS_PROP_MOUNTPOINT, mountb, + gotb = (zfs_get_type(zb) == ZFS_TYPE_FILESYSTEM); + if (gotb) + verify(zfs_prop_get(zb, ZFS_PROP_MOUNTPOINT, mountb, sizeof (mountb), NULL, NULL, 0, B_FALSE) == 0); - if (gota && gotb) - return (strcmp(mounta, mountb)); + if (gota && gotb) { + while (*a != '\0' && (*a == *b)) { + a++; + b++; + } + if (*a == *b) + return (0); + if (*a == '\0') + return (-1); + if (*b == '\0') + return (1); + if (*a == '/') + return (-1); + if (*b == '/') + return (1); + return (*a < *b ? -1 : *a > *b); + } if (gota) return (-1); if (gotb) return (1); - return (strcmp(zfs_get_name(a), zfs_get_name(b))); + /* + * If neither filesystem has a mountpoint, revert to sorting by + * datset name. + */ + return (strcmp(zfs_get_name(za), zfs_get_name(zb))); } /* + * Reutrn true if path2 is a child of path1 + */ +static boolean_t +libzfs_path_contains(const char *path1, const char *path2) +{ + return (strstr(path2, path1) == path2 && path2[strlen(path1)] == '/'); +} + + +static int +non_descendant_idx(zfs_handle_t **handles, size_t num_handles, int idx) +{ + char parent[ZFS_MAXPROPLEN]; + char child[ZFS_MAXPROPLEN]; + int i; + + verify(zfs_prop_get(handles[idx], ZFS_PROP_MOUNTPOINT, parent, + sizeof (parent), NULL, NULL, 0, B_FALSE) == 0); + + for (i = idx + 1; i < num_handles; i++) { + verify(zfs_prop_get(handles[i], ZFS_PROP_MOUNTPOINT, child, + sizeof (child), NULL, NULL, 0, B_FALSE) == 0); + if (!libzfs_path_contains(parent, child)) + break; + } + return (i); +} + +typedef struct mnt_param { + libzfs_handle_t *mnt_hdl; + tpool_t *mnt_tp; + zfs_handle_t **mnt_zhps; /* filesystems to mount */ + size_t mnt_num_handles; + int mnt_idx; /* Index of selected entry to mount */ + zfs_iter_f mnt_func; + void *mnt_data; +} mnt_param_t; + +/* + * Allocate and populate the parameter struct for mount function, and + * schedule mounting of the entry selected by idx. + */ +static void +zfs_dispatch_mount(libzfs_handle_t *hdl, zfs_handle_t **handles, + size_t num_handles, int idx, zfs_iter_f func, void *data, tpool_t *tp) +{ + mnt_param_t *mnt_param = zfs_alloc(hdl, sizeof (mnt_param_t)); + + mnt_param->mnt_hdl = hdl; + mnt_param->mnt_tp = tp; + mnt_param->mnt_zhps = handles; + mnt_param->mnt_num_handles = num_handles; + mnt_param->mnt_idx = idx; + mnt_param->mnt_func = func; + mnt_param->mnt_data = data; + + (void) tpool_dispatch(tp, zfs_mount_task, (void*)mnt_param); +} + +/* + * This is the structure used to keep state of mounting or sharing operations + * during a call to zpool_enable_datasets(). + */ +typedef struct mount_state { + /* + * ms_mntstatus is set to -1 if any mount fails. While multiple threads + * could update this variable concurrently, no synchronization is + * needed as it's only ever set to -1. + */ + int ms_mntstatus; + int ms_mntflags; + const char *ms_mntopts; +} mount_state_t; + +static int +zfs_mount_one(zfs_handle_t *zhp, void *arg) +{ + mount_state_t *ms = arg; + int ret = 0; + + if (zfs_mount(zhp, ms->ms_mntopts, ms->ms_mntflags) != 0) + ret = ms->ms_mntstatus = -1; + return (ret); +} + +static int +zfs_share_one(zfs_handle_t *zhp, void *arg) +{ + mount_state_t *ms = arg; + int ret = 0; + + if (zfs_share(zhp) != 0) + ret = ms->ms_mntstatus = -1; + return (ret); +} + +/* + * Thread pool function to mount one file system. On completion, it finds and + * schedules its children to be mounted. This depends on the sorting done in + * zfs_foreach_mountpoint(). Note that the degenerate case (chain of entries + * each descending from the previous) will have no parallelism since we always + * have to wait for the parent to finish mounting before we can schedule + * its children. + */ +static void +zfs_mount_task(void *arg) +{ + mnt_param_t *mp = arg; + int idx = mp->mnt_idx; + zfs_handle_t **handles = mp->mnt_zhps; + size_t num_handles = mp->mnt_num_handles; + char mountpoint[ZFS_MAXPROPLEN]; + + verify(zfs_prop_get(handles[idx], ZFS_PROP_MOUNTPOINT, mountpoint, + sizeof (mountpoint), NULL, NULL, 0, B_FALSE) == 0); + + if (mp->mnt_func(handles[idx], mp->mnt_data) != 0) + return; + + /* + * We dispatch tasks to mount filesystems with mountpoints underneath + * this one. We do this by dispatching the next filesystem with a + * descendant mountpoint of the one we just mounted, then skip all of + * its descendants, dispatch the next descendant mountpoint, and so on. + * The non_descendant_idx() function skips over filesystems that are + * descendants of the filesystem we just dispatched. + */ + for (int i = idx + 1; i < num_handles; + i = non_descendant_idx(handles, num_handles, i)) { + char child[ZFS_MAXPROPLEN]; + verify(zfs_prop_get(handles[i], ZFS_PROP_MOUNTPOINT, + child, sizeof (child), NULL, NULL, 0, B_FALSE) == 0); + + if (!libzfs_path_contains(mountpoint, child)) + break; /* not a descendant, return */ + zfs_dispatch_mount(mp->mnt_hdl, handles, num_handles, i, + mp->mnt_func, mp->mnt_data, mp->mnt_tp); + } + free(mp); +} + +/* + * Issue the func callback for each ZFS handle contained in the handles + * array. This function is used to mount all datasets, and so this function + * guarantees that filesystems for parent mountpoints are called before their + * children. As such, before issuing any callbacks, we first sort the array + * of handles by mountpoint. + * + * Callbacks are issued in one of two ways: + * + * 1. Sequentially: If the parallel argument is B_FALSE or the ZFS_SERIAL_MOUNT + * environment variable is set, then we issue callbacks sequentially. + * + * 2. In parallel: If the parallel argument is B_TRUE and the ZFS_SERIAL_MOUNT + * environment variable is not set, then we use a tpool to dispatch threads + * to mount filesystems in parallel. This function dispatches tasks to mount + * the filesystems at the top-level mountpoints, and these tasks in turn + * are responsible for recursively mounting filesystems in their children + * mountpoints. + */ +void +zfs_foreach_mountpoint(libzfs_handle_t *hdl, zfs_handle_t **handles, + size_t num_handles, zfs_iter_f func, void *data, boolean_t parallel) +{ + zoneid_t zoneid = getzoneid(); + + /* + * The ZFS_SERIAL_MOUNT environment variable is an undocumented + * variable that can be used as a convenience to do a/b comparison + * of serial vs. parallel mounting. + */ + boolean_t serial_mount = !parallel || + (getenv("ZFS_SERIAL_MOUNT") != NULL); + + /* + * Sort the datasets by mountpoint. See mountpoint_cmp for details + * of how these are sorted. + */ + qsort(handles, num_handles, sizeof (zfs_handle_t *), mountpoint_cmp); + + if (serial_mount) { + for (int i = 0; i < num_handles; i++) { + func(handles[i], data); + } + return; + } + + /* + * Issue the callback function for each dataset using a parallel + * algorithm that uses a thread pool to manage threads. + */ + tpool_t *tp = tpool_create(1, mount_tp_nthr, 0, NULL); + + /* + * There may be multiple "top level" mountpoints outside of the pool's + * root mountpoint, e.g.: /foo /bar. Dispatch a mount task for each of + * these. + */ + for (int i = 0; i < num_handles; + i = non_descendant_idx(handles, num_handles, i)) { + /* + * Since the mountpoints have been sorted so that the zoned + * filesystems are at the end, a zoned filesystem seen from + * the global zone means that we're done. + */ + if (zoneid == GLOBAL_ZONEID && + zfs_prop_get_int(handles[i], ZFS_PROP_ZONED)) + break; + zfs_dispatch_mount(hdl, handles, num_handles, i, func, data, + tp); + } + + tpool_wait(tp); /* wait for all scheduled mounts to complete */ + tpool_destroy(tp); +} + +/* * Mount and share all datasets within the given pool. This assumes that no - * datasets within the pool are currently mounted. Because users can create - * complicated nested hierarchies of mountpoints, we first gather all the - * datasets and mountpoints within the pool, and sort them by mountpoint. Once - * we have the list of all filesystems, we iterate over them in order and mount - * and/or share each one. + * datasets within the pool are currently mounted. */ #pragma weak zpool_mount_datasets = zpool_enable_datasets int zpool_enable_datasets(zpool_handle_t *zhp, const char *mntopts, int flags) { get_all_cb_t cb = { 0 }; - libzfs_handle_t *hdl = zhp->zpool_hdl; + mount_state_t ms = { 0 }; zfs_handle_t *zfsp; - int i, ret = -1; - int *good; + int ret = 0; - /* - * Gather all non-snap datasets within the pool. - */ - if ((zfsp = zfs_open(hdl, zhp->zpool_name, ZFS_TYPE_DATASET)) == NULL) + if ((zfsp = zfs_open(zhp->zpool_hdl, zhp->zpool_name, + ZFS_TYPE_DATASET)) == NULL) goto out; - libzfs_add_handle(&cb, zfsp); - if (zfs_iter_filesystems(zfsp, mount_cb, &cb) != 0) - goto out; /* - * Sort the datasets by mountpoint. + * Gather all non-snapshot datasets within the pool. Start by adding + * the root filesystem for this pool to the list, and then iterate + * over all child filesystems. */ - qsort(cb.cb_handles, cb.cb_used, sizeof (void *), - libzfs_dataset_cmp); + libzfs_add_handle(&cb, zfsp); + if (zfs_iter_filesystems(zfsp, zfs_iter_cb, &cb) != 0) + goto out; /* - * And mount all the datasets, keeping track of which ones - * succeeded or failed. + * Mount all filesystems */ - if ((good = zfs_alloc(zhp->zpool_hdl, - cb.cb_used * sizeof (int))) == NULL) - goto out; + ms.ms_mntopts = mntopts; + ms.ms_mntflags = flags; + zfs_foreach_mountpoint(zhp->zpool_hdl, cb.cb_handles, cb.cb_used, + zfs_mount_one, &ms, B_TRUE); + if (ms.ms_mntstatus != 0) + ret = ms.ms_mntstatus; - ret = 0; - for (i = 0; i < cb.cb_used; i++) { - if (zfs_mount(cb.cb_handles[i], mntopts, flags) != 0) - ret = -1; - else - good[i] = 1; - } - /* - * Then share all the ones that need to be shared. This needs - * to be a separate pass in order to avoid excessive reloading - * of the configuration. Good should never be NULL since - * zfs_alloc is supposed to exit if memory isn't available. + * Share all filesystems that need to be shared. This needs to be + * a separate pass because libshare is not mt-safe, and so we need + * to share serially. */ - for (i = 0; i < cb.cb_used; i++) { - if (good[i] && zfs_share(cb.cb_handles[i]) != 0) - ret = -1; - } + ms.ms_mntstatus = 0; + zfs_foreach_mountpoint(zhp->zpool_hdl, cb.cb_handles, cb.cb_used, + zfs_share_one, &ms, B_FALSE); + if (ms.ms_mntstatus != 0) + ret = ms.ms_mntstatus; - free(good); - out: - for (i = 0; i < cb.cb_used; i++) + for (int i = 0; i < cb.cb_used; i++) zfs_close(cb.cb_handles[i]); free(cb.cb_handles); From owner-svn-src-stable@freebsd.org Wed Mar 27 18:22:10 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F14E215568A9; Wed, 27 Mar 2019 18:22:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 964C2876D7; Wed, 27 Mar 2019 18:22:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F965B01B; Wed, 27 Mar 2019 18:22:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RIM9ip038266; Wed, 27 Mar 2019 18:22:09 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RIM9va038265; Wed, 27 Mar 2019 18:22:09 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903271822.x2RIM9va038265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 18:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345586 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 964C2876D7 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.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 18:22:10 -0000 Author: np Date: Wed Mar 27 18:22:08 2019 New Revision: 345586 URL: https://svnweb.freebsd.org/changeset/base/345586 Log: MFC r339628: cxgbe(4): improve the accuracy of various TSO limits reported to the kernel. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 18:03:34 2019 (r345585) +++ stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 18:22:08 2019 (r345586) @@ -116,6 +116,7 @@ enum { SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ TX_SGL_SEGS = 39, TX_SGL_SEGS_TSO = 38, + TX_SGL_SEGS_EO_TSO = 30, /* XXX: lower for IPv6. */ TX_WR_FLITS = SGE_MAX_WR_LEN / 8 }; Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 18:03:34 2019 (r345585) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 18:22:08 2019 (r345586) @@ -63,6 +63,8 @@ __FBSDID("$FreeBSD$"); #ifdef RSS #include #endif +#include +#include #if defined(__i386__) || defined(__amd64__) #include #include @@ -1653,9 +1655,13 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_UDP_IPV6 | CSUM_TCP_IPV6; - ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); - ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS; - ifp->if_hw_tsomaxsegsize = 65536; + ifp->if_hw_tsomax = IP_MAXPACKET; + ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; +#ifdef RATELIMIT + if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) + ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; +#endif + ifp->if_hw_tsomaxsegsize = 0; ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP From owner-svn-src-stable@freebsd.org Wed Mar 27 18:46:51 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 192911556F67; Wed, 27 Mar 2019 18:46:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 7FD75884DF; Wed, 27 Mar 2019 18:46:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EA29B3CB; Wed, 27 Mar 2019 18:46:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RIkohK049507; Wed, 27 Mar 2019 18:46:50 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RIkm1a049497; Wed, 27 Mar 2019 18:46:48 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903271846.x2RIkm1a049497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 18:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345587 - in stable/12: contrib/ofed/libcxgb4 sys/dev/cxgbe sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12: contrib/ofed/libcxgb4 sys/dev/cxgbe sys/dev/cxgbe/iw_cxgbe X-SVN-Commit-Revision: 345587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7FD75884DF 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.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 18:46:51 -0000 Author: np Date: Wed Mar 27 18:46:47 2019 New Revision: 345587 URL: https://svnweb.freebsd.org/changeset/base/345587 Log: MFC some iw_cxgbe fixes (r339667, r339891, r340063, r342266, r342270, r342272, r342288-r342289, r343569, r344617, and r345307). r339667: cxgbe/iw_cxgbe: save the ep in the driver-private provider_data field. Submitted By: Lily Wang @ Netapp r339891: cxgbe/iw_cxgbe: Install the socket upcall before calling soconnect to ensure that it always runs when soisconnected does. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications r340063: cxgbe/iw_cxgbe: Suppress spurious "Unexpected streaming data ..." messages. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications r342266: cxgbe/iw_cxgbe: Use DSGLs to write to card's memory when appropriate. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications r342270: cxgbe/iw_cxgbe: Add a knob for testing that lets iWARP connections cycle through 4-tuples quickly. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications r342272: cxgbe/iw_cxgbe: Use -ve errno when interfacing with linuxkpi/OFED. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications r342288: cxgbe/iw_cxgbe: Do not terminate CTRx messages with \n. r342289: cxgbe/iw_cxgbe: Remove redundant CTRs from c4iw_alloc/c4iw_rdev_open. This information is readily available elsewhere. Sponsored by: Chelsio Communications r343569: cxgbe/iw_cxgbe: Fix an address calculation in the memory registration code that was added in r342266. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications r344617: libcxgb4: Don't spam stderr. Write combining is not enabled by default by the FreeBSD driver. r345307: iw_cxgbe: Remove unused smac_idx from the ep structure. Submitted by: Krishnamraju Eraparaju @ Chelsio Modified: stable/12/contrib/ofed/libcxgb4/dev.c stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c stable/12/sys/dev/cxgbe/iw_cxgbe/cq.c stable/12/sys/dev/cxgbe/iw_cxgbe/device.c stable/12/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h stable/12/sys/dev/cxgbe/iw_cxgbe/mem.c stable/12/sys/dev/cxgbe/iw_cxgbe/provider.c stable/12/sys/dev/cxgbe/iw_cxgbe/qp.c stable/12/sys/dev/cxgbe/iw_cxgbe/t4.h stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/ofed/libcxgb4/dev.c ============================================================================== --- stable/12/contrib/ofed/libcxgb4/dev.c Wed Mar 27 18:22:08 2019 (r345586) +++ stable/12/contrib/ofed/libcxgb4/dev.c Wed Mar 27 18:46:47 2019 (r345587) @@ -202,8 +202,6 @@ static struct ibv_context *c4iw_alloc_context(struct i * loader tunable "hw.cxl.write_combine=0" */ if (t5_en_wc && !context->status_page->wc_supported) { - fprintf(stderr, "iw_cxgb4 driver doesn't support Write " - "Combine, so regular DB writes will be used\n"); t5_en_wc = 0; } } Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Mar 27 18:22:08 2019 (r345586) +++ stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Mar 27 18:46:47 2019 (r345587) @@ -174,7 +174,6 @@ static void process_newconn(struct c4iw_listen_ep *mas free(__a, M_SONAME); \ } while (0) -#ifdef KTR static char *states[] = { "idle", "listen", @@ -190,7 +189,6 @@ static char *states[] = { "dead", NULL, }; -#endif static void deref_cm_id(struct c4iw_ep_common *epc) { @@ -431,7 +429,7 @@ static void process_timeout(struct c4iw_ep *ep) abort = 0; break; default: - CTR4(KTR_IW_CXGBE, "%s unexpected state ep %p tid %u state %u\n" + CTR4(KTR_IW_CXGBE, "%s unexpected state ep %p tid %u state %u" , __func__, ep, ep->hwtid, ep->com.state); abort = 0; } @@ -843,7 +841,7 @@ setiwsockopt(struct socket *so) sopt.sopt_val = (caddr_t)&on; sopt.sopt_valsize = sizeof on; sopt.sopt_td = NULL; - rc = sosetopt(so, &sopt); + rc = -sosetopt(so, &sopt); if (rc) { log(LOG_ERR, "%s: can't set TCP_NODELAY on so %p (%d)\n", __func__, so, rc); @@ -883,7 +881,9 @@ uninit_iwarp_socket(struct socket *so) static void process_data(struct c4iw_ep *ep) { + int ret = 0; int disconnect = 0; + struct c4iw_qp_attributes attrs = {0}; CTR5(KTR_IW_CXGBE, "%s: so %p, ep %p, state %s, sbused %d", __func__, ep->com.so, ep, states[ep->com.state], sbused(&ep->com.so->so_rcv)); @@ -898,9 +898,16 @@ process_data(struct c4iw_ep *ep) /* Refered in process_newconn() */ c4iw_put_ep(&ep->parent_ep->com); break; + case FPDU_MODE: + MPASS(ep->com.qp != NULL); + attrs.next_state = C4IW_QP_STATE_TERMINATE; + ret = c4iw_modify_qp(ep->com.dev, ep->com.qp, + C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); + if (ret != -EINPROGRESS) + disconnect = 1; + break; default: - if (sbused(&ep->com.so->so_rcv)) - log(LOG_ERR, "%s: Unexpected streaming data. ep %p, " + log(LOG_ERR, "%s: Unexpected streaming data. ep %p, " "state %d, so %p, so_state 0x%x, sbused %u\n", __func__, ep, ep->com.state, ep->com.so, ep->com.so->so_state, sbused(&ep->com.so->so_rcv)); @@ -1013,7 +1020,7 @@ process_newconn(struct c4iw_listen_ep *master_lep, str ret = soaccept(new_so, (struct sockaddr **)&remote); if (ret != 0) { CTR4(KTR_IW_CXGBE, - "%s:listen sock:%p, new sock:%p, ret:%d\n", + "%s:listen sock:%p, new sock:%p, ret:%d", __func__, master_lep->com.so, new_so, ret); if (remote != NULL) free(remote, M_SONAME); @@ -1180,7 +1187,24 @@ process_socket_event(struct c4iw_ep *ep) } /* rx data */ - process_data(ep); + if (sbused(&ep->com.so->so_rcv)) { + process_data(ep); + return; + } + + /* Socket events for 'MPA Request Received' and 'Close Complete' + * were already processed earlier in their previous events handlers. + * Hence, these socket events are skipped. + * And any other socket events must have handled above. + */ + MPASS((ep->com.state == MPA_REQ_RCVD) || (ep->com.state == MORIBUND)); + + if ((ep->com.state != MPA_REQ_RCVD) && (ep->com.state != MORIBUND)) + log(LOG_ERR, "%s: Unprocessed socket event so %p, " + "so_state 0x%x, so_err %d, sb_state 0x%x, ep %p, ep_state %s\n", + __func__, so, so->so_state, so->so_error, so->so_rcv.sb_state, + ep, states[state]); + } SYSCTL_NODE(_hw, OID_AUTO, iw_cxgbe, CTLFLAG_RD, 0, "iw_cxgbe driver parameters"); @@ -1241,6 +1265,18 @@ static int snd_win = 128 * 1024; SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, snd_win, CTLFLAG_RWTUN, &snd_win, 0, "TCP send window in bytes (default = 128KB)"); +int use_dsgl = 1; +SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, use_dsgl, CTLFLAG_RWTUN, &use_dsgl, 0, + "Use DSGL for PBL/FastReg (default=1)"); + +int inline_threshold = 128; +SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, inline_threshold, CTLFLAG_RWTUN, &inline_threshold, 0, + "inline vs dsgl threshold (default=128)"); + +static int reuseaddr = 0; +SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, reuseaddr, CTLFLAG_RWTUN, &reuseaddr, 0, + "Enable SO_REUSEADDR & SO_REUSEPORT socket options on all iWARP client connections(default = 0)"); + static void start_ep_timer(struct c4iw_ep *ep) { @@ -1615,7 +1651,7 @@ send_abort(struct c4iw_ep *ep) sopt.sopt_val = (caddr_t)&l; sopt.sopt_valsize = sizeof l; sopt.sopt_td = NULL; - rc = sosetopt(so, &sopt); + rc = -sosetopt(so, &sopt); if (rc != 0) { log(LOG_ERR, "%s: sosetopt(%p, linger = 0) failed with %d.\n", __func__, so, rc); @@ -1633,6 +1669,7 @@ send_abort(struct c4iw_ep *ep) * handler(not yet implemented) of iw_cxgbe driver. */ release_ep_resources(ep); + ep->com.state = DEAD; return (0); } @@ -2272,7 +2309,7 @@ process_mpa_request(struct c4iw_ep *ep) MPA_V2_IRD_ORD_MASK; ep->ord = min_t(u32, ep->ord, cur_max_read_depth(ep->com.dev)); - CTR3(KTR_IW_CXGBE, "%s initiator ird %u ord %u\n", + CTR3(KTR_IW_CXGBE, "%s initiator ird %u ord %u", __func__, ep->ird, ep->ord); if (ntohs(mpa_v2_params->ird) & MPA_V2_PEER2PEER_MODEL) if (peer2peer) { @@ -2426,7 +2463,7 @@ int c4iw_accept_cr(struct iw_cm_id *cm_id, struct iw_c ep->ird = 1; } - CTR4(KTR_IW_CXGBE, "%s %d ird %d ord %d\n", __func__, __LINE__, + CTR4(KTR_IW_CXGBE, "%s %d ird %d ord %d", __func__, __LINE__, ep->ird, ep->ord); ep->com.cm_id = cm_id; @@ -2485,8 +2522,9 @@ static int c4iw_sock_create(struct sockaddr_storage *laddr, struct socket **so) { int ret; - int size; + int size, on; struct socket *sock = NULL; + struct sockopt sopt; ret = sock_create_kern(laddr->ss_family, SOCK_STREAM, IPPROTO_TCP, &sock); @@ -2496,7 +2534,34 @@ c4iw_sock_create(struct sockaddr_storage *laddr, struc return ret; } - ret = sobind(sock, (struct sockaddr *)laddr, curthread); + if (reuseaddr) { + bzero(&sopt, sizeof(struct sockopt)); + sopt.sopt_dir = SOPT_SET; + sopt.sopt_level = SOL_SOCKET; + sopt.sopt_name = SO_REUSEADDR; + on = 1; + sopt.sopt_val = &on; + sopt.sopt_valsize = sizeof(on); + ret = -sosetopt(sock, &sopt); + if (ret != 0) { + log(LOG_ERR, "%s: sosetopt(%p, SO_REUSEADDR) " + "failed with %d.\n", __func__, sock, ret); + } + bzero(&sopt, sizeof(struct sockopt)); + sopt.sopt_dir = SOPT_SET; + sopt.sopt_level = SOL_SOCKET; + sopt.sopt_name = SO_REUSEPORT; + on = 1; + sopt.sopt_val = &on; + sopt.sopt_valsize = sizeof(on); + ret = -sosetopt(sock, &sopt); + if (ret != 0) { + log(LOG_ERR, "%s: sosetopt(%p, SO_REUSEPORT) " + "failed with %d.\n", __func__, sock, ret); + } + } + + ret = -sobind(sock, (struct sockaddr *)laddr, curthread); if (ret) { CTR2(KTR_IW_CXGBE, "%s:Failed to bind socket. err %p", __func__, ret); @@ -2540,6 +2605,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ goto out; } ep = alloc_ep(sizeof(*ep), GFP_KERNEL); + cm_id->provider_data = ep; init_timer(&ep->timer); ep->plen = conn_param->private_data_len; @@ -2600,22 +2666,24 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ goto fail; setiwsockopt(ep->com.so); + init_iwarp_socket(ep->com.so, &ep->com); err = -soconnect(ep->com.so, (struct sockaddr *)&ep->com.remote_addr, ep->com.thread); - if (!err) { - init_iwarp_socket(ep->com.so, &ep->com); - goto out; - } else + if (err) goto fail_free_so; + CTR2(KTR_IW_CXGBE, "%s:ccE, ep %p", __func__, ep); + return 0; fail_free_so: + uninit_iwarp_socket(ep->com.so); + ep->com.state = DEAD; sock_release(ep->com.so); fail: deref_cm_id(&ep->com); c4iw_put_ep(&ep->com); ep = NULL; out: - CTR2(KTR_IW_CXGBE, "%s:ccE ret:%d", __func__, err); + CTR2(KTR_IW_CXGBE, "%s:ccE Error %d", __func__, err); return err; } @@ -2677,7 +2745,7 @@ c4iw_create_listen(struct iw_cm_id *cm_id, int backlog goto fail; } - rc = solisten(lep->com.so, backlog, curthread); + rc = -solisten(lep->com.so, backlog, curthread); if (rc) { CTR3(KTR_IW_CXGBE, "%s:Failed to listen on sock:%p. err %d", __func__, lep->com.so, rc); Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/cq.c ============================================================================== --- stable/12/sys/dev/cxgbe/iw_cxgbe/cq.c Wed Mar 27 18:22:08 2019 (r345586) +++ stable/12/sys/dev/cxgbe/iw_cxgbe/cq.c Wed Mar 27 18:46:47 2019 (r345587) @@ -671,7 +671,7 @@ proc_cqe: BUG_ON(wq->sq.in_use <= 0 && wq->sq.in_use >= wq->sq.size); wq->sq.cidx = (uint16_t)idx; - CTR2(KTR_IW_CXGBE, "%s completing sq idx %u\n", + CTR2(KTR_IW_CXGBE, "%s completing sq idx %u", __func__, wq->sq.cidx); *cookie = wq->sq.sw_sq[wq->sq.cidx].wr_id; t4_sq_consume(wq); Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- stable/12/sys/dev/cxgbe/iw_cxgbe/device.c Wed Mar 27 18:22:08 2019 (r345586) +++ stable/12/sys/dev/cxgbe/iw_cxgbe/device.c Wed Mar 27 18:46:47 2019 (r345587) @@ -122,24 +122,7 @@ c4iw_rdev_open(struct c4iw_rdev *rdev) rdev->qpmask = udb_density - 1; rdev->cqshift = PAGE_SHIFT - sp->iq_s_qpp; rdev->cqmask = ucq_density - 1; - CTR5(KTR_IW_CXGBE, "%s dev %s stag start 0x%0x size 0x%0x num stags %d", - __func__, device_get_nameunit(sc->dev), sc->vres.stag.start, - sc->vres.stag.size, c4iw_num_stags(rdev)); - CTR5(KTR_IW_CXGBE, "%s pbl start 0x%0x size 0x%0x" - " rq start 0x%0x size 0x%0x", __func__, - sc->vres.pbl.start, sc->vres.pbl.size, - sc->vres.rq.start, sc->vres.rq.size); - CTR5(KTR_IW_CXGBE, "%s:qp qid start %u size %u cq qid start %u size %u", - __func__, sc->vres.qp.start, sc->vres.qp.size, - sc->vres.cq.start, sc->vres.cq.size); - /*TODO - CTR5(KTR_IW_CXGBE, "%s udb %pR db_reg %p gts_reg %p" - "qpmask 0x%x cqmask 0x%x", __func__, - db_reg,gts_reg,rdev->qpmask, rdev->cqmask); - */ - - if (c4iw_num_stags(rdev) == 0) { rc = -EINVAL; goto err1; @@ -235,11 +218,6 @@ c4iw_alloc(struct adapter *sc) iwsc->rdev.adap = sc; /* init various hw-queue params based on lld info */ - CTR3(KTR_IW_CXGBE, "%s: Ing. padding boundary is %d, " - "egrsstatuspagesize = %d", __func__, - sc->params.sge.pad_boundary, - sc->params.sge.spg_len); - iwsc->rdev.hw_queue.t4_eq_status_entries = sc->params.sge.spg_len / EQ_ESIZE; iwsc->rdev.hw_queue.t4_max_eq_size = 65520; Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- stable/12/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Mar 27 18:22:08 2019 (r345586) +++ stable/12/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Mar 27 18:46:47 2019 (r345587) @@ -70,6 +70,9 @@ #define KTR_IW_CXGBE KTR_SPARE3 extern int c4iw_debug; +extern int use_dsgl; +extern int inline_threshold; + #define PDBG(fmt, args...) \ do { \ if (c4iw_debug) \ @@ -856,7 +859,6 @@ struct c4iw_ep { unsigned int mpa_pkt_len; u32 ird; u32 ord; - u32 smac_idx; u32 tx_chan; u32 mtu; u16 mss; Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/mem.c ============================================================================== --- stable/12/sys/dev/cxgbe/iw_cxgbe/mem.c Wed Mar 27 18:22:08 2019 (r345586) +++ stable/12/sys/dev/cxgbe/iw_cxgbe/mem.c Wed Mar 27 18:46:47 2019 (r345587) @@ -45,9 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include "iw_cxgbe.h" -int use_dsgl = 1; #define T4_ULPTX_MIN_IO 32 #define C4IW_MAX_INLINE_SIZE 96 +#define T4_ULPTX_MAX_DMA 1024 static int mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) @@ -57,10 +57,60 @@ mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) } static int -write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) +_c4iw_write_mem_dma_aligned(struct c4iw_rdev *rdev, u32 addr, u32 len, + void *data, int wait) { struct adapter *sc = rdev->adap; struct ulp_mem_io *ulpmc; + struct ulptx_sgl *sgl; + u8 wr_len; + int ret = 0; + struct c4iw_wr_wait wr_wait; + struct wrqe *wr; + + addr &= 0x7FFFFFF; + + if (wait) + c4iw_init_wr_wait(&wr_wait); + wr_len = roundup(sizeof *ulpmc + sizeof *sgl, 16); + + wr = alloc_wrqe(wr_len, &sc->sge.ctrlq[0]); + if (wr == NULL) + return -ENOMEM; + ulpmc = wrtod(wr); + + memset(ulpmc, 0, wr_len); + INIT_ULPTX_WR(ulpmc, wr_len, 0, 0); + ulpmc->wr.wr_hi = cpu_to_be32(V_FW_WR_OP(FW_ULPTX_WR) | + (wait ? F_FW_WR_COMPL : 0)); + ulpmc->wr.wr_lo = wait ? (u64)(unsigned long)&wr_wait : 0; + ulpmc->wr.wr_mid = cpu_to_be32(V_FW_WR_LEN16(DIV_ROUND_UP(wr_len, 16))); + ulpmc->cmd = cpu_to_be32(V_ULPTX_CMD(ULP_TX_MEM_WRITE) | + V_T5_ULP_MEMIO_ORDER(1) | + V_T5_ULP_MEMIO_FID(sc->sge.ofld_rxq[0].iq.abs_id)); + ulpmc->dlen = cpu_to_be32(V_ULP_MEMIO_DATA_LEN(len>>5)); + ulpmc->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(ulpmc->wr), 16)); + ulpmc->lock_addr = cpu_to_be32(V_ULP_MEMIO_ADDR(addr)); + + sgl = (struct ulptx_sgl *)(ulpmc + 1); + sgl->cmd_nsge = cpu_to_be32(V_ULPTX_CMD(ULP_TX_SC_DSGL) | + V_ULPTX_NSGE(1)); + sgl->len0 = cpu_to_be32(len); + sgl->addr0 = cpu_to_be64((u64)data); + + t4_wrq_tx(sc, wr); + + if (wait) + ret = c4iw_wait_for_reply(rdev, &wr_wait, 0, 0, NULL, __func__); + return ret; +} + + +static int +_c4iw_write_mem_inline(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) +{ + struct adapter *sc = rdev->adap; + struct ulp_mem_io *ulpmc; struct ulptx_idata *ulpsc; u8 wr_len, *to_dp, *from_dp; int copy_len, num_wqe, i, ret = 0; @@ -84,7 +134,7 @@ write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u3 wr = alloc_wrqe(wr_len, &sc->sge.ctrlq[0]); if (wr == NULL) - return (0); + return -ENOMEM; ulpmc = wrtod(wr); memset(ulpmc, 0, wr_len); @@ -93,7 +143,8 @@ write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u3 if (i == (num_wqe-1)) { ulpmc->wr.wr_hi = cpu_to_be32(V_FW_WR_OP(FW_ULPTX_WR) | F_FW_WR_COMPL); - ulpmc->wr.wr_lo = (__force __be64)(unsigned long) &wr_wait; + ulpmc->wr.wr_lo = + (__force __be64)(unsigned long) &wr_wait; } else ulpmc->wr.wr_hi = cpu_to_be32(V_FW_WR_OP(FW_ULPTX_WR)); ulpmc->wr.wr_mid = cpu_to_be32( @@ -126,6 +177,69 @@ write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u3 ret = c4iw_wait_for_reply(rdev, &wr_wait, 0, 0, NULL, __func__); return ret; } + +static int +_c4iw_write_mem_dma(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) +{ + struct c4iw_dev *rhp = rdev_to_c4iw_dev(rdev); + u32 remain = len; + u32 dmalen; + int ret = 0; + dma_addr_t daddr; + dma_addr_t save; + + daddr = dma_map_single(rhp->ibdev.dma_device, data, len, DMA_TO_DEVICE); + if (dma_mapping_error(rhp->ibdev.dma_device, daddr)) + return -1; + save = daddr; + + while (remain > inline_threshold) { + if (remain < T4_ULPTX_MAX_DMA) { + if (remain & ~T4_ULPTX_MIN_IO) + dmalen = remain & ~(T4_ULPTX_MIN_IO-1); + else + dmalen = remain; + } else + dmalen = T4_ULPTX_MAX_DMA; + remain -= dmalen; + ret = _c4iw_write_mem_dma_aligned(rdev, addr, dmalen, + (void *)daddr, !remain); + if (ret) + goto out; + addr += dmalen >> 5; + data = (u8 *)data + dmalen; + daddr = daddr + dmalen; + } + if (remain) + ret = _c4iw_write_mem_inline(rdev, addr, remain, data); +out: + dma_unmap_single(rhp->ibdev.dma_device, save, len, DMA_TO_DEVICE); + return ret; +} + +/* + * write len bytes of data into addr (32B aligned address) + * If data is NULL, clear len byte of memory to zero. + */ +static int +write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u32 len, + void *data) +{ + if (rdev->adap->params.ulptx_memwrite_dsgl && use_dsgl) { + if (len > inline_threshold) { + if (_c4iw_write_mem_dma(rdev, addr, len, data)) { + log(LOG_ERR, "%s: dma map " + "failure (non fatal)\n", __func__); + return _c4iw_write_mem_inline(rdev, addr, len, + data); + } else + return 0; + } else + return _c4iw_write_mem_inline(rdev, addr, len, data); + } else + return _c4iw_write_mem_inline(rdev, addr, len, data); +} + /* * Build and write a TPT entry. Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- stable/12/sys/dev/cxgbe/iw_cxgbe/provider.c Wed Mar 27 18:22:08 2019 (r345586) +++ stable/12/sys/dev/cxgbe/iw_cxgbe/provider.c Wed Mar 27 18:46:47 2019 (r345587) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include "iw_cxgbe.h" #include "user.h" -extern int use_dsgl; + static int fastreg_support = 1; module_param(fastreg_support, int, 0644); MODULE_PARM_DESC(fastreg_support, "Advertise fastreg support (default = 1)"); Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/12/sys/dev/cxgbe/iw_cxgbe/qp.c Wed Mar 27 18:22:08 2019 (r345586) +++ stable/12/sys/dev/cxgbe/iw_cxgbe/qp.c Wed Mar 27 18:46:47 2019 (r345587) @@ -65,7 +65,7 @@ struct cpl_set_tcb_rpl; #include "iw_cxgbe.h" #include "user.h" -extern int use_dsgl; + static int creds(struct toepcb *toep, struct inpcb *inp, size_t wrsize); static int max_fr_immd = T4_MAX_FR_IMMD;//SYSCTL parameter later... @@ -576,7 +576,7 @@ static void free_qp_work(struct work_struct *work) ucontext = qhp->ucontext; rhp = qhp->rhp; - CTR3(KTR_IW_CXGBE, "%s qhp %p ucontext %p\n", __func__, + CTR3(KTR_IW_CXGBE, "%s qhp %p ucontext %p", __func__, qhp, ucontext); destroy_qp(&rhp->rdev, &qhp->wq, ucontext ? &ucontext->uctx : &rhp->rdev.uctx); @@ -1475,6 +1475,22 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_q if (qhp->attr.state == attrs->next_state) goto out; + /* Return EINPROGRESS if QP is already in transition state. + * Eg: CLOSING->IDLE transition or *->ERROR transition. + * This can happen while connection is switching(due to rdma_fini) + * from iWARP/RDDP to TOE mode and any inflight RDMA RX data will + * reach TOE driver -> TCP stack -> iWARP driver. In this way + * iWARP driver keep receiving inflight RDMA RX data until socket + * is closed or aborted. And if iWARP CM is in FPDU sate, then + * it tries to put QP in TERM state and disconnects endpoint. + * But as QP is already in transition state, this event is ignored. + */ + if ((qhp->attr.state >= C4IW_QP_STATE_ERROR) && + (attrs->next_state == C4IW_QP_STATE_TERMINATE)) { + ret = -EINPROGRESS; + goto out; + } + switch (qhp->attr.state) { case C4IW_QP_STATE_IDLE: switch (attrs->next_state) { @@ -1862,10 +1878,10 @@ c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_att qhp->ibqp.qp_num = qhp->wq.sq.qid; init_timer(&(qhp->timer)); - CTR5(KTR_IW_CXGBE, "%s sq id %u size %u memsize %zu num_entries %u\n", + CTR5(KTR_IW_CXGBE, "%s sq id %u size %u memsize %zu num_entries %u", __func__, qhp->wq.sq.qid, qhp->wq.sq.size, qhp->wq.sq.memsize, attrs->cap.max_send_wr); - CTR5(KTR_IW_CXGBE, "%s rq id %u size %u memsize %zu num_entries %u\n", + CTR5(KTR_IW_CXGBE, "%s rq id %u size %u memsize %zu num_entries %u", __func__, qhp->wq.rq.qid, qhp->wq.rq.size, qhp->wq.rq.memsize, attrs->cap.max_recv_wr); return &qhp->ibqp; Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/t4.h ============================================================================== --- stable/12/sys/dev/cxgbe/iw_cxgbe/t4.h Wed Mar 27 18:22:08 2019 (r345586) +++ stable/12/sys/dev/cxgbe/iw_cxgbe/t4.h Wed Mar 27 18:46:47 2019 (r345587) @@ -490,13 +490,13 @@ t4_ring_sq_db(struct t4_wq *wq, u16 inc, union t4_wr * /* Flush host queue memory writes. */ wmb(); if (wc && inc == 1 && wq->sq.bar2_qid == 0 && wqe) { - CTR2(KTR_IW_CXGBE, "%s: WC wq->sq.pidx = %d\n", + CTR2(KTR_IW_CXGBE, "%s: WC wq->sq.pidx = %d", __func__, wq->sq.pidx); pio_copy((u64 __iomem *) ((u64)wq->sq.bar2_va + SGE_UDB_WCDOORBELL), (u64 *)wqe); } else { - CTR2(KTR_IW_CXGBE, "%s: DB wq->sq.pidx = %d\n", + CTR2(KTR_IW_CXGBE, "%s: DB wq->sq.pidx = %d", __func__, wq->sq.pidx); writel(V_PIDX_T5(inc) | V_QID(wq->sq.bar2_qid), (void __iomem *)((u64)wq->sq.bar2_va + @@ -515,12 +515,12 @@ t4_ring_rq_db(struct t4_wq *wq, u16 inc, union t4_recv /* Flush host queue memory writes. */ wmb(); if (wc && inc == 1 && wq->rq.bar2_qid == 0 && wqe) { - CTR2(KTR_IW_CXGBE, "%s: WC wq->rq.pidx = %d\n", + CTR2(KTR_IW_CXGBE, "%s: WC wq->rq.pidx = %d", __func__, wq->rq.pidx); pio_copy((u64 __iomem *)((u64)wq->rq.bar2_va + SGE_UDB_WCDOORBELL), (u64 *)wqe); } else { - CTR2(KTR_IW_CXGBE, "%s: DB wq->rq.pidx = %d\n", + CTR2(KTR_IW_CXGBE, "%s: DB wq->rq.pidx = %d", __func__, wq->rq.pidx); writel(V_PIDX_T5(inc) | V_QID(wq->rq.bar2_qid), (void __iomem *)((u64)wq->rq.bar2_va + @@ -604,7 +604,7 @@ static inline void t4_swcq_produce(struct t4_cq *cq) { cq->sw_in_use++; if (cq->sw_in_use == cq->size) { - CTR2(KTR_IW_CXGBE, "%s cxgb4 sw cq overflow cqid %u\n", + CTR2(KTR_IW_CXGBE, "%s cxgb4 sw cq overflow cqid %u", __func__, cq->cqid); cq->error = 1; BUG_ON(1); @@ -676,7 +676,7 @@ static inline int t4_next_hw_cqe(struct t4_cq *cq, str static inline struct t4_cqe *t4_next_sw_cqe(struct t4_cq *cq) { if (cq->sw_in_use == cq->size) { - CTR2(KTR_IW_CXGBE, "%s cxgb4 sw cq overflow cqid %u\n", + CTR2(KTR_IW_CXGBE, "%s cxgb4 sw cq overflow cqid %u", __func__, cq->cqid); cq->error = 1; BUG_ON(1); Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 18:22:08 2019 (r345586) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 18:46:47 2019 (r345587) @@ -4058,6 +4058,18 @@ get_params__post_init(struct adapter *sc) else sc->params.filter2_wr_support = 0; + /* + * Find out whether we're allowed to use the ULPTX MEMWRITE DSGL. + * This is queried separately for the same reason as other params above. + */ + param[0] = FW_PARAM_DEV(ULPTX_MEMWRITE_DSGL); + val[0] = 0; + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, param, val); + if (rc == 0) + sc->params.ulptx_memwrite_dsgl = val[0] != 0; + else + sc->params.ulptx_memwrite_dsgl = false; + /* get capabilites */ bzero(&caps, sizeof(caps)); caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | From owner-svn-src-stable@freebsd.org Wed Mar 27 19:16:04 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A56F51557A69; Wed, 27 Mar 2019 19:16:04 +0000 (UTC) (envelope-from wulf@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 4D4C38957F; Wed, 27 Mar 2019 19:16:04 +0000 (UTC) (envelope-from wulf@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 209C6B8F3; Wed, 27 Mar 2019 19:16:04 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJG3RX065228; Wed, 27 Mar 2019 19:16:03 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJG3ke065227; Wed, 27 Mar 2019 19:16:03 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201903271916.x2RJG3ke065227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Wed, 27 Mar 2019 19:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345589 - stable/12/sys/x86/isa X-SVN-Group: stable-12 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/12/sys/x86/isa X-SVN-Commit-Revision: 345589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D4C38957F 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.996,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)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:16:04 -0000 Author: wulf Date: Wed Mar 27 19:16:03 2019 New Revision: 345589 URL: https://svnweb.freebsd.org/changeset/base/345589 Log: MFC: r344982, r345022 atrtc(4): install ACPI RTC/CMOS operation region handler FreeBSD base system does not provide an ACPI handler for the PC/AT RTC/CMOS device with PnP ID PNP0B00; on some HP laptops, the absence of this handler causes suspend/resume and poweroff(8) to hang or fail [1], [2]. On these laptops EC _REG method queries the RTC date/time registers via ACPI before suspending/powering off. The handler should be registered before acpi_ec driver is loaded. This change adds handler to access CMOS RTC operation region described in section 9.15 of ACPI-6.2 specification [3]. It is installed only for ACPI version of atrtc(4) so it should not affect old ACPI-less i386 systems. It is possible to disable the handler with loader tunable: debug.acpi.disabled=atrtc Informational debugging printf can be enabled by setting hw.acpi.verbose=1 in loader.conf [1] https://wiki.freebsd.org/Laptops/HP_Envy_6Z-1100 [2] https://wiki.freebsd.org/Laptops/HP_Notebook_15-af104ur [3] https://uefi.org/sites/default/files/resources/ACPI_6_2.pdf PR: 207419, 213039 Submitted by: Anthony Jenkins Reviewed by: ian Discussed on: acpi@, 2013-2015, several threads Differential Revision: https://reviews.freebsd.org/D19314 Modified: stable/12/sys/x86/isa/atrtc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/x86/isa/atrtc.c ============================================================================== --- stable/12/sys/x86/isa/atrtc.c Wed Mar 27 18:50:28 2019 (r345588) +++ stable/12/sys/x86/isa/atrtc.c Wed Mar 27 19:16:03 2019 (r345589) @@ -32,6 +32,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" #include "opt_isa.h" #include @@ -54,8 +55,12 @@ __FBSDID("$FreeBSD$"); #endif #include #include "clock_if.h" +#ifdef DEV_ACPI #include +#include +#include #include +#endif /* * atrtc_lock protects low-level access to individual hardware registers. @@ -78,6 +83,11 @@ static int rtc_reg = -1; static u_char rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; static u_char rtc_statusb = RTCSB_24HR; +#ifdef DEV_ACPI +#define _COMPONENT ACPI_TIMER +ACPI_MODULE_NAME("ATRTC") +#endif + /* * RTC support routines */ @@ -193,6 +203,9 @@ struct atrtc_softc { struct resource *intr_res; void *intr_handler; struct eventtimer et; +#ifdef DEV_ACPI + ACPI_HANDLE acpi_handle; +#endif }; static int @@ -247,7 +260,145 @@ rtc_intr(void *arg) return(flag ? FILTER_HANDLED : FILTER_STRAY); } +#ifdef DEV_ACPI /* + * ACPI RTC CMOS address space handler + */ +#define ATRTC_LAST_REG 0x40 + +static void +rtcin_region(int reg, void *buf, int len) +{ + u_char *ptr = buf; + + /* Drop lock after each IO as intr and settime have greater priority */ + while (len-- > 0) + *ptr++ = rtcin(reg++) & 0xff; +} + +static void +rtcout_region(int reg, const void *buf, int len) +{ + const u_char *ptr = buf; + + while (len-- > 0) + writertc(reg++, *ptr++); +} + +static bool +atrtc_check_cmos_access(bool is_read, ACPI_PHYSICAL_ADDRESS addr, UINT32 len) +{ + + /* Block address space wrapping on out-of-bound access */ + if (addr >= ATRTC_LAST_REG || addr + len > ATRTC_LAST_REG) + return (false); + + if (is_read) { + /* Reading 0x0C will muck with interrupts */ + if (addr <= RTC_INTR && addr + len > RTC_INTR) + return (false); + } else { + /* + * Allow single-byte writes to alarm registers and + * multi-byte writes to addr >= 0x30, else deny. + */ + if (!((len == 1 && (addr == RTC_SECALRM || + addr == RTC_MINALRM || + addr == RTC_HRSALRM)) || + addr >= 0x30)) + return (false); + } + return (true); +} + +static ACPI_STATUS +atrtc_acpi_cmos_handler(UINT32 func, ACPI_PHYSICAL_ADDRESS addr, + UINT32 bitwidth, UINT64 *value, void *context, void *region_context) +{ + device_t dev = context; + UINT32 bytewidth = howmany(bitwidth, 8); + bool is_read = func == ACPI_READ; + + /* ACPICA is very verbose on CMOS handler failures, so we, too */ +#define CMOS_HANDLER_ERR(fmt, ...) \ + device_printf(dev, "ACPI [SystemCMOS] handler: " fmt, ##__VA_ARGS__) + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + if (value == NULL) { + CMOS_HANDLER_ERR("NULL parameter\n"); + return (AE_BAD_PARAMETER); + } + if (bitwidth == 0 || (bitwidth & 0x07) != 0) { + CMOS_HANDLER_ERR("Invalid bitwidth: %u\n", bitwidth); + return (AE_BAD_PARAMETER); + } + if (!atrtc_check_cmos_access(is_read, addr, bytewidth)) { + CMOS_HANDLER_ERR("%s access rejected: addr=%#04jx, len=%u\n", + is_read ? "Read" : "Write", (uintmax_t)addr, bytewidth); + return (AE_BAD_PARAMETER); + } + + switch (func) { + case ACPI_READ: + rtcin_region(addr, value, bytewidth); + break; + case ACPI_WRITE: + rtcout_region(addr, value, bytewidth); + break; + default: + CMOS_HANDLER_ERR("Invalid function: %u\n", func); + return (AE_BAD_PARAMETER); + } + + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "ACPI RTC CMOS %s access: addr=%#04x, len=%u, val=%*D\n", + is_read ? "read" : "write", (unsigned)addr, bytewidth, + bytewidth, value, " "); + + return (AE_OK); +} + +static int +atrtc_reg_acpi_cmos_handler(device_t dev) +{ + struct atrtc_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + /* Don't handle address space events if driver is disabled. */ + if (acpi_disabled("atrtc")) + return (ENXIO); + + sc->acpi_handle = acpi_get_handle(dev); + if (sc->acpi_handle == NULL || + ACPI_FAILURE(AcpiInstallAddressSpaceHandler(sc->acpi_handle, + ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler, NULL, dev))) { + sc->acpi_handle = NULL; + device_printf(dev, + "Can't register ACPI CMOS address space handler\n"); + return (ENXIO); + } + + return (0); +} + +static int +atrtc_unreg_acpi_cmos_handler(device_t dev) +{ + struct atrtc_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + if (sc->acpi_handle != NULL) + AcpiRemoveAddressSpaceHandler(sc->acpi_handle, + ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler); + + return (0); +} +#endif /* DEV_ACPI */ + +/* * Attach to the ISA PnP descriptors for the timer and realtime clock. */ static struct isa_pnp_id atrtc_ids[] = { @@ -258,12 +409,15 @@ static struct isa_pnp_id atrtc_ids[] = { static bool atrtc_acpi_disabled(void) { +#ifdef DEV_ACPI uint16_t flags; if (!acpi_get_fadt_bootflags(&flags)) return (false); return ((flags & ACPI_FADT_NO_CMOS_RTC) != 0); - return (true); +#else + return (false); +#endif } static int @@ -334,6 +488,37 @@ atrtc_attach(device_t dev) } static int +atrtc_isa_attach(device_t dev) +{ + + return (atrtc_attach(dev)); +} + +#ifdef DEV_ACPI +static int +atrtc_acpi_attach(device_t dev) +{ + int ret; + + ret = atrtc_attach(dev); + if (ret) + return (ret); + + (void)atrtc_reg_acpi_cmos_handler(dev); + + return (0); +} + +static int +atrtc_acpi_detach(device_t dev) +{ + + (void)atrtc_unreg_acpi_cmos_handler(dev); + return (0); +} +#endif /* DEV_ACPI */ + +static int atrtc_resume(device_t dev) { @@ -419,10 +604,10 @@ atrtc_gettime(device_t dev, struct timespec *ts) return (clock_bcd_to_ts(&bct, ts, false)); } -static device_method_t atrtc_methods[] = { +static device_method_t atrtc_isa_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atrtc_probe), - DEVMETHOD(device_attach, atrtc_attach), + DEVMETHOD(device_attach, atrtc_isa_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), @@ -436,14 +621,39 @@ static device_method_t atrtc_methods[] = { { 0, 0 } }; -static driver_t atrtc_driver = { +static driver_t atrtc_isa_driver = { "atrtc", - atrtc_methods, + atrtc_isa_methods, sizeof(struct atrtc_softc), }; +#ifdef DEV_ACPI +static device_method_t atrtc_acpi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, atrtc_probe), + DEVMETHOD(device_attach, atrtc_acpi_attach), + DEVMETHOD(device_detach, atrtc_acpi_detach), + /* XXX stop statclock? */ + DEVMETHOD(device_resume, atrtc_resume), + + /* clock interface */ + DEVMETHOD(clock_gettime, atrtc_gettime), + DEVMETHOD(clock_settime, atrtc_settime), + + { 0, 0 } +}; + +static driver_t atrtc_acpi_driver = { + "atrtc", + atrtc_acpi_methods, + sizeof(struct atrtc_softc), +}; +#endif /* DEV_ACPI */ + static devclass_t atrtc_devclass; -DRIVER_MODULE(atrtc, isa, atrtc_driver, atrtc_devclass, 0, 0); -DRIVER_MODULE(atrtc, acpi, atrtc_driver, atrtc_devclass, 0, 0); +DRIVER_MODULE(atrtc, isa, atrtc_isa_driver, atrtc_devclass, 0, 0); +#ifdef DEV_ACPI +DRIVER_MODULE(atrtc, acpi, atrtc_acpi_driver, atrtc_devclass, 0, 0); +#endif ISA_PNP_INFO(atrtc_ids); From owner-svn-src-stable@freebsd.org Wed Mar 27 19:17:43 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB21C1557B44; Wed, 27 Mar 2019 19:17:43 +0000 (UTC) (envelope-from wulf@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 5148889741; Wed, 27 Mar 2019 19:17:43 +0000 (UTC) (envelope-from wulf@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 2A1C8B8F6; Wed, 27 Mar 2019 19:17:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJHgii065368; Wed, 27 Mar 2019 19:17:42 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJHgEB065367; Wed, 27 Mar 2019 19:17:42 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201903271917.x2RJHgEB065367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Wed, 27 Mar 2019 19:17: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: r345590 - stable/11/sys/x86/isa X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/11/sys/x86/isa X-SVN-Commit-Revision: 345590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5148889741 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.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:17:43 -0000 Author: wulf Date: Wed Mar 27 19:17:42 2019 New Revision: 345590 URL: https://svnweb.freebsd.org/changeset/base/345590 Log: MFC: r344982, r345022 atrtc(4): install ACPI RTC/CMOS operation region handler FreeBSD base system does not provide an ACPI handler for the PC/AT RTC/CMOS device with PnP ID PNP0B00; on some HP laptops, the absence of this handler causes suspend/resume and poweroff(8) to hang or fail [1], [2]. On these laptops EC _REG method queries the RTC date/time registers via ACPI before suspending/powering off. The handler should be registered before acpi_ec driver is loaded. This change adds handler to access CMOS RTC operation region described in section 9.15 of ACPI-6.2 specification [3]. It is installed only for ACPI version of atrtc(4) so it should not affect old ACPI-less i386 systems. It is possible to disable the handler with loader tunable: debug.acpi.disabled=atrtc Informational debugging printf can be enabled by setting hw.acpi.verbose=1 in loader.conf [1] https://wiki.freebsd.org/Laptops/HP_Envy_6Z-1100 [2] https://wiki.freebsd.org/Laptops/HP_Notebook_15-af104ur [3] https://uefi.org/sites/default/files/resources/ACPI_6_2.pdf PR: 207419, 213039 Submitted by: Anthony Jenkins Reviewed by: ian Discussed on: acpi@, 2013-2015, several threads Differential Revision: https://reviews.freebsd.org/D19314 Modified: stable/11/sys/x86/isa/atrtc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/isa/atrtc.c ============================================================================== --- stable/11/sys/x86/isa/atrtc.c Wed Mar 27 19:16:03 2019 (r345589) +++ stable/11/sys/x86/isa/atrtc.c Wed Mar 27 19:17:42 2019 (r345590) @@ -30,6 +30,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" #include "opt_isa.h" #include @@ -52,6 +53,12 @@ __FBSDID("$FreeBSD$"); #endif #include #include "clock_if.h" +#ifdef DEV_ACPI +#include +#include +#include +#include +#endif /* * atrtc_lock protects low-level access to individual hardware registers. @@ -70,6 +77,11 @@ static int rtc_reg = -1; static u_char rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; static u_char rtc_statusb = RTCSB_24HR; +#ifdef DEV_ACPI +#define _COMPONENT ACPI_TIMER +ACPI_MODULE_NAME("ATRTC") +#endif + /* * RTC support routines */ @@ -185,6 +197,9 @@ struct atrtc_softc { struct resource *intr_res; void *intr_handler; struct eventtimer et; +#ifdef DEV_ACPI + ACPI_HANDLE acpi_handle; +#endif }; static int @@ -239,7 +254,145 @@ rtc_intr(void *arg) return(flag ? FILTER_HANDLED : FILTER_STRAY); } +#ifdef DEV_ACPI /* + * ACPI RTC CMOS address space handler + */ +#define ATRTC_LAST_REG 0x40 + +static void +rtcin_region(int reg, void *buf, int len) +{ + u_char *ptr = buf; + + /* Drop lock after each IO as intr and settime have greater priority */ + while (len-- > 0) + *ptr++ = rtcin(reg++) & 0xff; +} + +static void +rtcout_region(int reg, const void *buf, int len) +{ + const u_char *ptr = buf; + + while (len-- > 0) + writertc(reg++, *ptr++); +} + +static bool +atrtc_check_cmos_access(bool is_read, ACPI_PHYSICAL_ADDRESS addr, UINT32 len) +{ + + /* Block address space wrapping on out-of-bound access */ + if (addr >= ATRTC_LAST_REG || addr + len > ATRTC_LAST_REG) + return (false); + + if (is_read) { + /* Reading 0x0C will muck with interrupts */ + if (addr <= RTC_INTR && addr + len > RTC_INTR) + return (false); + } else { + /* + * Allow single-byte writes to alarm registers and + * multi-byte writes to addr >= 0x30, else deny. + */ + if (!((len == 1 && (addr == RTC_SECALRM || + addr == RTC_MINALRM || + addr == RTC_HRSALRM)) || + addr >= 0x30)) + return (false); + } + return (true); +} + +static ACPI_STATUS +atrtc_acpi_cmos_handler(UINT32 func, ACPI_PHYSICAL_ADDRESS addr, + UINT32 bitwidth, UINT64 *value, void *context, void *region_context) +{ + device_t dev = context; + UINT32 bytewidth = howmany(bitwidth, 8); + bool is_read = func == ACPI_READ; + + /* ACPICA is very verbose on CMOS handler failures, so we, too */ +#define CMOS_HANDLER_ERR(fmt, ...) \ + device_printf(dev, "ACPI [SystemCMOS] handler: " fmt, ##__VA_ARGS__) + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + if (value == NULL) { + CMOS_HANDLER_ERR("NULL parameter\n"); + return (AE_BAD_PARAMETER); + } + if (bitwidth == 0 || (bitwidth & 0x07) != 0) { + CMOS_HANDLER_ERR("Invalid bitwidth: %u\n", bitwidth); + return (AE_BAD_PARAMETER); + } + if (!atrtc_check_cmos_access(is_read, addr, bytewidth)) { + CMOS_HANDLER_ERR("%s access rejected: addr=%#04jx, len=%u\n", + is_read ? "Read" : "Write", (uintmax_t)addr, bytewidth); + return (AE_BAD_PARAMETER); + } + + switch (func) { + case ACPI_READ: + rtcin_region(addr, value, bytewidth); + break; + case ACPI_WRITE: + rtcout_region(addr, value, bytewidth); + break; + default: + CMOS_HANDLER_ERR("Invalid function: %u\n", func); + return (AE_BAD_PARAMETER); + } + + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "ACPI RTC CMOS %s access: addr=%#04x, len=%u, val=%*D\n", + is_read ? "read" : "write", (unsigned)addr, bytewidth, + bytewidth, value, " "); + + return (AE_OK); +} + +static int +atrtc_reg_acpi_cmos_handler(device_t dev) +{ + struct atrtc_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + /* Don't handle address space events if driver is disabled. */ + if (acpi_disabled("atrtc")) + return (ENXIO); + + sc->acpi_handle = acpi_get_handle(dev); + if (sc->acpi_handle == NULL || + ACPI_FAILURE(AcpiInstallAddressSpaceHandler(sc->acpi_handle, + ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler, NULL, dev))) { + sc->acpi_handle = NULL; + device_printf(dev, + "Can't register ACPI CMOS address space handler\n"); + return (ENXIO); + } + + return (0); +} + +static int +atrtc_unreg_acpi_cmos_handler(device_t dev) +{ + struct atrtc_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + if (sc->acpi_handle != NULL) + AcpiRemoveAddressSpaceHandler(sc->acpi_handle, + ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler); + + return (0); +} +#endif /* DEV_ACPI */ + +/* * Attach to the ISA PnP descriptors for the timer and realtime clock. */ static struct isa_pnp_id atrtc_ids[] = { @@ -311,6 +464,37 @@ atrtc_attach(device_t dev) } static int +atrtc_isa_attach(device_t dev) +{ + + return (atrtc_attach(dev)); +} + +#ifdef DEV_ACPI +static int +atrtc_acpi_attach(device_t dev) +{ + int ret; + + ret = atrtc_attach(dev); + if (ret) + return (ret); + + (void)atrtc_reg_acpi_cmos_handler(dev); + + return (0); +} + +static int +atrtc_acpi_detach(device_t dev) +{ + + (void)atrtc_unreg_acpi_cmos_handler(dev); + return (0); +} +#endif /* DEV_ACPI */ + +static int atrtc_resume(device_t dev) { @@ -396,10 +580,10 @@ atrtc_gettime(device_t dev, struct timespec *ts) return (clock_bcd_to_ts(&bct, ts, false)); } -static device_method_t atrtc_methods[] = { +static device_method_t atrtc_isa_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atrtc_probe), - DEVMETHOD(device_attach, atrtc_attach), + DEVMETHOD(device_attach, atrtc_isa_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), @@ -413,13 +597,38 @@ static device_method_t atrtc_methods[] = { { 0, 0 } }; -static driver_t atrtc_driver = { +static driver_t atrtc_isa_driver = { "atrtc", - atrtc_methods, + atrtc_isa_methods, sizeof(struct atrtc_softc), }; +#ifdef DEV_ACPI +static device_method_t atrtc_acpi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, atrtc_probe), + DEVMETHOD(device_attach, atrtc_acpi_attach), + DEVMETHOD(device_detach, atrtc_acpi_detach), + /* XXX stop statclock? */ + DEVMETHOD(device_resume, atrtc_resume), + + /* clock interface */ + DEVMETHOD(clock_gettime, atrtc_gettime), + DEVMETHOD(clock_settime, atrtc_settime), + + { 0, 0 } +}; + +static driver_t atrtc_acpi_driver = { + "atrtc", + atrtc_acpi_methods, + sizeof(struct atrtc_softc), +}; +#endif /* DEV_ACPI */ + static devclass_t atrtc_devclass; -DRIVER_MODULE(atrtc, isa, atrtc_driver, atrtc_devclass, 0, 0); -DRIVER_MODULE(atrtc, acpi, atrtc_driver, atrtc_devclass, 0, 0); +DRIVER_MODULE(atrtc, isa, atrtc_isa_driver, atrtc_devclass, 0, 0); +#ifdef DEV_ACPI +DRIVER_MODULE(atrtc, acpi, atrtc_acpi_driver, atrtc_devclass, 0, 0); +#endif From owner-svn-src-stable@freebsd.org Wed Mar 27 19:18:11 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5A3D1557B87; Wed, 27 Mar 2019 19:18:11 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 582448986D; Wed, 27 Mar 2019 19:18:11 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31CF6B8F9; Wed, 27 Mar 2019 19:18:11 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJIBqF065456; Wed, 27 Mar 2019 19:18:11 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJIBA7065455; Wed, 27 Mar 2019 19:18:11 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903271918.x2RJIBA7065455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 19:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345591 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 582448986D 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.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:18:11 -0000 Author: np Date: Wed Mar 27 19:18:10 2019 New Revision: 345591 URL: https://svnweb.freebsd.org/changeset/base/345591 Log: MFC r339700: cxgbe(4): new sysctl to display the start of the RSS region for a VI. dev...rss_base For example: dev.cc.0.rss_base: 0 dev.cc.1.rss_base: 128 dev.vcc.0.rss_base: 256 dev.vcc.1.rss_base: 384 Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 19:17:42 2019 (r345590) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 19:18:10 2019 (r345591) @@ -6199,6 +6199,8 @@ vi_sysctls(struct vi_info *vi) &vi->first_rxq, 0, "index of first rx queue"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_txq", CTLFLAG_RD, &vi->first_txq, 0, "index of first tx queue"); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rss_base", CTLFLAG_RD, NULL, + vi->rss_base, "start of RSS indirection table"); SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rss_size", CTLFLAG_RD, NULL, vi->rss_size, "size of RSS indirection table"); From owner-svn-src-stable@freebsd.org Wed Mar 27 19:25:27 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6144C1558568; Wed, 27 Mar 2019 19:25:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 4E0948AAC1; Wed, 27 Mar 2019 19:24:40 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8100BAB3; Wed, 27 Mar 2019 19:24:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJOcYb072927; Wed, 27 Mar 2019 19:24:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJOcdj072923; Wed, 27 Mar 2019 19:24:38 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903271924.x2RJOcdj072923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 19:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345592 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E0948AAC1 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.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:25:27 -0000 Author: np Date: Wed Mar 27 19:24:37 2019 New Revision: 345592 URL: https://svnweb.freebsd.org/changeset/base/345592 Log: MFC r339705: cxgbe(4): Update the VI's default queue when netmap is enabled/disabled. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 19:18:10 2019 (r345591) +++ stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 19:24:37 2019 (r345592) @@ -197,6 +197,7 @@ struct vi_info { int16_t xact_addr_filt;/* index of exact MAC address filter */ uint16_t rss_size; /* size of VI's RSS table slice */ uint16_t rss_base; /* start of VI's RSS table slice */ + int hashen; int nintr; int first_intr; Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 19:18:10 2019 (r345591) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 19:24:37 2019 (r345592) @@ -5282,7 +5282,7 @@ vi_full_init(struct vi_info *vi) struct ifnet *ifp = vi->ifp; uint16_t *rss; struct sge_rxq *rxq; - int rc, i, j, hashen; + int rc, i, j; #ifdef RSS int nbuckets = rss_getnumbuckets(); int hashconfig = rss_gethashconfig(); @@ -5346,14 +5346,14 @@ vi_full_init(struct vi_info *vi) } #ifdef RSS - hashen = hashconfig_to_hashen(hashconfig); + vi->hashen = hashconfig_to_hashen(hashconfig); /* * We may have had to enable some hashes even though the global config * wants them disabled. This is a potential problem that must be * reported to the user. */ - extra = hashen_to_hashconfig(hashen) ^ hashconfig; + extra = hashen_to_hashconfig(vi->hashen) ^ hashconfig; /* * If we consider only the supported hash types, then the enabled hashes @@ -5382,12 +5382,12 @@ vi_full_init(struct vi_info *vi) if (extra & RSS_HASHTYPE_RSS_UDP_IPV6) if_printf(ifp, "UDP/IPv6 4-tuple hashing forced on.\n"); #else - hashen = F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN | + vi->hashen = F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN | F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN | F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN | F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN | F_FW_RSS_VI_CONFIG_CMD_UDPEN; #endif - rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, hashen, rss[0], 0, 0); + rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, rss[0], 0, 0); if (rc != 0) { free(rss, M_CXGBE); if_printf(ifp, "rss hash/defaultq config failed: %d\n", rc); Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Wed Mar 27 19:18:10 2019 (r345591) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Wed Mar 27 19:24:37 2019 (r345592) @@ -415,6 +415,11 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi if (rc != 0) if_printf(ifp, "netmap rss_config failed: %d\n", rc); + rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, + vi->nm_rss[0], 0, 0); + if (rc != 0) + if_printf(ifp, "netmap rss hash/defaultq config failed: %d\n", rc); + return (rc); } @@ -436,6 +441,9 @@ cxgbe_netmap_off(struct adapter *sc, struct vi_info *v vi->rss, vi->rss_size); if (rc != 0) if_printf(ifp, "failed to restore RSS config: %d\n", rc); + rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, vi->rss[0], 0, 0); + if (rc != 0) + if_printf(ifp, "failed to restore RSS hash/defaultq: %d\n", rc); nm_clear_native_flags(na); for_each_nm_txq(vi, i, nm_txq) { From owner-svn-src-stable@freebsd.org Wed Mar 27 19:37:52 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFFA21558E2E; Wed, 27 Mar 2019 19:37:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 8D8DE8BAA4; Wed, 27 Mar 2019 19:37:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63F72BE2C; Wed, 27 Mar 2019 19:37:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJbpge078270; Wed, 27 Mar 2019 19:37:51 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJboW1078265; Wed, 27 Mar 2019 19:37:50 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903271937.x2RJboW1078265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 19:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345595 - in stable/12: sys/dev/cxgbe usr.sbin/cxgbetool X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12: sys/dev/cxgbe usr.sbin/cxgbetool X-SVN-Commit-Revision: 345595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8D8DE8BAA4 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.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:37:52 -0000 Author: np Date: Wed Mar 27 19:37:50 2019 New Revision: 345595 URL: https://svnweb.freebsd.org/changeset/base/345595 Log: MFC r339717, r339749, and r339809. r339717: cxgbe(4): Allow "pass" filters to distribute matching traffic using a subset of a VI's RSS indirection table. This makes it possible to make groups out of rx queues and steer different kinds of traffic to different groups. For example, an interface with 8 rx queues could have all non-TCP traffic delivered to queues 0-3 and all TCP traffic to queues 4-7. Note that it is already possible for filters to steer traffic to a particular queue or to distribute it using the full indirection table (much like normal rx does). Sponsored by: Chelsio Communications r339749: cxgbe(4): Add a knob to split the rx queues for a netmap enabled interface into two groups. Filters can be used to match traffic and distribute it across a group. hw.cxgbe.nm_split_rss Sponsored by: Chelsio Communications r339809: cxgbetool(8): Add a subaction (tcbrss ) that can be used with "pass" action to distribute traffic using the half of the VI's RSS indirection table. The value specified should either be the start of the VI's RSS slice (available at dev...rss_base since r339700) or the midpoint (rss_base + rss_size/2). The traffic that hits the filter will use the first or second half of the indirection table respectively. The indirection table can be populated in different ways to achieve different kinds of traffic/load distributions. For example, r339749 allows a netmap interface to have half the rx queues in the first half of the table and the rest in the other. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_filter.c stable/12/sys/dev/cxgbe/t4_ioctl.h stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_netmap.c stable/12/usr.sbin/cxgbetool/cxgbetool.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_filter.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_filter.c Wed Mar 27 19:34:19 2019 (r345594) +++ stable/12/sys/dev/cxgbe/t4_filter.c Wed Mar 27 19:37:50 2019 (r345595) @@ -864,8 +864,8 @@ set_filter(struct adapter *sc, struct t4_filter *t) if (t->fs.val.iport >= sc->params.nports) return (EINVAL); - /* Can't specify an iq if not steering to it */ - if (!t->fs.dirsteer && t->fs.iq) + /* Can't specify an iqid/rss_info if not steering. */ + if (!t->fs.dirsteer && !t->fs.dirsteerhash && !t->fs.maskhash && t->fs.iq) return (EINVAL); /* Validate against the global filter mode and ingress config */ Modified: stable/12/sys/dev/cxgbe/t4_ioctl.h ============================================================================== --- stable/12/sys/dev/cxgbe/t4_ioctl.h Wed Mar 27 19:34:19 2019 (r345594) +++ stable/12/sys/dev/cxgbe/t4_ioctl.h Wed Mar 27 19:37:50 2019 (r345595) @@ -209,7 +209,7 @@ struct t4_filter_specification { uint32_t rpttid:1; /* report TID in RSS hash field */ uint32_t dirsteer:1; /* 0 => RSS, 1 => steer to iq */ uint32_t iq:10; /* ingress queue */ - uint32_t maskhash:1; /* dirsteer=0: store RSS hash in TCB */ + uint32_t maskhash:1; /* dirsteer=0: steer to an RSS sub-region */ uint32_t dirsteerhash:1;/* dirsteer=1: 0 => TCB contains RSS hash */ /* 1 => TCB contains IQ ID */ Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 19:34:19 2019 (r345594) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 19:37:50 2019 (r345595) @@ -4286,6 +4286,11 @@ set_params__post_init(struct adapter *sc) if (t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val) == 0) sc->params.port_caps32 = 1; + /* Let filter + maskhash steer to a part of the VI's RSS region. */ + val = 1 << (G_MASKSIZE(t4_read_reg(sc, A_TP_RSS_CONFIG_TNL)) - 1); + t4_set_reg_field(sc, A_TP_RSS_CONFIG_TNL, V_MASKFILTER(M_MASKFILTER), + V_MASKFILTER(val - 1)); + #ifdef TCP_OFFLOAD /* * Override the TOE timers with user provided tunables. This is not the Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Wed Mar 27 19:34:19 2019 (r345594) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Wed Mar 27 19:37:50 2019 (r345595) @@ -101,6 +101,15 @@ int lazy_tx_credit_flush = 1; SYSCTL_INT(_hw_cxgbe, OID_AUTO, lazy_tx_credit_flush, CTLFLAG_RWTUN, &lazy_tx_credit_flush, 0, "lazy credit flush for netmap tx queues."); +/* + * Split the netmap rx queues into two groups that populate separate halves of + * the RSS indirection table. This allows filters with hashmask to steer to a + * particular group of queues. + */ +static int nm_split_rss = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_split_rss, CTLFLAG_RWTUN, + &nm_split_rss, 0, "Split the netmap rx queues into two groups."); + static int alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq, int cong) { @@ -333,7 +342,7 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi struct netmap_kring *kring; struct sge_nm_rxq *nm_rxq; struct sge_nm_txq *nm_txq; - int rc, i, j, hwidx; + int rc, i, j, hwidx, defq, nrssq; struct hw_buf_info *hwb; ASSERT_SYNCHRONIZED_OP(sc); @@ -403,20 +412,69 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi vi->nm_rss = malloc(vi->rss_size * sizeof(uint16_t), M_CXGBE, M_ZERO | M_WAITOK); } - for (i = 0; i < vi->rss_size;) { - for_each_nm_rxq(vi, j, nm_rxq) { - vi->nm_rss[i++] = nm_rxq->iq_abs_id; - if (i == vi->rss_size) - break; + + MPASS(vi->nnmrxq > 0); + if (nm_split_rss == 0 || vi->nnmrxq == 1) { + for (i = 0; i < vi->rss_size;) { + for_each_nm_rxq(vi, j, nm_rxq) { + vi->nm_rss[i++] = nm_rxq->iq_abs_id; + if (i == vi->rss_size) + break; + } } + defq = vi->nm_rss[0]; + } else { + /* We have multiple queues and we want to split the table. */ + MPASS(nm_split_rss != 0); + MPASS(vi->nnmrxq > 1); + + nm_rxq = &sc->sge.nm_rxq[vi->first_nm_rxq]; + nrssq = vi->nnmrxq; + if (vi->nnmrxq & 1) { + /* + * Odd number of queues. The first rxq is designated the + * default queue, the rest are split evenly. + */ + defq = nm_rxq->iq_abs_id; + nm_rxq++; + nrssq--; + } else { + /* + * Even number of queues split into two halves. The + * first rxq in one of the halves is designated the + * default queue. + */ +#if 1 + /* First rxq in the first half. */ + defq = nm_rxq->iq_abs_id; +#else + /* First rxq in the second half. */ + defq = nm_rxq[vi->nnmrxq / 2].iq_abs_id; +#endif + } + + i = 0; + while (i < vi->rss_size / 2) { + for (j = 0; j < nrssq / 2; j++) { + vi->nm_rss[i++] = nm_rxq[j].iq_abs_id; + if (i == vi->rss_size / 2) + break; + } + } + while (i < vi->rss_size) { + for (j = nrssq / 2; j < nrssq; j++) { + vi->nm_rss[i++] = nm_rxq[j].iq_abs_id; + if (i == vi->rss_size) + break; + } + } } rc = -t4_config_rss_range(sc, sc->mbox, vi->viid, 0, vi->rss_size, vi->nm_rss, vi->rss_size); if (rc != 0) if_printf(ifp, "netmap rss_config failed: %d\n", rc); - rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, - vi->nm_rss[0], 0, 0); + rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, defq, 0, 0); if (rc != 0) if_printf(ifp, "netmap rss hash/defaultq config failed: %d\n", rc); Modified: stable/12/usr.sbin/cxgbetool/cxgbetool.c ============================================================================== --- stable/12/usr.sbin/cxgbetool/cxgbetool.c Wed Mar 27 19:34:19 2019 (r345594) +++ stable/12/usr.sbin/cxgbetool/cxgbetool.c Wed Mar 27 19:37:50 2019 (r345595) @@ -924,7 +924,7 @@ do_show_one_filter_info(struct t4_filter *t, uint32_t if (t->fs.dirsteer == 0) { printf("RSS"); if (t->fs.maskhash) - printf("(TCB=hash)"); + printf("(region %d)", t->fs.iq << 1); } else { printf("%d", t->fs.iq); if (t->fs.dirsteerhash == 0) @@ -1263,11 +1263,19 @@ set_filter(uint32_t idx, int argc, const char *argv[], } else if (!parse_val("rpttid", args, &val)) { t.fs.rpttid = 1; } else if (!parse_val("queue", args, &val)) { - t.fs.dirsteer = 1; - t.fs.iq = val; + t.fs.dirsteer = 1; /* direct steer */ + t.fs.iq = val; /* to the iq with this cntxt_id */ } else if (!parse_val("tcbhash", args, &val)) { - t.fs.maskhash = 1; - t.fs.dirsteerhash = 1; + t.fs.dirsteerhash = 1; /* direct steer */ + /* XXX: use (val << 1) as the rss_hash? */ + t.fs.iq = val; + } else if (!parse_val("tcbrss", args, &val)) { + t.fs.maskhash = 1; /* steer to RSS region */ + /* + * val = start idx of the region but the internal TCB + * field is 10b only and is left shifted by 1 before use. + */ + t.fs.iq = val >> 1; } else if (!parse_val("eport", args, &val)) { t.fs.eport = val; } else if (!parse_val("swapmac", args, &val)) { From owner-svn-src-stable@freebsd.org Wed Mar 27 19:40:33 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C23421558F4C; Wed, 27 Mar 2019 19:40:33 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 621368BD57; Wed, 27 Mar 2019 19:40:33 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33AE7BE33; Wed, 27 Mar 2019 19:40:32 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJeWcc078494; Wed, 27 Mar 2019 19:40:32 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJeWnP078493; Wed, 27 Mar 2019 19:40:32 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903271940.x2RJeWnP078493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 19:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345597 - stable/12/contrib/ofed/librdmacm/examples X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/contrib/ofed/librdmacm/examples X-SVN-Commit-Revision: 345597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 621368BD57 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.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:40:33 -0000 Author: np Date: Wed Mar 27 19:40:31 2019 New Revision: 345597 URL: https://svnweb.freebsd.org/changeset/base/345597 Log: MFC r339886: rping(1): Make sure the socket address defaults to something reasonable when running as the server. Submitted by: Krishnamraju Eraparaju @ Chelsio Reviewed by: hselasky@, np@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D17707 Modified: stable/12/contrib/ofed/librdmacm/examples/rping.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/ofed/librdmacm/examples/rping.c ============================================================================== --- stable/12/contrib/ofed/librdmacm/examples/rping.c Wed Mar 27 19:40:18 2019 (r345596) +++ stable/12/contrib/ofed/librdmacm/examples/rping.c Wed Mar 27 19:40:31 2019 (r345597) @@ -1177,9 +1177,13 @@ int main(int argc, char *argv[]) cb->server = -1; cb->state = IDLE; cb->size = 64; - cb->sin.ss_family = PF_INET; cb->port = htobe16(7174); sem_init(&cb->sem, 0, 0); + + /* initialize sockaddr structure with defaults */ + ret = get_addr("0.0.0.0", (struct sockaddr *) &cb->sin); + if (ret) + goto out; opterr = 0; while ((op=getopt(argc, argv, "a:I:Pp:C:S:t:scvVd")) != -1) { From owner-svn-src-stable@freebsd.org Wed Mar 27 19:42:25 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5082C1559204; Wed, 27 Mar 2019 19:42:25 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 E794C8C1C7; Wed, 27 Mar 2019 19:42:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9654BFD0; Wed, 27 Mar 2019 19:42:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJgOHO083311; Wed, 27 Mar 2019 19:42:24 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJgOtW083310; Wed, 27 Mar 2019 19:42:24 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903271942.x2RJgOtW083310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 19:42:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345598 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E794C8C1C7 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.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:42:25 -0000 Author: np Date: Wed Mar 27 19:42:24 2019 New Revision: 345598 URL: https://svnweb.freebsd.org/changeset/base/345598 Log: MFC r339965: cxgbe(4): Report a reasonable non-zero if_hw_tsomaxsegsize to the kernel. This reverts an accidental change that snuck in with r339628. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 19:40:31 2019 (r345597) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 19:42:24 2019 (r345598) @@ -1661,7 +1661,7 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; #endif - ifp->if_hw_tsomaxsegsize = 0; + ifp->if_hw_tsomaxsegsize = 65536; ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP From owner-svn-src-stable@freebsd.org Wed Mar 27 19:47:22 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A46C415594FD; Wed, 27 Mar 2019 19:47:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 4907B8C56C; Wed, 27 Mar 2019 19:47:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21FBABFDD; Wed, 27 Mar 2019 19:47:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJlMLr083579; Wed, 27 Mar 2019 19:47:22 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJlM3V083578; Wed, 27 Mar 2019 19:47:22 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903271947.x2RJlM3V083578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 19:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345599 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4907B8C56C 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.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:47:22 -0000 Author: np Date: Wed Mar 27 19:47:21 2019 New Revision: 345599 URL: https://svnweb.freebsd.org/changeset/base/345599 Log: MFC r339967: cxgbe(4): Add rate limiting support for UDP. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 27 19:42:24 2019 (r345598) +++ stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 27 19:47:21 2019 (r345599) @@ -5628,10 +5628,6 @@ write_ethofld_wr(struct cxgbe_snd_tag *cst, struct fw_ m0->m_pkthdr.l4hlen > 0, ("%s: ethofld mbuf %p is missing header lengths", __func__, m0)); - if (needs_udp_csum(m0)) { - CXGBE_UNIMPLEMENTED("UDP ethofld"); - } - len16 = mbuf_eo_len16(m0); nsegs = mbuf_eo_nsegs(m0); pktlen = m0->m_pkthdr.len; @@ -5646,37 +5642,52 @@ write_ethofld_wr(struct cxgbe_snd_tag *cst, struct fw_ wr->equiq_to_len16 = htobe32(V_FW_WR_LEN16(len16) | V_FW_WR_FLOWID(cst->etid)); wr->r3 = 0; - wr->u.tcpseg.type = FW_ETH_TX_EO_TYPE_TCPSEG; - wr->u.tcpseg.ethlen = m0->m_pkthdr.l2hlen; - wr->u.tcpseg.iplen = htobe16(m0->m_pkthdr.l3hlen); - wr->u.tcpseg.tcplen = m0->m_pkthdr.l4hlen; - wr->u.tcpseg.tsclk_tsoff = mbuf_eo_tsclk_tsoff(m0); - wr->u.tcpseg.r4 = 0; - wr->u.tcpseg.r5 = 0; - wr->u.tcpseg.plen = htobe32(pktlen - immhdrs); + if (needs_udp_csum(m0)) { + wr->u.udpseg.type = FW_ETH_TX_EO_TYPE_UDPSEG; + wr->u.udpseg.ethlen = m0->m_pkthdr.l2hlen; + wr->u.udpseg.iplen = htobe16(m0->m_pkthdr.l3hlen); + wr->u.udpseg.udplen = m0->m_pkthdr.l4hlen; + wr->u.udpseg.rtplen = 0; + wr->u.udpseg.r4 = 0; + wr->u.udpseg.mss = htobe16(pktlen - immhdrs); + wr->u.udpseg.schedpktsize = wr->u.udpseg.mss; + wr->u.udpseg.plen = htobe32(pktlen - immhdrs); + cpl = (void *)(wr + 1); + } else { + MPASS(needs_tcp_csum(m0)); + wr->u.tcpseg.type = FW_ETH_TX_EO_TYPE_TCPSEG; + wr->u.tcpseg.ethlen = m0->m_pkthdr.l2hlen; + wr->u.tcpseg.iplen = htobe16(m0->m_pkthdr.l3hlen); + wr->u.tcpseg.tcplen = m0->m_pkthdr.l4hlen; + wr->u.tcpseg.tsclk_tsoff = mbuf_eo_tsclk_tsoff(m0); + wr->u.tcpseg.r4 = 0; + wr->u.tcpseg.r5 = 0; + wr->u.tcpseg.plen = htobe32(pktlen - immhdrs); - if (needs_tso(m0)) { - struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1); + if (needs_tso(m0)) { + struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1); - wr->u.tcpseg.mss = htobe16(m0->m_pkthdr.tso_segsz); + wr->u.tcpseg.mss = htobe16(m0->m_pkthdr.tso_segsz); - ctrl = V_LSO_OPCODE(CPL_TX_PKT_LSO) | F_LSO_FIRST_SLICE | - F_LSO_LAST_SLICE | V_LSO_IPHDR_LEN(m0->m_pkthdr.l3hlen >> 2) - | V_LSO_TCPHDR_LEN(m0->m_pkthdr.l4hlen >> 2); - if (m0->m_pkthdr.l2hlen == sizeof(struct ether_vlan_header)) - ctrl |= V_LSO_ETHHDR_LEN(1); - if (m0->m_pkthdr.l3hlen == sizeof(struct ip6_hdr)) - ctrl |= F_LSO_IPV6; - lso->lso_ctrl = htobe32(ctrl); - lso->ipid_ofst = htobe16(0); - lso->mss = htobe16(m0->m_pkthdr.tso_segsz); - lso->seqno_offset = htobe32(0); - lso->len = htobe32(pktlen); + ctrl = V_LSO_OPCODE(CPL_TX_PKT_LSO) | + F_LSO_FIRST_SLICE | F_LSO_LAST_SLICE | + V_LSO_IPHDR_LEN(m0->m_pkthdr.l3hlen >> 2) | + V_LSO_TCPHDR_LEN(m0->m_pkthdr.l4hlen >> 2); + if (m0->m_pkthdr.l2hlen == sizeof(struct ether_vlan_header)) + ctrl |= V_LSO_ETHHDR_LEN(1); + if (m0->m_pkthdr.l3hlen == sizeof(struct ip6_hdr)) + ctrl |= F_LSO_IPV6; + lso->lso_ctrl = htobe32(ctrl); + lso->ipid_ofst = htobe16(0); + lso->mss = htobe16(m0->m_pkthdr.tso_segsz); + lso->seqno_offset = htobe32(0); + lso->len = htobe32(pktlen); - cpl = (void *)(lso + 1); - } else { - wr->u.tcpseg.mss = htobe16(0xffff); - cpl = (void *)(wr + 1); + cpl = (void *)(lso + 1); + } else { + wr->u.tcpseg.mss = htobe16(0xffff); + cpl = (void *)(wr + 1); + } } /* Checksum offload must be requested for ethofld. */ @@ -5695,7 +5706,7 @@ write_ethofld_wr(struct cxgbe_snd_tag *cst, struct fw_ cpl->len = htobe16(pktlen); cpl->ctrl1 = htobe64(ctrl1); - /* Copy Ethernet, IP & TCP hdrs as immediate data */ + /* Copy Ethernet, IP & TCP/UDP hdrs as immediate data */ p = (uintptr_t)(cpl + 1); m_copydata(m0, 0, immhdrs, (void *)p); From owner-svn-src-stable@freebsd.org Wed Mar 27 19:59:37 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90389155986F; Wed, 27 Mar 2019 19:59:37 +0000 (UTC) (envelope-from ngie@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 2E0B68CA73; Wed, 27 Mar 2019 19:59:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01953C1AA; Wed, 27 Mar 2019 19:59:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJxaBT089161; Wed, 27 Mar 2019 19:59:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJxadZ089160; Wed, 27 Mar 2019 19:59:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903271959.x2RJxadZ089160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 27 Mar 2019 19:59: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: r345600 - stable/11/share/man/man8 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/share/man/man8 X-SVN-Commit-Revision: 345600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E0B68CA73 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.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:59:37 -0000 Author: ngie Date: Wed Mar 27 19:59:36 2019 New Revision: 345600 URL: https://svnweb.freebsd.org/changeset/base/345600 Log: MFC r344066: Add rc.resume(8) alias for rc(8) to fix the manpage cross references This issue was noticed when running `make manlint` as part of MFCing r342597 to ^/stable/11: ``` $ make -C share/man/man8 rc.8lint mandoc -Tascii -Tlint rc.8 mandoc: rc.8:548:6: STYLE: referenced manual not found: Xr rc.resume 8 $ ``` This is a followup commit to r339818. Differential Revision: https://reviews.freebsd.org/D19547 Modified: stable/11/share/man/man8/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man8/Makefile ============================================================================== --- stable/11/share/man/man8/Makefile Wed Mar 27 19:47:21 2019 (r345599) +++ stable/11/share/man/man8/Makefile Wed Mar 27 19:59:36 2019 (r345600) @@ -24,6 +24,7 @@ MLINKS= \ rc.8 rc.local.8 \ rc.8 rc.network.8 \ rc.8 rc.pccard.8 \ + rc.8 rc.resume.8 \ rc.8 rc.serial.8 \ rc.8 rc.shutdown.8 From owner-svn-src-stable@freebsd.org Wed Mar 27 20:29:03 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0781B155A2E5; Wed, 27 Mar 2019 20:29:03 +0000 (UTC) (envelope-from ngie@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 9B7B58D9A6; Wed, 27 Mar 2019 20:29:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 750CBC6BF; Wed, 27 Mar 2019 20:29:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RKT2dS004875; Wed, 27 Mar 2019 20:29:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RKT2mD004874; Wed, 27 Mar 2019 20:29:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903272029.x2RKT2mD004874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 27 Mar 2019 20:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345602 - stable/12/sbin/bectl/tests X-SVN-Group: stable-12 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/12/sbin/bectl/tests X-SVN-Commit-Revision: 345602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9B7B58D9A6 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.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 20:29:03 -0000 Author: ngie Date: Wed Mar 27 20:29:02 2019 New Revision: 345602 URL: https://svnweb.freebsd.org/changeset/base/345602 Log: MFC r344067: Fix up concurrent test zpool setup and teardown Set up zpools with a more unique name, stash the zpool name away in a file pointed to by `$ZPOOL_NAME_FILE` (which is relative to a per-testcase generated temporary directory), then remove the file based on `$ZPOOL_NAME_FILE` in the cleanup routines. This is a more concurrency-safe solution and will allow the testcases to be safely executed in parallel. Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D19546 Modified: stable/12/sbin/bectl/tests/bectl_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/bectl/tests/bectl_test.sh ============================================================================== --- stable/12/sbin/bectl/tests/bectl_test.sh Wed Mar 27 20:15:51 2019 (r345601) +++ stable/12/sbin/bectl/tests/bectl_test.sh Wed Mar 27 20:29:02 2019 (r345602) @@ -26,6 +26,17 @@ # # $FreeBSD$ +ZPOOL_NAME_FILE=zpool_name +get_zpool_name() +{ + cat $ZPOOL_NAME_FILE +} +make_zpool_name() +{ + mktemp -u bectl_test_XXXXXX > $ZPOOL_NAME_FILE + get_zpool_name +} + # Establishes a bectl_create zpool that can be used for some light testing; contains # a 'default' BE and not much else. bectl_create_setup() @@ -34,6 +45,9 @@ bectl_create_setup() disk=$2 mnt=$3 + # Sanity check to make sure `make_zpool_name` succeeded + atf_check test -n "$zpool" + kldload -n -q zfs || atf_skip "ZFS module not loaded on the current system" atf_check mkdir -p ${mnt} atf_check truncate -s 1G ${disk} @@ -48,6 +62,9 @@ bectl_create_deep_setup() disk=$2 mnt=$3 + # Sanity check to make sure `make_zpool_name` succeeded + atf_check test -n "$zpool" + bectl_create_setup ${zpool} ${disk} ${mnt} atf_check mkdir -p ${root} atf_check -o ignore bectl -r ${zpool}/ROOT mount default ${root} @@ -60,8 +77,9 @@ bectl_create_deep_setup() bectl_cleanup() { zpool=$1 - - if zpool get health ${zpool} >/dev/null 2>&1; then + if [ -z "$zpool" ]; then + echo "Skipping cleanup; zpool not set up" + elif zpool get health ${zpool} >/dev/null 2>&1; then zpool destroy -f ${zpool} fi } @@ -76,7 +94,7 @@ bectl_create_head() bectl_create_body() { cwd=$(realpath .) - zpool=bectl_test + zpool=$(make_zpool_name) disk=${cwd}/disk.img mount=${cwd}/mnt @@ -89,8 +107,7 @@ bectl_create_body() } bectl_create_cleanup() { - - bectl_cleanup bectl_test + bectl_cleanup $(get_zpool_name) } atf_test_case bectl_destroy cleanup @@ -103,7 +120,7 @@ bectl_destroy_head() bectl_destroy_body() { cwd=$(realpath .) - zpool=bectl_test + zpool=$(make_zpool_name) disk=${cwd}/disk.img mount=${cwd}/mnt @@ -116,7 +133,7 @@ bectl_destroy_body() bectl_destroy_cleanup() { - bectl_cleanup bectl_test + bectl_cleanup $(get_zpool_name) } atf_test_case bectl_export_import cleanup @@ -129,7 +146,7 @@ bectl_export_import_head() bectl_export_import_body() { cwd=$(realpath .) - zpool=bectl_test + zpool=$(make_zpool_name) disk=${cwd}/disk.img mount=${cwd}/mnt @@ -144,7 +161,7 @@ bectl_export_import_body() bectl_export_import_cleanup() { - bectl_cleanup bectl_test + bectl_cleanup $(get_zpool_name) } atf_test_case bectl_list cleanup @@ -157,7 +174,7 @@ bectl_list_head() bectl_list_body() { cwd=$(realpath .) - zpool=bectl_test + zpool=$(make_zpool_name) disk=${cwd}/disk.img mount=${cwd}/mnt @@ -179,7 +196,7 @@ bectl_list_body() bectl_list_cleanup() { - bectl_cleanup bectl_test + bectl_cleanup $(get_zpool_name) } atf_test_case bectl_mount cleanup @@ -192,7 +209,7 @@ bectl_mount_head() bectl_mount_body() { cwd=$(realpath .) - zpool=bectl_test + zpool=$(make_zpool_name) disk=${cwd}/disk.img mount=${cwd}/mnt root=${mount}/root @@ -213,7 +230,7 @@ bectl_mount_body() bectl_mount_cleanup() { - bectl_cleanup bectl_test + bectl_cleanup $(get_zpool_name) } atf_test_case bectl_rename cleanup @@ -226,7 +243,7 @@ bectl_rename_head() bectl_rename_body() { cwd=$(realpath .) - zpool=bectl_test + zpool=$(make_zpool_name) disk=${cwd}/disk.img mount=${cwd}/mnt @@ -239,7 +256,7 @@ bectl_rename_body() bectl_rename_cleanup() { - bectl_cleanup bectl_test + bectl_cleanup $(get_zpool_name) } atf_test_case bectl_jail cleanup @@ -252,7 +269,7 @@ bectl_jail_head() bectl_jail_body() { cwd=$(realpath .) - zpool=bectl_test + zpool=$(make_zpool_name) disk=${cwd}/disk.img mount=${cwd}/mnt root=${mount}/root @@ -327,7 +344,7 @@ bectl_jail_cleanup() jail -r ${jailid} done; - bectl_cleanup bectl_test + bectl_cleanup $(get_zpool_name) } atf_init_test_cases() From owner-svn-src-stable@freebsd.org Wed Mar 27 20:56:07 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0999155ACF2; Wed, 27 Mar 2019 20:56:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 5F0238E826; Wed, 27 Mar 2019 20:56:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 325E4CBE6; Wed, 27 Mar 2019 20:56:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RKu7MT020681; Wed, 27 Mar 2019 20:56:07 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RKu7P5020680; Wed, 27 Mar 2019 20:56:07 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272056.x2RKu7P5020680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 20:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345603 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5F0238E826 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_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 20:56:07 -0000 Author: np Date: Wed Mar 27 20:56:06 2019 New Revision: 345603 URL: https://svnweb.freebsd.org/changeset/base/345603 Log: MFC r341654: cxgbe(4): Get Linux cxgb4vf working in bhyve VMs with VFs passed through. cxgb4vf doesn't own the buffer size list but still expects the first two entries to be 4K and some power of 2 respectively. The BSD cxgbe doesn't care where its preferred buffer sizes are as long as they're in the list somewhere, so just move its entries towards the end as a workaround. Sponsored by: Chelsio Communicatons Modified: stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 27 20:29:02 2019 (r345602) +++ stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 27 20:56:06 2019 (r345603) @@ -697,8 +697,10 @@ t4_tweak_chip_settings(struct adapter *sc) KASSERT(nitems(sge_flbuf_sizes) <= SGE_FLBUF_SIZES, ("%s: hw buffer size table too big", __func__)); + t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0, 4096); + t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE1, 65536); for (i = 0; i < min(nitems(sge_flbuf_sizes), SGE_FLBUF_SIZES); i++) { - t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i), + t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE15 - (4 * i), sge_flbuf_sizes[i]); } From owner-svn-src-stable@freebsd.org Wed Mar 27 21:23:02 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B49AD155B446; Wed, 27 Mar 2019 21:23:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 622548F567; Wed, 27 Mar 2019 21:23:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35F82D102; Wed, 27 Mar 2019 21:23:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLN2X6039543; Wed, 27 Mar 2019 21:23:02 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLN0uN039534; Wed, 27 Mar 2019 21:23:00 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272123.x2RLN0uN039534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 21:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345604 - in stable/12/sys: conf dev/cxgbe dev/cxgbe/tom modules/cxgbe/if_cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12/sys: conf dev/cxgbe dev/cxgbe/tom modules/cxgbe/if_cxgbe X-SVN-Commit-Revision: 345604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 622548F567 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.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:23:03 -0000 Author: np Date: Wed Mar 27 21:22:59 2019 New Revision: 345604 URL: https://svnweb.freebsd.org/changeset/base/345604 Log: MFC r341172, r341270 (both by jhb@). r341172: Move CLIP table handling out of TOM and into the base driver. - Store the clip table in 'struct adapter' instead of in the TOM softc. - Init the clip table during attach and teardown during detach. - While here, add a dev...misc.clip sysctl to dump the CLIP table. This does mean that we update the clip table even if TOE is not enabled, but non-TOE things need the CLIP table anyway. Reviewed by: np, Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D18010 r341270: Make most of the CLIP code conditional on #ifdef INET6. This fixes builds of kernels without INET6 such as LINT-NOINET6. Reported by: arybchik Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D18384 Added: stable/12/sys/dev/cxgbe/t4_clip.c - copied, changed from r341172, head/sys/dev/cxgbe/t4_clip.c stable/12/sys/dev/cxgbe/t4_clip.h - copied unchanged from r341172, head/sys/dev/cxgbe/t4_clip.h Modified: stable/12/sys/conf/files stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/tom/t4_connect.c stable/12/sys/dev/cxgbe/tom/t4_listen.c stable/12/sys/dev/cxgbe/tom/t4_tom.c stable/12/sys/dev/cxgbe/tom/t4_tom.h stable/12/sys/modules/cxgbe/if_cxgbe/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Wed Mar 27 20:56:06 2019 (r345603) +++ stable/12/sys/conf/files Wed Mar 27 21:22:59 2019 (r345604) @@ -1408,6 +1408,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgbe/t4_clip.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_filter.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_if.m optional cxgbe pci Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 20:56:06 2019 (r345603) +++ stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 21:22:59 2019 (r345604) @@ -770,6 +770,8 @@ struct devnames { const char *vf_ifnet_name; }; +struct clip_entry; + struct adapter { SLIST_ENTRY(adapter) link; device_t dev; @@ -815,6 +817,10 @@ struct adapter { struct taskqueue *tq[MAX_NCHAN]; /* General purpose taskqueues */ struct port_info *port[MAX_NPORTS]; uint8_t chan_map[MAX_NCHAN]; /* channel -> port */ + + struct mtx clip_table_lock; + TAILQ_HEAD(, clip_entry) clip_table; + int clip_gen; void *tom_softc; /* (struct tom_data *) */ struct tom_tunables tt; Copied and modified: stable/12/sys/dev/cxgbe/t4_clip.c (from r341172, head/sys/dev/cxgbe/t4_clip.c) ============================================================================== --- head/sys/dev/cxgbe/t4_clip.c Thu Nov 29 01:15:53 2018 (r341172, copy source) +++ stable/12/sys/dev/cxgbe/t4_clip.c Wed Mar 27 21:22:59 2019 (r345604) @@ -30,6 +30,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_inet.h" +#include "opt_inet6.h" + #include #include #include @@ -47,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include "common/common.h" #include "t4_clip.h" +#if defined(INET6) static int add_lip(struct adapter *, struct in6_addr *); static int delete_lip(struct adapter *, struct in6_addr *); static struct clip_entry *search_lip(struct adapter *, struct in6_addr *); @@ -108,11 +112,13 @@ search_lip(struct adapter *sc, struct in6_addr *lip) return (NULL); } +#endif struct clip_entry * t4_hold_lip(struct adapter *sc, struct in6_addr *lip, struct clip_entry *ce) { +#ifdef INET6 mtx_lock(&sc->clip_table_lock); if (ce == NULL) ce = search_lip(sc, lip); @@ -121,12 +127,16 @@ t4_hold_lip(struct adapter *sc, struct in6_addr *lip, mtx_unlock(&sc->clip_table_lock); return (ce); +#else + return (NULL); +#endif } void t4_release_lip(struct adapter *sc, struct clip_entry *ce) { +#ifdef INET6 mtx_lock(&sc->clip_table_lock); KASSERT(search_lip(sc, &ce->lip) == ce, ("%s: CLIP entry %p p not in CLIP table.", __func__, ce)); @@ -134,8 +144,10 @@ t4_release_lip(struct adapter *sc, struct clip_entry * ("%s: CLIP entry %p has refcount 0", __func__, ce)); --ce->refcount; mtx_unlock(&sc->clip_table_lock); +#endif } +#ifdef INET6 void t4_init_clip_table(struct adapter *sc) { @@ -380,3 +392,4 @@ t4_clip_modunload(void) EVENTHANDLER_DEREGISTER(ifaddr_event, ifaddr_evhandler); taskqueue_cancel_timeout(taskqueue_thread, &clip_task, NULL); } +#endif Copied: stable/12/sys/dev/cxgbe/t4_clip.h (from r341172, head/sys/dev/cxgbe/t4_clip.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dev/cxgbe/t4_clip.h Wed Mar 27 21:22:59 2019 (r345604, copy of r341172, head/sys/dev/cxgbe/t4_clip.h) @@ -0,0 +1,51 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2012 Chelsio Communications, Inc. + * All rights reserved. + * Written by: Navdeep Parhar + * + * 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$ + */ + +#ifndef __T4_CLIP_H +#define __T4_CLIP_H + +struct clip_entry { + TAILQ_ENTRY(clip_entry) link; + struct in6_addr lip; /* local IPv6 address */ + u_int refcount; +}; + +void t4_clip_modload(void); +void t4_clip_modunload(void); +void t4_init_clip_table(struct adapter *); +void t4_destroy_clip_table(struct adapter *); +struct clip_entry *t4_hold_lip(struct adapter *, struct in6_addr *, + struct clip_entry *); +void t4_release_lip(struct adapter *, struct clip_entry *); + +int sysctl_clip(SYSCTL_HANDLER_ARGS); + +#endif /* __T4_CLIP_H */ Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 20:56:06 2019 (r345603) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 21:22:59 2019 (r345604) @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #include "common/t4_regs.h" #include "common/t4_regs_values.h" #include "cudbg/cudbg.h" +#include "t4_clip.h" #include "t4_ioctl.h" #include "t4_l2t.h" #include "t4_mp_ring.h" @@ -1225,6 +1226,9 @@ t4_attach(device_t dev) #ifdef RATELIMIT t4_init_etid_table(sc); #endif +#ifdef INET6 + t4_init_clip_table(sc); +#endif if (sc->vres.key.size != 0) sc->key_map = vmem_create("T4TLS key map", sc->vres.key.start, sc->vres.key.size, 32, 0, M_FIRSTFIT | M_WAITOK); @@ -1524,6 +1528,9 @@ t4_detach_common(device_t dev) #endif if (sc->key_map) vmem_destroy(sc->key_map); +#ifdef INET6 + t4_destroy_clip_table(sc); +#endif #if defined(TCP_OFFLOAD) || defined(RATELIMIT) free(sc->sge.ofld_txq, M_CXGBE); @@ -5991,6 +5998,12 @@ t4_sysctls(struct adapter *sc) CTLTYPE_STRING | CTLFLAG_RD, sc, 0, sysctl_smt, "A", "hardware source MAC table"); +#ifdef INET6 + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "clip", + CTLTYPE_STRING | CTLFLAG_RD, sc, 0, + sysctl_clip, "A", "active CLIP table entries"); +#endif + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "lb_stats", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, sysctl_lb_stats, "A", "loopback statistics"); @@ -10550,6 +10563,9 @@ mod_event(module_t mod, int cmd, void *arg) sx_init(&t4_uld_list_lock, "T4/T5 ULDs"); SLIST_INIT(&t4_uld_list); #endif +#ifdef INET6 + t4_clip_modload(); +#endif t4_tracer_modload(); tweak_tunables(); } @@ -10589,6 +10605,9 @@ mod_event(module_t mod, int cmd, void *arg) if (t4_sge_extfree_refs() == 0) { t4_tracer_modunload(); +#ifdef INET6 + t4_clip_modunload(); +#endif #ifdef TCP_OFFLOAD sx_destroy(&t4_uld_list_lock); #endif Modified: stable/12/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_connect.c Wed Mar 27 20:56:06 2019 (r345603) +++ stable/12/sys/dev/cxgbe/tom/t4_connect.c Wed Mar 27 21:22:59 2019 (r345604) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include "common/t4_msg.h" #include "common/t4_regs.h" #include "common/t4_regs_values.h" +#include "t4_clip.h" #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" @@ -316,7 +317,6 @@ t4_connect(struct toedev *tod, struct socket *so, stru struct sockaddr *nam) { struct adapter *sc = tod->tod_softc; - struct tom_data *td = tod_td(tod); struct toepcb *toep = NULL; struct wrqe *wr = NULL; struct ifnet *rt_ifp = rt->rt_ifp; @@ -409,7 +409,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru if ((inp->inp_vflag & INP_IPV6) == 0) DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP); - toep->ce = hold_lip(td, &inp->in6p_laddr, NULL); + toep->ce = t4_hold_lip(sc, &inp->in6p_laddr, NULL); if (toep->ce == NULL) DONT_OFFLOAD_ACTIVE_OPEN(ENOENT); @@ -496,7 +496,7 @@ failed: if (toep->l2te) t4_l2t_release(toep->l2te); if (toep->ce) - release_lip(td, toep->ce); + t4_release_lip(sc, toep->ce); free_toepcb(toep); } Modified: stable/12/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_listen.c Wed Mar 27 20:56:06 2019 (r345603) +++ stable/12/sys/dev/cxgbe/tom/t4_listen.c Wed Mar 27 21:22:59 2019 (r345604) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include "common/common.h" #include "common/t4_msg.h" #include "common/t4_regs.h" +#include "t4_clip.h" #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" @@ -212,9 +213,7 @@ alloc_lctx(struct adapter *sc, struct inpcb *inp, stru if (inp->inp_vflag & INP_IPV6 && !IN6_ARE_ADDR_EQUAL(&in6addr_any, &inp->in6p_laddr)) { - struct tom_data *td = sc->tom_softc; - - lctx->ce = hold_lip(td, &inp->in6p_laddr, NULL); + lctx->ce = t4_hold_lip(sc, &inp->in6p_laddr, NULL); if (lctx->ce == NULL) { free(lctx, M_CXGBE); return (NULL); @@ -238,7 +237,6 @@ static int free_lctx(struct adapter *sc, struct listen_ctx *lctx) { struct inpcb *inp = lctx->inp; - struct tom_data *td = sc->tom_softc; INP_WLOCK_ASSERT(inp); KASSERT(lctx->refcount == 0, @@ -251,7 +249,7 @@ free_lctx(struct adapter *sc, struct listen_ctx *lctx) __func__, lctx->stid, lctx, lctx->inp); if (lctx->ce) - release_lip(td, lctx->ce); + t4_release_lip(sc, lctx->ce); free_stid(sc, lctx); free(lctx, M_CXGBE); @@ -1675,7 +1673,7 @@ reset: MPASS(so->so_vnet == lctx->vnet); toep->vnet = lctx->vnet; if (inc.inc_flags & INC_ISIPV6) - toep->ce = hold_lip(sc->tom_softc, &inc.inc6_laddr, lctx->ce); + toep->ce = t4_hold_lip(sc, &inc.inc6_laddr, lctx->ce); /* * This is for the unlikely case where the syncache entry that we added Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.c Wed Mar 27 20:56:06 2019 (r345603) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.c Wed Mar 27 21:22:59 2019 (r345604) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include "common/t4_regs.h" #include "common/t4_regs_values.h" #include "common/t4_tcb.h" +#include "t4_clip.h" #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" #include "tom/t4_tls.h" @@ -99,21 +100,9 @@ static struct uld_info tom_uld_info = { static void release_offload_resources(struct toepcb *); static int alloc_tid_tabs(struct tid_info *); static void free_tid_tabs(struct tid_info *); -static int add_lip(struct adapter *, struct in6_addr *); -static int delete_lip(struct adapter *, struct in6_addr *); -static struct clip_entry *search_lip(struct tom_data *, struct in6_addr *); -static void init_clip_table(struct adapter *, struct tom_data *); -static void update_clip(struct adapter *, void *); -static void t4_clip_task(void *, int); -static void update_clip_table(struct adapter *, struct tom_data *); -static void destroy_clip_table(struct adapter *, struct tom_data *); static void free_tom_data(struct adapter *, struct tom_data *); static void reclaim_wr_resources(void *, int); -static int in6_ifaddr_gen; -static eventhandler_tag ifaddr_evhandler; -static struct timeout_task clip_task; - struct toepcb * alloc_toepcb(struct vi_info *vi, int txqid, int rxqid, int flags) { @@ -315,7 +304,7 @@ release_offload_resources(struct toepcb *toep) } if (toep->ce) - release_lip(td, toep->ce); + t4_release_lip(sc, toep->ce); if (toep->tc_idx != -1) t4_release_cl_rl(sc, toep->vi->pi->port_id, toep->tc_idx); @@ -822,267 +811,7 @@ failed: return (rc); } -static int -add_lip(struct adapter *sc, struct in6_addr *lip) -{ - struct fw_clip_cmd c; - - ASSERT_SYNCHRONIZED_OP(sc); - /* mtx_assert(&td->clip_table_lock, MA_OWNED); */ - - memset(&c, 0, sizeof(c)); - c.op_to_write = htonl(V_FW_CMD_OP(FW_CLIP_CMD) | F_FW_CMD_REQUEST | - F_FW_CMD_WRITE); - c.alloc_to_len16 = htonl(F_FW_CLIP_CMD_ALLOC | FW_LEN16(c)); - c.ip_hi = *(uint64_t *)&lip->s6_addr[0]; - c.ip_lo = *(uint64_t *)&lip->s6_addr[8]; - - return (-t4_wr_mbox_ns(sc, sc->mbox, &c, sizeof(c), &c)); -} - -static int -delete_lip(struct adapter *sc, struct in6_addr *lip) -{ - struct fw_clip_cmd c; - - ASSERT_SYNCHRONIZED_OP(sc); - /* mtx_assert(&td->clip_table_lock, MA_OWNED); */ - - memset(&c, 0, sizeof(c)); - c.op_to_write = htonl(V_FW_CMD_OP(FW_CLIP_CMD) | F_FW_CMD_REQUEST | - F_FW_CMD_READ); - c.alloc_to_len16 = htonl(F_FW_CLIP_CMD_FREE | FW_LEN16(c)); - c.ip_hi = *(uint64_t *)&lip->s6_addr[0]; - c.ip_lo = *(uint64_t *)&lip->s6_addr[8]; - - return (-t4_wr_mbox_ns(sc, sc->mbox, &c, sizeof(c), &c)); -} - -static struct clip_entry * -search_lip(struct tom_data *td, struct in6_addr *lip) -{ - struct clip_entry *ce; - - mtx_assert(&td->clip_table_lock, MA_OWNED); - - TAILQ_FOREACH(ce, &td->clip_table, link) { - if (IN6_ARE_ADDR_EQUAL(&ce->lip, lip)) - return (ce); - } - - return (NULL); -} - -struct clip_entry * -hold_lip(struct tom_data *td, struct in6_addr *lip, struct clip_entry *ce) -{ - - mtx_lock(&td->clip_table_lock); - if (ce == NULL) - ce = search_lip(td, lip); - if (ce != NULL) - ce->refcount++; - mtx_unlock(&td->clip_table_lock); - - return (ce); -} - -void -release_lip(struct tom_data *td, struct clip_entry *ce) -{ - - mtx_lock(&td->clip_table_lock); - KASSERT(search_lip(td, &ce->lip) == ce, - ("%s: CLIP entry %p p not in CLIP table.", __func__, ce)); - KASSERT(ce->refcount > 0, - ("%s: CLIP entry %p has refcount 0", __func__, ce)); - --ce->refcount; - mtx_unlock(&td->clip_table_lock); -} - static void -init_clip_table(struct adapter *sc, struct tom_data *td) -{ - - ASSERT_SYNCHRONIZED_OP(sc); - - mtx_init(&td->clip_table_lock, "CLIP table lock", NULL, MTX_DEF); - TAILQ_INIT(&td->clip_table); - td->clip_gen = -1; - - update_clip_table(sc, td); -} - -static void -update_clip(struct adapter *sc, void *arg __unused) -{ - - if (begin_synchronized_op(sc, NULL, HOLD_LOCK, "t4tomuc")) - return; - - if (uld_active(sc, ULD_TOM)) - update_clip_table(sc, sc->tom_softc); - - end_synchronized_op(sc, LOCK_HELD); -} - -static void -t4_clip_task(void *arg, int count) -{ - - t4_iterate(update_clip, NULL); -} - -static void -update_clip_table(struct adapter *sc, struct tom_data *td) -{ - struct rm_priotracker in6_ifa_tracker; - struct in6_ifaddr *ia; - struct in6_addr *lip, tlip; - struct clip_head stale; - struct clip_entry *ce, *ce_temp; - struct vi_info *vi; - int rc, gen, i, j; - uintptr_t last_vnet; - - ASSERT_SYNCHRONIZED_OP(sc); - - IN6_IFADDR_RLOCK(&in6_ifa_tracker); - mtx_lock(&td->clip_table_lock); - - gen = atomic_load_acq_int(&in6_ifaddr_gen); - if (gen == td->clip_gen) - goto done; - - TAILQ_INIT(&stale); - TAILQ_CONCAT(&stale, &td->clip_table, link); - - /* - * last_vnet optimizes the common cases where all if_vnet = NULL (no - * VIMAGE) or all if_vnet = vnet0. - */ - last_vnet = (uintptr_t)(-1); - for_each_port(sc, i) - for_each_vi(sc->port[i], j, vi) { - if (last_vnet == (uintptr_t)vi->ifp->if_vnet) - continue; - - /* XXX: races with if_vmove */ - CURVNET_SET(vi->ifp->if_vnet); - CK_STAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) { - lip = &ia->ia_addr.sin6_addr; - - KASSERT(!IN6_IS_ADDR_MULTICAST(lip), - ("%s: mcast address in in6_ifaddr list", __func__)); - - if (IN6_IS_ADDR_LOOPBACK(lip)) - continue; - if (IN6_IS_SCOPE_EMBED(lip)) { - /* Remove the embedded scope */ - tlip = *lip; - lip = &tlip; - in6_clearscope(lip); - } - /* - * XXX: how to weed out the link local address for the - * loopback interface? It's fe80::1 usually (always?). - */ - - /* - * If it's in the main list then we already know it's - * not stale. - */ - TAILQ_FOREACH(ce, &td->clip_table, link) { - if (IN6_ARE_ADDR_EQUAL(&ce->lip, lip)) - goto next; - } - - /* - * If it's in the stale list we should move it to the - * main list. - */ - TAILQ_FOREACH(ce, &stale, link) { - if (IN6_ARE_ADDR_EQUAL(&ce->lip, lip)) { - TAILQ_REMOVE(&stale, ce, link); - TAILQ_INSERT_TAIL(&td->clip_table, ce, - link); - goto next; - } - } - - /* A new IP6 address; add it to the CLIP table */ - ce = malloc(sizeof(*ce), M_CXGBE, M_NOWAIT); - memcpy(&ce->lip, lip, sizeof(ce->lip)); - ce->refcount = 0; - rc = add_lip(sc, lip); - if (rc == 0) - TAILQ_INSERT_TAIL(&td->clip_table, ce, link); - else { - char ip[INET6_ADDRSTRLEN]; - - inet_ntop(AF_INET6, &ce->lip, &ip[0], - sizeof(ip)); - log(LOG_ERR, "%s: could not add %s (%d)\n", - __func__, ip, rc); - free(ce, M_CXGBE); - } -next: - continue; - } - CURVNET_RESTORE(); - last_vnet = (uintptr_t)vi->ifp->if_vnet; - } - - /* - * Remove stale addresses (those no longer in V_in6_ifaddrhead) that are - * no longer referenced by the driver. - */ - TAILQ_FOREACH_SAFE(ce, &stale, link, ce_temp) { - if (ce->refcount == 0) { - rc = delete_lip(sc, &ce->lip); - if (rc == 0) { - TAILQ_REMOVE(&stale, ce, link); - free(ce, M_CXGBE); - } else { - char ip[INET6_ADDRSTRLEN]; - - inet_ntop(AF_INET6, &ce->lip, &ip[0], - sizeof(ip)); - log(LOG_ERR, "%s: could not delete %s (%d)\n", - __func__, ip, rc); - } - } - } - /* The ones that are still referenced need to stay in the CLIP table */ - TAILQ_CONCAT(&td->clip_table, &stale, link); - - td->clip_gen = gen; -done: - mtx_unlock(&td->clip_table_lock); - IN6_IFADDR_RUNLOCK(&in6_ifa_tracker); -} - -static void -destroy_clip_table(struct adapter *sc, struct tom_data *td) -{ - struct clip_entry *ce, *ce_temp; - - if (mtx_initialized(&td->clip_table_lock)) { - mtx_lock(&td->clip_table_lock); - TAILQ_FOREACH_SAFE(ce, &td->clip_table, link, ce_temp) { - KASSERT(ce->refcount == 0, - ("%s: CLIP entry %p still in use (%d)", __func__, - ce, ce->refcount)); - TAILQ_REMOVE(&td->clip_table, ce, link); - delete_lip(sc, &ce->lip); - free(ce, M_CXGBE); - } - mtx_unlock(&td->clip_table_lock); - mtx_destroy(&td->clip_table_lock); - } -} - -static void free_tom_data(struct adapter *sc, struct tom_data *td) { @@ -1094,7 +823,6 @@ free_tom_data(struct adapter *sc, struct tom_data *td) ("%s: lctx hash table is not empty.", __func__)); t4_free_ppod_region(&td->pr); - destroy_clip_table(sc, td); if (td->listen_mask != 0) hashdestroy(td->listen_hash, M_CXGBE, td->listen_mask); @@ -1369,9 +1097,6 @@ t4_tom_activate(struct adapter *sc) t4_set_reg_field(sc, A_ULP_RX_TDDP_TAGMASK, V_TDDPTAGMASK(M_TDDPTAGMASK), td->pr.pr_tag_mask); - /* CLIP table for IPv6 offload */ - init_clip_table(sc, td); - /* toedev ops */ tod = &td->tod; init_toedev(tod); @@ -1449,14 +1174,6 @@ t4_tom_deactivate(struct adapter *sc) return (rc); } -static void -t4_tom_ifaddr_event(void *arg __unused, struct ifnet *ifp) -{ - - atomic_add_rel_int(&in6_ifaddr_gen, 1); - taskqueue_enqueue_timeout(taskqueue_thread, &clip_task, -hz / 4); -} - static int t4_aio_queue_tom(struct socket *so, struct kaiocb *job) { @@ -1524,10 +1241,6 @@ t4_tom_mod_load(void) toe6_protosw.pr_ctloutput = t4_ctloutput_tom; toe6_protosw.pr_usrreqs = &toe6_usrreqs; - TIMEOUT_TASK_INIT(taskqueue_thread, &clip_task, 0, t4_clip_task, NULL); - ifaddr_evhandler = EVENTHANDLER_REGISTER(ifaddr_event, - t4_tom_ifaddr_event, NULL, EVENTHANDLER_PRI_ANY); - return (t4_register_uld(&tom_uld_info)); } @@ -1551,11 +1264,6 @@ t4_tom_mod_unload(void) if (t4_unregister_uld(&tom_uld_info) == EBUSY) return (EBUSY); - - if (ifaddr_evhandler) { - EVENTHANDLER_DEREGISTER(ifaddr_event, ifaddr_evhandler); - taskqueue_cancel_timeout(taskqueue_thread, &clip_task, NULL); - } t4_tls_mod_unload(); t4_ddp_mod_unload(); Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.h Wed Mar 27 20:56:06 2019 (r345603) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.h Wed Mar 27 21:22:59 2019 (r345604) @@ -259,13 +259,6 @@ struct listen_ctx { TAILQ_HEAD(, synq_entry) synq; }; -struct clip_entry { - TAILQ_ENTRY(clip_entry) link; - struct in6_addr lip; /* local IPv6 address */ - u_int refcount; -}; - -TAILQ_HEAD(clip_head, clip_entry); struct tom_data { struct toedev tod; @@ -280,10 +273,6 @@ struct tom_data { struct ppod_region pr; - struct mtx clip_table_lock; - struct clip_head clip_table; - int clip_gen; - /* WRs that will not be sent to the chip because L2 resolution failed */ struct mtx unsent_wr_lock; STAILQ_HEAD(, wrqe) unsent_wr_list; @@ -342,9 +331,6 @@ int select_ulp_mode(struct socket *, struct adapter *, struct offload_settings *); void set_ulp_mode(struct toepcb *, int); int negative_advice(int); -struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *, - struct clip_entry *); -void release_lip(struct tom_data *, struct clip_entry *); /* t4_connect.c */ void t4_init_connect_cpl_handlers(void); Modified: stable/12/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- stable/12/sys/modules/cxgbe/if_cxgbe/Makefile Wed Mar 27 20:56:06 2019 (r345603) +++ stable/12/sys/modules/cxgbe/if_cxgbe/Makefile Wed Mar 27 21:22:59 2019 (r345604) @@ -15,6 +15,7 @@ SRCS+= opt_ofed.h SRCS+= opt_ratelimit.h SRCS+= opt_rss.h SRCS+= pci_if.h pci_iov_if.h +SRCS+= t4_clip.c SRCS+= t4_filter.c SRCS+= t4_hw.c SRCS+= t4_if.c t4_if.h From owner-svn-src-stable@freebsd.org Wed Mar 27 21:29:49 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AC45155B71D; Wed, 27 Mar 2019 21:29:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 35D448F910; Wed, 27 Mar 2019 21:29:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D227BD112; Wed, 27 Mar 2019 21:29:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLTk1c040531; Wed, 27 Mar 2019 21:29:46 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLTkd1040527; Wed, 27 Mar 2019 21:29:46 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272129.x2RLTkd1040527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 21:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345605 - stable/12/sys/dev/cxgbe/tom X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 345605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 35D448F910 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.996,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:29:49 -0000 Author: np Date: Wed Mar 27 21:29:45 2019 New Revision: 345605 URL: https://svnweb.freebsd.org/changeset/base/345605 Log: MFC r342208: cxgbe/t4_tom: fixes for issues on the passive open side. - Fix PR 227760 by getting the TOE to respond to the SYN after the call to toe_syncache_add, not during it. The kernel syncache code calls syncache_respond just before syncache_insert. If the ACK to the syncache_respond is processed in another thread it may run before the syncache_insert and won't find the entry. Note that this affects only t4_tom because it's the only driver trying to insert and expand syncache entries from different threads. - Do not leak resources if an embryonic connection terminates at SYN_RCVD because of L2 lookup failures. - Retire lctx->synq and associated code because there is never a need to walk the list of embryonic connections associated with a listener. The per-tid state is still called a synq entry in the driver even though the synq itself is now gone. PR: 227760 Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/tom/t4_connect.c stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c stable/12/sys/dev/cxgbe/tom/t4_listen.c stable/12/sys/dev/cxgbe/tom/t4_tom.c stable/12/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_connect.c Wed Mar 27 21:22:59 2019 (r345604) +++ stable/12/sys/dev/cxgbe/tom/t4_connect.c Wed Mar 27 21:29:45 2019 (r345605) @@ -99,7 +99,8 @@ do_act_establish(struct sge_iq *iq, const struct rss_h goto done; } - make_established(toep, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt); + make_established(toep, be32toh(cpl->snd_isn) - 1, + be32toh(cpl->rcv_isn) - 1, cpl->tcp_opt); if (toep->ulp_mode == ULP_MODE_TLS) tls_establish(toep); Modified: stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Mar 27 21:22:59 2019 (r345604) +++ stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Mar 27 21:29:45 2019 (r345605) @@ -373,18 +373,15 @@ assign_rxopt(struct tcpcb *tp, unsigned int opt) * Completes some final bits of initialization for just established connections * and changes their state to TCPS_ESTABLISHED. * - * The ISNs are from after the exchange of SYNs. i.e., the true ISN + 1. + * The ISNs are from the exchange of SYNs. */ void -make_established(struct toepcb *toep, uint32_t snd_isn, uint32_t rcv_isn, - uint16_t opt) +make_established(struct toepcb *toep, uint32_t iss, uint32_t irs, uint16_t opt) { struct inpcb *inp = toep->inp; struct socket *so = inp->inp_socket; struct tcpcb *tp = intotcpcb(inp); long bufsize; - uint32_t iss = be32toh(snd_isn) - 1; /* true ISS */ - uint32_t irs = be32toh(rcv_isn) - 1; /* true IRS */ uint16_t tcpopt = be16toh(opt); struct flowc_tx_params ftxp; @@ -1245,22 +1242,12 @@ do_peer_close(struct sge_iq *iq, const struct rss_head KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__)); if (__predict_false(toep->flags & TPF_SYNQE)) { -#ifdef INVARIANTS - struct synq_entry *synqe = (void *)toep; - - INP_WLOCK(synqe->lctx->inp); - if (synqe->flags & TPF_SYNQE_HAS_L2TE) { - KASSERT(synqe->flags & TPF_ABORT_SHUTDOWN, - ("%s: listen socket closed but tid %u not aborted.", - __func__, tid)); - } else { - /* - * do_pass_accept_req is still running and will - * eventually take care of this tid. - */ - } - INP_WUNLOCK(synqe->lctx->inp); -#endif + /* + * do_pass_establish must have run before do_peer_close and if + * this is still a synqe instead of a toepcb then the connection + * must be getting aborted. + */ + MPASS(toep->flags & TPF_ABORT_SHUTDOWN); CTR4(KTR_CXGBE, "%s: tid %u, synqe %p (0x%x)", __func__, tid, toep, toep->flags); return (0); @@ -1568,22 +1555,12 @@ do_rx_data(struct sge_iq *iq, const struct rss_header uint32_t ddp_placed = 0; if (__predict_false(toep->flags & TPF_SYNQE)) { -#ifdef INVARIANTS - struct synq_entry *synqe = (void *)toep; - - INP_WLOCK(synqe->lctx->inp); - if (synqe->flags & TPF_SYNQE_HAS_L2TE) { - KASSERT(synqe->flags & TPF_ABORT_SHUTDOWN, - ("%s: listen socket closed but tid %u not aborted.", - __func__, tid)); - } else { - /* - * do_pass_accept_req is still running and will - * eventually take care of this tid. - */ - } - INP_WUNLOCK(synqe->lctx->inp); -#endif + /* + * do_pass_establish must have run before do_rx_data and if this + * is still a synqe instead of a toepcb then the connection must + * be getting aborted. + */ + MPASS(toep->flags & TPF_ABORT_SHUTDOWN); CTR4(KTR_CXGBE, "%s: tid %u, synqe %p (0x%x)", __func__, tid, toep, toep->flags); m_freem(m); Modified: stable/12/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_listen.c Wed Mar 27 21:22:59 2019 (r345604) +++ stable/12/sys/dev/cxgbe/tom/t4_listen.c Wed Mar 27 21:29:45 2019 (r345605) @@ -87,9 +87,6 @@ static struct listen_ctx *listen_hash_find(struct adap static struct listen_ctx *listen_hash_del(struct adapter *, struct inpcb *); static struct inpcb *release_lctx(struct adapter *, struct listen_ctx *); -static inline void save_qids_in_mbuf(struct mbuf *, struct vi_info *, - struct offload_settings *); -static inline void get_qids_from_mbuf(struct mbuf *m, int *, int *); static void send_reset_synqe(struct toedev *, struct synq_entry *); static int @@ -223,7 +220,6 @@ alloc_lctx(struct adapter *sc, struct inpcb *inp, stru lctx->ctrlq = &sc->sge.ctrlq[vi->pi->port_id]; lctx->ofld_rxq = &sc->sge.ofld_rxq[vi->first_ofld_rxq]; refcount_init(&lctx->refcount, 1); - TAILQ_INIT(&lctx->synq); lctx->inp = inp; lctx->vnet = inp->inp_socket->so_vnet; @@ -241,8 +237,6 @@ free_lctx(struct adapter *sc, struct listen_ctx *lctx) INP_WLOCK_ASSERT(inp); KASSERT(lctx->refcount == 0, ("%s: refcount %d", __func__, lctx->refcount)); - KASSERT(TAILQ_EMPTY(&lctx->synq), - ("%s: synq not empty.", __func__)); KASSERT(lctx->stid >= 0, ("%s: bad stid %d.", __func__, lctx->stid)); CTR4(KTR_CXGBE, "%s: stid %u, lctx %p, inp %p", @@ -358,7 +352,7 @@ send_reset_synqe(struct toedev *tod, struct synq_entry struct wrqe *wr; struct fw_flowc_wr *flowc; struct cpl_abort_req *req; - int txqid, rxqid, flowclen; + int flowclen; struct sge_wrq *ofld_txq; struct sge_ofld_rxq *ofld_rxq; const int nparams = 6; @@ -374,9 +368,8 @@ send_reset_synqe(struct toedev *tod, struct synq_entry return; /* abort already in progress */ synqe->flags |= TPF_ABORT_SHUTDOWN; - get_qids_from_mbuf(m, &txqid, &rxqid); - ofld_txq = &sc->sge.ofld_txq[txqid]; - ofld_rxq = &sc->sge.ofld_rxq[rxqid]; + ofld_txq = &sc->sge.ofld_txq[synqe->txqid]; + ofld_rxq = &sc->sge.ofld_rxq[synqe->rxqid]; /* The wrqe will have two WRs - a flowc followed by an abort_req */ flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); @@ -606,7 +599,6 @@ t4_listen_stop(struct toedev *tod, struct tcpcb *tp) struct listen_ctx *lctx; struct adapter *sc = tod->tod_softc; struct inpcb *inp = tp->t_inpcb; - struct synq_entry *synqe; INP_WLOCK_ASSERT(inp); @@ -622,25 +614,33 @@ t4_listen_stop(struct toedev *tod, struct tcpcb *tp) * arrive and clean up when it does. */ if (lctx->flags & LCTX_RPL_PENDING) { - KASSERT(TAILQ_EMPTY(&lctx->synq), - ("%s: synq not empty.", __func__)); return (EINPROGRESS); } - /* - * The host stack will abort all the connections on the listening - * socket's so_comp. It doesn't know about the connections on the synq - * so we need to take care of those. - */ - TAILQ_FOREACH(synqe, &lctx->synq, link) { - if (synqe->flags & TPF_SYNQE_HAS_L2TE) - send_reset_synqe(tod, synqe); - } - destroy_server(sc, lctx); return (0); } +static inline struct synq_entry * +alloc_synqe(struct adapter *sc __unused, struct listen_ctx *lctx, int flags) +{ + struct synq_entry *synqe; + + INP_WLOCK_ASSERT(lctx->inp); + MPASS(flags == M_WAITOK || flags == M_NOWAIT); + + synqe = malloc(sizeof(*synqe), M_CXGBE, flags); + if (__predict_true(synqe != NULL)) { + synqe->flags = TPF_SYNQE; + refcount_init(&synqe->refcnt, 1); + synqe->lctx = lctx; + hold_lctx(lctx); /* Every synqe has a ref on its lctx. */ + synqe->syn = NULL; + } + + return (synqe); +} + static inline void hold_synqe(struct synq_entry *synqe) { @@ -648,17 +648,25 @@ hold_synqe(struct synq_entry *synqe) refcount_acquire(&synqe->refcnt); } -static inline void -release_synqe(struct synq_entry *synqe) +static inline struct inpcb * +release_synqe(struct adapter *sc, struct synq_entry *synqe) { + struct inpcb *inp; - if (refcount_release(&synqe->refcnt)) { - int needfree = synqe->flags & TPF_SYNQE_NEEDFREE; + MPASS(synqe->flags & TPF_SYNQE); + MPASS(synqe->lctx != NULL); + inp = synqe->lctx->inp; + MPASS(inp != NULL); + INP_WLOCK_ASSERT(inp); + + if (refcount_release(&synqe->refcnt)) { + inp = release_lctx(sc, synqe->lctx); m_freem(synqe->syn); - if (needfree) - free(synqe, M_CXGBE); + free(synqe, M_CXGBE); } + + return (inp); } void @@ -670,51 +678,45 @@ t4_syncache_added(struct toedev *tod __unused, void *a } void -t4_syncache_removed(struct toedev *tod __unused, void *arg) +t4_syncache_removed(struct toedev *tod, void *arg) { + struct adapter *sc = tod->tod_softc; struct synq_entry *synqe = arg; + struct inpcb *inp = synqe->lctx->inp; - release_synqe(synqe); + /* + * XXX: this is a LOR but harmless when running from the softclock. + */ + INP_WLOCK(inp); + inp = release_synqe(sc, synqe); + if (inp != NULL) + INP_WUNLOCK(inp); } int t4_syncache_respond(struct toedev *tod, void *arg, struct mbuf *m) { - struct adapter *sc = tod->tod_softc; struct synq_entry *synqe = arg; - struct wrqe *wr; - struct l2t_entry *e; - struct tcpopt to; - struct ip *ip = mtod(m, struct ip *); - struct tcphdr *th; - wr = (struct wrqe *)atomic_readandclear_ptr(&synqe->wr); - if (wr == NULL) { - m_freem(m); - return (EALREADY); - } + if (atomic_fetchadd_int(&synqe->ok_to_respond, 1) == 0) { + struct tcpopt to; + struct ip *ip = mtod(m, struct ip *); + struct tcphdr *th; - if (ip->ip_v == IPVERSION) - th = (void *)(ip + 1); - else - th = (void *)((struct ip6_hdr *)ip + 1); - bzero(&to, sizeof(to)); - tcp_dooptions(&to, (void *)(th + 1), (th->th_off << 2) - sizeof(*th), - TO_SYN); + if (ip->ip_v == IPVERSION) + th = (void *)(ip + 1); + else + th = (void *)((struct ip6_hdr *)ip + 1); + bzero(&to, sizeof(to)); + tcp_dooptions(&to, (void *)(th + 1), + (th->th_off << 2) - sizeof(*th), TO_SYN); - /* save these for later */ - synqe->iss = be32toh(th->th_seq); - synqe->ts = to.to_tsval; - - if (chip_id(sc) >= CHELSIO_T5) { - struct cpl_t5_pass_accept_rpl *rpl5 = wrtod(wr); - - rpl5->iss = th->th_seq; + /* save these for later */ + synqe->iss = be32toh(th->th_seq); + synqe->irs = be32toh(th->th_ack) - 1; + synqe->ts = to.to_tsval; } - e = &sc->l2t->l2tab[synqe->l2e_idx]; - t4_l2t_send(sc, wr, e); - m_freem(m); /* don't need this any more */ return (0); } @@ -834,23 +836,29 @@ done_with_synqe(struct adapter *sc, struct synq_entry { struct listen_ctx *lctx = synqe->lctx; struct inpcb *inp = lctx->inp; - struct vi_info *vi = synqe->syn->m_pkthdr.rcvif->if_softc; struct l2t_entry *e = &sc->l2t->l2tab[synqe->l2e_idx]; int ntids; INP_WLOCK_ASSERT(inp); ntids = inp->inp_vflag & INP_IPV6 ? 2 : 1; - TAILQ_REMOVE(&lctx->synq, synqe, link); - inp = release_lctx(sc, lctx); - if (inp) - INP_WUNLOCK(inp); remove_tid(sc, synqe->tid, ntids); - release_tid(sc, synqe->tid, &sc->sge.ctrlq[vi->pi->port_id]); + release_tid(sc, synqe->tid, lctx->ctrlq); t4_l2t_release(e); - release_synqe(synqe); /* removed from synq list */ + inp = release_synqe(sc, synqe); + if (inp) + INP_WUNLOCK(inp); } +void +synack_failure_cleanup(struct adapter *sc, int tid) +{ + struct synq_entry *synqe = lookup_tid(sc, tid); + + INP_WLOCK(synqe->lctx->inp); + done_with_synqe(sc, synqe); +} + int do_abort_req_synqe(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) @@ -861,7 +869,6 @@ do_abort_req_synqe(struct sge_iq *iq, const struct rss struct synq_entry *synqe = lookup_tid(sc, tid); struct listen_ctx *lctx = synqe->lctx; struct inpcb *inp = lctx->inp; - int txqid; struct sge_wrq *ofld_txq; #ifdef INVARIANTS unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl))); @@ -880,8 +887,7 @@ do_abort_req_synqe(struct sge_iq *iq, const struct rss INP_WLOCK(inp); - get_qids_from_mbuf(synqe->syn, &txqid, NULL); - ofld_txq = &sc->sge.ofld_txq[txqid]; + ofld_txq = &sc->sge.ofld_txq[synqe->txqid]; /* * If we'd initiated an abort earlier the reply to it is responsible for @@ -941,23 +947,23 @@ t4_offload_socket(struct toedev *tod, void *arg, struc #ifdef INVARIANTS struct inpcb *inp = sotoinpcb(so); #endif - struct cpl_pass_establish *cpl = mtod(synqe->syn, void *); - struct toepcb *toep = *(struct toepcb **)(cpl + 1); + struct toepcb *toep = synqe->toep; INP_INFO_RLOCK_ASSERT(&V_tcbinfo); /* prevents bad race with accept() */ INP_WLOCK_ASSERT(inp); KASSERT(synqe->flags & TPF_SYNQE, ("%s: %p not a synq_entry?", __func__, arg)); + MPASS(toep->tid == synqe->tid); offload_socket(so, toep); - make_established(toep, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt); + make_established(toep, synqe->iss, synqe->irs, synqe->tcp_opt); toep->flags |= TPF_CPL_PENDING; update_tid(sc, synqe->tid, toep); synqe->flags |= TPF_SYNQE_EXPANDED; } static inline void -save_qids_in_mbuf(struct mbuf *m, struct vi_info *vi, +save_qids_in_synqe(struct synq_entry *synqe, struct vi_info *vi, struct offload_settings *s) { uint32_t txqid, rxqid; @@ -974,43 +980,10 @@ save_qids_in_mbuf(struct mbuf *m, struct vi_info *vi, rxqid = arc4random() % vi->nofldrxq; rxqid += vi->first_ofld_rxq; - m->m_pkthdr.flowid = (txqid << 16) | (rxqid & 0xffff); + synqe->txqid = txqid; + synqe->rxqid = rxqid; } -static inline void -get_qids_from_mbuf(struct mbuf *m, int *txqid, int *rxqid) -{ - - if (txqid) - *txqid = m->m_pkthdr.flowid >> 16; - if (rxqid) - *rxqid = m->m_pkthdr.flowid & 0xffff; -} - -/* - * Use the trailing space in the mbuf in which the PASS_ACCEPT_REQ arrived to - * store some state temporarily. - */ -static struct synq_entry * -mbuf_to_synqe(struct mbuf *m) -{ - int len = roundup2(sizeof (struct synq_entry), 8); - int tspace = M_TRAILINGSPACE(m); - struct synq_entry *synqe = NULL; - - if (tspace < len) { - synqe = malloc(sizeof(*synqe), M_CXGBE, M_NOWAIT); - if (synqe == NULL) - return (NULL); - synqe->flags = TPF_SYNQE | TPF_SYNQE_NEEDFREE; - } else { - synqe = (void *)(m->m_data + m->m_len + tspace - len); - synqe->flags = TPF_SYNQE; - } - - return (synqe); -} - static void t4opt_to_tcpopt(const struct tcp_options *t4opt, struct tcpopt *to) { @@ -1210,7 +1183,39 @@ get_l2te_for_nexthop(struct port_info *pi, struct ifne return (e); } -#define REJECT_PASS_ACCEPT() do { \ +static int +send_synack(struct adapter *sc, struct synq_entry *synqe, uint64_t opt0, + uint32_t opt2, int tid) +{ + struct wrqe *wr; + struct cpl_pass_accept_rpl *rpl; + struct l2t_entry *e = &sc->l2t->l2tab[synqe->l2e_idx]; + + wr = alloc_wrqe(is_t4(sc) ? sizeof(struct cpl_pass_accept_rpl) : + sizeof(struct cpl_t5_pass_accept_rpl), &sc->sge.ctrlq[0]); + if (wr == NULL) + return (ENOMEM); + rpl = wrtod(wr); + + if (is_t4(sc)) + INIT_TP_WR_MIT_CPL(rpl, CPL_PASS_ACCEPT_RPL, tid); + else { + struct cpl_t5_pass_accept_rpl *rpl5 = (void *)rpl; + + INIT_TP_WR_MIT_CPL(rpl5, CPL_PASS_ACCEPT_RPL, tid); + rpl5->iss = htobe32(synqe->iss); + } + rpl->opt0 = opt0; + rpl->opt2 = opt2; + + return (t4_l2t_send(sc, wr, e)); +} + +#define REJECT_PASS_ACCEPT_REQ(tunnel) do { \ + if (!tunnel) { \ + m_freem(m); \ + m = NULL; \ + } \ reject_reason = __LINE__; \ goto reject; \ } while (0) @@ -1234,8 +1239,6 @@ do_pass_accept_req(struct sge_iq *iq, const struct rss struct adapter *sc = iq->adapter; struct toedev *tod; const struct cpl_pass_accept_req *cpl = mtod(m, const void *); - struct cpl_pass_accept_rpl *rpl; - struct wrqe *wr; unsigned int stid = G_PASS_OPEN_TID(be32toh(cpl->tos_stid)); unsigned int tid = GET_TID(cpl); struct listen_ctx *lctx = lookup_stid(sc, stid); @@ -1248,11 +1251,9 @@ do_pass_accept_req(struct sge_iq *iq, const struct rss struct vi_info *vi; struct ifnet *hw_ifp, *ifp; struct l2t_entry *e = NULL; - int rscale, mtu_idx, rx_credits, rxqid, ulp_mode; struct synq_entry *synqe = NULL; int reject_reason, v, ntids; - uint16_t vid; - u_int wnd; + uint16_t vid, l2info; struct epoch_tracker et; #ifdef INVARIANTS unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl))); @@ -1266,36 +1267,35 @@ do_pass_accept_req(struct sge_iq *iq, const struct rss CTR4(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p", __func__, stid, tid, lctx); - pass_accept_req_to_protohdrs(sc, m, &inc, &th); - t4opt_to_tcpopt(&cpl->tcpopt, &to); + CURVNET_SET(lctx->vnet); /* before any potential REJECT */ - pi = sc->port[G_SYN_INTF(be16toh(cpl->l2info))]; - - CURVNET_SET(lctx->vnet); - /* - * Use the MAC index to lookup the associated VI. If this SYN - * didn't match a perfect MAC filter, punt. + * Use the MAC index to lookup the associated VI. If this SYN didn't + * match a perfect MAC filter, punt. */ - if (!(be16toh(cpl->l2info) & F_SYN_XACT_MATCH)) { - m_freem(m); - m = NULL; - REJECT_PASS_ACCEPT(); + l2info = be16toh(cpl->l2info); + pi = sc->port[G_SYN_INTF(l2info)]; + if (!(l2info & F_SYN_XACT_MATCH)) { + REJECT_PASS_ACCEPT_REQ(false); } for_each_vi(pi, v, vi) { - if (vi->xact_addr_filt == G_SYN_MAC_IDX(be16toh(cpl->l2info))) + if (vi->xact_addr_filt == G_SYN_MAC_IDX(l2info)) goto found; } - m_freem(m); - m = NULL; - REJECT_PASS_ACCEPT(); - + REJECT_PASS_ACCEPT_REQ(false); found: - hw_ifp = vi->ifp; /* the (v)cxgbeX ifnet */ + hw_ifp = vi->ifp; /* the cxgbe ifnet */ m->m_pkthdr.rcvif = hw_ifp; tod = TOEDEV(hw_ifp); /* + * Don't offload if the peer requested a TCP option that's not known to + * the silicon. Send the SYN to the kernel instead. + */ + if (__predict_false(cpl->tcpopt.unknown)) + REJECT_PASS_ACCEPT_REQ(true); + + /* * Figure out if there is a pseudo interface (vlan, lagg, etc.) * involved. Don't offload if the SYN had a VLAN tag and the vid * doesn't match anything on this interface. @@ -1306,75 +1306,57 @@ found: if (vid != 0xfff && vid != 0) { ifp = VLAN_DEVAT(hw_ifp, vid); if (ifp == NULL) - REJECT_PASS_ACCEPT(); + REJECT_PASS_ACCEPT_REQ(true); } else ifp = hw_ifp; /* - * Don't offload if the peer requested a TCP option that's not known to - * the silicon. + * Don't offload if the ifnet that the SYN came in on is not in the same + * vnet as the listening socket. */ - if (cpl->tcpopt.unknown) - REJECT_PASS_ACCEPT(); + if (lctx->vnet != ifp->if_vnet) + REJECT_PASS_ACCEPT_REQ(true); + pass_accept_req_to_protohdrs(sc, m, &inc, &th); if (inc.inc_flags & INC_ISIPV6) { /* Don't offload if the ifcap isn't enabled */ if ((ifp->if_capenable & IFCAP_TOE6) == 0) - REJECT_PASS_ACCEPT(); + REJECT_PASS_ACCEPT_REQ(true); /* * SYN must be directed to an IP6 address on this ifnet. This * is more restrictive than in6_localip. */ if (!in6_ifhasaddr(ifp, &inc.inc6_laddr)) - REJECT_PASS_ACCEPT(); + REJECT_PASS_ACCEPT_REQ(true); ntids = 2; } else { /* Don't offload if the ifcap isn't enabled */ if ((ifp->if_capenable & IFCAP_TOE4) == 0) - REJECT_PASS_ACCEPT(); + REJECT_PASS_ACCEPT_REQ(true); /* * SYN must be directed to an IP address on this ifnet. This * is more restrictive than in_localip. */ if (!in_ifhasaddr(ifp, inc.inc_laddr)) - REJECT_PASS_ACCEPT(); + REJECT_PASS_ACCEPT_REQ(true); ntids = 1; } - /* - * Don't offload if the ifnet that the SYN came in on is not in the same - * vnet as the listening socket. - */ - if (lctx->vnet != ifp->if_vnet) - REJECT_PASS_ACCEPT(); - e = get_l2te_for_nexthop(pi, ifp, &inc); if (e == NULL) - REJECT_PASS_ACCEPT(); + REJECT_PASS_ACCEPT_REQ(true); - synqe = mbuf_to_synqe(m); - if (synqe == NULL) - REJECT_PASS_ACCEPT(); - - wr = alloc_wrqe(is_t4(sc) ? sizeof(struct cpl_pass_accept_rpl) : - sizeof(struct cpl_t5_pass_accept_rpl), &sc->sge.ctrlq[pi->port_id]); - if (wr == NULL) - REJECT_PASS_ACCEPT(); - rpl = wrtod(wr); - - INP_INFO_RLOCK_ET(&V_tcbinfo, et); /* for 4-tuple check */ - /* Don't offload if the 4-tuple is already in use */ + INP_INFO_RLOCK_ET(&V_tcbinfo, et); /* for 4-tuple check */ if (toe_4tuple_check(&inc, &th, ifp) != 0) { INP_INFO_RUNLOCK_ET(&V_tcbinfo, et); - free(wr, M_CXGBE); - REJECT_PASS_ACCEPT(); + REJECT_PASS_ACCEPT_REQ(false); } INP_INFO_RUNLOCK_ET(&V_tcbinfo, et); @@ -1383,14 +1365,8 @@ found: /* Don't offload if the listening socket has closed */ if (__predict_false(inp->inp_flags & INP_DROPPED)) { - /* - * The listening socket has closed. The reply from the TOE to - * our CPL_CLOSE_LISTSRV_REQ will ultimately release all - * resources tied to this listen context. - */ INP_WUNLOCK(inp); - free(wr, M_CXGBE); - REJECT_PASS_ACCEPT(); + REJECT_PASS_ACCEPT_REQ(false); } so = inp->inp_socket; rw_rlock(&sc->policy_lock); @@ -1399,119 +1375,65 @@ found: rw_runlock(&sc->policy_lock); if (!settings.offload) { INP_WUNLOCK(inp); - free(wr, M_CXGBE); - REJECT_PASS_ACCEPT(); + REJECT_PASS_ACCEPT_REQ(true); /* Rejected by COP. */ } - mtu_idx = find_best_mtu_idx(sc, &inc, &settings); - rscale = cpl->tcpopt.wsf && V_tcp_do_rfc1323 ? select_rcv_wscale() : 0; - /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ - wnd = max(so->sol_sbrcv_hiwat, MIN_RCV_WND); - wnd = min(wnd, MAX_RCV_WND); - rx_credits = min(wnd >> 10, M_RCV_BUFSIZ); - - save_qids_in_mbuf(m, vi, &settings); - get_qids_from_mbuf(m, NULL, &rxqid); - - if (is_t4(sc)) - INIT_TP_WR_MIT_CPL(rpl, CPL_PASS_ACCEPT_RPL, tid); - else { - struct cpl_t5_pass_accept_rpl *rpl5 = (void *)rpl; - - INIT_TP_WR_MIT_CPL(rpl5, CPL_PASS_ACCEPT_RPL, tid); + synqe = alloc_synqe(sc, lctx, M_NOWAIT); + if (synqe == NULL) { + INP_WUNLOCK(inp); + REJECT_PASS_ACCEPT_REQ(true); } - ulp_mode = select_ulp_mode(so, sc, &settings); - switch (ulp_mode) { - case ULP_MODE_TCPDDP: - synqe->flags |= TPF_SYNQE_TCPDDP; - break; - case ULP_MODE_TLS: - synqe->flags |= TPF_SYNQE_TLS; - break; - } - rpl->opt0 = calc_opt0(so, vi, e, mtu_idx, rscale, rx_credits, ulp_mode, - &settings); - rpl->opt2 = calc_opt2p(sc, pi, rxqid, &cpl->tcpopt, &th, ulp_mode, - CC_ALGO(intotcpcb(inp)), &settings); + atomic_store_int(&synqe->ok_to_respond, 0); - synqe->tid = tid; - synqe->lctx = lctx; - synqe->syn = m; - m = NULL; - refcount_init(&synqe->refcnt, 1); /* 1 means extra hold */ - synqe->l2e_idx = e->idx; - synqe->rcv_bufsize = rx_credits; - atomic_store_rel_ptr(&synqe->wr, (uintptr_t)wr); - - insert_tid(sc, tid, synqe, ntids); - TAILQ_INSERT_TAIL(&lctx->synq, synqe, link); - hold_synqe(synqe); /* hold for the duration it's in the synq */ - hold_lctx(lctx); /* A synqe on the list has a ref on its lctx */ - /* * If all goes well t4_syncache_respond will get called during * syncache_add. Note that syncache_add releases the pcb lock. */ + t4opt_to_tcpopt(&cpl->tcpopt, &to); toe_syncache_add(&inc, &to, &th, inp, tod, synqe); - INP_UNLOCK_ASSERT(inp); /* ok to assert, we have a ref on the inp */ - /* - * If we replied during syncache_add (synqe->wr has been consumed), - * good. Otherwise, set it to 0 so that further syncache_respond - * attempts by the kernel will be ignored. - */ - if (atomic_cmpset_ptr(&synqe->wr, (uintptr_t)wr, 0)) { + if (atomic_load_int(&synqe->ok_to_respond) > 0) { + uint64_t opt0; + uint32_t opt2; + u_int wnd; + int rscale, mtu_idx, rx_credits; - /* - * syncache may or may not have a hold on the synqe, which may - * or may not be stashed in the original SYN mbuf passed to us. - * Just copy it over instead of dealing with all possibilities. - */ - m = m_dup(synqe->syn, M_NOWAIT); - if (m) - m->m_pkthdr.rcvif = hw_ifp; + mtu_idx = find_best_mtu_idx(sc, &inc, &settings); + rscale = cpl->tcpopt.wsf && V_tcp_do_rfc1323 ? select_rcv_wscale() : 0; + /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ + wnd = max(so->sol_sbrcv_hiwat, MIN_RCV_WND); + wnd = min(wnd, MAX_RCV_WND); + rx_credits = min(wnd >> 10, M_RCV_BUFSIZ); - remove_tid(sc, synqe->tid, ntids); - free(wr, M_CXGBE); + save_qids_in_synqe(synqe, vi, &settings); + synqe->ulp_mode = select_ulp_mode(so, sc, &settings); - /* Yank the synqe out of the lctx synq. */ - INP_WLOCK(inp); - TAILQ_REMOVE(&lctx->synq, synqe, link); - release_synqe(synqe); /* removed from synq list */ - inp = release_lctx(sc, lctx); - if (inp) - INP_WUNLOCK(inp); + opt0 = calc_opt0(so, vi, e, mtu_idx, rscale, rx_credits, + synqe->ulp_mode, &settings); + opt2 = calc_opt2p(sc, pi, synqe->rxqid, &cpl->tcpopt, &th, + synqe->ulp_mode, CC_ALGO(intotcpcb(inp)), &settings); - release_synqe(synqe); /* extra hold */ - REJECT_PASS_ACCEPT(); - } + insert_tid(sc, tid, synqe, ntids); + synqe->tid = tid; + synqe->l2e_idx = e->idx; + synqe->rcv_bufsize = rx_credits; + synqe->syn = m; + m = NULL; - CTR6(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK mode %d", - __func__, stid, tid, lctx, synqe, ulp_mode); + if (send_synack(sc, synqe, opt0, opt2, tid) != 0) { + remove_tid(sc, tid, ntids); + m = synqe->syn; + synqe->syn = NULL; + REJECT_PASS_ACCEPT_REQ(true); + } - INP_WLOCK(inp); - synqe->flags |= TPF_SYNQE_HAS_L2TE; - if (__predict_false(inp->inp_flags & INP_DROPPED)) { - /* - * Listening socket closed but tod_listen_stop did not abort - * this tid because there was no L2T entry for the tid at that - * time. Abort it now. The reply to the abort will clean up. - */ CTR6(KTR_CXGBE, - "%s: stid %u, tid %u, lctx %p, synqe %p (0x%x), ABORT", - __func__, stid, tid, lctx, synqe, synqe->flags); - if (!(synqe->flags & TPF_SYNQE_EXPANDED)) - send_reset_synqe(tod, synqe); - INP_WUNLOCK(inp); - CURVNET_RESTORE(); + "%s: stid %u, tid %u, lctx %p, synqe %p, mode %d, SYNACK", + __func__, stid, tid, lctx, synqe, synqe->ulp_mode); + } else + REJECT_PASS_ACCEPT_REQ(false); - release_synqe(synqe); /* extra hold */ - return (__LINE__); - } - INP_WUNLOCK(inp); CURVNET_RESTORE(); - - release_synqe(synqe); /* extra hold */ return (0); reject: CURVNET_RESTORE(); @@ -1521,8 +1443,19 @@ reject: if (e) t4_l2t_release(e); release_tid(sc, tid, lctx->ctrlq); + if (synqe) { + inp = synqe->lctx->inp; + INP_WLOCK(inp); + inp = release_synqe(sc, synqe); + if (inp) + INP_WUNLOCK(inp); + } - if (__predict_true(m != NULL)) { + if (m) { + /* + * The connection request hit a TOE listener but is being passed + * on to the kernel sw stack instead of getting offloaded. + */ m_adj(m, sizeof(*cpl)); m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); @@ -1575,7 +1508,6 @@ do_pass_establish(struct sge_iq *iq, const struct rss_ struct in_conninfo inc; struct toepcb *toep; struct epoch_tracker et; - u_int txqid, rxqid; #ifdef INVARIANTS unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl))); #endif @@ -1595,73 +1527,46 @@ do_pass_establish(struct sge_iq *iq, const struct rss_ "%s: stid %u, tid %u, synqe %p (0x%x), inp_flags 0x%x", __func__, stid, tid, synqe, synqe->flags, inp->inp_flags); - if (__predict_false(inp->inp_flags & INP_DROPPED)) { - - if (synqe->flags & TPF_SYNQE_HAS_L2TE) { - KASSERT(synqe->flags & TPF_ABORT_SHUTDOWN, - ("%s: listen socket closed but tid %u not aborted.", - __func__, tid)); - } - - INP_WUNLOCK(inp); - INP_INFO_RUNLOCK_ET(&V_tcbinfo, et); - CURVNET_RESTORE(); - return (0); - } - ifp = synqe->syn->m_pkthdr.rcvif; vi = ifp->if_softc; KASSERT(vi->pi->adapter == sc, ("%s: vi %p, sc %p mismatch", __func__, vi, sc)); - get_qids_from_mbuf(synqe->syn, &txqid, &rxqid); - KASSERT(rxqid == iq_to_ofld_rxq(iq) - &sc->sge.ofld_rxq[0], - ("%s: CPL arrived on unexpected rxq. %d %d", __func__, rxqid, - (int)(iq_to_ofld_rxq(iq) - &sc->sge.ofld_rxq[0]))); - - toep = alloc_toepcb(vi, txqid, rxqid, M_NOWAIT); - if (toep == NULL) { + if (__predict_false(inp->inp_flags & INP_DROPPED)) { reset: - /* - * The reply to this abort will perform final cleanup. There is - * no need to check for HAS_L2TE here. We can be here only if - * we responded to the PASS_ACCEPT_REQ, and our response had the - * L2T idx. - */ send_reset_synqe(TOEDEV(ifp), synqe); INP_WUNLOCK(inp); INP_INFO_RUNLOCK_ET(&V_tcbinfo, et); CURVNET_RESTORE(); return (0); } + + KASSERT(synqe->rxqid == iq_to_ofld_rxq(iq) - &sc->sge.ofld_rxq[0], + ("%s: CPL arrived on unexpected rxq. %d %d", __func__, + synqe->rxqid, (int)(iq_to_ofld_rxq(iq) - &sc->sge.ofld_rxq[0]))); + + toep = alloc_toepcb(vi, synqe->txqid, synqe->rxqid, M_NOWAIT); + if (toep == NULL) + goto reset; toep->tid = tid; toep->l2te = &sc->l2t->l2tab[synqe->l2e_idx]; - if (synqe->flags & TPF_SYNQE_TCPDDP) - set_ulp_mode(toep, ULP_MODE_TCPDDP); - else if (synqe->flags & TPF_SYNQE_TLS) - set_ulp_mode(toep, ULP_MODE_TLS); - else - set_ulp_mode(toep, ULP_MODE_NONE); + toep->vnet = lctx->vnet; + set_ulp_mode(toep, synqe->ulp_mode); /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ toep->rx_credits = synqe->rcv_bufsize; - so = inp->inp_socket; - KASSERT(so != NULL, ("%s: socket is NULL", __func__)); + MPASS(be32toh(cpl->snd_isn) - 1 == synqe->iss); + MPASS(be32toh(cpl->rcv_isn) - 1 == synqe->irs); + synqe->tcp_opt = cpl->tcp_opt; + synqe->toep = toep; /* Come up with something that syncache_expand should be ok with. */ synqe_to_protohdrs(sc, synqe, cpl, &inc, &th, &to); + if (inc.inc_flags & INC_ISIPV6) + toep->ce = t4_hold_lip(sc, &inc.inc6_laddr, lctx->ce); + so = inp->inp_socket; + KASSERT(so != NULL, ("%s: socket is NULL", __func__)); - /* - * No more need for anything in the mbuf that carried the - * CPL_PASS_ACCEPT_REQ. Drop the CPL_PASS_ESTABLISH and toep pointer - * there. XXX: bad form but I don't want to increase the size of synqe. - */ - m = synqe->syn; - KASSERT(sizeof(*cpl) + sizeof(toep) <= m->m_len, - ("%s: no room in mbuf %p (m_len %d)", __func__, m, m->m_len)); - bcopy(cpl, mtod(m, void *), sizeof(*cpl)); - *(struct toepcb **)(mtod(m, struct cpl_pass_establish *) + 1) = toep; - if (!toe_syncache_expand(&inc, &to, &th, &so) || so == NULL) { free_toepcb(toep); goto reset; @@ -1671,14 +1576,9 @@ reset: new_inp = sotoinpcb(so); INP_WLOCK_ASSERT(new_inp); MPASS(so->so_vnet == lctx->vnet); - toep->vnet = lctx->vnet; - if (inc.inc_flags & INC_ISIPV6) - toep->ce = t4_hold_lip(sc, &inc.inc6_laddr, lctx->ce); /* - * This is for the unlikely case where the syncache entry that we added - * has been evicted from the syncache, but the syncache_expand above - * works because of syncookies. + * This is for expansion from syncookies. * * XXX: we've held the tcbinfo lock throughout so there's no risk of * anyone accept'ing a connection before we've installed our hooks, but @@ -1692,13 +1592,11 @@ reset: INP_WUNLOCK(new_inp); /* Done with the synqe */ - TAILQ_REMOVE(&lctx->synq, synqe, link); - inp = release_lctx(sc, lctx); + inp = release_synqe(sc, synqe); if (inp != NULL) INP_WUNLOCK(inp); INP_INFO_RUNLOCK_ET(&V_tcbinfo, et); CURVNET_RESTORE(); - release_synqe(synqe); return (0); } Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.c Wed Mar 27 21:22:59 2019 (r345604) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.c Wed Mar 27 21:29:45 2019 (r345605) @@ -1020,9 +1020,9 @@ reclaim_wr_resources(void *arg, int count) struct tom_data *td = arg; STAILQ_HEAD(, wrqe) twr_list = STAILQ_HEAD_INITIALIZER(twr_list); struct cpl_act_open_req *cpl; - u_int opcode, atid; + u_int opcode, atid, tid; struct wrqe *wr; - struct adapter *sc; + struct adapter *sc = td_adapter(td); mtx_lock(&td->unsent_wr_lock); STAILQ_SWAP(&td->unsent_wr_list, &twr_list, wrqe); @@ -1038,10 +1038,14 @@ reclaim_wr_resources(void *arg, int count) case CPL_ACT_OPEN_REQ: case CPL_ACT_OPEN_REQ6: atid = G_TID_TID(be32toh(OPCODE_TID(cpl))); - sc = td_adapter(td); - CTR2(KTR_CXGBE, "%s: atid %u ", __func__, atid); act_open_failure_cleanup(sc, atid, EHOSTUNREACH); + free(wr, M_CXGBE); + break; + case CPL_PASS_ACCEPT_RPL: + tid = GET_TID(cpl); + CTR2(KTR_CXGBE, "%s: tid %u ", __func__, tid); + synack_failure_cleanup(sc, tid); free(wr, M_CXGBE); break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Mar 27 21:34:14 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3CAB155BB4D; Wed, 27 Mar 2019 21:34:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 99E6568085; Wed, 27 Mar 2019 21:34:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72A74D2D4; Wed, 27 Mar 2019 21:34:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLYD4n045643; Wed, 27 Mar 2019 21:34:13 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLYDsg045642; Wed, 27 Mar 2019 21:34:13 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272134.x2RLYDsg045642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 21:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345606 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 99E6568085 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.95)[-0.946,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:34:14 -0000 Author: np Date: Wed Mar 27 21:34:13 2019 New Revision: 345606 URL: https://svnweb.freebsd.org/changeset/base/345606 Log: MFC r342234: cxgbe(4): Do not issue mbox commands after t4_fw_bye. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_clip.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_clip.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_clip.c Wed Mar 27 21:29:45 2019 (r345605) +++ stable/12/sys/dev/cxgbe/t4_clip.c Wed Mar 27 21:34:13 2019 (r345606) @@ -325,7 +325,9 @@ t4_destroy_clip_table(struct adapter *sc) ("%s: CLIP entry %p still in use (%d)", __func__, ce, ce->refcount)); TAILQ_REMOVE(&sc->clip_table, ce, link); +#if 0 delete_lip(sc, &ce->lip); +#endif free(ce, M_CXGBE); } mtx_unlock(&sc->clip_table_lock); From owner-svn-src-stable@freebsd.org Wed Mar 27 21:38:19 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22616155BCD5; Wed, 27 Mar 2019 21:38:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 B3C596849E; Wed, 27 Mar 2019 21:38:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CF94D2D9; Wed, 27 Mar 2019 21:38:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLcIoA046233; Wed, 27 Mar 2019 21:38:18 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLcIQb046232; Wed, 27 Mar 2019 21:38:18 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272138.x2RLcIQb046232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 21:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345607 - stable/12/sys/dev/cxgbe/common X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/common X-SVN-Commit-Revision: 345607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B3C596849E 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_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:38:19 -0000 Author: np Date: Wed Mar 27 21:38:18 2019 New Revision: 345607 URL: https://svnweb.freebsd.org/changeset/base/345607 Log: MFC r342758: cxgbe(4): Clear FW_OK if the firmware reports an error. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/12/sys/dev/cxgbe/common/t4_hw.c Wed Mar 27 21:34:13 2019 (r345606) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Wed Mar 27 21:38:18 2019 (r345607) @@ -211,9 +211,11 @@ static void t4_report_fw_error(struct adapter *adap) u32 pcie_fw; pcie_fw = t4_read_reg(adap, A_PCIE_FW); - if (pcie_fw & F_PCIE_FW_ERR) + if (pcie_fw & F_PCIE_FW_ERR) { CH_ERR(adap, "Firmware reports adapter error: %s\n", reason[G_PCIE_FW_EVAL(pcie_fw)]); + adap->flags &= ~FW_OK; + } } /* From owner-svn-src-stable@freebsd.org Wed Mar 27 21:43:39 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1574155C073; Wed, 27 Mar 2019 21:43:39 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 71DB369D0C; Wed, 27 Mar 2019 21:43:39 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BE12D483; Wed, 27 Mar 2019 21:43:39 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLhdVc051340; Wed, 27 Mar 2019 21:43:39 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLhdV3051339; Wed, 27 Mar 2019 21:43:39 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272143.x2RLhdV3051339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 21:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345608 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 71DB369D0C 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.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:43:40 -0000 Author: np Date: Wed Mar 27 21:43:38 2019 New Revision: 345608 URL: https://svnweb.freebsd.org/changeset/base/345608 Log: MFC r342284: cxgbe(4): Make sure the rx queues start off with the correct timestamp settings on initialization. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 27 21:38:18 2019 (r345607) +++ stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 27 21:43:38 2019 (r345608) @@ -3367,6 +3367,8 @@ alloc_rxq(struct vi_info *vi, struct sge_rxq *rxq, int if (vi->ifp->if_capenable & IFCAP_LRO) rxq->iq.flags |= IQ_LRO_ENABLED; #endif + if (vi->ifp->if_capenable & IFCAP_HWRXTSTMP) + rxq->iq.flags |= IQ_RX_TIMESTAMP; rxq->ifp = vi->ifp; children = SYSCTL_CHILDREN(oid); From owner-svn-src-stable@freebsd.org Wed Mar 27 21:45:31 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34699155C18A; Wed, 27 Mar 2019 21:45:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 CA9A969EF5; Wed, 27 Mar 2019 21:45:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8C12D484; Wed, 27 Mar 2019 21:45:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLjUrA051497; Wed, 27 Mar 2019 21:45:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLjU4n051496; Wed, 27 Mar 2019 21:45:30 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272145.x2RLjU4n051496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 21:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345609 - stable/12/sys/dev/cxgbe/tom X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 345609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CA9A969EF5 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.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:45:31 -0000 Author: np Date: Wed Mar 27 21:45:30 2019 New Revision: 345609 URL: https://svnweb.freebsd.org/changeset/base/345609 Log: MFC r342356: Remove unused macros from t4_tom.h. Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.h Wed Mar 27 21:43:38 2019 (r345608) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.h Wed Mar 27 21:45:30 2019 (r345609) @@ -216,10 +216,6 @@ struct flowc_tx_params { unsigned int mss; }; -#define DDP_RETRY_WAIT 5 /* seconds to wait before re-enabling DDP */ -#define DDP_LOW_SCORE 1 -#define DDP_HIGH_SCORE 3 - /* * Compressed state for embryonic connections for a listener. */ From owner-svn-src-stable@freebsd.org Wed Mar 27 21:46:46 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 181F9155C273; Wed, 27 Mar 2019 21:46:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 AE5116A0CD; Wed, 27 Mar 2019 21:46:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8870ED485; Wed, 27 Mar 2019 21:46:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLkjjm051591; Wed, 27 Mar 2019 21:46:45 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLkjx6051590; Wed, 27 Mar 2019 21:46:45 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272146.x2RLkjx6051590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 21:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345610 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AE5116A0CD 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.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:46:46 -0000 Author: np Date: Wed Mar 27 21:46:45 2019 New Revision: 345610 URL: https://svnweb.freebsd.org/changeset/base/345610 Log: MFC r342954: cxgbe(4): Move some INTx specific code to a more appropriate place. Modified: stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 27 21:45:30 2019 (r345609) +++ stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 27 21:46:45 2019 (r345610) @@ -1375,6 +1375,9 @@ t4_intr_all(void *arg) MPASS(sc->intr_count == 1); + if (sc->intr_type == INTR_INTX) + t4_write_reg(sc, MYPF_REG(A_PCIE_PF_CLI), 0); + t4_intr_err(arg); t4_intr_evt(fwq); } @@ -1388,7 +1391,6 @@ t4_intr_err(void *arg) { struct adapter *sc = arg; - t4_write_reg(sc, MYPF_REG(A_PCIE_PF_CLI), 0); t4_slow_intr_handler(sc); } From owner-svn-src-stable@freebsd.org Wed Mar 27 21:50:10 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 635B0155C44D; Wed, 27 Mar 2019 21:50:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 EC7F86A39D; Wed, 27 Mar 2019 21:50:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F20D4D48C; Wed, 27 Mar 2019 21:50:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLo7kg051854; Wed, 27 Mar 2019 21:50:07 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLo72x051853; Wed, 27 Mar 2019 21:50:07 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272150.x2RLo72x051853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 21:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345612 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EC7F86A39D 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.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:50:10 -0000 Author: np Date: Wed Mar 27 21:50:07 2019 New Revision: 345612 URL: https://svnweb.freebsd.org/changeset/base/345612 Log: MFC r343233: cxgbe(4): Clear the reply-pending status of a hashfilter when the reply indicates an error. Also, do not remove it twice from the hf list in this case. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communicatons Modified: stable/12/sys/dev/cxgbe/t4_filter.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_filter.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_filter.c Wed Mar 27 21:50:01 2019 (r345611) +++ stable/12/sys/dev/cxgbe/t4_filter.c Wed Mar 27 21:50:07 2019 (r345612) @@ -1229,6 +1229,7 @@ t4_hashfilter_ao_rpl(struct sge_iq *iq, const struct r /* provide errno instead of tid to ioctl */ f->tid = act_open_rpl_status_to_errno(status); f->valid = 0; + f->pending = 0; if (act_open_has_tid(status)) release_tid(sc, GET_TID(cpl), &sc->sge.ctrlq[0]); free_filter_resources(f); @@ -1587,7 +1588,6 @@ set_hashfilter(struct adapter *sc, struct t4_filter *t f->locked = 0; t->idx = f->tid; } else { - remove_hf(sc, f); rc = f->tid; free(f, M_CXGBE); } From owner-svn-src-stable@freebsd.org Wed Mar 27 21:53:46 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A7D6155C9C3; Wed, 27 Mar 2019 21:53:46 +0000 (UTC) (envelope-from jilles@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 DDD8B6ADC5; Wed, 27 Mar 2019 21:53:45 +0000 (UTC) (envelope-from jilles@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 A114DD633; Wed, 27 Mar 2019 21:53:45 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLrjms057015; Wed, 27 Mar 2019 21:53:45 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLrifl057012; Wed, 27 Mar 2019 21:53:44 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903272153.x2RLrifl057012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 27 Mar 2019 21:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345613 - stable/12/bin/sh X-SVN-Group: stable-12 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/12/bin/sh X-SVN-Commit-Revision: 345613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DDD8B6ADC5 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.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:53:46 -0000 Author: jilles Date: Wed Mar 27 21:53:44 2019 New Revision: 345613 URL: https://svnweb.freebsd.org/changeset/base/345613 Log: MFC r344306: sh: Send normal output from bind builtin to stdout PR: 233343 Modified: stable/12/bin/sh/histedit.c stable/12/bin/sh/output.c stable/12/bin/sh/output.h Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/sh/histedit.c ============================================================================== --- stable/12/bin/sh/histedit.c Wed Mar 27 21:50:07 2019 (r345612) +++ stable/12/bin/sh/histedit.c Wed Mar 27 21:53:44 2019 (r345613) @@ -474,10 +474,31 @@ str_to_event(const char *str, int last) int bindcmd(int argc, char **argv) { + int ret; + FILE *old; + FILE *out; if (el == NULL) error("line editing is disabled"); - return (el_parse(el, argc, __DECONST(const char **, argv))); + + INTOFF; + + out = out1fp(); + if (out == NULL) + error("Out of space"); + + el_get(el, EL_GETFP, 1, &old); + el_set(el, EL_SETFP, 1, out); + + ret = el_parse(el, argc, __DECONST(const char **, argv)); + + el_set(el, EL_SETFP, 1, old); + + fclose(out); + + INTON; + + return ret; } #else Modified: stable/12/bin/sh/output.c ============================================================================== --- stable/12/bin/sh/output.c Wed Mar 27 21:50:07 2019 (r345612) +++ stable/12/bin/sh/output.c Wed Mar 27 21:53:44 2019 (r345613) @@ -340,6 +340,12 @@ doformat(struct output *dest, const char *f, va_list a } } +FILE * +out1fp(void) +{ + return fwopen(out1, doformat_wr); +} + /* * Version of write which resumes after a signal is caught. */ Modified: stable/12/bin/sh/output.h ============================================================================== --- stable/12/bin/sh/output.h Wed Mar 27 21:50:07 2019 (r345612) +++ stable/12/bin/sh/output.h Wed Mar 27 21:53:44 2019 (r345613) @@ -39,6 +39,7 @@ #include #include +#include struct output { char *nextc; @@ -75,6 +76,7 @@ void out1fmt(const char *, ...) __printflike(1, 2); void out2fmt_flush(const char *, ...) __printflike(1, 2); void fmtstr(char *, int, const char *, ...) __printflike(3, 4); void doformat(struct output *, const char *, va_list) __printflike(2, 0); +FILE *out1fp(void); int xwrite(int, const char *, int); #define outc(c, file) ((file)->nextc == (file)->bufend ? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c))) From owner-svn-src-stable@freebsd.org Wed Mar 27 21:55:38 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED2CE155CBCC; Wed, 27 Mar 2019 21:55:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 951396B069; Wed, 27 Mar 2019 21:55:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E904D636; Wed, 27 Mar 2019 21:55:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLtbM1057180; Wed, 27 Mar 2019 21:55:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLtbVe057179; Wed, 27 Mar 2019 21:55:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272155.x2RLtbVe057179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 21:55:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345614 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 951396B069 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.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:55:38 -0000 Author: np Date: Wed Mar 27 21:55:36 2019 New Revision: 345614 URL: https://svnweb.freebsd.org/changeset/base/345614 Log: MFC r343539: cxgbe(4): Add adapter information to messages logged by the OS-agnostic code in t4_hw.c. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/osdep.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/12/sys/dev/cxgbe/osdep.h Wed Mar 27 21:53:44 2019 (r345613) +++ stable/12/sys/dev/cxgbe/osdep.h Wed Mar 27 21:55:36 2019 (r345614) @@ -42,10 +42,14 @@ #include #include -#define CH_ERR(adap, fmt, ...) log(LOG_ERR, fmt, ##__VA_ARGS__) -#define CH_WARN(adap, fmt, ...) log(LOG_WARNING, fmt, ##__VA_ARGS__) -#define CH_ALERT(adap, fmt, ...) log(LOG_ALERT, fmt, ##__VA_ARGS__) -#define CH_WARN_RATELIMIT(adap, fmt, ...) log(LOG_WARNING, fmt, ##__VA_ARGS__) +#define CH_ERR(adap, fmt, ...) log(LOG_ERR, "%s: " fmt, \ + device_get_nameunit(adap->dev), ##__VA_ARGS__) +#define CH_WARN(adap, fmt, ...) log(LOG_WARNING, "%s: " fmt, \ + device_get_nameunit(adap->dev), ##__VA_ARGS__) +#define CH_ALERT(adap, fmt, ...) log(LOG_ALERT, "%s: " fmt, \ + device_get_nameunit(adap->dev), ##__VA_ARGS__) +#define CH_WARN_RATELIMIT(adap, fmt, ...) log(LOG_WARNING, "%s: " fmt, \ + device_get_nameunit(adap->dev), ##__VA_ARGS__) #ifndef LINUX_TYPES_DEFINED typedef int8_t s8; From owner-svn-src-stable@freebsd.org Wed Mar 27 21:58:49 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7ADC155CD2B; Wed, 27 Mar 2019 21:58:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 1FFDB6B257; Wed, 27 Mar 2019 21:58:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB61BD637; Wed, 27 Mar 2019 21:58:48 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RLwmuc057358; Wed, 27 Mar 2019 21:58:48 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RLwmSq057357; Wed, 27 Mar 2019 21:58:48 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272158.x2RLwmSq057357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 21:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345615 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 345615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1FFDB6B257 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.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 21:58:49 -0000 Author: np Date: Wed Mar 27 21:58:48 2019 New Revision: 345615 URL: https://svnweb.freebsd.org/changeset/base/345615 Log: MFC r343889: cxgbev(4): Initialize debug_flags from the environment like in the PF driver. Modified: stable/12/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_vf.c Wed Mar 27 21:55:36 2019 (r345614) +++ stable/12/sys/dev/cxgbe/t4_vf.c Wed Mar 27 21:58:48 2019 (r345615) @@ -479,6 +479,7 @@ t4vf_attach(device_t dev) sc->params.pci.mps = pci_get_max_payload(dev); sc->flags |= IS_VF; + TUNABLE_INT_FETCH("hw.cxgbe.dflags", &sc->debug_flags); sc->sge_gts_reg = VF_SGE_REG(A_SGE_VF_GTS); sc->sge_kdoorbell_reg = VF_SGE_REG(A_SGE_VF_KDOORBELL); From owner-svn-src-stable@freebsd.org Wed Mar 27 22:05:59 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 270E6155CFEC; Wed, 27 Mar 2019 22:05:59 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 B7FAA6B6E7; Wed, 27 Mar 2019 22:05:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A322D7DE; Wed, 27 Mar 2019 22:05:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RM5wqs062432; Wed, 27 Mar 2019 22:05:58 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RM5vbE062428; Wed, 27 Mar 2019 22:05:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272205.x2RM5vbE062428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 22:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345616 - in stable/12/sys/dev/cxgbe: . common X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 345616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B7FAA6B6E7 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_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 22:05:59 -0000 Author: np Date: Wed Mar 27 22:05:57 2019 New Revision: 345616 URL: https://svnweb.freebsd.org/changeset/base/345616 Log: MFC r341620: cxgbe(4): Fall back to a basic configuration in case of any error during card initialization. This is an expanded version of r333682. Break up prep_firmware into simpler routines while here. Load the firmware/config KLD only if needed. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/common/common.h stable/12/sys/dev/cxgbe/common/t4_hw.c stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 21:58:48 2019 (r345615) +++ stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 22:05:57 2019 (r345616) @@ -174,6 +174,7 @@ enum { DF_DUMP_MBOX = (1 << 0), /* Log all mbox cmd/rpl. */ DF_LOAD_FW_ANYTIME = (1 << 1), /* Allow LOAD_FW after init */ DF_DISABLE_TCB_CACHE = (1 << 2), /* Disable TCB cache (T6+) */ + DF_DISABLE_CFG_RETRY = (1 << 3), /* Disable fallback config */ }; #define IS_DOOMED(vi) ((vi)->flags & DOOMED) Modified: stable/12/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/12/sys/dev/cxgbe/common/common.h Wed Mar 27 21:58:48 2019 (r345615) +++ stable/12/sys/dev/cxgbe/common/common.h Wed Mar 27 22:05:57 2019 (r345616) @@ -605,6 +605,7 @@ int t4_flash_erase_sectors(struct adapter *adapter, in int t4_flash_cfg_addr(struct adapter *adapter); int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size); int t4_get_fw_version(struct adapter *adapter, u32 *vers); +int t4_get_fw_hdr(struct adapter *adapter, struct fw_hdr *hdr); int t4_get_bs_version(struct adapter *adapter, u32 *vers); int t4_get_tp_version(struct adapter *adapter, u32 *vers); int t4_get_exprom_version(struct adapter *adapter, u32 *vers); @@ -736,11 +737,9 @@ int t4_fw_hello(struct adapter *adap, unsigned int mbo int t4_fw_bye(struct adapter *adap, unsigned int mbox); int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset); int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force); -int t4_fw_restart(struct adapter *adap, unsigned int mbox, int reset); +int t4_fw_restart(struct adapter *adap, unsigned int mbox); int t4_fw_upgrade(struct adapter *adap, unsigned int mbox, const u8 *fw_data, unsigned int size, int force); -int t4_fw_forceinstall(struct adapter *adap, const u8 *fw_data, - unsigned int size); int t4_fw_initialize(struct adapter *adap, unsigned int mbox); int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int nparams, const u32 *params, Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/12/sys/dev/cxgbe/common/t4_hw.c Wed Mar 27 21:58:48 2019 (r345615) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Wed Mar 27 22:05:57 2019 (r345616) @@ -3323,6 +3323,19 @@ int t4_get_fw_version(struct adapter *adapter, u32 *ve } /** + * t4_get_fw_hdr - read the firmware header + * @adapter: the adapter + * @hdr: where to place the version + * + * Reads the FW header from flash into caller provided buffer. + */ +int t4_get_fw_hdr(struct adapter *adapter, struct fw_hdr *hdr) +{ + return t4_read_flash(adapter, FLASH_FW_START, + sizeof (*hdr) / sizeof (uint32_t), (uint32_t *)hdr, 1); +} + +/** * t4_get_bs_version - read the firmware bootstrap version * @adapter: the adapter * @vers: where to place the version @@ -6902,7 +6915,7 @@ int t4_fw_halt(struct adapter *adap, unsigned int mbox * If a legitimate mailbox is provided, issue a RESET command * with a HALT indication. */ - if (mbox <= M_PCIE_FW_MASTER) { + if (adap->flags & FW_OK && mbox <= M_PCIE_FW_MASTER) { struct fw_reset_cmd c; memset(&c, 0, sizeof(c)); @@ -6941,64 +6954,24 @@ int t4_fw_halt(struct adapter *adap, unsigned int mbox /** * t4_fw_restart - restart the firmware by taking the uP out of RESET * @adap: the adapter - * @reset: if we want to do a RESET to restart things * * Restart firmware previously halted by t4_fw_halt(). On successful * return the previous PF Master remains as the new PF Master and there * is no need to issue a new HELLO command, etc. - * - * We do this in two ways: - * - * 1. If we're dealing with newer firmware we'll simply want to take - * the chip's microprocessor out of RESET. This will cause the - * firmware to start up from its start vector. And then we'll loop - * until the firmware indicates it's started again (PCIE_FW.HALT - * reset to 0) or we timeout. - * - * 2. If we're dealing with older firmware then we'll need to RESET - * the chip since older firmware won't recognize the PCIE_FW.HALT - * flag and automatically RESET itself on startup. */ -int t4_fw_restart(struct adapter *adap, unsigned int mbox, int reset) +int t4_fw_restart(struct adapter *adap, unsigned int mbox) { - if (reset) { - /* - * Since we're directing the RESET instead of the firmware - * doing it automatically, we need to clear the PCIE_FW.HALT - * bit. - */ - t4_set_reg_field(adap, A_PCIE_FW, F_PCIE_FW_HALT, 0); + int ms; - /* - * If we've been given a valid mailbox, first try to get the - * firmware to do the RESET. If that works, great and we can - * return success. Otherwise, if we haven't been given a - * valid mailbox or the RESET command failed, fall back to - * hitting the chip with a hammer. - */ - if (mbox <= M_PCIE_FW_MASTER) { - t4_set_reg_field(adap, A_CIM_BOOT_CFG, F_UPCRST, 0); - msleep(100); - if (t4_fw_reset(adap, mbox, - F_PIORST | F_PIORSTMODE) == 0) - return 0; - } - - t4_write_reg(adap, A_PL_RST, F_PIORST | F_PIORSTMODE); - msleep(2000); - } else { - int ms; - - t4_set_reg_field(adap, A_CIM_BOOT_CFG, F_UPCRST, 0); - for (ms = 0; ms < FW_CMD_MAX_TIMEOUT; ) { - if (!(t4_read_reg(adap, A_PCIE_FW) & F_PCIE_FW_HALT)) - return FW_SUCCESS; - msleep(100); - ms += 100; - } - return -ETIMEDOUT; + t4_set_reg_field(adap, A_CIM_BOOT_CFG, F_UPCRST, 0); + for (ms = 0; ms < FW_CMD_MAX_TIMEOUT; ) { + if (!(t4_read_reg(adap, A_PCIE_FW) & F_PCIE_FW_HALT)) + return FW_SUCCESS; + msleep(100); + ms += 100; } - return 0; + + return -ETIMEDOUT; } /** @@ -7028,7 +7001,7 @@ int t4_fw_upgrade(struct adapter *adap, unsigned int m const struct fw_hdr *fw_hdr = (const struct fw_hdr *)fw_data; unsigned int bootstrap = be32_to_cpu(fw_hdr->magic) == FW_HDR_MAGIC_BOOTSTRAP; - int reset, ret; + int ret; if (!t4_fw_matches_chip(adap, fw_hdr)) return -EINVAL; @@ -7043,41 +7016,7 @@ int t4_fw_upgrade(struct adapter *adap, unsigned int m if (ret < 0 || bootstrap) return ret; - /* - * Older versions of the firmware don't understand the new - * PCIE_FW.HALT flag and so won't know to perform a RESET when they - * restart. So for newly loaded older firmware we'll have to do the - * RESET for it so it starts up on a clean slate. We can tell if - * the newly loaded firmware will handle this right by checking - * its header flags to see if it advertises the capability. - */ - reset = ((be32_to_cpu(fw_hdr->flags) & FW_HDR_FLAGS_RESET_HALT) == 0); - return t4_fw_restart(adap, mbox, reset); -} - -/* - * Card doesn't have a firmware, install one. - */ -int t4_fw_forceinstall(struct adapter *adap, const u8 *fw_data, - unsigned int size) -{ - const struct fw_hdr *fw_hdr = (const struct fw_hdr *)fw_data; - unsigned int bootstrap = - be32_to_cpu(fw_hdr->magic) == FW_HDR_MAGIC_BOOTSTRAP; - int ret; - - if (!t4_fw_matches_chip(adap, fw_hdr) || bootstrap) - return -EINVAL; - - t4_set_reg_field(adap, A_CIM_BOOT_CFG, F_UPCRST, F_UPCRST); - t4_write_reg(adap, A_PCIE_FW, 0); /* Clobber internal state */ - ret = t4_load_fw(adap, fw_data, size); - if (ret < 0) - return ret; - t4_write_reg(adap, A_PL_RST, F_PIORST | F_PIORSTMODE); - msleep(1000); - - return (0); + return t4_fw_restart(adap, mbox); } /** Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 21:58:48 2019 (r345615) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 22:05:57 2019 (r345616) @@ -604,9 +604,8 @@ static int validate_mt_off_len(struct adapter *, int, uint32_t *); static int fixup_devlog_params(struct adapter *); static int cfg_itype_and_nqueues(struct adapter *, struct intrs_and_queues *); -static int prep_firmware(struct adapter *); -static int partition_resources(struct adapter *, const struct firmware *, - const char *); +static int contact_firmware(struct adapter *); +static int partition_resources(struct adapter *); static int get_params__pre_init(struct adapter *); static int get_params__post_init(struct adapter *); static int set_params__post_init(struct adapter *); @@ -1063,11 +1062,22 @@ t4_attach(device_t dev) } #endif - /* Prepare the firmware for operation */ - rc = prep_firmware(sc); + /* Contact the firmware and try to become the master driver. */ + rc = contact_firmware(sc); if (rc != 0) goto done; /* error message displayed already */ + MPASS(sc->flags & FW_OK); + rc = get_params__pre_init(sc); + if (rc != 0) + goto done; /* error message displayed already */ + + if (sc->flags & MASTER_PF) { + rc = partition_resources(sc); + if (rc != 0) + goto done; /* error message displayed already */ + } + rc = get_params__post_init(sc); if (rc != 0) goto done; /* error message displayed already */ @@ -3418,27 +3428,85 @@ fw_compatible(const struct fw_hdr *hdr1, const struct return (0); } +static int +load_fw_module(struct adapter *sc, const struct firmware **dcfg, + const struct firmware **fw) +{ + struct fw_info *fw_info; + + *dcfg = NULL; + if (fw != NULL) + *fw = NULL; + + fw_info = find_fw_info(chip_id(sc)); + if (fw_info == NULL) { + device_printf(sc->dev, + "unable to look up firmware information for chip %d.\n", + chip_id(sc)); + return (EINVAL); + } + + *dcfg = firmware_get(fw_info->kld_name); + if (*dcfg != NULL) { + if (fw != NULL) + *fw = firmware_get(fw_info->fw_mod_name); + return (0); + } + + return (ENOENT); +} + +static void +unload_fw_module(struct adapter *sc, const struct firmware *dcfg, + const struct firmware *fw) +{ + + if (fw != NULL) + firmware_put(fw, FIRMWARE_UNLOAD); + if (dcfg != NULL) + firmware_put(dcfg, FIRMWARE_UNLOAD); +} + /* - * The firmware in the KLD is usable, but should it be installed? This routine - * explains itself in detail if it indicates the KLD firmware should be - * installed. + * Return values: + * 0 means no firmware install attempted. + * ERESTART means a firmware install was attempted and was successful. + * +ve errno means a firmware install was attempted but failed. */ static int -should_install_kld_fw(struct adapter *sc, int card_fw_usable, int k, int c) +install_kld_firmware(struct adapter *sc, struct fw_hdr *card_fw, + const struct fw_hdr *drv_fw, const char *reason, int *already) { - const char *reason; + const struct firmware *cfg, *fw; + const uint32_t c = be32toh(card_fw->fw_ver); + const uint32_t d = be32toh(drv_fw->fw_ver); + uint32_t k; + int rc; - if (!card_fw_usable) { + if (reason != NULL) + goto install; + + if ((sc->flags & FW_OK) == 0) { + + if (c == 0xffffffff) { + reason = "missing"; + goto install; + } + + return (0); + } + + if (!fw_compatible(card_fw, drv_fw)) { reason = "incompatible or unusable"; goto install; } - if (k > c) { + if (d > c) { reason = "older than the version bundled with this driver"; goto install; } - if (t4_fw_install == 2 && k != c) { + if (t4_fw_install == 2 && d != c) { reason = "different than the version bundled with this driver"; goto install; } @@ -3446,10 +3514,13 @@ should_install_kld_fw(struct adapter *sc, int card_fw_ return (0); install: + if ((*already)++) + return (0); + if (t4_fw_install == 0) { device_printf(sc->dev, "firmware on card (%u.%u.%u.%u) is %s, " - "but the driver is prohibited from installing a different " - "firmware on the card.\n", + "but the driver is prohibited from installing a firmware " + "on the card.\n", G_FW_HDR_FW_VER_MAJOR(c), G_FW_HDR_FW_VER_MINOR(c), G_FW_HDR_FW_VER_MICRO(c), G_FW_HDR_FW_VER_BUILD(c), reason); @@ -3460,29 +3531,57 @@ install: "installing firmware %u.%u.%u.%u on card.\n", G_FW_HDR_FW_VER_MAJOR(c), G_FW_HDR_FW_VER_MINOR(c), G_FW_HDR_FW_VER_MICRO(c), G_FW_HDR_FW_VER_BUILD(c), reason, - G_FW_HDR_FW_VER_MAJOR(k), G_FW_HDR_FW_VER_MINOR(k), - G_FW_HDR_FW_VER_MICRO(k), G_FW_HDR_FW_VER_BUILD(k)); + G_FW_HDR_FW_VER_MAJOR(d), G_FW_HDR_FW_VER_MINOR(d), + G_FW_HDR_FW_VER_MICRO(d), G_FW_HDR_FW_VER_BUILD(d)); - return (1); + rc = load_fw_module(sc, &cfg, &fw); + if (rc != 0 || fw == NULL) { + device_printf(sc->dev, + "failed to load firmware module: %d. cfg %p, fw %p\n", rc, + cfg, fw); + rc = sc->flags & FW_OK ? 0 : ENOENT; + goto done; + } + k = be32toh(((const struct fw_hdr *)fw->data)->fw_ver); + if (k != d) { + device_printf(sc->dev, + "firmware in KLD (%u.%u.%u.%u) is not what the driver was " + "compiled with and will not be used.\n", + G_FW_HDR_FW_VER_MAJOR(k), G_FW_HDR_FW_VER_MINOR(k), + G_FW_HDR_FW_VER_MICRO(k), G_FW_HDR_FW_VER_BUILD(k)); + rc = sc->flags & FW_OK ? 0 : EINVAL; + goto done; + } + + rc = -t4_fw_upgrade(sc, sc->mbox, fw->data, fw->datasize, 0); + if (rc != 0) { + device_printf(sc->dev, "failed to install firmware: %d\n", rc); + } else { + /* Installed successfully, update the cached header too. */ + rc = ERESTART; + memcpy(card_fw, fw->data, sizeof(*card_fw)); + } +done: + unload_fw_module(sc, cfg, fw); + + return (rc); } /* - * Establish contact with the firmware and determine if we are the master driver - * or not, and whether we are responsible for chip initialization. + * Establish contact with the firmware and attempt to become the master driver. + * + * A firmware will be installed to the card if needed (if the driver is allowed + * to do so). */ static int -prep_firmware(struct adapter *sc) +contact_firmware(struct adapter *sc) { - const struct firmware *fw = NULL, *default_cfg; - int rc, pf, card_fw_usable, kld_fw_usable, need_fw_reset = 1; + int rc, already = 0; enum dev_state state; struct fw_info *fw_info; struct fw_hdr *card_fw; /* fw on the card */ - const struct fw_hdr *kld_fw; /* fw in the KLD */ - const struct fw_hdr *drv_fw; /* fw header the driver was compiled - against */ + const struct fw_hdr *drv_fw; /* fw bundled with the driver */ - /* This is the firmware whose headers the driver was compiled against */ fw_info = find_fw_info(chip_id(sc)); if (fw_info == NULL) { device_printf(sc->dev, @@ -3492,186 +3591,167 @@ prep_firmware(struct adapter *sc) } drv_fw = &fw_info->fw_hdr; - /* - * The firmware KLD contains many modules. The KLD name is also the - * name of the module that contains the default config file. - */ - default_cfg = firmware_get(fw_info->kld_name); - - /* This is the firmware in the KLD */ - fw = firmware_get(fw_info->fw_mod_name); - if (fw != NULL) { - kld_fw = (const void *)fw->data; - kld_fw_usable = fw_compatible(drv_fw, kld_fw); - } else { - kld_fw = NULL; - kld_fw_usable = 0; - } - /* Read the header of the firmware on the card */ card_fw = malloc(sizeof(*card_fw), M_CXGBE, M_ZERO | M_WAITOK); - rc = -t4_read_flash(sc, FLASH_FW_START, - sizeof (*card_fw) / sizeof (uint32_t), (uint32_t *)card_fw, 1); - if (rc == 0) { - card_fw_usable = fw_compatible(drv_fw, (const void*)card_fw); - if (card_fw->fw_ver == be32toh(0xffffffff)) { - uint32_t d = be32toh(kld_fw->fw_ver); - - if (!kld_fw_usable) { - device_printf(sc->dev, - "no firmware on the card and no usable " - "firmware bundled with the driver.\n"); - rc = EIO; - goto done; - } else if (t4_fw_install == 0) { - device_printf(sc->dev, - "no firmware on the card and the driver " - "is prohibited from installing new " - "firmware.\n"); - rc = EIO; - goto done; - } - - device_printf(sc->dev, "no firmware on the card, " - "installing firmware %d.%d.%d.%d\n", - G_FW_HDR_FW_VER_MAJOR(d), G_FW_HDR_FW_VER_MINOR(d), - G_FW_HDR_FW_VER_MICRO(d), G_FW_HDR_FW_VER_BUILD(d)); - rc = t4_fw_forceinstall(sc, fw->data, fw->datasize); - if (rc < 0) { - rc = -rc; - device_printf(sc->dev, - "firmware install failed: %d.\n", rc); - goto done; - } - memcpy(card_fw, kld_fw, sizeof(*card_fw)); - card_fw_usable = 1; - need_fw_reset = 0; - } - } else { +restart: + rc = -t4_get_fw_hdr(sc, card_fw); + if (rc != 0) { device_printf(sc->dev, - "Unable to read card's firmware header: %d\n", rc); - card_fw_usable = 0; + "unable to read firmware header from card's flash: %d\n", + rc); + goto done; } - /* Contact firmware. */ + rc = install_kld_firmware(sc, card_fw, drv_fw, NULL, &already); + if (rc == ERESTART) + goto restart; + if (rc != 0) + goto done; + rc = t4_fw_hello(sc, sc->mbox, sc->mbox, MASTER_MAY, &state); if (rc < 0 || state == DEV_STATE_ERR) { rc = -rc; device_printf(sc->dev, - "failed to connect to the firmware: %d, %d.\n", rc, state); + "failed to connect to the firmware: %d, %d. " + "PCIE_FW 0x%08x\n", rc, state, t4_read_reg(sc, A_PCIE_FW)); +#if 0 + if (install_kld_firmware(sc, card_fw, drv_fw, + "not responding properly to HELLO", &already) == ERESTART) + goto restart; +#endif goto done; } - pf = rc; - if (pf == sc->mbox) + MPASS(be32toh(card_fw->flags) & FW_HDR_FLAGS_RESET_HALT); + sc->flags |= FW_OK; /* The firmware responded to the FW_HELLO. */ + + if (rc == sc->pf) { sc->flags |= MASTER_PF; - else if (state == DEV_STATE_UNINIT) { + rc = install_kld_firmware(sc, card_fw, drv_fw, NULL, &already); + if (rc == ERESTART) + rc = 0; + else if (rc != 0) + goto done; + } else if (state == DEV_STATE_UNINIT) { /* * We didn't get to be the master so we definitely won't be * configuring the chip. It's a bug if someone else hasn't * configured it already. */ device_printf(sc->dev, "couldn't be master(%d), " - "device not already initialized either(%d).\n", rc, state); + "device not already initialized either(%d). " + "PCIE_FW 0x%08x\n", rc, state, t4_read_reg(sc, A_PCIE_FW)); rc = EPROTO; goto done; - } - - if (card_fw_usable && card_fw->fw_ver == drv_fw->fw_ver && - (!kld_fw_usable || kld_fw->fw_ver == drv_fw->fw_ver)) { + } else { /* - * Common case: the firmware on the card is an exact match and - * the KLD is an exact match too, or the KLD is - * absent/incompatible. Note that t4_fw_install = 2 is ignored - * here -- use cxgbetool loadfw if you want to reinstall the - * same firmware as the one on the card. + * Some other PF is the master and has configured the chip. + * This is allowed but untested. */ - } else if (kld_fw_usable && state == DEV_STATE_UNINIT && - should_install_kld_fw(sc, card_fw_usable, be32toh(kld_fw->fw_ver), - be32toh(card_fw->fw_ver))) { + device_printf(sc->dev, "PF%d is master, device state %d. " + "PCIE_FW 0x%08x\n", rc, state, t4_read_reg(sc, A_PCIE_FW)); + snprintf(sc->cfg_file, sizeof(sc->cfg_file), "pf%d", rc); + sc->cfcsum = 0; + rc = 0; + } +done: + if (rc != 0 && sc->flags & FW_OK) { + t4_fw_bye(sc, sc->mbox); + sc->flags &= ~FW_OK; + } + free(card_fw, M_CXGBE); + return (rc); +} - rc = -t4_fw_upgrade(sc, sc->mbox, fw->data, fw->datasize, 0); - if (rc != 0) { +static int +copy_cfg_file_to_card(struct adapter *sc, char *cfg_file, + uint32_t mtype, uint32_t moff) +{ + struct fw_info *fw_info; + const struct firmware *dcfg, *rcfg = NULL; + const uint32_t *cfdata; + uint32_t cflen, addr; + int rc; + + load_fw_module(sc, &dcfg, NULL); + + /* Card specific interpretation of "default". */ + if (strncmp(cfg_file, DEFAULT_CF, sizeof(t4_cfg_file)) == 0) { + if (pci_get_device(sc->dev) == 0x440a) + snprintf(cfg_file, sizeof(t4_cfg_file), UWIRE_CF); + if (is_fpga(sc)) + snprintf(cfg_file, sizeof(t4_cfg_file), FPGA_CF); + } + + if (strncmp(cfg_file, DEFAULT_CF, sizeof(t4_cfg_file)) == 0) { + if (dcfg == NULL) { device_printf(sc->dev, - "failed to install firmware: %d\n", rc); + "KLD with default config is not available.\n"); + rc = ENOENT; goto done; } + cfdata = dcfg->data; + cflen = dcfg->datasize & ~3; + } else { + char s[32]; - /* Installed successfully, update the cached header too. */ - memcpy(card_fw, kld_fw, sizeof(*card_fw)); - card_fw_usable = 1; - need_fw_reset = 0; /* already reset as part of load_fw */ + fw_info = find_fw_info(chip_id(sc)); + if (fw_info == NULL) { + device_printf(sc->dev, + "unable to look up firmware information for chip %d.\n", + chip_id(sc)); + rc = EINVAL; + goto done; + } + snprintf(s, sizeof(s), "%s_%s", fw_info->kld_name, cfg_file); + + rcfg = firmware_get(s); + if (rcfg == NULL) { + device_printf(sc->dev, + "unable to load module \"%s\" for configuration " + "profile \"%s\".\n", s, cfg_file); + rc = ENOENT; + goto done; + } + cfdata = rcfg->data; + cflen = rcfg->datasize & ~3; } - if (!card_fw_usable) { - uint32_t d, c, k; - - d = ntohl(drv_fw->fw_ver); - c = ntohl(card_fw->fw_ver); - k = kld_fw ? ntohl(kld_fw->fw_ver) : 0; - - device_printf(sc->dev, "Cannot find a usable firmware: " - "fw_install %d, chip state %d, " - "driver compiled with %d.%d.%d.%d, " - "card has %d.%d.%d.%d, KLD has %d.%d.%d.%d\n", - t4_fw_install, state, - G_FW_HDR_FW_VER_MAJOR(d), G_FW_HDR_FW_VER_MINOR(d), - G_FW_HDR_FW_VER_MICRO(d), G_FW_HDR_FW_VER_BUILD(d), - G_FW_HDR_FW_VER_MAJOR(c), G_FW_HDR_FW_VER_MINOR(c), - G_FW_HDR_FW_VER_MICRO(c), G_FW_HDR_FW_VER_BUILD(c), - G_FW_HDR_FW_VER_MAJOR(k), G_FW_HDR_FW_VER_MINOR(k), - G_FW_HDR_FW_VER_MICRO(k), G_FW_HDR_FW_VER_BUILD(k)); + if (cflen > FLASH_CFG_MAX_SIZE) { + device_printf(sc->dev, + "config file too long (%d, max allowed is %d).\n", + cflen, FLASH_CFG_MAX_SIZE); rc = EINVAL; goto done; } - /* Reset device */ - if (need_fw_reset && - (rc = -t4_fw_reset(sc, sc->mbox, F_PIORSTMODE | F_PIORST)) != 0) { - device_printf(sc->dev, "firmware reset failed: %d.\n", rc); - if (rc != ETIMEDOUT && rc != EIO) - t4_fw_bye(sc, sc->mbox); + rc = validate_mt_off_len(sc, mtype, moff, cflen, &addr); + if (rc != 0) { + device_printf(sc->dev, + "%s: addr (%d/0x%x) or len %d is not valid: %d.\n", + __func__, mtype, moff, cflen, rc); + rc = EINVAL; goto done; } - sc->flags |= FW_OK; - - rc = get_params__pre_init(sc); - if (rc != 0) - goto done; /* error message displayed already */ - - /* Partition adapter resources as specified in the config file. */ - if (state == DEV_STATE_UNINIT) { - - KASSERT(sc->flags & MASTER_PF, - ("%s: trying to change chip settings when not master.", - __func__)); - - rc = partition_resources(sc, default_cfg, fw_info->kld_name); - if (rc != 0) - goto done; /* error message displayed already */ - - t4_tweak_chip_settings(sc); - - /* get basic stuff going */ - rc = -t4_fw_initialize(sc, sc->mbox); - if (rc != 0) { - device_printf(sc->dev, "fw init failed: %d.\n", rc); - goto done; - } - } else { - snprintf(sc->cfg_file, sizeof(sc->cfg_file), "pf%d", pf); - sc->cfcsum = 0; - } - + write_via_memwin(sc, 2, addr, cfdata, cflen); done: - free(card_fw, M_CXGBE); - if (fw != NULL) - firmware_put(fw, FIRMWARE_UNLOAD); - if (default_cfg != NULL) - firmware_put(default_cfg, FIRMWARE_UNLOAD); - + if (rcfg != NULL) + firmware_put(rcfg, FIRMWARE_UNLOAD); + unload_fw_module(sc, dcfg, NULL); return (rc); } +struct caps_allowed { + uint16_t nbmcaps; + uint16_t linkcaps; + uint16_t switchcaps; + uint16_t niccaps; + uint16_t toecaps; + uint16_t rdmacaps; + uint16_t cryptocaps; + uint16_t iscsicaps; + uint16_t fcoecaps; +}; + #define FW_PARAM_DEV(param) \ (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | \ V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_##param)) @@ -3680,78 +3760,39 @@ done: V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_PFVF_##param)) /* - * Partition chip resources for use between various PFs, VFs, etc. + * Provide a configuration profile to the firmware and have it initialize the + * chip accordingly. This may involve uploading a configuration file to the + * card. */ static int -partition_resources(struct adapter *sc, const struct firmware *default_cfg, - const char *name_prefix) +apply_cfg_and_initialize(struct adapter *sc, char *cfg_file, + const struct caps_allowed *caps_allowed) { - const struct firmware *cfg = NULL; - int rc = 0; + int rc; struct fw_caps_config_cmd caps; - uint32_t mtype, moff, finicsum, cfcsum; + uint32_t mtype, moff, finicsum, cfcsum, param, val; - /* - * Figure out what configuration file to use. Pick the default config - * file for the card if the user hasn't specified one explicitly. - */ - snprintf(sc->cfg_file, sizeof(sc->cfg_file), "%s", t4_cfg_file); - if (strncmp(t4_cfg_file, DEFAULT_CF, sizeof(t4_cfg_file)) == 0) { - /* Card specific overrides go here. */ - if (pci_get_device(sc->dev) == 0x440a) - snprintf(sc->cfg_file, sizeof(sc->cfg_file), UWIRE_CF); - if (is_fpga(sc)) - snprintf(sc->cfg_file, sizeof(sc->cfg_file), FPGA_CF); - } else if (strncmp(t4_cfg_file, BUILTIN_CF, sizeof(t4_cfg_file)) == 0) - goto use_built_in_config; /* go straight to config. */ - - /* - * We need to load another module if the profile is anything except - * "default" or "flash". - */ - if (strncmp(sc->cfg_file, DEFAULT_CF, sizeof(sc->cfg_file)) != 0 && - strncmp(sc->cfg_file, FLASH_CF, sizeof(sc->cfg_file)) != 0) { - char s[32]; - - snprintf(s, sizeof(s), "%s_%s", name_prefix, sc->cfg_file); - cfg = firmware_get(s); - if (cfg == NULL) { - if (default_cfg != NULL) { - device_printf(sc->dev, - "unable to load module \"%s\" for " - "configuration profile \"%s\", will use " - "the default config file instead.\n", - s, sc->cfg_file); - snprintf(sc->cfg_file, sizeof(sc->cfg_file), - "%s", DEFAULT_CF); - } else { - device_printf(sc->dev, - "unable to load module \"%s\" for " - "configuration profile \"%s\", will use " - "the config file on the card's flash " - "instead.\n", s, sc->cfg_file); - snprintf(sc->cfg_file, sizeof(sc->cfg_file), - "%s", FLASH_CF); - } - } + rc = -t4_fw_reset(sc, sc->mbox, F_PIORSTMODE | F_PIORST); + if (rc != 0) { + device_printf(sc->dev, "firmware reset failed: %d.\n", rc); + return (rc); } - if (strncmp(sc->cfg_file, DEFAULT_CF, sizeof(sc->cfg_file)) == 0 && - default_cfg == NULL) { - device_printf(sc->dev, - "default config file not available, will use the config " - "file on the card's flash instead.\n"); - snprintf(sc->cfg_file, sizeof(sc->cfg_file), "%s", FLASH_CF); - } - - if (strncmp(sc->cfg_file, FLASH_CF, sizeof(sc->cfg_file)) != 0) { - u_int cflen; - const uint32_t *cfdata; - uint32_t param, val, addr; - - KASSERT(cfg != NULL || default_cfg != NULL, - ("%s: no config to upload", __func__)); - + bzero(&caps, sizeof(caps)); + caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | + F_FW_CMD_REQUEST | F_FW_CMD_READ); + if (strncmp(cfg_file, BUILTIN_CF, sizeof(t4_cfg_file)) == 0) { + mtype = 0; + moff = 0; + caps.cfvalid_to_len16 = htobe32(FW_LEN16(caps)); + } else if (strncmp(cfg_file, FLASH_CF, sizeof(t4_cfg_file)) == 0) { + mtype = FW_MEMTYPE_FLASH; + moff = t4_flash_cfg_addr(sc); + caps.cfvalid_to_len16 = htobe32(F_FW_CAPS_CONFIG_CMD_CFVALID | + V_FW_CAPS_CONFIG_CMD_MEMTYPE_CF(mtype) | + V_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF(moff >> 16) | + FW_LEN16(caps)); + } else { /* * Ask the firmware where it wants us to upload the config file. */ @@ -3765,110 +3806,52 @@ partition_resources(struct adapter *sc, const struct f } mtype = G_FW_PARAMS_PARAM_Y(val); moff = G_FW_PARAMS_PARAM_Z(val) << 16; + caps.cfvalid_to_len16 = htobe32(F_FW_CAPS_CONFIG_CMD_CFVALID | + V_FW_CAPS_CONFIG_CMD_MEMTYPE_CF(mtype) | + V_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF(moff >> 16) | + FW_LEN16(caps)); - /* - * XXX: sheer laziness. We deliberately added 4 bytes of - * useless stuffing/comments at the end of the config file so - * it's ok to simply throw away the last remaining bytes when - * the config file is not an exact multiple of 4. This also - * helps with the validate_mt_off_len check. - */ - if (cfg != NULL) { - cflen = cfg->datasize & ~3; - cfdata = cfg->data; - } else { - cflen = default_cfg->datasize & ~3; - cfdata = default_cfg->data; - } - - if (cflen > FLASH_CFG_MAX_SIZE) { - device_printf(sc->dev, - "config file too long (%d, max allowed is %d). " - "Will try to use the config on the card, if any.\n", - cflen, FLASH_CFG_MAX_SIZE); - goto use_config_on_flash; - } - - rc = validate_mt_off_len(sc, mtype, moff, cflen, &addr); + rc = copy_cfg_file_to_card(sc, cfg_file, mtype, moff); if (rc != 0) { device_printf(sc->dev, - "%s: addr (%d/0x%x) or len %d is not valid: %d. " - "Will try to use the config on the card, if any.\n", - __func__, mtype, moff, cflen, rc); - goto use_config_on_flash; + "failed to upload config file to card: %d.\n", rc); + goto done; } - write_via_memwin(sc, 2, addr, cfdata, cflen); - } else { -use_config_on_flash: - mtype = FW_MEMTYPE_FLASH; - moff = t4_flash_cfg_addr(sc); } - - bzero(&caps, sizeof(caps)); - caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | - F_FW_CMD_REQUEST | F_FW_CMD_READ); - caps.cfvalid_to_len16 = htobe32(F_FW_CAPS_CONFIG_CMD_CFVALID | - V_FW_CAPS_CONFIG_CMD_MEMTYPE_CF(mtype) | - V_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF(moff >> 16) | FW_LEN16(caps)); rc = -t4_wr_mbox(sc, sc->mbox, &caps, sizeof(caps), &caps); if (rc != 0) { - device_printf(sc->dev, - "failed to pre-process config file: %d " - "(mtype %d, moff 0x%x). Will reset the firmware and retry " - "with the built-in configuration.\n", rc, mtype, moff); - - rc = -t4_fw_reset(sc, sc->mbox, F_PIORSTMODE | F_PIORST); - if (rc != 0) { - device_printf(sc->dev, - "firmware reset failed: %d.\n", rc); - if (rc != ETIMEDOUT && rc != EIO) { - t4_fw_bye(sc, sc->mbox); - sc->flags &= ~FW_OK; - } - goto done; - } - snprintf(sc->cfg_file, sizeof(sc->cfg_file), "%s", "built-in"); -use_built_in_config: - bzero(&caps, sizeof(caps)); - caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | - F_FW_CMD_REQUEST | F_FW_CMD_READ); - caps.cfvalid_to_len16 = htobe32(FW_LEN16(caps)); - rc = t4_wr_mbox(sc, sc->mbox, &caps, sizeof(caps), &caps); - if (rc != 0) { - device_printf(sc->dev, - "built-in configuration failed: %d.\n", rc); - goto done; - } + device_printf(sc->dev, "failed to pre-process config file: %d " + "(mtype %d, moff 0x%x).\n", rc, mtype, moff); + goto done; } finicsum = be32toh(caps.finicsum); - cfcsum = be32toh(caps.cfcsum); + cfcsum = be32toh(caps.cfcsum); /* actual */ if (finicsum != cfcsum) { device_printf(sc->dev, "WARNING: config file checksum mismatch: %08x %08x\n", finicsum, cfcsum); } sc->cfcsum = cfcsum; + snprintf(sc->cfg_file, sizeof(sc->cfg_file), "%s", cfg_file); -#define LIMIT_CAPS(x) do { \ - caps.x &= htobe16(t4_##x##_allowed); \ -} while (0) - /* * Let the firmware know what features will (not) be used so it can tune * things accordingly. */ - LIMIT_CAPS(nbmcaps); - LIMIT_CAPS(linkcaps); - LIMIT_CAPS(switchcaps); - LIMIT_CAPS(niccaps); - LIMIT_CAPS(toecaps); - LIMIT_CAPS(rdmacaps); - LIMIT_CAPS(cryptocaps); - LIMIT_CAPS(iscsicaps); - LIMIT_CAPS(fcoecaps); +#define LIMIT_CAPS(x) do { \ + caps.x##caps &= htobe16(caps_allowed->x##caps); \ +} while (0) + LIMIT_CAPS(nbm); + LIMIT_CAPS(link); + LIMIT_CAPS(switch); + LIMIT_CAPS(nic); + LIMIT_CAPS(toe); + LIMIT_CAPS(rdma); + LIMIT_CAPS(crypto); + LIMIT_CAPS(iscsi); + LIMIT_CAPS(fcoe); #undef LIMIT_CAPS - if (caps.niccaps & htobe16(FW_CAPS_CONFIG_NIC_HASHFILTER)) { /* * TOE and hashfilters are mutually exclusive. It is a config @@ -3890,10 +3873,67 @@ use_built_in_config: if (rc != 0) { device_printf(sc->dev, "failed to process config file: %d.\n", rc); + goto done; } + + t4_tweak_chip_settings(sc); + + /* get basic stuff going */ + rc = -t4_fw_initialize(sc, sc->mbox); + if (rc != 0) { + device_printf(sc->dev, "fw_initialize failed: %d.\n", rc); + goto done; + } done: - if (cfg != NULL) - firmware_put(cfg, FIRMWARE_UNLOAD); + return (rc); +} + +/* + * Partition chip resources for use between various PFs, VFs, etc. + */ +static int +partition_resources(struct adapter *sc) +{ + char cfg_file[sizeof(t4_cfg_file)]; + struct caps_allowed caps_allowed; + int rc; + bool fallback; + + /* Only the master driver gets to configure the chip resources. */ + MPASS(sc->flags & MASTER_PF); + +#define COPY_CAPS(x) do { \ + caps_allowed.x##caps = t4_##x##caps_allowed; \ +} while (0) + bzero(&caps_allowed, sizeof(caps_allowed)); + COPY_CAPS(nbm); + COPY_CAPS(link); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Mar 27 22:09:36 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66056155D0AF; Wed, 27 Mar 2019 22:09:36 +0000 (UTC) (envelope-from jilles@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 0A5596B860; Wed, 27 Mar 2019 22:09:36 +0000 (UTC) (envelope-from jilles@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 D7084D7E0; Wed, 27 Mar 2019 22:09:35 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RM9ZFb062621; Wed, 27 Mar 2019 22:09:35 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RM9ZAp062619; Wed, 27 Mar 2019 22:09:35 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903272209.x2RM9ZAp062619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 27 Mar 2019 22:09:35 +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: r345617 - stable/11/bin/sh X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/11/bin/sh X-SVN-Commit-Revision: 345617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0A5596B860 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.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 22:09:36 -0000 Author: jilles Date: Wed Mar 27 22:09:35 2019 New Revision: 345617 URL: https://svnweb.freebsd.org/changeset/base/345617 Log: MFC r344306: sh: Send normal output from bind builtin to stdout PR: 233343 Modified: stable/11/bin/sh/histedit.c stable/11/bin/sh/output.c stable/11/bin/sh/output.h Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/histedit.c ============================================================================== --- stable/11/bin/sh/histedit.c Wed Mar 27 22:05:57 2019 (r345616) +++ stable/11/bin/sh/histedit.c Wed Mar 27 22:09:35 2019 (r345617) @@ -474,10 +474,31 @@ str_to_event(const char *str, int last) int bindcmd(int argc, char **argv) { + int ret; + FILE *old; + FILE *out; if (el == NULL) error("line editing is disabled"); - return (el_parse(el, argc, __DECONST(const char **, argv))); + + INTOFF; + + out = out1fp(); + if (out == NULL) + error("Out of space"); + + el_get(el, EL_GETFP, 1, &old); + el_set(el, EL_SETFP, 1, out); + + ret = el_parse(el, argc, __DECONST(const char **, argv)); + + el_set(el, EL_SETFP, 1, old); + + fclose(out); + + INTON; + + return ret; } #else Modified: stable/11/bin/sh/output.c ============================================================================== --- stable/11/bin/sh/output.c Wed Mar 27 22:05:57 2019 (r345616) +++ stable/11/bin/sh/output.c Wed Mar 27 22:09:35 2019 (r345617) @@ -345,6 +345,12 @@ doformat(struct output *dest, const char *f, va_list a } } +FILE * +out1fp(void) +{ + return fwopen(out1, doformat_wr); +} + /* * Version of write which resumes after a signal is caught. */ Modified: stable/11/bin/sh/output.h ============================================================================== --- stable/11/bin/sh/output.h Wed Mar 27 22:05:57 2019 (r345616) +++ stable/11/bin/sh/output.h Wed Mar 27 22:09:35 2019 (r345617) @@ -37,6 +37,7 @@ #include #include +#include struct output { char *nextc; @@ -73,6 +74,7 @@ void out1fmt(const char *, ...) __printflike(1, 2); void out2fmt_flush(const char *, ...) __printflike(1, 2); void fmtstr(char *, int, const char *, ...) __printflike(3, 4); void doformat(struct output *, const char *, va_list) __printflike(2, 0); +FILE *out1fp(void); int xwrite(int, const char *, int); #define outc(c, file) (--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c))) From owner-svn-src-stable@freebsd.org Wed Mar 27 22:21:11 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED2AB155D5C8; Wed, 27 Mar 2019 22:21:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 8F0936C03F; Wed, 27 Mar 2019 22:21:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65BD1DADD; Wed, 27 Mar 2019 22:21:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RMLAOn068838; Wed, 27 Mar 2019 22:21:10 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RML9JJ068834; Wed, 27 Mar 2019 22:21:09 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272221.x2RML9JJ068834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 22:21:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345618 - stable/12/sys/dev/cxgbe/firmware X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/firmware X-SVN-Commit-Revision: 345618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F0936C03F 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.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 22:21:11 -0000 Author: np Date: Wed Mar 27 22:21:09 2019 New Revision: 345618 URL: https://svnweb.freebsd.org/changeset/base/345618 Log: MFC r344524: cxgbe(4): Updates to the default and hashfilter configurations. - Do not use nvf = 4 as it is not really supported by the firmware. Firmwares 1.23.3.0 and above will ignore it silently. - Increase PF4's share of the VIs and let it use all of the RSS table. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/12/sys/dev/cxgbe/firmware/t5fw_cfg.txt stable/12/sys/dev/cxgbe/firmware/t5fw_cfg_hashfilter.txt stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt stable/12/sys/dev/cxgbe/firmware/t6fw_cfg_hashfilter.txt Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/firmware/t4fw_cfg.txt ============================================================================== --- stable/12/sys/dev/cxgbe/firmware/t4fw_cfg.txt Wed Mar 27 22:09:35 2019 (r345617) +++ stable/12/sys/dev/cxgbe/firmware/t4fw_cfg.txt Wed Mar 27 22:21:09 2019 (r345618) @@ -46,54 +46,50 @@ # PFs 0-3. These get 8 MSI/8 MSI-X vectors each. VFs are supported by # these 4 PFs only. [function "0"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x1 [function "1"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x2 [function "2"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x4 [function "3"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x8 @@ -103,7 +99,7 @@ wx_caps = all r_caps = all nvi = 32 - rssnvi = 8 + rssnvi = 16 niqflint = 512 nethctrl = 1024 neq = 2048 @@ -166,7 +162,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -178,7 +174,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -190,7 +186,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -202,7 +198,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -246,7 +242,7 @@ [fini] version = 0x1 - checksum = 0x159b9295 + checksum = 0x3ecbe8a0 # # $FreeBSD$ # Modified: stable/12/sys/dev/cxgbe/firmware/t5fw_cfg.txt ============================================================================== --- stable/12/sys/dev/cxgbe/firmware/t5fw_cfg.txt Wed Mar 27 22:09:35 2019 (r345617) +++ stable/12/sys/dev/cxgbe/firmware/t5fw_cfg.txt Wed Mar 27 22:21:09 2019 (r345618) @@ -90,54 +90,50 @@ # PFs 0-3. These get 8 MSI/8 MSI-X vectors each. VFs are supported by # these 4 PFs only. [function "0"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x1 [function "1"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x2 [function "2"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x4 [function "3"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x8 @@ -147,7 +143,7 @@ wx_caps = all r_caps = all nvi = 32 - rssnvi = 8 + rssnvi = 16 niqflint = 512 nethctrl = 1024 neq = 2048 @@ -211,7 +207,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -223,7 +219,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -235,7 +231,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -247,7 +243,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -291,7 +287,7 @@ [fini] version = 0x1 - checksum = 0x30b6a157 + checksum = 0x34da8705 # # $FreeBSD$ # Modified: stable/12/sys/dev/cxgbe/firmware/t5fw_cfg_hashfilter.txt ============================================================================== --- stable/12/sys/dev/cxgbe/firmware/t5fw_cfg_hashfilter.txt Wed Mar 27 22:09:35 2019 (r345617) +++ stable/12/sys/dev/cxgbe/firmware/t5fw_cfg_hashfilter.txt Wed Mar 27 22:21:09 2019 (r345618) @@ -99,54 +99,50 @@ # PFs 0-3. These get 8 MSI/8 MSI-X vectors each. VFs are supported by # these 4 PFs only. [function "0"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x1 [function "1"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x2 [function "2"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x4 [function "3"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x8 @@ -156,7 +152,7 @@ wx_caps = all r_caps = all nvi = 32 - rssnvi = 8 + rssnvi = 16 niqflint = 512 nethctrl = 1024 neq = 2048 @@ -214,7 +210,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -226,7 +222,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -238,7 +234,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -250,7 +246,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -294,7 +290,7 @@ [fini] version = 0x1 - checksum = 0x380a0a4 + checksum = 0x7a962d44 # # $FreeBSD$ # Modified: stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt ============================================================================== --- stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt Wed Mar 27 22:09:35 2019 (r345617) +++ stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt Wed Mar 27 22:21:09 2019 (r345618) @@ -88,54 +88,50 @@ # PFs 0-3. These get 8 MSI/8 MSI-X vectors each. VFs are supported by # these 4 PFs only. [function "0"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x1 [function "1"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x2 [function "2"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x4 [function "3"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x8 @@ -145,7 +141,7 @@ wx_caps = all r_caps = all nvi = 32 - rssnvi = 8 + rssnvi = 32 niqflint = 512 nethctrl = 1024 neq = 2048 @@ -212,7 +208,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -224,7 +220,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -236,7 +232,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -248,7 +244,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -276,7 +272,7 @@ [fini] version = 0x1 - checksum = 0xf3e93001 + checksum = 0x4528a6ac # # $FreeBSD$ # Modified: stable/12/sys/dev/cxgbe/firmware/t6fw_cfg_hashfilter.txt ============================================================================== --- stable/12/sys/dev/cxgbe/firmware/t6fw_cfg_hashfilter.txt Wed Mar 27 22:09:35 2019 (r345617) +++ stable/12/sys/dev/cxgbe/firmware/t6fw_cfg_hashfilter.txt Wed Mar 27 22:21:09 2019 (r345618) @@ -81,54 +81,50 @@ # PFs 0-3. These get 8 MSI/8 MSI-X vectors each. VFs are supported by # these 4 PFs only. [function "0"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x1 [function "1"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x2 [function "2"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x4 [function "3"] - nvf = 4 wx_caps = all r_caps = all - nvi = 2 - rssnvi = 2 - niqflint = 4 - nethctrl = 4 - neq = 8 - nexactf = 4 + nvi = 1 + rssnvi = 0 + niqflint = 2 + nethctrl = 2 + neq = 4 + nexactf = 2 cmask = all pmask = 0x8 @@ -138,7 +134,7 @@ wx_caps = all r_caps = all nvi = 32 - rssnvi = 8 + rssnvi = 32 niqflint = 512 nethctrl = 1024 neq = 2048 @@ -195,7 +191,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -207,7 +203,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -219,7 +215,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -231,7 +227,7 @@ wx_caps = 0x82 r_caps = 0x86 nvi = 1 - rssnvi = 1 + rssnvi = 0 niqflint = 2 nethctrl = 2 neq = 4 @@ -259,7 +255,7 @@ [fini] version = 0x1 - checksum = 0xb577311e + checksum = 0x5e0e0eb7 # # $FreeBSD$ # From owner-svn-src-stable@freebsd.org Wed Mar 27 22:27:27 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4C43155D888; Wed, 27 Mar 2019 22:27:26 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 605556C480; Wed, 27 Mar 2019 22:27:26 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46125DB50; Wed, 27 Mar 2019 22:27:26 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RMRQbA073031; Wed, 27 Mar 2019 22:27:26 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RMRPbZ073028; Wed, 27 Mar 2019 22:27:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272227.x2RMRPbZ073028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 22:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345619 - in stable/12/sys/dev/cxgbe: . common X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 345619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 605556C480 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.996,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)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 22:27:27 -0000 Author: np Date: Wed Mar 27 22:27:25 2019 New Revision: 345619 URL: https://svnweb.freebsd.org/changeset/base/345619 Log: MFC r344519, r344682, and r344719. r344519: cxgbe(4): Use correct port_info in the call to is_bt(). This fixes a panic during configuration if the tx channel of a port isn't the same as its port id. Reported by: Fabrice Bruel Sponsored by: Chelsio Communications r344682: cxgbe(4): Don't forget to report link state to the kernel if the link is already up at attach. Reported by: Fabrice Bruel @ Orange Business Service Sponsored by: Chelsio Communications r344719: cxgbev(4): Enable 32b port capabilities in the VF driver. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/12/sys/dev/cxgbe/common/t4_hw.c Wed Mar 27 22:21:09 2019 (r345618) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Wed Mar 27 22:27:25 2019 (r345619) @@ -3910,7 +3910,7 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int m speed = fwcap_top_speed(lc->supported); /* Force AN on for BT cards. */ - if (is_bt(adap->port[port])) + if (is_bt(adap->port[adap->chan_map[port]])) aneg = lc->supported & FW_PORT_CAP32_ANEG; rcap = aneg | speed | fc | fec; Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 22:21:09 2019 (r345618) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 22:27:25 2019 (r345619) @@ -4970,6 +4970,8 @@ cxgbe_init_synchronized(struct vi_info *vi) callout_reset(&vi->tick, hz, vi_tick, vi); else callout_reset(&pi->tick, hz, cxgbe_tick, pi); + if (pi->link_cfg.link_ok) + t4_os_link_changed(pi); PORT_UNLOCK(pi); done: if (rc != 0) Modified: stable/12/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_vf.c Wed Mar 27 22:21:09 2019 (r345618) +++ stable/12/sys/dev/cxgbe/t4_vf.c Wed Mar 27 22:27:25 2019 (r345619) @@ -295,6 +295,12 @@ set_params__post_init(struct adapter *sc) val = 1; (void)t4vf_set_params(sc, 1, ¶m, &val); + /* Enable 32b port caps if the firmware supports it. */ + param = FW_PARAM_PFVF(PORT_CAPS32); + val = 1; + if (t4vf_set_params(sc, 1, ¶m, &val) == 0) + sc->params.port_caps32 = 1; + return (0); } From owner-svn-src-stable@freebsd.org Wed Mar 27 22:42:20 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2CD4155DE90; Wed, 27 Mar 2019 22:42:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 8430C6CF32; Wed, 27 Mar 2019 22:42:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60A2ADE9C; Wed, 27 Mar 2019 22:42:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RMgJBv090313; Wed, 27 Mar 2019 22:42:19 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RMgJuF090154; Wed, 27 Mar 2019 22:42:19 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272242.x2RMgJuF090154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 22:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345621 - in stable/12/sys: conf dev/cxgbe dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12/sys: conf dev/cxgbe dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Commit-Revision: 345621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8430C6CF32 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.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 22:42:20 -0000 Author: np Date: Wed Mar 27 22:42:18 2019 New Revision: 345621 URL: https://svnweb.freebsd.org/changeset/base/345621 Log: MFC r340651, r343264, r343269, and r345083. r340651: cxgbe(4): Update T4/5/6 firmwares to 1.22.0.3. Obtained from: Chelsio Communications Sponsored by: Chelsio Communications r343264: cxgbe(4): Use a truncated firmware header for version checks. All the version numbers are towards the begining of the header. Sponsored by: Chelsio Communications r343269: cxgbe(4): Allow negative values in hw.cxgbe.fw_install and take them to mean that the driver should taste the firmware in the KLD and use that firmware's version for all its fw_install checks. The driver gets firmware version information from compiled-in values by default and this change allows custom (or older/newer) firmware modules to be used with the stock driver. There is no change in default behavior. Sponsored by: Chelsio Communications r345083: cxgbe(4): Update T4/5/6 firmwares to 1.23.0.0. Obtained from: Chelsio Communications Sponsored by: Chelsio Communications Added: stable/12/sys/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu - copied unchanged from r345083, head/sys/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu stable/12/sys/dev/cxgbe/firmware/t5fw-1.23.0.0.bin.uu - copied unchanged from r345083, head/sys/dev/cxgbe/firmware/t5fw-1.23.0.0.bin.uu stable/12/sys/dev/cxgbe/firmware/t6fw-1.23.0.0.bin.uu - copied unchanged from r345083, head/sys/dev/cxgbe/firmware/t6fw-1.23.0.0.bin.uu Deleted: stable/12/sys/dev/cxgbe/firmware/t4fw-1.19.1.0.bin.uu stable/12/sys/dev/cxgbe/firmware/t5fw-1.19.1.0.bin.uu stable/12/sys/dev/cxgbe/firmware/t6fw-1.19.1.0.bin.uu Modified: stable/12/sys/conf/files stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h stable/12/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt stable/12/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/modules/cxgbe/t4_firmware/Makefile stable/12/sys/modules/cxgbe/t5_firmware/Makefile stable/12/sys/modules/cxgbe/t6_firmware/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Wed Mar 27 22:35:28 2019 (r345620) +++ stable/12/sys/conf/files Wed Mar 27 22:42:18 2019 (r345621) @@ -1479,7 +1479,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.19.1.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1513,7 +1513,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.19.1.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.23.0.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1547,7 +1547,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.19.1.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.23.0.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Copied: stable/12/sys/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu (from r345083, head/sys/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu Wed Mar 27 22:42:18 2019 (r345621, copy of r345083, head/sys/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu) @@ -0,0 +1,9944 @@ +/*- + * Copyright (c) 2018 Chelsio Communications, Inc. + * 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. + */ +begin-base64 644 t4fw +AAAEUAEXAAAAAQkEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAABDMEQgRKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAIAA +4QBgEAAAQADhAhAA4QIwAOECUADhAnAA4QAQCB/84UDhAHtwH/+zIB//sxgf/OAIH/+zHB//s0gf +/7NAH/+zRB//s3Af/7NoH/+zbB//qSQf/7DAIAcs8B/83gAf/6pEH/+pwB//quQf/5o8H/+wPB// +puggCwBgH/+sjAAA/4AAAB7AH/+PwB//rJgf/6yUH/+s+B//rcAqAAAAIAsEYCALBJAEAAAIBQAA +AIP/AACBAAAAABAAACALBNAgCwQwIAAJ+CADDdgf/4TwH/+AwB//rdBnRSMB782riZi63P4QMlR2 +H/+AAAAAPyggAxDMz////yALBfAQAAAAP////wIAAABAAAAAGgAAAB/84HQgoAAAH/+o3CAAHeAg +AB98gAAAAAAAgAD//v//AAAQAABAAAAgAc7YIAAjCCAAAAAgACNwIAsIwP//f///+///D/aAACAL +CPAgCwkgAAEAAAAEAAAf/6lQIAtTACALCbAgADToIAA2OCAAMxwgCwtQIAsKECALCqAgADFkIAsK +8FMAAAAA////UgAAAFEAAAAgAgMYH/+q+CAAOWAgBBOoH/+q8CALC3Af/5o0H/+qyCALDZAUAAAA +gAAAAnxQAACAAAAQgAAABoAAsAAAAAoAAP80kv//8A+AALEA4QGaAAACAAAgCw0gH/+XrAAAfkAg +Cw1gH/+rAAD/wAABAAAAKAAAAOAAAAAmAAAAAAD//x//kJAGAAAABYAAAB//pqgrAAAAIABVMCAL +VeAf/6h0A4AAAAf///8EAQAINQAAAAMAAAAAP///gEAAAAgP//8f////QUAAAEFAAQAABf//AQQB +AAEEAAAAAMAAPQAAAB//liAHAAAAgQQBAIEEAAAf/6q0AAA6mMMAAAAAAA//AEMAAB//qDwAAAgA +BAAAAB//mWwgC1ZAH/+ylB//sOAf/5V4AAYAAOEAegAf/5XgH/+awB//qugf/6skH/+aRB//mjAg +C1ZwAAMHgCALVuAIAAAAH/+YEAAgAAAAAAkAAAAwAv/8+H/AAAAAo/+7AKP/ugANAAAA4AMAAIP/ +tgAP////D//4AP8AAAAgC1cgIAsO0CALDwAgC1ewAA8AAAAKAAD//wAPH/+q7AP/wACD/8AAIAtY +MCALWKAf/6toH/+xUP9g8AAEgAAIH/+OQB//gFAARAAAH/+OgAGAwgAAAIEAH/+PgB//gGD/H/// +AMAAAPAAAACBgAAA/3///x//pXz/v/////8AAACAAAAAAIbdH/+bfB/84gAf/5CA7gAAAAAACcwf +/OIMDwAAACALD0Af/6t0AAAIzB//rIQf/5uEIAsRUCADCEDg//4AIAtMcB//nAAf/5c8H/+AcCAH +KvAAADAAAAAnEB//25AgC2XwIAtlwB//lhQf/6vkAAD//h//miTerb7vNAAAAD8AAAAf/7BYAJkA +AAAAiQYQAAcCAcCAAB//sDSZAAAAH/+xFACIAAiCgAABH/+wqP//8AADFQAAAxEAAAAPA/8f/6rE +IAEELCABCBgpAAAAAACJFCABDOwgAwuUAABAACADDsAMAAAAIAEX4B//sXAAACGwIAMLpB//q0Qf +/694H/+rBP8A/wDw8PDwqqqqqszMzMwf/6bwAAP//wAAJ/8gAwvoIAtmQCABKDgAD0JAIANfQB// +q5gACQAAAABIAIIAAAAgATzAH/+rVDsAAAgOAAAA0AAAAB//gLAAACKaAAAIUAAAH0Af/6sMIAsj +kCALI7AgCyPQ/9///wAJAAgf/7CkMAAAAH8AAAAf/6k4IAsm8AAAD/4gCyYgIAsmgCALJsAAAOAA +///3/yALJ4AgA2bIAACD/yAHMNgVoAAAIAcx0B//sGgAAAgGAACIzB//l8AABAP/CgAAACAHLWgg +By8IIActsIP/tiCD/7cAIAsnsOEAAAAzAAAAH/+xZAP/4AB///8AAD/2kB//sHAAACKoH/+pQAP/ +8AAf/5dgIAtJwCALSYAgC0ngH/+ycB//sGwAD///H/+rCCALaKAf/5pkIAB5qB//qVwgByp4IAAF +iB//pcAf/5WsH/+qNCALKDDABAAAH/+o9B//qOgf/6kAH/+vIB//rpQgA+vIIAsocB//qxwgAw+Q +H/+nACAAeojgAQAAH/+bgCALaWAgCyiwIADDEB//m3ggAMAQH/+RyCALaOAgC2kwH/+X4CALK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8PA2gCwUAAAAA//vgDaAMBQDAygzsNP2hBhWv+94A +AAAAbBAK5CIHKlAEgACIIv5A8BWvzwUA5UEVLWcCgADsPAgCIIEAAA9EAaRU5ExALlgEgAD1gCXS +oe4BAC2wB+zc/i2wBIAA5IAIZugNAADAINEPH8xx7RYAJcCBAACYEx3MbPUAJJqiAJ0A5cxsHyAE +gAD1wB9iEgCdAAzrEaW7KbKe7hYBJkAhAAD5ICWbogCdACuynQ3oCiiCwwi7Aee0AAWgGYAAjfia +FNMP96AiyJIAnQApUq7rzNIUoEGAAC5SrS+y8xvMVQ/oAegWAibL/QAA/8AfhmIAnQCZuP/AH8Zi +AJ0ALiAULWAHrt36IIYVp90BAC0kFPWgIW3SAJ0AGczDH8zDjiCINO3MWhpfAoAA5bsID3YCgADx +AAT6UAU1AINjKiEkBewCKCAHLmEB/OBGFeAUhQCUc/zgJhWgiBEA7MxFHEKCgAD5BgAMcAQFAPjg +BhWgCCUA7AAFA+BBAABtigIMAmEtIQksIAeUdf7hJhWgOKUA43YILu0CgAD5pgAOscwBAO12Bi5k +AoAADKoCD6oCmnQpIQkCKgL+wCQVoAwFAOW2nSzdAoAA+WYADbANBQBYaU7AINEPiBOIgPWAIBWg +iRUA9cYACjeIwQB5iRmUce/MixZL/QAA/uAGFeGZHQD44EYV4ABSAJRxiBMZzIiZcIiBCFgUmHKP *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Mar 27 22:51:52 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8AB0155E2B4; Wed, 27 Mar 2019 22:51:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 791F56D518; Wed, 27 Mar 2019 22:51:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BC39E021; Wed, 27 Mar 2019 22:51:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RMppBC095507; Wed, 27 Mar 2019 22:51:51 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RMpnEQ095497; Wed, 27 Mar 2019 22:51:49 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903272251.x2RMpnEQ095497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Mar 2019 22:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345622 - in stable/12/sys/dev/cxgbe: . common firmware tom X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12/sys/dev/cxgbe: . common firmware tom X-SVN-Commit-Revision: 345622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 791F56D518 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.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 22:51:52 -0000 Author: np Date: Wed Mar 27 22:51:48 2019 New Revision: 345622 URL: https://svnweb.freebsd.org/changeset/base/345622 Log: MFC r344654, r345334. r344654: cxgbe(4): Request high priority filter support explicitly, as required by recent firmwares. Sponsored by: Chelsio Communications r345334: cxgbe(4): Treat the viid as an opaque identifier. Recent firmwares prefer to use a different format for viid internally and this change allows them to do so. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/common/common.h stable/12/sys/dev/cxgbe/common/t4_hw.c stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_sched.c stable/12/sys/dev/cxgbe/t4_sge.c stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c stable/12/sys/dev/cxgbe/tom/t4_listen.c stable/12/sys/dev/cxgbe/tom/t4_tom.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 22:42:18 2019 (r345621) +++ stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 22:51:48 2019 (r345622) @@ -193,8 +193,10 @@ struct vi_info { int if_flags; uint16_t *rss, *nm_rss; - int smt_idx; /* for convenience */ - uint16_t viid; + uint16_t viid; /* opaque VI identifier */ + uint16_t smt_idx; + uint16_t vin; + uint8_t vfvld; int16_t xact_addr_filt;/* index of exact MAC address filter */ uint16_t rss_size; /* size of VI's RSS table slice */ uint16_t rss_base; /* start of VI's RSS table slice */ Modified: stable/12/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/12/sys/dev/cxgbe/common/common.h Wed Mar 27 22:42:18 2019 (r345621) +++ stable/12/sys/dev/cxgbe/common/common.h Wed Mar 27 22:51:48 2019 (r345622) @@ -379,8 +379,9 @@ struct adapter_params { uint32_t mps_bg_map; /* rx buffer group map for all ports (upto 4) */ - bool ulptx_memwrite_dsgl; /* use of T5 DSGL allowed */ - bool fr_nsmr_tpte_wr_support; /* FW support for FR_NSMR_TPTE_WR */ + bool ulptx_memwrite_dsgl; /* use of T5 DSGL allowed */ + bool fr_nsmr_tpte_wr_support; /* FW support for FR_NSMR_TPTE_WR */ + bool viid_smt_extn_support; /* FW returns vin, vfvld & smt index? */ }; #define CHELSIO_T4 0x4 @@ -762,10 +763,11 @@ int t4_cfg_pfvf(struct adapter *adap, unsigned int mbo int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, u16 *rss_size, + uint8_t *vfvld, uint16_t *vin, unsigned int portfunc, unsigned int idstype); int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, - u16 *rss_size); + u16 *rss_size, uint8_t *vfvld, uint16_t *vin); int t4_free_vi(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int viid); @@ -776,7 +778,7 @@ int t4_alloc_mac_filt(struct adapter *adap, unsigned i bool free, unsigned int naddr, const u8 **addr, u16 *idx, u64 *hash, bool sleep_ok); int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, - int idx, const u8 *addr, bool persist, bool add_smt); + int idx, const u8 *addr, bool persist, uint16_t *smt_idx); int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid, bool ucast, u64 vec, bool sleep_ok); int t4_enable_vi_params(struct adapter *adap, unsigned int mbox, Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/12/sys/dev/cxgbe/common/t4_hw.c Wed Mar 27 22:42:18 2019 (r345621) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Wed Mar 27 22:51:48 2019 (r345622) @@ -7221,6 +7221,7 @@ int t4_cfg_pfvf(struct adapter *adap, unsigned int mbo int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, u16 *rss_size, + uint8_t *vfvld, uint16_t *vin, unsigned int portfunc, unsigned int idstype) { int ret; @@ -7241,6 +7242,7 @@ int t4_alloc_vi_func(struct adapter *adap, unsigned in ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); if (ret) return ret; + ret = G_FW_VI_CMD_VIID(be16_to_cpu(c.type_to_viid)); if (mac) { memcpy(mac, c.mac, sizeof(c.mac)); @@ -7257,7 +7259,18 @@ int t4_alloc_vi_func(struct adapter *adap, unsigned in } if (rss_size) *rss_size = G_FW_VI_CMD_RSSSIZE(be16_to_cpu(c.norss_rsssize)); - return G_FW_VI_CMD_VIID(be16_to_cpu(c.type_to_viid)); + if (vfvld) { + *vfvld = adap->params.viid_smt_extn_support ? + G_FW_VI_CMD_VFVLD(be32_to_cpu(c.alloc_to_len16)) : + G_FW_VIID_VIVLD(ret); + } + if (vin) { + *vin = adap->params.viid_smt_extn_support ? + G_FW_VI_CMD_VIN(be32_to_cpu(c.alloc_to_len16)) : + G_FW_VIID_VIN(ret); + } + + return ret; } /** @@ -7277,10 +7290,10 @@ int t4_alloc_vi_func(struct adapter *adap, unsigned in */ int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, - u16 *rss_size) + u16 *rss_size, uint8_t *vfvld, uint16_t *vin) { return t4_alloc_vi_func(adap, mbox, port, pf, vf, nmac, mac, rss_size, - FW_VI_FUNC_ETH, 0); + vfvld, vin, FW_VI_FUNC_ETH, 0); } /** @@ -7457,7 +7470,7 @@ int t4_alloc_mac_filt(struct adapter *adap, unsigned i * @idx: index of existing filter for old value of MAC address, or -1 * @addr: the new MAC address value * @persist: whether a new MAC allocation should be persistent - * @add_smt: if true also add the address to the HW SMT + * @smt_idx: add MAC to SMT and return its index, or NULL * * Modifies an exact-match filter and sets it to the new MAC address if * @idx >= 0, or adds the MAC address to a new filter if @idx < 0. In the @@ -7472,7 +7485,7 @@ int t4_alloc_mac_filt(struct adapter *adap, unsigned i * MAC value. Note that this index may differ from @idx. */ int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, - int idx, const u8 *addr, bool persist, bool add_smt) + int idx, const u8 *addr, bool persist, uint16_t *smt_idx) { int ret, mode; struct fw_vi_mac_cmd c; @@ -7481,7 +7494,7 @@ int t4_change_mac(struct adapter *adap, unsigned int m if (idx < 0) /* new allocation */ idx = persist ? FW_VI_MAC_ADD_PERSIST_MAC : FW_VI_MAC_ADD_MAC; - mode = add_smt ? FW_VI_MAC_SMT_AND_MPSTCAM : FW_VI_MAC_MPS_TCAM_ENTRY; + mode = smt_idx ? FW_VI_MAC_SMT_AND_MPSTCAM : FW_VI_MAC_MPS_TCAM_ENTRY; memset(&c, 0, sizeof(c)); c.op_to_viid = cpu_to_be32(V_FW_CMD_OP(FW_VI_MAC_CMD) | @@ -7498,6 +7511,16 @@ int t4_change_mac(struct adapter *adap, unsigned int m ret = G_FW_VI_MAC_CMD_IDX(be16_to_cpu(p->valid_to_idx)); if (ret >= max_mac_addr) ret = -ENOMEM; + if (smt_idx) { + if (adap->params.viid_smt_extn_support) + *smt_idx = G_FW_VI_MAC_CMD_SMTID(be32_to_cpu(c.op_to_viid)); + else { + if (chip_id(adap) <= CHELSIO_T5) + *smt_idx = (viid & M_FW_VIID_VIN) << 1; + else + *smt_idx = viid & M_FW_VIID_VIN; + } + } } return ret; } @@ -8758,9 +8781,9 @@ int t4_port_init(struct adapter *adap, int mbox, int p { u8 addr[6]; int ret, i, j; - u16 rss_size; struct port_info *p = adap2pinfo(adap, port_id); u32 param, val; + struct vi_info *vi = &p->vi[0]; for (i = 0, j = -1; i <= p->port_id; i++) { do { @@ -8778,27 +8801,23 @@ int t4_port_init(struct adapter *adap, int mbox, int p t4_update_port_info(p); } - ret = t4_alloc_vi(adap, mbox, j, pf, vf, 1, addr, &rss_size); + ret = t4_alloc_vi(adap, mbox, j, pf, vf, 1, addr, &vi->rss_size, + &vi->vfvld, &vi->vin); if (ret < 0) return ret; - p->vi[0].viid = ret; - if (chip_id(adap) <= CHELSIO_T5) - p->vi[0].smt_idx = (ret & 0x7f) << 1; - else - p->vi[0].smt_idx = (ret & 0x7f); - p->vi[0].rss_size = rss_size; + vi->viid = ret; t4_os_set_hw_addr(p, addr); param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_RSSINFO) | - V_FW_PARAMS_PARAM_YZ(p->vi[0].viid); + V_FW_PARAMS_PARAM_YZ(vi->viid); ret = t4_query_params(adap, mbox, pf, vf, 1, ¶m, &val); if (ret) - p->vi[0].rss_base = 0xffff; + vi->rss_base = 0xffff; else { /* MPASS((val >> 16) == rss_size); */ - p->vi[0].rss_base = val & 0xffff; + vi->rss_base = val & 0xffff; } return 0; Modified: stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h ============================================================================== --- stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h Wed Mar 27 22:42:18 2019 (r345621) +++ stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h Wed Mar 27 22:51:48 2019 (r345622) @@ -4798,6 +4798,7 @@ enum fw_params_param_dev { FW_PARAMS_PARAM_DEV_RI_WRITE_CMPL_WR = 0x24, FW_PARAMS_PARAM_DEV_ADD_SMAC = 0x25, FW_PARAMS_PARAM_DEV_HPFILTER_REGION_SUPPORT = 0x26, + FW_PARAMS_PARAM_DEV_OPAQUE_VIID_SMT_EXTN = 0x27, }; /* @@ -6502,6 +6503,19 @@ struct fw_vi_cmd { (((x) >> S_FW_VI_CMD_FREE) & M_FW_VI_CMD_FREE) #define F_FW_VI_CMD_FREE V_FW_VI_CMD_FREE(1U) +#define S_FW_VI_CMD_VFVLD 24 +#define M_FW_VI_CMD_VFVLD 0x1 +#define V_FW_VI_CMD_VFVLD(x) ((x) << S_FW_VI_CMD_VFVLD) +#define G_FW_VI_CMD_VFVLD(x) \ + (((x) >> S_FW_VI_CMD_VFVLD) & M_FW_VI_CMD_VFVLD) +#define F_FW_VI_CMD_VFVLD V_FW_VI_CMD_VFVLD(1U) + +#define S_FW_VI_CMD_VIN 16 +#define M_FW_VI_CMD_VIN 0xff +#define V_FW_VI_CMD_VIN(x) ((x) << S_FW_VI_CMD_VIN) +#define G_FW_VI_CMD_VIN(x) \ + (((x) >> S_FW_VI_CMD_VIN) & M_FW_VI_CMD_VIN) + #define S_FW_VI_CMD_TYPE 15 #define M_FW_VI_CMD_TYPE 0x1 #define V_FW_VI_CMD_TYPE(x) ((x) << S_FW_VI_CMD_TYPE) @@ -6607,6 +6621,12 @@ struct fw_vi_mac_cmd { } exact_vni[2]; } u; }; + +#define S_FW_VI_MAC_CMD_SMTID 12 +#define M_FW_VI_MAC_CMD_SMTID 0xff +#define V_FW_VI_MAC_CMD_SMTID(x) ((x) << S_FW_VI_MAC_CMD_SMTID) +#define G_FW_VI_MAC_CMD_SMTID(x) \ + (((x) >> S_FW_VI_MAC_CMD_SMTID) & M_FW_VI_MAC_CMD_SMTID) #define S_FW_VI_MAC_CMD_VIID 0 #define M_FW_VI_MAC_CMD_VIID 0xfff Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 22:42:18 2019 (r345621) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 22:51:48 2019 (r345622) @@ -608,6 +608,7 @@ static int cfg_itype_and_nqueues(struct adapter *, str static int contact_firmware(struct adapter *); static int partition_resources(struct adapter *); static int get_params__pre_init(struct adapter *); +static int set_params__pre_init(struct adapter *); static int get_params__post_init(struct adapter *); static int set_params__post_init(struct adapter *); static void t4_set_desc(struct adapter *); @@ -2485,17 +2486,13 @@ alloc_extra_vi(struct adapter *sc, struct port_info *p device_get_nameunit(vi->dev))); func = vi_mac_funcs[index]; rc = t4_alloc_vi_func(sc, sc->mbox, pi->tx_chan, sc->pf, 0, 1, - vi->hw_addr, &vi->rss_size, func, 0); + vi->hw_addr, &vi->rss_size, &vi->vfvld, &vi->vin, func, 0); if (rc < 0) { device_printf(vi->dev, "failed to allocate virtual interface %d" "for port %d: %d\n", index, pi->port_id, -rc); return (-rc); } vi->viid = rc; - if (chip_id(sc) <= CHELSIO_T5) - vi->smt_idx = (rc & 0x7f) << 1; - else - vi->smt_idx = (rc & 0x7f); if (vi->rss_size == 1) { /* @@ -3942,6 +3939,7 @@ apply_cfg_and_initialize(struct adapter *sc, char *cfg } t4_tweak_chip_settings(sc); + set_params__pre_init(sc); /* get basic stuff going */ rc = -t4_fw_initialize(sc, sc->mbox); @@ -4064,6 +4062,44 @@ get_params__pre_init(struct adapter *sc) } /* + * Any params that need to be set before FW_INITIALIZE. + */ +static int +set_params__pre_init(struct adapter *sc) +{ + int rc = 0; + uint32_t param, val; + + if (chip_id(sc) >= CHELSIO_T6) { + param = FW_PARAM_DEV(HPFILTER_REGION_SUPPORT); + val = 1; + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + /* firmwares < 1.20.1.0 do not have this param. */ + if (rc == FW_EINVAL && sc->params.fw_vers < + (V_FW_HDR_FW_VER_MAJOR(1) | V_FW_HDR_FW_VER_MINOR(20) | + V_FW_HDR_FW_VER_MICRO(1) | V_FW_HDR_FW_VER_BUILD(0))) { + rc = 0; + } + if (rc != 0) { + device_printf(sc->dev, + "failed to enable high priority filters :%d.\n", + rc); + } + } + + /* Enable opaque VIIDs with firmwares that support it. */ + param = FW_PARAM_DEV(OPAQUE_VIID_SMT_EXTN); + val = 1; + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + if (rc == 0 && val == 1) + sc->params.viid_smt_extn_support = true; + else + sc->params.viid_smt_extn_support = false; + + return (rc); +} + +/* * Retrieve various parameters that are of interest to the driver. The device * has been initialized by the firmware at this point. */ @@ -4106,20 +4142,6 @@ get_params__post_init(struct adapter *sc) if (chip_id(sc) >= CHELSIO_T6) { -#ifdef INVARIANTS - if (sc->params.fw_vers >= - (V_FW_HDR_FW_VER_MAJOR(1) | V_FW_HDR_FW_VER_MINOR(20) | - V_FW_HDR_FW_VER_MICRO(1) | V_FW_HDR_FW_VER_BUILD(0))) { - /* - * Note that the code to enable the region should run - * before t4_fw_initialize and not here. This is just a - * reminder to add said code. - */ - device_printf(sc->dev, - "hpfilter region not enabled.\n"); - } -#endif - sc->tids.tid_base = t4_read_reg(sc, A_LE_DB_ACTIVE_TABLE_START_INDEX); @@ -4786,7 +4808,7 @@ update_mac_settings(struct ifnet *ifp, int flags) bcopy(IF_LLADDR(ifp), ucaddr, sizeof(ucaddr)); rc = t4_change_mac(sc, sc->mbox, vi->viid, vi->xact_addr_filt, - ucaddr, true, true); + ucaddr, true, &vi->smt_idx); if (rc < 0) { rc = -rc; if_printf(ifp, "change_mac failed: %d\n", rc); @@ -5707,7 +5729,7 @@ get_regs(struct adapter *sc, struct t4_regdump *regs, #define A_PL_INDIR_DATA 0x1fc static uint64_t -read_vf_stat(struct adapter *sc, unsigned int viid, int reg) +read_vf_stat(struct adapter *sc, u_int vin, int reg) { u32 stats[2]; @@ -5717,8 +5739,7 @@ read_vf_stat(struct adapter *sc, unsigned int viid, in stats[1] = t4_read_reg(sc, VF_MPS_REG(reg + 4)); } else { t4_write_reg(sc, A_PL_INDIR_CMD, V_PL_AUTOINC(1) | - V_PL_VFID(G_FW_VIID_VIN(viid)) | - V_PL_ADDR(VF_MPS_REG(reg))); + V_PL_VFID(vin) | V_PL_ADDR(VF_MPS_REG(reg))); stats[0] = t4_read_reg(sc, A_PL_INDIR_DATA); stats[1] = t4_read_reg(sc, A_PL_INDIR_DATA); } @@ -5726,12 +5747,11 @@ read_vf_stat(struct adapter *sc, unsigned int viid, in } static void -t4_get_vi_stats(struct adapter *sc, unsigned int viid, - struct fw_vi_stats_vf *stats) +t4_get_vi_stats(struct adapter *sc, u_int vin, struct fw_vi_stats_vf *stats) { #define GET_STAT(name) \ - read_vf_stat(sc, viid, A_MPS_VF_STAT_##name##_L) + read_vf_stat(sc, vin, A_MPS_VF_STAT_##name##_L) stats->tx_bcast_bytes = GET_STAT(TX_VF_BCAST_BYTES); stats->tx_bcast_frames = GET_STAT(TX_VF_BCAST_FRAMES); @@ -5754,12 +5774,11 @@ t4_get_vi_stats(struct adapter *sc, unsigned int viid, } static void -t4_clr_vi_stats(struct adapter *sc, unsigned int viid) +t4_clr_vi_stats(struct adapter *sc, u_int vin) { int reg; - t4_write_reg(sc, A_PL_INDIR_CMD, V_PL_AUTOINC(1) | - V_PL_VFID(G_FW_VIID_VIN(viid)) | + t4_write_reg(sc, A_PL_INDIR_CMD, V_PL_AUTOINC(1) | V_PL_VFID(vin) | V_PL_ADDR(VF_MPS_REG(A_MPS_VF_STAT_TX_VF_BCAST_BYTES_L))); for (reg = A_MPS_VF_STAT_TX_VF_BCAST_BYTES_L; reg <= A_MPS_VF_STAT_RX_VF_ERR_FRAMES_H; reg += 4) @@ -5781,7 +5800,7 @@ vi_refresh_stats(struct adapter *sc, struct vi_info *v return; mtx_lock(&sc->reg_lock); - t4_get_vi_stats(sc, vi->viid, &vi->stats); + t4_get_vi_stats(sc, vi->vin, &vi->stats); getmicrotime(&vi->last_refreshed); mtx_unlock(&sc->reg_lock); } @@ -9982,7 +10001,7 @@ t4_ioctl(struct cdev *dev, unsigned long cmd, caddr_t mtx_lock(&sc->reg_lock); for_each_vi(pi, v, vi) { if (vi->flags & VI_INIT_DONE) - t4_clr_vi_stats(sc, vi->viid); + t4_clr_vi_stats(sc, vi->vin); } bg_map = pi->mps_bg_map; v = 0; /* reuse */ Modified: stable/12/sys/dev/cxgbe/t4_sched.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sched.c Wed Mar 27 22:42:18 2019 (r345621) +++ stable/12/sys/dev/cxgbe/t4_sched.c Wed Mar 27 22:51:48 2019 (r345622) @@ -799,9 +799,8 @@ failed: cst->tx_total = cst->tx_credits; cst->plen = 0; cst->ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT) | - V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(G_FW_VIID_PFN(vi->viid)) | - V_TXPKT_VF(G_FW_VIID_VIN(vi->viid)) | - V_TXPKT_VF_VLD(G_FW_VIID_VIVLD(vi->viid))); + V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(sc->pf) | + V_TXPKT_VF(vi->vin) | V_TXPKT_VF_VLD(vi->vfvld)); /* * Queues will be selected later when the connection flowid is available. Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 27 22:42:18 2019 (r345621) +++ stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 27 22:51:48 2019 (r345622) @@ -3568,9 +3568,8 @@ alloc_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm nm_txq->nid = idx; nm_txq->iqidx = iqidx; nm_txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT) | - V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(G_FW_VIID_PFN(vi->viid)) | - V_TXPKT_VF(G_FW_VIID_VIN(vi->viid)) | - V_TXPKT_VF_VLD(G_FW_VIID_VIVLD(vi->viid))); + V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(sc->pf) | + V_TXPKT_VF(vi->vin) | V_TXPKT_VF_VLD(vi->vfvld)); nm_txq->cntxt_id = INVALID_NM_TXQ_CNTXT_ID; snprintf(name, sizeof(name), "%d", idx); @@ -3971,10 +3970,8 @@ alloc_txq(struct vi_info *vi, struct sge_txq *txq, int V_TXPKT_INTF(pi->tx_chan)); else txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT) | - V_TXPKT_INTF(pi->tx_chan) | - V_TXPKT_PF(G_FW_VIID_PFN(vi->viid)) | - V_TXPKT_VF(G_FW_VIID_VIN(vi->viid)) | - V_TXPKT_VF_VLD(G_FW_VIID_VIVLD(vi->viid))); + V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(sc->pf) | + V_TXPKT_VF(vi->vin) | V_TXPKT_VF_VLD(vi->vfvld)); txq->tc_idx = -1; txq->sdesc = malloc(eq->sidx * sizeof(struct tx_sdesc), M_CXGBE, M_ZERO | M_WAITOK); @@ -5547,7 +5544,7 @@ send_etid_flowc_wr(struct cxgbe_snd_tag *cst, struct p struct vi_info *vi) { struct wrq_cookie cookie; - u_int pfvf = G_FW_VIID_PFN(vi->viid) << S_FW_VIID_PFN; + u_int pfvf = pi->adapter->pf << S_FW_VIID_PFN; struct fw_flowc_wr *flowc; mtx_assert(&cst->lock, MA_OWNED); Modified: stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Mar 27 22:42:18 2019 (r345621) +++ stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Mar 27 22:51:48 2019 (r345622) @@ -107,7 +107,7 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par struct vi_info *vi = toep->vi; struct port_info *pi = vi->pi; struct adapter *sc = pi->adapter; - unsigned int pfvf = G_FW_VIID_PFN(vi->viid) << S_FW_VIID_PFN; + unsigned int pfvf = sc->pf << S_FW_VIID_PFN; struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; KASSERT(!(toep->flags & TPF_FLOWC_WR_SENT), Modified: stable/12/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_listen.c Wed Mar 27 22:42:18 2019 (r345621) +++ stable/12/sys/dev/cxgbe/tom/t4_listen.c Wed Mar 27 22:51:48 2019 (r345622) @@ -356,7 +356,7 @@ send_reset_synqe(struct toedev *tod, struct synq_entry struct sge_wrq *ofld_txq; struct sge_ofld_rxq *ofld_rxq; const int nparams = 6; - unsigned int pfvf = G_FW_VIID_PFN(vi->viid) << S_FW_VIID_PFN; + const u_int pfvf = sc->pf << S_FW_VIID_PFN; INP_WLOCK_ASSERT(synqe->lctx->inp); Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.c Wed Mar 27 22:42:18 2019 (r345621) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.c Wed Mar 27 22:51:48 2019 (r345622) @@ -633,7 +633,6 @@ select_ntuple(struct vi_info *vi, struct l2t_entry *e) { struct adapter *sc = vi->pi->adapter; struct tp_params *tp = &sc->params.tp; - uint16_t viid = vi->viid; uint64_t ntuple = 0; /* @@ -650,12 +649,9 @@ select_ntuple(struct vi_info *vi, struct l2t_entry *e) ntuple |= (uint64_t)IPPROTO_TCP << tp->protocol_shift; if (tp->vnic_shift >= 0 && tp->ingress_config & F_VNIC) { - uint32_t vf = G_FW_VIID_VIN(viid); - uint32_t pf = G_FW_VIID_PFN(viid); - uint32_t vld = G_FW_VIID_VIVLD(viid); - - ntuple |= (uint64_t)(V_FT_VNID_ID_VF(vf) | V_FT_VNID_ID_PF(pf) | - V_FT_VNID_ID_VLD(vld)) << tp->vnic_shift; + ntuple |= (uint64_t)(V_FT_VNID_ID_VF(vi->vin) | + V_FT_VNID_ID_PF(sc->pf) | V_FT_VNID_ID_VLD(vi->vfvld)) << + tp->vnic_shift; } if (is_t4(sc)) From owner-svn-src-stable@freebsd.org Thu Mar 28 06:10:43 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB0FB154CA3D; Thu, 28 Mar 2019 06:10:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 903CC86BB6; Thu, 28 Mar 2019 06:10:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BFD71AF6F; Thu, 28 Mar 2019 06:10:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2S6Agrl021887; Thu, 28 Mar 2019 06:10:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S6Ag27021886; Thu, 28 Mar 2019 06:10:42 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903280610.x2S6Ag27021886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 28 Mar 2019 06:10: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: r345629 - stable/11/sys/dev/cxgbe/common X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/common X-SVN-Commit-Revision: 345629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 903CC86BB6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 06:10:43 -0000 Author: np Date: Thu Mar 28 06:10:41 2019 New Revision: 345629 URL: https://svnweb.freebsd.org/changeset/base/345629 Log: MFC r329788 (by jhb@): Bring in additional constants and message fields for TLS-related messages. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/common/t4_msg.h stable/11/sys/dev/cxgbe/common/t4_tcb.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_msg.h Thu Mar 28 03:48:51 2019 (r345628) +++ stable/11/sys/dev/cxgbe/common/t4_msg.h Thu Mar 28 06:10:41 2019 (r345629) @@ -3102,7 +3102,8 @@ struct cpl_rx_mps_pkt { struct cpl_tx_tls_sfo { __be32 op_to_seg_len; __be32 pld_len; - __be64 rsvd; + __be32 type_protover; + __be32 r1_lo; __be32 seqno_numivs; __be32 ivgen_hdrlen; __be64 scmd1; @@ -3126,15 +3127,28 @@ struct cpl_tx_tls_sfo { #define V_CPL_TX_TLS_SFO_CPL_LEN(x) ((x) << S_CPL_TX_TLS_SFO_CPL_LEN) #define G_CPL_TX_TLS_SFO_CPL_LEN(x) \ (((x) >> S_CPL_TX_TLS_SFO_CPL_LEN) & M_CPL_TX_TLS_SFO_CPL_LEN) + #define S_CPL_TX_TLS_SFO_SEG_LEN 0 #define M_CPL_TX_TLS_SFO_SEG_LEN 0xffff #define V_CPL_TX_TLS_SFO_SEG_LEN(x) ((x) << S_CPL_TX_TLS_SFO_SEG_LEN) #define G_CPL_TX_TLS_SFO_SEG_LEN(x) \ (((x) >> S_CPL_TX_TLS_SFO_SEG_LEN) & M_CPL_TX_TLS_SFO_SEG_LEN) +#define S_CPL_TX_TLS_SFO_TYPE 24 +#define M_CPL_TX_TLS_SFO_TYPE 0xff +#define V_CPL_TX_TLS_SFO_TYPE(x) ((x) << S_CPL_TX_TLS_SFO_TYPE) +#define G_CPL_TX_TLS_SFO_TYPE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_TYPE) & M_CPL_TX_TLS_SFO_TYPE) + +#define S_CPL_TX_TLS_SFO_PROTOVER 8 +#define M_CPL_TX_TLS_SFO_PROTOVER 0xffff +#define V_CPL_TX_TLS_SFO_PROTOVER(x) ((x) << S_CPL_TX_TLS_SFO_PROTOVER) +#define G_CPL_TX_TLS_SFO_PROTOVER(x) \ + (((x) >> S_CPL_TX_TLS_SFO_PROTOVER) & M_CPL_TX_TLS_SFO_PROTOVER) + struct cpl_tls_data { RSS_HDR - __be32 op_tid; + union opcode_tid ot; __be32 length_pkd; __be32 seq; __be32 r1; @@ -3160,7 +3174,7 @@ struct cpl_tls_data { struct cpl_rx_tls_cmp { RSS_HDR - __be32 op_tid; + union opcode_tid ot; __be32 pdulength_length; __be32 seq; __be32 ddp_report; Modified: stable/11/sys/dev/cxgbe/common/t4_tcb.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_tcb.h Thu Mar 28 03:48:51 2019 (r345628) +++ stable/11/sys/dev/cxgbe/common/t4_tcb.h Thu Mar 28 06:10:41 2019 (r345629) @@ -495,6 +495,54 @@ #define M_TCB_RX_DDP_BUF1_TAG 0xffffffffULL #define V_TCB_RX_DDP_BUF1_TAG(x) ((x) << S_TCB_RX_DDP_BUF1_TAG) +/* 855:832 */ +#define W_TCB_RX_TLS_BUF_OFFSET 26 +#define S_TCB_RX_TLS_BUF_OFFSET 0 +#define M_TCB_RX_TLS_BUF_OFFSET 0xffffffULL +#define V_TCB_RX_TLS_BUF_OFFSET(x) ((x) << S_TCB_RX_TLS_BUF_OFFSET) + +/* 876:856 */ +#define W_TCB_RX_TLS_BUF_LEN 26 +#define S_TCB_RX_TLS_BUF_LEN 24 +#define M_TCB_RX_TLS_BUF_LEN 0xffffffULL +#define V_TCB_RX_TLS_BUF_LEN(x) ((__u64)(x) << S_TCB_RX_TLS_BUF_LEN) + +/* 895:880 */ +#define W_TCB_RX_TLS_FLAGS 26 +#define S_TCB_RX_TLS_FLAGS 48 +#define M_TCB_RX_TLS_FLAGS 0xffffULL +#define V_TCB_RX_TLS_FLAGS(x) ((__u64)(x) << S_TCB_RX_TLS_FLAGS) + +/* 959:896 */ +#define W_TCB_TLS_SEQ 28 +#define S_TCB_TLS_SEQ 0 +#define M_TCB_TLS_SEQ 0xffffffffffffffffULL +#define V_TCB_TLS_SEQ(x) ((__u64)(x) << S_TCB_TLS_SEQ) + +/* 991:960 */ +#define W_TCB_RX_TLS_BUF_TAG 30 +#define S_TCB_RX_TLS_BUF_TAG 0 +#define M_TCB_RX_TLS_BUF_TAG 0xffffffffULL +#define V_TCB_RX_TLS_BUF_TAG(x) ((x) << S_TCB_RX_TLS_BUF_TAG) + +/* 1023:992 */ +#define W_TCB_RX_TLS_KEY_TAG 31 +#define S_TCB_RX_TLS_KEY_TAG 0 +#define M_TCB_RX_TLS_KEY_TAG 0xffffffffULL +#define V_TCB_RX_TLS_KEY_TAG(x) ((x) << S_TCB_RX_TLS_KEY_TAG) + +#define S_TF_TLS_KEY_SIZE 7 +#define V_TF_TLS_KEY_SIZE(x) ((x) << S_TF_TLS_KEY_SIZE) + +#define S_TF_TLS_CONTROL 2 +#define V_TF_TLS_CONTROL(x) ((x) << S_TF_TLS_CONTROL) + +#define S_TF_TLS_ACTIVE 1 +#define V_TF_TLS_ACTIVE(x) ((x) << S_TF_TLS_ACTIVE) + +#define S_TF_TLS_ENABLE 0 +#define V_TF_TLS_ENABLE(x) ((x) << S_TF_TLS_ENABLE) + #define S_TF_MIGRATING 0 #define V_TF_MIGRATING(x) ((x) << S_TF_MIGRATING) From owner-svn-src-stable@freebsd.org Thu Mar 28 08:38:32 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B46061551326; Thu, 28 Mar 2019 08:38:32 +0000 (UTC) (envelope-from tsoome@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 56DE28B603; Thu, 28 Mar 2019 08:38:32 +0000 (UTC) (envelope-from tsoome@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 16EF81C91F; Thu, 28 Mar 2019 08:38:32 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2S8cVDd097892; Thu, 28 Mar 2019 08:38:31 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S8cVci097891; Thu, 28 Mar 2019 08:38:31 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201903280838.x2S8cVci097891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 28 Mar 2019 08:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345631 - stable/12/stand/libsa X-SVN-Group: stable-12 X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: stable/12/stand/libsa X-SVN-Commit-Revision: 345631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 56DE28B603 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.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.938,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 08:38:33 -0000 Author: tsoome Date: Thu Mar 28 08:38:31 2019 New Revision: 345631 URL: https://svnweb.freebsd.org/changeset/base/345631 Log: MFC: r344248,r344387 cd9660: dirmatch fails to unmatch when name is prefix for directory record Loader does fail to properly match the file name in directory record and does open file based on prefix match. The cd9660_open() does pass whole path to dirmatch() and we need to compare only the current path component, not full path. Additinally, skip over duplicate / (if any) and check if the last component in the path was meant to be directory (having trailing /). If it is in fact a file, error out. Modified: stable/12/stand/libsa/cd9660.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/libsa/cd9660.c ============================================================================== --- stable/12/stand/libsa/cd9660.c Thu Mar 28 08:30:45 2019 (r345630) +++ stable/12/stand/libsa/cd9660.c Thu Mar 28 08:38:31 2019 (r345631) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); */ #include #include +#include #include #include #include @@ -227,8 +228,8 @@ static int dirmatch(struct open_file *f, const char *path, struct iso_directory_record *dp, int use_rrip, int lenskip) { - size_t len; - char *cp; + size_t len, plen; + char *cp, *sep; int i, icase; if (use_rrip) @@ -241,6 +242,17 @@ dirmatch(struct open_file *f, const char *path, struct icase = 1; } else icase = 0; + + sep = strchr(path, '/'); + if (sep != NULL) { + plen = sep - path; + } else { + plen = strlen(path); + } + + if (plen != len) + return (0); + for (i = len; --i >= 0; path++, cp++) { if (!*path || *path == '/') break; @@ -279,6 +291,7 @@ cd9660_open(const char *path, struct open_file *f) struct iso_directory_record rec; struct iso_directory_record *dp = NULL; int rc, first, use_rrip, lenskip; + bool isdir = false; /* First find the volume descriptor */ buf = malloc(buf_size = ISO_DEFAULT_BLOCK_SIZE); @@ -368,7 +381,24 @@ cd9660_open(const char *path, struct open_file *f) rec = *dp; while (*path && *path != '/') /* look for next component */ path++; - if (*path) path++; /* skip '/' */ + + if (*path) /* this component was directory */ + isdir = true; + + while (*path == '/') + path++; /* skip '/' */ + + if (*path) /* We do have next component. */ + isdir = false; + } + + /* + * if the path had trailing / but the path does point to file, + * report the error ENOTDIR. + */ + if (isdir == true && (isonum_711(rec.flags) & 2) == 0) { + rc = ENOTDIR; + goto out; } /* allocate file system specific data structure */ From owner-svn-src-stable@freebsd.org Thu Mar 28 09:16:09 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B793415538D3; Thu, 28 Mar 2019 09:16: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 61FF58D4A6; Thu, 28 Mar 2019 09:16:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EDA11D053; Thu, 28 Mar 2019 09:16:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2S9G8Av018978; Thu, 28 Mar 2019 09:16:08 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S9G0au018943; Thu, 28 Mar 2019 09:16:00 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903280916.x2S9G0au018943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 28 Mar 2019 09:16:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345634 - in stable/12: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn... X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable/12: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/dev/usb/wlan sys/dev... X-SVN-Commit-Revision: 345634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 61FF58D4A6 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.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 09:16:09 -0000 Author: avos Date: Thu Mar 28 09:16:00 2019 New Revision: 345634 URL: https://svnweb.freebsd.org/changeset/base/345634 Log: MFC r344990: Fix ieee80211_radiotap(9) usage in wireless drivers: - Alignment issues: * Add missing __packed attributes + padding across all drivers; in most places there was an assumption that padding will be always minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - padding was just missing. * Add __aligned(8) attribute for all Rx radiotap headers since they can contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so just drop the attribute here. Refresh ieee80211_radiotap(9) man page accordingly. - Since net80211 automatically updates channel frequency / flags in ieee80211_radiotap_chan_change() drop duplicate setup for these fields in drivers. Modified: stable/12/share/man/man9/ieee80211_radiotap.9 stable/12/sys/dev/ath/if_athioctl.h stable/12/sys/dev/bwi/if_bwi.c stable/12/sys/dev/bwi/if_bwivar.h stable/12/sys/dev/bwn/if_bwn.c stable/12/sys/dev/bwn/if_bwnvar.h stable/12/sys/dev/ipw/if_ipwvar.h stable/12/sys/dev/iwi/if_iwivar.h stable/12/sys/dev/iwm/if_iwmvar.h stable/12/sys/dev/iwn/if_iwn.c stable/12/sys/dev/iwn/if_iwnvar.h stable/12/sys/dev/malo/if_maloioctl.h stable/12/sys/dev/mwl/if_mwlioctl.h stable/12/sys/dev/otus/if_otus.c stable/12/sys/dev/otus/if_otusreg.h stable/12/sys/dev/ral/rt2560var.h stable/12/sys/dev/ral/rt2661var.h stable/12/sys/dev/ral/rt2860var.h stable/12/sys/dev/rtwn/if_rtwn.c stable/12/sys/dev/rtwn/if_rtwnvar.h stable/12/sys/dev/usb/wlan/if_rsu.c stable/12/sys/dev/usb/wlan/if_rsureg.h stable/12/sys/dev/usb/wlan/if_rumvar.h stable/12/sys/dev/usb/wlan/if_run.c stable/12/sys/dev/usb/wlan/if_runvar.h stable/12/sys/dev/usb/wlan/if_uathvar.h stable/12/sys/dev/usb/wlan/if_upgtvar.h stable/12/sys/dev/usb/wlan/if_uralvar.h stable/12/sys/dev/usb/wlan/if_urtw.c stable/12/sys/dev/usb/wlan/if_urtwvar.h stable/12/sys/dev/usb/wlan/if_zydreg.h stable/12/sys/dev/wi/if_wireg.h stable/12/sys/dev/wpi/if_wpivar.h stable/12/sys/dev/wtap/if_wtapioctl.h Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/ieee80211_radiotap.9 ============================================================================== --- stable/12/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:16:00 2019 (r345634) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2009 +.Dd March 11, 2019 .Dt IEEE80211_RADIOTAP 9 .Os .Sh NAME @@ -257,7 +257,7 @@ struct wi_rx_radiotap_header { uint16_t wr_chan_flags; uint8_t wr_antsignal; uint8_t wr_antnoise; -} __packed; +} __packed __aligned(8); .Ed .Pp and transmit definitions for the Atheros driver: Modified: stable/12/sys/dev/ath/if_athioctl.h ============================================================================== --- stable/12/sys/dev/ath/if_athioctl.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/ath/if_athioctl.h Thu Mar 28 09:16:00 2019 (r345634) @@ -373,7 +373,7 @@ struct ath_rx_radiotap_header { */ struct ath_radiotap_vendor_hdr wr_v; #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ -} __packed; +} __packed __aligned(8); #define ATH_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/12/sys/dev/bwi/if_bwi.c Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/bwi/if_bwi.c Thu Mar 28 09:16:00 2019 (r345634) @@ -1729,15 +1729,6 @@ bwi_set_channel(struct ieee80211com *ic) bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0); sc->sc_rates = ieee80211_get_ratetable(c); - - /* - * Setup radio tap channel freq and flags - */ - sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq = - htole16(c->ic_freq); - sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags = - htole16(c->ic_flags & 0xffff); - BWI_UNLOCK(sc); } Modified: stable/12/sys/dev/bwi/if_bwivar.h ============================================================================== --- stable/12/sys/dev/bwi/if_bwivar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/bwi/if_bwivar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -513,7 +513,7 @@ struct bwi_tx_radiotap_hdr { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define BWI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -533,7 +533,7 @@ struct bwi_rx_radiotap_hdr { int8_t wr_antsignal; int8_t wr_antnoise; /* TODO: sq */ -}; +} __packed __aligned(8); struct bwi_vap { struct ieee80211vap bv_vap; Modified: stable/12/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/12/sys/dev/bwn/if_bwn.c Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/bwn/if_bwn.c Thu Mar 28 09:16:00 2019 (r345634) @@ -2001,14 +2001,6 @@ bwn_set_channel(struct ieee80211com *ic) bwn_mac_enable(mac); fail: - /* - * Setup radio tap channel freq and flags - */ - sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq = - htole16(ic->ic_curchan->ic_freq); - sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags = - htole16(ic->ic_curchan->ic_flags & 0xffff); - BWN_UNLOCK(sc); } Modified: stable/12/sys/dev/bwn/if_bwnvar.h ============================================================================== --- stable/12/sys/dev/bwn/if_bwnvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/bwn/if_bwnvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -570,7 +570,7 @@ struct bwn_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define BWN_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -588,7 +588,7 @@ struct bwn_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; struct bwn_stats { int32_t rtsfail; Modified: stable/12/sys/dev/ipw/if_ipwvar.h ============================================================================== --- stable/12/sys/dev/ipw/if_ipwvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/ipw/if_ipwvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -57,11 +57,12 @@ struct ipw_soft_buf { struct ipw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; uint8_t wr_flags; + uint8_t wr_pad; uint16_t wr_chan_freq; uint16_t wr_chan_flags; int8_t wr_antsignal; int8_t wr_antnoise; -}; +} __packed __aligned(8); #define IPW_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -72,9 +73,10 @@ struct ipw_rx_radiotap_header { struct ipw_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define IPW_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/iwi/if_iwivar.h ============================================================================== --- stable/12/sys/dev/iwi/if_iwivar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/iwi/if_iwivar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -38,7 +38,7 @@ struct iwi_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; uint8_t wr_antenna; -}; +} __packed __aligned(8); #define IWI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -51,9 +51,10 @@ struct iwi_rx_radiotap_header { struct iwi_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define IWI_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/iwm/if_iwmvar.h ============================================================================== --- stable/12/sys/dev/iwm/if_iwmvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/iwm/if_iwmvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -113,7 +113,7 @@ struct iwm_rx_radiotap_header { uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; -} __packed; +} __packed __aligned(8); #define IWM_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: stable/12/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/12/sys/dev/iwn/if_iwn.c Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/iwn/if_iwn.c Thu Mar 28 09:16:00 2019 (r345634) @@ -9102,18 +9102,12 @@ iwn_scan_end(struct ieee80211com *ic) static void iwn_set_channel(struct ieee80211com *ic) { - const struct ieee80211_channel *c = ic->ic_curchan; struct iwn_softc *sc = ic->ic_softc; int error; DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__); IWN_LOCK(sc); - sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq); - sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); - sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); - sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); - /* * Only need to set the channel in Monitor mode. AP scanning and auth * are already taken care of by their respective firmware commands. Modified: stable/12/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/12/sys/dev/iwn/if_iwnvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/iwn/if_iwnvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -62,7 +62,7 @@ struct iwn_rx_radiotap_header { uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; -} __packed; +} __packed __aligned(8); #define IWN_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: stable/12/sys/dev/malo/if_maloioctl.h ============================================================================== --- stable/12/sys/dev/malo/if_maloioctl.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/malo/if_maloioctl.h Thu Mar 28 09:16:00 2019 (r345634) @@ -93,7 +93,7 @@ struct malo_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define MALO_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -111,6 +111,6 @@ struct malo_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; #endif /* _DEV_MALO_MVIOCTL_H */ Modified: stable/12/sys/dev/mwl/if_mwlioctl.h ============================================================================== --- stable/12/sys/dev/mwl/if_mwlioctl.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/mwl/if_mwlioctl.h Thu Mar 28 09:16:00 2019 (r345634) @@ -115,7 +115,7 @@ struct mwl_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define MWL_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -133,6 +133,6 @@ struct mwl_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; #endif /* _DEV_MWL_MVIOCTL_H */ Modified: stable/12/sys/dev/otus/if_otus.c ============================================================================== --- stable/12/sys/dev/otus/if_otus.c Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/otus/if_otus.c Thu Mar 28 09:16:00 2019 (r345634) @@ -1670,8 +1670,6 @@ otus_sub_rxeof(struct otus_softc *sc, uint8_t *buf, in struct mbuf mb; tap->wr_flags = 0; - tap->wr_chan_freq = htole16(ic->ic_ibss_chan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags); tap->wr_antsignal = tail->rssi; tap->wr_rate = 2; /* In case it can't be found below. */ switch (tail->status & AR_RX_STATUS_MT_MASK) { Modified: stable/12/sys/dev/otus/if_otusreg.h ============================================================================== --- stable/12/sys/dev/otus/if_otusreg.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/otus/if_otusreg.h Thu Mar 28 09:16:00 2019 (r345634) @@ -900,7 +900,7 @@ struct otus_rx_radiotap_header { uint16_t wr_chan_freq; uint16_t wr_chan_flags; uint8_t wr_antsignal; -} __packed; +} __packed __aligned(8); #define OTUS_RX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: stable/12/sys/dev/ral/rt2560var.h ============================================================================== --- stable/12/sys/dev/ral/rt2560var.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/ral/rt2560var.h Thu Mar 28 09:16:00 2019 (r345634) @@ -27,7 +27,7 @@ struct rt2560_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; uint8_t wr_antenna; -}; +} __packed __aligned(8); #define RT2560_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -45,7 +45,7 @@ struct rt2560_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -}; +} __packed; #define RT2560_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/ral/rt2661var.h ============================================================================== --- stable/12/sys/dev/ral/rt2661var.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/ral/rt2661var.h Thu Mar 28 09:16:00 2019 (r345634) @@ -42,7 +42,7 @@ struct rt2661_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RT2661_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/ral/rt2860var.h ============================================================================== --- stable/12/sys/dev/ral/rt2860var.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/ral/rt2860var.h Thu Mar 28 09:16:00 2019 (r345634) @@ -55,7 +55,7 @@ struct rt2860_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RT2860_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/rtwn/if_rtwn.c ============================================================================== --- stable/12/sys/dev/rtwn/if_rtwn.c Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/rtwn/if_rtwn.c Thu Mar 28 09:16:00 2019 (r345634) @@ -1560,10 +1560,6 @@ rtwn_set_channel(struct ieee80211com *ic) RTWN_LOCK(sc); rtwn_set_chan(sc, c); - sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq); - sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); - sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); - sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); RTWN_UNLOCK(sc); } Modified: stable/12/sys/dev/rtwn/if_rtwnvar.h ============================================================================== --- stable/12/sys/dev/rtwn/if_rtwnvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/rtwn/if_rtwnvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -62,9 +62,10 @@ struct rtwn_rx_radiotap_header { struct rtwn_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RTWN_TX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: stable/12/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rsu.c Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_rsu.c Thu Mar 28 09:16:00 2019 (r345634) @@ -2447,8 +2447,6 @@ rsu_rx_frame(struct rsu_softc *sc, struct mbuf *m) tap->wr_rate = rxs.c_rate; tap->wr_dbm_antsignal = rssi; - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); }; (void) ieee80211_add_rx_params(m, &rxs); @@ -2750,7 +2748,6 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no struct mbuf *m0, struct rsu_data *data) { const struct ieee80211_txparam *tp = ni->ni_txparms; - struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; @@ -2894,8 +2891,6 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no struct rsu_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); ieee80211_radiotap_tx(vap, m0); } Modified: stable/12/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rsureg.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_rsureg.h Thu Mar 28 09:16:00 2019 (r345634) @@ -800,9 +800,10 @@ struct rsu_rx_radiotap_header { struct rsu_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RSU_TX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: stable/12/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -49,7 +49,7 @@ struct rum_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -} __packed __aligned(8); +} __packed; #define RT2573_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:16:00 2019 (r345634) @@ -2900,8 +2900,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin uint16_t phy; tap->wr_flags = 0; - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wr_antsignal = rssi; tap->wr_antenna = ant; tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant); @@ -3173,8 +3171,6 @@ tr_setup: (struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd)); tap->wt_flags = 0; tap->wt_rate = rt2860_rates[data->ridx].rate; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_hwqueue = index; if (le16toh(txwi->phy) & RT2860_PHY_SHPRE) tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; Modified: stable/12/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -71,7 +71,7 @@ struct run_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_hwqueue; -} __packed __aligned(8); +} __packed; #define IEEE80211_RADIOTAP_HWQUEUE 15 Modified: stable/12/sys/dev/usb/wlan/if_uathvar.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_uathvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_uathvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -67,9 +67,10 @@ struct uath_rx_radiotap_header { struct uath_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define UATH_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/usb/wlan/if_upgtvar.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_upgtvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_upgtvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -394,7 +394,7 @@ struct upgt_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define UPGT_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/usb/wlan/if_uralvar.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_uralvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_uralvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -51,7 +51,7 @@ struct ural_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -} __packed __aligned(8); +} __packed; #define RAL_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_urtw.c Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_urtw.c Thu Mar 28 09:16:00 2019 (r345634) @@ -1697,11 +1697,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ if (ieee80211_radiotap_active_vap(vap)) { struct urtw_tx_radiotap_header *tap = &sc->sc_txtap; - /* XXX Are variables correct? */ tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); - ieee80211_radiotap_tx(vap, m0); } @@ -3990,9 +3986,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da if (ieee80211_radiotap_active(ic)) { struct urtw_rx_radiotap_header *tap = &sc->sc_rxtap; - /* XXX Are variables correct? */ - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); + tap->wr_flags = 0; tap->wr_dbm_antsignal = (int8_t)rssi; } Modified: stable/12/sys/dev/usb/wlan/if_urtwvar.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_urtwvar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_urtwvar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -56,6 +56,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead; struct urtw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; uint8_t wr_flags; + uint8_t wr_pad; uint16_t wr_chan_freq; uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; @@ -69,9 +70,10 @@ struct urtw_rx_radiotap_header { struct urtw_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define URTW_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/usb/wlan/if_zydreg.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_zydreg.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/usb/wlan/if_zydreg.h Thu Mar 28 09:16:00 2019 (r345634) @@ -1200,7 +1200,7 @@ struct zyd_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define ZYD_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/12/sys/dev/wi/if_wireg.h ============================================================================== --- stable/12/sys/dev/wi/if_wireg.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/wi/if_wireg.h Thu Mar 28 09:16:00 2019 (r345634) @@ -709,7 +709,7 @@ struct wi_rx_radiotap_header { u_int16_t wr_chan_flags; u_int8_t wr_antsignal; u_int8_t wr_antnoise; -}; +} __packed __aligned(8); #define WI_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -722,5 +722,5 @@ struct wi_tx_radiotap_header { u_int8_t wt_rate; u_int16_t wt_chan_freq; u_int16_t wt_chan_flags; -}; +} __packed; #endif /* IEEE80211_RADIOTAP_F_CFP */ Modified: stable/12/sys/dev/wpi/if_wpivar.h ============================================================================== --- stable/12/sys/dev/wpi/if_wpivar.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/wpi/if_wpivar.h Thu Mar 28 09:16:00 2019 (r345634) @@ -26,7 +26,7 @@ struct wpi_rx_radiotap_header { int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; uint8_t wr_antenna; -} __packed; +} __packed __aligned(8); #define WPI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: stable/12/sys/dev/wtap/if_wtapioctl.h ============================================================================== --- stable/12/sys/dev/wtap/if_wtapioctl.h Thu Mar 28 09:00:56 2019 (r345633) +++ stable/12/sys/dev/wtap/if_wtapioctl.h Thu Mar 28 09:16:00 2019 (r345634) @@ -159,7 +159,7 @@ struct wtap_rx_radiotap_header { u_int8_t wr_chan_ieee; int8_t wr_chan_maxpow; #endif -} __packed; +} __packed __aligned(8); #define WTAP_TX_RADIOTAP_PRESENT ( \ 0) @@ -167,7 +167,6 @@ struct wtap_rx_radiotap_header { struct wtap_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; #if 0 - u_int64_t wt_tsf; u_int8_t wt_flags; u_int8_t wt_rate; u_int8_t wt_txpower; From owner-svn-src-stable@freebsd.org Thu Mar 28 09:18:24 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FCD61553ABD; Thu, 28 Mar 2019 09:18:24 +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 E3AF58D822; Thu, 28 Mar 2019 09:18:23 +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 BF81D1D05B; Thu, 28 Mar 2019 09:18:23 +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 x2S9IN7w019111; Thu, 28 Mar 2019 09:18:23 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S9IMRQ019104; Thu, 28 Mar 2019 09:18:22 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903280918.x2S9IMRQ019104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 28 Mar 2019 09:18: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: r345635 - in stable/11: share/man/man9 sys/dev/ath sys/dev/usb/wlan X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/dev/ath sys/dev/usb/wlan X-SVN-Commit-Revision: 345635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E3AF58D822 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.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 09:18:24 -0000 Author: avos Date: Thu Mar 28 09:18:22 2019 New Revision: 345635 URL: https://svnweb.freebsd.org/changeset/base/345635 Log: MFC r306049: net80211: remove IEEE80211_RADIOTAP_TSFT field from transmit definitions. This field may be used for received frames only. Modified: stable/11/share/man/man9/ieee80211_radiotap.9 stable/11/sys/dev/ath/if_ath_tx.c stable/11/sys/dev/ath/if_athioctl.h stable/11/sys/dev/usb/wlan/if_rum.c stable/11/sys/dev/usb/wlan/if_rumvar.h stable/11/sys/dev/usb/wlan/if_run.c stable/11/sys/dev/usb/wlan/if_runvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/ieee80211_radiotap.9 ============================================================================== --- stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:18:22 2019 (r345635) @@ -263,7 +263,6 @@ struct wi_rx_radiotap_header { and transmit definitions for the Atheros driver: .Bd -literal -offset indent #define ATH_TX_RADIOTAP_PRESENT ( \\ - (1 << IEEE80211_RADIOTAP_TSFT) | \\ (1 << IEEE80211_RADIOTAP_FLAGS) | \\ (1 << IEEE80211_RADIOTAP_RATE) | \\ (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \\ @@ -273,7 +272,6 @@ and transmit definitions for the Atheros driver: struct ath_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - uint64_t wt_tsf; uint8_t wt_flags; uint8_t wt_rate; uint8_t wt_txpower; Modified: stable/11/sys/dev/ath/if_ath_tx.c ============================================================================== --- stable/11/sys/dev/ath/if_ath_tx.c Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/ath/if_ath_tx.c Thu Mar 28 09:18:22 2019 (r345635) @@ -1527,7 +1527,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8 struct ath_buf *bf, struct mbuf *m0, struct ath_txq *txq) { struct ieee80211vap *vap = ni->ni_vap; - struct ath_hal *ah = sc->sc_ah; struct ieee80211com *ic = &sc->sc_ic; const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams; int error, iswep, ismcast, isfrag, ismrr; @@ -1783,9 +1782,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8 sc->sc_hwmap[rix].ieeerate, -1); if (ieee80211_radiotap_active_vap(vap)) { - u_int64_t tsf = ath_hal_gettsf64(ah); - - sc->sc_tx_th.wt_tsf = htole64(tsf); sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags; if (iswep) sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; @@ -2066,7 +2062,6 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee8021 const struct ieee80211_bpf_params *params) { struct ieee80211com *ic = &sc->sc_ic; - struct ath_hal *ah = sc->sc_ah; struct ieee80211vap *vap = ni->ni_vap; int error, ismcast, ismrr; int keyix, hdrlen, pktlen, try0, txantenna; @@ -2201,9 +2196,6 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee8021 sc->sc_hwmap[rix].ieeerate, -1); if (ieee80211_radiotap_active_vap(vap)) { - u_int64_t tsf = ath_hal_gettsf64(ah); - - sc->sc_tx_th.wt_tsf = htole64(tsf); sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags; if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; Modified: stable/11/sys/dev/ath/if_athioctl.h ============================================================================== --- stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:18:22 2019 (r345635) @@ -374,7 +374,6 @@ struct ath_rx_radiotap_header { } __packed; #define ATH_TX_RADIOTAP_PRESENT ( \ - (1 << IEEE80211_RADIOTAP_TSFT) | \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \ @@ -384,7 +383,6 @@ struct ath_rx_radiotap_header { struct ath_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - u_int64_t wt_tsf; u_int8_t wt_flags; u_int8_t wt_rate; u_int8_t wt_txpower; Modified: stable/11/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rum.c Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/usb/wlan/if_rum.c Thu Mar 28 09:18:22 2019 (r345635) @@ -1075,7 +1075,6 @@ tr_setup: tap->wt_flags = 0; tap->wt_rate = data->rate; - rum_get_tsf(sc, &tap->wt_tsf); tap->wt_antenna = sc->tx_ant; ieee80211_radiotap_tx(vap, m); Modified: stable/11/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:18:22 2019 (r345635) @@ -44,7 +44,6 @@ struct rum_rx_radiotap_header { struct rum_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - uint64_t wt_tsf; uint8_t wt_flags; uint8_t wt_rate; uint16_t wt_chan_freq; @@ -53,8 +52,7 @@ struct rum_tx_radiotap_header { } __packed __aligned(8); #define RT2573_TX_RADIOTAP_PRESENT \ - ((1 << IEEE80211_RADIOTAP_TSFT) | \ - (1 << IEEE80211_RADIOTAP_FLAGS) | \ + ((1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) | \ (1 << IEEE80211_RADIOTAP_ANTENNA)) Modified: stable/11/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:18:22 2019 (r345635) @@ -3096,7 +3096,6 @@ tr_setup: (struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd)); tap->wt_flags = 0; tap->wt_rate = rt2860_rates[data->ridx].rate; - run_get_tsf(sc, &tap->wt_tsf); tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_hwqueue = index; Modified: stable/11/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:18:22 2019 (r345635) @@ -66,7 +66,6 @@ struct run_rx_radiotap_header { struct run_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - uint64_t wt_tsf; uint8_t wt_flags; uint8_t wt_rate; uint16_t wt_chan_freq; @@ -77,8 +76,7 @@ struct run_tx_radiotap_header { #define IEEE80211_RADIOTAP_HWQUEUE 15 #define RUN_TX_RADIOTAP_PRESENT \ - (1 << IEEE80211_RADIOTAP_TSFT | \ - 1 << IEEE80211_RADIOTAP_FLAGS | \ + (1 << IEEE80211_RADIOTAP_FLAGS | \ 1 << IEEE80211_RADIOTAP_RATE | \ 1 << IEEE80211_RADIOTAP_CHANNEL | \ 1 << IEEE80211_RADIOTAP_HWQUEUE) From owner-svn-src-stable@freebsd.org Thu Mar 28 09:50:34 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 068AB1555312; Thu, 28 Mar 2019 09:50:34 +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 AD47E8F055; Thu, 28 Mar 2019 09:50:33 +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 89FBD1D5F5; Thu, 28 Mar 2019 09:50:33 +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 x2S9oXkE034717; Thu, 28 Mar 2019 09:50:33 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S9oQ5m034681; Thu, 28 Mar 2019 09:50:26 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903280950.x2S9oQ5m034681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 28 Mar 2019 09:50: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: r345636 - in stable/11: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn... X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/dev/urtwn sys/dev/us... X-SVN-Commit-Revision: 345636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AD47E8F055 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.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 09:50:34 -0000 Author: avos Date: Thu Mar 28 09:50:25 2019 New Revision: 345636 URL: https://svnweb.freebsd.org/changeset/base/345636 Log: MFC r344990: Fix ieee80211_radiotap(9) usage in wireless drivers: - Alignment issues: * Add missing __packed attributes + padding across all drivers; in most places there was an assumption that padding will be always minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - padding was just missing. * Add __aligned(8) attribute for all Rx radiotap headers since they can contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so just drop the attribute here. Refresh ieee80211_radiotap(9) man page accordingly. - Since net80211 automatically updates channel frequency / flags in ieee80211_radiotap_chan_change() drop duplicate setup for these fields in drivers. Modified: stable/11/share/man/man9/ieee80211_radiotap.9 stable/11/sys/dev/ath/if_athioctl.h stable/11/sys/dev/bwi/if_bwi.c stable/11/sys/dev/bwi/if_bwivar.h stable/11/sys/dev/bwn/if_bwn.c stable/11/sys/dev/bwn/if_bwnvar.h stable/11/sys/dev/ipw/if_ipwvar.h stable/11/sys/dev/iwi/if_iwivar.h stable/11/sys/dev/iwm/if_iwmvar.h stable/11/sys/dev/iwn/if_iwn.c stable/11/sys/dev/iwn/if_iwnvar.h stable/11/sys/dev/malo/if_maloioctl.h stable/11/sys/dev/mwl/if_mwlioctl.h stable/11/sys/dev/otus/if_otus.c stable/11/sys/dev/otus/if_otusreg.h stable/11/sys/dev/ral/rt2560var.h stable/11/sys/dev/ral/rt2661var.h stable/11/sys/dev/ral/rt2860var.h stable/11/sys/dev/rtwn/if_rtwn.c stable/11/sys/dev/rtwn/if_rtwnreg.h stable/11/sys/dev/urtwn/if_urtwn.c stable/11/sys/dev/urtwn/if_urtwnvar.h stable/11/sys/dev/usb/wlan/if_rsu.c stable/11/sys/dev/usb/wlan/if_rsureg.h stable/11/sys/dev/usb/wlan/if_rumvar.h stable/11/sys/dev/usb/wlan/if_run.c stable/11/sys/dev/usb/wlan/if_runvar.h stable/11/sys/dev/usb/wlan/if_uathvar.h stable/11/sys/dev/usb/wlan/if_upgtvar.h stable/11/sys/dev/usb/wlan/if_uralvar.h stable/11/sys/dev/usb/wlan/if_urtw.c stable/11/sys/dev/usb/wlan/if_urtwvar.h stable/11/sys/dev/usb/wlan/if_zydreg.h stable/11/sys/dev/wi/if_wireg.h stable/11/sys/dev/wpi/if_wpivar.h stable/11/sys/dev/wtap/if_wtapioctl.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/ieee80211_radiotap.9 ============================================================================== --- stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:50:25 2019 (r345636) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2009 +.Dd March 28, 2019 .Dt IEEE80211_RADIOTAP 9 .Os .Sh NAME @@ -257,7 +257,7 @@ struct wi_rx_radiotap_header { uint16_t wr_chan_flags; uint8_t wr_antsignal; uint8_t wr_antnoise; -} __packed; +} __packed __aligned(8); .Ed .Pp and transmit definitions for the Atheros driver: Modified: stable/11/sys/dev/ath/if_athioctl.h ============================================================================== --- stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:50:25 2019 (r345636) @@ -371,7 +371,7 @@ struct ath_rx_radiotap_header { */ struct ath_radiotap_vendor_hdr wr_v; #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ -} __packed; +} __packed __aligned(8); #define ATH_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/11/sys/dev/bwi/if_bwi.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/bwi/if_bwi.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1727,15 +1727,6 @@ bwi_set_channel(struct ieee80211com *ic) bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0); sc->sc_rates = ieee80211_get_ratetable(c); - - /* - * Setup radio tap channel freq and flags - */ - sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq = - htole16(c->ic_freq); - sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags = - htole16(c->ic_flags & 0xffff); - BWI_UNLOCK(sc); } Modified: stable/11/sys/dev/bwi/if_bwivar.h ============================================================================== --- stable/11/sys/dev/bwi/if_bwivar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/bwi/if_bwivar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -511,7 +511,7 @@ struct bwi_tx_radiotap_hdr { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define BWI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -531,7 +531,7 @@ struct bwi_rx_radiotap_hdr { int8_t wr_antsignal; int8_t wr_antnoise; /* TODO: sq */ -}; +} __packed __aligned(8); struct bwi_vap { struct ieee80211vap bv_vap; Modified: stable/11/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/11/sys/dev/bwn/if_bwn.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/bwn/if_bwn.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1831,14 +1831,6 @@ bwn_set_channel(struct ieee80211com *ic) bwn_mac_enable(mac); fail: - /* - * Setup radio tap channel freq and flags - */ - sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq = - htole16(ic->ic_curchan->ic_freq); - sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags = - htole16(ic->ic_curchan->ic_flags & 0xffff); - BWN_UNLOCK(sc); } Modified: stable/11/sys/dev/bwn/if_bwnvar.h ============================================================================== --- stable/11/sys/dev/bwn/if_bwnvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/bwn/if_bwnvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -565,7 +565,7 @@ struct bwn_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define BWN_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -583,7 +583,7 @@ struct bwn_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; struct bwn_stats { int32_t rtsfail; Modified: stable/11/sys/dev/ipw/if_ipwvar.h ============================================================================== --- stable/11/sys/dev/ipw/if_ipwvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/ipw/if_ipwvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -55,11 +55,12 @@ struct ipw_soft_buf { struct ipw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; uint8_t wr_flags; + uint8_t wr_pad; uint16_t wr_chan_freq; uint16_t wr_chan_flags; int8_t wr_antsignal; int8_t wr_antnoise; -}; +} __packed __aligned(8); #define IPW_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -70,9 +71,10 @@ struct ipw_rx_radiotap_header { struct ipw_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define IPW_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/iwi/if_iwivar.h ============================================================================== --- stable/11/sys/dev/iwi/if_iwivar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/iwi/if_iwivar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -36,7 +36,7 @@ struct iwi_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; uint8_t wr_antenna; -}; +} __packed __aligned(8); #define IWI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -49,9 +49,10 @@ struct iwi_rx_radiotap_header { struct iwi_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define IWI_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/iwm/if_iwmvar.h ============================================================================== --- stable/11/sys/dev/iwm/if_iwmvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/iwm/if_iwmvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -113,7 +113,7 @@ struct iwm_rx_radiotap_header { uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; -} __packed; +} __packed __aligned(8); #define IWM_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: stable/11/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/11/sys/dev/iwn/if_iwn.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/iwn/if_iwn.c Thu Mar 28 09:50:25 2019 (r345636) @@ -8892,18 +8892,12 @@ iwn_scan_end(struct ieee80211com *ic) static void iwn_set_channel(struct ieee80211com *ic) { - const struct ieee80211_channel *c = ic->ic_curchan; struct iwn_softc *sc = ic->ic_softc; int error; DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__); IWN_LOCK(sc); - sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq); - sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); - sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); - sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); - /* * Only need to set the channel in Monitor mode. AP scanning and auth * are already taken care of by their respective firmware commands. Modified: stable/11/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/11/sys/dev/iwn/if_iwnvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/iwn/if_iwnvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -62,7 +62,7 @@ struct iwn_rx_radiotap_header { uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; -} __packed; +} __packed __aligned(8); #define IWN_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: stable/11/sys/dev/malo/if_maloioctl.h ============================================================================== --- stable/11/sys/dev/malo/if_maloioctl.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/malo/if_maloioctl.h Thu Mar 28 09:50:25 2019 (r345636) @@ -91,7 +91,7 @@ struct malo_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define MALO_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -109,6 +109,6 @@ struct malo_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; #endif /* _DEV_MALO_MVIOCTL_H */ Modified: stable/11/sys/dev/mwl/if_mwlioctl.h ============================================================================== --- stable/11/sys/dev/mwl/if_mwlioctl.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/mwl/if_mwlioctl.h Thu Mar 28 09:50:25 2019 (r345636) @@ -113,7 +113,7 @@ struct mwl_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define MWL_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -131,6 +131,6 @@ struct mwl_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; #endif /* _DEV_MWL_MVIOCTL_H */ Modified: stable/11/sys/dev/otus/if_otus.c ============================================================================== --- stable/11/sys/dev/otus/if_otus.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/otus/if_otus.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1670,8 +1670,6 @@ otus_sub_rxeof(struct otus_softc *sc, uint8_t *buf, in struct mbuf mb; tap->wr_flags = 0; - tap->wr_chan_freq = htole16(ic->ic_ibss_chan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags); tap->wr_antsignal = tail->rssi; tap->wr_rate = 2; /* In case it can't be found below. */ switch (tail->status & AR_RX_STATUS_MT_MASK) { Modified: stable/11/sys/dev/otus/if_otusreg.h ============================================================================== --- stable/11/sys/dev/otus/if_otusreg.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/otus/if_otusreg.h Thu Mar 28 09:50:25 2019 (r345636) @@ -900,7 +900,7 @@ struct otus_rx_radiotap_header { uint16_t wr_chan_freq; uint16_t wr_chan_flags; uint8_t wr_antsignal; -} __packed; +} __packed __aligned(8); #define OTUS_RX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: stable/11/sys/dev/ral/rt2560var.h ============================================================================== --- stable/11/sys/dev/ral/rt2560var.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/ral/rt2560var.h Thu Mar 28 09:50:25 2019 (r345636) @@ -27,7 +27,7 @@ struct rt2560_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; uint8_t wr_antenna; -}; +} __packed __aligned(8); #define RT2560_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -45,7 +45,7 @@ struct rt2560_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -}; +} __packed; #define RT2560_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/ral/rt2661var.h ============================================================================== --- stable/11/sys/dev/ral/rt2661var.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/ral/rt2661var.h Thu Mar 28 09:50:25 2019 (r345636) @@ -42,7 +42,7 @@ struct rt2661_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RT2661_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/ral/rt2860var.h ============================================================================== --- stable/11/sys/dev/ral/rt2860var.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/ral/rt2860var.h Thu Mar 28 09:50:25 2019 (r345636) @@ -55,7 +55,7 @@ struct rt2860_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RT2860_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/rtwn/if_rtwn.c ============================================================================== --- stable/11/sys/dev/rtwn/if_rtwn.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/rtwn/if_rtwn.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1540,8 +1540,6 @@ rtwn_rx_frame(struct rtwn_softc *sc, struct r92c_rx_de tap->wr_rate = 0x80 | (rate - 12); } tap->wr_dbm_antsignal = rssi; - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); } RTWN_UNLOCK(sc); @@ -1734,8 +1732,6 @@ rtwn_tx(struct rtwn_softc *sc, struct mbuf *m, struct struct rtwn_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); ieee80211_radiotap_tx(vap, m); } Modified: stable/11/sys/dev/rtwn/if_rtwnreg.h ============================================================================== --- stable/11/sys/dev/rtwn/if_rtwnreg.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/rtwn/if_rtwnreg.h Thu Mar 28 09:50:25 2019 (r345636) @@ -1217,7 +1217,7 @@ struct rtwn_rx_radiotap_header { uint16_t wr_chan_freq; uint16_t wr_chan_flags; uint8_t wr_dbm_antsignal; -} __packed; +} __packed __aligned(8); #define RTWN_RX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ @@ -1228,6 +1228,7 @@ struct rtwn_rx_radiotap_header { struct rtwn_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; } __packed; Modified: stable/11/sys/dev/urtwn/if_urtwn.c ============================================================================== --- stable/11/sys/dev/urtwn/if_urtwn.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/urtwn/if_urtwn.c Thu Mar 28 09:50:25 2019 (r345636) @@ -4841,10 +4841,6 @@ urtwn_set_channel(struct ieee80211com *ic) urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink); } urtwn_set_chan(sc, c, NULL); - sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq); - sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); - sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); - sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); URTWN_UNLOCK(sc); } Modified: stable/11/sys/dev/urtwn/if_urtwnvar.h ============================================================================== --- stable/11/sys/dev/urtwn/if_urtwnvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/urtwn/if_urtwnvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -55,9 +55,10 @@ struct urtwn_rx_radiotap_header { struct urtwn_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define URTWN_TX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: stable/11/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsu.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_rsu.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1830,8 +1830,6 @@ rsu_rx_frame(struct rsu_softc *sc, uint8_t *buf, int p #endif /* XXX not nice */ tap->wr_dbm_antsignal = rsu_hwrssi_to_rssi(sc, sc->sc_currssi); - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); } return (m); @@ -2117,7 +2115,6 @@ static int rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, struct rsu_data *data) { - struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; @@ -2229,8 +2226,6 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no struct rsu_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); ieee80211_radiotap_tx(vap, m0); } Modified: stable/11/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsureg.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_rsureg.h Thu Mar 28 09:50:25 2019 (r345636) @@ -689,9 +689,10 @@ struct rsu_rx_radiotap_header { struct rsu_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RSU_TX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: stable/11/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -49,7 +49,7 @@ struct rum_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -} __packed __aligned(8); +} __packed; #define RT2573_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:50:25 2019 (r345636) @@ -2830,8 +2830,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin uint16_t phy; tap->wr_flags = 0; - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wr_antsignal = rssi; tap->wr_antenna = ant; tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant); @@ -3096,8 +3094,6 @@ tr_setup: (struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd)); tap->wt_flags = 0; tap->wt_rate = rt2860_rates[data->ridx].rate; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_hwqueue = index; if (le16toh(txwi->phy) & RT2860_PHY_SHPRE) tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; Modified: stable/11/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -71,7 +71,7 @@ struct run_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_hwqueue; -} __packed __aligned(8); +} __packed; #define IEEE80211_RADIOTAP_HWQUEUE 15 Modified: stable/11/sys/dev/usb/wlan/if_uathvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_uathvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_uathvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -67,9 +67,10 @@ struct uath_rx_radiotap_header { struct uath_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define UATH_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/usb/wlan/if_upgtvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_upgtvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_upgtvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -394,7 +394,7 @@ struct upgt_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define UPGT_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/usb/wlan/if_uralvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_uralvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_uralvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -51,7 +51,7 @@ struct ural_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -} __packed __aligned(8); +} __packed; #define RAL_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_urtw.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_urtw.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1686,11 +1686,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ if (ieee80211_radiotap_active_vap(vap)) { struct urtw_tx_radiotap_header *tap = &sc->sc_txtap; - /* XXX Are variables correct? */ tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); - ieee80211_radiotap_tx(vap, m0); } @@ -3995,9 +3991,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da if (ieee80211_radiotap_active(ic)) { struct urtw_rx_radiotap_header *tap = &sc->sc_rxtap; - /* XXX Are variables correct? */ - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); + tap->wr_flags = 0; tap->wr_dbm_antsignal = (int8_t)rssi; } Modified: stable/11/sys/dev/usb/wlan/if_urtwvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_urtwvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_urtwvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -56,6 +56,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead; struct urtw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; uint8_t wr_flags; + uint8_t wr_pad; uint16_t wr_chan_freq; uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; @@ -69,9 +70,10 @@ struct urtw_rx_radiotap_header { struct urtw_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define URTW_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/usb/wlan/if_zydreg.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_zydreg.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_zydreg.h Thu Mar 28 09:50:25 2019 (r345636) @@ -1200,7 +1200,7 @@ struct zyd_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define ZYD_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/wi/if_wireg.h ============================================================================== --- stable/11/sys/dev/wi/if_wireg.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/wi/if_wireg.h Thu Mar 28 09:50:25 2019 (r345636) @@ -707,7 +707,7 @@ struct wi_rx_radiotap_header { u_int16_t wr_chan_flags; u_int8_t wr_antsignal; u_int8_t wr_antnoise; -}; +} __packed __aligned(8); #define WI_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -720,5 +720,5 @@ struct wi_tx_radiotap_header { u_int8_t wt_rate; u_int16_t wt_chan_freq; u_int16_t wt_chan_flags; -}; +} __packed; #endif /* IEEE80211_RADIOTAP_F_CFP */ Modified: stable/11/sys/dev/wpi/if_wpivar.h ============================================================================== --- stable/11/sys/dev/wpi/if_wpivar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/wpi/if_wpivar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -26,7 +26,7 @@ struct wpi_rx_radiotap_header { int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; uint8_t wr_antenna; -} __packed; +} __packed __aligned(8); #define WPI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: stable/11/sys/dev/wtap/if_wtapioctl.h ============================================================================== --- stable/11/sys/dev/wtap/if_wtapioctl.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/wtap/if_wtapioctl.h Thu Mar 28 09:50:25 2019 (r345636) @@ -157,7 +157,7 @@ struct wtap_rx_radiotap_header { u_int8_t wr_chan_ieee; int8_t wr_chan_maxpow; #endif -} __packed; +} __packed __aligned(8); #define WTAP_TX_RADIOTAP_PRESENT ( \ 0) @@ -165,7 +165,6 @@ struct wtap_rx_radiotap_header { struct wtap_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; #if 0 - u_int64_t wt_tsf; u_int8_t wt_flags; u_int8_t wt_rate; u_int8_t wt_txpower; From owner-svn-src-stable@freebsd.org Thu Mar 28 13:42:39 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A93F155D86A; Thu, 28 Mar 2019 13:42:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B9C471CBD; Thu, 28 Mar 2019 13:42:38 +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 781471FF37; Thu, 28 Mar 2019 13:42:38 +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 x2SDgc24060211; Thu, 28 Mar 2019 13:42:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2SDgcpP060210; Thu, 28 Mar 2019 13:42:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903281342.x2SDgcpP060210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Mar 2019 13:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345641 - stable/12/sys/fs/nullfs X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/fs/nullfs X-SVN-Commit-Revision: 345641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9B9C471CBD 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.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 13:42:39 -0000 Author: kib Date: Thu Mar 28 13:42:37 2019 New Revision: 345641 URL: https://svnweb.freebsd.org/changeset/base/345641 Log: MFC r345376: nullfs: fix unmounts when filesystem is active. Modified: stable/12/sys/fs/nullfs/null_vfsops.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/12/sys/fs/nullfs/null_vfsops.c Thu Mar 28 13:27:34 2019 (r345640) +++ stable/12/sys/fs/nullfs/null_vfsops.c Thu Mar 28 13:42:37 2019 (r345641) @@ -235,7 +235,7 @@ nullfs_unmount(mp, mntflags) { struct null_mount *mntdata; struct mount *ump; - int error, flags; + int error, flags, rootrefs; NULLFSDEBUG("nullfs_unmount: mp = %p\n", (void *)mp); @@ -244,10 +244,20 @@ nullfs_unmount(mp, mntflags) else flags = 0; - /* There is 1 extra root vnode reference (nullm_rootvp). */ - error = vflush(mp, 1, flags, curthread); - if (error) - return (error); + for (rootrefs = 1;; rootrefs = 0) { + /* There is 1 extra root vnode reference (nullm_rootvp). */ + error = vflush(mp, rootrefs, flags, curthread); + if (error) + return (error); + MNT_ILOCK(mp); + if (mp->mnt_nvnodelistsize == 0) { + MNT_IUNLOCK(mp); + break; + } + MNT_IUNLOCK(mp); + if ((mntflags & MNT_FORCE) == 0) + return (EBUSY); + } /* * Finally, throw away the null_mount structure From owner-svn-src-stable@freebsd.org Thu Mar 28 13:44:19 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70B12155D975; Thu, 28 Mar 2019 13:44:19 +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 0F3A271EE5; Thu, 28 Mar 2019 13:44:19 +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 E26661FF3C; Thu, 28 Mar 2019 13:44:18 +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 x2SDiIqm060377; Thu, 28 Mar 2019 13:44:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2SDiIIL060376; Thu, 28 Mar 2019 13:44:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903281344.x2SDiIIL060376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Mar 2019 13:44:18 +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: r345642 - stable/11/sys/fs/nullfs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/fs/nullfs X-SVN-Commit-Revision: 345642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F3A271EE5 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.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 13:44:19 -0000 Author: kib Date: Thu Mar 28 13:44:18 2019 New Revision: 345642 URL: https://svnweb.freebsd.org/changeset/base/345642 Log: MFC r345376: nullfs: fix unmounts when filesystem is active. Modified: stable/11/sys/fs/nullfs/null_vfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/11/sys/fs/nullfs/null_vfsops.c Thu Mar 28 13:42:37 2019 (r345641) +++ stable/11/sys/fs/nullfs/null_vfsops.c Thu Mar 28 13:44:18 2019 (r345642) @@ -236,7 +236,7 @@ nullfs_unmount(mp, mntflags) { struct null_mount *mntdata; struct mount *ump; - int error, flags; + int error, flags, rootrefs; NULLFSDEBUG("nullfs_unmount: mp = %p\n", (void *)mp); @@ -245,10 +245,20 @@ nullfs_unmount(mp, mntflags) else flags = 0; - /* There is 1 extra root vnode reference (nullm_rootvp). */ - error = vflush(mp, 1, flags, curthread); - if (error) - return (error); + for (rootrefs = 1;; rootrefs = 0) { + /* There is 1 extra root vnode reference (nullm_rootvp). */ + error = vflush(mp, rootrefs, flags, curthread); + if (error) + return (error); + MNT_ILOCK(mp); + if (mp->mnt_nvnodelistsize == 0) { + MNT_IUNLOCK(mp); + break; + } + MNT_IUNLOCK(mp); + if ((mntflags & MNT_FORCE) == 0) + return (EBUSY); + } /* * Finally, throw away the null_mount structure From owner-svn-src-stable@freebsd.org Thu Mar 28 22:19:10 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A42301514CA4; Thu, 28 Mar 2019 22:19:10 +0000 (UTC) (envelope-from rpokala@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 47C568EEE6; Thu, 28 Mar 2019 22:19:10 +0000 (UTC) (envelope-from rpokala@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 1E53D258B2; Thu, 28 Mar 2019 22:19:10 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2SMJ9wE032325; Thu, 28 Mar 2019 22:19:09 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2SMJ9q8032324; Thu, 28 Mar 2019 22:19:09 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201903282219.x2SMJ9q8032324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 28 Mar 2019 22:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345663 - stable/12/sys/dev/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: stable/12/sys/dev/netmap X-SVN-Commit-Revision: 345663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 47C568EEE6 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.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 22:19:10 -0000 Author: rpokala Date: Thu Mar 28 22:19:09 2019 New Revision: 345663 URL: https://svnweb.freebsd.org/changeset/base/345663 Log: MFC r339683: Remove redundant redeclaration of netmap_vp_reg(). This should unbreak sparc64 and powerpc LINT builds. Sponsored by: Panasas Modified: stable/12/sys/dev/netmap/netmap_bdg.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/netmap_bdg.h ============================================================================== --- stable/12/sys/dev/netmap/netmap_bdg.h Thu Mar 28 21:57:42 2019 (r345662) +++ stable/12/sys/dev/netmap/netmap_bdg.h Thu Mar 28 22:19:09 2019 (r345663) @@ -177,7 +177,6 @@ struct nm_bridge *nm_find_bridge(const char *name, int int netmap_bdg_free(struct nm_bridge *b); void netmap_bdg_detach_common(struct nm_bridge *b, int hw, int sw); int netmap_vp_bdg_ctl(struct nmreq_header *hdr, struct netmap_adapter *na); -int netmap_vp_reg(struct netmap_adapter *na, int onoff); int netmap_bwrap_reg(struct netmap_adapter *, int onoff); int netmap_vp_reg(struct netmap_adapter *na, int onoff); int netmap_vp_rxsync(struct netmap_kring *kring, int flags); From owner-svn-src-stable@freebsd.org Thu Mar 28 23:43:41 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2148A154EF38; Thu, 28 Mar 2019 23:43:41 +0000 (UTC) (envelope-from jhb@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 C23A16ADFA; Thu, 28 Mar 2019 23:43:40 +0000 (UTC) (envelope-from jhb@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 84715267FF; Thu, 28 Mar 2019 23:43:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2SNhefw079323; Thu, 28 Mar 2019 23:43:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2SNhcKH079312; Thu, 28 Mar 2019 23:43:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903282343.x2SNhcKH079312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Mar 2019 23:43: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: r345664 - in stable/11/sys: dev/cxgbe dev/cxgbe/crypto dev/cxgbe/cxgbei dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/11/sys: dev/cxgbe dev/cxgbe/crypto dev/cxgbe/cxgbei dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom X-SVN-Commit-Revision: 345664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C23A16ADFA 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.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 23:43:41 -0000 Author: jhb Date: Thu Mar 28 23:43:38 2019 New Revision: 345664 URL: https://svnweb.freebsd.org/changeset/base/345664 Log: MFC 330040,330041,330079,330884,330946,330947,331649,333068,333810,337722, 340466,340468,340469,340473: Add TOE-based TLS offload. Note that this requires a modified OpenSSL library. 330040: Fetch TLS key parameters from the firmware. The parameters describe how much of the adapter's memory is reserved for storing TLS keys. The 'meminfo' sysctl now lists this region of adapter memory as 'TLS keys' if present. 330041: Move ccr_aes_getdeckey() from ccr(4) to the cxgbe(4) driver. This routine will also be used by the TOE module to manage TLS keys. 330079: Move #include for rijndael.h out of x86-specific region. The #include was added inside of the conditional by accident and the lack of it broke non-x86 builds. 330884: Support for TLS offload of TOE connections on T6 adapters. The TOE engine in Chelsio T6 adapters supports offloading of TLS encryption and TCP segmentation for offloaded connections. Sockets using TLS are required to use a set of custom socket options to upload RX and TX keys to the NIC and to enable RX processing. Currently these socket options are implemented as TCP options in the vendor specific range. A patched OpenSSL library will be made available in a port / package for use with the TLS TOE support. TOE sockets can either offload both transmit and reception of TLS records or just transmit. TLS offload (both RX and TX) is enabled by setting the dev.t6nex..tls sysctl to 1 and requires TOE to be enabled on the relevant interface. Transmit offload can be used on any "normal" or TLS TOE socket by using the custom socket option to program a transmit key. This permits most TOE sockets to transparently offload TLS when applications use a patched SSL library (e.g. using LD_LIBRARY_PATH to request use of a patched OpenSSL library). Receive offload can only be used with TOE sockets using the TLS mode. The dev.t6nex.0.toe.tls_rx_ports sysctl can be set to a list of TCP port numbers. Any connection with either a local or remote port number in that list will be created as a TLS socket rather than a plain TOE socket. Note that although this sysctl accepts an arbitrary list of port numbers, the sysctl(8) tool is only able to set sysctl nodes to a single value. A TLS socket will hang without receiving data if used by an application that is not using a patched SSL library. Thus, the tls_rx_ports node should be used with care. For a server mostly concerned with offloading TLS transmit, this node is not needed as plain TOE sockets will fall back to software crypto when using an unpatched SSL library. New per-interface statistics nodes are added giving counts of TLS packets and payload bytes (payload bytes do not include TLS headers or authentication tags/MACs) offloaded via the TOE engine, e.g.: dev.cc.0.stats.rx_tls_octets: 149 dev.cc.0.stats.rx_tls_records: 13 dev.cc.0.stats.tx_tls_octets: 26501823 dev.cc.0.stats.tx_tls_records: 1620 TLS transmit work requests are constructed by a new variant of t4_push_frames() called t4_push_tls_records() in tom/t4_tls.c. TLS transmit work requests require a buffer containing IVs. If the IVs are too large to fit into the work request, a separate buffer is allocated when constructing a work request. This buffer is associated with the transmit descriptor and freed when the descriptor is ACKed by the adapter. Received TLS frames use two new CPL messages. The first message is a CPL_TLS_DATA containing the decryped payload of a single TLS record. The handler places the mbuf containing the received payload on an mbufq in the TOE pcb. The second message is a CPL_RX_TLS_CMP message which includes a copy of the TLS header and indicates if there were any errors. The handler for this message places the TLS header into the socket buffer followed by the saved mbuf with the payload data. Both of these handlers are contained in tom/t4_tls.c. A few routines were exposed from t4_cpl_io.c for use by t4_tls.c including send_rx_credits(), a new send_rx_modulate(), and t4_close_conn(). TLS keys for both transmit and receive are stored in onboard memory in the NIC in the "TLS keys" memory region. In some cases a TLS socket can hang with pending data available in the NIC that is not delivered to the host. As a workaround, TLS sockets are more aggressive about sending CPL_RX_DATA_ACK messages anytime that any data is read from a TLS socket. In addition, a fallback timer will periodically send CPL_RX_DATA_ACK messages to the NIC for connections that are still in the handshake phase. Once the connection has finished the handshake and programmed RX keys via the socket option, the timer is stopped. A new function select_ulp_mode() is used to determine what sub-mode a given TOE socket should use (plain TOE, DDP, or TLS). The existing set_tcpddp_ulp_mode() function has been renamed to set_ulp_mode() and handles initialization of TLS-specific state when necessary in addition to DDP-specific state. Since TLS sockets do not receive individual TCP segments but always receive full TLS records, they can receive more data than is available in the current window (e.g. if a 16k TLS record is received but the socket buffer is itself 16k). To cope with this, just drop the window to 0 when this happens, but track the overage and "eat" the overage as it is read from the socket buffer not opening the window (or adding rx_credits) for the overage bytes. 330946: Remove TLS-related inlines from t4_tom.h to fix iw_cxgbe(4) build. - Remove the one use of is_tls_offload() and the function. AIO special handling only needs to be disabled when a TOE socket is actively doing TLS offload on transmit. The TOE socket's mode (which affects receive operation) doesn't matter, so remove the check for the socket's mode and only check if a TOE socket has TLS transmit keys configured to determine if an AIO write request should fall back to the normal socket handling instead of the TOE fast path. - Move can_tls_offload() into t4_tls.c. It is not used in critical paths, so inlining isn't that important. Change return type to bool while here. 330947: Fix the check for an empty send socket buffer on a TOE TLS socket. Compare sbavail() with the cached sb_off of already-sent data instead of always comparing with zero. This will correctly close the connection and send the FIN if the socket buffer contains some previously-sent data but no unsent data. 331649: Use the offload transmit queue to set flags on TLS connections. Requests to modify the state of TLS connections need to be sent on the same queue as TLS record transmit requests to ensure ordering. However, in order to use the offload transmit queue in t4_set_tcb_field(), the function needs to be updated to do proper flow control / credit management when queueing a request to an offload queue. This required passing a pointer to the toepcb itself to this function, so while here remove the 'tid' and 'iqid' parameters and obtain those values from the toepcb in t4_set_tcb_field() itself. 333068: Use the correct key address when renegotiating the transmit key. Previously, get_keyid() was returning the address of the receive key instead of the transmit key when renegotiating the transmit key. This could either hang the card (if a connection was only offloading TLS TX and thus had a receive key address of -1) or cause the connection to fail by overwriting the wrong key (if both RX and TX TLS were offloaded). 333810: Be more robust against garbage input on a TOE TLS TX socket. If a socket is closed or shutdown and a partial record (or what appears to be a partial record) is waiting in the socket buffer, discard the partial record and close the connection rather than waiting forever for the rest of the record. 337722: Whitespace nit in t4_tom.h 340466: Move the TLS key map into the adapter softc so non-TOE code can use it. 340468: Change the quantum for TLS key addresses to 32 bytes. The addresses passed when reading and writing keys are always shifted right by 5 as the memory locations are addressed in 32-byte chunks, so the quantum needs to be 32, not 8. 340469: Remove bogus roundup2() of the key programming work request header. The key context is always placed immediately after the work request header. The total work request length has to be rounded up by 16 however. 340473: Restore the header to fix build of cxgbe(4) TOM. vmem's are not just used for TLS memory in TOM and the #include actually predates the TLS code so should not have been removed when the TLS vmem moved in r340466. Sponsored by: Chelsio Communications Added: stable/11/sys/dev/cxgbe/tom/t4_tls.c - copied, changed from r330884, head/sys/dev/cxgbe/tom/t4_tls.c stable/11/sys/dev/cxgbe/tom/t4_tls.h - copied unchanged from r330884, head/sys/dev/cxgbe/tom/t4_tls.h Modified: stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/crypto/t4_crypto.c stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt stable/11/sys/dev/cxgbe/offload.h stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/tom/t4_connect.c stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c stable/11/sys/dev/cxgbe/tom/t4_ddp.c stable/11/sys/dev/cxgbe/tom/t4_listen.c stable/11/sys/dev/cxgbe/tom/t4_tom.c stable/11/sys/dev/cxgbe/tom/t4_tom.h stable/11/sys/modules/cxgbe/tom/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/11/sys/dev/cxgbe/adapter.h Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/adapter.h Thu Mar 28 23:43:38 2019 (r345664) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -297,6 +298,10 @@ struct port_info { struct port_stats stats; u_int tnl_cong_drops; u_int tx_parse_error; + u_long tx_tls_records; + u_long tx_tls_octets; + u_long rx_tls_records; + u_long rx_tls_octets; struct callout tick; }; @@ -805,6 +810,7 @@ struct adapter { void *ccr_softc; /* (struct ccr_softc *) */ struct l2t_data *l2t; /* L2 table */ struct tid_info tids; + vmem_t *key_map; uint8_t doorbells; int offload_map; /* ports with IFCAP_TOE enabled */ @@ -1091,6 +1097,7 @@ void t4_os_link_changed(struct port_info *); void t4_iterate(void (*)(struct adapter *, void *), void *); void t4_init_devnames(struct adapter *); void t4_add_adapter(struct adapter *); +void t4_aes_getdeckey(void *, const void *, unsigned int); int t4_detach_common(device_t); int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); int t4_map_bars_0_and_4(struct adapter *); Modified: stable/11/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- stable/11/sys/dev/cxgbe/crypto/t4_crypto.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/crypto/t4_crypto.c Thu Mar 28 23:43:38 2019 (r345664) @@ -1815,46 +1815,7 @@ ccr_aes_check_keylen(int alg, int klen) return (0); } -/* - * Borrowed from cesa_prep_aes_key(). We should perhaps have a public - * function to generate this instead. - * - * NB: The crypto engine wants the words in the decryption key in reverse - * order. - */ static void -ccr_aes_getdeckey(void *dec_key, const void *enc_key, unsigned int kbits) -{ - uint32_t ek[4 * (RIJNDAEL_MAXNR + 1)]; - uint32_t *dkey; - int i; - - rijndaelKeySetupEnc(ek, enc_key, kbits); - dkey = dec_key; - dkey += (kbits / 8) / 4; - - switch (kbits) { - case 128: - for (i = 0; i < 4; i++) - *--dkey = htobe32(ek[4 * 10 + i]); - break; - case 192: - for (i = 0; i < 2; i++) - *--dkey = htobe32(ek[4 * 11 + 2 + i]); - for (i = 0; i < 4; i++) - *--dkey = htobe32(ek[4 * 12 + i]); - break; - case 256: - for (i = 0; i < 4; i++) - *--dkey = htobe32(ek[4 * 13 + i]); - for (i = 0; i < 4; i++) - *--dkey = htobe32(ek[4 * 14 + i]); - break; - } - MPASS(dkey == dec_key); -} - -static void ccr_aes_setkey(struct ccr_session *s, int alg, const void *key, int klen) { unsigned int ck_size, iopad_size, kctx_flits, kctx_len, kbits, mk_size; @@ -1883,7 +1844,7 @@ ccr_aes_setkey(struct ccr_session *s, int alg, const v switch (alg) { case CRYPTO_AES_CBC: case CRYPTO_AES_XTS: - ccr_aes_getdeckey(s->blkcipher.deckey, key, kbits); + t4_aes_getdeckey(s->blkcipher.deckey, key, kbits); break; } Modified: stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c ============================================================================== --- stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Thu Mar 28 23:43:38 2019 (r345664) @@ -595,9 +595,9 @@ set_ulp_mode_iscsi(struct adapter *sc, struct toepcb * CTR4(KTR_CXGBE, "%s: tid %u, ULP_MODE_ISCSI, CRC hdr=%d data=%d", __func__, toep->tid, hcrc, dcrc); - t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_ULP_TYPE, + t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_ULP_TYPE, V_TCB_ULP_TYPE(M_TCB_ULP_TYPE) | V_TCB_ULP_RAW(M_TCB_ULP_RAW), val, - 0, 0, toep->ofld_rxq->iq.abs_id); + 0, 0); } /* Modified: stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt ============================================================================== --- stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt Thu Mar 28 23:43:38 2019 (r345664) @@ -163,10 +163,12 @@ nserver = 512 nhpfilter = 0 nhash = 16384 - protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, crypto_lookaside + protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, tlskeys, crypto_lookaside tp_l2t = 4096 tp_ddp = 2 tp_ddp_iscsi = 2 + tp_tls_key = 3 + tp_tls_mxrxsize = 17408 # 16384 + 1024, governs max rx data, pm max xfer len, rx coalesce sizes tp_stag = 2 tp_pbl = 5 tp_rq = 7 @@ -273,7 +275,7 @@ [fini] version = 0x1 - checksum = 0x7191019f + checksum = 0x9e8952d2 # # $FreeBSD$ # Modified: stable/11/sys/dev/cxgbe/offload.h ============================================================================== --- stable/11/sys/dev/cxgbe/offload.h Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/offload.h Thu Mar 28 23:43:38 2019 (r345664) @@ -124,6 +124,7 @@ struct t4_virt_res { /* virtualiz struct t4_range srq; struct t4_range ocq; struct t4_range l2t; + struct t4_range key; }; enum { @@ -148,6 +149,9 @@ struct tom_tunables { int sndbuf; int ddp; int rx_coalesce; + int tls; + int *tls_rx_ports; + int num_tls_rx_ports; int tx_align; int tx_zcopy; }; Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/t4_main.c Thu Mar 28 23:43:38 2019 (r345664) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#include #ifdef DDB #include #include @@ -667,6 +668,7 @@ static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); static int sysctl_tc_params(SYSCTL_HANDLER_ARGS); #endif #ifdef TCP_OFFLOAD +static int sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS); static int sysctl_tp_tick(SYSCTL_HANDLER_ARGS); static int sysctl_tp_dack_timer(SYSCTL_HANDLER_ARGS); static int sysctl_tp_timer(SYSCTL_HANDLER_ARGS); @@ -1215,6 +1217,9 @@ t4_attach(device_t dev) t4_init_l2t(sc, M_WAITOK); t4_init_tx_sched(sc); + if (sc->vres.key.size != 0) + sc->key_map = vmem_create("T4TLS key map", sc->vres.key.start, + sc->vres.key.size, 32, 0, M_FIRSTFIT | M_WAITOK); /* * Second pass over the ports. This time we know the number of rx and @@ -1499,6 +1504,8 @@ t4_detach_common(device_t dev) if (sc->l2t) t4_free_l2t(sc->l2t); + if (sc->key_map) + vmem_destroy(sc->key_map); #ifdef TCP_OFFLOAD free(sc->sge.ofld_rxq, M_CXGBE); @@ -1515,6 +1522,7 @@ t4_detach_common(device_t dev) free(sc->sge.iqmap, M_CXGBE); free(sc->sge.eqmap, M_CXGBE); free(sc->tids.ftid_tab, M_CXGBE); + free(sc->tt.tls_rx_ports, M_CXGBE); t4_destroy_dma_tag(sc); if (mtx_initialized(&sc->sc_lock)) { sx_xlock(&t4_list_lock); @@ -3981,6 +3989,18 @@ get_params__post_init(struct adapter *sc) sc->vres.iscsi.start = val[0]; sc->vres.iscsi.size = val[1] - val[0] + 1; } + if (sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS) { + param[0] = FW_PARAM_PFVF(TLS_START); + param[1] = FW_PARAM_PFVF(TLS_END); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query TLS parameters: %d.\n", rc); + return (rc); + } + sc->vres.key.start = val[0]; + sc->vres.key.size = val[1] - val[0] + 1; + } t4_init_sge_params(sc); @@ -5780,6 +5800,14 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_coalesce", CTLFLAG_RW, &sc->tt.rx_coalesce, 0, "receive coalescing"); + sc->tt.tls = 0; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tls", CTLFLAG_RW, + &sc->tt.tls, 0, "Inline TLS allowed"); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tls_rx_ports", + CTLTYPE_INT | CTLFLAG_RW, sc, 0, sysctl_tls_rx_ports, + "I", "TCP ports that use inline TLS+TOE RX"); + sc->tt.tx_align = 1; SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_align", CTLFLAG_RW, &sc->tt.tx_align, 0, "chop and align payload"); @@ -6183,6 +6211,19 @@ cxgbe_sysctls(struct port_info *pi) "# of buffer-group 3 truncated packets"); #undef SYSCTL_ADD_T4_PORTSTAT + + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_records", + CTLFLAG_RD, &pi->tx_tls_records, + "# of TLS records transmitted"); + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_octets", + CTLFLAG_RD, &pi->tx_tls_octets, + "# of payload octets in transmitted TLS records"); + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_records", + CTLFLAG_RD, &pi->rx_tls_records, + "# of TLS records received"); + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_octets", + CTLFLAG_RD, &pi->rx_tls_octets, + "# of payload octets in received TLS records"); } static int @@ -7443,7 +7484,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) "TDDP region:", "TPT region:", "STAG region:", "RQ region:", "RQUDP region:", "PBL region:", "TXPBL region:", "DBVFIFO region:", "ULPRX state:", "ULPTX state:", - "On-chip queues:" + "On-chip queues:", "TLS keys:", }; struct mem_desc avail[4]; struct mem_desc mem[nitems(region) + 3]; /* up to 3 holes */ @@ -7583,6 +7624,13 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) md->idx = nitems(region); /* hide it */ md++; + md->base = sc->vres.key.start; + if (sc->vres.key.size) + md->limit = md->base + sc->vres.key.size - 1; + else + md->idx = nitems(region); /* hide it */ + md++; + /* add any address-space holes, there can be up to 3 */ for (n = 0; n < i - 1; n++) if (avail[n].limit < avail[n + 1].base) @@ -8674,6 +8722,68 @@ done: #endif #ifdef TCP_OFFLOAD +static int +sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + int *old_ports, *new_ports; + int i, new_count, rc; + + if (req->newptr == NULL && req->oldptr == NULL) + return (SYSCTL_OUT(req, NULL, imax(sc->tt.num_tls_rx_ports, 1) * + sizeof(sc->tt.tls_rx_ports[0]))); + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4tlsrx"); + if (rc) + return (rc); + + if (sc->tt.num_tls_rx_ports == 0) { + i = -1; + rc = SYSCTL_OUT(req, &i, sizeof(i)); + } else + rc = SYSCTL_OUT(req, sc->tt.tls_rx_ports, + sc->tt.num_tls_rx_ports * sizeof(sc->tt.tls_rx_ports[0])); + if (rc == 0 && req->newptr != NULL) { + new_count = req->newlen / sizeof(new_ports[0]); + new_ports = malloc(new_count * sizeof(new_ports[0]), M_CXGBE, + M_WAITOK); + rc = SYSCTL_IN(req, new_ports, new_count * + sizeof(new_ports[0])); + if (rc) + goto err; + + /* Allow setting to a single '-1' to clear the list. */ + if (new_count == 1 && new_ports[0] == -1) { + ADAPTER_LOCK(sc); + old_ports = sc->tt.tls_rx_ports; + sc->tt.tls_rx_ports = NULL; + sc->tt.num_tls_rx_ports = 0; + ADAPTER_UNLOCK(sc); + free(old_ports, M_CXGBE); + } else { + for (i = 0; i < new_count; i++) { + if (new_ports[i] < 1 || + new_ports[i] > IPPORT_MAX) { + rc = EINVAL; + goto err; + } + } + + ADAPTER_LOCK(sc); + old_ports = sc->tt.tls_rx_ports; + sc->tt.tls_rx_ports = new_ports; + sc->tt.num_tls_rx_ports = new_count; + ADAPTER_UNLOCK(sc); + free(old_ports, M_CXGBE); + new_ports = NULL; + } + err: + free(new_ports, M_CXGBE); + } + end_synchronized_op(sc, 0); + return (rc); +} + static void unit_conv(char *buf, size_t len, u_int val, u_int factor) { @@ -10628,6 +10738,44 @@ DB_FUNC(tcb, db_show_t4tcb, db_t4_table, CS_OWN, NULL) t4_dump_tcb(device_get_softc(dev), tid); } #endif + +/* + * Borrowed from cesa_prep_aes_key(). + * + * NB: The crypto engine wants the words in the decryption key in reverse + * order. + */ +void +t4_aes_getdeckey(void *dec_key, const void *enc_key, unsigned int kbits) +{ + uint32_t ek[4 * (RIJNDAEL_MAXNR + 1)]; + uint32_t *dkey; + int i; + + rijndaelKeySetupEnc(ek, enc_key, kbits); + dkey = dec_key; + dkey += (kbits / 8) / 4; + + switch (kbits) { + case 128: + for (i = 0; i < 4; i++) + *--dkey = htobe32(ek[4 * 10 + i]); + break; + case 192: + for (i = 0; i < 2; i++) + *--dkey = htobe32(ek[4 * 11 + 2 + i]); + for (i = 0; i < 4; i++) + *--dkey = htobe32(ek[4 * 12 + i]); + break; + case 256: + for (i = 0; i < 4; i++) + *--dkey = htobe32(ek[4 * 13 + i]); + for (i = 0; i < 4; i++) + *--dkey = htobe32(ek[4 * 14 + i]); + break; + } + MPASS(dkey == dec_key); +} static struct sx mlu; /* mod load unload */ SX_SYSINIT(cxgbe_mlu, &mlu, "cxgbe mod load/unload"); Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_connect.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/tom/t4_connect.c Thu Mar 28 23:43:38 2019 (r345664) @@ -140,6 +140,10 @@ do_act_establish(struct sge_iq *iq, const struct rss_h } make_established(toep, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt); + + if (toep->ulp_mode == ULP_MODE_TLS) + tls_establish(toep); + done: INP_WUNLOCK(inp); CURVNET_RESTORE(); @@ -266,6 +270,11 @@ calc_opt2a(struct socket *so, struct toepcb *toep) if (toep->ulp_mode == ULP_MODE_TCPDDP) opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; #endif + if (toep->ulp_mode == ULP_MODE_TLS) { + opt2 |= F_RX_FC_VALID; + opt2 &= ~V_RX_COALESCE(M_RX_COALESCE); + opt2 |= F_RX_FC_DISABLE; + } return (htobe32(opt2)); } @@ -376,10 +385,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); toep->vnet = so->so_vnet; - if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) - set_tcpddp_ulp_mode(toep); - else - toep->ulp_mode = ULP_MODE_NONE; + set_ulp_mode(toep, select_ulp_mode(so, sc)); SOCKBUF_LOCK(&so->so_rcv); /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ toep->rx_credits = min(select_rcv_wnd(so) >> 10, M_RCV_BUFSIZ); Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Mar 28 23:43:38 2019 (r345664) @@ -82,9 +82,6 @@ VNET_DECLARE(int, tcp_autorcvbuf_inc); VNET_DECLARE(int, tcp_autorcvbuf_max); #define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) -#define IS_AIOTX_MBUF(m) \ - ((m)->m_flags & M_EXT && (m)->m_ext.ext_flags & EXT_FLAG_AIOTX) - static void t4_aiotx_cancel(struct kaiocb *job); static void t4_aiotx_queue_toep(struct toepcb *toep); @@ -115,7 +112,7 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par { struct wrqe *wr; struct fw_flowc_wr *flowc; - unsigned int nparams = ftxp ? 8 : 6, flowclen; + unsigned int nparams, flowclen, paramidx; struct vi_info *vi = toep->vi; struct port_info *pi = vi->pi; struct adapter *sc = pi->adapter; @@ -125,6 +122,15 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par KASSERT(!(toep->flags & TPF_FLOWC_WR_SENT), ("%s: flowc for tid %u sent already", __func__, toep->tid)); + if (ftxp != NULL) + nparams = 8; + else + nparams = 6; + if (toep->ulp_mode == ULP_MODE_TLS) + nparams++; + if (toep->tls.fcplenmax != 0) + nparams++; + flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq); @@ -140,39 +146,45 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) | V_FW_WR_FLOWID(toep->tid)); - flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; - flowc->mnemval[0].val = htobe32(pfvf); - flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; - flowc->mnemval[1].val = htobe32(pi->tx_chan); - flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; - flowc->mnemval[2].val = htobe32(pi->tx_chan); - flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; - flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id); +#define FLOWC_PARAM(__m, __v) \ + do { \ + flowc->mnemval[paramidx].mnemonic = FW_FLOWC_MNEM_##__m; \ + flowc->mnemval[paramidx].val = htobe32(__v); \ + paramidx++; \ + } while (0) + + paramidx = 0; + + FLOWC_PARAM(PFNVFN, pfvf); + FLOWC_PARAM(CH, pi->tx_chan); + FLOWC_PARAM(PORT, pi->tx_chan); + FLOWC_PARAM(IQID, toep->ofld_rxq->iq.abs_id); if (ftxp) { uint32_t sndbuf = min(ftxp->snd_space, sc->tt.sndbuf); - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDNXT; - flowc->mnemval[4].val = htobe32(ftxp->snd_nxt); - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_RCVNXT; - flowc->mnemval[5].val = htobe32(ftxp->rcv_nxt); - flowc->mnemval[6].mnemonic = FW_FLOWC_MNEM_SNDBUF; - flowc->mnemval[6].val = htobe32(sndbuf); - flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS; - flowc->mnemval[7].val = htobe32(ftxp->mss); + FLOWC_PARAM(SNDNXT, ftxp->snd_nxt); + FLOWC_PARAM(RCVNXT, ftxp->rcv_nxt); + FLOWC_PARAM(SNDBUF, sndbuf); + FLOWC_PARAM(MSS, ftxp->mss); CTR6(KTR_CXGBE, "%s: tid %u, mss %u, sndbuf %u, snd_nxt 0x%x, rcv_nxt 0x%x", __func__, toep->tid, ftxp->mss, sndbuf, ftxp->snd_nxt, ftxp->rcv_nxt); } else { - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; - flowc->mnemval[4].val = htobe32(512); - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; - flowc->mnemval[5].val = htobe32(512); + FLOWC_PARAM(SNDBUF, 512); + FLOWC_PARAM(MSS, 512); CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid); } + if (toep->ulp_mode == ULP_MODE_TLS) + FLOWC_PARAM(ULP_MODE, toep->ulp_mode); + if (toep->tls.fcplenmax != 0) + FLOWC_PARAM(TXDATAPLEN_MAX, toep->tls.fcplenmax); +#undef FLOWC_PARAM + KASSERT(paramidx == nparams, ("nparams mismatch")); + txsd->tx_credits = howmany(flowclen, 16); txsd->plen = 0; KASSERT(toep->tx_credits >= txsd->tx_credits && toep->txsd_avail > 0, @@ -360,7 +372,7 @@ make_established(struct toepcb *toep, uint32_t snd_isn soisconnected(so); } -static int +int send_rx_credits(struct adapter *sc, struct toepcb *toep, int credits) { struct wrqe *wr; @@ -382,6 +394,23 @@ send_rx_credits(struct adapter *sc, struct toepcb *toe } void +send_rx_modulate(struct adapter *sc, struct toepcb *toep) +{ + struct wrqe *wr; + struct cpl_rx_data_ack *req; + + wr = alloc_wrqe(sizeof(*req), toep->ctrlq); + if (wr == NULL) + return; + req = wrtod(wr); + + INIT_TP_WR_MIT_CPL(req, CPL_RX_DATA_ACK, toep->tid); + req->credit_dack = htobe32(F_RX_MODULATE_RX); + + t4_wrq_tx(sc, wr); +} + +void t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) { struct adapter *sc = tod->tod_softc; @@ -398,8 +427,18 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) ("%s: sb %p has more data (%d) than last time (%d).", __func__, sb, sbused(sb), toep->sb_cc)); - toep->rx_credits += toep->sb_cc - sbused(sb); + credits = toep->sb_cc - sbused(sb); toep->sb_cc = sbused(sb); + if (toep->ulp_mode == ULP_MODE_TLS) { + if (toep->tls.rcv_over >= credits) { + toep->tls.rcv_over -= credits; + credits = 0; + } else { + credits -= toep->tls.rcv_over; + toep->tls.rcv_over = 0; + } + } + toep->rx_credits += credits; if (toep->rx_credits > 0 && (tp->rcv_wnd <= 32 * 1024 || toep->rx_credits >= 64 * 1024 || @@ -410,7 +449,8 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) toep->rx_credits -= credits; tp->rcv_wnd += credits; tp->rcv_adv += credits; - } + } else if (toep->flags & TPF_FORCE_CREDITS) + send_rx_modulate(sc, toep); } void @@ -428,8 +468,8 @@ t4_rcvd(struct toedev *tod, struct tcpcb *tp) /* * Close a connection by sending a CPL_CLOSE_CON_REQ message. */ -static int -close_conn(struct adapter *sc, struct toepcb *toep) +int +t4_close_conn(struct adapter *sc, struct toepcb *toep) { struct wrqe *wr; struct cpl_close_con_req *req; @@ -630,6 +670,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep KASSERT(toep->ulp_mode == ULP_MODE_NONE || toep->ulp_mode == ULP_MODE_TCPDDP || + toep->ulp_mode == ULP_MODE_TLS || toep->ulp_mode == ULP_MODE_RDMA, ("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, toep)); @@ -836,7 +877,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep /* Send a FIN if requested, but only if there's no more data to send */ if (m == NULL && toep->flags & TPF_SEND_FIN) - close_conn(sc, toep); + t4_close_conn(sc, toep); } static inline void @@ -1028,7 +1069,7 @@ t4_push_pdus(struct adapter *sc, struct toepcb *toep, /* Send a FIN if requested, but only if there are no more PDUs to send */ if (mbufq_first(pduq) == NULL && toep->flags & TPF_SEND_FIN) - close_conn(sc, toep); + t4_close_conn(sc, toep); } int @@ -1047,6 +1088,8 @@ t4_tod_output(struct toedev *tod, struct tcpcb *tp) if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, 0); + else if (tls_tx_key(toep)) + t4_push_tls_records(sc, toep, 0); else t4_push_frames(sc, toep, 0); @@ -1071,6 +1114,8 @@ t4_send_fin(struct toedev *tod, struct tcpcb *tp) if (tp->t_state >= TCPS_ESTABLISHED) { if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, 0); + else if (tls_tx_key(toep)) + t4_push_tls_records(sc, toep, 0); else t4_push_frames(sc, toep, 0); } @@ -1703,6 +1748,10 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header credits -= txsd->tx_credits; toep->tx_credits += txsd->tx_credits; plen += txsd->plen; + if (txsd->iv_buffer) { + free(txsd->iv_buffer, M_CXGBE); + txsd->iv_buffer = NULL; + } txsd++; toep->txsd_avail++; KASSERT(toep->txsd_avail <= toep->txsd_total, @@ -1728,6 +1777,8 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header CURVNET_SET(toep->vnet); if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, plen); + else if (tls_tx_key(toep)) + t4_push_tls_records(sc, toep, plen); else t4_push_frames(sc, toep, plen); CURVNET_RESTORE(); @@ -1757,6 +1808,12 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header tid, plen); #endif sbdrop_locked(sb, plen); + if (tls_tx_key(toep)) { + struct tls_ofld_info *tls_ofld = &toep->tls; + + MPASS(tls_ofld->sb_off >= plen); + tls_ofld->sb_off -= plen; + } if (!TAILQ_EMPTY(&toep->aiotx_jobq)) t4_aiotx_queue_toep(toep); sowwakeup_locked(so); /* unlocks so_snd */ @@ -1808,14 +1865,14 @@ do_set_tcb_rpl(struct sge_iq *iq, const struct rss_hea } void -t4_set_tcb_field(struct adapter *sc, struct sge_wrq *wrq, int tid, - uint16_t word, uint64_t mask, uint64_t val, int reply, int cookie, int iqid) +t4_set_tcb_field(struct adapter *sc, struct sge_wrq *wrq, struct toepcb *toep, + uint16_t word, uint64_t mask, uint64_t val, int reply, int cookie) { struct wrqe *wr; struct cpl_set_tcb_field *req; + struct ofld_tx_sdesc *txsd; MPASS((cookie & ~M_COOKIE) == 0); - MPASS((iqid & ~M_QUEUENO) == 0); wr = alloc_wrqe(sizeof(*req), wrq); if (wr == NULL) { @@ -1824,13 +1881,26 @@ t4_set_tcb_field(struct adapter *sc, struct sge_wrq *w } req = wrtod(wr); - INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, tid); - req->reply_ctrl = htobe16(V_QUEUENO(iqid)); + INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, toep->tid); + req->reply_ctrl = htobe16(V_QUEUENO(toep->ofld_rxq->iq.abs_id)); if (reply == 0) req->reply_ctrl |= htobe16(F_NO_REPLY); req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(cookie)); req->mask = htobe64(mask); req->val = htobe64(val); + if ((wrq->eq.flags & EQ_TYPEMASK) == EQ_OFLD) { + txsd = &toep->txsd[toep->txsd_pidx]; + txsd->tx_credits = howmany(sizeof(*req), 16); + txsd->plen = 0; + KASSERT(toep->tx_credits >= txsd->tx_credits && + toep->txsd_avail > 0, + ("%s: not enough credits (%d)", __func__, + toep->tx_credits)); + toep->tx_credits -= txsd->tx_credits; + if (__predict_false(++toep->txsd_pidx == toep->txsd_total)) + toep->txsd_pidx = 0; + toep->txsd_avail--; + } t4_wrq_tx(sc, wr); } @@ -2229,6 +2299,9 @@ t4_aio_queue_aiotx(struct socket *so, struct kaiocb *j return (EOPNOTSUPP); if (!sc->tt.tx_zcopy) + return (EOPNOTSUPP); + + if (tls_tx_key(toep)) return (EOPNOTSUPP); SOCKBUF_LOCK(&so->so_snd); Modified: stable/11/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_ddp.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/tom/t4_ddp.c Thu Mar 28 23:43:38 2019 (r345664) @@ -816,14 +816,13 @@ enable_ddp(struct adapter *sc, struct toepcb *toep) DDP_ASSERT_LOCKED(toep); toep->ddp.flags |= DDP_SC_REQ; - t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_RX_DDP_FLAGS, + t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1) | V_TF_DDP_INDICATE_OUT(1) | V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1) | V_TF_DDP_BUF0_VALID(1) | V_TF_DDP_BUF1_VALID(1), - V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1), 0, 0, - toep->ofld_rxq->iq.abs_id); - t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_T_FLAGS, - V_TF_RCV_COALESCE_ENABLE(1), 0, 0, 0, toep->ofld_rxq->iq.abs_id); + V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1), 0, 0); + t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_T_FLAGS, + V_TF_RCV_COALESCE_ENABLE(1), 0, 0, 0); } static int @@ -1873,10 +1872,9 @@ t4_aio_cancel_active(struct kaiocb *job) */ valid_flag = i == 0 ? V_TF_DDP_BUF0_VALID(1) : V_TF_DDP_BUF1_VALID(1); - t4_set_tcb_field(sc, toep->ctrlq, toep->tid, + t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_RX_DDP_FLAGS, valid_flag, 0, 1, - i + DDP_BUF0_INVALIDATED, - toep->ofld_rxq->iq.abs_id); + i + DDP_BUF0_INVALIDATED); toep->ddp.db[i].cancel_pending = 1; CTR2(KTR_CXGBE, "%s: request %p marked pending", __func__, job); Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_listen.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/tom/t4_listen.c Thu Mar 28 23:43:38 2019 (r345664) @@ -1054,6 +1054,11 @@ calc_opt2p(struct adapter *sc, struct port_info *pi, i if (ulp_mode == ULP_MODE_TCPDDP) opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; #endif + if (ulp_mode == ULP_MODE_TLS) { + opt2 |= F_RX_FC_VALID; + opt2 &= ~V_RX_COALESCE(M_RX_COALESCE); + opt2 |= F_RX_FC_DISABLE; + } return htobe32(opt2); } @@ -1344,11 +1349,15 @@ found: INIT_TP_WR_MIT_CPL(rpl5, CPL_PASS_ACCEPT_RPL, tid); } - if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) { - ulp_mode = ULP_MODE_TCPDDP; + ulp_mode = select_ulp_mode(so, sc); + switch (ulp_mode) { + case ULP_MODE_TCPDDP: synqe->flags |= TPF_SYNQE_TCPDDP; - } else - ulp_mode = ULP_MODE_NONE; + break; + case ULP_MODE_TLS: + synqe->flags |= TPF_SYNQE_TLS; + break; + } rpl->opt0 = calc_opt0(so, vi, e, mtu_idx, rscale, rx_credits, ulp_mode); rpl->opt2 = calc_opt2p(sc, pi, rxqid, &cpl->tcpopt, &th, ulp_mode); @@ -1404,8 +1413,8 @@ found: REJECT_PASS_ACCEPT(); } - CTR5(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK", - __func__, stid, tid, lctx, synqe); + CTR6(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK mode %d", + __func__, stid, tid, lctx, synqe, ulp_mode); INP_WLOCK(inp); synqe->flags |= TPF_SYNQE_HAS_L2TE; @@ -1554,9 +1563,11 @@ reset: toep->tid = tid; toep->l2te = &sc->l2t->l2tab[synqe->l2e_idx]; if (synqe->flags & TPF_SYNQE_TCPDDP) - set_tcpddp_ulp_mode(toep); + set_ulp_mode(toep, ULP_MODE_TCPDDP); + else if (synqe->flags & TPF_SYNQE_TLS) + set_ulp_mode(toep, ULP_MODE_TLS); else - toep->ulp_mode = ULP_MODE_NONE; + set_ulp_mode(toep, ULP_MODE_NONE); /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ toep->rx_credits = synqe->rcv_bufsize; Copied and modified: stable/11/sys/dev/cxgbe/tom/t4_tls.c (from r330884, head/sys/dev/cxgbe/tom/t4_tls.c) ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tls.c Tue Mar 13 23:05:51 2018 (r330884, copy source) +++ stable/11/sys/dev/cxgbe/tom/t4_tls.c Thu Mar 28 23:43:38 2019 (r345664) @@ -48,6 +48,19 @@ __FBSDID("$FreeBSD$"); #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" +VNET_DECLARE(int, tcp_do_autosndbuf); +#define V_tcp_do_autosndbuf VNET(tcp_do_autosndbuf) +VNET_DECLARE(int, tcp_autosndbuf_inc); +#define V_tcp_autosndbuf_inc VNET(tcp_autosndbuf_inc) +VNET_DECLARE(int, tcp_autosndbuf_max); +#define V_tcp_autosndbuf_max VNET(tcp_autosndbuf_max) +VNET_DECLARE(int, tcp_do_autorcvbuf); +#define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) +VNET_DECLARE(int, tcp_autorcvbuf_inc); +#define V_tcp_autorcvbuf_inc VNET(tcp_autorcvbuf_inc) +VNET_DECLARE(int, tcp_autorcvbuf_max); +#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) + /* * The TCP sequence number of a CPL_TLS_DATA mbuf is saved here while * the mbuf is in the ulp_pdu_reclaimq. @@ -68,11 +81,17 @@ t4_set_tls_tcb_field(struct toepcb *toep, uint16_t wor { struct adapter *sc = td_adapter(toep->td); - t4_set_tcb_field(sc, toep->ctrlq, toep->tid, word, mask, val, 0, 0, - toep->ofld_rxq->iq.abs_id); + t4_set_tcb_field(sc, toep->ofld_txq, toep, word, mask, val, 0, 0); } /* TLS and DTLS common routines */ +bool +can_tls_offload(struct adapter *sc) +{ + + return (sc->tt.tls && sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS); +} + int tls_tx_key(struct toepcb *toep) { @@ -423,32 +442,13 @@ prepare_txkey_wr(struct tls_keyctx *kwr, struct tls_ke } /* TLS Key memory management */ -int -tls_init_kmap(struct adapter *sc, struct tom_data *td) -{ - - td->key_map = vmem_create("T4TLS key map", sc->vres.key.start, - sc->vres.key.size, 8, 0, M_FIRSTFIT | M_NOWAIT); - if (td->key_map == NULL) - return (ENOMEM); - return (0); -} - -void -tls_free_kmap(struct tom_data *td) -{ - - if (td->key_map != NULL) - vmem_destroy(td->key_map); -} - static int get_new_keyid(struct toepcb *toep, struct tls_key_context *k_ctx) { - struct tom_data *td = toep->td; + struct adapter *sc = td_adapter(toep->td); vmem_addr_t addr; - if (vmem_alloc(td->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT, + if (vmem_alloc(sc->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT, &addr) != 0) return (-1); @@ -458,9 +458,9 @@ get_new_keyid(struct toepcb *toep, struct tls_key_cont static void free_keyid(struct toepcb *toep, int keyid) { - struct tom_data *td = toep->td; + struct adapter *sc = td_adapter(toep->td); - vmem_free(td->key_map, keyid, TLS_KEY_CONTEXT_SZ); + vmem_free(sc->key_map, keyid, TLS_KEY_CONTEXT_SZ); } static void @@ -482,7 +482,7 @@ static int get_keyid(struct tls_ofld_info *tls_ofld, unsigned int ops) { return (ops & KEY_WRITE_RX ? tls_ofld->rx_key_addr : - ((ops & KEY_WRITE_TX) ? tls_ofld->rx_key_addr : -1)); + ((ops & KEY_WRITE_TX) ? tls_ofld->tx_key_addr : -1)); } static int @@ -505,9 +505,9 @@ tls_program_key_id(struct toepcb *toep, struct tls_key struct tls_key_req *kwr; struct tls_keyctx *kctx; - kwrlen = roundup2(sizeof(*kwr), 16); + kwrlen = sizeof(*kwr); kctxlen = roundup2(sizeof(*kctx), 32); - len = kwrlen + kctxlen; + len = roundup2(kwrlen + kctxlen, 16); if (toep->txsd_avail == 0) return (EAGAIN); @@ -549,7 +549,6 @@ tls_program_key_id(struct toepcb *toep, struct tls_key kwr->sc_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM)); kwr->sc_len = htobe32(kctxlen); - /* XXX: This assumes that kwrlen == sizeof(*kwr). */ kctx = (struct tls_keyctx *)(kwr + 1); memset(kctx, 0, kctxlen); @@ -1168,7 +1167,8 @@ t4_push_tls_records(struct adapter *sc, struct toepcb * Send a FIN if requested, but only if there's no * more data to send. */ - if (sbavail(sb) == 0 && toep->flags & TPF_SEND_FIN) { + if (sbavail(sb) == tls_ofld->sb_off && + toep->flags & TPF_SEND_FIN) { if (sowwakeup) sowwakeup_locked(so); else @@ -1182,17 +1182,23 @@ t4_push_tls_records(struct adapter *sc, struct toepcb /* * A full TLS header is not yet queued, stop * for now until more data is added to the - * socket buffer. + * socket buffer. However, if the connection + * has been closed, we will never get the rest + * of the header so just discard the partial + * header and close the connection. */ #ifdef VERBOSE_TRACES - CTR4(KTR_CXGBE, "%s: tid %d sbavail %d sb_off %d", - __func__, toep->tid, sbavail(sb), tls_ofld->sb_off); + CTR5(KTR_CXGBE, "%s: tid %d sbavail %d sb_off %d%s", + __func__, toep->tid, sbavail(sb), tls_ofld->sb_off, + toep->flags & TPF_SEND_FIN ? "" : " SEND_FIN"); #endif if (sowwakeup) sowwakeup_locked(so); else SOCKBUF_UNLOCK(sb); SOCKBUF_UNLOCK_ASSERT(sb); + if (toep->flags & TPF_SEND_FIN) + t4_close_conn(sc, toep); return; } @@ -1209,19 +1215,25 @@ t4_push_tls_records(struct adapter *sc, struct toepcb /* * The full TLS record is not yet queued, stop * for now until more data is added to the - * socket buffer. + * socket buffer. However, if the connection + * has been closed, we will never get the rest + * of the record so just discard the partial + * record and close the connection. */ #ifdef VERBOSE_TRACES - CTR5(KTR_CXGBE, - "%s: tid %d sbavail %d sb_off %d plen %d", + CTR6(KTR_CXGBE, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Fri Mar 29 00:04:51 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A790154F754; Fri, 29 Mar 2019 00:04:51 +0000 (UTC) (envelope-from jhb@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 D50406B980; Fri, 29 Mar 2019 00:04:50 +0000 (UTC) (envelope-from jhb@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 9C44E26B65; Fri, 29 Mar 2019 00:04:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T04oet090052; Fri, 29 Mar 2019 00:04:50 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T04oKO090051; Fri, 29 Mar 2019 00:04:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903290004.x2T04oKO090051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 29 Mar 2019 00:04: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: r345665 - stable/11/sys/arm/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/sys/arm/conf X-SVN-Commit-Revision: 345665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D50406B980 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_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 00:04:51 -0000 Author: jhb Date: Fri Mar 29 00:04:50 2019 New Revision: 345665 URL: https://svnweb.freebsd.org/changeset/base/345665 Log: MFC 318562: Exclude ccr(4) from arm LINT since it excludes cxgbe(4). Modified: stable/11/sys/arm/conf/NOTES Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/conf/NOTES ============================================================================== --- stable/11/sys/arm/conf/NOTES Thu Mar 28 23:43:38 2019 (r345664) +++ stable/11/sys/arm/conf/NOTES Fri Mar 29 00:04:50 2019 (r345665) @@ -77,6 +77,7 @@ nodevice snake_saver nodevice star_saver nodevice warp_saver +nodevice ccr nodevice cxgbe nodevice cxgbev nodevice snd_cmi From owner-svn-src-stable@freebsd.org Fri Mar 29 01:15:38 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AAC8155129A; Fri, 29 Mar 2019 01:15:38 +0000 (UTC) (envelope-from mckusick@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 189EA6D80D; Fri, 29 Mar 2019 01:15:38 +0000 (UTC) (envelope-from mckusick@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 084B127781; Fri, 29 Mar 2019 01:15:38 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T1FbsK026731; Fri, 29 Mar 2019 01:15:37 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1FbnJ026730; Fri, 29 Mar 2019 01:15:37 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903290115.x2T1FbnJ026730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 29 Mar 2019 01:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345666 - in stable/12/sys: kern ufs/ffs X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in stable/12/sys: kern ufs/ffs X-SVN-Commit-Revision: 345666 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 189EA6D80D 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.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 01:15:38 -0000 Author: mckusick Date: Fri Mar 29 01:15:37 2019 New Revision: 345666 URL: https://svnweb.freebsd.org/changeset/base/345666 Log: MFC of 343536, 345077, and 345352 Collectively fixing ffs_truncate3 and dangling dependencies panics when using ACLs. Sponsored by: Netflix Modified: stable/12/sys/kern/vfs_bio.c stable/12/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_bio.c ============================================================================== --- stable/12/sys/kern/vfs_bio.c Fri Mar 29 00:04:50 2019 (r345665) +++ stable/12/sys/kern/vfs_bio.c Fri Mar 29 01:15:37 2019 (r345666) @@ -4852,6 +4852,8 @@ b_io_dismiss(struct buf *bp, int ioflag, bool release) if ((ioflag & IO_DIRECT) != 0) bp->b_flags |= B_DIRECT; + if ((ioflag & IO_EXT) != 0) + bp->b_xflags |= BX_ALTDATA; if ((ioflag & (IO_VMIO | IO_DIRECT)) != 0 && LIST_EMPTY(&bp->b_dep)) { bp->b_flags |= B_RELBUF; if ((ioflag & IO_NOREUSE) != 0) Modified: stable/12/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/12/sys/ufs/ffs/ffs_softdep.c Fri Mar 29 00:04:50 2019 (r345665) +++ stable/12/sys/ufs/ffs/ffs_softdep.c Fri Mar 29 01:15:37 2019 (r345666) @@ -13954,6 +13954,8 @@ softdep_bp_to_mp(bp) if (LIST_EMPTY(&bp->b_dep)) return (NULL); vp = bp->b_vp; + KASSERT(vp != NULL, + ("%s, buffer with dependencies lacks vnode", __func__)); /* * The ump mount point is stable after we get a correct @@ -13963,17 +13965,33 @@ softdep_bp_to_mp(bp) * workitem might be freed while dereferenced. */ retry: - if (vp->v_type == VCHR) { + switch (vp->v_type) { + case VCHR: VI_LOCK(vp); mp = vp->v_type == VCHR ? vp->v_rdev->si_mountpt : NULL; VI_UNLOCK(vp); if (mp == NULL) goto retry; - } else if (vp->v_type == VREG || vp->v_type == VDIR || - vp->v_type == VLNK) { + break; + case VREG: + case VDIR: + case VLNK: + case VFIFO: + case VSOCK: mp = vp->v_mount; - } else { - return (NULL); + break; + case VBLK: + vn_printf(vp, "softdep_bp_to_mp: unexpected block device\n"); + /* FALLTHROUGH */ + case VNON: + case VBAD: + case VMARKER: + mp = NULL; + break; + default: + vn_printf(vp, "unknown vnode type"); + mp = NULL; + break; } return (VFSTOUFS(mp)); } From owner-svn-src-stable@freebsd.org Fri Mar 29 01:16:39 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC5C61551337; Fri, 29 Mar 2019 01:16:39 +0000 (UTC) (envelope-from mckusick@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 600206D959; Fri, 29 Mar 2019 01:16:39 +0000 (UTC) (envelope-from mckusick@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 3C34527783; Fri, 29 Mar 2019 01:16:39 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T1Gdkt026827; Fri, 29 Mar 2019 01:16:39 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1GcSx026825; Fri, 29 Mar 2019 01:16:38 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903290116.x2T1GcSx026825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 29 Mar 2019 01:16: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: r345667 - in stable/11/sys: kern ufs/ffs X-SVN-Group: stable-11 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in stable/11/sys: kern ufs/ffs X-SVN-Commit-Revision: 345667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 600206D959 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.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 01:16:40 -0000 Author: mckusick Date: Fri Mar 29 01:16:38 2019 New Revision: 345667 URL: https://svnweb.freebsd.org/changeset/base/345667 Log: MFC of 343536, 345077, and 345352 Collectively fixing ffs_truncate3 and dangling dependencies panics when using ACLs. Sponsored by: Netflix Modified: stable/11/sys/kern/vfs_bio.c stable/11/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Fri Mar 29 01:15:37 2019 (r345666) +++ stable/11/sys/kern/vfs_bio.c Fri Mar 29 01:16:38 2019 (r345667) @@ -4479,6 +4479,8 @@ b_io_dismiss(struct buf *bp, int ioflag, bool release) if ((ioflag & IO_DIRECT) != 0) bp->b_flags |= B_DIRECT; + if ((ioflag & IO_EXT) != 0) + bp->b_xflags |= BX_ALTDATA; if ((ioflag & (IO_VMIO | IO_DIRECT)) != 0 && LIST_EMPTY(&bp->b_dep)) { bp->b_flags |= B_RELBUF; if ((ioflag & IO_NOREUSE) != 0) Modified: stable/11/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_softdep.c Fri Mar 29 01:15:37 2019 (r345666) +++ stable/11/sys/ufs/ffs/ffs_softdep.c Fri Mar 29 01:16:38 2019 (r345667) @@ -13902,6 +13902,8 @@ softdep_bp_to_mp(bp) if (LIST_EMPTY(&bp->b_dep)) return (NULL); vp = bp->b_vp; + KASSERT(vp != NULL, + ("%s, buffer with dependencies lacks vnode", __func__)); /* * The ump mount point is stable after we get a correct @@ -13911,17 +13913,33 @@ softdep_bp_to_mp(bp) * workitem might be freed while dereferenced. */ retry: - if (vp->v_type == VCHR) { + switch (vp->v_type) { + case VCHR: VI_LOCK(vp); mp = vp->v_type == VCHR ? vp->v_rdev->si_mountpt : NULL; VI_UNLOCK(vp); if (mp == NULL) goto retry; - } else if (vp->v_type == VREG || vp->v_type == VDIR || - vp->v_type == VLNK) { + break; + case VREG: + case VDIR: + case VLNK: + case VFIFO: + case VSOCK: mp = vp->v_mount; - } else { - return (NULL); + break; + case VBLK: + vn_printf(vp, "softdep_bp_to_mp: unexpected block device\n"); + /* FALLTHROUGH */ + case VNON: + case VBAD: + case VMARKER: + mp = NULL; + break; + default: + vn_printf(vp, "unknown vnode type"); + mp = NULL; + break; } return (VFSTOUFS(mp)); } From owner-svn-src-stable@freebsd.org Fri Mar 29 01:32:25 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5456F1551CEE; Fri, 29 Mar 2019 01:32:25 +0000 (UTC) (envelope-from rpokala@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 EB2AB6E424; Fri, 29 Mar 2019 01:32:24 +0000 (UTC) (envelope-from rpokala@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 C6B7B27AC8; Fri, 29 Mar 2019 01:32:24 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T1WO4h037511; Fri, 29 Mar 2019 01:32:24 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1WO8J037510; Fri, 29 Mar 2019 01:32:24 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201903290132.x2T1WO8J037510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Fri, 29 Mar 2019 01:32:24 +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: r345668 - stable/11/sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: stable/11/sys/dev/netmap X-SVN-Commit-Revision: 345668 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EB2AB6E424 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.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 01:32:25 -0000 Author: rpokala Date: Fri Mar 29 01:32:24 2019 New Revision: 345668 URL: https://svnweb.freebsd.org/changeset/base/345668 Log: MFC r339683: Remove redundant redeclaration of netmap_vp_reg(). This should unbreak sparc64 and powerpc LINT builds. -- While this does fix that error, powerpc.LINT, powerpc.LINT64, and -- sparc64.LINT are broken in stable/11 for other reasons. --rpokala Sponsored by: Panasas Modified: stable/11/sys/dev/netmap/netmap_bdg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap_bdg.h ============================================================================== --- stable/11/sys/dev/netmap/netmap_bdg.h Fri Mar 29 01:16:38 2019 (r345667) +++ stable/11/sys/dev/netmap/netmap_bdg.h Fri Mar 29 01:32:24 2019 (r345668) @@ -177,7 +177,6 @@ struct nm_bridge *nm_find_bridge(const char *name, int int netmap_bdg_free(struct nm_bridge *b); void netmap_bdg_detach_common(struct nm_bridge *b, int hw, int sw); int netmap_vp_bdg_ctl(struct nmreq_header *hdr, struct netmap_adapter *na); -int netmap_vp_reg(struct netmap_adapter *na, int onoff); int netmap_bwrap_reg(struct netmap_adapter *, int onoff); int netmap_vp_reg(struct netmap_adapter *na, int onoff); int netmap_vp_rxsync(struct netmap_kring *kring, int flags); From owner-svn-src-stable@freebsd.org Fri Mar 29 01:39:24 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B073155202D; Fri, 29 Mar 2019 01:39:24 +0000 (UTC) (envelope-from philip@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 408A56E72A; Fri, 29 Mar 2019 01:39:24 +0000 (UTC) (envelope-from philip@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 0EA7E27ADF; Fri, 29 Mar 2019 01:39:24 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T1dNgt037882; Fri, 29 Mar 2019 01:39:23 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1dL9i037867; Fri, 29 Mar 2019 01:39:21 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201903290139.x2T1dL9i037867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 29 Mar 2019 01:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345669 - stable/12/contrib/tzdata X-SVN-Group: stable-12 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/12/contrib/tzdata X-SVN-Commit-Revision: 345669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 408A56E72A 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.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 01:39:25 -0000 Author: philip Date: Fri Mar 29 01:39:20 2019 New Revision: 345669 URL: https://svnweb.freebsd.org/changeset/base/345669 Log: MFC r345524: Import tzdata 2019a Modified: stable/12/contrib/tzdata/Makefile stable/12/contrib/tzdata/NEWS stable/12/contrib/tzdata/README stable/12/contrib/tzdata/africa stable/12/contrib/tzdata/asia stable/12/contrib/tzdata/backward stable/12/contrib/tzdata/backzone stable/12/contrib/tzdata/etcetera stable/12/contrib/tzdata/europe stable/12/contrib/tzdata/leap-seconds.list stable/12/contrib/tzdata/leapseconds stable/12/contrib/tzdata/northamerica stable/12/contrib/tzdata/theory.html stable/12/contrib/tzdata/version Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/tzdata/Makefile ============================================================================== --- stable/12/contrib/tzdata/Makefile Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/Makefile Fri Mar 29 01:39:20 2019 (r345669) @@ -12,7 +12,10 @@ VERSION= unknown # Email address for bug reports. BUGEMAIL= tz@iana.org -# Choose source data features. To get new features right away, use: +# DATAFORM selects the data format. +# Available formats represent essentially the same data, albeit +# possibly with minor discrepancies that users are not likely to notice. +# To get new features and the best data right away, use: # DATAFORM= vanguard # To wait a while before using new features, to give downstream users # time to upgrade zic (the default), use: @@ -33,11 +36,11 @@ DATAFORM= main LOCALTIME= GMT # If you want something other than Eastern United States time as a template -# for handling POSIX-style timezone environment variables, +# for handling ruleless POSIX-style timezone environment variables, # change the line below (after finding the timezone you want in the # one of the $(TDATA) source files, or adding it to a source file). -# When a POSIX-style environment variable is handled, the rules in the -# template file are used to determine "spring forward" and "fall back" days and +# A ruleless environment setting like TZ='CST6CDT' uses the rules in the +# template file to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. # Alternatively, if you discover you've got the wrong timezone, you can just @@ -46,7 +49,6 @@ LOCALTIME= GMT # Use the command # make zonenames # to get a list of the values you can use for POSIXRULES. -# If you want POSIX compatibility, use "America/New_York". POSIXRULES= America/New_York @@ -113,8 +115,8 @@ TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TI TIME_T_ALTERNATIVES_HEAD = int64_t TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t -# What kind of TZif data files to generate. -# (TZif is the binary time zone data format that zic generates.) +# What kind of TZif data files to generate. (TZif is the binary time +# zone data format that zic generates; see Internet RFC 8536.) # If you want only POSIX time, with time values interpreted as # seconds since the epoch (not counting leap seconds), use # REDO= posix_only @@ -360,6 +362,9 @@ LEAPSECONDS= zic= ./zic ZIC= $(zic) $(ZFLAGS) +# To shrink the size of installed TZif files, +# append "-r @N" to omit data before N-seconds-after-the-Epoch. +# See the zic man page for more about -r. ZFLAGS= # How to use zic to install TZif files. @@ -491,7 +496,8 @@ MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.t COMMON= calendars CONTRIBUTING LICENSE Makefile \ NEWS README theory.html version WEB_PAGES= tz-art.html tz-how-to.html tz-link.html -CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html +CHECK_WEB_PAGES=check_theory.html check_tz-art.html \ + check_tz-how-to.html check_tz-link.html DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) PRIMARY_YDATA= africa antarctica asia australasia \ europe northamerica southamerica @@ -804,9 +810,10 @@ check_tzs: $(TZS) $(TZS_NEW) touch $@ check_web: $(CHECK_WEB_PAGES) +check_theory.html: theory.html check_tz-art.html: tz-art.html check_tz-link.html: tz-link.html -check_tz-art.html check_tz-link.html: +check_theory.html check_tz-art.html check_tz-link.html: $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \ test ! -s $@.out || { cat $@.out; exit 1; } @@ -840,11 +847,13 @@ check_zishrink_posix check_zishrink_right: \ touch $@ clean_misc: + rm -fr check_*.dir rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ check_* core typecheck_* \ date tzselect version.h zdump zic yearistype libtz.a clean: clean_misc - rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW) + rm -fr *.dir tzdb-*/ + rm -f *.zi $(TZS_NEW) maintainer-clean: clean @echo 'This command is intended for maintainers to use; it' Modified: stable/12/contrib/tzdata/NEWS ============================================================================== --- stable/12/contrib/tzdata/NEWS Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/NEWS Fri Mar 29 01:39:20 2019 (r345669) @@ -1,5 +1,53 @@ News for the tz database +Release 20198 - 2019-03-25 22:01:33 -0700 + + Briefly: + Palestine "springs forward" on 2019-03-30 instead of 2019-03-23. + Metlakatla "fell back" to rejoin Alaska Time on 2019-01-20 at 02:00. + + Changes to past and future timestamps + + Palestine will not start DST until 2019-03-30, instead of 2019-03-23 as + previously predicted. Adjust our prediction by guessing that spring + transitions will be between 24 and 30 March, which matches recent practice + since 2016. (Thanks to Even Scharning and Tim Parenti.) + + Metlakatla ended its observance of Pacific standard time, + rejoining Alaska Time, on 2019-01-20 at 02:00. (Thanks to Ryan + Stanley and Tim Parenti.) + + Changes to past timestamps + + Israel observed DST in 1980 (08-02/09-13) and 1984 (05-05/08-25). + (Thanks to Alois Treindl and Isaac Starkman.) + + Changes to time zone abbreviations + + Etc/UCT is now a backward-compatibility link to Etc/UTC, instead + of being a separate zone that generates the abbreviation "UCT", + which nowadays is typically a typo. (Problem reported by Isiah + Meadows.) + + Changes to code + + zic now has an -r option to limit the time range of output data. + For example, 'zic -r @1000000000' limits the output data to + timestamps starting 1000000000 seconds after the Epoch. + This helps shrink output size and can be useful for applications + not needing the full timestamp history, such as TZDIST truncation; + see Internet RFC 8536 section 5.1. (Inspired by a feature request + from Christopher Wong, helped along by bug reports from Wong and + from Tim Parenti.) + + Changes to documentation + + Mention Internet RFC 8536 (February 2019), which documents TZif. + + tz-link.html now cites tzdata-meta + . + + Release 2018i - 2018-12-30 11:05:43 -0800 Briefly: @@ -400,8 +448,9 @@ Release 2018d - 2018-03-22 07:05:46 -0700 downstream parsers do not support it. * The build procedure constructs three files vanguard.zi, main.zi, - and rearguard.zi, one for each format. The files represent the - same data as closely as the formats allow. These three files + and rearguard.zi, one for each format. Although the files + represent essentially the same data, they may have minor + discrepancies that users are not likely to notice. The files are intended for downstream data consumers and are not installed. Zoneinfo parsers that do not support negative SAVE values should start using rearguard.zi, so that they will be unaffected Modified: stable/12/contrib/tzdata/README ============================================================================== --- stable/12/contrib/tzdata/README Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/README Fri Mar 29 01:39:20 2019 (r345669) @@ -1,7 +1,7 @@ README for the tz distribution -"What time is it?" -- Richard Deacon as The King -"Any time you want it to be." -- Frank Baxter as The Scientist +"Where do I set the hands of the clock?" -- Les Tremayne as The King +"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist (from the Bell System film "About Time") The Time Zone Database (called tz, tzdb or zoneinfo) contains code and Modified: stable/12/contrib/tzdata/africa ============================================================================== --- stable/12/contrib/tzdata/africa Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/africa Fri Mar 29 01:39:20 2019 (r345669) @@ -364,6 +364,11 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # See Africa/Lagos. # Eritrea +# See Africa/Nairobi. + +# Eswatini (formerly Swaziland) +# See Africa/Johannesburg. + # Ethiopia # See Africa/Nairobi. # @@ -1188,7 +1193,7 @@ Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 1:30 - SAST 1903 Mar 2:00 SA SAST Link Africa/Johannesburg Africa/Maseru # Lesotho -Link Africa/Johannesburg Africa/Mbabane # Swaziland +Link Africa/Johannesburg Africa/Mbabane # Eswatini # # Marion and Prince Edward Is # scientific station since 1947 @@ -1229,9 +1234,6 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931 Zone Africa/Juba 2:06:28 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT - -# Swaziland -# See Africa/Johannesburg. # Tanzania # See Africa/Nairobi. Modified: stable/12/contrib/tzdata/asia ============================================================================== --- stable/12/contrib/tzdata/asia Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/asia Fri Mar 29 01:39:20 2019 (r345669) @@ -1620,6 +1620,24 @@ Rule Zion 1974 only - Jul 7 0:00 1:00 D Rule Zion 1974 only - Oct 13 0:00 0 S Rule Zion 1975 only - Apr 20 0:00 1:00 D Rule Zion 1975 only - Aug 31 0:00 0 S + +# From Alois Treindl (2019-03-06): +# http://www.moin.gov.il/Documents/שעון קיץ/clock-50-years-7-2014.pdf +# From Isaac Starkman (2019-03-06): +# Summer time was in that period in 1980 and 1984, see +# https://www.ynet.co.il/articles/0,7340,L-3951073,00.html +# You can of course read it in translation. +# I checked the local newspapers for that years. +# It started on midnight and end at 01.00 am. +# From Paul Eggert (2019-03-06): +# Also see this thread about the moin.gov.il URL: +# https://mm.icann.org/pipermail/tz/2018-November/027194.html +Rule Zion 1980 only - Aug 2 0:00 1:00 D +Rule Zion 1980 only - Sep 13 1:00 0 S +Rule Zion 1984 only - May 5 0:00 1:00 D +Rule Zion 1984 only - Aug 25 1:00 0 S + +# From Shanks & Pottenger: Rule Zion 1985 only - Apr 14 0:00 1:00 D Rule Zion 1985 only - Sep 15 0:00 0 S Rule Zion 1986 only - May 18 0:00 1:00 D @@ -3071,9 +3089,15 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # the official website, though the decree did not specify the exact # time of the time shift. # http://www.palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e7a42ab7-ee23-435a-b9c8-a4f7e81f3817 + +# From Even Scharning (2019-03-23): +# DST in Palestine will start on 30 March this year, not 23 March as the time +# zone database predicted. +# https://ramallah.news/post/123610 # -# From Paul Eggert (2018-03-16): -# For 2016 on, predict spring transitions on March's fourth Saturday at 01:00. +# From Tim Parenti (2019-03-23): +# Combining this with the rules observed since 2016, adjust our spring +# transition guess to Mar Sat>=24. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -3104,7 +3128,7 @@ Rule Palestine 2012 only - Sep 21 1:00 0 - Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - Rule Palestine 2014 2015 - Oct Fri>=21 0:00 0 - Rule Palestine 2015 only - Mar lastFri 24:00 1:00 S -Rule Palestine 2016 max - Mar Sat>=22 1:00 1:00 S +Rule Palestine 2016 max - Mar Sat>=24 1:00 1:00 S Rule Palestine 2016 max - Oct lastSat 1:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -3595,6 +3619,18 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1 7:00 - +07 1959 Dec 31 23:00 8:00 - +08 1975 Jun 13 7:00 - +07 + +# From Paul Eggert (2019-02-19): +# +# The Ho Chi Minh entry suffices for most purposes as it agrees with all of +# Vietnam since 1975-06-13. Presumably clocks often changed in south Vietnam +# in the early 1970s as locations changed hands during the war; however the +# details are unknown and would likely be too voluminous for this database. +# +# For timestamps in north Vietnam back to 1970 (the tzdb cutoff), +# use Asia/Bangkok; see the VN entries in the file zone1970.tab. +# For timestamps before 1970, see Asia/Hanoi in the file 'backzone'. + # Yemen # See Asia/Riyadh. Modified: stable/12/contrib/tzdata/backward ============================================================================== --- stable/12/contrib/tzdata/backward Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/backward Fri Mar 29 01:39:20 2019 (r345669) @@ -77,6 +77,7 @@ Link Pacific/Easter Chile/EasterIsland Link America/Havana Cuba Link Africa/Cairo Egypt Link Europe/Dublin Eire +Link Etc/UTC Etc/UCT Link Europe/London Europe/Belfast Link Europe/Chisinau Europe/Tiraspol Link Europe/London GB @@ -111,7 +112,7 @@ Link Asia/Taipei ROC Link Asia/Seoul ROK Link Asia/Singapore Singapore Link Europe/Istanbul Turkey -Link Etc/UCT UCT +Link Etc/UTC UCT Link America/Anchorage US/Alaska Link America/Adak US/Aleutian Link America/Phoenix US/Arizona Modified: stable/12/contrib/tzdata/backzone ============================================================================== --- stable/12/contrib/tzdata/backzone Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/backzone Fri Mar 29 01:39:20 2019 (r345669) @@ -204,7 +204,7 @@ Zone Africa/Maseru 1:50:00 - LMT 1903 Mar 2:00 1:00 SAST 1944 Mar 19 2:00 2:00 - SAST -# Swaziland +# Eswatini (formerly Swaziland) Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar 2:00 - SAST @@ -625,7 +625,7 @@ Zone Europe/Sarajevo 1:13:40 - LMT 1884 1:00 - CET 1982 Nov 27 1:00 EU CE%sT -# Macedonia +# North Macedonia Zone Europe/Skopje 1:25:44 - LMT 1884 1:00 - CET 1941 Apr 18 23:00 1:00 C-Eur CE%sT 1945 May 8 2:00s Modified: stable/12/contrib/tzdata/etcetera ============================================================================== --- stable/12/contrib/tzdata/etcetera Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/etcetera Fri Mar 29 01:39:20 2019 (r345669) @@ -19,7 +19,6 @@ Zone Etc/GMT 0 - GMT Zone Etc/UTC 0 - UTC -Zone Etc/UCT 0 - UCT # The following link uses older naming conventions, # but it belongs here, not in the file 'backward', Modified: stable/12/contrib/tzdata/europe ============================================================================== --- stable/12/contrib/tzdata/europe Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/europe Fri Mar 29 01:39:20 2019 (r345669) @@ -1855,7 +1855,7 @@ Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun 1:00 Belgium CE%sT 1977 1:00 EU CE%sT -# Macedonia +# North Macedonia # See Europe/Belgrade. # Malta @@ -3359,7 +3359,7 @@ Zone Europe/Belgrade 1:22:00 - LMT 1884 Link Europe/Belgrade Europe/Ljubljana # Slovenia Link Europe/Belgrade Europe/Podgorica # Montenegro Link Europe/Belgrade Europe/Sarajevo # Bosnia and Herzegovina -Link Europe/Belgrade Europe/Skopje # Macedonia +Link Europe/Belgrade Europe/Skopje # North Macedonia Link Europe/Belgrade Europe/Zagreb # Croatia # Slovakia Modified: stable/12/contrib/tzdata/leap-seconds.list ============================================================================== --- stable/12/contrib/tzdata/leap-seconds.list Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/leap-seconds.list Fri Mar 29 01:39:20 2019 (r345669) @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C56 -# File expires on: 28 June 2019 +# Updated through IERS Bulletin C57 +# File expires on: 28 December 2019 # -#@ 3770668800 +#@ 3786480000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h 62ca19f6 96a4ae0a 3708451c 9f8693f4 016604eb +#h 83c68138 d3650221 07dbbbcd 11fcc859 ced1106a Modified: stable/12/contrib/tzdata/leapseconds ============================================================================== --- stable/12/contrib/tzdata/leapseconds Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/leapseconds Fri Mar 29 01:39:20 2019 (r345669) @@ -63,7 +63,7 @@ Leap 2016 Dec 31 23:59:60 + S # POSIX timestamps for the data in this file: #updated 1467936000 -#expires 1561680000 +#expires 1577491200 -# Updated through IERS Bulletin C56 -# File expires on: 28 June 2019 +# Updated through IERS Bulletin C57 +# File expires on: 28 December 2019 Modified: stable/12/contrib/tzdata/northamerica ============================================================================== --- stable/12/contrib/tzdata/northamerica Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/northamerica Fri Mar 29 01:39:20 2019 (r345669) @@ -609,6 +609,15 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12 # In a 2018-12-11 special election, Metlakatla voted to go back to # Alaska time (including daylight saving time) starting next year. # https://www.krbd.org/2018/12/12/metlakatla-to-follow-alaska-standard-time-allow-liquor-sales/ +# +# From Ryan Stanley (2019-01-11): +# The community will be changing back on the 20th of this month... +# From Tim Parenti (2019-01-11): +# Per an announcement on the Metlakatla community's official Facebook page, the +# "fall back" will be on Sunday 2019-01-20 at 02:00: +# https://www.facebook.com/141055983004923/photos/607150969728753/ +# So they won't be waiting for Alaska to join them on 2019-03-10, but will +# rather change their clocks twice in seven weeks. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Juneau 15:02:19 - LMT 1867 Oct 19 15:33:32 @@ -637,7 +646,7 @@ Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 19 15 -8:00 US P%sT 1983 Oct 30 2:00 -8:00 - PST 2015 Nov 1 2:00 -9:00 US AK%sT 2018 Nov 4 2:00 - -8:00 - PST 2019 Mar Sun>=8 3:00 + -8:00 - PST 2019 Jan 20 2:00 -9:00 US AK%sT Zone America/Yakutat 14:41:05 - LMT 1867 Oct 19 15:12:18 -9:18:55 - LMT 1900 Aug 20 12:00 Modified: stable/12/contrib/tzdata/theory.html ============================================================================== --- stable/12/contrib/tzdata/theory.html Fri Mar 29 01:32:24 2019 (r345668) +++ stable/12/contrib/tzdata/theory.html Fri Mar 29 01:39:20 2019 (r345669) @@ -15,7 +15,7 @@
  • Scope of the tz database
  • -
  • Names of timezones
  • +
  • Timezone identifiers
  • Time zone abbreviations
  • Accuracy of the tz database
  • @@ -107,9 +107,9 @@ It does not always make sense to talk about a timezone
    -

    Names of timezones

    +

    Timezone identifiers

    -Each timezone has a unique name. +Each timezone has a name that uniquely identifies the timezone. Inexperienced users are not expected to select these names unaided. Distributors should provide documentation and/or a simple selection interface that explains each name via a map or via descriptive text like @@ -142,10 +142,12 @@ among the following goals:

  • Be robust in the presence of political changes. - For example, names of countries are ordinarily not used, to avoid + For example, names are typically not tied to countries, to avoid incompatibilities when countries change their name (e.g., - Zaire→Congo) or when locations change countries (e.g., Hong + Swaziland→Eswatini) or when locations change countries (e.g., Hong Kong from UK colony to China). + There is no requirement that every country or national + capital must have a timezone name.
  • Be portable to a wide variety of implementations. @@ -215,19 +217,18 @@ in decreasing order of importance: do not need locations, since local time is not defined there.
  • - There should typically be at least one name for each ISO - 3166-1 officially assigned two-letter code for an inhabited - country or territory. -
  • -
  • If all the clocks in a timezone have agreed since 1970, do not bother to include more than one timezone even if some of the clocks disagreed before 1970. Otherwise these tables would become annoyingly large.
  • + If boundaries between regions are fluid, such as during a war or + insurrection, do not bother to create a new timezone merely + because of yet another boundary change. This helps prevent table + bloat and simplifies maintenance. +
  • +
  • If a name is ambiguous, use a less ambiguous alternative; e.g., many cities are named San José and Georgetown, so prefer America/Costa_Rica to @@ -299,29 +300,23 @@ in decreasing order of importance:

-The file 'zone1970.tab' lists geographical locations used -to name timezones. -It is intended to be an exhaustive list of names for geographic -regions as described above; this is a subset of the timezones in the data. -Although a 'zone1970.tab' location's -longitude -corresponds to -its local mean -time (LMT) offset with one hour for every 15° -east longitude, this relationship is not exact. +Guidelines have evolved with time, and names following old versions of +this guideline might not follow the current version. When guidelines +have changed, old names continue to be supported. Guideline changes +have included the following:

-

-Older versions of this package used a different naming scheme, -and these older names are still supported. +

    +
  • +Older versions of this package used a different naming scheme. See the file 'backward' for most of these older names (e.g., 'US/Eastern' instead of 'America/New_York'). The other old-fashioned names still supported are 'WET', 'CET', 'MET', and 'EET' (see the file 'europe'). -

    +
  • -

    +

  • Older versions of this package defined legacy names that are incompatible with the first guideline of location names, but which are still supported. @@ -332,6 +327,31 @@ Also, the file 'backward' defines the leg and the file 'northamerica' defines the legacy names 'EST5EDT', 'CST6CDT', 'MST7MDT', and 'PST8PDT'. +
  • + +
  • +Older versions of this guideline said that +there should typically be at least one name for each ISO +3166-1 officially assigned two-letter code for an inhabited +country or territory. +This old guideline has been dropped, as it was not needed to handle +timestamps correctly and it increased maintenance burden. +
  • +
+ +

+The file 'zone1970.tab' lists geographical locations used +to name timezones. +It is intended to be an exhaustive list of names for geographic +regions as described above; this is a subset of the timezones in the data. +Although a 'zone1970.tab' location's +longitude +corresponds to +its local mean +time (LMT) offset with one hour for every 15° +east longitude, this relationship is not exact.

@@ -983,7 +1003,9 @@ an older zic. constrained to be a string containing abbreviations and numeric data as described above. The file's format is TZif, - a timezone information format that contains binary data. + a timezone information format that contains binary data; see + Internet + RFC 8536. The daylight saving time rules to be used for a particular timezone are encoded in the TZif file; the format of the file allows US, @@ -1166,7 +1188,7 @@ The tz code and data supply