bz [Tue, 18 May 2010 04:20:35 +0000 (04:20 +0000)]
MFC r208100:
Fix an issue with the dynamic pcpu/vnet data allocators.
We cannot expect that modspace is the last entry in the linker
set and thus that modspace + possible extra space up to PAGE_SIZE
would be contiguous. For the moment do not support more than
*_MODMIN space and ignore the extra space.
Discussed with: jeff, rwatson (briefly)
Reviewed by: jeff
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
mm [Tue, 18 May 2010 00:46:15 +0000 (00:46 +0000)]
MFC r204738, r205113 (imp):
MFC r204738:
Remove stale references to libkrb5.
Rejigger the SUBDIR setting a smidge: we now set all the libraries that depend
on something else, and then SUBDIR+= the rest.
MFC r205113:
Make this conform to the other top-level Makefile subdir listings with
one file per line.
thompsa [Mon, 17 May 2010 23:59:14 +0000 (23:59 +0000)]
MFC r203773
Within libusb 0.1 API, bus number is always faked to 0. Device numbers,
however, are possitive and seem to be reverse sorted in the list.
Conform device numbering and bring a result that is consistent with the
libusb 0.1 API. It is now possible to distinguish a device based on its
(bus, dev) numbers.
thompsa [Mon, 17 May 2010 23:48:51 +0000 (23:48 +0000)]
MFC r208014
Back out r203140 which was causing problems when the first and the last
microframe slot was not in the smask. The problem was that the EHCI driver was
then thinking that the transfer was immediately complete in some cases. Which
could lead to freeze-like situations, which can be recovered by unplugging the
USB device.
thompsa [Mon, 17 May 2010 23:45:31 +0000 (23:45 +0000)]
MFC r208008
If a USB device is suspended and a USB set config request is issued when the
USB enumeration lock is locked, then the USB stack fails to resume the device
because locking the USB enumeration lock is part of the resume procedure. To
solve this issue a new lock is introduced which only protects the suspend and
resume callbacks, which can be dropped inside the usbd_do_request_flags()
function, to allow suspend and resume during so-called enumeration operations.
yongari [Mon, 17 May 2010 17:17:57 +0000 (17:17 +0000)]
MFC r207971:
Document undocumented tunables and sysctl variables.
While here use actual string to specify width as well as using Cm
to set command argument.
yongari [Mon, 17 May 2010 17:12:35 +0000 (17:12 +0000)]
MFC r207852:
SiS190 supports RX 10 bytes padding, CRC stripping as well as VLAN
hardware tag insertion/stripping. Remove conditional code that
disables these hardware features on SiS190. Also nuke RX fixup code
which is no more required on strict-alignment architectures because
SiS190 supports RX 10 bytes padding.
Now all hardware features except jumbo frame and WOL are supported.
Thanks to Masa Murayama who confirmed SiS190 also has the same
hardware features of SiS191.
I guess the only difference between SiS191 and SiS190 would be
jumbo frame support. It will be implemented in near future.
yongari [Mon, 17 May 2010 17:02:42 +0000 (17:02 +0000)]
MFC r207851:
Implement TSO and TSO over VLAN. Increase number of allowed
fragmentation of mbuf chain to 32 from 16 because TSO can send 64KB
sized packet which in turn requires long list of mbuf chain. Due to
lack of documentation, I'm not sure whether driver have to pull up
ethernet/IP/TCP header with options to make controller work but
driver have to parse TCP header to update pseudo TCP checksum
anyway. The controller expects pseudo TCP checksum computed by
upper stack and the checksum should follow the MS NDIS
specification to make TSO work.
yongari [Mon, 17 May 2010 16:57:55 +0000 (16:57 +0000)]
MFC r207832:
Export hardware MAC statistics through sysctl node. Previously
fxp(4) already used to extract most hardware MAC statistics but it
didn't show them. With this change, all MAC statistics counters
are exported. Because there are a couple of new counters for 82558
and 82559, enable extended MAC statistics functionality to get
these counters. Accoring to public data sheet, 82559 MAC statistics
return 24 DWORD counters(3 counters are unknown at this moment) so
increase MAC counter structure to meet the MAC statistics block size.
The completion of MAC counter dump is now checked against
FXP_STATS_DR_COMPLETE status code which is appended at the end of
status block. Previously fxp(4) ignored the status of the
FXP_SCB_COMMAND_CU_DUMPRESET command. fxp(4) does not wait for the
completion of pending command before issuing
FXP_SCB_COMMAND_CU_DUMPRESET. Instead it skips the command and try
it next time. This scheme may show better performance but there is
chance to loose updated counters after stopping controller. So make
sure to update MAC statistics in fxp_stop().
While I'm here move sysctl node creation to fxp_sysctl_node().
yongari [Mon, 17 May 2010 16:47:25 +0000 (16:47 +0000)]
MFC r207750:
8255x configure command requires number of bytes of configuration
table. The default size of the configuration table was 22 bytes. To
use extended feature of 82550/82551 the configuration table size
was expanded to 32 bytes. The added configuration for 82550/82551
specifies VLAN hardware tagging and IPSec configuration as well as
TCO.
To make configuration easier fxp(4) used a configuration template
and the template was copied to configuration table. After that,
some parameters of the configuration table was changed depending on
controller type and operation mode. However the size of template
was 22 bytes so some configuration parameters were not properly
initialized on 82550/82551.
Fix this by increasing the template size. For 82557, 82558 and
82559 the size of the configuration is still 22 bytes.
kensmith [Mon, 17 May 2010 14:20:26 +0000 (14:20 +0000)]
Since sometimes developer activity the week before a code freeze starts causes
the stable branch to be a little less reliable than normal mark the stable/8
branch as 8.1-PRERELEASE to warn users.
kib [Mon, 17 May 2010 08:15:04 +0000 (08:15 +0000)]
MFC r207848:
The thread_unsuspend() requires both process mutex and process spinlock
locked. Postpone the process unlock till the thread_unsuspend() is called.
kib [Mon, 17 May 2010 08:11:23 +0000 (08:11 +0000)]
MFC r207847:
For detach procfs ctl command, also clear P_STOPPED_TRACE process stop
flag, and for each thread, TDB_SUSPEND debug flag, same as it is done by
exit1() for orphaned debugee.
rmacklem [Mon, 17 May 2010 01:41:11 +0000 (01:41 +0000)]
MFC: r207764
Patch the experimental NFS client so that it works for NFSv2
by adding the necessary mapping from NFSv3 procedure numbers
to NFSv2 procedure numbers when doing NFSv2 RPCs.
rmacklem [Mon, 17 May 2010 01:18:12 +0000 (01:18 +0000)]
MFC: r207689
If the "-alldirs" export option was used for the V4: line, mountd
would crash in check_options() since dp == NULL for the V4: line.
This patch moves the check for options allowed on the V4: line to
ahead of where dp is used to avoid this crash.
Because this is the first code I'm importing from dash to expand.c, add the
Herbert Xu copyright notice which is in dash's expand.c.
When pathname expanding *\/, the CTLESC representing the quoted state was
erroneously taken as part of the * pathname component. This CTLESC was then
seen by the pattern matching code as escaping the '\0' terminating the
string.
The code is slightly different because dash converts the CTLESC characters
to backslashes and removes all the other CTL* characters to allow
substituting glob(3).
The effect of the bug was also slightly different from dash (where nothing
matched at all). Because a CTLESC can escape a '\0' in some way, whether
files were included despite the bug depended on memory that should not be
read. In particular, on many machines /*\/ expanded to a strict subset of
what /*/ expanded to.
rrs [Sun, 16 May 2010 16:51:44 +0000 (16:51 +0000)]
MFC 207983
More PR-SCTP bugs:
- Make sure that when you kick the streams you add correctly
using a 16 bit unsigned.
- Make sure when sending out you allow FWD-TSN to skip over
and list the ACKED chunks in the stream/seq list (so the
rcv will kick the stream)
rrs [Sun, 16 May 2010 16:45:49 +0000 (16:45 +0000)]
MFC of 207963
This fixes PR-SCTP issues:
- Slide the map at the proper place.
- Mark the bits in the nr_array ONLY if there
is no marking.
- When generating a FWD-TSN we allow us to skip past
ACKED chunks too.
rrs [Sun, 16 May 2010 16:42:52 +0000 (16:42 +0000)]
MFC of 207924:
This fixes a bug with the one-2-one model socket when a
user sets up a socket to a server sends data and closes
the socket before the server has called accept(). It used
to NOT work at all. Now we add a flag to the assoc and
defer assoc cleanup so that the accept will succeed
zec [Sun, 16 May 2010 14:53:43 +0000 (14:53 +0000)]
MFC r208036:
Increase the target buffer for performing NGM_ASCII2BINARY conversion
from 2000 bytes to 20 Kbytes, which now matches the buffer size used for
NGM_BINARY2ASCII conversions.
The aim of this change is to allow for bigger binary structures to be
managed via netgraph ASCII messages, until we come up with an API
improvement which would get rid of such arbitrary hardcoded limits.
jilles [Sun, 16 May 2010 11:03:46 +0000 (11:03 +0000)]
MFC r207816: Document clock and pshared condvar attributes.
Note: clock accepts CLOCK_VIRTUAL and CLOCK_PROF too, but this seems broken
as it simply waits for the difference of the current and given value of the
clock as if it were CLOCK_MONOTONIC. So document only CLOCK_REALTIME and
CLOCK_MONOTONIC as allowed.
marius [Fri, 14 May 2010 19:11:41 +0000 (19:11 +0000)]
MFC: r207585
- Don't set CAS_PCS_DATAPATH to anything except CAS_PCS_DATAPATH_SERDES
on Cassini using the external PCS SERDES otherwise unaligned access
traps and other strange effects happen with some machines. Don't touch
the MIF which is unused in that case either. These changes require the
PHY type to use to be determined via the OFW device tree or from the
VPD in machines without the former.
- Disable the SERDES pins of Saturn when not used in order to save power
and ensure they are enabled otherwise.
- In cas_attach() use the correct register offset for CAS_PCS_CONF_EN.
- Add some bus space barriers missing in the PCS code path.
These changes make the Sun GigaSwift Ethernet 1.0 MMF cards as well as
the on-board interfaces found in Sun Fire B100s Blade Server work.
fabient [Fri, 14 May 2010 13:48:11 +0000 (13:48 +0000)]
MFC r207761 partially:
Add a fastpath to allocate from packet zone when using m_getjcl.
This will add support for packet zone for at least igb and ixgbe.
ed [Fri, 14 May 2010 12:34:06 +0000 (12:34 +0000)]
MFC r207453:
Remove WNOHANG flag from wait3().
Because script(1) now reliably terminates when the TTY is closed, it may
be the case that the call to wait3() occurs just before the child
process exits. This causes error codes to be ignored.
Just change script(1) to use waitpid() instead of wait3(). This makes it
more portable and prevents the need for a loop, since waitpid() only
returns a specified process.
attilio [Fri, 14 May 2010 01:43:13 +0000 (01:43 +0000)]
MFC r206878, r206897, r207921:
Fix a deadlock in the shutdown code when some CPUs are performing
smp_rendezvous() (or smp_tlb_shootdown()) and are waiting for
acknowledgment.
delphij [Thu, 13 May 2010 23:28:20 +0000 (23:28 +0000)]
MFC r205099-205100,205108:
Two optimizations to MI strlen(3) inspired by David S. Miller's
blog posting [1].
- Use word-sized test for unaligned pointer before working
the hard way.
Memory page boundary is always integral multiple of a word
alignment boundary. Therefore, if we can access memory
referenced by pointer p, then (p & ~word mask) must be also
accessible.
- Better utilization of multi-issue processor's ability of
concurrency.
The previous implementation utilized a formular that must be
executed sequentially. However, the ~, & and - operations can
actually be caculated at the same time when the operand were
different and unrelated.
The original Hacker's Delight formular also offered consistent
performance regardless whether the input would contain
characters with their highest-bit set, as it catches real
nul characters only.
These two optimizations has shown further improvements over the
previous implementation on microbenchmarks on i386 and amd64 CPU
including Pentium 4, Core Duo 2 and i7.
kib [Thu, 13 May 2010 20:26:16 +0000 (20:26 +0000)]
MFC elimination of several settings of PG_REFERENCED bit, that either
do not make sense or are harmful.
MFC r206761 (by alc):
Setting PG_REFERENCED on the requested page in swap_pager_getpages() is
either redundant or harmful, depending on the caller.
MFC r206768 (by alc):
In vm_object_backing_scan(), setting PG_REFERENCED on a page before
sleeping on that page is nonsensical.
MFC r206770 (by alc):
In vm_object_madvise() setting PG_REFERENCED on a page before sleeping on
that page only makes sense if the advice is MADV_WILLNEED.
MFC r206801 (by alc):
There is no justification for vm_object_split() setting PG_REFERENCED on a
page that it is going to sleep on.
np [Thu, 13 May 2010 17:45:32 +0000 (17:45 +0000)]
MFC r207639, r207643, r207687, r207688
r207639: Add IFCAP_LINKSTATE to cxgb
r207643: T3 hardware filters + cxgbtool interface to this functionality.
r207687: if_cxgb should not depend on the T3 firmware module directly.
r207688: various doorbell adjustments
jilles [Thu, 13 May 2010 15:44:49 +0000 (15:44 +0000)]
MFC r207734: sigaltstack(2): document some modernizations:
* un-document 'struct sigaltstack' tag for stack_t as this is BSD-specific;
this doesn't seem useful enough to document as such
* alternate stacks are per thread, not per process
* update error codes to what the kernel does and POSIX requires
kib [Thu, 13 May 2010 09:26:31 +0000 (09:26 +0000)]
MFC r207364:
In swap pager, do not free the non-requested pages from the run if they are
wired. Kstack pages are wired, this change prepares swap pager for handling
of long runs of kstack pages.
yongari [Wed, 12 May 2010 17:07:19 +0000 (17:07 +0000)]
MFC r207748:
It seems controller has two types of promiscuous control, one for
unicast and the other for multicast. To receive multicast frames
that host didn't join in promiscuous mode, driver have to set
promiscuous mode for multicast frames as well.
The Open Source Software Developer Manual for i8255x was not clear
how to handle promiscuous mode.
vanhu [Wed, 12 May 2010 11:49:15 +0000 (11:49 +0000)]
MFC:
Set/update SA's NAT-T stuff before calling key_mature() in
key_add() and key_update(), as the SA may be used as soon as
key_mature() has been called
bschmidt [Tue, 11 May 2010 17:21:54 +0000 (17:21 +0000)]
MFC r207709:
Add a workaround for a bug in the firmware regarding the transition
from passive to active scans. Basicly disable it by increasing the
amount packets to be received to an amount which can't be reached
during dwell times.
kib [Tue, 11 May 2010 13:18:41 +0000 (13:18 +0000)]
MFC r207468:
Extract thread_lock()/ruxagg()/thread_unlock() fragment into utility
function ruxagg_tlock().
Convert the definition of kern_getrusage() to ANSI C.
MFC r207602:
Implement RUSAGE_THREAD. Add td_rux to keep extended runtime and ticks
information for thread to allow calcru1() (re)use.
Rename ruxagg()->ruxagg_locked(), ruxagg_tlock()->ruxagg() [1].
The ruxagg_locked() function no longer clears thread ticks nor
td_incruntime.
Not an MFC: the td_rux is added to the end of struct thread to keep
the KBI. Explicit bzero() of td_rux is added to new thread initialization
points.