Commit edd2ea55 authored by Mallikarjuna R Chilakala's avatar Mallikarjuna R Chilakala Committed by David S. Miller

ixgbe: Use rx buffer length from rx ring for configuring rscctl

While configuring rscctl use rx buffer length from rx ring structure
instead of passing rx_buf_len to ixgbe_configure_rscctl
Signed-off-by: default avatarMallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 94b982b2
...@@ -2066,18 +2066,18 @@ static u32 ixgbe_setup_mrqc(struct ixgbe_adapter *adapter) ...@@ -2066,18 +2066,18 @@ static u32 ixgbe_setup_mrqc(struct ixgbe_adapter *adapter)
* ixgbe_configure_rscctl - enable RSC for the indicated ring * ixgbe_configure_rscctl - enable RSC for the indicated ring
* @adapter: address of board private structure * @adapter: address of board private structure
* @index: index of ring to set * @index: index of ring to set
* @rx_buf_len: rx buffer length
**/ **/
static void ixgbe_configure_rscctl(struct ixgbe_adapter *adapter, int index, static void ixgbe_configure_rscctl(struct ixgbe_adapter *adapter, int index)
int rx_buf_len)
{ {
struct ixgbe_ring *rx_ring; struct ixgbe_ring *rx_ring;
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
int j; int j;
u32 rscctrl; u32 rscctrl;
int rx_buf_len;
rx_ring = &adapter->rx_ring[index]; rx_ring = &adapter->rx_ring[index];
j = rx_ring->reg_idx; j = rx_ring->reg_idx;
rx_buf_len = rx_ring->rx_buf_len;
rscctrl = IXGBE_READ_REG(hw, IXGBE_RSCCTL(j)); rscctrl = IXGBE_READ_REG(hw, IXGBE_RSCCTL(j));
rscctrl |= IXGBE_RSCCTL_RSCEN; rscctrl |= IXGBE_RSCCTL_RSCEN;
/* /*
...@@ -2285,7 +2285,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) ...@@ -2285,7 +2285,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
/* Enable 82599 HW-RSC */ /* Enable 82599 HW-RSC */
for (i = 0; i < adapter->num_rx_queues; i++) for (i = 0; i < adapter->num_rx_queues; i++)
ixgbe_configure_rscctl(adapter, i, rx_buf_len); ixgbe_configure_rscctl(adapter, i);
/* Disable RSC for ACK packets */ /* Disable RSC for ACK packets */
IXGBE_WRITE_REG(hw, IXGBE_RSCDBU, IXGBE_WRITE_REG(hw, IXGBE_RSCDBU,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment