summaryrefslogtreecommitdiffstats
path: root/share/man/man9
Commit message (Collapse)AuthorAgeFilesLines
* crypto(9) is called from ipsec in CRYPTO_F_CBIFSYNC mode. This is workingfabient2018-01-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | fine when a lot of different flows to be ciphered/deciphered are involved. However, when a software crypto driver is used, there are situations where we could benefit from making crypto(9) multi threaded: - a single flow is to be ciphered: only one thread is used to cipher it, - a single ESP flow is to be deciphered: only one thread is used to decipher it. The idea here is to call crypto(9) using a new mode (CRYPTO_F_ASYNC) to dispatch the crypto jobs on multiple threads, if the underlying crypto driver is working in synchronous mode. Another flag is added (CRYPTO_F_ASYNC_KEEPORDER) to make crypto(9) dispatch the crypto jobs in the order they are received (an additional queue/thread is used), so that the packets are reinjected in the network using the same order they were posted. A new sysctl net.inet.ipsec.async_crypto can be used to activate this new behavior (disabled by default). Submitted by: Emeric Poupon <emeric.poupon@stormshield.eu> Reviewed by: ae, jmg, jhb Differential Revision: https://reviews.freebsd.org/D10680 Sponsored by: Stormshield (cherry picked from commit fbc9da5dbe50b72a335de7a27b6834fba8ee3cf0)
* Add config_intrhook_oneshot(): schedule an intrhook function and unregisterian2017-10-172-4/+20
| | | | | | | | | | | | | | | | | | | it automatically after it runs. The config_intrhook mechanism allows a driver to stall the boot process until device(s) required for booting are available, by not allowing system inits to proceed until all intrhook functions have been unregistered. Virtually all existing code simply unregisters from within the hook function when it gets called. This new function makes that common usage more convenient. Instead of allocating and filling in a struct, passing it to a function that might (in theory) fail, and checking the return code, now a driver can simply call this cannot-fail routine, passing just the intrhook function and its arg. Differential Revision: https://reviews.freebsd.org/D11963 (cherry picked from commit 3dabf0d77785be405b3aa27de0590c5addd533dc)
* MFC r318781:kib2017-06-071-1/+112
| | | | | | Add BIT_OR2(), BIT_AND2(), BIT_NAND2(), BIT_XOR() and BIT_XOR2(). Approved by: re (marius)
* MFC r318794, r318795:gjb2017-05-271-2/+2
| | | | | | Update the "first appeared in" version in several manual pages. Sponsored by: The FreeBSD Foundation
* MFC r306773:bdrewery2017-05-091-1/+2
| | | | Add link for vrefl(9).
* Merge r317444, r317445:glebius2017-04-292-16/+1
| | | | | | | UMA_ZONE_REFCNT was removed. PR: 209715 PR: 218887
* MFC r316057:trasz2017-04-232-14/+32
| | | | | | Document EVENTHANDLER_DEFINE(9). Sponsored by: DARPA, AFRL
* MFC r316056:trasz2017-04-231-2/+1
| | | | | | The cn_consume was removed in r296716. Sponsored by: DARPA, AFRL
* MFC r315798:ngie2017-03-301-1/+3
| | | | | | DB_COMMAND(9): fix mandoc markup Start new sentences on new lines.
* MFC r315795:ngie2017-03-301-2/+2
| | | | | | alq(9): fix mandoc markup Start new sentence on a new line.
* MFC r315803:ngie2017-03-301-3/+3
| | | | | | | memguard(9): fix igor/manlint warnings - Expand a contraction [1]. - Add a missing section number when referring to uma(9) with .Xr .
* MFC r315802:ngie2017-03-301-4/+4
| | | | | | | ifnet(9): fix some igor/manlint warnings - Fix typos (queueing -> queuing) [1]. - Add missing section number for polling .Xr reference [2].
* MFC r315804:ngie2017-03-302-4/+4
| | | | | | | PCI_IOV_*INIT(9): fix make manlint warnings Add missing section number when referring to PCI_IOV_*INIT(9) with .Xr from the other corresponding manpage.
* MFC r315797:ngie2017-03-301-1/+1
| | | | | | | buf_ring(9): fix mandoc markup Remove spurious trailing comma after `buf_ring_peek` in the NAME section.
* MFC r315796:ngie2017-03-301-1/+1
| | | | | | bus_alloc_resource(9): fix mandoc markup Add missing comma after `.Nm bus_alloc_resource_any` in NAME section.
* MFC r315280 r315287vangyzen2017-03-291-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the RTC is adjusted, reevaluate absolute sleep times based on the RTC POSIX 2008 says this about clock_settime(2): If the value of the CLOCK_REALTIME clock is set via clock_settime(), the new value of the clock shall be used to determine the time of expiration for absolute time services based upon the CLOCK_REALTIME clock. This applies to the time at which armed absolute timers expire. If the absolute time requested at the invocation of such a time service is before the new value of the clock, the time service shall expire immediately as if the clock had reached the requested time normally. Setting the value of the CLOCK_REALTIME clock via clock_settime() shall have no effect on threads that are blocked waiting for a relative time service based upon this clock, including the nanosleep() function; nor on the expiration of relative timers based upon this clock. Consequently, these time services shall expire when the requested relative interval elapses, independently of the new or old value of the clock. When the real-time clock is adjusted, such as by clock_settime(3), wake any threads sleeping until an absolute real-clock time. Such a sleep is indicated by a non-zero td_rtcgen. The sleep functions will set that field to zero and return zero to tell the caller to reevaluate its sleep duration based on the new value of the clock. At present, this affects the following functions: pthread_cond_timedwait(3) pthread_mutex_timedlock(3) pthread_rwlock_timedrdlock(3) pthread_rwlock_timedwrlock(3) sem_timedwait(3) sem_clockwait_np(3) I'm working on adding clock_nanosleep(2), which will also be affected. Reported by: Sebastian Huber <sebastian.huber@embedded-brains.de> Relnotes: yes Sponsored by: Dell EMC
* MFC r313436,r313437,r313438,r314587,r315687:ngie2017-03-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r313436: Clarify #includes for hexdump(3) vs sbuf_hexdump(9) hexdump(3) only requires libutil.h, whereas sbuf_hexdump(9) requires sys/types.h (for ssize_t) and sys/sbuf.h r313437: Create link from hexdump(3) to sbuf_hexdump(9) as the manpage describes sbuf_hexdump(9)'s behavior r313438: Clean up trailing and leading whitespace for variables to make it consistent with the rest of the file and style.Makefile(9) a bit more r314587: Correct MLINKS for sbuf_hexdump(9) sbuf_hexdump(9) should be linked to sbuf(9), not hexdump(3). Another review will be posted to deduplicate the sbuf_hexdump reference in in hexdump(3) or at the very least make the information less duplicative. r315687: Document sbuf_hexdump(9) in just sbuf(9) - Remove duplicate references to sbuf_hexdump(9) from hexdump(3). sbuf_hexdump(9) already pointed back to hexdump(3) for implementation details. - Refer to sbuf_hexdump(9) instead of sbuf(9) for completeness
* MFC r311168,r311171:mjg2017-03-161-1/+57
| | | | | | | | | | | | | Add the upcoming atomic_fcmpset family to the atomic(9) man page. These primitives give the caller the read value if the exchange attempt failed which saves an explicit reload for cmpset loops. The man page was partially submitted by kib. == Fix typo
* MFC r302548:yongari2017-01-181-13/+1
| | | | | | | | Belatedly remove CSUM_IP_FRAGS and CSUM_FRAGMENT offloading capabilities. It was removed in r243624 and r254804/r271006 respectively. This file and mbuf(9) needs updates for other offloading capabilities(i.e. CSUM_SCTP and CSUM_TSO).
* MFC r308637:trasz2016-12-191-43/+23
| | | | Fix function prototypes in usbdi(9) man page, and tweak it a little.
* MFC r307000, r307001:avos2016-10-153-12/+5
| | | | | | | | | mbuf(9), mbuf_tags(9): fix function prototypes. - Add m_getclr(9) symlink to ObsoleteFiles.inc (removed in r295481). - Add const qualifiers in m_dup(), m_dup_pkthdr() and m_tag_copy_chain() (r286450). - Fix m_dup_pkthdr() definition (it's not the same as m_move_pkthdr()).
* MFC r306441 and r306634:hselasky2016-10-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | While draining a timeout task prevent the taskqueue_enqueue_timeout() function from restarting the timer. Commonly taskqueue_enqueue_timeout() is called from within the task function itself without any checks for teardown. Then it can happen the timer stays active after the return of taskqueue_drain_timeout(), because the timeout and task is drained separately. This patch factors out the teardown flag into the timeout task itself, allowing existing code to stay as-is instead of applying a teardown flag to each and every of the timeout task consumers. Add assert to taskqueue_drain_timeout() which prevents parallel execution on the same timeout task. Update manual page documenting the return value of taskqueue_enqueue_timeout(). Differential Revision: https://reviews.freebsd.org/D8012 Reviewed by: kib, trasz
* MFC 305751: Make device_quiet() an attachment property.jhb2016-09-301-6/+8
| | | | | | | | In particular, reset the DF_QUIET flag when detaching from a device so that a driver that marks a device quiet doesn't dictate policy for a different driver that may claim the device in the future. Sponsored by: Chelsio Communications
* MFC 305502: Reset PCI pass through devices via PCI-e FLR during VM start/end.jhb2016-09-302-0/+102
| | | | | | | | | | | | Add routines to trigger a function level reset (FLR) of a PCI-express device via the PCI-express device control register. This also includes support routines to wait for pending transactions to complete as well as calculating the maximum completion timeout permitted by a device. Change the ppt(4) driver to reset pass through devices before attaching to a VM during startup and before detaching from a VM during shutdown. Sponsored by: Chelsio Communications
* MFC 304858,305485,305497: Fix various issues with PCI pass through and VT-d.jhb2016-09-301-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 304858: Enable I/O MMU when PCI pass through is first used. Rather than enabling the I/O MMU when the vmm module is loaded, defer initialization until the first attempt to pass a PCI device through to a guest. If the I/O MMU fails to initialize or is not present, than fail the attempt to pass a PCI device through to a guest. The hw.vmm.force_iommu tunable has been removed since the I/O MMU is no longer enabled during boot. However, the I/O MMU support can be disabled by setting the hw.vmm.iommu.enable tunable to 0 to prevent use of the I/O MMU on any systems where it is buggy. 305485: Leave ppt devices in the host domain when they are not attached to a VM. This allows a pass through device to be reset to a normal device driver on the host and reused on the host. ppt devices are now always active in some I/O MMU domain when the I/O MMU is active, either the host domain or the domain of a VM they are attached to. 305497: Update the I/O MMU in bhyve when PCI devices are added and removed. When the I/O MMU is active in bhyve, all PCI devices need valid entries in the DMAR context tables. The I/O MMU code does a single enumeration of the available PCI devices during initialization to add all existing devices to a domain representing the host. The ppt(4) driver then moves pass through devices in and out of domains for virtual machines as needed. However, when new PCI devices were added at runtime either via SR-IOV or HotPlug, the I/O MMU tables were not updated. This change adds a new set of EVENTHANDLERS that are invoked when PCI devices are added and deleted. The I/O MMU driver in bhyve installs handlers for these events which it uses to add and remove devices to the "host" domain. Sponsored by: Chelsio Communications
* MFC 305248: Remove warning about pci_addr_t being different sizes.jhb2016-09-301-6/+1
| | | | pci_addr_t has always been 64-bits since r163805.
* MFC 303721: Permit the name of the /dev/iov entry to be set by the driver.jhb2016-09-292-1/+25
| | | | | | | | | | | | | | | | | | | The PCI_IOV option creates character devices in /dev/iov for each PF device driver that registers support for creating VFs. By default the character device is named after the PF device (e.g. /dev/iov/foo0). This change adds a variant of pci_iov_attach() called pci_iov_attach_name() that allows the name of the /dev/iov entry to be specified by the driver. To preserve the ABI, this version does not modify the existing PCI_IOV_ATTACH kobj method as was done in HEAD. Instead, a new PCI_IOV_ATTACH_NAME method has been added that accepts the name as an additional parameter. The PCI bus driver now provides an implementation of PCI_IOV_ATTACH_NAME. A default implementation of PCI_IOV_ATTACH is provided that calls PCI_IOV_ATTACH_NAME passing 'device_get_nameunit(dev)' as the name. Sponsored by: Chelsio Communications
* MFC r305692:kib2016-09-251-0/+10
| | | | Add FPU_KERN_NOCTX flag to the fpu_kern_enter() function on amd64.
* MFC r303425:kib2016-08-272-17/+121
| | | | | | | Add callout_when(9). MFC r303919: Fix indentation.
* MFC r303519vangyzen2016-08-012-6/+6
| | | | | | | | | Fix two return types in the cpuset(9) and bitset(9) man pages The *_FFS() and *_COUNT() functions return int, not size_t. Approved by: re (gjb) Sponsored by: Dell Inc.
* MFC r303211:kib2016-07-302-11/+37
| | | | | | Implement mtx_trylock_spin(9). Approved by: re (gjb)
* The paradigm of a callout is that it has three consequent states:glebius2016-07-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not scheduled -> scheduled -> running -> not scheduled. The API and the manual page assume that, some comments in the code assume that, and looks like some contributors to the code also did. The problem is that this paradigm isn't true. A callout can be scheduled and running at the same time, which makes API description ambigouous. In such case callout_stop() family of functions/macros should return 1 and 0 at the same time, since it successfully unscheduled future callout but the current one is running. Before this change we returned 1 in such a case, with an exception that if running callout was migrating we returned 0, unless CS_MIGRBLOCK was specified. With this change, we now return 0 in case if future callout was unscheduled, but another one is still in action, indicating to API users that resources are not yet safe to be freed. However, the sleepqueue code relies on getting 1 return code in that case, and there already was CS_MIGRBLOCK flag, that covered one of the edge cases. In the new return path we will also use this flag, to keep sleepqueue safe. Since the flag CS_MIGRBLOCK doesn't block migration and now isn't limited to migration edge case, rename it to CS_EXECUTING. This change fixes panics on a high loaded TCP server. Reviewed by: jch, hselasky, rrs, kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7042
* Document support for alternate TCP stacks.jtl2016-06-282-0/+288
| | | | | | | Differential Revision: https://reviews.freebsd.org/D6940 Reviewed by: hiren Approved by: re (gjb) Sponsored by: Juniper Networks
* Add pci_get_max_payload() to fetch the PCI-express maximum payload size.jhb2016-06-241-1/+14
| | | | | | | Approved by: re (gjb) MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D6951
* Fix a bunch of "xref refers to *this* page" igor(1) warnings.trasz2016-06-093-4/+3
| | | | MFC after: 1 month
* Fix typos.trasz2016-06-082-5/+5
| | | | MFC after: 1 month
* Fix some trailing whitespaces.trasz2016-06-082-6/+6
| | | | MFC after: 1 month
* Fix a bunch of "sentence not on new line" warnings in section 9.trasz2016-06-089-43/+66
| | | | MFC after: 1 month
* Introduce a per-VNET flag to enable/disable netisr prcessing on that VNET.bz2016-06-031-1/+21
| | | | | | | | | | | | | | | | | | | | Add accessor functions to toggle the state per VNET. The base system (vnet0) will always enable itself with the normal registration. We will share the registered protocol handlers in all VNETs minimising duplication and management. Upon disabling netisr processing for a VNET drain the netisr queue from packets for that VNET. Update netisr consumers to (de)register on a per-VNET start/teardown using VNET_SYS(UN)INIT functionality. The change should be transparent for non-VIMAGE kernels. Reviewed by: gnn (, hiren) Obtained from: projects/vnet MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6691
* Remove the BUGS entry in memguard's man page.markj2016-06-011-15/+1
| | | | | UMA refcounting is gone as of r296243, so this bug no longer exists. In particular, it's now possible to guard mbuf clusters with memguard.
* The pr_destroy field does not allow us to run the teardown code in abz2016-06-011-2/+1
| | | | | | | | | | | | | | | | | | | | | specific order. VNET_SYSUNINITs however are doing exactly that. Thus remove the VIMAGE conditional field from the domain(9) protosw structure and replace it with VNET_SYSUNINITs. This also allows us to change some order and to make the teardown functions file local static. Also convert divert(4) as it uses the same mechanism ip(4) and ip6(4) use internally. Slightly reshuffle the SI_SUB_* fields in kernel.h and add a new ones, e.g., for pfil consumers (firewalls), partially for this commit and for others to come. Reviewed by: gnn, tuexen (sctp), jhb (kernel.h) Obtained from: projects/vnet MFC after: 2 weeks X-MFC: do not remove pr_destroy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6652
* Be more clear about LOCKLEAF being exclusive and add LOCKSHARED.bdrewery2016-05-231-3/+20
|
* Add sglist functions for working with arrays of VM pages.jhb2016-05-202-1/+34
| | | | | | | | | | | sglist_count_vmpages() determines the number of segments required for a buffer described by an array of VM pages. sglist_append_vmpages() adds the segments described by such a buffer to an sglist. The latter function is largely pulled from sglist_append_bio(), and sglist_append_bio() now uses sglist_append_vmpages(). Reviewed by: kib Sponsored by: Chelsio Communications
* Add new bus methods for mapping resources.jhb2016-05-205-3/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a pair of bus methods that can be used to "map" resources for direct CPU access using bus_space(9). bus_map_resource() creates a mapping and bus_unmap_resource() releases a previously created mapping. Mappings are described by 'struct resource_map' object. Pointers to these objects can be passed as the first argument to the bus_space wrapper API used for bus resources. Drivers that wish to map all of a resource using default settings (for example, using uncacheable memory attributes) do not need to change. However, drivers that wish to use non-default settings can now do so without jumping through hoops. First, an RF_UNMAPPED flag is added to request that a resource is not implicitly mapped with the default settings when it is activated. This permits other activation steps (such as enabling I/O or memory decoding in a device's PCI command register) to be taken without creating a mapping. Right now the AGP drivers don't set RF_ACTIVE to avoid using up a large amount of KVA to map the AGP aperture on 32-bit platforms. Once RF_UNMAPPED is supported on all platforms that support AGP this can be changed to using RF_UNMAPPED with RF_ACTIVE instead. Second, bus_map_resource accepts an optional structure that defines additional settings for a given mapping. For example, a driver can now request to map only a subset of a resource instead of the entire range. The AGP driver could also use this to only map the first page of the aperture (IIRC, it calls pmap_mapdev() directly to map the first page currently). I will also eventually change the PCI-PCI bridge driver to request mappings of the subset of the I/O window resource on its parent side to create mappings for child devices rather than passing child resources directly up to nexus to be mapped. This also permits bridges that do address translation to request suitable mappings from a resource on the "upper" side of the bus when mapping resources on the "lower" side of the bus. Another attribute that can be specified is an alternate memory attribute for memory-mapped resources. This can be used to request a Write-Combining mapping of a PCI BAR in an MI fashion. (Currently the drivers that do this call pmap_change_attr() directly for x86 only.) Note that this commit only adds the MI framework. Each platform needs to add support for handling RF_UNMAPPED and thew new bus_map/unmap_resource methods. Generally speaking, any drivers that are calling rman_set_bustag() and rman_set_bushandle() need to be updated. Discussed on: arch Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D5237
* Remove dangling references to rman_await_resource().jhb2016-05-202-22/+1
| | | | | | | This function was removed when RF_TIMESHARE was removed a couple of years ago. MFC after: 3 days
* Per Ravi Pokala's suggestion, rewrite the g_reset_bio description toimp2016-05-172-16/+17
| | | | | be clearer. It also describes it with more nuance. Add missing MLINKS noticed by trasz@. Bump the date.
* Don't repeat the the word 'the'eadler2016-05-171-1/+1
| | | | | | | (one manual change to fix grammar) Confirmed With: db Approved by: secteam (not really, but this is a comment typo fix)
* Add a pcib interface for use by interrupt controllers that need toandrew2016-05-161-0/+3
| | | | | | | | | | translate the pci rid to a controller ID. The translation could be based on the 'msi-map' OFW property, a similar ACPI option, or hard-coded for hardware lacking the above options. Reviewed by: wma Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
* Re-commit r299467 having fixed the build:andrew2016-05-162-1/+17
| | | | | | | | | | | | | | | | | | | | Add a new get_id interface to pci and pcib. This will allow us to both detect failures, and get different PCI IDs. For the former the interface returns an int to signal an error. The ID is returned at a uintptr_t * argument. For the latter there is a type argument that allows selecting the ID type. This only specifies a single type, however a MSI type will be added to handle the need to find the ID the hardware passes to the ARM GICv3 interrupt controller. A follow up commit will be made to remove pci_get_rid. Reviewed by: jhb, rstone (previous version) Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6239
* atomic: Add testandclear on i386/amd64sephe2016-05-161-1/+19
| | | | | | Reviewed by: kib Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6381
OpenPOWER on IntegriCloud