From f7e1027f61c40eca1acc36e806b8db4cad01f221 Mon Sep 17 00:00:00 2001 From: Alexander Duyck Date: Thu, 21 Jul 2011 00:40:35 +0000 Subject: [PATCH] v2 ixgbe: Update packet buffer reservation to correct fdir headroom size This change fixes an issue in which the incorrect amount of headroom was being reserved for flow director filters. Signed-off-by: Alexander Duyck Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index fec49e6fc3b6..0283e1211390 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -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) -- 2.30.2