DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_nic_tx_cb_t(3udi)


Network transmit control block

SYNOPSIS

#include <udi.h>

typedef struct {

	udi_cb_t gcb;

	udi_nic_tx_cb_t *chain;

	udi_buf_t *tx_buf;

	udi_boolean_t completion_urgent;

} udi_nic_tx_cb_t;
 
/* Network Transmit Control Block Group Number */
 
#define  UDI_NIC_TX_CB_NUM				6
 

MEMBERS gcb is the generic control block header which includes a pointer to the scratch space associated with this block and the channel context for the associated channel. The driver may use the scratch space while it owns the control block, but the values are not guaranteed to persist across channel operations.

chain is a pointer to the next udi_nic_tx_cb_t structure (and associated packet buffer) for this operation. The ND and NSR will use this field to "batch" a number of transmit requests or ready's into a single metalanguage operation. The ND, NSR, or environment are free to divide the chain at any point and implement explicit operations for each resulting portion of the chain, but performance concerns would indicate that processing the entire chain as a batch is highly desirable. The end of the chain is indicated by a NULL pointer.

tx_buf is the buffer describing the packet to be transmitted This field must be NULL for the udi_nsr_tx_rdy operation and is used only for the udi_nd_tx_req and udi_nd_exp_tx_req operations, for which the contents of the buffer are guaranteed to be preserved across a channel.

completion_urgent is a hint to the ND that the NSR or UDI environment considers the associated packet buffer to be a critical resource and that it should be returned (via udi_buf_free) as quickly as possible after the transmit completes. This field is ignored for the udi_nsr_tx_rdy operation.

DESCRIPTION The udi_nic_tx_cb_t structure is passed from the ND to the NSR to indicate a capability for transmitting a packet; the NSR subsequently attaches a packet buffer to this control block and returns it to the ND for transmission. The NSR can only pass packets to the ND when it has available control blocks, thereby implementing flow control between the ND and the NSR by requiring the ND to supply the NSR with all usable udi_nic_tx_cb_t structures (i.e. the NSR must not allocate control blocks of this type).

This control block must be declared by specifying the control block index value UDI_NIC_TX_CB_NUM in a udi_cb_init_t in the driver's udi_init_info.

The ND obtains the udi_nic_tx_cb_t structure by calling udi_cb_alloc with a cb_idx that has been defined for the UDI_NIC_TX_CB_NUM control block.

REFERENCES udi_nsr_tx_rdy, udi_nd_tx_req, udi_init_info, udi_cb_init_t, udi_cb_alloc


UDI NIC Driver Specification Contents