All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Joachim <svenjoac@gmx.de>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH 4/6] sky2: reduce default Tx ring size
Date: Thu, 17 Nov 2011 22:07:25 +0100	[thread overview]
Message-ID: <874ny2bgqa.fsf@turtle.gmx.de> (raw)
In-Reply-To: <20111116234344.813201788@vyatta.com> (Stephen Hemminger's message of "Wed, 16 Nov 2011 15:42:58 -0800")

On 2011-11-17 00:42 +0100, Stephen Hemminger wrote:

> The default Tx ring size for the sky2 driver is quite large and could
> cause excess buffer bloat for many users. The minimum ring size 
> possible and still allow handling  the worst case packet on 64bit platforms
> is 38 which gets rounded up to a power of 2. But most packets only require
> a couple of ring elements.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> --- a/drivers/net/ethernet/marvell/sky2.c	2011-11-16 15:19:39.518659262 -0800
> +++ b/drivers/net/ethernet/marvell/sky2.c	2011-11-16 15:19:40.990692544 -0800
> @@ -68,7 +68,7 @@
>  #define MAX_SKB_TX_LE	(2 + (sizeof(dma_addr_t)/sizeof(u32))*(MAX_SKB_FRAGS+1))
>  #define TX_MIN_PENDING		(MAX_SKB_TX_LE+1)
>  #define TX_MAX_PENDING		1024
> -#define TX_DEF_PENDING		127
> +#define TX_DEF_PENDING		63
>  
>  #define TX_WATCHDOG		(5 * HZ)
>  #define NAPI_WEIGHT		64

It's hard to believe, but this innocuous-looking patch caused my system
to crash and burn as soon as I actually used the network.
Unfortunately, I have neither a digital camera nor a serial console at
hand, but from my recollections and having read sky2.c I conclude that

	BUG_ON(done >= sky2->tx_ring_size);

in sky2_tx_complete() seems to have been triggered.  Does this make any
sense?

Cheers,
       Sven

  reply	other threads:[~2011-11-17 21:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 23:42 [PATCH 0/6] sky2 patches for net-next Stephen Hemminger
2011-11-16 23:42 ` [PATCH 1/6] sky2: fix hang on shutdown (and other irq issues) Stephen Hemminger
2011-11-17  8:46   ` Sven Joachim
2011-11-17 17:01     ` Stephen Hemminger
2011-11-17 18:37       ` Sven Joachim
2011-11-17 19:18         ` Stephen Hemminger
2011-11-17 20:57           ` Sven Joachim
2011-11-18  0:37     ` [PATCH net-next] sky2: fix hang in napi_disable Stephen Hemminger
2011-11-18  1:52       ` David Miller
2011-11-18  2:10         ` Stephen Hemminger
2011-11-18  2:15           ` David Miller
2011-11-18  2:44       ` David Miller
2011-11-16 23:42 ` [PATCH 2/6] sky2: pci posting issues Stephen Hemminger
2011-11-16 23:42 ` [PATCH 3/6] sky2: rename up/down functions Stephen Hemminger
2011-11-16 23:42 ` [PATCH 4/6] sky2: reduce default Tx ring size Stephen Hemminger
2011-11-17 21:07   ` Sven Joachim [this message]
2011-11-17 22:41     ` Stephen Hemminger
2011-11-18  0:37     ` [PATCH net-next] sky2: enforce minimum " Stephen Hemminger
2011-11-18  2:44       ` David Miller
2011-11-16 23:42 ` [PATCH 5/6] sky2: used fixed RSS key Stephen Hemminger
2011-11-16 23:43 ` [PATCH 6/6] sky2: version 1.30 Stephen Hemminger
2011-11-17  1:36 ` [PATCH 0/6] sky2 patches for net-next David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ny2bgqa.fsf@turtle.gmx.de \
    --to=svenjoac@gmx.de \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.