FreeBSD/sys/dev/ixl/ixl_pf_main.c
/*
 * Used to set the Tx ITR value for all of the PF LAN VSI's queues.
 * Writes to the ITR registers immediately.
 */
Used to set the Tx ITR value for all of the PF LAN VSI's queues.
Writes to the ITR registers immediately.
Used to set the Tx ITR value for all of the PF LAN VSI ' s queues . Writes to the ITR registers immediately .
static int
ixl_sysctl_pf_tx_itr(SYSCTL_HANDLER_ARGS)
{
	struct ixl_pf *pf = (struct ixl_pf *)arg1;
	device_t dev = pf->dev;
	int error = 0;
	int requested_tx_itr;
	requested_tx_itr = pf->tx_itr;
	error = sysctl_handle_int(oidp, &requested_tx_itr, 0, req);
	if ((error) || (req->newptr == NULL))
		return (error);
	if (pf->dynamic_tx_itr) {
		device_printf(dev,
		    "Cannot set TX itr value while dynamic TX itr is enabled\n");
		    return (EINVAL);
	}
	if (requested_tx_itr < 0 || requested_tx_itr > IXL_MAX_ITR) {
		device_printf(dev,
		    "Invalid TX itr value; value must be between 0 and %d\n",
		        IXL_MAX_ITR);
		return (EINVAL);
	}
	pf->tx_itr = requested_tx_itr;
	ixl_configure_tx_itr(pf);
	return (error);
}
static int ixl_sysctl_pf_tx_itr ( SYSCTL_HANDLER_ARGS ) { struct ixl_pf * pf = ( struct ixl_pf * ) arg1 ; device_t dev = pf -> dev ; int error = 0 ; int requested_tx_itr ; requested_tx_itr = pf -> tx_itr ; error = sysctl_handle_int ( oidp , & requested_tx_itr , 0 , req ) ; if ( ( error ) || ( req -> newptr == NULL ) ) return ( error ) ; if ( pf -> dynamic_tx_itr ) { device_printf ( dev , " \n " ) ; return ( EINVAL ) ; } if ( requested_tx_itr < 0 || requested_tx_itr > IXL_MAX_ITR ) { device_printf ( dev , " \n " , IXL_MAX_ITR ) ; return ( EINVAL ) ; } pf -> tx_itr = requested_tx_itr ; ixl_configure_tx_itr ( pf ) ; return ( error ) ; }
Used to set the Tx ITR value for all of the PF LAN VSI's queues.
Used to set the Tx ITR value for all of the PF LAN VSI ' s queues .