summaryrefslogtreecommitdiffstats
path: root/sys/contrib
Commit message (Collapse)AuthorAgeFilesLines
* Update packet filter (pf) code to OpenBSD 4.5.bz2011-06-2817-5717/+9003
| | | | | | | | You need to update userland (world and ports) tools to be in sync with the kernel. Submitted by: mlaier Submitted by: eri
* Add _mbuf() variants of various inpcb-related interfaces, including lookup,rwatson2011-06-041-0/+8
| | | | | | | | | | | | | | | | | | hash install, etc. For now, these are arguments are unused, but as we add RSS support, we will want to use hashes extracted from mbufs, rather than manually calculated hashes of header fields, due to the expensive of the software version of Toeplitz (and similar hashes). Add notes that it would be nice to be able to pass mbufs into lookup routines in pf(4), optimising firewall lookup in the same way, but the code structure there doesn't facilitate that currently. (In principle there is no reason this couldn't be MFCed -- the change extends rather than modifies the KBI. However, it won't be useful without other previous possibly less MFCable changes.) Reviewed by: bz Sponsored by: Juniper Networks, Inc.
* Merge ACPICA 20110527.jkim2011-05-3114-83/+658
|
* Remove some further INET related symbols from pf to allow the modulebz2011-05-313-1/+14
| | | | | | | | | | | to not only compile bu load as well for testing with IPv6-only kernels. For the moment we ignore the csum change in pf_ioctl.c given the pending update to pf45. Reported by: dru Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 20 days
* Decompose the current single inpcbinfo lock into two locks:rwatson2011-05-301-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The existing ipi_lock continues to protect the global inpcb list and inpcb counter. This lock is now relegated to a small number of allocation and free operations, and occasional operations that walk all connections (including, awkwardly, certain UDP multicast receive operations -- something to revisit). - A new ipi_hash_lock protects the two inpcbinfo hash tables for looking up connections and bound sockets, manipulated using new INP_HASH_*() macros. This lock, combined with inpcb locks, protects the 4-tuple address space. Unlike the current ipi_lock, ipi_hash_lock follows the individual inpcb connection locks, so may be acquired while manipulating a connection on which a lock is already held, avoiding the need to acquire the inpcbinfo lock preemptively when a binding change might later be required. As a result, however, lookup operations necessarily go through a reference acquire while holding the lookup lock, later acquiring an inpcb lock -- if required. A new function in_pcblookup() looks up connections, and accepts flags indicating how to return the inpcb. Due to lock order changes, callers no longer need acquire locks before performing a lookup: the lookup routine will acquire the ipi_hash_lock as needed. In the future, it will also be able to use alternative lookup and locking strategies transparently to callers, such as pcbgroup lookup. New lookup flags are, supplementing the existing INPLOOKUP_WILDCARD flag: INPLOOKUP_RLOCKPCB - Acquire a read lock on the returned inpcb INPLOOKUP_WLOCKPCB - Acquire a write lock on the returned inpcb Callers must pass exactly one of these flags (for the time being). Some notes: - All protocols are updated to work within the new regime; especially, TCP, UDPv4, and UDPv6. pcbinfo ipi_lock acquisitions are largely eliminated, and global hash lock hold times are dramatically reduced compared to previous locking. - The TCP syncache still relies on the pcbinfo lock, something that we may want to revisit. - Support for reverting to the FreeBSD 7.x locking strategy in TCP input is no longer available -- hash lookup locks are now held only very briefly during inpcb lookup, rather than for potentially extended periods. However, the pcbinfo ipi_lock will still be acquired if a connection state might change such that a connection is added or removed. - Raw IP sockets continue to use the pcbinfo ipi_lock for protection, due to maintaining their own hash tables. - The interface in6_pcblookup_hash_locked() is maintained, which allows callers to acquire hash locks and perform one or more lookups atomically with 4-tuple allocation: this is required only for TCPv6, as there is no in6_pcbconnect_setup(), which there should be. - UDPv6 locking remains significantly more conservative than UDPv4 locking, which relates to source address selection. This needs attention, as it likely significantly reduces parallelism in this code for multithreaded socket use (such as in BIND). - In the UDPv4 and UDPv6 multicast cases, we need to revisit locking somewhat, as they relied on ipi_lock to stablise 4-tuple matches, which is no longer sufficient. A second check once the inpcb lock is held should do the trick, keeping the general case from requiring the inpcb lock for every inpcb visited. - This work reminds us that we need to revisit locking of the v4/v6 flags, which may be accessed lock-free both before and after this change. - Right now, a single lock name is used for the pcbhash lock -- this is undesirable, and probably another argument is required to take care of this (or a char array name field in the pcbinfo?). This is not an MFC candidate for 8.x due to its impact on lookup and locking semantics. It's possible some of these issues could be worked around with compatibility wrappers, if necessary. Reviewed by: bz Sponsored by: Juniper Networks, Inc.
* Make pf compile without INET support by adding #ifdef INETs andbz2011-04-273-4/+16
| | | | | | | | | correcting few #includes. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 4 days
* Add firmware images for the 6000 series g2a and g2b adapters.bschmidt2011-04-202-0/+15961
|
* Update iwn(4) firmware blobs:bschmidt2011-04-206-20335/+20265
| | | | | | - bump iwn1000fw to 39.31.5.1 - bump iwn5000fw to 8.83.5.1 - bump iwn6050fw to 41.28.5.1
* Re-merge with ACPICA vendor source.jkim2011-04-154-76/+75
|
* Merge ACPICA 20110413.jkim2011-04-1545-1166/+1947
|\
* | Use atomic load & store for TSC frequency. It may be overkill for amd64 butjkim2011-04-071-2/+3
| | | | | | | | | | | | | | | | | | safer for i386 because it can be easily over 4 GHz now. More worse, it can be easily changed by user with 'machdep.tsc_freq' tunable (directly) or cpufreq(4) (indirectly). Note it is intentionally not used in performance critical paths to avoid performance regression (but we should, in theory). Alternatively, we may add "virtual TSC" with lower frequency if maximum frequency overflows 32 bits (and ignore possible incoherency as we do now).
* | Merge ACPICA 20110316.jkim2011-03-1716-69/+610
| |
* | o) Clean up FPA pools on module unload.jmallett2011-03-161-0/+13
| | | | | | | | | | | | o) Allocate output buffer pool based on available output queues. Submitted by: Bhanu Prakash (with modifications)
* | Deprecate tsc_present as the last of its real consumers finally disappeared.jkim2011-03-151-3/+5
| |
* | Add a tunable "machdep.disable_tsc" to turn off TSC. Specifically, it turnsjkim2011-03-111-2/+2
| | | | | | | | | | off boot-time CPU frequency calibration, DELAY(9) with TSC, and using TSC as a CPU ticker. Note tsc_present does not change by this tunable.
* | Deprecate rarely used tsc_is_broken. Instead, we zero out tsc_freq becausejkim2011-03-101-5/+6
| | | | | | | | it is almost always used with tsc_freq any way.
* | Remove alpha reminiscence from altq.jkim2011-03-101-47/+2
| |
* | Consistently add TSC support for amd64.jkim2011-03-101-6/+7
| |
* | Remove support for FreeBSD 4.x and below.jkim2011-03-1010-57/+8
| |
* | Merge ACPICA 20110211.jkim2011-02-1247-5483/+7125
|\ \ | |/
* | Correct bogus initialization. It should be noted that this changecsjp2011-01-141-1/+1
| | | | | | | | | | | | | | | | | | has been corrected in the vendor branch, but for now, silence clang warnings. Found by: clang Discussed with: mlaier MFC after: 1 week
* | Merge ACPICA 20110112. Switch to BSD/GPLv2 dual license[1].jkim2011-01-13236-24796/+8855
|\ \ | |/ | | | | Discussed with: core [1]
* | o) Expand the CIU driver to be aware of newly-allocated parts of the IRQ range.jmallett2011-01-103-7/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o) Add 'octm', a trivial driver for the 10/100 management ports found on some Octeon systems. o) Make the Simple Executive's management port helper routines compile on FreeBSD (namely by not doing math on void pointers.) o) Add a cvmx_mgmt_port_sendm routine to the Simple Executive to send an mbuf so there is only one copy in the transmit path, rather than having to first copy the mbuf to an intermediate buffer and then copy that to the Simple Executive's transmit ring. o) Properly work out MII addresses of management ports on the Lanner MR-730. XXX The MR-730 also needs some patches to the MII read/write routines, but this is sufficient for now. Media detection will be fixed in the future when I can spend more time reading the vendor-supplied patches.
* | Update firmware for wpi(4) from version 2.14.4 to 15.32.2.9.bschmidt2010-12-193-2629/+2637
| | | | | | | | | | | | PR: kern/142907 Submitted by: Craig Butler <craig001 at lerwick.hopto.org> MFC after: 2 weeks
* | o) Add support for the Lanner MR-321X/MR-325, which is just a modified MR-320.jmallett2010-12-164-1/+16
| | | | | | | | o) On the Lanner MR-730, disable PCIe lane swap, per vendor.
* | Merge ACPICA 20101209.jkim2010-12-1530-1357/+1786
|\ \ | |/
* | Merge Cavium Octeon SDK 2.0 Simple Executive; this brings some fixes and newjmallett2010-11-28259-126603/+278322
| | | | | | | | | | | | | | facilities as well as support for the Octeon 2 family of SoCs. XXX Note that with our antediluvian assembler, we can't support some Octeon 2 instructions and fall back to using the old ones instead.
* | o) Recognize the Lanner MR-730.jmallett2010-11-083-3/+21
| | | | | | | | | | | | | | | | o) Fix enumeration of PHY addresses on the MR-955. o) Parse link state for the MR-730 using the Broadcom PHY support in the SDK. It's not clear that this is entirely-correct, but it seems to work. Since this board uses a BCM5482S, this may mean that we work correctly for copper but not SFI, which is untested.
* | Merge ACPICA 20101013.jkim2010-10-1330-502/+904
|\ \ | |/
* | Ignore the return value of ADDCARRY().rpaulo2010-10-131-1/+1
| |
* | Properly tell the compiler that we want to ignore the return value ofrpaulo2010-10-134-15/+15
| | | | | | | | certain macros.
* | Fix several cases were a conditional operator was used instead of arpaulo2010-10-131-8/+8
| | | | | | | | | | | | bitwise operator. Found with: clang
* | Pass a format string to make_dev().rpaulo2010-10-131-1/+1
| | | | | | | | Found by: clang
* | o) Allow devices to override the MDIO read and write functions presented tojmallett2010-10-021-2/+3
| | | | | | | | | | | | | | | | the miibus attached to octe interfaces. o) Add an SMI/MDIO interface to the MV88E61XX and use it for the switch PHY on the Lanner MR-320. An actual driver for the switch PHY will come later. Note that for now it intercepts and fakes MII_BMSR reads to prevent the miibus from talking to anything but the switch itself.
* | Add preliminary support for the Lanner MR-955. It boots multi-user but therejmallett2010-09-195-0/+45
| | | | | | | | | | | | | | seem to be problems both with the on-board Ethernet interfaces and the em(4) interfaces on PCI under FreeBSD. Thanks to Lanner for providing access to hardware.
* | Merge ACPICA 20100915.jkim2010-09-1649-537/+1593
|\ \ | |/
* | When using pf routing options, properly handle IP fragmentationbz2010-09-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | for interfaces with TSO enabled, otherwise one would see an extra ICMP unreach, frag needed pre matching packet on lo0. This syncs pf code to ip_output.c r162084. PR: kern/144311 Submitted by: yongari via mlaier Reviewed by: eri Tested by: kib MFC after: 8 days
* | Merge ACPICA 20100806.jkim2010-08-0628-288/+1208
|\ \ | |/
* | Update the port of FreeBSD to Cavium Octeon to use the Cavium Simple Executivejmallett2010-07-2028-56/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | library: o) Increase inline unit / large function growth limits for MIPS to accommodate the needs of the Simple Executive, which uses a shocking amount of inlining. o) Remove TARGET_OCTEON and use CPU_CNMIPS to do things required by cnMIPS and the Octeon SoC. o) Add OCTEON_VENDOR_LANNER to use Lanner's allocation of vendor-specific board numbers, specifically to support the MR320. o) Add OCTEON_BOARD_CAPK_0100ND to hard-wire configuration for the CAPK-0100nd, which improperly uses an evaluation board's board number and breaks board detection at runtime. This board is sold by Portwell as the CAM-0100. o) Add support for the RTC available on some Octeon boards. o) Add support for the Octeon PCI bus. Note that rman_[sg]et_virtual for IO ports can not work unless building for n64. o) Clean up the CompactFlash driver to use Simple Executive macros and structures where possible (it would be advisable to use the Simple Executive API to set the PIO mode, too, but that is not done presently.) Also use structures from FreeBSD's ATA layer rather than structures copied from Linux. o) Print available Octeon SoC features on boot. o) Add support for the Octeon timecounter. o) Use the Simple Executive's routines rather than local copies for doing reads and writes to 64-bit addresses and use its macros for various device addresses rather than using local copies. o) Rename octeon_board_real to octeon_is_simulation to reduce differences with Cavium-provided code originally written for Linux. Also make it use the same simplified test that the Simple Executive and Linux both use rather than our complex one. o) Add support for the Octeon CIU, which is the main interrupt unit, as a bus to use normal interrupt allocation and setup routines. o) Use the Simple Executive's bootmem facility to allocate physical memory for the kernel, rather than assuming we know which addresses we can steal. NB: This may reduce the amount of RAM the kernel reports you as having if you are leaving large temporary allocations made by U-Boot allocated when starting FreeBSD. o) Add a port of the Cavium-provided Ethernet driver for Linux. This changes Ethernet interface naming from rgmxN to octeN. The new driver has vast improvements over the old one, both in performance and functionality, but does still have some features which have not been ported entirely and there may be unimplemented code that can be hit in everyday use. I will make every effort to correct those as they are reported. o) Support loading the kernel on non-contiguous cores. o) Add very conservative support for harvesting randomness from the Octeon random number device. o) Turn SMP on by default. o) Clean up the style of the Octeon kernel configurations a little and make them compile with -march=octeon. o) Add support for the Lanner MR320 and the CAPK-0100nd to the Simple Executive. o) Modify the Simple Executive to build on FreeBSD and to build without executive-config.h or cvmx-config.h. In the future we may want to revert part of these changes and supply executive-config.h and cvmx-config.h and access to the options contained in those files via kernel configuration files. o) Modify the Simple Executive USB routines to support getting and setting of the USB PID.
* | Import the Cavium Simple Executive from the Cavium Octeon SDK. The Simplejmallett2010-07-20157-0/+222515
| | | | | | | | | | | | Executive is a library that can be used by standalone applications and kernels to abstract access to Octeon SoC and board-specific hardware and facilities. The FreeBSD port to Octeon will be updated to use this where possible.
* | - Update 6000 firmware to 9.221.4.1bschmidt2010-07-153-8152/+16193
| | | | | | | | | | | | - Add 6050 firmware MFC after: 2 weeks
* | Merge ACPICA 20100702.jkim2010-07-06100-1498/+8532
|\ \ | |/
* | Provide kernel level headers for the libfdt code.raj2010-06-021-0/+8
| | | | | | | | | | Reviewed by: imp Sponsored by: The FreeBSD Foundation
* | Sync run(4) driver from author's site.thompsa2010-05-131-151/+158
| | | | | | | | | | Submitted by: Akinori Furukoshi Obtained from: git://gitorious.org/run/run.git
* | MFP4: @176978-176982, 176984, 176990-176994, 177441bz2010-04-291-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Whitspace" churn after the VIMAGE/VNET whirls. Remove the need for some "init" functions within the network stack, like pim6_init(), icmp_init() or significantly shorten others like ip6_init() and nd6_init(), using static initialization again where possible and formerly missed. Move (most) variables back to the place they used to be before the container structs and VIMAGE_GLOABLS (before r185088) and try to reduce the diff to stable/7 and earlier as good as possible, to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9. This also removes some header file pollution for putatively static global variables. Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are no longer needed. Reviewed by: jhb Discussed with: rwatson Sponsored by: The FreeBSD Foundation Sponsored by: CK Software GmbH MFC after: 6 days
* | Merge ACPICA 20100428.jkim2010-04-2845-3908/+6034
|\ \ | |/
* | We don't need the definition for in_cksum repeated here since we getimp2010-04-141-1/+0
| | | | | | | | | | | | | | it from machine/in_cksum.h. This definition prevents us from using hand-tuned assembler versions of in_cksum. # this fixes the modules build on arm for ipfilter.
* | Update firmware for the 6000 series Intel cards to version 9.193.4.1.bschmidt2010-04-103-8142/+8182
| | | | | | | | | | Approved by: rpaulo (mentor) MFC after: 2 weeks
* | Merge ACPICA 20100331 (and four additional upstream patches).jkim2010-04-0228-566/+831
| |
* | Integrate OpenBSD rev 1.5 of x86emu.c.delphij2010-03-091-143/+205
| |
OpenPOWER on IntegriCloud