From: Alexander Duyck Date: Sat, 26 Jan 2013 02:08:14 +0000 (+0000) Subject: ixgbe: Update DESC_NEEDED define to adjust for changes to MAX_SKB_FRAGS X-Git-Tag: MMI-PSA29.97-13-9~15013^2~46^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=990a3158002ff19b2d665334bc7a21a8887a123d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ixgbe: Update DESC_NEEDED define to adjust for changes to MAX_SKB_FRAGS Recent changes have made it so that MAX_SKB_FRAGS is now never less than 16. As a result we were seeing issues on systems with 64K pages as it would cause DESC_NEEDED to increase to 68, and we would need over 136 descriptors free before clean_tx_irq would wake the queue. This patch makes it so that DESC_NEEDED is always MAX_SKB_FRAGS + 4. This should prevent any possible deadlocks on the systems with 64K pages as we will now only require 42 descriptors to wake. Signed-off-by: Alexander Duyck Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index 196002ba031c..a8e10cff7a89 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h @@ -156,7 +156,7 @@ struct vf_macvlans { /* Tx Descriptors needed, worst case */ #define TXD_USE_COUNT(S) DIV_ROUND_UP((S), IXGBE_MAX_DATA_PER_TXD) -#define DESC_NEEDED ((MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE)) + 4) +#define DESC_NEEDED (MAX_SKB_FRAGS + 4) /* wrapper around a pointer to a socket buffer, * so a DMA handle can be stored along with the buffer */