svn commit: r223362 - in projects/largeSMP: contrib/lukemftp
contrib/top etc etc/defaults etc/rc.d lib/msun/src
sbin/geom/class/part share/man/man5 share/mk sys/conf
sys/dev/atkbdc sys/dev/e1000 sy...
Attilio Rao
attilio at FreeBSD.org
Tue Jun 21 09:09:53 UTC 2011
Author: attilio
Date: Tue Jun 21 09:09:53 2011
New Revision: 223362
URL: http://svn.freebsd.org/changeset/base/223362
Log:
MFC
Added:
- copied from r223361, head/contrib/tnftp/
projects/largeSMP/etc/rc.d/netwait
- copied unchanged from r223361, head/etc/rc.d/netwait
projects/largeSMP/sys/powerpc/ps3/ohci_ps3.c
- copied unchanged from r223361, head/sys/powerpc/ps3/ohci_ps3.c
projects/largeSMP/sys/powerpc/ps3/ps3disk.c
- copied unchanged from r223361, head/sys/powerpc/ps3/ps3disk.c
projects/largeSMP/usr.bin/ftp/tnftp_config.h
- copied unchanged from r223361, head/usr.bin/ftp/tnftp_config.h
projects/largeSMP/usr.sbin/makefs/mtree.c
- copied unchanged from r223361, head/usr.sbin/makefs/mtree.c
Directory Properties:
projects/largeSMP/contrib/tnftp/ (props changed)
Deleted:
projects/largeSMP/contrib/lukemftp/
projects/largeSMP/usr.bin/ftp/config.h
Modified:
projects/largeSMP/contrib/top/display.c
projects/largeSMP/contrib/top/top.h
projects/largeSMP/etc/defaults/rc.conf
projects/largeSMP/etc/rc.d/Makefile
projects/largeSMP/etc/rc.d/mountcritremote
projects/largeSMP/etc/rc.subr
projects/largeSMP/lib/msun/src/e_rem_pio2.c
projects/largeSMP/sbin/geom/class/part/geom_part.c
projects/largeSMP/share/man/man5/rc.conf.5
projects/largeSMP/sys/conf/files.powerpc
projects/largeSMP/sys/dev/atkbdc/atkbd.c
projects/largeSMP/sys/dev/e1000/if_igb.c
projects/largeSMP/sys/dev/e1000/if_igb.h
projects/largeSMP/sys/dev/firewire/fwohci.c
projects/largeSMP/sys/dev/pccbb/pccbb_pci.c
projects/largeSMP/sys/fs/nfs/nfs_commonkrpc.c
projects/largeSMP/sys/fs/nfsclient/nfs_clkrpc.c
projects/largeSMP/sys/fs/nfsserver/nfs_nfsdcache.c
projects/largeSMP/sys/fs/nfsserver/nfs_nfsdkrpc.c
projects/largeSMP/sys/fs/nfsserver/nfs_nfsdserv.c
projects/largeSMP/sys/fs/nfsserver/nfs_nfsdsocket.c
projects/largeSMP/sys/geom/part/g_part_bsd.c
projects/largeSMP/sys/kgssapi/gss_impl.c
projects/largeSMP/sys/modules/Makefile
projects/largeSMP/sys/modules/kgssapi_krb5/Makefile
projects/largeSMP/sys/net/route.c
projects/largeSMP/sys/net/route.h
projects/largeSMP/sys/net80211/ieee80211_ht.c
projects/largeSMP/sys/net80211/ieee80211_var.h
projects/largeSMP/sys/netinet/ipfw/ip_dn_io.c
projects/largeSMP/sys/netinet/ipfw/ip_fw_pfil.c
projects/largeSMP/sys/netinet/tcp_output.c
projects/largeSMP/sys/nfsclient/nfs_krpc.c
projects/largeSMP/sys/nfsserver/nfs_srvkrpc.c
projects/largeSMP/sys/powerpc/ps3/if_glc.c
projects/largeSMP/sys/powerpc/ps3/ps3bus.c
projects/largeSMP/sys/powerpc/ps3/ps3bus.h
projects/largeSMP/sys/rpc/rpc_generic.c
projects/largeSMP/sys/rpc/rpcsec_gss.h
projects/largeSMP/sys/sparc64/sparc64/mp_machdep.c
projects/largeSMP/sys/sparc64/sparc64/pmap.c
projects/largeSMP/sys/ufs/ffs/ffs_alloc.c
projects/largeSMP/sys/ufs/ffs/ffs_extern.h
projects/largeSMP/sys/ufs/ffs/ffs_softdep.c
projects/largeSMP/sys/vm/vm_fault.c
projects/largeSMP/sys/vm/vm_page.c
projects/largeSMP/sys/vm/vm_page.h
projects/largeSMP/usr.bin/ftp/Makefile
projects/largeSMP/usr.sbin/makefs/Makefile
projects/largeSMP/usr.sbin/makefs/cd9660/cd9660_write.c
projects/largeSMP/usr.sbin/makefs/ffs.c
projects/largeSMP/usr.sbin/makefs/makefs.8
projects/largeSMP/usr.sbin/makefs/makefs.c
projects/largeSMP/usr.sbin/makefs/makefs.h
projects/largeSMP/usr.sbin/mfiutil/mfi_config.c
projects/largeSMP/usr.sbin/mfiutil/mfi_drive.c
projects/largeSMP/usr.sbin/mfiutil/mfi_patrol.c
projects/largeSMP/usr.sbin/mfiutil/mfi_show.c
projects/largeSMP/usr.sbin/mfiutil/mfiutil.8
projects/largeSMP/usr.sbin/mfiutil/mfiutil.c
projects/largeSMP/usr.sbin/mfiutil/mfiutil.h
projects/largeSMP/usr.sbin/ypserv/yp_main.c
Directory Properties:
projects/largeSMP/ (props changed)
projects/largeSMP/cddl/contrib/opensolaris/ (props changed)
projects/largeSMP/contrib/bind9/ (props changed)
projects/largeSMP/contrib/binutils/ (props changed)
projects/largeSMP/contrib/bzip2/ (props changed)
projects/largeSMP/contrib/compiler-rt/ (props changed)
projects/largeSMP/contrib/dialog/ (props changed)
projects/largeSMP/contrib/ee/ (props changed)
projects/largeSMP/contrib/expat/ (props changed)
projects/largeSMP/contrib/file/ (props changed)
projects/largeSMP/contrib/gcc/ (props changed)
projects/largeSMP/contrib/gdb/ (props changed)
projects/largeSMP/contrib/gdtoa/ (props changed)
projects/largeSMP/contrib/gnu-sort/ (props changed)
projects/largeSMP/contrib/groff/ (props changed)
projects/largeSMP/contrib/less/ (props changed)
projects/largeSMP/contrib/libpcap/ (props changed)
projects/largeSMP/contrib/libstdc++/ (props changed)
projects/largeSMP/contrib/llvm/ (props changed)
projects/largeSMP/contrib/llvm/tools/clang/ (props changed)
projects/largeSMP/contrib/ncurses/ (props changed)
projects/largeSMP/contrib/netcat/ (props changed)
projects/largeSMP/contrib/ntp/ (props changed)
projects/largeSMP/contrib/one-true-awk/ (props changed)
projects/largeSMP/contrib/openbsm/ (props changed)
projects/largeSMP/contrib/openpam/ (props changed)
projects/largeSMP/contrib/pf/ (props changed)
projects/largeSMP/contrib/sendmail/ (props changed)
projects/largeSMP/contrib/tcpdump/ (props changed)
projects/largeSMP/contrib/tcsh/ (props changed)
projects/largeSMP/contrib/top/ (props changed)
projects/largeSMP/contrib/top/install-sh (props changed)
projects/largeSMP/contrib/tzcode/stdtime/ (props changed)
projects/largeSMP/contrib/tzcode/zic/ (props changed)
projects/largeSMP/contrib/tzdata/ (props changed)
projects/largeSMP/contrib/wpa/ (props changed)
projects/largeSMP/contrib/xz/ (props changed)
projects/largeSMP/crypto/openssh/ (props changed)
projects/largeSMP/crypto/openssl/ (props changed)
projects/largeSMP/gnu/lib/ (props changed)
projects/largeSMP/gnu/usr.bin/binutils/ (props changed)
projects/largeSMP/gnu/usr.bin/cc/cc_tools/ (props changed)
projects/largeSMP/gnu/usr.bin/gdb/ (props changed)
projects/largeSMP/lib/libc/ (props changed)
projects/largeSMP/lib/libc/stdtime/ (props changed)
projects/largeSMP/lib/libutil/ (props changed)
projects/largeSMP/lib/libz/ (props changed)
projects/largeSMP/sbin/ (props changed)
projects/largeSMP/sbin/ipfw/ (props changed)
projects/largeSMP/share/mk/bsd.arch.inc.mk (props changed)
projects/largeSMP/share/zoneinfo/ (props changed)
projects/largeSMP/sys/ (props changed)
projects/largeSMP/sys/amd64/include/xen/ (props changed)
projects/largeSMP/sys/boot/ (props changed)
projects/largeSMP/sys/boot/i386/efi/ (props changed)
projects/largeSMP/sys/boot/ia64/efi/ (props changed)
projects/largeSMP/sys/boot/ia64/ski/ (props changed)
projects/largeSMP/sys/boot/powerpc/boot1.chrp/ (props changed)
projects/largeSMP/sys/boot/powerpc/ofw/ (props changed)
projects/largeSMP/sys/cddl/contrib/opensolaris/ (props changed)
projects/largeSMP/sys/conf/ (props changed)
projects/largeSMP/sys/contrib/dev/acpica/ (props changed)
projects/largeSMP/sys/contrib/octeon-sdk/ (props changed)
projects/largeSMP/sys/contrib/pf/ (props changed)
projects/largeSMP/sys/contrib/x86emu/ (props changed)
projects/largeSMP/usr.bin/calendar/ (props changed)
projects/largeSMP/usr.bin/csup/ (props changed)
projects/largeSMP/usr.bin/procstat/ (props changed)
projects/largeSMP/usr.sbin/ndiscvt/ (props changed)
projects/largeSMP/usr.sbin/zic/ (props changed)
Modified: projects/largeSMP/contrib/top/display.c
==============================================================================
--- projects/largeSMP/contrib/top/display.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/contrib/top/display.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -698,7 +698,7 @@ char *text;
int width;
s = NULL;
- width = screen_width;
+ width = display_width;
header_length = strlen(text);
if (header_length >= width) {
s = malloc((width + 1) * sizeof(char));
@@ -706,14 +706,6 @@ char *text;
return (NULL);
strncpy(s, text, width);
s[width] = '\0';
- } else {
- s = malloc((width + 1) * sizeof(char));
- if (s == NULL)
- return (NULL);
- strncpy(s, text, width);
- while (screen_width > header_length)
- s[header_length++] = ' ';
- s[width] = '\0';
}
return (s);
}
@@ -738,7 +730,7 @@ char *text;
if (header_status == ON)
{
putchar('\n');
- standout(text, stdout);
+ fputs(text, stdout);
lastline++;
}
else if (header_status == ERASE)
Modified: projects/largeSMP/contrib/top/top.h
==============================================================================
--- projects/largeSMP/contrib/top/top.h Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/contrib/top/top.h Tue Jun 21 09:09:53 2011 (r223362)
@@ -14,7 +14,7 @@
extern int Header_lines; /* 7 */
/* Maximum number of columns allowed for display */
-#define MAX_COLS 512
+#define MAX_COLS 128
/* Log base 2 of 1024 is 10 (2^10 == 1024) */
#define LOG1024 10
Modified: projects/largeSMP/etc/defaults/rc.conf
==============================================================================
--- projects/largeSMP/etc/defaults/rc.conf Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/etc/defaults/rc.conf Tue Jun 21 09:09:53 2011 (r223362)
@@ -444,6 +444,13 @@ ubthidhci_enable="NO" # Switch an USB B
#ubthidhci_addr="2" # Check usbconfig list to find the correct
# numbers for your system.
+### Network link/usability verification options
+netwait_enable="NO" # Enable rc.d/netwait (or NO)
+#netwait_ip="" # IP addresses to be pinged by netwait.
+netwait_timeout="60" # Total number of seconds to perform pings.
+#netwait_if="" # Interface name to watch link state on.
+netwait_if_timeout="30" # Total number of seconds to monitor link state.
+
### Miscellaneous network options: ###
icmp_bmcastecho="NO" # respond to broadcast ping packets
Modified: projects/largeSMP/etc/rc.d/Makefile
==============================================================================
--- projects/largeSMP/etc/rc.d/Makefile Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/etc/rc.d/Makefile Tue Jun 21 09:09:53 2011 (r223362)
@@ -22,7 +22,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKI
ldconfig local localpkg lockd lpd \
mixer motd mountcritlocal mountcritremote mountlate \
mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \
- named natd netif netoptions \
+ named natd netif netoptions netwait \
newsyslog nfsclient nfscbd nfsd \
nfsserver nfsuserd nisdomain nsswitch ntpd ntpdate \
othermta \
Modified: projects/largeSMP/etc/rc.d/mountcritremote
==============================================================================
--- projects/largeSMP/etc/rc.d/mountcritremote Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/etc/rc.d/mountcritremote Tue Jun 21 09:09:53 2011 (r223362)
@@ -4,7 +4,7 @@
#
# PROVIDE: mountcritremote
-# REQUIRE: NETWORKING FILESYSTEMS cleanvar ipsec
+# REQUIRE: NETWORKING FILESYSTEMS cleanvar ipsec netwait
# KEYWORD: nojail
. /etc/rc.subr
Copied: projects/largeSMP/etc/rc.d/netwait (from r223361, head/etc/rc.d/netwait)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/largeSMP/etc/rc.d/netwait Tue Jun 21 09:09:53 2011 (r223362, copy of r223361, head/etc/rc.d/netwait)
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: netwait
+# REQUIRE: NETWORKING
+# KEYWORD: nojail
+#
+# The netwait script is intended to be used by systems which have
+# statically-configured IP addresses in rc.conf(5). If your system
+# uses DHCP, you should use synchronous_dhclient="YES" in your
+# /etc/rc.conf instead of using netwait.
+
+. /etc/rc.subr
+
+name="netwait"
+rc_var=`set_rcvar`
+start_cmd="${name}_start"
+stop_cmd=":"
+
+netwait_start()
+{
+ local ip rc count output link
+
+ if [ -z "${netwait_ip}" ]; then
+ err 1 "You must define one or more IP addresses in netwait_ip"
+ fi
+
+ if [ ${netwait_timeout} -lt 1 ]; then
+ err 1 "netwait_timeout must be >= 1"
+ fi
+
+ # Handle SIGINT (Ctrl-C); force abort of while() loop
+ trap break SIGINT
+
+ if [ -n "${netwait_if}" ]; then
+ echo -n "Waiting for $netwait_if to have link"
+
+ count=1
+ while [ ${count} -le ${netwait_if_timeout} ]; do
+ if output=`/sbin/ifconfig ${netwait_if} 2>/dev/null`; then
+ link=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'`
+ if [ -z "${link}" ]; then
+ echo '.'
+ break
+ fi
+ else
+ echo ''
+ err 1 "ifconfig ${netwait_if} failed"
+ fi
+ sleep 1
+ count=$((count+1))
+ done
+ if [ -n "${link}" ]; then
+ # Restore default SIGINT handler
+ trap - SIGINT
+
+ echo ''
+ warn "Interface still has no link. Continuing with startup, but"
+ warn "be aware you may not have a fully functional networking"
+ warn "layer at this point."
+ return
+ fi
+ fi
+
+ # Handle SIGINT (Ctrl-C); force abort of while() loop
+ trap break SIGINT
+
+ for ip in ${netwait_ip}; do
+ echo -n "Waiting for ${ip} to respond to ICMP"
+
+ count=1
+ while [ ${count} -le ${netwait_timeout} ]; do
+ /sbin/ping -t 1 -c 1 -o ${ip} >/dev/null 2>&1
+ rc=$?
+
+ if [ $rc -eq 0 ]; then
+ # Restore default SIGINT handler
+ trap - SIGINT
+
+ echo '.'
+ return
+ fi
+ count=$((count+1))
+ done
+ echo ': No response from host.'
+ done
+
+ # Restore default SIGINT handler
+ trap - SIGINT
+
+ warn "Exhausted IP list. Continuing with startup, but be aware you may"
+ warn "not have a fully functional networking layer at this point."
+}
+
+load_rc_config $name
+run_rc_command "$1"
Modified: projects/largeSMP/etc/rc.subr
==============================================================================
--- projects/largeSMP/etc/rc.subr Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/etc/rc.subr Tue Jun 21 09:09:53 2011 (r223362)
@@ -1732,8 +1732,6 @@ check_required_after()
return 0
}
-fi
-
# check_kern_features mib
# Return existence of kern.features.* sysctl MIB as true or
# false. The result will be cached in $_rc_cache_kern_features_
@@ -1775,4 +1773,6 @@ _echoonce()
esac
}
+fi # [ -z "${_rc_subr_loaded}" ]
+
_rc_subr_loaded=:
Modified: projects/largeSMP/lib/msun/src/e_rem_pio2.c
==============================================================================
--- projects/largeSMP/lib/msun/src/e_rem_pio2.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/lib/msun/src/e_rem_pio2.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -171,9 +171,8 @@ medium:
}
/* set z = scalbn(|x|,ilogb(x)-23) */
GET_LOW_WORD(low,x);
- SET_LOW_WORD(z,low);
e0 = (ix>>20)-1046; /* e0 = ilogb(z)-23; */
- SET_HIGH_WORD(z, ix - ((int32_t)(e0<<20)));
+ INSERT_WORDS(z, ix - ((int32_t)(e0<<20)), low);
for(i=0;i<2;i++) {
tx[i] = (double)((int32_t)(z));
z = (z-tx[i])*two24;
Modified: projects/largeSMP/sbin/geom/class/part/geom_part.c
==============================================================================
--- projects/largeSMP/sbin/geom/class/part/geom_part.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sbin/geom/class/part/geom_part.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -362,7 +362,7 @@ gpart_autofill_resize(struct gctl_req *r
goto done;
}
- offset = pp->lg_stripeoffset / pp->lg_sectorsize;
+ offset = (pp->lg_stripeoffset / pp->lg_sectorsize) % alignment;
last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0);
LIST_FOREACH(pp, &gp->lg_provider, lg_provider) {
s = find_provcfg(pp, "index");
@@ -497,10 +497,10 @@ gpart_autofill(struct gctl_req *req)
alignment = len;
/* Adjust parameters to stripeoffset */
- offset = pp->lg_stripeoffset / pp->lg_sectorsize;
+ offset = (pp->lg_stripeoffset / pp->lg_sectorsize) % alignment;
start = ALIGNUP(start + offset, alignment);
- if (size + offset > alignment)
- size = ALIGNDOWN(size + offset, alignment);
+ if (size > alignment)
+ size = ALIGNDOWN(size, alignment);
first = (off_t)strtoimax(find_geomcfg(gp, "first"), NULL, 0);
last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0);
Modified: projects/largeSMP/share/man/man5/rc.conf.5
==============================================================================
--- projects/largeSMP/share/man/man5/rc.conf.5 Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/share/man/man5/rc.conf.5 Tue Jun 21 09:09:53 2011 (r223362)
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 18, 2011
+.Dd June 19, 2011
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -4293,6 +4293,61 @@ Bus address of the USB Bluetooth control
Check the output of
.Xr usbconfig 8
on your system to find this information.
+.It Va netwait_enable
+.Pq Vt bool
+If set to
+.Dq Li YES ,
+delays the start of network-reliant services until
+.Va netwait_if
+is up and ICMP packets to a destination defined in
+.Va netwait_ip
+are flowing.
+Link state is examined first, followed by
+.Dq Li pinging
+an IP address to verify network usability.
+If no destination can be reached or timeouts are exceeded,
+network services are started anyway with no guarantee that
+the network is usable.
+Use of this variable requires both
+.Va netwait_ip
+and
+.Va netwait_if
+to be set.
+.It Va netwait_ip
+.Pq Vt str
+Empty by default.
+This variable contains a space-delimited list of IP addresses to
+.Xr ping 8 .
+DNS hostnames should not be used as resolution is not guaranteed
+to be functional at this point.
+If multiple IP addresses are specified,
+each will be tried until one is successful or the list is exhausted.
+.It Va netwait_timeout
+.Pq Vt int
+Indicates the total number of seconds to perform a
+.Dq Li ping
+against each IP address in
+.Va netwait_ip ,
+at a rate of one ping per second.
+If any of the pings are successful,
+full network connectivity is considered reliable.
+The default is 60.
+.It Va netwait_if
+.Pq Vt str
+Empty by default.
+Defines the name of the network interface on which watch for link.
+.Xr ifconfig 8
+is used to monitor the interface, looking for
+.Dq Li status: no carrier .
+Once gone, the link is considered up.
+This can be a
+.Xr vlan 4
+interface if desired.
+.It Va netwait_if_timeout
+.Pq Vt int
+Defines the total number of seconds to wait for link to become usable,
+polled at a 1-second interval.
+The default is 30.
.El
.Sh FILES
.Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact
@@ -4364,6 +4419,7 @@ on your system to find this information.
.Xr ntpdate 8 ,
.Xr pfctl 8 ,
.Xr pflogd 8 ,
+.Xr ping 8 ,
.Xr powerd 8 ,
.Xr quotacheck 8 ,
.Xr quotaon 8 ,
Modified: projects/largeSMP/sys/conf/files.powerpc
==============================================================================
--- projects/largeSMP/sys/conf/files.powerpc Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/conf/files.powerpc Tue Jun 21 09:09:53 2011 (r223362)
@@ -203,11 +203,13 @@ powerpc/powerpc/syncicache.c standard
powerpc/powerpc/sys_machdep.c standard
powerpc/powerpc/uio_machdep.c standard
powerpc/ps3/ehci_ps3.c optional ps3 ehci
+powerpc/ps3/ohci_ps3.c optional ps3 ohci
powerpc/ps3/if_glc.c optional ps3 glc
powerpc/ps3/mmu_ps3.c optional ps3
powerpc/ps3/platform_ps3.c optional ps3
powerpc/ps3/ps3ata.c optional ps3 ps3ata
powerpc/ps3/ps3bus.c optional ps3
+powerpc/ps3/ps3disk.c optional ps3
powerpc/ps3/ps3pic.c optional ps3
powerpc/ps3/ps3_syscons.c optional ps3 sc
powerpc/ps3/ps3-hvcall.S optional ps3 sc
Modified: projects/largeSMP/sys/dev/atkbdc/atkbd.c
==============================================================================
--- projects/largeSMP/sys/dev/atkbdc/atkbd.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/dev/atkbdc/atkbd.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -1100,7 +1100,7 @@ get_typematic(keyboard_t *kbd)
/*
* Traditional entry points of int 0x15 and 0x16 are fixed
* and later BIOSes follow them. (U)EFI CSM specification
- * also mandate these fixed entry points.
+ * also mandates these fixed entry points.
*
* Validate the entry points here before we proceed further.
* It's known that some recent laptops does not have the
Modified: projects/largeSMP/sys/dev/e1000/if_igb.c
==============================================================================
--- projects/largeSMP/sys/dev/e1000/if_igb.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/dev/e1000/if_igb.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -36,6 +36,7 @@
#ifdef HAVE_KERNEL_OPTION_HEADERS
#include "opt_device_polling.h"
#include "opt_inet.h"
+#include "opt_inet6.h"
#include "opt_altq.h"
#endif
@@ -99,7 +100,7 @@ int igb_display_debug_stats = 0;
/*********************************************************************
* Driver version:
*********************************************************************/
-char igb_driver_version[] = "version - 2.2.3";
+char igb_driver_version[] = "version - 2.2.5";
/*********************************************************************
@@ -265,6 +266,7 @@ static void igb_handle_link(void *contex
static void igb_set_sysctl_value(struct adapter *, const char *,
const char *, int *, int);
static int igb_set_flowcntl(SYSCTL_HANDLER_ARGS);
+static int igb_sysctl_dmac(SYSCTL_HANDLER_ARGS);
#ifdef DEVICE_POLLING
static poll_handler_t igb_poll;
@@ -344,25 +346,6 @@ TUNABLE_INT("hw.igb.hdr_split", &igb_hea
static int igb_num_queues = 0;
TUNABLE_INT("hw.igb.num_queues", &igb_num_queues);
-/* How many packets rxeof tries to clean at a time */
-static int igb_rx_process_limit = 100;
-TUNABLE_INT("hw.igb.rx_process_limit", &igb_rx_process_limit);
-
-/* Flow control setting - default to FULL */
-static int igb_fc_setting = e1000_fc_full;
-TUNABLE_INT("hw.igb.fc_setting", &igb_fc_setting);
-
-/* Energy Efficient Ethernet - default to off */
-static int igb_eee_disabled = TRUE;
-TUNABLE_INT("hw.igb.eee_disabled", &igb_eee_disabled);
-
-/*
-** DMA Coalescing, only for i350 - default to off,
-** this feature is for power savings
-*/
-static int igb_dma_coalesce = FALSE;
-TUNABLE_INT("hw.igb.dma_coalesce", &igb_dma_coalesce);
-
/*********************************************************************
* Device identification routine
*
@@ -433,6 +416,11 @@ igb_attach(device_t dev)
INIT_DEBUGOUT("igb_attach: begin");
+ if (resource_disabled("igb", device_get_unit(dev))) {
+ device_printf(dev, "Disabled by device hint\n");
+ return (ENXIO);
+ }
+
adapter = device_get_softc(dev);
adapter->dev = adapter->osdep.dev = dev;
IGB_CORE_LOCK_INIT(adapter, device_get_nameunit(dev));
@@ -450,7 +438,7 @@ igb_attach(device_t dev)
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
- OID_AUTO, "flow_control", CTLTYPE_INT|CTLFLAG_RW,
+ OID_AUTO, "fc", CTLTYPE_INT|CTLFLAG_RW,
adapter, 0, igb_set_flowcntl, "I", "Flow Control");
callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0);
@@ -476,8 +464,8 @@ igb_attach(device_t dev)
/* Sysctl for limiting the amount of work done in the taskqueue */
igb_set_sysctl_value(adapter, "rx_processing_limit",
- "max number of rx packets to process", &adapter->rx_process_limit,
- igb_rx_process_limit);
+ "max number of rx packets to process",
+ &adapter->rx_process_limit, 100);
/*
* Validate number of transmit and receive descriptors. It
@@ -552,13 +540,14 @@ igb_attach(device_t dev)
/* Some adapter-specific advanced features */
if (adapter->hw.mac.type >= e1000_i350) {
- igb_set_sysctl_value(adapter, "dma_coalesce",
- "configure dma coalesce",
- &adapter->dma_coalesce, igb_dma_coalesce);
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+ OID_AUTO, "dmac", CTLTYPE_INT|CTLFLAG_RW,
+ adapter, 0, igb_sysctl_dmac, "I", "DMA Coalesce");
igb_set_sysctl_value(adapter, "eee_disabled",
"enable Energy Efficient Ethernet",
&adapter->hw.dev_spec._82575.eee_disable,
- igb_eee_disabled);
+ TRUE);
e1000_set_eee_i350(&adapter->hw);
}
@@ -658,6 +647,7 @@ igb_attach(device_t dev)
return (0);
err_late:
+ igb_detach(dev);
igb_free_transmit_structures(adapter);
igb_free_receive_structures(adapter);
igb_release_hw_control(adapter);
@@ -736,7 +726,8 @@ igb_detach(device_t dev)
igb_free_transmit_structures(adapter);
igb_free_receive_structures(adapter);
- free(adapter->mta, M_DEVBUF);
+ if (adapter->mta != NULL)
+ free(adapter->mta, M_DEVBUF);
IGB_CORE_LOCK_DESTROY(adapter);
@@ -1025,11 +1016,12 @@ static int
igb_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
{
struct adapter *adapter = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
-#ifdef INET
- struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
+#if defined(INET) || defined(INET6)
+ struct ifaddr *ifa = (struct ifaddr *)data;
+ bool avoid_reset = FALSE;
#endif
- int error = 0;
+ int error = 0;
if (adapter->in_detach)
return (error);
@@ -1037,20 +1029,22 @@ igb_ioctl(struct ifnet *ifp, u_long comm
switch (command) {
case SIOCSIFADDR:
#ifdef INET
- if (ifa->ifa_addr->sa_family == AF_INET) {
- /*
- * XXX
- * Since resetting hardware takes a very long time
- * and results in link renegotiation we only
- * initialize the hardware only when it is absolutely
- * required.
- */
+ if (ifa->ifa_addr->sa_family == AF_INET)
+ avoid_reset = TRUE;
+#endif
+#ifdef INET6
+ if (ifa->ifa_addr->sa_family == AF_INET6)
+ avoid_reset = TRUE;
+#endif
+#if defined(INET) || defined(INET6)
+ /*
+ ** Calling init results in link renegotiation,
+ ** so we avoid doing it when possible.
+ */
+ if (avoid_reset) {
ifp->if_flags |= IFF_UP;
- if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
- IGB_CORE_LOCK(adapter);
- igb_init_locked(adapter);
- IGB_CORE_UNLOCK(adapter);
- }
+ if (!(ifp->if_drv_flags & IFF_DRV_RUNNING))
+ igb_init(adapter);
if (!(ifp->if_flags & IFF_NOARP))
arp_ifinit(ifp, ifa);
} else
@@ -1175,6 +1169,10 @@ igb_ioctl(struct ifnet *ifp, u_long comm
ifp->if_capenable ^= IFCAP_VLAN_HWFILTER;
reinit = 1;
}
+ if (mask & IFCAP_VLAN_HWTSO) {
+ ifp->if_capenable ^= IFCAP_VLAN_HWTSO;
+ reinit = 1;
+ }
if (mask & IFCAP_LRO) {
ifp->if_capenable ^= IFCAP_LRO;
reinit = 1;
@@ -2721,6 +2719,12 @@ igb_reset(struct adapter *adapter)
fc->pause_time = IGB_FC_PAUSE_TIME;
fc->send_xon = TRUE;
+ if (fc->requested_mode)
+ fc->current_mode = fc->requested_mode;
+ else
+ fc->current_mode = e1000_fc_full;
+
+ adapter->fc = fc->current_mode;
/* Issue a global reset */
e1000_reset_hw(hw);
@@ -2730,9 +2734,13 @@ igb_reset(struct adapter *adapter)
device_printf(dev, "Hardware Initialization Failed\n");
/* Setup DMA Coalescing */
- if ((hw->mac.type == e1000_i350) &&
- (adapter->dma_coalesce == TRUE)) {
- u32 reg;
+ if (hw->mac.type == e1000_i350) {
+ u32 reg = ~E1000_DMACR_DMAC_EN;
+
+ if (adapter->dmac == 0) { /* Disabling it */
+ E1000_WRITE_REG(hw, E1000_DMACR, reg);
+ goto reset_out;
+ }
hwm = (pba - 4) << 10;
reg = (((pba-6) << E1000_DMACR_DMACTHR_SHIFT)
@@ -2741,8 +2749,8 @@ igb_reset(struct adapter *adapter)
/* transition to L0x or L1 if available..*/
reg |= (E1000_DMACR_DMAC_EN | E1000_DMACR_DMAC_LX_MASK);
- /* timer = +-1000 usec in 32usec intervals */
- reg |= (1000 >> 5);
+ /* timer = value in adapter->dmac in 32usec intervals */
+ reg |= (adapter->dmac >> 5);
E1000_WRITE_REG(hw, E1000_DMACR, reg);
/* No lower threshold */
@@ -2767,6 +2775,7 @@ igb_reset(struct adapter *adapter)
device_printf(dev, "DMA Coalescing enabled\n");
}
+reset_out:
E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN);
e1000_get_phy_info(hw);
e1000_check_for_link(hw);
@@ -2827,15 +2836,19 @@ igb_setup_interface(device_t dev, struct
* support full VLAN capability.
*/
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
- ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
- ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
+ ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING
+ | IFCAP_VLAN_HWTSO
+ | IFCAP_VLAN_MTU;
+ ifp->if_capenable |= IFCAP_VLAN_HWTAGGING
+ | IFCAP_VLAN_HWTSO
+ | IFCAP_VLAN_MTU;
/*
- ** Dont turn this on by default, if vlans are
+ ** Don't turn this on by default, if vlans are
** created on another pseudo device (eg. lagg)
** then vlan events are not passed thru, breaking
** operation, but with HW FILTER off it works. If
- ** using vlans directly on the em driver you can
+ ** using vlans directly on the igb driver you can
** enable this and get full hardware tag filtering.
*/
ifp->if_capabilities |= IFCAP_VLAN_HWFILTER;
@@ -5595,19 +5608,18 @@ static int
igb_set_flowcntl(SYSCTL_HANDLER_ARGS)
{
int error;
- struct adapter *adapter;
+ struct adapter *adapter = (struct adapter *) arg1;
- error = sysctl_handle_int(oidp, &igb_fc_setting, 0, req);
+ error = sysctl_handle_int(oidp, &adapter->fc, 0, req);
- if (error)
+ if ((error) || (req->newptr == NULL))
return (error);
- adapter = (struct adapter *) arg1;
- switch (igb_fc_setting) {
+ switch (adapter->fc) {
case e1000_fc_rx_pause:
case e1000_fc_tx_pause:
case e1000_fc_full:
- adapter->hw.fc.requested_mode = igb_fc_setting;
+ adapter->hw.fc.requested_mode = adapter->fc;
break;
case e1000_fc_none:
default:
@@ -5616,5 +5628,54 @@ igb_set_flowcntl(SYSCTL_HANDLER_ARGS)
adapter->hw.fc.current_mode = adapter->hw.fc.requested_mode;
e1000_force_mac_fc(&adapter->hw);
- return error;
+ return (error);
+}
+
+/*
+** Manage DMA Coalesce:
+** Control values:
+** 0/1 - off/on
+** Legal timer values are:
+** 250,500,1000-10000 in thousands
+*/
+static int
+igb_sysctl_dmac(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *adapter = (struct adapter *) arg1;
+ int error;
+
+ error = sysctl_handle_int(oidp, &adapter->dmac, 0, req);
+
+ if ((error) || (req->newptr == NULL))
+ return (error);
+
+ switch (adapter->dmac) {
+ case 0:
+ /*Disabling */
+ break;
+ case 1: /* Just enable and use default */
+ adapter->dmac = 1000;
+ break;
+ case 250:
+ case 500:
+ case 1000:
+ case 2000:
+ case 3000:
+ case 4000:
+ case 5000:
+ case 6000:
+ case 7000:
+ case 8000:
+ case 9000:
+ case 10000:
+ /* Legal values - allow */
+ break;
+ default:
+ /* Do nothing, illegal value */
+ adapter->dmac = 0;
+ return (error);
+ }
+ /* Reinit the interface */
+ igb_init(adapter);
+ return (error);
}
Modified: projects/largeSMP/sys/dev/e1000/if_igb.h
==============================================================================
--- projects/largeSMP/sys/dev/e1000/if_igb.h Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/dev/e1000/if_igb.h Tue Jun 21 09:09:53 2011 (r223362)
@@ -396,11 +396,12 @@ struct adapter {
u32 shadow_vfta[IGB_VFTA_SIZE];
/* Info about the interface */
- u8 link_active;
+ u16 link_active;
+ u16 fc;
u16 link_speed;
u16 link_duplex;
u32 smartspeed;
- u32 dma_coalesce;
+ u32 dmac;
/* Interface queues */
struct igb_queue *queues;
Modified: projects/largeSMP/sys/dev/firewire/fwohci.c
==============================================================================
--- projects/largeSMP/sys/dev/firewire/fwohci.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/dev/firewire/fwohci.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -2072,8 +2072,9 @@ fwohci_check_stat(struct fwohci_softc *s
FW_GLOCK_ASSERT(&sc->fc);
stat = OREAD(sc, FWOHCI_INTSTAT);
if (stat == 0xffffffff) {
- device_printf(sc->fc.dev,
- "device physically ejected?\n");
+ if (!bus_child_present(sc->fc.dev))
+ return (FILTER_HANDLED);
+ device_printf(sc->fc.dev, "device physically ejected?\n");
return (FILTER_STRAY);
}
if (stat)
Modified: projects/largeSMP/sys/dev/pccbb/pccbb_pci.c
==============================================================================
--- projects/largeSMP/sys/dev/pccbb/pccbb_pci.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/dev/pccbb/pccbb_pci.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -658,6 +658,12 @@ cbb_pci_shutdown(device_t brdev)
struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev);
/*
+ * We're about to pull the rug out from the card, so mark it as
+ * gone to prevent harm.
+ */
+ sc->cardok = 0;
+
+ /*
* Place the cards in reset, turn off the interrupts and power
* down the socket.
*/
Modified: projects/largeSMP/sys/fs/nfs/nfs_commonkrpc.c
==============================================================================
--- projects/largeSMP/sys/fs/nfs/nfs_commonkrpc.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/fs/nfs/nfs_commonkrpc.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -323,9 +323,7 @@ newnfs_disconnect(struct nfssockreq *nrp
client = nrp->nr_client;
nrp->nr_client = NULL;
mtx_unlock(&nrp->nr_mtx);
-#ifdef KGSSAPI
- rpc_gss_secpurge(client);
-#endif
+ rpc_gss_secpurge_call(client);
CLNT_CLOSE(client);
CLNT_RELEASE(client);
} else {
@@ -337,21 +335,18 @@ static AUTH *
nfs_getauth(struct nfssockreq *nrp, int secflavour, char *clnt_principal,
char *srv_principal, gss_OID mech_oid, struct ucred *cred)
{
-#ifdef KGSSAPI
rpc_gss_service_t svc;
AUTH *auth;
#ifdef notyet
rpc_gss_options_req_t req_options;
#endif
-#endif
switch (secflavour) {
-#ifdef KGSSAPI
case RPCSEC_GSS_KRB5:
case RPCSEC_GSS_KRB5I:
case RPCSEC_GSS_KRB5P:
if (!mech_oid) {
- if (!rpc_gss_mech_to_oid("kerberosv5", &mech_oid))
+ if (!rpc_gss_mech_to_oid_call("kerberosv5", &mech_oid))
return (NULL);
}
if (secflavour == RPCSEC_GSS_KRB5)
@@ -367,7 +362,7 @@ nfs_getauth(struct nfssockreq *nrp, int
req_options.input_channel_bindings = NULL;
req_options.enc_type = nfs_keytab_enctype;
- auth = rpc_gss_secfind(nrp->nr_client, cred,
+ auth = rpc_gss_secfind_call(nrp->nr_client, cred,
clnt_principal, srv_principal, mech_oid, svc,
&req_options);
#else
@@ -377,7 +372,7 @@ nfs_getauth(struct nfssockreq *nrp, int
* principals. As such, that case cannot yet be handled.
*/
if (clnt_principal == NULL)
- auth = rpc_gss_secfind(nrp->nr_client, cred,
+ auth = rpc_gss_secfind_call(nrp->nr_client, cred,
srv_principal, mech_oid, svc);
else
auth = NULL;
@@ -385,7 +380,6 @@ nfs_getauth(struct nfssockreq *nrp, int
if (auth != NULL)
return (auth);
/* fallthrough */
-#endif /* KGSSAPI */
case AUTH_SYS:
default:
return (authunix_create(cred));
Modified: projects/largeSMP/sys/fs/nfsclient/nfs_clkrpc.c
==============================================================================
--- projects/largeSMP/sys/fs/nfsclient/nfs_clkrpc.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/fs/nfsclient/nfs_clkrpc.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -215,12 +215,9 @@ nfscbd_addsock(struct file *fp)
int
nfscbd_nfsd(struct thread *td, struct nfsd_nfscbd_args *args)
{
-#ifdef KGSSAPI
char principal[128];
int error;
-#endif
-#ifdef KGSSAPI
if (args != NULL) {
error = copyinstr(args->principal, principal,
sizeof(principal), NULL);
@@ -229,7 +226,6 @@ nfscbd_nfsd(struct thread *td, struct nf
} else {
principal[0] = '\0';
}
-#endif
/*
* Only the first nfsd actually does any work. The RPC code
@@ -244,20 +240,16 @@ nfscbd_nfsd(struct thread *td, struct nf
NFSD_UNLOCK();
-#ifdef KGSSAPI
if (principal[0] != '\0')
- rpc_gss_set_svc_name(principal, "kerberosv5",
+ rpc_gss_set_svc_name_call(principal, "kerberosv5",
GSS_C_INDEFINITE, NFS_CALLBCKPROG, NFSV4_CBVERS);
-#endif
nfscbd_pool->sp_minthreads = 4;
nfscbd_pool->sp_maxthreads = 4;
svc_run(nfscbd_pool);
-#ifdef KGSSAPI
- rpc_gss_clear_svc_name(NFS_CALLBCKPROG, NFSV4_CBVERS);
-#endif
+ rpc_gss_clear_svc_name_call(NFS_CALLBCKPROG, NFSV4_CBVERS);
NFSD_LOCK();
nfs_numnfscbd--;
Modified: projects/largeSMP/sys/fs/nfsserver/nfs_nfsdcache.c
==============================================================================
--- projects/largeSMP/sys/fs/nfsserver/nfs_nfsdcache.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/fs/nfsserver/nfs_nfsdcache.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -405,6 +405,7 @@ nfsrvd_updatecache(struct nfsrv_descript
{
struct nfsrvcache *rp;
struct nfsrvcache *retrp = NULL;
+ mbuf_t m;
rp = nd->nd_rp;
if (!rp)
@@ -457,9 +458,9 @@ nfsrvd_updatecache(struct nfsrv_descript
}
if ((nd->nd_flag & ND_NFSV2) &&
nfsv2_repstat[newnfsv2_procid[nd->nd_procnum]]) {
- NFSUNLOCKCACHE();
rp->rc_status = nd->nd_repstat;
rp->rc_flag |= RC_REPSTATUS;
+ NFSUNLOCKCACHE();
} else {
if (!(rp->rc_flag & RC_UDP)) {
nfsrc_tcpsavedreplies++;
@@ -469,9 +470,11 @@ nfsrvd_updatecache(struct nfsrv_descript
nfsrc_tcpsavedreplies;
}
NFSUNLOCKCACHE();
- rp->rc_reply = m_copym(nd->nd_mreq, 0, M_COPYALL,
- M_WAIT);
+ m = m_copym(nd->nd_mreq, 0, M_COPYALL, M_WAIT);
+ NFSLOCKCACHE();
+ rp->rc_reply = m;
rp->rc_flag |= RC_REPMBUF;
+ NFSUNLOCKCACHE();
}
if (rp->rc_flag & RC_UDP) {
rp->rc_timestamp = NFSD_MONOSEC +
@@ -518,6 +521,7 @@ nfsrvd_delcache(struct nfsrvcache *rp)
APPLESTATIC void
nfsrvd_sentcache(struct nfsrvcache *rp, struct socket *so, int err)
{
+ tcp_seq tmp_seq;
if (!(rp->rc_flag & RC_LOCKED))
panic("nfsrvd_sentcache not locked");
@@ -526,8 +530,12 @@ nfsrvd_sentcache(struct nfsrvcache *rp,
so->so_proto->pr_domain->dom_family != AF_INET6) ||
so->so_proto->pr_protocol != IPPROTO_TCP)
panic("nfs sent cache");
- if (nfsrv_getsockseqnum(so, &rp->rc_tcpseq))
+ if (nfsrv_getsockseqnum(so, &tmp_seq)) {
+ NFSLOCKCACHE();
+ rp->rc_tcpseq = tmp_seq;
rp->rc_flag |= RC_TCPSEQ;
+ NFSUNLOCKCACHE();
+ }
}
nfsrc_unlock(rp);
}
@@ -687,8 +695,11 @@ nfsrc_lock(struct nfsrvcache *rp)
static void
nfsrc_unlock(struct nfsrvcache *rp)
{
+
+ NFSLOCKCACHE();
rp->rc_flag &= ~RC_LOCKED;
nfsrc_wanted(rp);
+ NFSUNLOCKCACHE();
}
/*
Modified: projects/largeSMP/sys/fs/nfsserver/nfs_nfsdkrpc.c
==============================================================================
--- projects/largeSMP/sys/fs/nfsserver/nfs_nfsdkrpc.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/fs/nfsserver/nfs_nfsdkrpc.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -386,18 +386,14 @@ nfsrvd_addsock(struct file *fp)
int
nfsrvd_nfsd(struct thread *td, struct nfsd_nfsd_args *args)
{
-#ifdef KGSSAPI
char principal[MAXHOSTNAMELEN + 5];
int error;
bool_t ret2, ret3, ret4;
-#endif
-#ifdef KGSSAPI
error = copyinstr(args->principal, principal, sizeof (principal),
NULL);
if (error)
return (error);
-#endif
/*
* Only the first nfsd actually does any work. The RPC code
@@ -412,38 +408,29 @@ nfsrvd_nfsd(struct thread *td, struct nf
NFSD_UNLOCK();
-#ifdef KGSSAPI
/* An empty string implies AUTH_SYS only. */
if (principal[0] != '\0') {
- ret2 = rpc_gss_set_svc_name(principal, "kerberosv5",
- GSS_C_INDEFINITE, NFS_PROG, NFS_VER2);
- ret3 = rpc_gss_set_svc_name(principal, "kerberosv5",
- GSS_C_INDEFINITE, NFS_PROG, NFS_VER3);
- ret4 = rpc_gss_set_svc_name(principal, "kerberosv5",
- GSS_C_INDEFINITE, NFS_PROG, NFS_VER4);
-
- if (!ret2 || !ret3 || !ret4) {
- NFSD_LOCK();
- newnfs_numnfsd--;
- nfsrvd_init(1);
- NFSD_UNLOCK();
- return (EAUTH);
- }
+ ret2 = rpc_gss_set_svc_name_call(principal,
+ "kerberosv5", GSS_C_INDEFINITE, NFS_PROG, NFS_VER2);
+ ret3 = rpc_gss_set_svc_name_call(principal,
+ "kerberosv5", GSS_C_INDEFINITE, NFS_PROG, NFS_VER3);
+ ret4 = rpc_gss_set_svc_name_call(principal,
+ "kerberosv5", GSS_C_INDEFINITE, NFS_PROG, NFS_VER4);
+
+ if (!ret2 || !ret3 || !ret4)
+ printf("nfsd: can't register svc name\n");
}
-#endif
nfsrvd_pool->sp_minthreads = args->minthreads;
nfsrvd_pool->sp_maxthreads = args->maxthreads;
svc_run(nfsrvd_pool);
-#ifdef KGSSAPI
if (principal[0] != '\0') {
- rpc_gss_clear_svc_name(NFS_PROG, NFS_VER2);
- rpc_gss_clear_svc_name(NFS_PROG, NFS_VER3);
- rpc_gss_clear_svc_name(NFS_PROG, NFS_VER4);
+ rpc_gss_clear_svc_name_call(NFS_PROG, NFS_VER2);
+ rpc_gss_clear_svc_name_call(NFS_PROG, NFS_VER3);
+ rpc_gss_clear_svc_name_call(NFS_PROG, NFS_VER4);
}
-#endif
NFSD_LOCK();
newnfs_numnfsd--;
Modified: projects/largeSMP/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- projects/largeSMP/sys/fs/nfsserver/nfs_nfsdserv.c Tue Jun 21 08:39:09 2011 (r223361)
+++ projects/largeSMP/sys/fs/nfsserver/nfs_nfsdserv.c Tue Jun 21 09:09:53 2011 (r223362)
@@ -454,7 +454,7 @@ nfsmout:
APPLESTATIC int
nfsrvd_lookup(struct nfsrv_descript *nd, __unused int isdgram,
vnode_t dp, vnode_t *vpp, fhandle_t *fhp, NFSPROC_T *p,
- __unused struct nfsexstuff *exp)
+ struct nfsexstuff *exp)
{
struct nameidata named;
vnode_t vp, dirp = NULL;
@@ -508,7 +508,15 @@ nfsrvd_lookup(struct nfsrv_descript *nd,
vrele(named.ni_startdir);
nfsvno_relpathbuf(&named);
vp = named.ni_vp;
- nd->nd_repstat = nfsvno_getfh(vp, fhp, p);
+ if ((nd->nd_flag & ND_NFSV4) != 0 && !NFSVNO_EXPORTED(exp) &&
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list