FreeBSD/sys/dev/ixl/if_ixl.c
/*
 * Sanity check and save off tunable values.
 */
Sanity check and save off tunable values.
Sanity check and save off tunable values .
static int
ixl_save_pf_tunables(struct ixl_pf *pf)
{
	device_t dev = pf->dev;
	pf->enable_msix = ixl_enable_msix;
	pf->max_queues = ixl_max_queues;
	pf->ringsz = ixl_ring_size;
	pf->enable_tx_fc_filter = ixl_enable_tx_fc_filter;
	pf->dynamic_rx_itr = ixl_dynamic_rx_itr;
	pf->dynamic_tx_itr = ixl_dynamic_tx_itr;
	pf->tx_itr = ixl_tx_itr;
	pf->rx_itr = ixl_rx_itr;
	pf->dbg_mask = ixl_core_debug_mask;
	pf->hw.debug_mask = ixl_shared_debug_mask;
	if (ixl_ring_size < IXL_MIN_RING
	     || ixl_ring_size > IXL_MAX_RING
	     || ixl_ring_size % IXL_RING_INCREMENT != 0) {
		device_printf(dev, "Invalid ring_size value of %d set!\n",
		    ixl_ring_size);
		device_printf(dev, "ring_size must be between %d and %d, "
		    "inclusive, and must be a multiple of %d\n",
		    IXL_MIN_RING, IXL_MAX_RING, IXL_RING_INCREMENT);
		return (EINVAL);
	}
	return (0);
}
static int ixl_save_pf_tunables ( struct ixl_pf * pf ) { device_t dev = pf -> dev ; pf -> enable_msix = ixl_enable_msix ; pf -> max_queues = ixl_max_queues ; pf -> ringsz = ixl_ring_size ; pf -> enable_tx_fc_filter = ixl_enable_tx_fc_filter ; pf -> dynamic_rx_itr = ixl_dynamic_rx_itr ; pf -> dynamic_tx_itr = ixl_dynamic_tx_itr ; pf -> tx_itr = ixl_tx_itr ; pf -> rx_itr = ixl_rx_itr ; pf -> dbg_mask = ixl_core_debug_mask ; pf -> hw . debug_mask = ixl_shared_debug_mask ; if ( ixl_ring_size < IXL_MIN_RING || ixl_ring_size > IXL_MAX_RING || ixl_ring_size % IXL_RING_INCREMENT != 0 ) { device_printf ( dev , " \n " , ixl_ring_size ) ; device_printf ( dev , " " " \n " , IXL_MIN_RING , IXL_MAX_RING , IXL_RING_INCREMENT ) ; return ( EINVAL ) ; } return ( 0 ) ; }
Sanity check and save off tunable values.
Sanity check and save off tunable values .
/* Save tunable information */