summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-08-20 11:22:01 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-08-20 11:22:01 +0000
commitc4637fee83be721362b4d0cedd4eeb96df4d1511 (patch)
treed3c7a1a4a4c8ef441f2b459f4dfd7d83a105e969
parentfae35450c961f8c5a41382adf0e202906b2c4584 (diff)
parenta2f04351e04971ab0879872d264d6038c156b860 (diff)
downloadillumos-joyent-c4637fee83be721362b4d0cedd4eeb96df4d1511.tar.gz
[illumos-gate merge]
commit a2f04351e04971ab0879872d264d6038c156b860 11547 Want connstat(1M) command to display per-connection TCP statistics commit c12492cf73149aa0aa845af5d59966b0eb5aa910 11546 Track TCP round-trip time in nanoseconds commit 519cca71df494bfdf951168b57893cdbe961647f 11545 Want configurable output field separator for libofmt commit 5b6e8d437b064342671e0a40b3146d7f98802a64 11544 ofmt(3OFMT) should talk about the callback handler commit e7a617a7b674323dacb8a0d3ac64c275c7a72b0c 11373 pcieb should enable link bandwidth notifications (add missing file) commit b3d69c058376d802cdebbced341adcb3253b113c 11376 PCIe speeds and feeds should be exposed to userland 11373 pcieb should enable link bandwidth notifications 11374 Clean up pcieb CERRWARN and smatch 11375 Clean up pcie module -Wno-uninitialized and -Wno-parentheses commit e386d4dde2e66dfdb5d0ac143d970d0a77af2786 11372 Want PCIe dcmds and walkers commit 20513f9e81064120c8e4353fad6cc93898f0bef9 11366 disappearing ixgbe turns correctable error into panic commit 4c63bf63e4b7d55c99e024187bc355893f66c09c 11558 libzfs: allow device removal feature for root pool commit 4c528395822a1beb30134bcd9f7f8b6813db6e5d 11565 loader: this statement may fall through commit 05876af472c3264c8a0734aef9cae317325aadf2 11566 bzip2: unused parameter 'opaque' commit db8c8c38e426ee930350455b89c617823e208136 11567 loader: ficl vm.o volatile argument warning Conflicts: usr/src/uts/common/inet/tcp/tcp_input.c
-rw-r--r--usr/src/boot/lib/libstand/printf.c52
-rw-r--r--usr/src/boot/sys/boot/libficl/Makefile.com2
-rw-r--r--usr/src/cmd/mdb/common/modules/genunix/devinfo.c2
-rw-r--r--usr/src/common/bzip2/bzlib.c4
-rw-r--r--usr/src/lib/libofmt/common/ofmt.c2
-rw-r--r--usr/src/lib/libzfs/common/libzfs_pool.c7
-rw-r--r--usr/src/man/man3ofmt/Makefile4
-rw-r--r--usr/src/pkg/manifests/SUNWcs.mf1
-rw-r--r--usr/src/uts/common/inet/tcp/tcp_input.c10
-rw-r--r--usr/src/uts/common/inet/tcp_impl.h55
-rw-r--r--usr/src/uts/i86pc/pcie/Makefile2
11 files changed, 96 insertions, 45 deletions
diff --git a/usr/src/boot/lib/libstand/printf.c b/usr/src/boot/lib/libstand/printf.c
index d9108b6add..ff87539e79 100644
--- a/usr/src/boot/lib/libstand/printf.c
+++ b/usr/src/boot/lib/libstand/printf.c
@@ -1,4 +1,4 @@
-/*-
+/*
* Copyright (c) 1986, 1988, 1991, 1993
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
@@ -53,12 +53,12 @@
*/
#include <machine/stdarg.h>
-#define MAXNBUF (sizeof(intmax_t) * CHAR_BIT + 1)
+#define MAXNBUF (sizeof (intmax_t) * CHAR_BIT + 1)
typedef void (kvprintf_fn_t)(int, void *);
-static char *ksprintn (char *buf, uintmax_t num, int base, int *len, int upper);
-static int kvprintf(char const *fmt, kvprintf_fn_t *func, void *arg, int radix, va_list ap);
+static char *ksprintn(char *, uintmax_t, int, int *, int);
+static int kvprintf(char const *, kvprintf_fn_t *, void *, int, va_list);
static void
putchar_wrapper(int cc, void *arg)
@@ -76,7 +76,7 @@ printf(const char *fmt, ...)
va_start(ap, fmt);
retval = kvprintf(fmt, putchar_wrapper, NULL, 10, ap);
va_end(ap);
- return retval;
+ return (retval);
}
void
@@ -96,7 +96,7 @@ sprintf(char *buf, const char *cfmt, ...)
retval = kvprintf(cfmt, NULL, (void *)buf, 10, ap);
buf[retval] = '\0';
va_end(ap);
- return retval;
+ return (retval);
}
struct print_buf {
@@ -164,14 +164,14 @@ snprintf(char *buf, size_t size, const char *cfmt, ...)
if (arg.size >= 1)
*(arg.buf)++ = 0;
- return retval;
+ return (retval);
}
void
vsprintf(char *buf, const char *cfmt, va_list ap)
{
int retval;
-
+
retval = kvprintf(cfmt, NULL, (void *)buf, 10, ap);
buf[retval] = '\0';
}
@@ -255,7 +255,7 @@ kvprintf(char const *fmt, kvprintf_fn_t *func, void *arg, int radix, va_list ap)
char *d;
const char *p, *percent, *q;
uint16_t *S;
- u_char *up;
+ uchar_t *up;
int ch, n;
uintmax_t num;
int base, lflag, qflag, tmp, width, ladjust, sharpflag, neg, sign, dot;
@@ -266,7 +266,7 @@ kvprintf(char const *fmt, kvprintf_fn_t *func, void *arg, int radix, va_list ap)
num = 0;
if (!func)
- d = (char *) arg;
+ d = (char *)arg;
else
d = NULL;
@@ -279,7 +279,7 @@ kvprintf(char const *fmt, kvprintf_fn_t *func, void *arg, int radix, va_list ap)
for (;;) {
padc = ' ';
width = 0;
- while ((ch = (u_char)*fmt++) != '%' || stop) {
+ while ((ch = (uchar_t)*fmt++) != '%' || stop) {
if (ch == '\0')
return (retval);
PCHAR(ch);
@@ -288,7 +288,7 @@ kvprintf(char const *fmt, kvprintf_fn_t *func, void *arg, int radix, va_list ap)
qflag = 0; lflag = 0; ladjust = 0; sharpflag = 0; neg = 0;
sign = 0; dot = 0; dwidth = 0; upper = 0;
cflag = 0; hflag = 0; jflag = 0; tflag = 0; zflag = 0;
-reswitch: switch (ch = (u_char)*fmt++) {
+reswitch: switch (ch = (uchar_t)*fmt++) {
case '.':
dot = 1;
goto reswitch;
@@ -320,9 +320,10 @@ reswitch: switch (ch = (u_char)*fmt++) {
padc = '0';
goto reswitch;
}
+ /* FALLTHROUGH */
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- for (n = 0;; ++fmt) {
+ for (n = 0; ; ++fmt) {
n = n * 10 + ch - '0';
ch = *fmt;
if (ch < '0' || ch > '9')
@@ -334,15 +335,15 @@ reswitch: switch (ch = (u_char)*fmt++) {
width = n;
goto reswitch;
case 'b':
- num = (u_int)va_arg(ap, int);
+ num = (uint_t)va_arg(ap, int);
p = va_arg(ap, char *);
- for (q = ksprintn(nbuf, num, *p++, NULL, 0); *q;)
+ for (q = ksprintn(nbuf, num, *p++, NULL, 0); *q; )
PCHAR(*q--);
if (num == 0)
break;
- for (tmp = 0; *p;) {
+ for (tmp = 0; *p; ) {
n = *p++;
if (num & (1 << (n - 1))) {
PCHAR(tmp ? ',' : '<');
@@ -360,16 +361,16 @@ reswitch: switch (ch = (u_char)*fmt++) {
PCHAR(va_arg(ap, int));
break;
case 'D':
- up = va_arg(ap, u_char *);
+ up = va_arg(ap, uchar_t *);
p = va_arg(ap, char *);
if (!width)
width = 16;
- while(width--) {
+ while (width--) {
PCHAR(hex2ascii(*up >> 4));
PCHAR(hex2ascii(*up & 0x0f));
up++;
if (width)
- for (q=p;*q;q++)
+ for (q = p; *q; q++)
PCHAR(*q);
}
break;
@@ -433,7 +434,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
if (p == NULL)
p = "(null)";
if (!dot)
- n = strlen (p);
+ n = strlen(p);
else
for (n = 0; n < dwidth && p[n]; n++)
continue;
@@ -480,6 +481,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
goto handle_nosign;
case 'X':
upper = 1;
+ /* FALLTHROUGH */
case 'x':
base = 16;
goto handle_nosign;
@@ -495,19 +497,19 @@ handle_nosign:
if (jflag)
num = va_arg(ap, uintmax_t);
else if (qflag)
- num = va_arg(ap, u_quad_t);
+ num = va_arg(ap, uint64_t);
else if (tflag)
num = va_arg(ap, ptrdiff_t);
else if (lflag)
- num = va_arg(ap, u_long);
+ num = va_arg(ap, ulong_t);
else if (zflag)
num = va_arg(ap, size_t);
else if (hflag)
- num = (u_short)va_arg(ap, int);
+ num = (ushort_t)va_arg(ap, int);
else if (cflag)
- num = (u_char)va_arg(ap, int);
+ num = (uchar_t)va_arg(ap, int);
else
- num = va_arg(ap, u_int);
+ num = va_arg(ap, uint_t);
goto number;
handle_sign:
if (jflag)
diff --git a/usr/src/boot/sys/boot/libficl/Makefile.com b/usr/src/boot/sys/boot/libficl/Makefile.com
index 1bb02d4a2d..0cd051356f 100644
--- a/usr/src/boot/sys/boot/libficl/Makefile.com
+++ b/usr/src/boot/sys/boot/libficl/Makefile.com
@@ -43,6 +43,8 @@ MINOR = 1.0
lib: libficl.a
+vm.o := CFLAGS += -_gcc=-Wno-clobbered
+
# static library build
libficl.a: $(OBJECTS)
$(AR) $(ARFLAGS) libficl.a $(OBJECTS)
diff --git a/usr/src/cmd/mdb/common/modules/genunix/devinfo.c b/usr/src/cmd/mdb/common/modules/genunix/devinfo.c
index 0d7492e6b7..9578cd9079 100644
--- a/usr/src/cmd/mdb/common/modules/genunix/devinfo.c
+++ b/usr/src/cmd/mdb/common/modules/genunix/devinfo.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2019 Joyent, Inc.
+ * Copyright 2019, Joyent, Inc.
*/
#include <sys/types.h>
diff --git a/usr/src/common/bzip2/bzlib.c b/usr/src/common/bzip2/bzlib.c
index 06b37767c9..fe310125de 100644
--- a/usr/src/common/bzip2/bzlib.c
+++ b/usr/src/common/bzip2/bzlib.c
@@ -181,14 +181,14 @@ void default_bzfree ( void* opaque, void* addr )
/*---------------------------------------------------*/
static
-void* default_bzalloc ( void* opaque, Int32 items, Int32 size )
+void* default_bzalloc ( void* opaque __unused, Int32 items, Int32 size )
{
void* v = malloc ( items * size );
return v;
}
static
-void default_bzfree ( void* opaque, void* addr )
+void default_bzfree ( void* opaque __unused, void* addr )
{
if (addr != NULL) free ( addr );
}
diff --git a/usr/src/lib/libofmt/common/ofmt.c b/usr/src/lib/libofmt/common/ofmt.c
index 26018a68f2..0b248b2b2d 100644
--- a/usr/src/lib/libofmt/common/ofmt.c
+++ b/usr/src/lib/libofmt/common/ofmt.c
@@ -64,7 +64,7 @@ static split_t *split_fields(const ofmt_field_t *, uint_t, uint_t);
* os_nfields set to the number of requested fields.
*/
typedef struct ofmt_state_s {
- ofmt_field_t *os_fields;
+ ofmt_field_t *os_fields;
uint_t os_nfields;
boolean_t os_lastfield;
uint_t os_overflow;
diff --git a/usr/src/lib/libzfs/common/libzfs_pool.c b/usr/src/lib/libzfs/common/libzfs_pool.c
index c18f565354..72ac62ec10 100644
--- a/usr/src/lib/libzfs/common/libzfs_pool.c
+++ b/usr/src/lib/libzfs/common/libzfs_pool.c
@@ -3399,13 +3399,6 @@ zpool_vdev_remove(zpool_handle_t *zhp, const char *path)
return (zfs_error(hdl, EZFS_BADVERSION, msg));
}
- if (!islog && !avail_spare && !l2cache && zpool_is_bootable(zhp)) {
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "root pool can not have removed devices, "
- "because GRUB does not understand them"));
- return (zfs_error(hdl, EINVAL, msg));
- }
-
zc.zc_guid = fnvlist_lookup_uint64(tgt, ZPOOL_CONFIG_GUID);
if (zfs_ioctl(hdl, ZFS_IOC_VDEV_REMOVE, &zc) == 0)
diff --git a/usr/src/man/man3ofmt/Makefile b/usr/src/man/man3ofmt/Makefile
index aab6ca9e24..f1d66dc4f8 100644
--- a/usr/src/man/man3ofmt/Makefile
+++ b/usr/src/man/man3ofmt/Makefile
@@ -15,7 +15,7 @@
include $(SRC)/Makefile.master
-MANSECT= 3ofmt
+MANSECT= 3ofmt
MANFILES= ofmt.3ofmt
@@ -37,4 +37,4 @@ ofmt_update_winsize.3ofmt := LINKSRC = ofmt.3ofmt
include $(SRC)/man/Makefile.man
-install: $(ROOTMANFILES) $(ROOTMANLINKS)
+install: $(ROOTMANFILES) $(ROOTMANLINKS)
diff --git a/usr/src/pkg/manifests/SUNWcs.mf b/usr/src/pkg/manifests/SUNWcs.mf
index 58420dd2fa..2227768e4a 100644
--- a/usr/src/pkg/manifests/SUNWcs.mf
+++ b/usr/src/pkg/manifests/SUNWcs.mf
@@ -1182,6 +1182,7 @@ file path=usr/lib/newsyslog group=sys mode=0555
file path=usr/lib/passmgmt group=sys mode=0555
file path=usr/lib/pci/pcidr mode=0555
file path=usr/lib/pci/pcidr_plugin.so
+file path=usr/lib/pci/pcieb mode=0555
file path=usr/lib/pfexecd mode=0555
file path=usr/lib/platexec mode=0555
file path=usr/lib/rcm/modules/SUNW_aggr_rcm.so mode=0555
diff --git a/usr/src/uts/common/inet/tcp/tcp_input.c b/usr/src/uts/common/inet/tcp/tcp_input.c
index 167cfe721e..ece2abbc04 100644
--- a/usr/src/uts/common/inet/tcp/tcp_input.c
+++ b/usr/src/uts/common/inet/tcp/tcp_input.c
@@ -5380,13 +5380,13 @@ tcp_set_rto(tcp_t *tcp, hrtime_t rtt)
/*
* Update deviation estimator:
- * mdev = 3/4 mdev + 1/4 abs(Error)
+ * mdev = 3/4 mdev + 1/4 abs(Error)
*
* We maintain tcp_rtt_sd as 4 * mdev, so this reduces to:
- * tcp_rtt_sd = 3 * mdev + abs(Error)
- * tcp_rtt_sd = tcp_rtt_sd - (tcp_rtt_sd / 4) + abs(Error)
- * tcp_rtt_sd = tcp_rtt_sd - (tcp_rtt_sd / 2^2) + abs(Error)
- * tcp_rtt_sd = tcp_rtt_sd - (tcp_rtt_sd >> 2) + abs(Error)
+ * tcp_rtt_sd = 3 * mdev + abs(Error)
+ * tcp_rtt_sd = tcp_rtt_sd - (tcp_rtt_sd / 4) + abs(Error)
+ * tcp_rtt_sd = tcp_rtt_sd - (tcp_rtt_sd / 2^2) + abs(Error)
+ * tcp_rtt_sd = tcp_rtt_sd - (tcp_rtt_sd >> 2) + abs(Error)
*/
if (m < 0)
m = -m;
diff --git a/usr/src/uts/common/inet/tcp_impl.h b/usr/src/uts/common/inet/tcp_impl.h
index 61af05f749..f946c1e6e6 100644
--- a/usr/src/uts/common/inet/tcp_impl.h
+++ b/usr/src/uts/common/inet/tcp_impl.h
@@ -636,6 +636,61 @@ tcp_calculate_rto(tcp_t *tcp, tcp_stack_t *tcps, uint32_t extra)
return (rto);
}
+
+/*
+ * As defined in RFC 6298, the RTO is the average estimates (SRTT) plus a
+ * multiple of the deviation estimates (K * RTTVAR):
+ *
+ * RTO = SRTT + max(G, K * RTTVAR)
+ *
+ * K is defined in the RFC as 4, and G is the clock granularity. We constrain
+ * the minimum mean deviation to TCP_SD_MIN when processing new RTTs, so this
+ * becomes:
+ *
+ * RTO = SRTT + 4 * RTTVAR
+ *
+ * In practice, however, we make several additions to it. As we use a finer
+ * grained clock than BSD and update RTO for every ACK, we add in another 1/4 of
+ * RTT to the deviation of RTO to accommodate burstiness of 1/4 of window size:
+ *
+ * RTO = SRTT + (SRTT / 4) + 4 * RTTVAR
+ *
+ * Since tcp_rtt_sa is 8 times the SRTT, and tcp_rtt_sd is 4 times the RTTVAR,
+ * this becomes:
+ *
+ * RTO = (tcp_rtt_sa / 8) + ((tcp_rtt_sa / 8) / 4) + tcp_rtt_sd
+ * RTO = (tcp_rtt_sa / 2^3) + (tcp_rtt_sa / 2^5) + tcp_rtt_sd
+ * RTO = (tcp_rtt_sa >> 3) + (tcp_rtt_sa >> 5) + tcp_rtt_sd
+ *
+ * The "tcp_rexmit_interval_extra" and "tcp_conn_grace_period" tunables are
+ * used to help account for extreme environments where the algorithm fails to
+ * work; by default they should be 0. (The latter tunable is only used for
+ * calculating the intial RTO, and so is optionally passed in as "extra".) We
+ * add them here:
+ *
+ * RTO = (tcp_rtt_sa >> 3) + (tcp_rtt_sa >> 5) + tcp_rtt_sd +
+ * tcps_rexmit_interval_extra + tcps_conn_grace_period
+ *
+ * We then pin the RTO within our configured boundaries (sections 2.4 and 2.5
+ * of RFC 6298).
+ */
+static __GNU_INLINE clock_t
+tcp_calculate_rto(tcp_t *tcp, tcp_stack_t *tcps, uint32_t extra)
+{
+ clock_t rto;
+
+ rto = NSEC2MSEC((tcp->tcp_rtt_sa >> 3) + (tcp->tcp_rtt_sa >> 5) +
+ tcp->tcp_rtt_sd) + tcps->tcps_rexmit_interval_extra + extra;
+
+ if (rto < tcp->tcp_rto_min) {
+ rto = tcp->tcp_rto_min;
+ } else if (rto > tcp->tcp_rto_max) {
+ rto = tcp->tcp_rto_max;
+ }
+
+ return (rto);
+}
+
extern struct qinit tcp_rinitv4, tcp_rinitv6;
extern boolean_t do_tcp_fusion;
diff --git a/usr/src/uts/i86pc/pcie/Makefile b/usr/src/uts/i86pc/pcie/Makefile
index 3b579e7363..1a849006f5 100644
--- a/usr/src/uts/i86pc/pcie/Makefile
+++ b/usr/src/uts/i86pc/pcie/Makefile
@@ -57,8 +57,6 @@ ALL_TARGET = $(BINARY)
INSTALL_TARGET = $(BINARY) $(ROOTMODULE)
CERRWARN += -_gcc=-Wno-unused-value
-CERRWARN += $(CNOWARN_UNINIT)
-CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-unused-variable
CERRWARN += -_gcc=-Wno-unused-function # safe