From: Keir Fraser Subject: Re: [0/5] [NET]: Add TSO support Date: Thu, 29 Jun 2006 11:32:43 +0100 Message-ID: References: <20060627120240.GA748@gondor.apana.org.au> <4ce42ba97df34accef8d150fbbe251f4@cl.cam.ac.uk> <20060628140239.GA9248@gondor.apana.org.au> <20060629002020.GA16348@gondor.apana.org.au> <390960d535dacfea77754357cf9cc55e@cl.cam.ac.uk> <20060629094045.GA20816@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: <20060629094045.GA20816@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 29 Jun 2006, at 10:40, Herbert Xu wrote: > On Thu, Jun 29, 2006 at 10:02:20AM +0100, Keir Fraser wrote: >> >>> For TSO, gso_segs can be easily determined from the packet and >>> gso_size. >>> However, for GSO, we don't know the packet header length so the same >>> is >>> not true. >> >> Each segment will need a header though, I'd imagine, so whoever does >> the segmentation needs to know the packet header length? Maybe I'm >> just > > The code or chip that actually does the segmentation will obviously > know the header length. However, netback or netfront does not. > > Since Linux requires gso_segs to be set (it's used to figure out how > many packets there are going to be before segmentation takes place), > we really need to set it at the source where the packet is produced. > > For another OS that only supports TSO, they would simply have to set > gso_segs in the frontend driver. What if gso_segs, or any other gso parameter (e.g., type), is set incorrectly? The backend cannot trust frontend clients, so I'm rather worried that we could make the backend network stack crash! Also we should probably only define a XEN_GSO_TCPV4 flag for now, since we support only plain TSO right now. No skbuffs should get passed to netfront that have other GSO flags set, right? Seince we only advertise NETIF_F_TSO. -- Keir