FreeBSD/sys/dev/mxge/if_mxge.c
/* copy an array of mcp_kreq_ether_send_t's to the mcp.  Copy
   backwards one at a time and handle ring wraps */
copy an array of mcp_kreq_ether_send_t's to the mcp.  Copy
backwards one at a time and handle ring wraps
copy an array of mcp_kreq_ether_send_t ' s to the mcp . Copy backwards one at a time and handle ring wraps
static inline void
mxge_submit_req_backwards(mxge_tx_ring_t *tx,
			    mcp_kreq_ether_send_t *src, int cnt)
{
	int idx, starting_slot;
	starting_slot = tx->req;
	while (cnt > 1) {
		cnt--;
		idx = (starting_slot + cnt) & tx->mask;
		mxge_pio_copy(&tx->lanai[idx],
			      &src[cnt], sizeof(*src));
		wmb();
	}
}
static inline void mxge_submit_req_backwards ( mxge_tx_ring_t * tx , mcp_kreq_ether_send_t * src , int cnt ) { int idx , starting_slot ; starting_slot = tx -> req ; while ( cnt > 1 ) { cnt -- ; idx = ( starting_slot + cnt ) & tx -> mask ; mxge_pio_copy ( & tx -> lanai [ idx ] , & src [ cnt ] , sizeof ( * src ) ) ; wmb ( ) ; } }
copy an array of mcp_kreq_ether_send_t's to the mcp.
copy an array of mcp_kreq_ether_send_t ' s to the mcp .