diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/boot/lib/libstand/printf.c | 52 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/libficl/Makefile.com | 2 | ||||
-rw-r--r-- | usr/src/cmd/mdb/common/modules/genunix/devinfo.c | 2 | ||||
-rw-r--r-- | usr/src/common/bzip2/bzlib.c | 4 | ||||
-rw-r--r-- | usr/src/lib/libofmt/common/ofmt.c | 2 | ||||
-rw-r--r-- | usr/src/lib/libzfs/common/libzfs_pool.c | 7 | ||||
-rw-r--r-- | usr/src/man/man3ofmt/Makefile | 4 | ||||
-rw-r--r-- | usr/src/pkg/manifests/SUNWcs.mf | 1 | ||||
-rw-r--r-- | usr/src/uts/common/inet/tcp/tcp_input.c | 10 | ||||
-rw-r--r-- | usr/src/uts/common/inet/tcp_impl.h | 55 | ||||
-rw-r--r-- | usr/src/uts/i86pc/pcie/Makefile | 2 |
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 |