Commit Graph

155061 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
b5f770bd86 Move checking against RLIMIT_FSIZE into one place, vn_rlimit_fsize().
Reviewed by:	kib
2010-05-05 16:44:25 +00:00
Konstantin Belousov
213c077f62 Fix a mistake in r207603. td_rux.rux_runtime still needs conversion.
Reported and tested by:	nwhitehorn
Pointy hat to:	kib
MFC after:	6 days
2010-05-05 16:05:51 +00:00
VANHULLEBUS Yvan
2e8d55c4e8 Set SA's natt_type before calling key_mature() in key_add(),
as the SA may be used as soon as key_mature() has been done.

Obtained from:	NETASQ
MFC after:	1 week
2010-05-05 08:58:58 +00:00
VANHULLEBUS Yvan
2d2a2083f7 Update SA's NAT-T stuff before calling key_mature() in key_update(),
as SA may be used as soon as key_mature() has been called.

Obtained from:	NETASQ
MFC after: 1 week
2010-05-05 08:55:26 +00:00
Daniel Gerzo
35939b04d3 - fix typo 2010-05-05 08:43:47 +00:00
Alan Cox
d43708c049 Use an OBJT_PHYS object and thus PG_UNMANAGED pages to implement the TSB.
The TSB is not a pageable structure, so there is no point in using managed
pages.

Reviewed by:	kib
2010-05-05 07:47:40 +00:00
Alan Cox
28a50a192f Push down the acquisition of the page queues lock into vm_page_unwire(). 2010-05-05 07:40:54 +00:00
Neel Natu
7ee44a58d7 Fix DDB backtrace involving kernel modules.
We can no longer assume that all valid program counter values reside
within the kernel object file.
2010-05-05 04:37:45 +00:00
Alan Cox
e3ef0d2fcf Push down the acquisition of the page queues lock into vm_page_unwire().
Update the comment describing which lock should be held on entry to
vm_page_wire().

Reviewed by:	kib
2010-05-05 03:45:46 +00:00
Navdeep Parhar
d6da836201 Add support for hardware filters to cxgb(4). The T3 chip can inspect
L2/3/4 headers and can drop or steer packets as instructed.  Filtering
based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac
addr is possible.  Add support in cxgbtool to program these filters.
Some simple examples:

Drop all tcp/80 traffic coming from the subnet specified.
# cxgbtool cxgb2 filter 0 sip 192.168.1.0/24 dport 80 type tcp action drop

Steer all incoming UDP traffic to qset 0.
# cxgbtool cxgb2 filter 1 type udp queue 0 action pass

Steer all tcp traffic from 192.168.1.1 to qset 1.
# cxgbtool cxgb2 filter 2 sip 192.168.1.1 type tcp queue 1 action pass

Drop fragments.
# cxgbtool cxgb2 filter 3 type frag action drop

List all filters.
# cxgbtool cxgb2 filter list
index         SIP                DIP     sport dport VLAN PRI P/MAC type Q
    0     192.168.1.0/24         0.0.0.0     *    80    0 0/1 */*    tcp -
    1         0.0.0.0/0          0.0.0.0     *     *    0 0/1 */*    udp 0
    2     192.168.1.1/32         0.0.0.0     *     *    0 0/1 */*    tcp 1
    3         0.0.0.0/0          0.0.0.0     *     *    0 0/1 */*   frag -
16367         0.0.0.0/0          0.0.0.0     *     *    0 0/1 */*      * *

MFC after:	2 weeks
2010-05-05 00:41:40 +00:00
Navdeep Parhar
2caefebb07 Add IFCAP_LINKSTATE to cxgb's capabilities.
MFC after:	3 days
2010-05-04 23:55:08 +00:00
Pyun YongHyeon
3edfecaa37 When VLAN hardware tagging is disabled, make sure to disable VLAN
checksum offloading as well as TSO over VLAN.

Reported by:	jhb
2010-05-04 22:24:19 +00:00
Pyun YongHyeon
f648f6bb0c Free entire mbuf chain instead of the first mbuf. 2010-05-04 21:23:59 +00:00
Xin LI
54934285c7 Remove if_ar, if_ray, if_sr, if_ppp, if_sl to reflect the current modules
available, they were removed due to NEEDSGIANT.

While I'm there, add if_et which was missed quite a while ago.

MFC after:	2 weeks
2010-05-04 19:58:55 +00:00
Pyun YongHyeon
55c978ba9d Enable multi-descriptor transmisstion for fragmented mbufs. There
is no more need to defragment mbufs. After transmitting the
multi-fragmented frame, the controller updates only the first
descriptor of multi-descriptor transmission so it's driver's
responsibility to clear OWN bits of remaining descriptor of
multi-descriptor transmission. It seems the controller behaves much
like jme(4) controllers in descriptor handling.

Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-05-04 19:04:51 +00:00
Martin Matuska
e2725a2c5c Enable "zfs list" to list explicitly requested snapshots.
Partial import of OpenSolaris onnv revision:
8415:8809e849f63e

PR:		kern/146297
Submitted by:	myself
Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6758338)
MFC after:	2 weeks
2010-05-04 17:44:40 +00:00
Martin Matuska
7d4daf9a10 Speed up ZFS list operation with objset prefetching.
Partial import of OpenSolaris onnv revisions:
8415:8809e849f63e, 10474:0e96dd3b905a

PR:		kern/146297
Submitted by:	myself
Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6386929, 6755389, 6847118)
MFC after:	2 weeks
2010-05-04 17:40:24 +00:00
Pyun YongHyeon
7135e11ef9 Remove clearing RxHashTable2 register. The register is reprogrammed
in sge_rxfilter().
2010-05-04 17:34:00 +00:00
Martin Matuska
77a7f64749 Fix deadlock during zfs receive.
OpenSolaris onnv revision:	9299:8809e849f63e

PR:		kern/146296
Submitted by:	myself
Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6783818, 6826836)
MFC after:	1 week
2010-05-04 17:30:07 +00:00
Pyun YongHyeon
31fefd0d5d Make sure to check whether driver is running before processing
received frames. Also check driver has valid ifp pointer before
calling msk_stop() in device_shutdown handler. While I'm here
remove unnecessary accesses to interrupt mask registers in
device_shutdown handler because driver puts the controller into
reset state.
With these changes, msk(4) now survive from heavy RX traffic(1byte
UDP frame) while reboot is in progress.

Reported by:	Mark Atkinson < atkin901 <> gmail dot com >
2010-05-04 17:12:36 +00:00
Pyun YongHyeon
3d763c3133 Drop driver lock before exiting from interrupt handler.
Submitted by:	jhb
MFC after:	3 days
2010-05-04 17:02:34 +00:00
Warner Losh
a3255f9b15 Doh! Add another new file forgotten by the importer of edwin@'s tftp
improvements.

MFC after:	1 week
Pointy Hat: imp-o-rama...
2010-05-04 17:00:18 +00:00
Jung-uk Kim
c909aebcbb - Remove more dead code[1]. Since r207330, we only need to check division
by zero of the second argument 'from'.
- Prefer u_int32_t over unsigned int to make its intention more clearer.
- Move the function to a header file and make it a static inline function.

Pointed out by:	Andrew Reilly (areilly at bigpond dot net dot au)[1]
MFC after:	3 days
2010-05-04 16:56:59 +00:00
Alan Cox
a7283d3213 Add page locking to the vm_page_cow* functions.
Push down the acquisition and release of the page queues lock into
vm_page_wire().

Reviewed by:	kib
2010-05-04 15:55:41 +00:00
Christian S.J. Peron
24ffe72448 Add a case to make sure that internal audit records get converted
to BSM format for lpathconf(2) events.

MFC after:	2 weeks
2010-05-04 15:29:07 +00:00
Warner Losh
e7ff54750b Bring in new files from edwin's tftp 2010-05-04 13:07:40 +00:00
Ed Maste
11666ce50a Restore historical behaviour of only executing chflags on files that exist.
This eliminates cosmetic errors of the form "chflags: ...: No such file or
directory" during an installworld to an empty destination.
2010-05-04 11:34:13 +00:00
Norikatsu Shigemura
2db9a1171c Add support run services_mkdb(8).
Approved by:	dougb, imp (mentor)
Reviewed by:	ume
MFC after:	2 weeks
2010-05-04 11:25:04 +00:00
Kevin Lo
64c68f1c50 Add support for FA626TE.
Tested on GM8181 development board.
2010-05-04 10:14:05 +00:00
Warner Losh
5276e63981 Go ahead and merge the work edwin@ on tftpd into the tree. It is a
lot better than what's in the tree now.  Edwin tested it at a prior
employer, but can't test it today.  I've found that it works a lot
better with the various uboot versions that I've used in my embedded
work.  Here's the pkg-descr from the port that describes the changes:

It all started when we got some new routers, which told me the
following when trying to upload configuration or download images
from it: The TFTP server doesn't support the blocksize option.

My curiousity was triggered, it took me some reading of RFCs and
other documentation to find out what was possible and what could
be done. Was plain TFTP very simple in its handshake, TFTP with
options was kind of messy because of its backwards capability: The
first packet returned could either be an acknowledgement of options,
or the first data packet.

Going through the source code of src/libexec/tftpd and going through
the code of src/usr.bin/tftp showed that there was a lot of duplicate
code, and the addition of options would only increase the amount
of duplicate code. After all, both the client and the server can
act as a sender and receiver.

At the end, it ended up with a nearly complete rewrite of the tftp
client and server. It has been tested against the following TFTP
clients and servers:

- Itself (yay!)
- The standard FreeBSD tftp client and server
- The Fedora Core 6 tftp client and server
- Cisco router tftp client
- Extreme Networks tftp client

It supports the following RFCs:

RFC1350 - THE TFTP PROTOCOL (REVISION 2)
RFC2347 - TFTP Option Extension
RFC2348 - TFTP Blocksize Option
RFC2349 - TFTP Timeout Interval and Transfer Size Options
RFC3617 - Uniform Resource Identifier (URI) Scheme and Applicability
          Statement for the Trivial File Transfer Protocol (TFTP)

It supports the following unofficial TFTP Options as described at
http://www.compuphase.com/tftp.htm:

blksize2 - Block size restricted to powers of 2, excluding protocol headers
rollover - Block counter roll-over (roll back to zero or to one)

From the tftp program point of view the following things are changed:

- New commands: "blocksize", "blocksize2", "rollover" and "options"
- Development features: "debug" and "packetdrop"

If you try this tftp/tftpd implementation, please let me know if
it works (or doesn't work) and against which implementaion so I can
get a list of confirmed working systems.

Author: Edwin Groothuis <edwin@FreeBSD.org>
2010-05-04 06:19:19 +00:00
Warner Losh
752fa69402 Go ahead and merge the work edwin@ on tftpd into the tree. It is a
lot better than what's in the tree now.  Edwin tested it at a prior
employer, but can't test it today.  I've found that it works a lot
better with the various uboot versions that I've used in my embedded
work.  Here's the pkg-descr from the port that describes the changes:

It all started when we got some new routers, which told me the
following when trying to upload configuration or download images
from it: The TFTP server doesn't support the blocksize option.

My curiousity was triggered, it took me some reading of RFCs and
other documentation to find out what was possible and what could
be done. Was plain TFTP very simple in its handshake, TFTP with
options was kind of messy because of its backwards capability: The
first packet returned could either be an acknowledgement of options,
or the first data packet.

Going through the source code of src/libexec/tftpd and going through
the code of src/usr.bin/tftp showed that there was a lot of duplicate
code, and the addition of options would only increase the amount
of duplicate code. After all, both the client and the server can
act as a sender and receiver.

At the end, it ended up with a nearly complete rewrite of the tftp
client and server. It has been tested against the following TFTP
clients and servers:

- Itself (yay!)
- The standard FreeBSD tftp client and server
- The Fedora Core 6 tftp client and server
- Cisco router tftp client
- Extreme Networks tftp client

It supports the following RFCs:

RFC1350 - THE TFTP PROTOCOL (REVISION 2)
RFC2347 - TFTP Option Extension
RFC2348 - TFTP Blocksize Option
RFC2349 - TFTP Timeout Interval and Transfer Size Options
RFC3617 - Uniform Resource Identifier (URI) Scheme and Applicability
          Statement for the Trivial File Transfer Protocol (TFTP)

It supports the following unofficial TFTP Options as described at
http://www.compuphase.com/tftp.htm:

blksize2 - Block size restricted to powers of 2, excluding protocol headers
rollover - Block counter roll-over (roll back to zero or to one)

From the tftp program point of view the following things are changed:

- New commands: "blocksize", "blocksize2", "rollover" and "options"
- Development features: "debug" and "packetdrop"

If you try this tftp/tftpd implementation, please let me know if
it works (or doesn't work) and against which implementaion so I can
get a list of confirmed working systems.

Author: Edwin Groothuis <edwin@FreeBSD.org>
2010-05-04 06:13:17 +00:00
Konstantin Belousov
9182554ae9 Fix typo in comment.
MFC after:	3 days
2010-05-04 06:06:01 +00:00
Konstantin Belousov
603a4d7f41 Remove a comment that merely repeats code.
Submitted by:	bde
MFC after:	1 week
2010-05-04 06:04:33 +00:00
Konstantin Belousov
f742a317e6 Document RUSAGE_THREAD.
Reviewed by:	bde
MFC after:	1 week
2010-05-04 06:01:25 +00:00
Konstantin Belousov
03d13670c2 Use td_rux.rux_runtime for ki_runtime instead of redoing calculation.
Submitted by:	bde
MFC after:	1 week
2010-05-04 06:00:39 +00:00
Konstantin Belousov
bed4c52416 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.

Requested by:	attilio [1]
Discussed with:	attilio, bde
Reviewed by:	bde
Based on submission by:	Alexander Krizhanovsky <ak natsys-lab com>
MFC after:	1 week
X-MFC-Note:	td_rux shall be moved to the end of struct thread
2010-05-04 05:55:37 +00:00
Alan Cox
0c41a69e71 Add lock assertions. 2010-05-04 05:55:19 +00:00
Konstantin Belousov
d54a8529a7 Move definition of struct rusage_ext before struct thread.
MFC after:	1 week
2010-05-04 05:47:17 +00:00
Doug Barton
fd73ccb143 Make address assignment via ipv6_prefix_IF work again 2010-05-04 01:46:58 +00:00
Ed Maste
7775701f3a Update GRANDPARENTED text to match the contents of tzdata/factory r19879.
This eliminates "warning: time zone abbreviation differs from POSIX" on
installworld to an empty filesystem.

Reviewed by:	edwin
MFC after:	1 week
2010-05-03 22:32:26 +00:00
Marius Strobl
c41e7be93c Sun GigaSwift Ethernet 1.0 MMF work with r207585 in place. 2010-05-03 20:59:27 +00:00
Marius Strobl
917825acb9 - 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-03 20:57:16 +00:00
Konstantin Belousov
fc0c3802f0 Lock the page around vm_page_activate() and vm_page_deactivate() calls
where it was missed. The wrapped fragments now protect wire_count with
page lock.

Reviewed by:	alc
2010-05-03 20:31:13 +00:00
Konstantin Belousov
5637a59143 Handle busy status of the page in a way expected for pager_getpage().
Flush requested page, unbusy other pages, do not clear m->busy.

Reviewed by:	alc
MFC after:	1 week
2010-05-03 19:19:58 +00:00
Marius Strobl
17bc427d0b On sparc64 obtain the initiator ID from the Open Firmware device tree
in order to match what the PROM built-in driver uses.

Approved by:	mjacob
2010-05-03 18:39:40 +00:00
Alexander Kabaev
59879e52c1 Do not encode more than CTF_MAX_VLEN(1023) enum members.
CTF can not represent enums with more than CTF_MAX_VLEN members, but
ctfconvert will happily ignore that limitation and create CTF section no
other tool can interpret.

This change is different from similar change from upstream, which just
returns an error if big enum is encountered.  Doing that means that
every FreeBSD kernel with compiled in hwpmc will have no useable CTF
information due to pmc_event enum having 1236+ members.
2010-05-03 18:04:17 +00:00
Alan Cox
2d5d7f7f61 Acquire the page lock around vm_page_wire() in vm_page_grab().
Assert that the page lock is held in vm_page_wire().
2010-05-03 17:55:32 +00:00
Alan Cox
451033a48a It makes more sense for the object-based backend allocator to use OBJT_PHYS
objects instead of OBJT_DEFAULT objects because we never reclaim or pageout
the allocated pages.  Moreover, they are mapped with pmap_qenter(), which
creates unmanaged mappings.

Reviewed by:	kib
2010-05-03 17:35:31 +00:00
Alan Cox
5fdd0a335f Acquire the page lock around vm_page_unwire(). For consistency, extend the
scope of the object lock in agp_i810.c.  (In this specific case, the scope
of the object lock shouldn't matter, but I don't want to create a bad
example that might be copied to a case where it did matter.)

Reviewed by:	kib
2010-05-03 16:55:50 +00:00
Alan Cox
c5a648516e Acquire the page lock around vm_page_unwire() and vm_page_wire().
Reviewed by:	kib
2010-05-03 16:41:11 +00:00