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