NetBSD Problem Report #15020

Received: (qmail 29053 invoked from network); 21 Dec 2001 09:43:00 -0000
Message-Id: <200112210940.fBL9eHl00373@laptop.precedence.co.uk>
Date: Fri, 21 Dec 2001 09:40:17 GMT
From: netbsd@precedence.co.uk
Reply-To: netbsd@precedence.co.uk
To: gnats-bugs@gnats.netbsd.org
Subject: NFS broken with sip0 on SiS630/735
X-Send-Pr-Version: 3.95

>Number:         15020
>Category:       kern
>Synopsis:       NFS gives FIFO underruns with sip0 on SiS630/735 chipsets
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 21 09:44:00 +0000 2001
>Closed-Date:    
>Last-Modified:  Sun Dec 23 01:30:01 +0000 2001
>Originator:     The Super-User
>Release:        NetBSD 1.5.2
>Organization:
Precedence Technologies Ltd
>Environment:

System: NetBSD laptop 1.5Y NetBSD 1.5Y (LAPTOP) #4: Thu Dec 20 11:22:27 GMT 2001 root@laptop:/usr/src/sys/arch/i386/compile/LAPTOP i386


>Description:
When using a SiS 630/735 chipset with integrated ethernet, medium to
heavy NFS usage will give the following errors:
sip0: discarding oversize frame (len=2047)
sip0: transmit FIFO underrun: increasing Tx drain threshold to xxx bytes
(xxx increases by 32 each time)

At this point, NFS mounts will hang.

>How-To-Repeat:
ifconfig sip0 and NFS mount a directory. In this directory untar a
fair-sized tar file. For example, mount /usr/pkgsrc over NFS and try to build
x11/xworld.
>Fix:
Fix unknown. Mounting with -r 1024 -w 1024 will work around it, but give
slow NFS performance.
>Release-Note:
>Audit-Trail:

From: Jason R Thorpe <thorpej@wasabisystems.com>
To: netbsd@precedence.co.uk
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/15020: NFS broken with sip0 on SiS630/735
Date: Sat, 22 Dec 2001 17:29:01 -0800

 --ew6BAiZeqk4r7MaW
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 On Fri, Dec 21, 2001 at 09:40:17AM +0000, netbsd@precedence.co.uk wrote:

  > sip0: discarding oversize frame (len=2047)

 Please try this patch.

 -- 
         -- Jason R. Thorpe <thorpej@wasabisystems.com>

 --ew6BAiZeqk4r7MaW
 Content-Type: text/plain; charset=us-ascii
 Content-Description: sip.patch1
 Content-Disposition: attachment; filename=foo

 Index: if_sip.c
 ===================================================================
 RCS file: /cvsroot/syssrc/sys/dev/pci/if_sip.c,v
 retrieving revision 1.44
 diff -c -r1.44 if_sip.c
 *** if_sip.c	2001/12/20 03:32:31	1.44
 --- if_sip.c	2001/12/23 01:28:48
 ***************
 *** 289,294 ****
 --- 289,296 ----
   	struct mbuf *sc_rxhead;
   	struct mbuf *sc_rxtail;
   	struct mbuf **sc_rxtailp;
 + #else
 + 	int	sc_rxbuf_len;		/* length of the Rx buffer */
   #endif /* DP83820 */
   };

 ***************
 *** 346,355 ****

   #ifdef DP83820
   #define	SIP_INIT_RXDESC_EXTSTS	__sipd->sipd_extsts = 0;
 ! #define	SIP_RXBUF_LEN		(MCLBYTES - 4)
   #else
   #define	SIP_INIT_RXDESC_EXTSTS	/* nothing */
 ! #define	SIP_RXBUF_LEN		(MCLBYTES - 1)	/* field width */
   #endif
   #define	SIP_INIT_RXDESC(sc, x)						\
   do {									\
 --- 348,362 ----

   #ifdef DP83820
   #define	SIP_INIT_RXDESC_EXTSTS	__sipd->sipd_extsts = 0;
 ! #define	SIP_RXBUF_LEN(sc)	(MCLBYTES - 4)
   #else
 + /*
 +  * Set the Rx buffer length to the maximum Ethernet packet size.  The
 +  * SiS 630/735 built-in Ethernet will sometimes report the packet length
 +  * to be the entire buffer size, especially under heavy load.
 +  */
   #define	SIP_INIT_RXDESC_EXTSTS	/* nothing */
 ! #define	SIP_RXBUF_LEN(sc)	((sc)->sc_rxbuf_len)
   #endif
   #define	SIP_INIT_RXDESC(sc, x)						\
   do {									\
 ***************
 *** 361,367 ****
   	__sipd->sipd_bufptr =						\
   	    htole32(__rxs->rxs_dmamap->dm_segs[0].ds_addr);		\
   	__sipd->sipd_cmdsts = htole32(CMDSTS_INTR |			\
 ! 	    (SIP_RXBUF_LEN & CMDSTS_SIZE_MASK));			\
   	SIP_INIT_RXDESC_EXTSTS						\
   	SIP_CDRXSYNC((sc), (x), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); \
   } while (0)
 --- 368,374 ----
   	__sipd->sipd_bufptr =						\
   	    htole32(__rxs->rxs_dmamap->dm_segs[0].ds_addr);		\
   	__sipd->sipd_cmdsts = htole32(CMDSTS_INTR |			\
 ! 	    (SIP_RXBUF_LEN((sc)) & CMDSTS_SIZE_MASK));			\
   	SIP_INIT_RXDESC_EXTSTS						\
   	SIP_CDRXSYNC((sc), (x), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); \
   } while (0)
 ***************
 *** 2023,2028 ****
 --- 2030,2040 ----
   	 * Initialize the receive descriptor and receive job
   	 * descriptor rings.
   	 */
 + #ifndef DP83820
 + 	sc->sc_rxbuf_len = ETHER_MAX_LEN;
 + 	if (sc->sc_ethercom.ec_nvlans != 0)
 + 		sc->sc_rxbuf_len += ETHER_VLAN_ENCAP_LEN;
 + #endif
   	for (i = 0; i < SIP_NRXDESC; i++) {
   		rxs = &sc->sc_rxsoft[i];
   		if (rxs->rxs_mbuf == NULL) {
 ***************
 *** 2377,2383 ****
   	}

   #if defined(DP83820)
 ! 	m->m_len = SIP_RXBUF_LEN;
   #endif /* DP83820 */

   	if (rxs->rxs_mbuf != NULL)
 --- 2389,2395 ----
   	}

   #if defined(DP83820)
 ! 	m->m_len = SIP_RXBUF_LEN(sc);
   #endif /* DP83820 */

   	if (rxs->rxs_mbuf != NULL)

 --ew6BAiZeqk4r7MaW--
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.