[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1408485647.7404.3.camel@LTIRV-MCHAN1.corp.ad.broadcom.com>
Date: Tue, 19 Aug 2014 15:00:47 -0700
From: Michael Chan <mchan@...adcom.com>
To: Benjamin Poirier <bpoirier@...e.de>
CC: Prashant Sreedharan <prashant@...adcom.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] tg3: Limit minimum tx queue wakeup threshold
On Tue, 2014-08-19 at 11:52 -0700, Benjamin Poirier wrote:
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index 3ac5d23..b11c0fd 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -202,7 +202,8 @@ static inline void _tg3_flag_clear(enum TG3_FLAGS flag, unsigned long *bits)
> #endif
>
> /* minimum number of free TX descriptors required to wake up TX process */
> -#define TG3_TX_WAKEUP_THRESH(tnapi) ((tnapi)->tx_pending / 4)
> +#define TG3_TX_WAKEUP_THRESH(tnapi) max_t(u32, (tnapi)->tx_pending / 4, \
> + MAX_SKB_FRAGS + 1)
I think we should precompute this and store it in something like
tp->tx_wake_thresh.
> #define TG3_TX_BD_DMA_MAX_2K 2048
> #define TG3_TX_BD_DMA_MAX_4K 4096
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists