From: Keir Fraser Subject: Re: [1/4] [NET] back: Fix maximum fragment check Date: Fri, 30 Jun 2006 15:36:49 +0100 Message-ID: <6119c0c588ef3a01c19119bda86298fd@cl.cam.ac.uk> References: <20060629094045.GA20816@gondor.apana.org.au> <20060629124614.GA21911@gondor.apana.org.au> <20060629132608.GA22343@gondor.apana.org.au> <20060629230834.GA26561@gondor.apana.org.au> <20060630024047.GA29185@gondor.apana.org.au> <20060630124703.GA23466@gondor.apana.org.au> <69ce918a310b3e9597230c7d8521eed3@cl.cam.ac.uk> <20060630132141.GA23719@gondor.apana.org.au> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060630132141.GA23719@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: Herbert Xu Cc: Xen Development Mailing List List-Id: xen-devel@lists.xenproject.org On 30 Jun 2006, at 14:21, Herbert Xu wrote: > However, this really needs to be a bit mask because we'll have things > like ECN and other protocol-specific bits in future. In fact the > upstream Linux tree has an ECN bit now. > > The exclusivity will be checked by Linux (I've already submitted > patches > to do this). I'm not at all bothered about having the type format the same as in Linux. How about we split the type into protocol (being a proper enumeration) and proto_flags (being a protocol-specific bitmask)? Might there be any non-proto-specific flags in future? >> In the latest changes I'd rather have feature-gso list the supported >> protocols as strings (tcpv4,udpv4,etc). > > Well then I might as well go back to the one int per-bit thing with > 'feature-tso', 'feature-ufo', etc. It's much easier than parsing > strings. I'm not too bothered either way, but I personally prefer having the more properly qualified names listed under feature-gso. Pulling it apart with strstr() in netfront (for each proto that netfront can deal with) wouldn't be hard. >> Also, what happens if netfront does the following bad things: >> 1. gso.type doesn't actually match the protocol type? > > This is checked by Linux due to the 'dodgy' bit. The code isn't in > the net-gso patch yet because for now it only has one protocol. > The upstream code should have it tomorrow as we're about to add TSO6. Do we then need the 'type' at all? What is it actually used for -- I'd assume the network stack would demux to the correct protocol code as it would for any ordinary packet, so why does it need help with the protocol for GSO packets? Thanks! Keir