Commit Graph

127205 Commits

Author SHA1 Message Date
Andre Oppermann
404138281a Change em_tso_setup() to deal with already inserted vlan headers, IP options
and add skeleton IPv6 support.  The new code structure can also be easily
enhanced to support new/more protocols (SCTP) and IP fragmentation in the
future.

In em_encap() only try to do TSO if 'dotso' is true.

Reviewed by:	jfv
2006-09-29 13:33:30 +00:00
Andre Oppermann
6c9d400d37 Only advertize IFCAP_TSO4 capabilities. IPv6 is not yet supported.
Reviewed by:	jfv
2006-09-29 13:17:16 +00:00
Andre Oppermann
5c335b1cc8 Handle all error cases from bus_dmamap_load_mbuf_sg(). Those are:
- EFBIG means the mbuf chain was too long and bus_dma ran out of segments.
   Defragment the mbuf chain and try again. (Already existed, not changed.)
 - ENOMEM means bus_dma could not obtain enough bounce buffers at this point
   in time.  Defer sending and try again later.
 - All other errors, in particular EINVAL, are fatal and prevent the mbuf
   chain from ever going through.  Drop it and report error.
 - Checking (nsegs == 0) is unnecessary as bus_dmamap_load_mbuf_sg() always
   reports an error if it is < 1.

This prevents broken packets from clogging the interface queue indefinately.

Discussed with:	scottl
Reviewed by:	jfv
2006-09-29 13:12:38 +00:00
Bruce M Simpson
aa805a5eb7 Remove mrouted from -CURRENT.
Discussed with:	fenner, net@
2006-09-29 10:40:53 +00:00
Bruce M Simpson
13b3ebf134 Remove mrouted and its utilities from the base system.
They may now be obtained from ports.

Discussed with:	fenner, net@
2006-09-29 10:39:23 +00:00
Ruslan Ermilov
60206ede14 Belatedly document the size change of "struct x?tcpcb". 2006-09-29 10:14:37 +00:00
Martin Blapp
9b206de5a0 Free tty struct after last close. This should fix the pty-leak by numbers.
Remove workarounds for tty_refcount beeing 0, this will be fixed differently
later.
2006-09-29 09:53:19 +00:00
Martin Blapp
e4936f3763 Free tty struct after last close. This should fix the pty-leak by numbers.
Remove workarounds for tty_refcount beeing 0, this will be fixed differently
later.

Back out rev 1.145 since we initialize the tty struct from scratch and bad
things can't happen anymore.
2006-09-29 09:52:57 +00:00
Ruslan Ermilov
a861847014 SNDCTL_TMR_{START,STOP,CONTINUE} don't take an argument. 2006-09-29 09:28:22 +00:00
Ruslan Ermilov
f77472e6dc The SNDCTL_DSP_NONBLOCK ioctl doesn't take an argument, from
what I can tell by browsing the Internet (Linux, OSS, etc.).
2006-09-29 09:10:54 +00:00
Maxim Konovalov
c24384096d o Check for a required "pathname" argument presence.
PR:		bin/95146
Submitted by:	candy-sendpr@kgc.co.jp
MFC after:	3 weeks
2006-09-29 08:00:40 +00:00
Maxim Konovalov
acc03ac6bb o Convert w/spaces to tabs in the previous commit. 2006-09-29 06:46:31 +00:00
Mike Silbersack
d4bdcb16cc Rather than autoscaling the number of TIME_WAIT sockets to maxsockets / 5,
scale it to min(ephemeral port range / 2, maxsockets / 5) so that people
with large gobs of memory and/or large maxsockets settings will not
exhaust their entire ephemeral port range with sockets in the TIME_WAIT
state during periods of heavy load.

Those who wish to tweak the size of the TIME_WAIT zone can still do so with
net.inet.tcp.maxtcptw.

Reviewed by: glebius, ru
2006-09-29 06:24:26 +00:00
Ruslan Ermilov
64941e9d80 Move the -l option processing to where it belongs.
Overall still not kosher but better matches style(9).
2006-09-29 06:06:39 +00:00
Luoqi Chen
5a8e64ee60 Do not chdir(2) until after setuid(2), otherwise "su - username" would fail
when root doesn't have the permission to enter target user's home directory.
If set, PAM environment variable HOME will be used in chdir(2) instead of
pwd->pw_dir, this allows pam_chroot module to continue to function.
2006-09-29 04:41:37 +00:00
Ken Smith
a9a5d47c85 Fix two minor style(9) nits in v1.313 which were noticed during an
MFC review.  alc@ will be MFCing V1.313 plus style fix to RELENG_6.
2006-09-29 00:20:56 +00:00
Matteo Riondato
9e0573fdc2 Set txrx_error to 1 when we reach abort. This makes the program correctly set the exit code.
The PR has further details on this.

PR:		bin/103206
Submitted by:	John Hickey <jjh-freebsd@daedalian.us>
MFC after:	3 days
2006-09-28 21:22:21 +00:00
John Baldwin
d64e328e3c Tweak the code to handle intercepting BIOS calls to int 0x15 to shave
another 16 bytes off of BTX (and thus boot2):
- Compare against the value of %eax that is saved on the stack instead of
  loading it into %eax (which requires saving the current %eax on the
  stack).
- Use %ch to examine the keyboard flag state in the BIOS to see if
  Ctrl-Alt-Del is pressed instead of %al so we don't have to save %eax on
  the stack anymore.

MFC after:	1 week
2006-09-28 19:42:10 +00:00
John Baldwin
4b9657e974 Optimize the int 15/87 handler for space to shave another 16 bytes off of
BTX (and thus boot2):
- Don't bother saving %eax, %ebx, or %ecx as it is not necessary.
- Use a more compact sequence to load the base value out of a GDT entry
  by loading the contiguous low 24 bits into the upper 24 bits of %eax,
  loading the high 8 bits into %al, and using a ror to rotate the bits
  (2 mov's and a ror) rather than loading the pieces in smaller chunks
  (3 mov's and a shl).
- Use movzwl + leal instead of movl + movw + shll + addl.
- Use 'xchgl %eax,%foo' rather than 'movl %eax,%foo' for cases where
  it's ok to trash %eax.  xchgl %eax, foo is a 1-byte opcode whereas the
  mov is a 2-byte opcode.
- Use movzwl rather than xorl + movw.

MFC after:	1 week
2006-09-28 19:38:02 +00:00
John Baldwin
c4f7c44bb3 Add an 'smap' command that dumps out the BIOS SMAP.
MFC after:	1 week
2006-09-28 19:07:13 +00:00
John Baldwin
64786948cc Ignore a sub-topic match if it is inside the command description.
Otherwise, merge-help can get confused by a command description that
includes a word that starts with a capital S.

MFC after:	1 week
2006-09-28 19:06:20 +00:00
Andre Oppermann
2c30ec0a1f When tcp_output() receives an error upon sending a packet it reverts parts
of its internal state to ignore the failed send and try again a bit later.
If the error is EPERM the packet got blocked by the local firewall and the
revert may cause the session to get stuck and retry indefinitely.  This way
we treat it like a packet loss and let the retransmit timer and timeouts
do their work over time.

The correct behavior is to drop a connection that gets an EPERM error.
However this _may_ introduce some POLA problems and a two commit approach
was chosen.

Discussed with:	glebius
PR:		kern/25986
PR:		kern/102653
2006-09-28 18:02:46 +00:00
Ariff Abdullah
7699548f1b Various fixups, especially for the upcomming High Definition Audio
commit.

1) sys/dev/sound/pcm/sound.h
   sys/dev/sound/pcm/channel.c
   * Be more specific: SD_F_SOFTVOL -> SD_F_SOFTPCMVOL
2) sys/dev/sound/pcm/mixer.[ch]
   * Implement
       mix_setparentchild()
       mix_setrealdev()
       mix_getparent()
       mix_getchild()
     The purpose of these functions is implement relative volume
     adjustment, such as to tie two or more mixer device into a
     single logical device. Usefull for the upcoming HDA driver
     and few AC97 codec (such as AD1981B) where the master volume
     "vol" need to be implemented using this logical manner.
3) sys/dev/sound/pcm/ac97_patch.[ch]
   * Patch for AD1981B codec to enable (automuting) headphone jack sense.
4) sys/dev/sound/pcm/ac97.c
   * Implement proper logical master volume for AD9181B codec
     through various mix_set{parentchild,realdev}(). Tie both
     "ogain" (headphone volume) and "phone" (speaker/lineout) to
     a logical "vol".
5) sys/dev/sound/pcm/usb/uaudio_pcm.c
   * ditto, for "vol" -> { "pcm" }.

MFC after:	1 month
2006-09-28 17:29:00 +00:00
John Baldwin
add92b34d1 A couple of simple tweaks that trim BTX by 6 bytes. Since BTX is
16-byte aligned within boot2 however, this actually trims boot2 by 16
bytes.
2006-09-28 16:30:36 +00:00
Ollivier Robert
3fa694fea6 This commit was generated by cvs2svn to compensate for changes in r162735,
which included commits to RCS files with non-trunk default branches.
2006-09-28 16:02:34 +00:00
Ollivier Robert
8c24a1e0ff Fix compilation with gcc 4.1. This is imported on the vendor branch as it
was applied in the mainstream source and a later complete import of
4.2.2p3 will complete the fix.

Submitted by:	kan
2006-09-28 16:02:34 +00:00
Bruce A. Mah
af5452186f New release notes: SA-06:21.gzip, SA-06:23.openssl. 2006-09-28 15:36:59 +00:00
Bruce A. Mah
fad6d29c99 New release notes: id(1) -a (+MFC), tcpslice removed, ARM binary
generation.

Updated release notes:  KDE 3.5.4.
2006-09-28 14:44:16 +00:00
Andre Oppermann
6a2257d911 When doing TSO correctly do the check to prevent a maximum sized IP packet
from overflowing.
2006-09-28 13:59:26 +00:00
Bruce M Simpson
481544f3ae Note the removal of tcpslice 2006-09-28 13:00:50 +00:00
Ruslan Ermilov
3b9de5ed0c Initializate "offset" variable to zero; otherwise, if not using
the -o option, it might contain garbage.

MFC after:	1 day
2006-09-28 12:33:36 +00:00
Bruce M Simpson
050596b4a0 Fix the IPv4 multicast routing detach path. On interface detach whilst
the MROUTER is running, the system would panic as described in the PR.

The fix in the PR is a good start, however, the other state associated
with the multicast forwarding cache has to be freed in order to avoid
leaking memory and other possible panics.

More care and attention is needed in this area.

PR:		kern/82882
MFC after:	1 week
2006-09-28 12:21:08 +00:00
Bruce M Simpson
d966841427 The IPv4 code should clean up multicast group state when an interface
goes away. Without this change, it leaks in_multi (and often ether_multi
state) if many clonable interfaces are created and destroyed in quick
succession.

The concept of this fix is borrowed from KAME. Detailed information about
this behaviour, as well as test cases, are available in the PR.

PR:		kern/78227
MFC after:	1 week
2006-09-28 10:04:07 +00:00
Ruslan Ermilov
2d78e8c5f1 Add -march=i386 to fix amd64 build by generating the same code
as i386 would do.
2006-09-28 10:02:04 +00:00
Xin LI
72ee327874 Remove 120.clean-kvmdb.
MFC After:	1 day
2006-09-28 09:32:22 +00:00
Ruslan Ermilov
4e9d799f8b Retire macros for the old kernel memory allocator.
Submitted by:	bde
2006-09-28 08:36:08 +00:00
Maxim Sobolev
2c473eaf67 Extend comment explaining why code is conditional at !defined(SCHED_ULE).
Suggested by:	ru
2006-09-27 22:09:35 +00:00
Daniel Gerzo
eb2d52f4b8 Revert my previous change as it does not seem to be entirely correct and
popular.
2006-09-27 21:28:44 +00:00
Ruslan Ermilov
9fddcc6661 Fix our ioctl(2) implementation when the argument is "int". New
ioctls passing integer arguments should use the _IOWINT() macro.
This fixes a lot of ioctl's not working on sparc64, most notable
being keyboard/syscons ioctls.

Full ABI compatibility is provided, with the bonus of fixing the
handling of old ioctls on sparc64.

Reviewed by:	bde (with contributions)
Tested by:	emax, marius
MFC after:	1 week
2006-09-27 19:57:02 +00:00
John Baldwin
3ea944faa0 Emulate moving cr0, cr2, cr3, or cr4 into any i386 general register
rather than just emulating mov cr0, eax.  This fixes some Compaq/HP BIOS
with DMA (as the BIOS tried to read cr3 so it could translate addresses
if paging was enabled).

MFC after:	1 week
2006-09-27 19:32:26 +00:00
Jens Schweikhardt
1a0ba4525f Correct typo. 2006-09-27 19:20:43 +00:00
Maxim Sobolev
6e93c19e3d Since ULE doesn't honor hlt_cpus_mask don't compile code that prevents
timer interrupt servicing for disabled HTT cores in ULE case. Should be
probably fixed in ULE code instead, but we have no real maintainer for
ULE to do it.

PR:		103697
2006-09-27 18:51:19 +00:00
Martin Blapp
8be563721a Move Giant up even further since P_CONTROLT isn't really fully locked
yet (p_flag is, but P_CONTROLT isn't really).

Submitted by:	jhb
2006-09-27 16:42:10 +00:00
Martin Blapp
1bf5e4b866 Use ctty instead of just returning. ctty just has a simple open that
returns ENXIO.

Submitted by:	jhb
2006-09-27 16:41:15 +00:00
Matt Jacob
cd6dedfc61 Bump MAX_INITIATORS to 1024- the LSI-Logic can go even higher than
this for 'initiator id'- this is a stopgap until a sparse map is
added.

Make compat defines for offset format (FreeBSD 5 or less).

Add no-asyncio flag. There's some breakage with ASYNC I/O that every
now and then drops us into an infinite loop. This also then does
a fallback to no-asyncio if the AIO option isn't loaded/compiled into
the kernel.

A number of other chanes to try and track some breakage.
2006-09-27 15:38:13 +00:00
Ruslan Ermilov
e640c42275 - Removed a copyright from makefile.
- Added ${.CURDIR} to .include "...".
- Whitespace fixes.

OK'ed by:	piso
2006-09-27 12:30:27 +00:00
Ruslan Ermilov
d6e26499b7 Put back NO_WERROR= to fix sparc64 build. 2006-09-27 10:30:17 +00:00
Pawel Jakub Dawidek
e5cccaf001 - Use existing functions mtx_lock() and mtx_unlock().
- Change variable name to 'error', as this is what is mostly used for
  functions that return an error.
- Add mutex(9) to the SEE ALSO section.
- Bump the date.

I don't really like the example code. I'd prefer symmetry where possible, eg.

	mtx_lock(&example_lock);
	error = example(NULL, EXAMPLE_ONE);
	mtx_unlock(&example_lock);
	if (error != 0)
		return (error);

But I'll leave it as it is for now.

Reviewed by:	simon
2006-09-27 08:39:00 +00:00
Stanislav Sedov
af159726bc - Add my birthday entry to the chronicle.
Approved by:	sem (mentor)
2006-09-27 08:25:53 +00:00
Eric Anholt
30e14d656c Add support for 945G/GM AGP chipsets.
The key problem was that the aperture size detection using the MSAC bit
doesn't work -- the bit appears to be set even when it shouldn't be.  Linux
takes a different approach, testing for a bit of the GMADR (PCIR_BAR(2)) being
set.  However, as I don't think that's a safe way to test aperture size, we
just allocate the resource and check its size.  This also pointed out that
agp_generic_attach hadn't been allocating our aperture resource, which may
have caused problems in some cases.

Also corrected is a minor copy-and-pasteo in an error case.

PR:		kern/103079
Submitted by:	mnag
Tested on:	i945GM, i915GM
MFC after:	2 weeks
2006-09-27 06:38:54 +00:00