Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Remote Node Functions

Functions

ocs_cxn_t * ocs_hal_cxn_alloc (ocs_hal_t *hal, uint32_t conn_hdl)
 Gets a free connection structure. More...
 
ocs_hal_rtn_e ocs_hal_cxn_connect (ocs_hal_t *hal, ocs_cxn_t *cxn, ocs_hal_ip_address_t *ipaddr, uint32_t tcp_port, uint16_t window_size, uint8_t window_scale, cxn_cb_t cxn_cb, void *ul_arg)
 Establish a TCP connection from an initiator to a target. More...
 
ocs_hal_rtn_e ocs_hal_cxn_reject (ocs_hal_t *hal, uint32_t conn_hdl, cxn_cb_t cxn_cb, void *ul_arg)
 Rejects an incoming connection on a target. More...
 
ocs_hal_rtn_e ocs_hal_cxn_get_info (ocs_hal_t *hal, ocs_cxn_t *cxn, cxn_cb_t cxn_cb, void *ul_arg)
 Retrieves information about an incoming context. More...
 
static void ocs_hal_cxn_cq_select (ocs_hal_t *hal, ocs_cxn_t *cxn)
 Assign a CQ for the connection. More...
 
static void ocs_hal_cxn_cq_release (ocs_hal_t *hal, ocs_cxn_t *cxn)
 Release a CQ for the connection. More...
 
ocs_hal_rtn_e ocs_hal_cxn_offload (ocs_hal_t *hal, ocs_cxn_t *cxn, uint32_t tcp_window_size, uint8_t data_digest, uint8_t hdr_digest, uint32_t max_rcv_dsl, cxn_cb_t cxn_cb, void *ul_arg)
 Offloads an incoming connection on a target. More...
 
uint32_t ocs_hal_cxn_get_free_wq_cnt (ocs_hal_t *hal, ocs_cxn_t *cxn)
 Returns the number of free entries on the work queue for this connection. More...
 
ocs_hal_rtn_e ocs_hal_cxn_close (ocs_hal_t *hal, ocs_cxn_t *cxn, uint8_t sendRst, cxn_cb_t cxn_cb, void *ul_arg)
 Invalidates a connection and optionally sends a TCP Reset. More...
 
ocs_hal_rtn_e ocs_hal_cxn_upload (ocs_hal_t *hal, ocs_cxn_t *cxn, uint8_t graceful, cxn_cb_t cxn_cb, void *ul_arg)
 uploads an incoming connection on a target. More...
 
ocs_hal_rtn_e ocs_hal_cxn_free (ocs_hal_t *hal, ocs_cxn_t *cxn)
 Frees a connection object for re-use. More...
 

Function Details

ocs_cxn_t* ocs_hal_cxn_alloc ( ocs_hal_t *  hal,
uint32_t  conn_hdl 
)

Gets a free connection structure.

Parameters
halHardware context.
conn_hdlConnection handle received from the FW.
Returns
Returns the connection pointer, or NULL if out of resources.

Definition at line 4468 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_cxn_close ( ocs_hal_t *  hal,
ocs_cxn_t *  cxn,
uint8_t  sendRst,
cxn_cb_t  cxn_cb,
void *  ul_arg 
)

Invalidates a connection and optionally sends a TCP Reset.

Parameters
halHardware context.
cxnPointer to the connection object.
sendRstNon-zero sends a TCP reset on the connection.
cxn_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to cxn_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 5038 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_cxn_connect ( ocs_hal_t *  hal,
ocs_cxn_t *  cxn,
ocs_hal_ip_address_t *  ipaddr,
uint32_t  tcp_port,
uint16_t  window_size,
uint8_t  window_scale,
cxn_cb_t  cxn_cb,
void *  ul_arg 
)

Establish a TCP connection from an initiator to a target.

Parameters
halHardware context.
cxnPointer to the connection object.
ipaddrTarget IP address.
tcp_portTarget TCP port.
window_sizeTCP Window size to use for the connection.
window_scaleTCP window scale value to use for the connection.
cxn_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to cxn_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4551 of file ocs_hal.c.

static void ocs_hal_cxn_cq_release ( ocs_hal_t *  hal,
ocs_cxn_t *  cxn 
)
static

Release a CQ for the connection.

Description
This function will de-link the usage of a CQ for this connection.
Parameters
halHardware context.
cxnPointer to the connection object.

Definition at line 4896 of file ocs_hal.c.

static void ocs_hal_cxn_cq_select ( ocs_hal_t *  hal,
ocs_cxn_t *  cxn 
)
static

Assign a CQ for the connection.

Description
This function will attempt to find the CQ on the correct ULP with the least number of connections.
Parameters
halHardware context.
cxnPointer to the connection object.

Definition at line 4848 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_cxn_free ( ocs_hal_t *  hal,
ocs_cxn_t *  cxn 
)

Frees a connection object for re-use.

Parameters
halHardware context.
cxnPointer to the connection object.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 5141 of file ocs_hal.c.

uint32_t ocs_hal_cxn_get_free_wq_cnt ( ocs_hal_t *  hal,
ocs_cxn_t *  cxn 
)

Returns the number of free entries on the work queue for this connection.

Parameters
halHardware context.
cxnPointer to the connection object.
Returns
Returns the number of free work queue entries.

Definition at line 5013 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_cxn_get_info ( ocs_hal_t *  hal,
ocs_cxn_t *  cxn,
cxn_cb_t  cxn_cb,
void *  ul_arg 
)

Retrieves information about an incoming context.

Parameters
halHardware context.
cxnPointer to the connection object.
cxn_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to cxn_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4795 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_cxn_offload ( ocs_hal_t *  hal,
ocs_cxn_t *  cxn,
uint32_t  tcp_window_size,
uint8_t  data_digest,
uint8_t  hdr_digest,
uint32_t  max_rcv_dsl,
cxn_cb_t  cxn_cb,
void *  ul_arg 
)

Offloads an incoming connection on a target.

Parameters
halHardware context.
cxnPointer to the connection object.
tcp_window_sizeTCP window size.
data_digestSet to 1 to enable data digests.
hdr_digestSet to 1 to enable header digests.
max_rcv_dslMaximum receive data segment length.
cxn_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to cxn_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4919 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_cxn_reject ( ocs_hal_t *  hal,
uint32_t  conn_hdl,
cxn_cb_t  cxn_cb,
void *  ul_arg 
)

Rejects an incoming connection on a target.

Description
Note: This function is not using the ocs_cxn_t since most likely it is being rejected because we are out of connection objects. No callback is provided because we should not have allocated anything.
Parameters
halHardware context.
conn_hdlConnection handle received from the firmware.
cxn_cbPointer to the function to call when the operation completes. Parameter may be NULL.
ul_argPointer to the argument to pass back to cxn_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4685 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_cxn_upload ( ocs_hal_t *  hal,
ocs_cxn_t *  cxn,
uint8_t  graceful,
cxn_cb_t  cxn_cb,
void *  ul_arg 
)

uploads an incoming connection on a target.

Parameters
halHardware context.
cxnPointer to the connection object.
gracefulIf TRUE, then a graceful teardown of the socket is performed.
cxn_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to cxn_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 5096 of file ocs_hal.c.