summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Import rewrite of IPv4 socket multicast layer to support source-specificbms2007-06-1219-716/+2230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate fromimp2007-06-1233-137/+130
| | | | usb_port.h. They aren't needed, and are a legacy of this code's past.
* - Restructure so bindx functions are not done inline to socket optionrrs2007-06-1210-240/+296
| | | | | | | 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.
* The maximum size of the sum of all segment lengths in a given DMA mappingyongari2007-06-122-2/+2
| | | | | | should be 65535 + link layer headers. Pointed out by: gallatin
* - Move some common code out of sched_fork_exit() and back into fork_exit().jeff2007-06-123-30/+20
|
* non-functional cleanupthompsa2007-06-124-142/+108
| | | | | | | - remove dead code - use consistent variable names - gc unused defines - whitespace cleanup
* Solve a complex exit race introduced with thread_lock:jeff2007-06-122-15/+34
| | | | | | | | | | | | | | - 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
* Nuke duplicated __FBSDID.yongari2007-06-121-4/+0
|
* Add checks for contigmalloc(9) failure.yongari2007-06-121-0/+10
|
* Increase a maximum segment size of DMA to 4096. Previously it usedyongari2007-06-122-2/+4
| | | | | | | | 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.
* Add nfe(4) to the list of drivers supported by GENERIC kernel.yongari2007-06-122-2/+4
| | | | | | While I'm here comment out nve(4) as nfe(4) will take over. Approved by: re
* Allow nfe(4) override nve(4).yongari2007-06-121-1/+1
|
* Bring overhauled nfe(4) into tree.yongari2007-06-123-909/+2103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Eliminate now-unused SUSER_ALLOWJAIL arguments to priv_check_cred(); inrwatson2007-06-1244-258/+144
| | | | | | | | | | | | | | | 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
* - Add a missing PROC_SUNLOCK() in tdsignal()jeff2007-06-111-1/+3
|
* Clean up, and sometimes remove, a number of audit-related implementationrwatson2007-06-113-32/+3
| | | | | | comments. Obtained from: TrutstedBSD Project
* - Move p_ru to the zero'd section of the proc to keep stats accurate.jeff2007-06-111-1/+1
|
* Add CPU_XSCALE_81342 before I forget again.cognet2007-06-111-1/+2
|
* Introduce pmap_kenter_supersection(), which maps 16MB super-sections intocognet2007-06-113-2/+97
| | | | | the kernel pmap. Document a bit more the behavior of the xscale core 3.
* Re-acquire the PROC_SLOCK before calling calcru(), and release it after,cognet2007-06-111-0/+2
| | | | | | since calcru() expects it to be locked. Reviewed by: attilio
* Bump __FreeBSD_version for TCP LRO support.andre2007-06-111-1/+1
|
* Correct corrupt read when the read starts at a non-aligned offset.remko2007-06-111-4/+6
| | | | | | | | 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>
* Add IFCAP_LRO flag for drivers to announce their TCP Large Receive Offloadandre2007-06-111-0/+1
| | | | capabilities.
* Fix a spacing nit.imp2007-06-111-1/+0
|
* Prefer __packed to __attribute__((__packed__)).imp2007-06-111-1/+1
| | | | OK'd by sam@ months ago...
* Exclude wlan_scan_* from PAE like the rest of wlan.thompsa2007-06-111-0/+2
|
* Remove some ioctls that were ill-thought out. There is no usermjacob2007-06-112-128/+14
| | | | | | impact as no softwware using these ioctls was ever committed. Redo locking for ispioctl.
* Move the oversize ethernet frame size check into DIAGNOSTIC,gallatin2007-06-111-0/+2
| | | | | | | | 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
* Back out the previous commit which added an M_LRO mbuf flaggallatin2007-06-113-5/+2
| | | | | to defeat the mtu check in ether_input. Mbuf flags are too scarce. Discussed with: sam
* Check against maxsegsz being zero in bus_dma_tag_create and return EINVALmjacob2007-06-112-0/+8
| | | | | | if it is. Reviewed by: scott long
* Only try and set a segment lim size to 1 << 32 iff bus_size_t > 4.mjacob2007-06-111-2/+6
|
* Silence a gcc warning in a more canonical way (evl = NULL rather than &evl).imp2007-06-111-2/+1
| | | | I saw warnings here at one point on the arm build.
* Allow drivers, such as cxgb and mxge, which support LRO to bypassgallatin2007-06-113-2/+5
| | | | | | the MTU check in ether_input() on LRO merged frames. Discussed with: kmacy
* Small LRO related fixes for mxge:gallatin2007-06-112-5/+39
| | | | | | | - Allow LRO to be enabled / disabled at runtime - Fix a double-free at module unload time. - Only update timestamp in lro merge when it is present in the frame Sponsored by: Myricom
* Add missing \n to printfphk2007-06-111-1/+1
|
* MFp4 (missed in net80211 megaupdate)thompsa2007-06-112-7/+25
| | | | | | | | - Use a seperate taskqueue+thread for reset tasks since iwi_ops will block. - Return from iwi_ops if the interface has been downed - The firmware will fail if we are already associated - Add myself to the copyright
* Add wlan_scan_ap and wlan_scan_sta to platforms that include wlan.thompsa2007-06-114-0/+8
|
* Add new files in the net80211 changes.thompsa2007-06-111-1/+3
|
* Expand DECLARE_USB_DMA_T inline in the one place it is used and eliminateimp2007-06-112-9/+6
| | | | from usb_port.h.
* Eliminate USB_ATTACH_SETUP and USB_MATCH_SETUP. They are no longer inimp2007-06-111-9/+0
| | | | the tree.
* Prefer device_printf over printf.imp2007-06-112-45/+34
|
* Minor tweak.imp2007-06-111-4/+2
|
* Prefer device_printf to printfimp2007-06-111-44/+41
| | | | | | Eliminate rue_unit from softc # saves ~200 bytes
* Prefer device_printf to printfimp2007-06-112-40/+36
| | | | | | Remove keu_unit from softc # this change saves about 180 bytes in the module, all in text
* Get rid of useless devinfo stuffimp2007-06-111-40/+28
| | | | | | | Kill bogus bzero prefer device_printf to printf Reviewed by: alfred@
* Prefer device_printf to printf where sane.imp2007-06-112-33/+29
| | | | Elimiante cue_unit from softc.
* - Don't force to be the GDB port since dcons(4) is in GENERIC now.simokawa2007-06-111-1/+5
| | | | | | To enable the GDB port of dcons(4), you need to put dcons_gdb=1 in /boot/loader.conf.
* Update 802.11 wireless support:sam2007-06-1169-4853/+13028
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o major overhaul of the way channels are handled: channels are now fully enumerated and uniquely identify the operating characteristics; these changes are visible to user applications which require changes o make scanning support independent of the state machine to enable background scanning and roaming o move scanning support into loadable modules based on the operating mode to enable different policies and reduce the memory footprint on systems w/ constrained resources o add background scanning in station mode (no support for adhoc/ibss mode yet) o significantly speedup sta mode scanning with a variety of techniques o add roaming support when background scanning is supported; for now we use a simple algorithm to trigger a roam: we threshold the rssi and tx rate, if either drops too low we try to roam to a new ap o add tx fragmentation support o add first cut at 802.11n support: this code works with forthcoming drivers but is incomplete; it's included now to establish a baseline for other drivers to be developed and for user applications o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates prepending mbufs for traffic generated locally o add support for Atheros protocol extensions; mainly the fast frames encapsulation (note this can be used with any card that can tx+rx large frames correctly) o add sta support for ap's that beacon both WPA1+2 support o change all data types from bsd-style to posix-style o propagate noise floor data from drivers to net80211 and on to user apps o correct various issues in the sta mode state machine related to handling authentication and association failures o enable the addition of sta mode power save support for drivers that need net80211 support (not in this commit) o remove old WI compatibility ioctls (wicontrol is officially dead) o change the data structures returned for get sta info and get scan results so future additions will not break user apps o fixed tx rate is now maintained internally as an ieee rate and not an index into the rate set; this needs to be extended to deal with multi-mode operation o add extended channel specifications to radiotap to enable 11n sniffing Drivers: o ath: add support for bg scanning, tx fragmentation, fast frames, dynamic turbo (lightly tested), 11n (sniffing only and needs new hal) o awi: compile tested only o ndis: lightly tested o ipw: lightly tested o iwi: add support for bg scanning (well tested but may have some rough edges) o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data o wi: lightly tested This work is based on contributions by Atheros, kmacy, sephe, thompsa, mlaier, kevlo, and others. Much of the scanning work was supported by Atheros. The 11n work was supported by Marvell.
* Conditionally acquire Giant in vm_contig_launder_page().alc2007-06-111-0/+4
|
* Connect icsphy(4) to the build.yongari2007-06-112-1/+2
|
OpenPOWER on IntegriCloud