From: Herbert Xu Subject: Re: [PATCH][RFC] correction trouble of short message in UDP Date: Fri, 26 Jan 2007 01:21:09 +1100 Message-ID: <20070125142109.GA14378@gondor.apana.org.au> References: <20070125141719.GA13992@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20070125141719.GA13992@gondor.apana.org.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: t.horikoshi@jp.fujitsu.com, xen-devel@lists.xensource.com, xen-ia64-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Fri, Jan 26, 2007 at 01:17:19AM +1100, Herbert Xu wrote: > > diff -r bea505a69722 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c > --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Tue Jan 23 15:58:05 2007 +0000 > +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Fri Jan 26 01:14:19 2007 +1100 > @@ -138,8 +138,10 @@ static inline int netif_needs_gso(struct > > #define GRANT_INVALID_REF 0 > > -#define NET_TX_RING_SIZE __RING_SIZE((struct netif_tx_sring *)0, PAGE_SIZE) > -#define NET_RX_RING_SIZE __RING_SIZE((struct netif_rx_sring *)0, PAGE_SIZE) > +#define NET_TX_RING_SIZE \ > + (__RING_SIZE((struct netif_tx_sring *)0, PAGE_SIZE) & 255) > +#define NET_RX_RING_SIZE \ > + (__RING_SIZE((struct netif_rx_sring *)0, PAGE_SIZE) & 255) Actually this can't work because the size is independently derived in two different places... So your idea definitely sounds better. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt