summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@foobazco.org>2013-04-15 23:44:21 +0000
committerKeith M Wesolowski <wesolows@foobazco.org>2013-04-15 23:56:06 +0000
commitd74e1c52fb42c9e48fc33574a1cc964b27954bc6 (patch)
treeaf02d286b8bc0842f7a7b809591219f7124a15d9
parent484797449e047bc3b1f53f9af574cfd68d8e24c8 (diff)
parent8c430e5901323dc4ac1bd69a6bbf0bc356f02ae5 (diff)
downloadillumos-joyent-d74e1c52fb42c9e48fc33574a1cc964b27954bc6.tar.gz
[illumos-gate merge]
commit 8c430e5901323dc4ac1bd69a6bbf0bc356f02ae5 3708 Fast reboot support in ixgbe commit 187670a04e7557914566fc449b4d3af38caea282 3666 Implement SOCK_CLOEXEC flag to socket() commit f971a3462face662ae8ef220a18a98354d625d54 3673 core dumping is abysmally slow 3671 left behind enemy lines, agent LWP can go rogue 3670 add visibility into agent LWP's spymaster commit abc79d9dd51e98eafb6fc25b4a0b4f66bef40b00 3679 prtconf should print out PCI database information 3680 Want a library to allow programatic access to the pci database Conflicts: usr/src/uts/common/fs/proc/prvnops.c usr/src/uts/common/fs/proc/prcontrol.c usr/src/man/man1m/prtconf.1m usr/src/lib/Makefile usr/src/cmd/ptools/pflags/pflags.c Manifests: usr/src/pkg/manifests/system-library.mf [already present]
-rw-r--r--exception_lists/packaging10
-rw-r--r--usr/src/cmd/ptools/pflags/pflags.c2
-rw-r--r--usr/src/cmd/truss/print.c12
-rw-r--r--usr/src/lib/Makefile2
-rw-r--r--usr/src/man/man1m/prtconf.1m4
-rw-r--r--usr/src/man/man3socket/socket.3socket21
-rw-r--r--usr/src/pkg/manifests/system-library.mf2
-rw-r--r--usr/src/uts/common/fs/proc/prcontrol.c2
-rw-r--r--usr/src/uts/common/fs/proc/prdata.h3
-rw-r--r--usr/src/uts/common/fs/proc/prvnops.c4
-rw-r--r--usr/src/uts/common/fs/sockfs/socksyscalls.c10
-rw-r--r--usr/src/uts/common/io/ixgbe/ixgbe_main.c50
-rw-r--r--usr/src/uts/common/sys/socket.h8
13 files changed, 115 insertions, 15 deletions
diff --git a/exception_lists/packaging b/exception_lists/packaging
index 16e0efd34d..56707cd0f6 100644
--- a/exception_lists/packaging
+++ b/exception_lists/packaging
@@ -981,3 +981,13 @@ usr/include/saveargs.h i386
usr/lib/amd64/libsaveargs.so i386
usr/lib/amd64/libstandsaveargs.so i386
usr/lib/amd64/llib-lsaveargs.ln i386
+
+#
+# libpcidb is private
+#
+usr/include/pcidb.h
+usr/lib/amd64/libpcidb.so
+usr/lib/amd64/llib-lpcidb.ln
+usr/lib/libpcidb.so
+usr/lib/llib-lpcidb
+usr/lib/llib-lpcidb.ln
diff --git a/usr/src/cmd/ptools/pflags/pflags.c b/usr/src/cmd/ptools/pflags/pflags.c
index 4ae6f3c679..8054a80d3c 100644
--- a/usr/src/cmd/ptools/pflags/pflags.c
+++ b/usr/src/cmd/ptools/pflags/pflags.c
@@ -344,7 +344,7 @@ lwplook(look_arg_t *arg, const lwpstatus_t *psp, const lwpsinfo_t *pip)
(void) strftime(t, sizeof (t), "%F:%H.%M.%S", localtime(&time));
(void) printf("\tspymaster = pid %d, \"%s\" at %s\n",
- ps.pr_pid, ps.pr_psargs, t);
+ (int)ps.pr_pid, ps.pr_psargs, t);
}
if (rflag) {
diff --git a/usr/src/cmd/truss/print.c b/usr/src/cmd/truss/print.c
index a8c923fae2..9fbbefbe62 100644
--- a/usr/src/cmd/truss/print.c
+++ b/usr/src/cmd/truss/print.c
@@ -27,6 +27,8 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+/* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
+
#define _SYSCALL32 /* make 32-bit compat headers visible */
#include <stdio.h>
@@ -1690,11 +1692,17 @@ void
prt_skt(private_t *pri, int raw, long val)
{
const char *s;
+ long type = val & SOCK_TYPE_MASK;
- if ((ulong_t)val <= MAX_SOCKTYPES && (s = socktype_codes[val]) != NULL)
+ if ((ulong_t)type <= MAX_SOCKTYPES &&
+ (s = socktype_codes[type]) != NULL) {
outstring(pri, s);
- else
+ if ((val & SOCK_CLOEXEC) != 0) {
+ outstring(pri, "|SOCK_CLOEXEC");
+ }
+ } else {
prt_dec(pri, 0, val);
+ }
}
diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile
index c756409f17..f2692834b9 100644
--- a/usr/src/lib/Makefile
+++ b/usr/src/lib/Makefile
@@ -21,8 +21,8 @@
# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2012, Joyent, Inc. All rights reserved.
# Copyright (c) 2012 by Delphix. All rights reserved.
+# Copyright (c) 2012, Joyent, Inc. All rights reserved.
include ../Makefile.master
diff --git a/usr/src/man/man1m/prtconf.1m b/usr/src/man/man1m/prtconf.1m
index e3f50e60b5..ff62a01992 100644
--- a/usr/src/man/man1m/prtconf.1m
+++ b/usr/src/man/man1m/prtconf.1m
@@ -4,7 +4,7 @@
.\" 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 PRTCONF 1M "Mar 13, 2009"
+.TH PRTCONF 1M "Jan 11, 2013"
.SH NAME
prtconf \- print system configuration
.SH SYNOPSIS
@@ -69,7 +69,7 @@ command line.
.RS 6n
Display vendor ID and device ID for PCI and PCI Express devices, in addition to
the nodename. If the information is known, the vendor name and device name will
-also be showed.
+also be shown.
.RE
.sp
diff --git a/usr/src/man/man3socket/socket.3socket b/usr/src/man/man3socket/socket.3socket
index 1587e04925..be280b082e 100644
--- a/usr/src/man/man3socket/socket.3socket
+++ b/usr/src/man/man3socket/socket.3socket
@@ -1,6 +1,7 @@
'\" te
.\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 1989 AT&T
+.\" Copyright (c) 2013, OmniTI Computer Consulting, 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]
@@ -84,6 +85,22 @@ SOCK_RDM
.sp
.LP
+The \fItype\fR may be augmented by a bitwise-inclusive-OR of flags from the
+following list, defined in <sys/socket.h>.
+
+.sp
+.ne 2
+.na
+\fB\fBSOCK_CLOEXEC\fR\fR
+.ad
+.RS 12n
+Creates the socket with the \fBFD_CLOEXEC\fR flag set, causing the underlying
+file descriptor to be closed prior to any future calls to \fBexec\fR(2). This
+is similar in purpose to the \fBO_CLOEXEC\fR flag to \fBopen\fR(2).
+.RE
+
+.sp
+.LP
There must be an entry in the \fBnetconfig\fR(4) file for at least each
protocol family and type required. If a non-zero protocol has been specified
but no exact match for the protocol family, type, and protocol is found, then
@@ -267,9 +284,9 @@ MT-Level Safe
.sp
.LP
\fBnca\fR(1), \fBclose\fR(2), \fBfcntl\fR(2), \fBioctl\fR(2), \fBread\fR(2),
-\fBwrite\fR(2), \fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET),
+\fBwrite\fR(2), \fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET), \fBexec\fR(2),
\fBconnect\fR(3SOCKET), \fBgetsockname\fR(3SOCKET), \fBgetsockopt\fR(3SOCKET),
-\fBin.h\fR(3HEAD),\fBlisten\fR(3SOCKET), \fBrecv\fR(3SOCKET),
+\fBin.h\fR(3HEAD),\fBlisten\fR(3SOCKET), \fBrecv\fR(3SOCKET), \fBopen\fR(2),
\fBsetsockopt\fR(3SOCKET), \fBsend\fR(3SOCKET), \fBshutdown\fR(3SOCKET),
\fBsocket.h\fR(3HEAD), \fBsocketpair\fR(3SOCKET), \fBattributes\fR(5)
.SH NOTES
diff --git a/usr/src/pkg/manifests/system-library.mf b/usr/src/pkg/manifests/system-library.mf
index 452b6aae14..9ec73f889c 100644
--- a/usr/src/pkg/manifests/system-library.mf
+++ b/usr/src/pkg/manifests/system-library.mf
@@ -347,6 +347,7 @@ file path=usr/lib/$(ARCH64)/libmenu.so.1
file path=usr/lib/$(ARCH64)/libmtmalloc.so.1
file path=usr/lib/$(ARCH64)/libnls.so.1
file path=usr/lib/$(ARCH64)/libpanel.so.1
+file path=usr/lib/$(ARCH64)/libpcidb.so.1
file path=usr/lib/$(ARCH64)/libpkcs11.so.1
file path=usr/lib/$(ARCH64)/libproject.so.1
file path=usr/lib/$(ARCH64)/libraidcfg.so.1
@@ -419,6 +420,7 @@ file path=usr/lib/libmenu.so.1
file path=usr/lib/libmtmalloc.so.1
file path=usr/lib/libnls.so.1
file path=usr/lib/libpanel.so.1
+file path=usr/lib/libpcidb.so.1
file path=usr/lib/libpkcs11.so.1
file path=usr/lib/libproject.so.1
file path=usr/lib/libraidcfg.so.1
diff --git a/usr/src/uts/common/fs/proc/prcontrol.c b/usr/src/uts/common/fs/proc/prcontrol.c
index d0733b9044..a5679a8afb 100644
--- a/usr/src/uts/common/fs/proc/prcontrol.c
+++ b/usr/src/uts/common/fs/proc/prcontrol.c
@@ -25,7 +25,7 @@
*/
/*
- * Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
*/
#include <sys/types.h>
diff --git a/usr/src/uts/common/fs/proc/prdata.h b/usr/src/uts/common/fs/proc/prdata.h
index 6f86282cbd..d3898ca9ea 100644
--- a/usr/src/uts/common/fs/proc/prdata.h
+++ b/usr/src/uts/common/fs/proc/prdata.h
@@ -30,6 +30,9 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+/*
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ */
#ifndef _SYS_PROC_PRDATA_H
#define _SYS_PROC_PRDATA_H
diff --git a/usr/src/uts/common/fs/proc/prvnops.c b/usr/src/uts/common/fs/proc/prvnops.c
index 432bda2c66..c84b9d3726 100644
--- a/usr/src/uts/common/fs/proc/prvnops.c
+++ b/usr/src/uts/common/fs/proc/prvnops.c
@@ -24,10 +24,6 @@
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
*/
-/*
- * Copyright (c) 2012, Joyent, Inc. All rights reserved.
- */
-
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
diff --git a/usr/src/uts/common/fs/sockfs/socksyscalls.c b/usr/src/uts/common/fs/sockfs/socksyscalls.c
index ebd0e5410d..d4f36470e7 100644
--- a/usr/src/uts/common/fs/sockfs/socksyscalls.c
+++ b/usr/src/uts/common/fs/sockfs/socksyscalls.c
@@ -23,6 +23,8 @@
* Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
*/
+/* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
+
#include <sys/types.h>
#include <sys/t_lock.h>
#include <sys/param.h>
@@ -96,14 +98,17 @@ extern int sockfs_defer_nl7c_init;
* devpath for the kernel to use.
*/
int
-so_socket(int family, int type, int protocol, char *devpath, int version)
+so_socket(int family, int type_w_flags, int protocol, char *devpath,
+ int version)
{
struct sonode *so;
vnode_t *vp;
struct file *fp;
int fd;
int error;
+ int type;
+ type = type_w_flags & SOCK_TYPE_MASK;
if (devpath != NULL) {
char *buf;
size_t kdevpathlen = 0;
@@ -137,6 +142,9 @@ so_socket(int family, int type, int protocol, char *devpath, int version)
*/
mutex_exit(&fp->f_tlock);
setf(fd, fp);
+ if ((type_w_flags & SOCK_CLOEXEC) != 0) {
+ f_setfd(fd, FD_CLOEXEC);
+ }
return (fd);
}
diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_main.c b/usr/src/uts/common/io/ixgbe/ixgbe_main.c
index 9b2c00974d..791df9eff8 100644
--- a/usr/src/uts/common/io/ixgbe/ixgbe_main.c
+++ b/usr/src/uts/common/io/ixgbe/ixgbe_main.c
@@ -28,6 +28,7 @@
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
* Copyright 2012 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2013 Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2013 OSN Online Service Nuernberg GmbH. All rights reserved.
*/
#include "ixgbe_sw.h"
@@ -116,6 +117,7 @@ static int ixgbe_attach(dev_info_t *, ddi_attach_cmd_t);
static int ixgbe_detach(dev_info_t *, ddi_detach_cmd_t);
static int ixgbe_resume(dev_info_t *);
static int ixgbe_suspend(dev_info_t *);
+static int ixgbe_quiesce(dev_info_t *);
static void ixgbe_unconfigure(dev_info_t *, ixgbe_t *);
static uint8_t *ixgbe_mc_table_itr(struct ixgbe_hw *, uint8_t **, uint32_t *);
static int ixgbe_cbfunc(dev_info_t *, ddi_cb_action_t, void *, void *, void *);
@@ -176,7 +178,7 @@ static struct dev_ops ixgbe_dev_ops = {
&ixgbe_cb_ops, /* devo_cb_ops */
NULL, /* devo_bus_ops */
ddi_power, /* devo_power */
- ddi_quiesce_not_supported, /* devo_quiesce */
+ ixgbe_quiesce, /* devo_quiesce */
};
static struct modldrv ixgbe_modldrv = {
@@ -684,6 +686,52 @@ ixgbe_detach(dev_info_t *devinfo, ddi_detach_cmd_t cmd)
return (DDI_SUCCESS);
}
+/*
+ * quiesce(9E) entry point.
+ *
+ * This function is called when the system is single-threaded at high
+ * PIL with preemption disabled. Therefore, this function must not be
+ * blocked.
+ *
+ * This function returns DDI_SUCCESS on success, or DDI_FAILURE on failure.
+ * DDI_FAILURE indicates an error condition and should almost never happen.
+ */
+static int
+ixgbe_quiesce(dev_info_t *devinfo)
+{
+ ixgbe_t *ixgbe;
+ struct ixgbe_hw *hw;
+
+ ixgbe = (ixgbe_t *)ddi_get_driver_private(devinfo);
+
+ if (ixgbe == NULL)
+ return (DDI_FAILURE);
+
+ hw = &ixgbe->hw;
+
+ /*
+ * Disable the adapter interrupts
+ */
+ ixgbe_disable_adapter_interrupts(ixgbe);
+
+ /*
+ * Tell firmware driver is no longer in control
+ */
+ ixgbe_release_driver_control(hw);
+
+ /*
+ * Reset the chipset
+ */
+ (void) ixgbe_reset_hw(hw);
+
+ /*
+ * Reset PHY
+ */
+ (void) ixgbe_reset_phy(hw);
+
+ return (DDI_SUCCESS);
+}
+
static void
ixgbe_unconfigure(dev_info_t *devinfo, ixgbe_t *ixgbe)
{
diff --git a/usr/src/uts/common/sys/socket.h b/usr/src/uts/common/sys/socket.h
index 5d4648234c..0b91740d3a 100644
--- a/usr/src/uts/common/sys/socket.h
+++ b/usr/src/uts/common/sys/socket.h
@@ -35,6 +35,8 @@
* contributors.
*/
+/* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
+
#ifndef _SYS_SOCKET_H
#define _SYS_SOCKET_H
@@ -101,6 +103,12 @@ typedef void *_RESTRICT_KYWD Psocklen_t;
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
#define SOCK_RDM 5 /* reliably-delivered message */
#define SOCK_SEQPACKET 6 /* sequenced packet stream */
+#define SOCK_TYPE_MASK 0xffff /* type reside in these bits only */
+
+/*
+ * Flags for socket()
+ */
+#define SOCK_CLOEXEC 0x80000 /* like open(2) O_CLOEXEC for socket */
/*
* Option flags per-socket.