pciv_send - enable communication between PCI SR-IOV PF and VF drivers
#include <sys/sunddi.h> int pciv_send(dev_info_t *dip, pciv_pvp_req_t *req);
Pointer to the dev_info structure.
Pointer to pciv_pvp_req structure.
typedef struct pciv_pvp_req { int pvp_dstfunc; caddr_t pvp_buf; size_t pvp_nbyte; buf_cb_t pvp_cb; caddr_t pvp_cb_arg; uint_t pvp_flag; } pciv_pvp_req_t
VF index ranges from 1 to num_vf if called by PF driver. PCIV_PF if the caller is a VF driver.
Buffer address of caller's buffer to be sent.
Number of bytes to be transmitted, which must be less than 8k.
Call back function pointer if the pvp_flag is set as PCIV_NOWAIT.
Call back input argument for pvp_cb if the pvp_flag is set as PCIV_NOWAIT.
Must be one of the following:
Do not wait for receiver's acknowledgment response.
Wait until receiver acknowledges the transmission (default).
The pciv_send() function is used by SR-IOV (Single-Root IO Virtualization)-capable PF (Physical Function) and VF (Virtual Function) drivers to communicate with each other. A PF driver can communicate with any of its VF drivers while a VF driver can only communicate with its PF driver. If pvp_flag is set to PCIV_NOWAIT, the call returns immediately and the callback routine in pvp_cb is called when data in pvp_buf has been transmitted to the destination. The caller is then allowed to free the buffer in its callback routine.
typedef void (*buf_cb_t)(int rc, caddr_t buf, size_t size, caddr_t cb_arg);
DDI return code for the transmission.
Buffer address of caller's buffer to be sent.
Number of bytes to be transmitted.
Input argument the caller set when calling pciv_send().
The pciv_send() function returns:
The buffer has been sent successfully.
The device/driver does not support this operation. The caller may use other mechanisms, such as hardware mailbox.
The pvp_nbyte or pvp_dstfunc argument is invalid.
The operation failed due to lack of resources.
The remote end did not register a call back to handle incoming transmission.
The call failed due unspecified reasons.
The pciv_send() function can be called from kernel non-interrupt context.
See attributes(7) for descriptions of the following attributes:
|