Commit Graph

133549 Commits

Author SHA1 Message Date
imp
fc9cb03e61 clalloc and clfree are useles. Remove them. Remove dead code that's
always been dead for years, but has been obfuscated by these macros.
2007-06-12 16:41:29 +00:00
bms
884f4a3485 Add regression test for SSM code. 2007-06-12 16:29:22 +00:00
bms
ffd77d9ba5 Import rewrite of IPv4 socket multicast layer to support source-specific
and protocol-independent host mode multicast. The code is written to
accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work.

This change only pertains to FreeBSD's use as a multicast end-station and
does not concern multicast routing; for an IGMPv3/MLDv2 router
implementation, consider the XORP project.

The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6,
which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html

Summary
 * IPv4 multicast socket processing is now moved out of ip_output.c
   into a new module, in_mcast.c.
 * The in_mcast.c module implements the IPv4 legacy any-source API in
   terms of the protocol-independent source-specific API.
 * Source filters are lazy allocated as the common case does not use them.
   They are part of per inpcb state and are covered by the inpcb lock.
 * struct ip_mreqn is now supported to allow applications to specify
   multicast joins by interface index in the legacy IPv4 any-source API.
 * In UDP, an incoming multicast datagram only requires that the source
   port matches the 4-tuple if the socket was already bound by source port.
   An unbound socket SHOULD be able to receive multicasts sent from an
   ephemeral source port.
 * The UDP socket multicast filter mode defaults to exclusive, that is,
   sources present in the per-socket list will be blocked from delivery.
 * The RFC 3678 userland functions have been added to libc: setsourcefilter,
   getsourcefilter, setipv4sourcefilter, getipv4sourcefilter.
 * Definitions for IGMPv3 are merged but not yet used.
 * struct sockaddr_storage is now referenced from <netinet/in.h>. It
   is therefore defined there if not already declared in the same way
   as for the C99 types.
 * The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF
   which are then interpreted as interface indexes) is now deprecated.
 * A patch for the Rhyolite.com routed in the FreeBSD base system
   is available in the -net archives. This only affects individuals
   running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces.
 * Make IPv6 detach path similar to IPv4's in code flow; functionally same.
 * Bump __FreeBSD_version to 700048; see UPDATING.

This work was financially supported by another FreeBSD committer.

Obtained from:  p4://bms_netdev
Submitted by:   Wilbert de Graaf (original work)
Reviewed by:    rwatson (locking), silence from fenner,
		net@ (but with encouragement)
2007-06-12 16:24:56 +00:00
imp
d4a700c2dc Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate from
usb_port.h.  They aren't needed, and are a legacy of this code's past.
2007-06-12 15:37:19 +00:00
joel
d6014e5948 - Document support for Realtek ALC660 and Analog Devices AD1988B.
- Fix minor typos.
2007-06-12 15:26:41 +00:00
motoyuki
7e97d55648 Delete description of non-existent options: "-4" and "-6".
ntpd's "-4" and "-6" options are described in the original documentation
(contrib/ntp/html/ntpd.html).  It may be original's doc bug.

PR:		docs/112642
Submitted by:	Seth Hieronymus<shieronymus@speakeasy.net>
Discussed with:	ume
MFC after:	1 week
2007-06-12 13:28:55 +00:00
yar
49118fb724 Drop the argument to the OUT macro because it can't emit
anything but the pattern space anyway.  Apply style(9)
to the macro.

Tested with:	md5(1)
2007-06-12 12:17:25 +00:00
yar
64e06b67c3 Don't forget to clear out the hold space for each subsequent file
when in -i mode so that each file gets a clean context of its own.

Add a regression test for the bug.

Tested with:	regression tests
2007-06-12 12:05:24 +00:00
phk
36ecaa8cd6 Add cust_pkg() which iteratively tries to install packages.
Move /usr/local/etc to /etc/local so that installed packages can be frobbed.

Use a more compatible 512MB card geometry.
2007-06-12 11:35:29 +00:00
rrs
1cd5c5dd06 - Restructure so bindx functions are not done inline to socket option
but are a seperate call that can be re-used if needed.
- 64 bit issues
  o re-arrange cookie so it is better 64 bit aligned
  o For wire level things we need the packed attribute.
2007-06-12 11:21:00 +00:00
yar
59136b3a6d There is a symbolic antonym for REPLACE as a flag to cspace()
and mf_fgets(): APPEND.  So use it instead of a 0 constant for
clarity.

Tested with:	md5(1)
2007-06-12 10:56:38 +00:00
yongari
5589e856fb The maximum size of the sum of all segment lengths in a given DMA mapping
should be 65535 + link layer headers.

Pointed out by:	gallatin
2007-06-12 10:51:47 +00:00
thompsa
783e1d8e6f Catch up with variable name changes in struct lagg_protos. 2007-06-12 10:07:57 +00:00
philip
986e6a6dc5 Remove duplicate. Was that a bug? :-) 2007-06-12 09:20:31 +00:00
chinsan
be4b10f846 - add myself
Approved by:	rafan (mentor)
2007-06-12 09:05:06 +00:00
jeff
bc31b141bb - Move some common code out of sched_fork_exit() and back into fork_exit(). 2007-06-12 07:47:09 +00:00
thompsa
60f4b707fe non-functional cleanup
- remove dead code
- use consistent variable names
- gc unused defines
- whitespace cleanup
2007-06-12 07:29:11 +00:00
jeff
49712c9a60 Solve a complex exit race introduced with thread_lock:
- Add a count of exiting threads, p_exitthreads, to struct proc.
 - Increment p_exithreads when we set the deadthread in thread_exit().
 - When we thread_stash() a deadthread use an atomic to drop the count.
 - Spin until the p_exithreads count reaches 0 in thread_wait().
 - Lock the last exiting thread momentarily to be certain that it has
   exited cpu_throw().
 - Restructure thread_wait().  It does not need a loop as there will only
   ever be one thread.

Tested by:	moose@opera.com
Reported by:	kris, moose@opera.com
2007-06-12 07:24:46 +00:00
yongari
aa6c27d817 Nuke duplicated __FBSDID. 2007-06-12 04:33:21 +00:00
yongari
2eb43cb958 Add checks for contigmalloc(9) failure. 2007-06-12 04:30:30 +00:00
yongari
2255e968f3 Increase a maximum segment size of DMA to 4096. Previously it used
MCLBYTES for the segment size but it used too many Tx descriptors in
TSO case.
While I'm here adjust maximum size of the sum of all segment lengths
in a given DMA mapping to 65535, the maximum size, in bytes, of a IP
packet.
2007-06-12 02:35:01 +00:00
yongari
2e5bc7c310 Add nfe(4) to the list of drivers supported by GENERIC kernel.
While I'm here comment out nve(4) as nfe(4) will take over.

Approved by:	re
2007-06-12 02:24:30 +00:00
yongari
ab11941a15 Allow nfe(4) override nve(4). 2007-06-12 02:21:02 +00:00
yongari
10581f5bf9 Xref altq(4). 2007-06-12 02:19:56 +00:00
yongari
eae6e955ab nfe(4) supports altq(4). 2007-06-12 02:19:11 +00:00
yongari
ed1c784ed6 Add nfe(4) to the list of device drivers use the miibus interface. 2007-06-12 02:18:04 +00:00
yongari
36a63ea429 Bring overhauled nfe(4) into tree.
o s/printf/device_printf/g
o Nuke OpenBSDism.
o Nuke NetBSD/OpenBSD specific DMA sync operations.(we don't have a way
   to sync a single descriptor within a DMA map.)
o Remove recursive mutex.
o bus_dma(9) clean up.
o 40bit DMA address support.
o Add protection for Rx map load failure.
o Fix a long standing bug for watchdog timeout. [1]
o Add additional protections, missing Tx completion interrupt, losing
   start Tx command, for watchdog timeout.
o Switch to taskqueue(9) API to handle interrupts.
o Use our own timer for watchdog instead of if_watchdog/if_timer
   interface.
o Advertise VLAN header length/capability correctly to upper layer.
o Remove excessive kernel stack consumption in nfe_encap().
o Handle highly fragmented mbuf chains correctly.
o Enable etherenet address reprogramming with ifconfig(8).
o Add ALTQ/TSO, MSI/MSIX support.
o Increased Rx ring to 256 descriptors from 128.
o Align Tx/Rx descriptor ring on sizeof(struct nfe_desc64) boundary.
o Remove alignment restrictions on Tx/Rx buffers.
o Rewritten jumbo frame support code.
o Add support for hardware assistend VLAN tag insertion/stripping.
o Add support for Tx/Rx flow control based on patches from Peer Chen. [2]
o Add a routine that detects whether ethernet address swap routines is
   required. [3]
o Add a workaround that take MAC/PHY out of power down mode.
o Add suspend/resume support.
o style(9) and code clean up.

Special thanks to Shigeaki Tagashira, the original porter of nfe(4),
who submitted lots of patches, performed uncountable number of
regression tests and maintained nfe(4) for a long time. Without his
enthusiastic help and support I could never have completed this
overhauling task.

The only weak point of nfe(4) compared to nve(4) is instability of
manual half-duplex media selection on certain hardwares(auto sensing
media type should work for all cases, though). This was a long
standing bug of nfe(4) and I still have no idea why it doesn't work
on some hardwares.

Obtained from:	OpenBSD [1]
Submitted by:	Peer Chen < pchen at nvidia dot com > [2], [3]
Reviewed by:	Shigeaki Tagashira < shigeaki AT se DOT hiroshima-u DOT ac DOT jp >
Tested by:	Shigeaki Tagashira, current
Discussed with:	current
Silence from:	obrien
2007-06-12 02:16:02 +00:00
thompsa
ec6a039b62 Reset the pointer to the ioctl buffer after it gets changed. 2007-06-12 00:52:40 +00:00
rwatson
00b02345d4 Eliminate now-unused SUSER_ALLOWJAIL arguments to priv_check_cred(); in
some cases, move to priv_check() if it was an operation on a thread and
no other flags were present.

Eliminate caller-side jail exception checking (also now-unused); jail
privilege exception code now goes solely in kern_jail.c.

We can't yet eliminate suser() due to some cases in the KAME code where
a privilege check is performed and then used in many different deferred
paths.  Do, however, move those prototypes to priv.h.

Reviewed by:	csjp
Obtained from:	TrustedBSD Project
2007-06-12 00:12:01 +00:00
jeff
e93b04c286 - Add a missing PROC_SUNLOCK() in tdsignal() 2007-06-11 23:27:03 +00:00
rwatson
65d74ebe28 Clean up, and sometimes remove, a number of audit-related implementation
comments.

Obtained from:	TrutstedBSD Project
2007-06-11 22:10:54 +00:00
jeff
7806190211 - Move p_ru to the zero'd section of the proc to keep stats accurate. 2007-06-11 21:59:39 +00:00
cognet
0b1fdbaaca Add CPU_XSCALE_81342 before I forget again. 2007-06-11 21:31:13 +00:00
cognet
2349f48ce0 Introduce pmap_kenter_supersection(), which maps 16MB super-sections into
the kernel pmap.
Document a bit more the behavior of the xscale core 3.
2007-06-11 21:29:26 +00:00
cognet
72a3e057dd Re-acquire the PROC_SLOCK before calling calcru(), and release it after,
since calcru() expects it to be locked.

Reviewed by:	attilio
2007-06-11 21:05:41 +00:00
rrs
00f8f869d5 - Validate incoming addresses and sizes for connectx and bindx.
- For non-sys call version pass the msg_flags.
2007-06-11 21:05:29 +00:00
andre
b99cd15f4c Bump __FreeBSD_version for TCP LRO support. 2007-06-11 20:19:11 +00:00
andre
6955439784 Add reporting and toggling of TCP LRO (large receive offload) support to
ifconfig(8).
2007-06-11 20:15:20 +00:00
remko
5983912c3d Correct corrupt read when the read starts at a non-aligned offset.
PR:		kern/77234
MFC After:	1 week
Approved by:	imp (mentor)
Requested by:	many many people
Submitted by:	Andriy Gapon <avg at icyb dot net dot ua>
2007-06-11 20:14:44 +00:00
andre
1294243b09 Add IFCAP_LRO flag for drivers to announce their TCP Large Receive Offload
capabilities.
2007-06-11 20:08:11 +00:00
cognet
d3f2142580 Exclude inet_addr.c from the build.
It only provides inet_aton(), which is already provided by the libc. This
causes multiple symbol definitions when linking statically.

Reviewed by:    darrenr
2007-06-11 19:38:38 +00:00
imp
eed16ca559 Fix a spacing nit. 2007-06-11 19:36:37 +00:00
imp
a6f1d61f4a Prefer __packed to __attribute__((__packed__)).
OK'd by sam@ months ago...
2007-06-11 19:34:53 +00:00
thompsa
dab1ead4a7 Exclude wlan_scan_* from PAE like the rest of wlan. 2007-06-11 19:29:42 +00:00
mjacob
999a5051ab Remove some ioctls that were ill-thought out. There is no user
impact as no softwware using these ioctls was ever committed.

Redo locking for ispioctl.
2007-06-11 19:15:49 +00:00
gallatin
198a4b06fc Move the oversize ethernet frame size check into DIAGNOSTIC,
as was proposed when it was originally added.  This allows
LRO to work on non-DIAGNOSTIC kernels without consuming
any mbuf flags.

Discussed with: sam
2007-06-11 18:45:49 +00:00
ceri
1715307402 Create group ftp by default. This is gid 14 as this is the historical
id used by sysinstall when enabling anonymous FTP.

Change the default group used by sysinstall for setting up anonymous FTP
from operator to ftp; there is no reason to use operator and there are
potential security issues when doing so.

PR:		93284
Approved by:	ru (mentor)
Reviewed by:	simon
2007-06-11 18:36:39 +00:00
gallatin
4bd623e29b Back out the previous commit which added an M_LRO mbuf flag
to defeat the mtu check in ether_input.  Mbuf flags are too scarce.
Discussed with: sam
2007-06-11 18:26:25 +00:00
mjacob
65ecac1b1e Check against maxsegsz being zero in bus_dma_tag_create and return EINVAL
if it is.

Reviewed by:	scott long
2007-06-11 17:57:24 +00:00
mjacob
81c02b19a4 Only try and set a segment lim size to 1 << 32 iff bus_size_t > 4. 2007-06-11 17:56:17 +00:00