From mboxrd@z Thu Jan 1 00:00:00 1970 From: annie li Subject: Re: netchannel vs MAX_SKB_FRAGS (Was: Re: [PATCH] xen/netfront: handle compound page fragments on transmit) Date: Fri, 23 Nov 2012 23:08:48 +0800 Message-ID: <50AF9180.7020701@oracle.com> References: <1353403286.18229.159.camel@zakaz.uk.xensource.com> <1353411606-15940-1-git-send-email-ian.campbell@citrix.com> <50AB856D02000078000A9EFD@nat28.tlf.novell.com> <1353418516.13542.38.camel@zakaz.uk.xensource.com> <50AB990602000078000A9F5B@nat28.tlf.novell.com> <1353420865.13542.44.camel@zakaz.uk.xensource.com> <50ABA29902000078000A9FB1@nat28.tlf.novell.com> <1353424014.13542.49.camel@zakaz.uk.xensource.com> <1353425308.2590.11.camel@edumazet-glaptop> <1353426878.13542.59.camel@zakaz.uk.xensource.com> <1353427456.13542.65.camel@zakaz.uk.xensource.com> <50AED1A8.30607@oracle.com> <1353662328.13542.173.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1353662328.13542.173.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: KonradRzeszutekWilk , xen-devel List-Id: xen-devel@lists.xenproject.org On 2012-11-23 17:18, Ian Campbell wrote: > On Fri, 2012-11-23 at 01:30 +0000, ANNIE LI wrote: > >> It is hard to negotiate this between netfront and netback for different >> packets. >> > You wouldn't negotiate for each packet, you would negotiate at start of > day. > > You'd also need some sort of fallback for the case where you end up > negotiating something smaller than the maximum your upper layer network > stack might give you. I suppose you'd have to do segmentation somewhere > along the line. (We have this problem now, and the Linux implementation > just ignores it and drops the frames.) What I am thinking is, this negotiation would be implemented during xenbus communication. * netback provides its default value in xenstore * netfront read out this value and compared this value with itself, then write back the larger one netback = netfront, use the same value netback > netfront, use netfront value and netfront does not need more slots netback < netfront, use netfront value and netfront does not need to do segmentation. But if netfront's total frag numbers exceed the max frag number of dom0(like linux's MAX_SKB_FRAGS), segmentation is needed for this kind of packets? * netback read out the negotiated value from xenstore It seems changing current netback to per-VIF is necessary(persistent grant benefit from it too), and every different vif in netback maintains its own value. Thanks Annie