Commit Graph

151493 Commits

Author SHA1 Message Date
Pyun YongHyeon
0fb00d128a 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.
2010-05-17 17:12:35 +00:00
Pyun YongHyeon
cfd81a4a1d 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.

  Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-05-17 17:02:42 +00:00
Pyun YongHyeon
14d379e521 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().

  Tested by:	Larry Baird < lab <> gta dot com >
2010-05-17 16:57:55 +00:00
Pyun YongHyeon
629403076a 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.
2010-05-17 16:47:25 +00:00
VANHULLEBUS Yvan
0b4ae73d99 MFC: Locks SPTREE when setting some SP entries to state DEAD.
This can prevent kernel panics when updating SPs while there is
some traffic for them.

Obtained from:	NETASQ
2010-05-17 15:31:24 +00:00
Martin Matuska
66a7924d0b MFC r207553, r207555, r207651:
Implement the no_user_check option to pam_krb5.

This option is available in the Linux implementation of pam_krb5
and allows to authorize a user not known to the local system.

Ccache is not used as we don't have a secure uid/gid for the cache file.

Usable for authentication of external kerberos users (e.g Active Directory)
via PAM from applications like Cyrus saslauthd, PHP or perl.

PR:		bin/146186
Approved by:	deplhij (mentor)
2010-05-17 14:27:40 +00:00
Ken Smith
58bfd864fa 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.
2010-05-17 14:20:26 +00:00
Konstantin Belousov
4fa8113f97 MFC r207848:
The thread_unsuspend() requires both process mutex and process spinlock
locked. Postpone the process unlock till the thread_unsuspend() is called.
2010-05-17 08:15:04 +00:00
Konstantin Belousov
c32fbf547b 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.
2010-05-17 08:11:23 +00:00
Rick Macklem
e6c7d81538 MFC: r207785
Fix typos in macros.
2010-05-17 02:01:22 +00:00
Rick Macklem
4406606105 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.
2010-05-17 01:41:11 +00:00
Rick Macklem
1bc9e11312 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.
2010-05-17 01:18:12 +00:00
Jilles Tjoelker
d366e1de7f MFC r207944: sh: Fix pathname expansion with quoted slashes like *\/.
These are git commits 36f0fa8fcbc8c7b2b194addd29100fb40e73e4e9 and
d6d06ff5c2ea0fa44becc5ef4340e5f2f15073e4 in dash.

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.

Example:
  echo /*"/null"

This should print /dev/null, not /*/null.

PR:		bin/146378
Obtained from:	dash
2010-05-16 22:52:51 +00:00
Randall Stewart
b5889e7a0d MFC 207985
Fix an old long time bug in generating a
 fwd-tsn. This would appear when greater than
 the size of mbuf TSN's would need to be skipped.
2010-05-16 16:52:56 +00:00
Randall Stewart
31bd7e42f9 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)
2010-05-16 16:51:44 +00:00
Randall Stewart
d536af657c MFC 207966 (for Michael)
Get rid of unused constants.
2010-05-16 16:50:33 +00:00
Randall Stewart
c7a8100b47 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.
2010-05-16 16:45:49 +00:00
Randall Stewart
93c3efa7cf 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
2010-05-16 16:42:52 +00:00
Marko Zec
49856a78b5 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.
2010-05-16 14:53:43 +00:00
Marko Zec
7c8102300a MFC r207680:
Add an optional "persistent" flag to ng_hub and ng_bridge, which if set,
  disables automatic node shutdown when the last hook gets disconnected.

  Reviewed by:  julian
2010-05-16 14:51:36 +00:00
Jilles Tjoelker
c7ed65db55 MFC r207817: builtin(1): sh has no @ builtin command. 2010-05-16 11:06:32 +00:00
Jilles Tjoelker
4f4fbb71a7 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.
2010-05-16 11:03:46 +00:00
Stefan Farfeleder
7baf1076be Merge r199631: Handle current work directories of arbitrary length. 2010-05-16 10:01:06 +00:00
Jilles Tjoelker
43018f2409 MFC r207935: sh: Add some simple testcases for pathname expansion. 2010-05-15 12:51:22 +00:00
Jilles Tjoelker
b6bcdd63bc MFC r207821: Generate some tests for sh's case command
from the fnmatch tests.

I'm committing the generated files because I don't like a build dependency
for the sh(1) tests, and they are small and will not change much.
2010-05-15 12:42:07 +00:00
Martin Matuska
1f0799c218 MFC r207481, r207956:
MFC r207481 [1]:
Add sysctl and loader tunable vfs.zfs.txg.write_limit_override.
This tunable improves fine-tuning of ZFS write throttling.

MFC r207956 [2]:
Fix possible hang when replaying large truncations.
OpenSolaris onnv revision:	7904:6a124a4ca9c5

PR:		kern/146108 [1]
Suggested by:	Nikolay Denev <ndenev at gmail.com> [1]
Obtained from:	OpenSolaris (Bug ID 6761624) [2]
Approved by:	pjd, delphij (mentor)
2010-05-15 07:07:38 +00:00
Jack F Vogel
70defa90ed Missing fix in lem code to limit WOL to MAGIC,
and made code backward compatible to 7.3 with
conditionals around the buf_ring_free call.
2010-05-14 22:20:58 +00:00
Doug Barton
a00383a2d6 MFC 208060:
Remove trailing white space. No functional changes.
2010-05-14 19:28:16 +00:00
Marius Strobl
331316e3a9 MFC: r207885
Include <machine/ofw_machdep.h> for OF_getscsinitid().
2010-05-14 19:18:07 +00:00
Marius Strobl
25f58222bd MFC: r207586
Sun GigaSwift Ethernet 1.0 MMF work with r207585 (MFC'ed to stable/8 in
r208086) in place.
2010-05-14 19:15:51 +00:00
Marius Strobl
b3b31bee14 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.

PR:	144867
2010-05-14 19:11:41 +00:00
Fabien Thomas
7835cb170d 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.
2010-05-14 13:48:11 +00:00
Fabien Thomas
f8e0b31f59 MFC r207755:
Rework the calltree top view by critical callchain.
The percentage shown is the sum of the cost for the codepath.
2010-05-14 13:42:17 +00:00
Ed Schouten
8f6794dda3 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.

PR:           bin/146189
Tested by:    amdmi3@, older version
2010-05-14 12:34:06 +00:00
Martin Matuska
c678c727a6 MFC r207910:
(cddl/contrib/opensolaris part)

Fix possible panic with zfs destroy.
OpenSolaris onnv revision:	8779:f164e0e90508

PR:		kern/146471
Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6784924)
2010-05-14 09:57:10 +00:00
Martin Matuska
06dad5a31f MFC r207909, r207910, r207911:
MFC r207909:
Fix zfs rename (may occasionally fail with dataset busy).
OpenSolaris onnv revision:	8517:41a0783dde17

MFC r207910:
Fix possible panic with zfs destroy.
OpenSolaris onnv revision:	8779:f164e0e90508

MFC r207911:
Fix failed assertion on destroying datasets from an older pool version.
OpenSolaris onnv revision:	9390:887948510f80

PR:		kern/146471
Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6784757, 6784924, 6826861)
2010-05-14 09:50:28 +00:00
Martin Matuska
2523745f14 MFC r207908:
Fix endianess bug in ZFS intent log (ZIL).

OpenSolaris onnv revision:	8109:6147a1bdd359

Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6760048)
2010-05-14 09:06:49 +00:00
Martin Matuska
5d0b90ebf4 MFC r207427:
Fix improper pool write throughput calculation.

OpenSolaris onnv revision:	9366:17553395a745

PR:		kern/146108
Obtained from:	OpenSolaris (Bug ID 6817339)
Approved by:	pjd, delphij (mentor)
2010-05-14 09:00:29 +00:00
Attilio Rao
7b7fb4910e 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.
2010-05-14 01:43:13 +00:00
Xin LI
42ddb8f1db 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.

[1] http://vger.kernel.org/~davem/cgi-bin/blog.cgi/2010/03/08#strlen_1
2010-05-13 23:28:20 +00:00
Konstantin Belousov
04b7b96b05 MFC r206814 (by alc):
Remove a nonsensical test from vm_pageout_clean().  A page can't be in the
inactive queue and have a non-zero wire count.
2010-05-13 20:31:24 +00:00
Konstantin Belousov
1f93868d76 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.
2010-05-13 20:26:16 +00:00
Konstantin Belousov
ef7b0ac47b MFC r207365:
When doing kstack swapin, read as much pages in one run as possible.
2010-05-13 18:17:01 +00:00
Konstantin Belousov
83d6c6d862 MFC r206545 (by alc):
Simplify vm_thread_swapin().

Approved by:	alc
2010-05-13 18:12:44 +00:00
Navdeep Parhar
63ae3fec8b 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
2010-05-13 17:45:32 +00:00
Jilles Tjoelker
f5fa4d2e65 MFC r206143,r206148,r206149,r206167,r206491,r206817,r207127,r207824
Various testcases that work correctly with stable/8 sh.
2010-05-13 17:22:00 +00:00
Jilles Tjoelker
1270ecd86a 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
2010-05-13 15:44:49 +00:00
Konstantin Belousov
e6ca6764e8 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.
2010-05-13 09:26:31 +00:00
Jaakko Heinonen
2a1c82e489 MFC r203757:
- Remove reference to nfs4. mount_nfs4(8) was removed in r192578.
- Add newnfs.
2010-05-12 17:22:11 +00:00
Pyun YongHyeon
afe8083a9d MFC r207763:
Don't change PCIe maximum read request size to 2048 on RTL810x
  controllers. It caused device timeouts.

  Reported by:	McLone < mclone <> gmail dot com >
  Tested by:	McLone < mclone <> gmail dot com >
2010-05-12 17:18:07 +00:00