Subject: Re: kern/31323 (vge on !i386 is broken.)
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 11/25/2006 16:40:03
The following reply was made to PR kern/31323; it has been noted by GNATS.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: mrt@notwork.org
Cc: gnats-bugs@NetBSD.org, kern-bug-people@NetBSD.org,
	netbsd-bugs@NetBSD.org, gnats-admin@NetBSD.org, tsutsui@NetBSD.org,
	tsutsui@ceres.dti.ne.jp
Subject: Re: kern/31323 (vge on !i386 is broken.)
Date: Sun, 26 Nov 2006 01:37:53 +0900

 > Anyway, I have a small question while reading current if_vge.c
 > (rev. 1.27).  Could you tell me why VGE_RX_PAD is defined as 0 in
 > the case of !defined(__NO_STRICT_ALIGNMENT).
 
 IIRC, to have less #ifdef in vge_rxeof() in case of receiving
 multi-fragment packets:
 
 >		if (rxstat & VGE_RXPKT_SOF) {
 >			m->m_len = MCLBYTES - VGE_RX_PAD;
  :
 >		if (sc->sc_rx_mhead != NULL) {
 >			m->m_len = total_len % (MCLBYTES - VGE_RX_PAD);
 
 Maybe it's better to have proper macro to represent RX bufsize.
 
 > I think, if
 > VGE_RX_PAD is 0 in the case of !defined(__NO_STRICT_ALIGNMENT),
 > following ifdef block in vge_newbuf() (around line 1060) seems to
 > have no difference in the both cases.  Logic flipped?
 
 No. VGE_RX_PAD should always be 4 once it's removed from vge_rxeof().
 
 Anyway, I'll fix it later to avoid confusion. Thanks.
 ---
 Izumi Tsutsui