Commit Graph

59935 Commits

Author SHA1 Message Date
pjd
773098d748 Remove redundant check committed by accident. 2006-07-25 20:00:55 +00:00
pjd
054c4a83dd Avoid memory allocations when the given address is already 16 bytes aligned.
Such an address can be used directly in padlock's AES.
This improves speed of geli(8) significantly:

	# sysctl kern.geom.zero.clear=0
	# geli onetime -s 4096 gzero
	# dd if=/dev/gzero.eli of=/dev/null bs=1m count=1000

Before:	113MB/s
After:	203MB/s

BTW. If sector size is set to 128kB, I can read at 276MB/s :)
2006-07-25 19:32:58 +00:00
pjd
90aa974bdf Modify PADLOCK_ALIGN() macro, so when the given address is already 16 bytes
aligned, it will be used directly, not 'address + 16'.
2006-07-25 19:06:54 +00:00
pjd
1bdee6da83 Style fixes. 2006-07-25 19:04:26 +00:00
yar
ee7ffb561f In udf_find_partmaps(), when we find a type 1 partition map, we have to
skip the actual type 1 length (6 bytes). With this change, it is now possible
to correctly spot the VAT partition map in certain discs.

Submitted by:	Pedro Martelletto <pedro@ambientworks.net>
2006-07-25 14:15:50 +00:00
njl
7a331053aa Add support for overriding the values for _CRT, _HOT, and _PSV via sysctl.
Prevent casual modification by requiring hw.acpi.thermal.user_override to
be set first.  Fix printing of negative temperatures in the K->C conversion.
Document the remaining thermal sysctls.

MFC after:	3 days
2006-07-25 02:27:38 +00:00
rwatson
622ddb56a0 Add uipc_sockbuf.c to standard files list; accidentally missed in earlier
commit.

Spotted by:	tinderbox
2006-07-25 02:15:28 +00:00
kevlo
9600c80b61 Cleanup.
Approved by: cognet
2006-07-25 01:08:41 +00:00
yongari
9b54b752db Add stge(4) to the list of drivers supported by GENERIC kernel. 2006-07-25 01:06:32 +00:00
yongari
d2ee5cb234 Add an entry for the stge(4) module.
While I'm here remove a stale wx(4) entry which was removed 4 years,
9 months ago.
2006-07-25 01:02:22 +00:00
mjacob
e8bbdef166 bus_alloc_resource_any is actually defined in the
RELENG_4 branch, so there's no need to have a compilation
difference here any more.
2006-07-25 01:01:09 +00:00
mjacob
dd7156e685 When probing to attach the CAM functionality, check against
desired role configuration instead of existing role. This gets
us out of the mess where we configured a role of NONE (or were
LAN only, for example), but didn't continue to attach the CAM
module (because we had neither initiator nor target role
set). Unfortunately, the code that rewrites NVRAM to match
actual to desired role only works if the CAM module attaches.

MFC after:	2 weeks
2006-07-25 00:59:54 +00:00
yongari
aa98f2642f Hook up stge(4) to the build. 2006-07-25 00:45:55 +00:00
yongari
e9264082c6 Add stge(4), a driver for Sundance/Tamarack TC9021 Gigabit Ethernet
controller ported from NetBSD. It supports the following Gigabit
Ethernet adapters.
o Antares Microsystems Gigabit Ethernet
o ASUS NX1101 Gigabit Ethernet
o D-Link DL-4000 Gigabit Ethernet
o IC Plus IP1000A Gigabit Ethernet
o Sundance ST-2021 Gigabit Ethernet
o Sundance ST-2023 Gigabit Ethernet
o Sundance TC9021 Gigabit Ethernet
o Tamarack TC9021 Gigabit Ethernet
The IP1000A Gigabit Ethernet is also found on some motherboards
(LOM) from ABIT.

Unlike NetBSD stge(4) it does not require promiscuous mode operation
to revice packet and it supports all hardware features(TCP/UDP/IP
checksum offload, VLAN tag stripping/insertion features and JUMBO
frame) and polling(4).
Due to lack of hardware, hardwares that have TBI trantransceivers
were not tested at all.

Special thanks to wpaul who provided valauble datasheet for the
controller and helped to debug jumbo frame related issues. Whitout
his datasheet I would have spent many hours to debug this chip.

Tested on:	i386, sparc64
2006-07-25 00:37:09 +00:00
marcel
5312caa99a Revert previous commit. Spinlocks hold interrupts disabled, so
preemption is not possible.

Pointed out by: jhb@
2006-07-25 00:23:54 +00:00
yongari
45d3d5a579 Connect gentbi, ip1000phy to the build. 2006-07-25 00:20:11 +00:00
yongari
c0bdddc8ea Add ip1000 PHY driver for IC Plus IP1000A integrated PHY. 2006-07-25 00:16:09 +00:00
yongari
3ba13fadda Add IC Plus IP1000A integrated PHY id. 2006-07-25 00:14:00 +00:00
yongari
85dbe58aed Add gentbi, a generic TBI(teb-bit interface) PHY driver ported
from NetBSD.
2006-07-25 00:08:32 +00:00
marcel
0473910011 If we have multiple interrupt resources, like for Z8530 clones on the
mac-io bus, we cannot setup FAST interrupt handlers. This because we
use spinlocks to protect the hardware and all interrupt resources are
assigned the same interrupt handler. When the interrupt handler is
invoked for interrupt X, it could be preempted for interrupt Y while
it was holding the lock (where X and Y are the interrupt resources
corresponding a single instance of this driver). This is a deadlock.
By only using a MPSAFE handler in that case we prevent preemption.
2006-07-24 22:25:16 +00:00
cognet
0bad58d974 Only use -mno-apcs-frame if DDB is not in the kernel, as it prevent the
backtraces from working.

MFC After:	3 days
2006-07-24 22:09:47 +00:00
imp
9f580cbac1 Add a few more devices to the supported list. Specifically, the PHAROS and
the silly dongly I just bought at Radio Shack.
2006-07-24 19:47:00 +00:00
rwatson
c5a16c08ba Remove non-socket buffer routines from uipc_sockbuf.c, and socket buffer
specific routines from uipc_socket2.c following repo-copy.  We might
rethink the location of one or two at some point, but the division was
relatively clean.  uipc_sockbuf.c is now the home of routines that
manipulate socket buffers.
2006-07-24 16:21:31 +00:00
dwmalone
998baf5362 Rather than calling mircotime() in catchpacket(), make catchpacket()
take a timeval indicating when the packet was captured. Move
microtime() to the calling functions and grab the timestamp as soon
as we know that we're going to call catchpacket at least once.

This means that we call microtime() once per matched packet, as
opposed to once per matched packet per bpf listener. It also means
that we return the same timestamp to all bpf listeners, rather than
slightly different ones.

It would be more accurate to call microtime() even earlier for all
packets, as you have to grab (1+#listener) locks before you can
determine if the packet will be logged. You could always grab a
timestamp before the locks, but microtime() can be costly, so this
didn't seem like a good idea.

(I guess most ethernet interfaces will have a bpf listener these
days because of dhclient. That means that we could be doing two bpf
locks on most packets going through the interface.)

PR:		71711
2006-07-24 15:42:04 +00:00
rwatson
40868fda8a soreceive_generic(), and sopoll_generic(). Add new functions sosend(),
soreceive(), and sopoll(), which are wrappers for pru_sosend,
pru_soreceive, and pru_sopoll, and are now used univerally by socket
consumers rather than either directly invoking the old so*() functions
or directly invoking the protocol switch method (about an even split
prior to this commit).

This completes an architectural change that was begun in 1996 to permit
protocols to provide substitute implementations, as now used by UDP.
Consumers now uniformly invoke sosend(), soreceive(), and sopoll() to
perform these operations on sockets -- in particular, distributed file
systems and socket system calls.

Architectural head nod:	sam, gnn, wollman
2006-07-24 15:20:08 +00:00
davidxu
fee466e170 Remove a duplicated line. 2006-07-24 12:24:56 +00:00
sos
ab503492df Finally fix support for the newer MCP51/MCP55 nVidia chipsets.
The register layout has changed since the original NV4 - sigh.
Hotplug support has been fixed for all nVidia chipsets that supports it
(including the MCP51/55).

HW donated by: Kingsley College
2006-07-24 10:44:50 +00:00
rwatson
7c19b31514 Remove MT_FTABLE, as it's no longer used.
Comment that many stats in mbstat are now not used, as libmemstat and
UMA stats are used.
2006-07-24 01:49:57 +00:00
rwatson
3963946dfe Garbage collect #if 0'd MT_ mbuf types, as they are no longer used, and
there are no plans to re-introduce them.
2006-07-24 01:14:05 +00:00
rwatson
785a134681 Tweak so_gencnt comment: it was once last, but that is no longer the
case.
2006-07-24 01:05:36 +00:00
rwatson
7d6ff37cf6 Tweak comment for so_head: it is a pointer to the listen socket, rather
than the accept socket.
2006-07-24 01:02:07 +00:00
rwatson
1bc94971ca Fix a spelling error in a comment.
Found with:	mckusick's code walkthrough DVDs
2006-07-24 00:33:24 +00:00
rwatson
1aefa1572f Remove duplicate 'or'.
Submitted by:	ru
2006-07-23 21:01:09 +00:00
rwatson
af93451039 Update various uipc_socket.c comments, and reformat others. 2006-07-23 20:36:04 +00:00
rwatson
407a79e120 Add additional comments to the top of the UNIX domain socket implementation
providing some high level pointers regarding the implementation.
2006-07-23 20:06:45 +00:00
rwatson
711726cd79 Remove old kern.malloc sysctl, which generated a text representation of
the kernel malloc(9) state for vmstat -m.  libmemstat is now used to
generate a machine-readable version which is converged by vmstat -m
into a human-readable version.

Not for MFC.
2006-07-23 19:55:41 +00:00
rwatson
91cb1c84be Expand comments for malloc(9) to better describe the design and
statistics / memory types model.
2006-07-23 19:51:39 +00:00
rwatson
39c8e12140 Update and reformat comments for POSIX.1e ACL utility routines. 2006-07-23 19:35:10 +00:00
rwatson
03243d6eb4 Comment extended attribute name space constants. 2006-07-23 19:26:54 +00:00
rwatson
b15ac22f40 Improve comments for label data structure. 2006-07-23 19:26:32 +00:00
rwatson
fe855a5667 Align IPv6 socket locking with IPv4 locking: lock socket buffer explicitly
and use _locked variants to avoid extra lock and unlock operations.

Reviewed by:	gnn
MFC after:	1 week
2006-07-23 12:24:22 +00:00
rwatson
c6cb3a5582 Add two new unpcb flags, UNP_BINDING and UNP_CONNECTING, which will be
used to mark UNIX domain sockets as being in the process of binding or
connecting.  Use these to prevent simultaneous bind or connect
operations by multiple threads or processes on the same socket at the
same time, which closes race conditions present in the UNIX domain
socket implementation since inception.
2006-07-23 12:01:14 +00:00
rwatson
e5969e57e6 Merge unp_bind() into uipc_bind(), as it is called only from uipc_bind(). 2006-07-23 11:02:12 +00:00
rwatson
b383d2c883 Since unp_attach() and unp_detach() are now called only from uipc_attach()
and uipc_detach(), merge them into their calling functions.
2006-07-23 10:25:28 +00:00
rwatson
777bd5286c Move various UNIX socket global variables and sysctls from the middle of
the file to the top.
2006-07-23 10:19:04 +00:00
alc
89dea53ec2 Export the number of object bypasses and collapses through sysctl. 2006-07-22 22:31:57 +00:00
rwatson
5d4d7953f0 In uipc_send() and uipc_rcvd(), store unp->unp_conn pointer in unp2
while working with the second unpcb to make the code more clear.
2006-07-22 18:41:42 +00:00
rwatson
b176399b59 Re-wrap and other minor formatting and punctuation fixes for UNIX domain
socket comments.
2006-07-22 17:24:55 +00:00
pjd
90eb685fca Implement support for HMAC/SHA1 and HMAC/SHA256 acceleration found in
new VIA CPUs.
For older CPUs HMAC/SHA1 and HMAC/SHA256 (and others) will still be done
in software.

Move symmetric cryptography (currently only AES-CBC 128/192/256) to
padlock_cipher.c file. Move HMAC cryptography to padlock_hash.c file.

Hardware from:	Centaur Technologies
2006-07-22 16:18:47 +00:00
pjd
361a0884e4 Correct few bzero()s.
MFC after:	3 days
2006-07-22 13:14:11 +00:00