FreeBSD/sys/dev/nxge/xgehal/xgehal-device.c
/**
 * xge_hal_lro_init - Initiate lro resources.
 * @lro_scale: Amount of  lro memory.
 * @hldev: Hal device structure.
 * Note: For time being I am using only one LRO per device. Later on size
 * will be increased.
 */
Initiate lro resources.
@lro_scale: Amount of  lro memory.
@hldev: Hal device structure.
Note: For time being I am using only one LRO per device. Later on size
will be increased.
Initiate lro resources . @lro_scale : Amount of lro memory . @hldev : Hal device structure . Note : For time being I am using only one LRO per device . Later on size will be increased .
xge_hal_status_e
xge_hal_lro_init(u32 lro_scale,
	       xge_hal_device_t *hldev)
{
	int i;
	if (hldev->config.lro_sg_size == XGE_HAL_DEFAULT_USE_HARDCODE)
	    hldev->config.lro_sg_size = XGE_HAL_LRO_DEFAULT_SG_SIZE;
	if (hldev->config.lro_frm_len == XGE_HAL_DEFAULT_USE_HARDCODE)
	    hldev->config.lro_frm_len = XGE_HAL_LRO_DEFAULT_FRM_LEN;
	for (i=0; i < XGE_HAL_MAX_RING_NUM; i++)
	{
	    xge_os_memzero(hldev->lro_desc[i].lro_pool,
	               sizeof(lro_t) * XGE_HAL_LRO_MAX_BUCKETS);
	    hldev->lro_desc[i].lro_next_idx = 0;
	    hldev->lro_desc[i].lro_recent = NULL;
	}
	return XGE_HAL_OK;
}
xge_hal_status_e xge_hal_lro_init ( u32 lro_scale , xge_hal_device_t * hldev ) { int i ; if ( hldev -> config . lro_sg_size == XGE_HAL_DEFAULT_USE_HARDCODE ) hldev -> config . lro_sg_size = XGE_HAL_LRO_DEFAULT_SG_SIZE ; if ( hldev -> config . lro_frm_len == XGE_HAL_DEFAULT_USE_HARDCODE ) hldev -> config . lro_frm_len = XGE_HAL_LRO_DEFAULT_FRM_LEN ; for ( i = 0 ; i < XGE_HAL_MAX_RING_NUM ; i ++ ) { xge_os_memzero ( hldev -> lro_desc [ i ] . lro_pool , sizeof ( lro_t ) * XGE_HAL_LRO_MAX_BUCKETS ) ; hldev -> lro_desc [ i ] . lro_next_idx = 0 ; hldev -> lro_desc [ i ] . lro_recent = NULL ; } return XGE_HAL_OK ; }
xge_hal_lro_init - Initiate lro resources.
xge_hal_lro_init - Initiate lro resources .