Skip to content

Commit

Permalink
v2 ixgbe: Update packet buffer reservation to correct fdir headroom size
Browse files Browse the repository at this point in the history
This change fixes an issue in which the incorrect amount of headroom was
being reserved for flow director filters.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Sep 17, 2011
1 parent 4c1d7b4 commit f7e1027
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3372,15 +3372,17 @@ static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter)

static void ixgbe_configure_pb(struct ixgbe_adapter *adapter)
{
int hdrm = 0;
int num_tc = netdev_get_num_tc(adapter->netdev);
struct ixgbe_hw *hw = &adapter->hw;
int hdrm;
u8 tc = netdev_get_num_tc(adapter->netdev);

if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE ||
adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)
hdrm = 64 << adapter->fdir_pballoc;
hdrm = 32 << adapter->fdir_pballoc;
else
hdrm = 0;

hw->mac.ops.set_rxpba(&adapter->hw, num_tc, hdrm, PBA_STRATEGY_EQUAL);
hw->mac.ops.set_rxpba(hw, tc, hdrm, PBA_STRATEGY_EQUAL);
}

static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)
Expand Down

0 comments on commit f7e1027

Please sign in to comment.