|
@@ -2116,6 +2116,7 @@ static int __i40e_set_coalesce(struct net_device *netdev,
|
|
|
struct i40e_netdev_priv *np = netdev_priv(netdev);
|
|
|
struct i40e_vsi *vsi = np->vsi;
|
|
|
struct i40e_pf *pf = vsi->back;
|
|
|
+ u16 intrl_reg;
|
|
|
int i;
|
|
|
|
|
|
if (ec->tx_max_coalesced_frames_irq || ec->rx_max_coalesced_frames_irq)
|
|
@@ -2127,8 +2128,9 @@ static int __i40e_set_coalesce(struct net_device *netdev,
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- if (ec->rx_coalesce_usecs_high >= INTRL_REG_TO_USEC(I40E_MAX_INTRL)) {
|
|
|
- netif_info(pf, drv, netdev, "Invalid value, rx-usecs-high range is 0-235\n");
|
|
|
+ if (ec->rx_coalesce_usecs_high > INTRL_REG_TO_USEC(I40E_MAX_INTRL)) {
|
|
|
+ netif_info(pf, drv, netdev, "Invalid value, rx-usecs-high range is 0-%lu\n",
|
|
|
+ INTRL_REG_TO_USEC(I40E_MAX_INTRL));
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
@@ -2141,7 +2143,12 @@ static int __i40e_set_coalesce(struct net_device *netdev,
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- vsi->int_rate_limit = ec->rx_coalesce_usecs_high;
|
|
|
+ intrl_reg = i40e_intrl_usec_to_reg(ec->rx_coalesce_usecs_high);
|
|
|
+ vsi->int_rate_limit = INTRL_REG_TO_USEC(intrl_reg);
|
|
|
+ if (vsi->int_rate_limit != ec->rx_coalesce_usecs_high) {
|
|
|
+ netif_info(pf, drv, netdev, "Interrupt rate limit rounded down to %d\n",
|
|
|
+ vsi->int_rate_limit);
|
|
|
+ }
|
|
|
|
|
|
if (ec->tx_coalesce_usecs == 0) {
|
|
|
if (ec->use_adaptive_tx_coalesce)
|