lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111117144142.3447f15c@nehalam.linuxnetplumber.net>
Date:	Thu, 17 Nov 2011 14:41:42 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Sven Joachim <svenjoac@....de>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH 4/6] sky2: reduce default Tx ring size

On Thu, 17 Nov 2011 22:07:25 +0100
Sven Joachim <svenjoac@....de> wrote:

> 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@...tta.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?
> 

If that is triggering then something is really odd because that means
the ring index went past the end of the ring and wasn't wrapped correctly.


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ