提交 237057ad 编写于 作者: D Don Skidmore 提交者: David S. Miller

ixgbe: fix issues setting rx-usecs with legacy interrupts

Currently setting rx-usecs when the interface is in legacy interrupt
mode it is not immediate.  We were only setting EITR for each MSIx
vector and since this count would be zero for legacy mode it wasn't
set until after a reset.  This patch corrects that by checking what
mode we are in and then setting EITR accordingly.
Signed-off-by: NDon Skidmore <donald.skidmore@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 993e6f2f
...@@ -1948,6 +1948,7 @@ static int ixgbe_set_coalesce(struct net_device *netdev, ...@@ -1948,6 +1948,7 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ec) struct ethtool_coalesce *ec)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_q_vector *q_vector;
int i; int i;
if (ec->tx_max_coalesced_frames_irq) if (ec->tx_max_coalesced_frames_irq)
...@@ -1982,8 +1983,12 @@ static int ixgbe_set_coalesce(struct net_device *netdev, ...@@ -1982,8 +1983,12 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
adapter->itr_setting = 0; adapter->itr_setting = 0;
} }
for (i = 0; i < adapter->num_msix_vectors - NON_Q_VECTORS; i++) { /* MSI/MSIx Interrupt Mode */
struct ixgbe_q_vector *q_vector = adapter->q_vector[i]; if (adapter->flags &
(IXGBE_FLAG_MSIX_ENABLED | IXGBE_FLAG_MSI_ENABLED)) {
int num_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
for (i = 0; i < num_vectors; i++) {
q_vector = adapter->q_vector[i];
if (q_vector->txr_count && !q_vector->rxr_count) if (q_vector->txr_count && !q_vector->rxr_count)
/* tx vector gets half the rate */ /* tx vector gets half the rate */
q_vector->eitr = (adapter->eitr_param >> 1); q_vector->eitr = (adapter->eitr_param >> 1);
...@@ -1992,6 +1997,12 @@ static int ixgbe_set_coalesce(struct net_device *netdev, ...@@ -1992,6 +1997,12 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
q_vector->eitr = adapter->eitr_param; q_vector->eitr = adapter->eitr_param;
ixgbe_write_eitr(q_vector); ixgbe_write_eitr(q_vector);
} }
/* Legacy Interrupt Mode */
} else {
q_vector = adapter->q_vector[0];
q_vector->eitr = adapter->eitr_param;
ixgbe_write_eitr(q_vector);
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册