Date: Thu, 23 Mar 2017 07:36:38 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315829 - head/share/man/man9 Message-ID: <201703230736.v2N7acwd077657@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Thu Mar 23 07:36:38 2017 New Revision: 315829 URL: https://svnweb.freebsd.org/changeset/base/315829 Log: Try polishing up iflib manpages a bit (basically all the low hanging fruit) igor: - Fix typos. - Delete trailing whitespace. manlint: - Use .Fo/.Fc/.Fa when describing functions. - Use .Xr. - Fill in SEE ALSO section. - Fix .Dt use: the section was specified incorrectly and the name had a lowercase character. - Continue new sentences on new lines. Miscellaneous: - Remove unnecessary quotes around "SEE ALSO" section headers. - Sprinkle .Dv use in spots with constants. Reported by: igor, make manlint Sponsored by: Dell EMC Isilon Modified: head/share/man/man9/iflibdd.9 head/share/man/man9/iflibdi.9 head/share/man/man9/iflibtxrx.9 Modified: head/share/man/man9/iflibdd.9 ============================================================================== --- head/share/man/man9/iflibdd.9 Thu Mar 23 06:55:32 2017 (r315828) +++ head/share/man/man9/iflibdd.9 Thu Mar 23 07:36:38 2017 (r315829) @@ -1,6 +1,6 @@ .\" $FreeBSD$ -.Dd January 27, 2017 -.Dt IFlIBDD(9) +.Dd March 23, 2017 +.Dt IFLIBDD 9 .Os .Sh NAME .Nm iflibdd @@ -10,110 +10,215 @@ .Ss "Soft Queue Setup and Teardown Functions" .Ss "Mandatory Functions" .Ft int -.Fn ifdi_queues_alloc "if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nqs" -.Ft int -.Fn ifdi_queues_free "if_ctx_t ctx" +.Fo ifdi_queues_alloc +.Fa "if_ctx_t ctx" +.Fa "caddr_t *vaddrs" +.Fa "uint64_t *paddrs" +.Fa "int nqs" +.Fc +.Ft int +.Fo ifdi_queues_free +.Fa "if_ctx_t ctx" +.Fc .Ss "Optional Functions" .Ft int -.Fn ifdi_txq_setup "if_ctx_t ctx, uint16_t qid" -.Ft int -.Fn ifdi_rxq_setup "if_ctx_t ctx, uint16_t qid" +.Fo ifdi_txq_setup +.Fa "if_ctx_t ctx" +.Fa "uint16_t qid" +.Fc +.Ft int +.Fo ifdi_rxq_setup +.Fa "if_ctx_t ctx" +.Fa "uint16_t qid" +.Fc .Ss "Device Setup and Teardown Functions" .Ss "Mandatory Functions" .Ft int -.Fn ifdi_attach_pre "if_ctx_t ctx" -.Ft int -.Fn ifdi_attach_post "if_ctx_t ctx" -.Ft int -.Fn ifdi_detach "if_ctx_t ctx" +.Fo ifdi_attach_pre +.Fa "if_ctx_t ctx" +.Fc +.Ft int +.Fo ifdi_attach_post +.Fa "if_ctx_t ctx" +.Fc +.Ft int +.Fo ifdi_detach +.Fa "if_ctx_t ctx" +.Fc .Ss "Optional Functions" .Ft void -.Fn ifdi_vlan_register "if_ctx_t ctx, uint16_t vtag" -.Ft void -.Fn ifdi_vlan_unregister "if_ctx_t ctx, uint16_t vtag" -.Ft int -.Fn ifdi_suspend "if_ctx_t ctx" -.Ft int -.Fn ifdi_resume "if_ctx_t ctx" +.Fo ifdi_vlan_register +.Fa "if_ctx_t ctx" +.Fa "uint16_t vtag" +.Fc +.Ft void +.Fo ifdi_vlan_unregister +.Fa "if_ctx_t ctx" +.Fa "uint16_t vtag" +.Fc +.Ft int +.Fo ifdi_suspend +.Fa "if_ctx_t ctx" +.Fc +.Ft int +.Fo ifdi_resume +.Fa "if_ctx_t ctx" +.Fc .Ss "Device Configuration Functions" .Ss "Mandatory Functions" .Ft void -.Fn ifdi_init "if_ctx_t ctx" -.Ft void -.Fn ifdi_stop "if_ctx_t ctx" -.Ft void -.Fn ifdi_multi_set "if_ctx_t ctx" -.Ft int -.Fn ifdi_mtu_set "if_ctx_t ctx, uint32_t mtu" -.Ft void -.Fn ifdi_media_status "if_ctx_t ctx, struct ifmediareq *ifr" -.Ft int -.Fn ifdi_media_change "if_ctx_t ctx" -.Ft void -.Fn ifdi_promisc_set "if_ctx_t ctx, int flags" +.Fo ifdi_init +.Fa "if_ctx_t ctx" +.Fc +.Ft void +.Fo ifdi_stop +.Fa "if_ctx_t ctx" +.Fc +.Ft void +.Fo ifdi_multi_set +.Fa "if_ctx_t ctx" +.Fc +.Ft int +.Fo ifdi_mtu_set +.Fa "if_ctx_t ctx" +.Fa "uint32_t mtu" +.Fc +.Ft void +.Fo ifdi_media_status +.Fa "if_ctx_t ctx" +.Fa "struct ifmediareq *ifr" +.Fc +.Ft int +.Fo ifdi_media_change +.Fa "if_ctx_t ctx" +.Fc +.Ft void +.Fo ifdi_promisc_set +.Fa "if_ctx_t ctx" +.Fa "int flags" +.Fc .Ft uint64_t -.Fn ifdi_get_counter "if_ctx_t ctx, ift_counter cnt" -.Ft void -.Fn ifdi_update_admin_status "if_ctx_t ctx" +.Fo ifdi_get_counter +.Fa "if_ctx_t ctx" +.Fa "ift_counter cnt" +.Fc +.Ft void +.Fo ifdi_update_admin_status +.Fa "if_ctx_t ctx" +.Fc .Ss "Optional Functions" .Ft void -.Fn ifdi_media_set "if_ctx_t ctx" +.Fo ifdi_media_set +.Fa "if_ctx_t ctx" +.Fc .Ss "Interrupt enable/disable" .Ss "Mandatory Functions" .Ft void -.Fn ifdi_intr_enable "if_ctx_t ctx" -.Ft void -.Fn ifdi_queue_intr_enable "if_ctx_t ctx, uint16_t qid" -.Ft void -.Fn ifdi_intr_disable "if_ctx_t ctx" +.Fo ifdi_intr_enable +.Fa "if_ctx_t ctx" +.Fc +.Ft void +.Fo ifdi_queue_intr_enable +.Fa "if_ctx_t ctx" +.Fa "uint16_t qid" +.Fc +.Ft void +.Fo ifdi_intr_disable +.Fa "if_ctx_t ctx" +.Fc .Ss IOV Support .Ft init -.Fn iov_init "if_ctx_t, uint16_t num_vfs, const nvlist_t *params" -.Ft void -.Fn iov_uinit "if_ctx_t ctx" -.Ft void -.Fn ifdi_vflr_handle "if_ctx_t ctx" -.Ft int -.Fn ifdi_vf_add "if_ctx_t ctx, uint16_t vfnum, const nvlist_t *params" +.Fo iov_init +.Fa "if_ctx_t ctx" +.Fa "uint16_t num_vfs" +.Fa "const nvlist_t *params" +.Fc +.Ft void +.Fo iov_uinit +.Fa "if_ctx_t ctx" +.Fc +.Ft void +.Fo ifdi_vflr_handle +.Fa "if_ctx_t ctx" +.Fc +.Ft int +.Fo ifdi_vf_add +.Fa "if_ctx_t ctx" +.Fa "uint16_t vfnum" +.Fa "const nvlist_t *params" +.Fc .Ss "Optional Functions" .Ft void -.Fn ifdi_link_intr_enable "if_ctx_t ctx" +.Fo ifdi_link_intr_enable +.Fa "if_ctx_t ctx" +.Fc .Ss "Optional Service Routines" .Ft void -.Fn ifdi_timer "if_ctx_t ctx" -.Ft void -.Fn ifdi_watchdog_reset "if_ctx_t ctx" -.Ss "Additional Functions" -.Ft void -.Fn ifdi_led_func "if_ctx_t ctx, int onoff" -.Ft int -.Fn ifdi_sysctl_int_delay "if_ctx_t ctx, if_int_delay_info_t iidi" -.Ft int -.Fn ifdi_i2c_req "if_ctx_t ctx, struct ifi2creq *req" +.Fo ifdi_timer +.Fa "if_ctx_t ctx" +.Fc +.Ft void +.Fo ifdi_watchdog_reset +.Fa "if_ctx_t ctx" +.Fc +.Ss "Additional Functions" +.Ft void +.Fo ifdi_led_func +.Fa "if_ctx_t ctx" +.Fa "int onoff" +.Fc +.Ft int +.Fo ifdi_sysctl_int_delay +.Fa "if_ctx_t ctx" +.Fa "if_int_delay_info_t iidi" +.Fc +.Ft int +.Fo ifdi_i2c_req +.Fa "if_ctx_t ctx" +.Fa "struct ifi2creq *req" +.Fc .Sh FUNCTIONS -The above named functions are device dependent configuration functions. These routines are registerd with iflib by the driver and are called from the corresponding iflib function to configure device specific functions and registers. +The above named functions are device dependent configuration functions. +These routines are registerd with iflib by the driver and are called from the +corresponding iflib function to configure device specific functions and +registers. .Ss Device Dependent Functions .Ss Soft Queue Setup and Teardown .Bl -ohang -offset indent .It Fn ifdi_queues_alloc -Manditory queues allocation function that is called during iflib_attach. vaddrs and paddrs are arrays of virtual and physical addresses respectively of the hardware transmit and receive queues, and if relevany, any command completion queues. nqs is the number of queues per qset. For example, a driver with a single receive and transmit queue would have a nqs equal to 2. +Mandatory queues allocation function that is called during iflib_attach. +vaddrs and paddrs are arrays of virtual and physical addresses respectively of +the hardware transmit and receive queues, and if relevany, any command +completion queues. +nqs is the number of queues per qset. +For example, a driver with a single receive and transmit queue would have a nqs +equal to 2. .It Fn ifdi_queues_free -Mandatory function that frees the allocated queues and associated transmit buffers. +Mandatory function that frees the allocated queues and associated transmit +buffers. .It Fn ifdi_txq_setup -Optional function for each transmit queue that handles device specific initialization. +Optional function for each transmit queue that handles device specific +initialization. .It Fn ifdi_rxq_setup -Optional function for each receive queue that handles device specific initialization. +Optional function for each receive queue that handles device specific +initialization. .El .Ss Device Setup and Teardown .Bl -ohang -offset indent .It Fn ifdi_attach_pre -Mandatory function implemented by the driver to perform any attach logic that procedes interrupt and queue allocation, queue setup, and interrupt assignment. +Mandatory function implemented by the driver to perform any attach logic that +procedes interrupt and queue allocation, queue setup, and interrupt assignment. .It Fn ifdi_attach_post -Mandatory function implemented by the driver to perform any attach logic that occurs after ifdi_attach_pre, and iflib's queue setup and MSI/MSIX(X) or legacy interrupt assignment. +Mandatory function implemented by the driver to perform any attach logic that +occurs after ifdi_attach_pre, and iflib's queue setup and MSI/MSIX(X) or legacy +interrupt assignment. .It Fn ifdi_detach -Mandatory function that frees any resources allocated by the driver in ifdi_attach_pre and ifdi_attach_post. +Mandatory function that frees any resources allocated by the driver in +ifdi_attach_pre and ifdi_attach_post. .It Fn ifdi_vlan_register -Optional function called by the VLAN config eventhandler. _vtag is the new VLAN tag. +Optional function called by the VLAN config eventhandler. +.Va vtag +is the new VLAN tag. .It Fn ifdi_vlan_unregister Optional function called by the VLAN unconfig eventhandler. .It Fn ifdi_suspend @@ -124,25 +229,40 @@ Optional function that resumes a driver. .Ss Device Configuration Functions .Bl -ohang -offset indent .It Fn ifdi_init -Mandatory function that will initialize and bring up the hardware. For example, it will reset the chip and enable the receiver unit. It should mark the interface running, but not active (IFF_DRV_RUNNING, ~IIF_DRV_OACTIVE). +Mandatory function that will initialize and bring up the hardware. +For example, it will reset the chip and enable the receiver unit. +It should mark the interface running, but not active ( +.Dv IFF_DRV_RUNNING , +.Dv ~IIF_DRV_OACTIVE ). .It Fn ifdi_stop -Mandatory function that should disable all traffic on the interface by issuing a global reset on the MAC and deallocating the TX and RX buffers. +Mandatory function that should disable all traffic on the interface by issuing +a global reset on the MAC and deallocating the TX and RX buffers. .It Fn ifdi_multi_set Programs the interfaces multicast addresses .It Fn ifdi_media_status -Media Ioctl Callback. Function is called whenever the user queries the status of the interface using ifconfig. The driver sets the appropriate link type and speed in ifmr->ifm_active. +Media Ioctl Callback. +Function is called whenever the user queries the status of the interface using +.Xr ifconfig 8 . +The driver sets the appropriate link type and speed in ifmr->ifm_active. .It Fn ifdi_mtu_set -Sets the mtu interface to the value of the second function parameter mtu. +Sets the mtu interface to the value of the second function parameter mtu. .It Fn ifdi_media_change -Function is called when the user changes speed/duplex using the media/mediaopt option with ifconfig. +Function is called when the user changes speed/duplex using the media/mediaopt +option with +.Xr ifconfig 8 . .It Fn ifdi_promisc_set -Enables or disables promisc settings depending upon the flags value. Flags contains the interfaces' ifnet flags. +Enables or disables promisc settings depending upon the flags value. +.Va flags +contains the interface's +.Xr ifnet 9 +flags. .It Fn ifdi_get_counter -Returns the value for counter cnt depending upon counter type. +Returns the value for counter cnt depending upon counter type. .It Fn ifdi_update_admin_status -Sets the link_up state to TRUE or FALSE depending upon the OS link state. A real check of the hardware only happens with a link interrupt. +Sets the link_up state to TRUE or FALSE depending upon the OS link state. +A real check of the hardware only happens with a link interrupt. .It Fn ifdi_media_set -Need to define +Need to define .El .Ss Interrupt Enable/Disable .Bl -ohang -offset indent @@ -151,31 +271,34 @@ Mandatory function that enables all inte .It Fn ifdi_intr_disable Mandatory function that disables all interrupts. .It Fn ifdi_queue_intr_enable -Mandatory function that enables interrupts on queue qid. +Mandatory function that enables interrupts on queue qid. .It Fn iov_init Initialize num_vfs VFs. .It Fn io_uninit Tear down the context for all VFs. .It Fn ifdi_vflr_handle -Handle any VFs that have reset themselves via a Function Level Reset(FLR). +Handle any VFs that have reset themselves via a Function Level Reset (FLR). .It Fn ifdi_vf_add Set parameters in params in VF vfnum. .El .Ss Service Routines .Bl -ohang -offset indent -.It ifdi_timer +.It Fn ifdi_timer Optional timer routine that will be run every 500ms. -.It ifdi_watchdog_reset +.It Fn ifdi_watchdog_reset Optional function to run when a transmit queue is hung. .El .Ss Additional Functions .Bl -ohang -offset indent -.It ifdi_led_func -.It ifdi_sysctl_int_delay -.It ifdi_i2c_req +.It Fn ifdi_led_func +.It Fn ifdi_sysctl_int_delay +.It Fn ifdi_i2c_req .El -.Sh "SEE ALSO" - iflibtxrx(9), iflibdd(9) +.Sh SEE ALSO +.Xr ifconfig 8 , +.Xr iflibdi 9 , +.Xr iflibtxrx 9 , +.Xr ifnet 9 .Sh AUTHORS This manual page was written by .An Nicole Graziano Modified: head/share/man/man9/iflibdi.9 ============================================================================== --- head/share/man/man9/iflibdi.9 Thu Mar 23 06:55:32 2017 (r315828) +++ head/share/man/man9/iflibdi.9 Thu Mar 23 07:36:38 2017 (r315829) @@ -1,6 +1,6 @@ .\" $FreeBSD$ -.Dd January 27, 2017 -.Dt IFlIBDI(9) +.Dd March 23, 2017 +.Dt IFLIBDI 9 .Os .Sh NAME .Nm iflibdi @@ -9,39 +9,101 @@ .In "ifdi_if.h" .Ss "Device Independent Functions" .Ft int -.Fn iflib_device_attach "device_t dev" -.Ft int -.Fn iflib_device_detach "device_t dev" -.Ft int -.Fn iflib_device_suspend "device_t dev" -.Ft int -.Fn iflib_device_resume "device_t dev" -.Ft int -.Fn iflib_device_register "device_t dev, void *softc, if_shared_ctx_t sctx, if_ctx_t *ctxp" -.Ft int -.Fn iflib_device_deregister "if_ctx_t ctx" -.Ft int -.Fn iflib_irq_alloc "if_ctx_t ctx, if_irq_t irq_info, int rid, driver_filter_t filter, void *filter_arg, driver_intr_t handler, void *arg, char *name" -.Ft int -.Fn iflib_irq_alloc_generic "if_ctx_t, ctx, if_irq_t irq, int rid, intr_type_t type, driver_filter_t *filter, void *filter_arg, int qid, char *name" -.Ft void -.Fn iflib_led_create "if_ctx_t ctx" -.Ft void -.Fn iflib_tx_intr_deferred "if_ctx_t ctx, int txqid" -.Ft void -.Fn iflib_rx_intr_deferred "if_ctx_t ctx, int rxqid" -.Ft void -.Fn iflib_link_intr_deferred "if_ctx_t ctx" -.Ft void -.Fn iflib_link_state_change "if_ctx_t ctx, int linkstate" -.Ft void -.Fn iflib_led_create "if_ctx_t ctx" -.Ft void -.Fn iflib_add_int_delay_sysctl "if_ctx_t ctx, const char *, const char *, if_int_delay_info_t, int, int" +.Fo iflib_device_attach +.Fa "device_t dev" +.Fc +.Ft int +.Fo iflib_device_detach +.Fa "device_t dev" +.Fc +.Ft int +.Fo iflib_device_suspend +.Fa "device_t dev" +.Fc +.Ft int +.Fo iflib_device_resume +.Fa "device_t dev" +.Fc +.Ft int +.Fo iflib_device_register +.Fa "device_t dev" +.Fa "void *softc" +.Fa "if_shared_ctx_t sctx" +.Fa "if_ctx_t *ctxp" +.Fc +.Ft int +.Fo iflib_device_deregister +.Fa "if_ctx_t ctx" +.Fc +.Ft int +.Fo iflib_irq_alloc +.Fa "if_ctx_t ctx" +.Fa "if_irq_t irq_info" +.Fa "int rid" +.Fa "driver_filter_t filter" +.Fa "void *filter_arg" +.Fa "driver_intr_t handler" +.Fa "void *arg" +.Fa "char *name" +.Fc +.Ft int +.Fo iflib_irq_alloc_generic +.Fa "if_ctx_t ctx" +.Fa "if_irq_t irq" +.Fa "int rid" +.Fa "intr_type_t type" +.Fa "driver_filter_t *filter" +.Fa "void *filter_arg" +.Fa "int qid" +.Fa "char *name" +.Fc +.Ft void +.Fo iflib_led_create +.Fa "if_ctx_t ctx" +.Fc +.Ft void +.Fo iflib_tx_intr_deferred +.Fa "if_ctx_t ctx" +.Fa "int txqid" +.Fc +.Ft void +.Fo iflib_rx_intr_deferred +.Fa "if_ctx_t ctx" +.Fa "int rxqid" +.Fc +.Ft void +.Fo iflib_link_intr_deferred +.Fa "if_ctx_t ctx" +.Fc +.Ft void +.Fo iflib_link_state_change +.Fa "if_ctx_t ctx" +.Fa "int linkstate" +.Fc +.Ft void +.Fo iflib_led_create +.Fa "if_ctx_t ctx" +.Fc +.Ft void +.Fo iflib_add_int_delay_sysctl +.Fa "if_ctx_t ctx" +.Fa "const char *" +.Fa "const char *" +.Fa "if_int_delay_info_t" +.Fa "int" +.Fa "int" +.Fc .Ss "Global Variables" .Vt extern struct if_txrx .Sh DATA STRUCTURES -The \fIif_ctx_t\fP Structure is the device independent data structure that contains statistics and identifying information used to transmit and receive data packets. The interface is associated with an array of queues assigned sequentially. Each queu has its own transmit (iflib_txq_t) and receive (iflib_rxq_t) queue. The transmit queue is used to hold packets while the interface is in the process of sending another. The receive queue is used to receive packets that are awaiting processing. +The \fIif_ctx_t\fP Structure is the device independent data structure that +contains statistics and identifying information used to transmit and receive +data packets. +The interface is associated with an array of queues assigned sequentially. +Each queue has its own transmit (iflib_txq_t) and receive (iflib_rxq_t) queue. +The transmit queue is used to hold packets while the interface is in the +process of sending another. +The receive queue is used to receive packets that are awaiting processing. .Pp .Ss The if_ctx_t Structure The fields of @@ -53,7 +115,7 @@ are as follows: A pointer to the driver's private state block. .It Va ifc_dev .Pq Vt "device_t" -The underlying device structure. +The underlying device structure. .It Va ifc_ip .Pq Vt "if_t" A link back to the interface structure @@ -73,7 +135,8 @@ Device independent transmit queue mainta Device independent receive queue maintained internally by iflib .It Va ifc_qsets .Pq Vt "iflib_qset_t" - Output queue that contains a single transmit (ifc_txq_t) and receive (ifc_rxq_t) queue +Output queue that contains a single transmit (ifc_txq_t) and receive +(ifc_rxq_t) queue .It Va ifc_if_flags .Pq Vt "uint32_t" Flags describing the operational parameter of the interface @@ -81,7 +144,8 @@ Flags describing the operational paramet .Pq Vt "int" .It Va ifc_link_state .Pq Vt "int" -Describes the current link state of the Ethernet interface. It's possible values are either active or inactive. +Describes the current link state of the Ethernet interface. +Its possible values are either active or inactive. .It Va ifc_link_irq .Pq Vt "int" .It Va ifc_vlan_attach_event @@ -107,26 +171,45 @@ Statistics and information relating to t .It Va ifc_media .Pq Vt "struct ifmedia" .It Va ifc_txrx -.Pq Vt "struct if_txrx" +.Pq Vt "struct if_txrx" .El .Sh FUNCTIONS - The above named functions are found exclusively in iflib. They are independent of the underlying hardware type or configuration. -.Ss Device Independent Functions +The above named functions are found exclusively in iflib. +They are independent of the underlying hardware type or configuration. +.Ss Device Independent Functions .Bl -ohang -offset indent .It Fn iflib_device_attach -Function initiates a device registration with the iflib framework. It calls the iflib_register function, which is responsible for allocating and initializing the \fIif_ctx_t\fP structure. +Function initiates a device registration with the iflib framework. +It calls the iflib_register function, which is responsible for allocating +and initializing the \fIif_ctx_t\fP structure. .It Fn iflib_device_detach -Shutdown and detach the device. Unregister vlan events, drain any dependent tasks, and release irq, pci, and msix memory. +Shutdown and detach the device. +Unregister vlan events, drain any dependent tasks, and release irq, pci, and +msix memory. .It Fn iflib_device_suspend -Suspend a device by calling the device dependent suspend function and bus_generic_suspend. +Suspend a device by calling the device dependent suspend function and +bus_generic_suspend. .It Fn iflib_device_resume -Resume a device by calling the device dependent resume function, the iflib_init_locked function, and bus_generic_resume. +Resume a device by calling the device dependent resume function, the +iflib_init_locked function, and bus_generic_resume. .It Fn iflib_device_register -Register a device with the iflib framework. Allocate and initialize the \fIif_ctx_t\fP structure. Setup and initialize the MSI or MSI/X interrupt queues if necessary. Allocate memory for queues and qset structure setup. +Register a device with the iflib framework. +Allocate and initialize the +\fIif_ctx_t\fP structure. +Setup and initialize the MSI or MSI/X interrupt queues if necessary. +Allocate memory for queues and qset structure setup. .It Fn iflib_device_irq_alloc -Allocate an interrupt resource for a given rid value with an associated filter and handler function. +Allocate an interrupt resource for a given rid value with an associated filter +and handler function. .It Fn iflib_device_irq_alloc_generic -Performs the same function as iflib_device_irq_alloc along with the additional functionality of adding a taskgroup. The data fields and callback function are determined by the type of interrupt, such as IFLIB_INTR_TX, IFLIB_INTR_RX, and IFLIB_INTR_ADMIN. +Performs the same function as iflib_device_irq_alloc along with the additional +functionality of adding a taskgroup. +The data fields and callback function are determined by the type of interrupt, +such as +.Dv IFLIB_INTR_TX , +.Dv IFLIB_INTR_RX , +and +.Dv IFLIB_INTR_ADMIN . .It Fn iflib_led_create Calls led_create to initialize the ctx->ifc_led_dev field .It Fn iflib_tx_intr_deferred @@ -136,17 +219,24 @@ Calls GROUPTASK_ENQUEUE to enqueue the r .It Fn iflib_link_intr_deferred Calls GROUPTASK_ENQUEUE to enqueue the link task .It Fn iflib_link_state_change -Change the interface link status to either LINK_STATE_UP or LINK_STATE_DOWN as specified by the second argument to the function. -\fBInterface Link States\fP +Change the interface link status to either +.Dv LINK_STATE_UP +or +.Dv LINK_STATE_DOWN +as specified by the second argument to the function. +.Pp +.Em Interface Link States The following link states are currently defined: - - LINK_STATE_UP The link is up. - LINK_STATE_DOWN The link is down. +.It Dv LINK_STATE_UP +The link is up. +.It Dv LINK_STATE_DOWN +The link is down. .It Fn iflib_add_int_delay_sysctl Modifies settings to user defined values for a given set of variables. .El -.Sh "SEE ALSO" - iflibtxrx(9), iflibdd(9) +.Sh SEE ALSO +.Xr iflibdd 9 , +.Xr iflibtxrx 9 .Sh AUTHORS This manual page was written by .An Nicole Graziano Modified: head/share/man/man9/iflibtxrx.9 ============================================================================== --- head/share/man/man9/iflibtxrx.9 Thu Mar 23 06:55:32 2017 (r315828) +++ head/share/man/man9/iflibtxrx.9 Thu Mar 23 07:36:38 2017 (r315829) @@ -1,6 +1,6 @@ .\" $FreeBSD$ -.Dd January 27, 2017 -.Dt IFlIBTXTX(9) +.Dd March 23, 2017 +.Dt IFLIBTXTX 9 .Os .Sh NAME .Nm iflibtxrx @@ -9,23 +9,58 @@ .In "ifdi_if.h" .Ss "Interface Manipulation Functions" .Ft int -.Fn isc_txd_encap "void *sc, if_pkt_into_t pi" +.Fo isc_txd_encap +.Fa "void *sc" +.Fa "if_pkt_into_t pi" +.Fc .Ft void -.Fn isc_txd_flush "void *sc, uint16_t qid, uint32_t _pidx_or_credits_" +.Fo isc_txd_flush +.Fa "void *sc" +.Fa "uint16_t qid" +.Fa "uint32_t _pidx_or_credits_" +.Fc .Ft int * -.Fn isc_txd_credits_update "void *sc, uint16_t qid, uint32_t credits" +.Fo isc_txd_credits_update +.Fa "void *sc" +.Fa "uint16_t qid" +.Fa "uint32_t credits" +.Fc .Ft int * -.Fn isc_rxd_available "void *sc, uint16_t qsid, uint32_t cidx" +.Fo isc_rxd_available +.Fa "void *sc" +.Fa "uint16_t qsid" +.Fa "uint32_t cidx" +.Fc .Ft void * -.Fn isc_rxd_refill "void *sc, uint16_t qsid, uint8_t flid, uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs, uint16_t count" +.Fo isc_rxd_refill +.Fa "void *sc" +.Fa "uint16_t qsid" +.Fa "uint8_t flid" +.Fa "uint32_t pidx" +.Fa "uint64_t *paddrs" +.Fa "caddr_t *vaddrs" +.Fa "uint16_t count" +.Fc .Ft void * -.Fn isc_rxd_flush "void *sc, uint16_t qsid, uint8_t flid, uint32_t pidx" +.Fo isc_rxd_flush +.Fa "void *sc" +.Fa "uint16_t qsid" +.Fa "uint8_t flid" +.Fa "uint32_t pidx" +.Fc .Ft int -.Fn isc_rxd_pkt_get "void *sc, if_rxd_info_t ri" +.Fo isc_rxd_pkt_get +.Fa "void *sc" +.Fa "if_rxd_info_t ri" +.Fc .Ss "Global Variables" .Vt extern struct if_txrx .Sh DATA STRUCTURES -The device dependent mechanisms for handling packet transmit and receive are primarily defined by the functions named above. The if_pkt_info data structure contains statistics and identifying info necessary for packet transmission. While the data structure for packet receipt is the if_rxd_info structure. +The device dependent mechanisms for handling packet transmit and receive are +primarily defined by the functions named above. +The if_pkt_info data structure contains statistics and identifying info +necessary for packet transmission. +While the data structure for packet receipt is the if_rxd_info structure. .Pp .Ss The if_pkt_info Structure The fields of @@ -37,28 +72,35 @@ are as follows: Denotes the size of packet to be sent on the transmit queue. .It Va ipi_segs .Pq Vt "bus_dma_segment_t *" -A pointer to the bus_dma_segment of the device independent transfer queue defined in iflib. +A pointer to the bus_dma_segment of the device independent transfer queue +defined in iflib. .It Va ipi_qsidx -Unique index value assigned sequentially to each transmit queue. Used to reference the currently transmitting queue. +Unique index value assigned sequentially to each transmit queue. +Used to reference the currently transmitting queue. .It Va ipi_nsegs .Pq Vt "uint16_t" -Number of descriptors to be read into the device dependent transfer descriptors. +Number of descriptors to be read into the device dependent transfer +descriptors. .It Va ipi_ndescs .Pq Vt "uint16_t" -Number of descriptors in use. Calculated by subtracting the old pidx value from the new pidx value. +Number of descriptors in use. +Calculated by subtracting the old pidx value from the new pidx value. .It Va ipi_flags .Pq Vt "uint16_t" -Flags defined on a per packet basis. +Flags defined on a per packet basis. .It Va ipi_pidx .Pq Vt "uint32_t" -Value of first pidx sent to the isc_encap function for encapsulation and subsequent transmission. +Value of first pidx sent to the isc_encap function for encapsulation and +subsequent transmission. .It Va ipi_new_pidx .Pq Vt "uint32_t" -Value set after the termination of the isc_encap function. This value will become the first pidx sent to the isc-encap the next time that the function is called. +Value set after the termination of the isc_encap function. +This value will become the first pidx sent to the isc-encap the next time that +the function is called. .It Va \fBThe Following Fields Are Used For Offload Handling\fP .It Va ipi_csum_flags .Pq Vt "uint64_t" -Flags describing the checksum values. Used on a per packet basis. +Flags describing the checksum values, used on a per packet basis. .It Va ipi_tso_segsz .Pq Vt "uint16_t" Size of the TSO Segment Size. @@ -85,16 +127,18 @@ Length of the TCP Header. Flags describing the operational parameters of the TCP Header. .It Va ipi_ipproto .Pq Vt "uint8_t" -Specifies the type of IP Protocol in use. Example TCP, UDP, or SCTP. +Specifies the type of IP Protocol in use. +Example TCP, UDP, or SCTP. .El .Ss The if_rxd_info Structure -The fields of +The fields of .Vt "struct if_rxd_info" are as follows: .Bl -tag -width ".Va if_capabilities" -offset indent .It Va iri_qsidx .Pq Vt "uint16_t" -Unique index value assigned sequentially to each receive queue. Used to reference the currently receiving queue. +Unique index value assigned sequentially to each receive queue. +Used to reference the currently receiving queue. .It Va iri_vtag .Pq Vt "uint16_t" Contains the VLAN information in the Ethernet Frame. @@ -103,28 +147,34 @@ Contains the VLAN information in the Eth Denotes the size of a received packet. .It Va iri_next_offset .Pq Vt "uint16_t" -Denotes the offset value for the next packet to be receive. A Null value signifies the end of packet. +Denotes the offset value for the next packet to be receive. +A Null value signifies the end of packet. .It Va iri_cidx .Pq Vt "uint32_t" -Denotes the index value of the packet currently being processed in the consumer queue. +Denotes the index value of the packet currently being processed in the +consumer queue. .It Va iri_flowid .Pq Vt "uint32_t" Value of the RSS hash for the packet. .It Va iri_flags .Pq Vt "uint" - Flags describing the operational parameters of the mbuf contained in the receive packet. + Flags describing the operational parameters of the mbuf contained in the + receive packet. .It Va iri_csum_flags .Pq Vt "uint32_t" Flags describing the checksum value contained in the receive packet. .It Va iri_csum_data .Pq Vt "uint32_t" -Checksum data contained in the mbuf packet header. +Checksum data contained in the +.Xr mbuf 9 +packet header. .It Va iri_m .Pq Vt "struct mbuf *" A mbuf for drivers that manage their own receive queues. .It Va iri_ifp .Pq Vt "struct ifnet *" -A link back to the interface structure. Utilized by drivers that have multiple interface per softc. +A link back to the interface structure. +Utilized by drivers that have multiple interface per softc. .It Va iri_rsstype .Pq Vt "uint8_t" The value of the RSS hash type. @@ -133,33 +183,59 @@ The value of the RSS hash type. The length of any padding contained by the received data. .It Va iri_qidx .Pq Vt "uint8_t" -Represents the type of queue event. If value >= 0 then it is the freelist id otherwise it is a completion queue event. +Represents the type of queue event. +If value >= 0 then it is the freelist id otherwise it is a completion queue +event. .El .Sh FUNCTIONS -All function calls are associated exclusively with either packet transmission or receipt. -The void *sc passed as the first arguement to all of the following functions repressents the driver's softc. -.Ss Transmit Packet Functions +All function calls are associated exclusively with either packet transmission +or receipt. +The void *sc passed as the first arguement to all of the following functions +represents the driver's softc. +.Ss Transmit Packet Functions .Bl -ohang -offset indent .It Fn isc_txd_encap - Transmit function that sends a packet on an interface. The if_pkt_info data structure contains data information fields describing the packet. This function returns 0 if successful, otherwise an error value is returned. +Transmit function that sends a packet on an interface. +The if_pkt_info data structure contains data information fields describing the +packet. +This function returns 0 if successful, otherwise an error value is returned. .It Fn isc_txd_flush -Flush function is called immediately after the isc_txd_encap function transmits a packet. It updates the hardware producer index or increments the descriptors used to pidx_or_credits in the queue designated by the qid number. This is often referred to as poking the doorbell register. -.It Fn isc_txd_credits_update -Credit function advances the buffer ring and calculates the credits (descriptors) processed. Until the I/O is complete it cleans the range in case of multisegments and updates the count of processed packets. The function returns the number of processed credits. +Flush function is called immediately after the isc_txd_encap function transmits +a packet. +It updates the hardware producer index or increments the descriptors used to +pidx_or_credits in the queue designated by the qid number. +This is often referred to as poking the doorbell register. +.It Fn isc_txd_credits_update +Credit function advances the buffer ring and calculates the credits +(descriptors) processed. +Until the I/O is complete it cleans the range in case of multisegments and +updates the count of processed packets. +The function returns the number of processed credits. .El .Ss Receive Packet Functions .Bl -ohang -offset indent .It Fn isc_rxd_available -Function calculates the remaining number of descriptors from a position given by idx. The function returns this value. +Function calculates the remaining number of descriptors from a position given +by idx. +The function returns this value. .It Fn isc_rxd_refill -Starting with the physical address paddrs, the function reads a packet into the rx_ring until a value designated by count is reached. vaddrs is typically not needed and is provided for devices that place their own metadata in the packet header. +Starting with the physical address paddrs, the function reads a packet into the +rx_ring until a value designated by count is reached. +vaddrs is typically not needed and is provided for devices that place their own +metadata in the packet header. .It Fn isc_rxd_flush -Flush function updates the producer pointer on the free list flid in queue set number qid to pidx to reflect the presence of new buffers. +Flush function updates the producer pointer on the free list flid in queue set +number qid to pidx to reflect the presence of new buffers. .It Fn isc_rxd_pkt_get -Process a single software descriptor. rxr->rx_base[i] contains a descriptor that describes a received packet. Hardware specific information about the buffer referred to by ri is returned in the data structure if_rxd_info +Process a single software descriptor. +rxr->rx_base[i] contains a descriptor that describes a received packet. +Hardware specific information about the buffer referred to by ri is returned in +the data structure if_rxd_info .El -.Sh "SEE ALSO" - iflibdd(9), iflibdi(9) +.Sh SEE ALSO +.Xr iflibdd 9 , +.Xr iflibdi 9 , +.Xr mbuf 9 .Sh AUTHORS This manual page was written by .An Nicole Graziano
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703230736.v2N7acwd077657>