diff options
author | Dan McDonald <danmcd@joyent.com> | 2022-03-15 15:52:12 -0400 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2022-03-15 15:52:12 -0400 |
commit | bff406848a57f4f8d67eb0e8c84224377034048e (patch) | |
tree | 37179de84434dc9e164ead6433d42c2b9d14fab5 | |
parent | 83decd22b44019b0fe369224fb19e1ef21263ab6 (diff) | |
parent | c82c4676ac0cb87eb69c9444cf1a775e756ebbb9 (diff) | |
download | illumos-joyent-bff406848a57f4f8d67eb0e8c84224377034048e.tar.gz |
[illumos-gate merge]
commit c82c4676ac0cb87eb69c9444cf1a775e756ebbb9
14496 git pbchk should look in .git/info for *.NOT files
commit 77ac03cbec412857d39c4898c9ed10abb6061418
14291 cxgbe: asserts when requesting more queues than available
commit 311330e6823a3a919ff127757c2f0cf9eb17aa0e
14539 bhyve: make clobber removes proto file
commit 29ed14768e5e76bb8c95f0a28b4d21d8741dfabe
14436 "dladm show-overlay <overlay>" exits zero when varpd doesn't know about the overlay
commit bbf215553c7233fbab8a0afdf1fac74c44781867
14443 resection manual pages per IPD4
commit 236cb9a89d936b4b681853751c9af1adccc35ef9
14554 TSC calibration is the PITs
Conflicts:
usr/src/cmd/bhyve/Makefile
usr/src/cmd/dladm/dladm.c
usr/src/cmd/svc/milestone/net-physical
usr/src/cmd/svc/milestone/network-physical.xml
usr/src/cmd/zoneadmd/zoneadmd.c
usr/src/cmd/zonecfg/zonecfg.c
usr/src/lib/libzonecfg/common/libzonecfg.c
usr/src/man/man1/hostname.1
usr/src/man/man1/zlogin.1
usr/src/man/man4/Makefile
usr/src/man/man4d/Makefile
usr/src/man/man4d/cpuid.4d
usr/src/man/man4fs/Makefile
usr/src/man/man4i/Makefile
usr/src/man/man4m/Makefile
usr/src/man/man4p/vxlan.4p
usr/src/man/man5/proc.5
usr/src/man/man5/process.5
usr/src/man/man7/Makefile
usr/src/man/man7/privileges.7
usr/src/man/man7/resource_controls.7
usr/src/man/man8/Makefile
usr/src/man/man8/connstat.8
usr/src/man/man8/dladm.8
usr/src/man/man8/dumpadm.8
usr/src/man/man8/flowadm.8
usr/src/man/man8/prstat.8
usr/src/man/man8/reboot.8
usr/src/man/man8/route.8
usr/src/man/man8/savecore.8
usr/src/man/man8/smbios.8
usr/src/man/man8/snoop.8
usr/src/man/man8/svc.startd.8
usr/src/man/man8/tunefs.8
usr/src/man/man8/zfs.8
usr/src/man/man8/zoneadm.8
usr/src/man/man8/zonecfg.8
usr/src/man/man8/zpool.8
usr/src/man/man9f/ddi_fm_init.9f
usr/src/test/util-tests/tests/dladm/Makefile
usr/src/test/util-tests/tests/dladm/show-overlay-exit.ksh
-rw-r--r-- | usr/src/cmd/bhyve/Makefile | 9 | ||||
-rw-r--r-- | usr/src/cmd/bhyve/test/Makefile.com | 2 | ||||
-rw-r--r-- | usr/src/man/man8/flowadm.8 | 93 | ||||
-rw-r--r-- | usr/src/man/man8/zpool.8 | 1 | ||||
-rw-r--r-- | usr/src/pkg/manifests/system-test-utiltest.p5m | 2 | ||||
-rw-r--r-- | usr/src/test/util-tests/runfiles/default.run | 3 | ||||
-rw-r--r-- | usr/src/test/util-tests/tests/dladm/show-overlay-exit.ksh | 5 | ||||
-rw-r--r-- | usr/src/tools/scripts/git-pbchk.1onbld | 10 | ||||
-rw-r--r-- | usr/src/tools/scripts/git-pbchk.py | 2 | ||||
-rw-r--r-- | usr/src/uts/common/io/cxgbe/common/common.h | 1 | ||||
-rw-r--r-- | usr/src/uts/common/io/cxgbe/common/t4_hw.c | 1 | ||||
-rw-r--r-- | usr/src/uts/common/io/cxgbe/t4nex/adapter.h | 6 | ||||
-rw-r--r-- | usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c | 226 | ||||
-rw-r--r-- | usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c | 20 | ||||
-rw-r--r-- | usr/src/uts/i86pc/os/tscc_hpet.c | 9 | ||||
-rw-r--r-- | usr/src/uts/i86pc/os/tscc_pit.c | 5 |
16 files changed, 234 insertions, 161 deletions
diff --git a/usr/src/cmd/bhyve/Makefile b/usr/src/cmd/bhyve/Makefile index 59568ecc9b..f9857645a7 100644 --- a/usr/src/cmd/bhyve/Makefile +++ b/usr/src/cmd/bhyve/Makefile @@ -13,7 +13,7 @@ # Copyright 2014 Pluribus Networks Inc. # Copyright 2020 Joyent, Inc. # Copyright 2020 Oxide Computer Company -# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. # PROG = bhyve @@ -105,8 +105,6 @@ SRCS = acpi.c \ OBJS = $(SRCS:.c=.o) -CLOBBERFILES = $(ROOTUSRSBINPROG) $(ZHYVE) - ZHYVE_DIR = $(ROOT)/usr/lib/brand/bhyve ZHYVE_PROG = zhyve ZHYVE = $(ZHYVE_DIR)/$(ZHYVE_PROG) @@ -115,7 +113,8 @@ MEVENT_TEST_PROG = mevent_test MEVENT_TEST_SRCS = mevent.c mevent_test.c MEVENT_TEST_OBJS = $(MEVENT_TEST_SRCS:.c=.o) -CLEANFILES = $(PROG) $(ZHYVE_PROG) $(MEVENT_TEST_PROG) $(MEVENT_TEST_OBJS) +CLEANFILES = $(OBJS) $(MEVENT_TEST_OBJS) +CLOBBERFILES = $(PROG) $(MEVENT_TEST_PROG) $(ZHYVE_PROG) CFLAGS += $(CCVERBOSE) CFLAGS += -_gcc=-Wimplicit-function-declaration -_gcc=-Wno-parentheses @@ -183,7 +182,7 @@ $(MEVENT_TEST_PROG): $(MEVENT_TEST_OBJS) install: all $(ZHYVE) $(ROOTUSRSBINPROG) $(SUBDIRS) clean: $(SUBDIRS) - $(RM) $(OBJS) $(CLEANFILES) + $(RM) $(CLEANFILES) clobber: clean $(SUBDIRS) $(RM) $(CLOBBERFILES) diff --git a/usr/src/cmd/bhyve/test/Makefile.com b/usr/src/cmd/bhyve/test/Makefile.com index 244d2e215b..1d1aa1e630 100644 --- a/usr/src/cmd/bhyve/test/Makefile.com +++ b/usr/src/cmd/bhyve/test/Makefile.com @@ -33,7 +33,7 @@ LDFLAGS += -lproc SMOFF += all_func_returns -CLEANFILES += $(PROG) +CLOBBERFILES += $(PROG) # # Install related definitions diff --git a/usr/src/man/man8/flowadm.8 b/usr/src/man/man8/flowadm.8 index b9de942c0b..561a24b17a 100644 --- a/usr/src/man/man8/flowadm.8 +++ b/usr/src/man/man8/flowadm.8 @@ -1,26 +1,20 @@ '\" te .\" Copyright 2020 Peter Tribble +.\" Copyright 2022 Joyent, Inc. .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved -.\" Copyright (c) 2011, Joyent, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH FLOWADM 8 "February 5, 2022" +.TH FLOWADM 8 "March 15, 2022" .SH NAME flowadm \- administer bandwidth resource control and priority for protocols, services, containers, and virtual machines .SH SYNOPSIS -.LP -.nf -\fBflowadm show-flow\fR [\fB-pP\fR] [\fB-S\fR] [\fB-s\fR [\fB-i\fR \fIinterval\fR]] [\fB-l\fR \fIlink\fR] - [\fB-o\fR \fIfield\fR[,...]] [\fB-z\fR \fIzonename\fR] [\fIflow\fR] -.fi - -.LP .nf -\fBflowadm add-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] [\fB-z\fR \fIzonename\fR] \fB-l\fR \fIlink\fR - \fB-a\fR \fIattr\fR=\fIvalue\fR[,...] \fB-p\fR \fIprop\fR=\fIvalue\fR[,...] \fIflow\fR +\fBflowadm add-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] [\fB-z\fR \fIzonename\fR] \fB-l\fR \fIlink\fR \fB-a\fR + \fIattr\fR=\fIvalue\fR[,...] [\fB-p\fR \fIprop\fR=\fIvalue\fR[,...]] \fIflow\fR \fBflowadm remove-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] [\fB-z\fR \fIzonename\fR] {\fB-l\fR \fIlink\fR | \fIflow\fR} +\fBflowadm show-flow\fR [\fB-p\fR] [\fB-l\fR \fIlink\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-z\fR \fIzonename\fR] [\fIflow\fR] .fi .LP @@ -69,7 +63,9 @@ The following subcommands are supported: .sp .ne 2 .na -\fB\fBflowadm show-flow\fR [\fB-pP\fR] [\fB-s\fR [\fB-i\fR \fIinterval\fR]] [\fB-o\fR \fIfield\fR[,...]] [\fB-l\fR \fIlink\fR] [\fB-z\fR \fIzonename\fR] [\fIflow\fR]\fR +\fB\fBflowadm add-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] \fB-l\fR +[\fB-z\fR \fIzonename\fR] \fIlink\fR \fB-a\fR \fIattr\fR=\fIvalue\fR[,...] +[\fB-p\fR \fIprop\fR=\fIvalue\fR[,...]] \fIflow\fR\fR .ad .sp .6 .RS 4n @@ -107,6 +103,16 @@ persistent creation. .sp .ne 2 .na +\fB\fB-z\fR \fIzonename\fR +.ad +.sp .6 +.RS 4n +Operate on a link that has been delegated to the specified zone. +.RE + +.sp +.ne 2 +.na \fB\fB-l\fR \fIlink\fR, \fB--link\fR=\fIlink\fR\fR .ad .sp .6 @@ -141,8 +147,8 @@ values. Flow properties are documented in the "Flow Properties" section, below. .sp .ne 2 .na -\fB\fBflowadm remove-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] \fB-l\fR -{\fIlink\fR | \fIflow\fR}\fR +\fB\fBflowadm remove-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] [\fB-z\fR \fIzonename\fR] +\fB-l\fR {\fIlink\fR | \fIflow\fR}\fR .ad .sp .6 .RS 4n @@ -180,13 +186,23 @@ If a link is specified, remove all flows from that link. If a single flow is specified, remove only that flow. .RE +.sp +.ne 2 +.na +\fB\fB-z\fR \fIzonename\fR +.ad +.sp .6 +.RS 4n +Operate on a link that has been delegated to the specified zone. +.RE + .RE .sp .ne 2 .na \fB\fBflowadm show-flow\fR [\fB-pP\fR] [\fB-s\fR [\fB-i\fR \fIinterval\fR]] -[\fB-o\fR \fIfield\fR[,...]] [\fB-l\fR \fIlink\fR] [\fIflow\fR]\fR +[\fB-o\fR \fIfield\fR[,...]] [\fB-l\fR \fIlink\fR] [\fB-z\fR \fIzonename\fR] [\fIflow\fR]\fR .ad .sp .6 .RS 4n @@ -209,30 +225,27 @@ display all fields. For each flow found, the following fields can be displayed: .ad .sp .6 .RS 4n -Display information for all flows on the named link or information for the -named flow. +The name of the flow. .RE .sp .ne 2 .na -\fB\fB-z\fR \fIzonename\fR +\fB\fBlink\fR\fR .ad .sp .6 .RS 4n -Operate on a link that has been delegated to the specified zone. -.RE - +The name of the link the flow is on. .RE .sp .ne 2 .na -\fB\fBflowadm add-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] [\fB-z\fR \fIzonename\fR] \fB-l\fR \fIlink\fR \fB-a\fR \fIattr\fR=\fIvalue\fR[,...] \fB-p\fR \fIprop\fR=\fIvalue\fR[,...] \fIflow\fR\fR +\fB\fB-z\fR \fIzonename\fR .ad .sp .6 .RS 4n -The name of the link the flow is on. +Operate on a link that has been delegated to the specified zone. .RE .sp @@ -259,17 +272,7 @@ The name of the layer for protocol to be used. .sp .ne 2 .na -\fB\fB-z\fR \fIzonename\fR -.ad -.sp .6 -.RS 4n -Operate on a link that has been delegated to the specified zone. -.RE - -.sp -.ne 2 -.na -\fB\fB-l\fR \fIlink\fR, \fB--link\fR=\fIlink\fR\fR +\fB\fBlport\fR\fR .ad .sp .6 .RS 4n @@ -303,15 +306,7 @@ header. .sp .ne 2 .na -\fB\fBflowadm remove-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] [\fB-z\fR \fIzonename\fR] \fB-l\fR {\fIlink\fR | \fIflow\fR}\fR -.ad -.sp .6 -.RS 4n -Remove an existing flow identified by its link or name. -.sp -.ne 2 -.na -\fB\fB-t\fR, \fB--temporary\fR\fR +\fB\fB-p\fR, \fB--parsable\fR\fR .ad .sp .6 .RS 4n @@ -331,17 +326,7 @@ Display persistent flow property information. .sp .ne 2 .na -\fB\fB-z\fR \fIzonename\fR -.ad -.sp .6 -.RS 4n -Operate on a link that has been delegated to the specified zone. -.RE - -.sp -.ne 2 -.na -\fB\fB-l\fR \fIlink\fR | \fIflow\fR, \fB--link\fR=\fIlink\fR | \fIflow\fR\fR +\fB\fB-l\fR \fIlink\fR, \fB--link\fR=\fIlink\fR | \fIflow\fR\fR .ad .sp .6 .RS 4n diff --git a/usr/src/man/man8/zpool.8 b/usr/src/man/man8/zpool.8 index f9ee7c6687..bd649506a6 100644 --- a/usr/src/man/man8/zpool.8 +++ b/usr/src/man/man8/zpool.8 @@ -20,7 +20,6 @@ .\" .\" .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. -.\" Copyright (c) 2013, Joyent, Inc. All Rights Reserved. .\" Copyright (c) 2012, 2017 by Delphix. All rights reserved. .\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright (c) 2017 Datto Inc. diff --git a/usr/src/pkg/manifests/system-test-utiltest.p5m b/usr/src/pkg/manifests/system-test-utiltest.p5m index f7195d0379..0d9a3bab21 100644 --- a/usr/src/pkg/manifests/system-test-utiltest.p5m +++ b/usr/src/pkg/manifests/system-test-utiltest.p5m @@ -15,7 +15,7 @@ # Copyright 2014 Nexenta Systems, Inc. All rights reserved. # Copyright 2020 Joyent, Inc. # Copyright 2017 Jason King. -# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. # Copyright 2021 Oxide Computer Company # diff --git a/usr/src/test/util-tests/runfiles/default.run b/usr/src/test/util-tests/runfiles/default.run index 7744cf0b85..996aa85eee 100644 --- a/usr/src/test/util-tests/runfiles/default.run +++ b/usr/src/test/util-tests/runfiles/default.run @@ -35,6 +35,9 @@ outputdir = /var/tmp/test_results [/opt/util-tests/tests/libjedec_test] [/opt/util-tests/tests/smbios] +[/opt/util-tests/tests/show-overlay-exit] +user = root + # # The sleep tests require destructive DTrace. Therefore they must be run # as root. diff --git a/usr/src/test/util-tests/tests/dladm/show-overlay-exit.ksh b/usr/src/test/util-tests/tests/dladm/show-overlay-exit.ksh index 8a551a8182..b6e9f0cbf4 100644 --- a/usr/src/test/util-tests/tests/dladm/show-overlay-exit.ksh +++ b/usr/src/test/util-tests/tests/dladm/show-overlay-exit.ksh @@ -12,6 +12,7 @@ # # Copyright (c) 2017, Joyent, Inc. +# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. # soe_arg0="$(basename $0)" @@ -38,7 +39,7 @@ function fatal function setup { - dladm create-overlay -v $soe_vnetid -e $soe_encap -s $soe_search \ + dladm create-overlay -t -v $soe_vnetid -e $soe_encap -s $soe_search \ -p vxlan/listen_ip=$soe_dummy_ip -p direct/dest_ip=$soe_dummy_ip \ -p direct/dest_port=$soe_port $soe_overlay || \ fatal "failed to create overlay" @@ -79,4 +80,4 @@ efail $soe_overlay $soe_etherstub cleanup -printf "TEST PASS: $soe_arg0" +print "TEST PASS: $soe_arg0" diff --git a/usr/src/tools/scripts/git-pbchk.1onbld b/usr/src/tools/scripts/git-pbchk.1onbld index 5876caef63..a25fb4aa90 100644 --- a/usr/src/tools/scripts/git-pbchk.1onbld +++ b/usr/src/tools/scripts/git-pbchk.1onbld @@ -15,7 +15,7 @@ .\" Copyright 2018 Joyent, Inc. .\" -.TH "GIT\-PBCHK" "1ONBLD" "September 4, 2018" "" "" +.TH "GIT\-PBCHK" "1ONBLD" "February 10, 2022" "" "" .SH "NAME" \fBgit\-pbchk\fR \- nits and pre\-putback checks for git @@ -52,13 +52,13 @@ Check that each source file contains a copyright notice for the current year\. You don't need to fix this if you, the potential new copyright holder, chooses not to .TP C style [cstyle] -Check that C source files conform to the Illumos C style rules +Check that C source files conform to the illumos C style rules .TP Header check [hdrchk] -Check that C header files conform to the Illumos header style rules (in addition to the general C rules) +Check that C header files conform to the illumos header style rules (in addition to the general C rules) .TP Java style [jstyle] -Check that Java source files conform to the Illumos Java style rules (which differ from the traditionally recommended Java style) +Check that Java source files conform to the illumos Java style rules (which differ from the traditionally recommended Java style) .TP SCCS Keywords [keywords] Check that no source files contain unexpanded SCCS keywords\. It is possible that this check may false positive on certain inputs\. It is generally obvious when this is the case\. @@ -77,7 +77,7 @@ Check for whitespace issues such as mixed tabs/spaces in source files. Exception lists can be used to exclude certain files from checking, named after the specific check. They can be found in \fB$CODEMGR_WS/exception_lists/\fR, or optionally under -\fB$CODEMGR_WS/\.git/\fR, where they must be suffixed \fB.NOT\fR. +\fB$CODEMGR_WS/\.git/info/\fR, where they must be suffixed \fB.NOT\fR. .IP "" 0 diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py index 7f52749594..6f6c750648 100644 --- a/usr/src/tools/scripts/git-pbchk.py +++ b/usr/src/tools/scripts/git-pbchk.py @@ -172,7 +172,7 @@ def not_check(root, cmd): should be excluded from the check named by 'cmd'""" ignorefiles = list(filter(os.path.exists, - [os.path.join(root, ".git", "%s.NOT" % cmd), + [os.path.join(root, ".git/info", "%s.NOT" % cmd), os.path.join(root, "exception_lists", cmd)])) return Ignore.ignore(root, ignorefiles) diff --git a/usr/src/uts/common/io/cxgbe/common/common.h b/usr/src/uts/common/io/cxgbe/common/common.h index 76c7778f45..58235c0a05 100644 --- a/usr/src/uts/common/io/cxgbe/common/common.h +++ b/usr/src/uts/common/io/cxgbe/common/common.h @@ -333,7 +333,6 @@ struct pf_resources { unsigned int neq; /* N egress Qs */ unsigned int nethctrl; /* N egress ETH or CTRL Qs */ unsigned int niqflint; /* N ingress Qs/w free list(s) & intr */ - unsigned int niq; /* N ingress Qs */ unsigned int tc; /* PCI-E traffic class */ unsigned int pmask; /* port access rights mask */ unsigned int nexactf; /* N exact MPS filters */ diff --git a/usr/src/uts/common/io/cxgbe/common/t4_hw.c b/usr/src/uts/common/io/cxgbe/common/t4_hw.c index f83131720e..f22da3f5c7 100644 --- a/usr/src/uts/common/io/cxgbe/common/t4_hw.c +++ b/usr/src/uts/common/io/cxgbe/common/t4_hw.c @@ -3380,7 +3380,6 @@ int t4_get_pfres(struct adapter *adapter) */ word = be32_to_cpu(rpl.niqflint_niq); pfres->niqflint = G_FW_PFVF_CMD_NIQFLINT(word); - pfres->niq = G_FW_PFVF_CMD_NIQ(word); word = be32_to_cpu(rpl.type_to_neq); pfres->neq = G_FW_PFVF_CMD_NEQ(word); diff --git a/usr/src/uts/common/io/cxgbe/t4nex/adapter.h b/usr/src/uts/common/io/cxgbe/t4nex/adapter.h index 081fe870b1..32feb079e7 100644 --- a/usr/src/uts/common/io/cxgbe/t4nex/adapter.h +++ b/usr/src/uts/common/io/cxgbe/t4nex/adapter.h @@ -428,8 +428,10 @@ struct sge { struct sge_ofld_rxq *ofld_rxq; /* TOE rx queues */ #endif - uint16_t iq_start; - int eq_start; + int iq_start; /* iq context id map start index */ + int eq_start; /* eq context id map start index */ + int iqmap_sz; /* size of iq context id map */ + int eqmap_sz; /* size of eq context id map */ struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ diff --git a/usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c b/usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c index 894950c2e7..9180de2392 100644 --- a/usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c +++ b/usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c @@ -303,7 +303,7 @@ t4_devo_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) struct adapter *sc = NULL; struct sge *s; int i, instance, rc = DDI_SUCCESS, rqidx, tqidx, q; - int irq = 0, nxg, n100g, n40g, n25g, n10g, n1g; + int irq = 0, nxg = 0, n1g = 0; #ifdef TCP_OFFLOAD_ENABLE int ofld_rqidx, ofld_tqidx; #endif @@ -525,7 +525,6 @@ t4_devo_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) * out whether a port is 10G or 1G and use that information when * calculating how many interrupts to attempt to allocate. */ - n100g = n40g = n25g = n10g = n1g = 0; for_each_port(sc, i) { struct port_info *pi; @@ -552,20 +551,8 @@ t4_devo_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) mutex_init(&pi->lock, NULL, MUTEX_DRIVER, NULL); pi->mtu = ETHERMTU; - if (is_100G_port(pi)) { - n100g++; - pi->tmr_idx = prp->tmr_idx_10g; - pi->pktc_idx = prp->pktc_idx_10g; - } else if (is_40G_port(pi)) { - n40g++; - pi->tmr_idx = prp->tmr_idx_10g; - pi->pktc_idx = prp->pktc_idx_10g; - } else if (is_25G_port(pi)) { - n25g++; - pi->tmr_idx = prp->tmr_idx_10g; - pi->pktc_idx = prp->pktc_idx_10g; - } else if (is_10G_port(pi)) { - n10g++; + if (is_10XG_port(pi)) { + nxg++; pi->tmr_idx = prp->tmr_idx_10g; pi->pktc_idx = prp->pktc_idx_10g; } else { @@ -580,7 +567,6 @@ t4_devo_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) setbit(&sc->registered_device_map, i); } - nxg = n10g + n25g + n40g + n100g; (void) remove_extra_props(sc, nxg, n1g); if (sc->registered_device_map == 0) { @@ -642,8 +628,8 @@ t4_devo_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) #endif s->rxq = kmem_zalloc(s->nrxq * sizeof (struct sge_rxq), KM_SLEEP); s->txq = kmem_zalloc(s->ntxq * sizeof (struct sge_txq), KM_SLEEP); - s->iqmap = kmem_zalloc(s->niq * sizeof (struct sge_iq *), KM_SLEEP); - s->eqmap = kmem_zalloc(s->neq * sizeof (struct sge_eq *), KM_SLEEP); + s->iqmap = kmem_zalloc(s->iqmap_sz * sizeof (struct sge_iq *), KM_SLEEP); + s->eqmap = kmem_zalloc(s->eqmap_sz * sizeof (struct sge_eq *), KM_SLEEP); sc->intr_handle = kmem_zalloc(sc->intr_count * sizeof (ddi_intr_handle_t), KM_SLEEP); @@ -815,46 +801,12 @@ ofld_queues: */ t4_dump_version_info(sc); - if (n100g) { - cxgb_printf(dip, CE_NOTE, - "%dx100G (%d rxq, %d txq total) %d %s.", - n100g, rqidx, tqidx, sc->intr_count, - sc->intr_type == DDI_INTR_TYPE_MSIX ? "MSI-X interrupts" : - sc->intr_type == DDI_INTR_TYPE_MSI ? "MSI interrupts" : - "fixed interrupt"); - } else if (n40g) { - cxgb_printf(dip, CE_NOTE, - "%dx40G (%d rxq, %d txq total) %d %s.", - n40g, rqidx, tqidx, sc->intr_count, - sc->intr_type == DDI_INTR_TYPE_MSIX ? "MSI-X interrupts" : - sc->intr_type == DDI_INTR_TYPE_MSI ? "MSI interrupts" : - "fixed interrupt"); - } else if (n25g) { - cxgb_printf(dip, CE_NOTE, - "%dx25G (%d rxq, %d txq total) %d %s.", - n25g, rqidx, tqidx, sc->intr_count, + cxgb_printf(dip, CE_NOTE, + "(%d rxq, %d txq total) %d %s.", + rqidx, tqidx, sc->intr_count, sc->intr_type == DDI_INTR_TYPE_MSIX ? "MSI-X interrupts" : sc->intr_type == DDI_INTR_TYPE_MSI ? "MSI interrupts" : "fixed interrupt"); - } else if (n10g && n1g) { - cxgb_printf(dip, CE_NOTE, - "%dx10G %dx1G (%d rxq, %d txq total) %d %s.", - n10g, n1g, rqidx, tqidx, sc->intr_count, - sc->intr_type == DDI_INTR_TYPE_MSIX ? "MSI-X interrupts" : - sc->intr_type == DDI_INTR_TYPE_MSI ? "MSI interrupts" : - "fixed interrupt"); - } else { - cxgb_printf(dip, CE_NOTE, - "%dx%sG (%d rxq, %d txq per port) %d %s.", - n10g ? n10g : n1g, - n10g ? "10" : "1", - n10g ? iaq.nrxq10g : iaq.nrxq1g, - n10g ? iaq.ntxq10g : iaq.ntxq1g, - sc->intr_count, - sc->intr_type == DDI_INTR_TYPE_MSIX ? "MSI-X interrupts" : - sc->intr_type == DDI_INTR_TYPE_MSI ? "MSI interrupts" : - "fixed interrupt"); - } sc->ksp = setup_kstats(sc); sc->ksp_stat = setup_wc_kstats(sc); @@ -934,9 +886,9 @@ t4_devo_detach(dev_info_t *dip, ddi_detach_cmd_t cmd) if (s->txq != NULL) kmem_free(s->txq, s->ntxq * sizeof (struct sge_txq)); if (s->iqmap != NULL) - kmem_free(s->iqmap, s->niq * sizeof (struct sge_iq *)); + kmem_free(s->iqmap, s->iqmap_sz * sizeof (struct sge_iq *)); if (s->eqmap != NULL) - kmem_free(s->eqmap, s->neq * sizeof (struct sge_eq *)); + kmem_free(s->eqmap, s->eqmap_sz * sizeof (struct sge_eq *)); if (s->rxbuf_cache != NULL) rxbuf_cache_destroy(s->rxbuf_cache); @@ -1708,6 +1660,19 @@ get_params__post_init(struct adapter *sc) sc->vres.l2t.start = val[4]; sc->vres.l2t.size = val[5] - val[4] + 1; + param[0] = FW_PARAM_PFVF(IQFLINT_END); + param[1] = FW_PARAM_PFVF(EQ_END); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val); + if (rc != 0) { + cxgb_printf(sc->dip, CE_WARN, + "failed to query eq/iq map size parameters (post_init): %d.\n", + rc); + return (rc); + } + + sc->sge.iqmap_sz = val[0] - sc->sge.iq_start + 1; + sc->sge.eqmap_sz = val[1] - sc->sge.eq_start + 1; + /* get capabilites */ bzero(&caps, sizeof (caps)); caps.op_to_write = htonl(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | @@ -1744,6 +1709,13 @@ get_params__post_init(struct adapter *sc) sc->params.offload = 1; } + rc = -t4_get_pfres(sc); + if (rc != 0) { + cxgb_printf(sc->dip, CE_WARN, + "failed to query PF resource params: %d.\n", rc); + return (rc); + } + /* These are finalized by FW initialization, load their values now */ val[0] = t4_read_reg(sc, A_TP_TIMER_RESOLUTION); sc->params.tp.tre = G_TIMERRESOLUTION(val[0]); @@ -2127,22 +2099,113 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, int n1g, struct intrs_and_queues *iaq) { struct driver_properties *p = &sc->props; - int rc, itype, itypes, navail, nc, nrxq10g, nrxq1g, n; - int nofldrxq10g = 0, nofldrxq1g = 0; + int rc, itype, itypes, navail, nc, n; + int pfres_rxq, pfres_txq, pfresq; bzero(iaq, sizeof (*iaq)); nc = ncpus; /* our snapshot of the number of CPUs */ iaq->ntxq10g = min(nc, p->max_ntxq_10g); iaq->ntxq1g = min(nc, p->max_ntxq_1g); - iaq->nrxq10g = nrxq10g = min(nc, p->max_nrxq_10g); - iaq->nrxq1g = nrxq1g = min(nc, p->max_nrxq_1g); + iaq->nrxq10g = min(nc, p->max_nrxq_10g); + iaq->nrxq1g = min(nc, p->max_nrxq_1g); #ifdef TCP_OFFLOAD_ENABLE iaq->nofldtxq10g = min(nc, p->max_nofldtxq_10g); iaq->nofldtxq1g = min(nc, p->max_nofldtxq_1g); - iaq->nofldrxq10g = nofldrxq10g = min(nc, p->max_nofldrxq_10g); - iaq->nofldrxq1g = nofldrxq1g = min(nc, p->max_nofldrxq_1g); + iaq->nofldrxq10g = min(nc, p->max_nofldrxq_10g); + iaq->nofldrxq1g = min(nc, p->max_nofldrxq_1g); +#endif + + pfres_rxq = iaq->nrxq10g * n10g + iaq->nrxq1g * n1g; + pfres_txq = iaq->ntxq10g * n10g + iaq->ntxq1g * n1g; +#ifdef TCP_OFFLOAD_ENABLE + pfres_rxq += iaq->nofldrxq10g * n10g + iaq->nofldrxq1g * n1g; + pfres_txq += iaq->nofldtxq10g * n10g + iaq->nofldtxq1g * n1g; +#endif + + /* If current configuration of max number of Rxqs and Txqs exceed + * the max available for all the ports under this PF, then shrink + * the queues to max available. Reduce them in a way that each + * port under this PF has equally distributed number of queues. + * Must guarantee at least 1 queue for each port for both NIC + * and Offload queues. + * + * neq - fixed max number of Egress queues on Tx path and Free List + * queues that hold Rx payload data on Rx path. Half are reserved + * for Egress queues and the other half for Free List queues. + * Hence, the division by 2. + * + * niqflint - max number of Ingress queues with interrupts on Rx + * path to receive completions that indicate Rx payload has been + * posted in its associated Free List queue. Also handles Tx + * completions for packets successfully transmitted on Tx path. + * + * nethctrl - max number of Egress queues only for Tx path. This + * number is usually half of neq. However, if it became less than + * neq due to lack of resources based on firmware configuration, + * then take the lower value. + */ + while (pfres_rxq > + min(sc->params.pfres.neq / 2, sc->params.pfres.niqflint)) { + pfresq = pfres_rxq; + + if (iaq->nrxq10g > 1) { + iaq->nrxq10g--; + pfres_rxq -= n10g; + } + + if (iaq->nrxq1g > 1) { + iaq->nrxq1g--; + pfres_rxq -= n1g; + } + +#ifdef TCP_OFFLOAD_ENABLE + if (iaq->nofldrxq10g > 1) { + iaq->nofldrxq10g--; + pfres_rxq -= n10g; + } + + if (iaq->nofldrxq1g > 1) { + iaq->nofldrxq1g--; + pfres_rxq -= n1g; + } #endif + /* Break if nothing changed */ + if (pfresq == pfres_rxq) + break; + } + + while (pfres_txq > + min(sc->params.pfres.neq / 2, sc->params.pfres.nethctrl)) { + pfresq = pfres_txq; + + if (iaq->ntxq10g > 1) { + iaq->ntxq10g--; + pfres_txq -= n10g; + } + + if (iaq->ntxq1g > 1) { + iaq->ntxq1g--; + pfres_txq -= n1g; + } + +#ifdef TCP_OFFLOAD_ENABLE + if (iaq->nofldtxq10g > 1) { + iaq->nofldtxq10g--; + pfres_txq -= n10g; + } + + if (iaq->nofldtxq1g > 1) { + iaq->nofldtxq1g--; + pfres_txq -= n1g; + } +#endif + + /* Break if nothing changed */ + if (pfresq == pfres_txq) + break; + } + rc = ddi_intr_get_supported_types(sc->dip, &itypes); if (rc != DDI_SUCCESS) { cxgb_printf(sc->dip, CE_WARN, @@ -2177,8 +2240,12 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, int n1g, * as offload). */ iaq->nirq = T4_EXTRA_INTR; - iaq->nirq += n10g * (nrxq10g + nofldrxq10g); - iaq->nirq += n1g * (nrxq1g + nofldrxq1g); + iaq->nirq += n10g * iaq->nrxq10g; + iaq->nirq += n1g * iaq->nrxq1g; +#ifdef TCP_OFFLOAD_ENABLE + iaq->nirq += n10g * iaq->nofldrxq10g; + iaq->nirq += n1g * iaq->nofldrxq1g; +#endif if (iaq->nirq <= navail && (itype != DDI_INTR_TYPE_MSI || ISP2(iaq->nirq))) { @@ -2192,8 +2259,13 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, int n1g, * offload rxq's. */ iaq->nirq = T4_EXTRA_INTR; - iaq->nirq += n10g * max(nrxq10g, nofldrxq10g); - iaq->nirq += n1g * max(nrxq1g, nofldrxq1g); +#ifdef TCP_OFFLOAD_ENABLE + iaq->nirq += n10g * max(iaq->nrxq10g, iaq->nofldrxq10g); + iaq->nirq += n1g * max(iaq->nrxq1g, iaq->nofldrxq1g); +#else + iaq->nirq += n10g * iaq->nrxq10g; + iaq->nirq += n1g * iaq->nrxq1g; +#endif if (iaq->nirq <= navail && (itype != DDI_INTR_TYPE_MSI || ISP2(iaq->nirq))) { iaq->intr_fwd = 1; @@ -2212,32 +2284,38 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, int n1g, int leftover = navail - iaq->nirq; if (n10g > 0) { - int target = max(nrxq10g, nofldrxq10g); + int target = iaq->nrxq10g; +#ifdef TCP_OFFLOAD_ENABLE + target = max(target, iaq->nofldrxq10g); +#endif n = 1; while (n < target && leftover >= n10g) { leftover -= n10g; iaq->nirq += n10g; n++; } - iaq->nrxq10g = min(n, nrxq10g); + iaq->nrxq10g = min(n, iaq->nrxq10g); #ifdef TCP_OFFLOAD_ENABLE - iaq->nofldrxq10g = min(n, nofldrxq10g); + iaq->nofldrxq10g = min(n, iaq->nofldrxq10g); #endif } if (n1g > 0) { - int target = max(nrxq1g, nofldrxq1g); + int target = iaq->nrxq1g; +#ifdef TCP_OFFLOAD_ENABLE + target = max(target, iaq->nofldrxq1g); +#endif n = 1; while (n < target && leftover >= n1g) { leftover -= n1g; iaq->nirq += n1g; n++; } - iaq->nrxq1g = min(n, nrxq1g); + iaq->nrxq1g = min(n, iaq->nrxq1g); #ifdef TCP_OFFLOAD_ENABLE - iaq->nofldrxq1g = min(n, nofldrxq1g); + iaq->nofldrxq1g = min(n, iaq->nofldrxq1g); #endif } diff --git a/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c b/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c index 3ec695dfbe..1560206373 100644 --- a/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c +++ b/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c @@ -1425,9 +1425,9 @@ alloc_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl, iq->polling = 0; cntxt_id = iq->cntxt_id - sc->sge.iq_start; - if (cntxt_id >= sc->sge.niq) { + if (cntxt_id >= sc->sge.iqmap_sz) { panic("%s: iq->cntxt_id (%d) more than the max (%d)", __func__, - cntxt_id, sc->sge.niq - 1); + cntxt_id, sc->sge.iqmap_sz - 1); } sc->sge.iqmap[cntxt_id] = iq; @@ -1437,9 +1437,9 @@ alloc_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl, fl->copy_threshold = rx_copy_threshold; cntxt_id = fl->cntxt_id - sc->sge.eq_start; - if (cntxt_id >= sc->sge.neq) { + if (cntxt_id >= sc->sge.eqmap_sz) { panic("%s: fl->cntxt_id (%d) more than the max (%d)", - __func__, cntxt_id, sc->sge.neq - 1); + __func__, cntxt_id, sc->sge.eqmap_sz - 1); } sc->sge.eqmap[cntxt_id] = (void *)fl; @@ -1685,9 +1685,9 @@ ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq) eq->cntxt_id = G_FW_EQ_CTRL_CMD_EQID(BE_32(c.cmpliqid_eqid)); cntxt_id = eq->cntxt_id - sc->sge.eq_start; - if (cntxt_id >= sc->sge.neq) + if (cntxt_id >= sc->sge.eqmap_sz) panic("%s: eq->cntxt_id (%d) more than the max (%d)", __func__, - cntxt_id, sc->sge.neq - 1); + cntxt_id, sc->sge.eqmap_sz - 1); sc->sge.eqmap[cntxt_id] = eq; return (rc); @@ -1728,9 +1728,9 @@ eth_eq_alloc(struct adapter *sc, struct port_info *pi, struct sge_eq *eq) eq->cntxt_id = G_FW_EQ_ETH_CMD_EQID(BE_32(c.eqid_pkd)); cntxt_id = eq->cntxt_id - sc->sge.eq_start; - if (cntxt_id >= sc->sge.neq) + if (cntxt_id >= sc->sge.eqmap_sz) panic("%s: eq->cntxt_id (%d) more than the max (%d)", __func__, - cntxt_id, sc->sge.neq - 1); + cntxt_id, sc->sge.eqmap_sz - 1); sc->sge.eqmap[cntxt_id] = eq; return (rc); @@ -1771,9 +1771,9 @@ ofld_eq_alloc(struct adapter *sc, struct port_info *pi, struct sge_eq *eq) eq->cntxt_id = G_FW_EQ_OFLD_CMD_EQID(BE_32(c.eqid_pkd)); cntxt_id = eq->cntxt_id - sc->sge.eq_start; - if (cntxt_id >= sc->sge.neq) + if (cntxt_id >= sc->sge.eqmap_sz) panic("%s: eq->cntxt_id (%d) more than the max (%d)", __func__, - cntxt_id, sc->sge.neq - 1); + cntxt_id, sc->sge.eqmap_sz - 1); sc->sge.eqmap[cntxt_id] = eq; return (rc); diff --git a/usr/src/uts/i86pc/os/tscc_hpet.c b/usr/src/uts/i86pc/os/tscc_hpet.c index dc18bb8a90..3987d64001 100644 --- a/usr/src/uts/i86pc/os/tscc_hpet.c +++ b/usr/src/uts/i86pc/os/tscc_hpet.c @@ -98,9 +98,16 @@ tsc_calibrate_hpet(uint64_t *freqp) return (B_TRUE); } +/* + * Reports from the field suggest that HPET calibration is currently producing + * a substantially greater error than PIT calibration on a wide variety of + * systems. We are placing it last in the preference order until that can be + * resolved. HPET calibration cannot be disabled completely, as some systems + * no longer emulate the PIT at all. + */ static tsc_calibrate_t tsc_calibration_hpet = { .tscc_source = "HPET", - .tscc_preference = 50, + .tscc_preference = 1, .tscc_calibrate = tsc_calibrate_hpet, }; TSC_CALIBRATION_SOURCE(tsc_calibration_hpet); diff --git a/usr/src/uts/i86pc/os/tscc_pit.c b/usr/src/uts/i86pc/os/tscc_pit.c index 80663669d9..5dbcf8540a 100644 --- a/usr/src/uts/i86pc/os/tscc_pit.c +++ b/usr/src/uts/i86pc/os/tscc_pit.c @@ -157,8 +157,9 @@ tsc_calibrate_pit(uint64_t *freqp) } /* - * Typically any source besides the PIT is going to provide better - * results, so a low preference is assigned to the PIT so it is tried last. + * Typically a calibration source that allows the hardware or the hypervisor to + * simply declare a specific frequency, rather than requiring calibration at + * runtime, is going to provide better results than the using PIT. */ static tsc_calibrate_t tsc_calibration_pit = { .tscc_source = "PIT", |