02.08.2013 Views

P4080 PCIe Adapter SDK User Guide Production Release

P4080 PCIe Adapter SDK User Guide Production Release

P4080 PCIe Adapter SDK User Guide Production Release

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Freescale Semiconductor<br />

cmd_fd: FD used to form the response command FD. It returns the modified form of<br />

“cmd_fd” with “type” and “sub_type” fields set accordingly.<br />

struct p4080_fd {<br />

u16 type;<br />

u16 sub_type;<br />

u32 __reserved;<br />

u64 phys_addr_of_buff;<br />

u64 cookie;<br />

struct qm_fd qman_fd;<br />

}<br />

o type – Hardware function type<br />

o sub_type – For denoting sub commands in a Hardware Function<br />

o __reserved – Used for SKB headroom and tail rooms. Also used for marking<br />

command completion status.<br />

o phys_addr_of_buff – Physical address of SKB data<br />

o cookie – Virtual address of the SKB<br />

o qman_fd – Qman File Descriptor.<br />

/**<br />

* API: pkt_drv_confirm_cmd_response : It confirms the completion of the<br />

* command processing in the “__reserved” field of the “struct p4080_fd”<br />

* structure by setting it to “1”. Prior to invoking this API, the caller<br />

* needs to have invoked the pkt_drv_enqueue_cmd_response() API to ensure<br />

* in-order delivery of the command response.<br />

* Though the pkt_drv_enqueue_cmd_response()<br />

* API enqueues the response commands FD into the Rx command ring, it<br />

* doesn’t confirm command completion. This API enables the Host to see the<br />

* command response.<br />

*<br />

* @cmd_fd – Pointer to the FD whose completion status has to be set.<br />

*/<br />

The prototype of this API is as follows.<br />

void pkt_drv_confirm_cmd_response(struct p4080_fd *fd);<br />

DMA<br />

/**<br />

cmd_fd: FD for which the “__reserved” field is set to notify that this response command<br />

can be processed.<br />

© Freescale Semiconductor, Inc., 2011. All rights reserved.<br />

Freescale Confidential Proprietary Page 59

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!