WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] Add a new style of passing GSO packets to fronte

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] Add a new style of passing GSO packets to frontends.
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Fri, 9 Jul 2010 15:59:57 +0100
Cc: Paul Durrant <Paul.Durrant@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 09 Jul 2010 08:02:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C2EE523.7060409@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <1278062893-970-1-git-send-email-paul.durrant@xxxxxxxxxx> <1278062893-970-2-git-send-email-paul.durrant@xxxxxxxxxx> <4C2EE523.7060409@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, 2010-07-03 at 08:22 +0100, Jeremy Fitzhardinge wrote:
> On 07/02/2010 10:28 AM, Paul Durrant wrote:
> > feature-gso-tcpv4-prefix uses precedes the packet data passed to
> > the frontend with a ring entry that contains the necessary
> > metadata. This style of GSO passing is required for Citrix
> > Windows PV Drivers.
> >
> > Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
> > Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > ---
> >  drivers/xen/netback/common.h     |    3 +-
> >  drivers/xen/netback/netback.c    |   43 
> > ++++++++++++++++++++++++++++++++++---
> >  drivers/xen/netback/xenbus.c     |   17 +++++++++++---
> >  include/xen/interface/io/netif.h |    4 +++
> >  4 files changed, 58 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/xen/netback/common.h b/drivers/xen/netback/common.h
> > index 857778c..1cbc4ff 100644
> > --- a/drivers/xen/netback/common.h
> > +++ b/drivers/xen/netback/common.h
> > @@ -82,7 +82,8 @@ struct xen_netif {
> >     int smart_poll;
> >  
> >     /* Internal feature information. */
> > -   u8 can_queue:1; /* can queue packets for receiver? */
> > +   u8 can_queue:1;     /* can queue packets for receiver? */
> > +   u8 gso_prefix:1;    /* use a prefix segment for GSO information */
> >  
> >     /* Allow netif_be_start_xmit() to peek ahead in the rx request
> >      * ring.  This is a prediction of what rx_req_cons will be once
> > diff --git a/drivers/xen/netback/netback.c b/drivers/xen/netback/netback.c
> > index c8f5c1b..93f0686 100644
> > --- a/drivers/xen/netback/netback.c
> > +++ b/drivers/xen/netback/netback.c
> > @@ -313,8 +313,12 @@ int netif_be_start_xmit(struct sk_buff *skb, struct 
> > net_device *dev)
> >  
> >     netbk = &xen_netbk[netif->group];
> >  
> > +   /* Drop the packet if the netif is not up or there is no carrier. */
> > +   if (unlikely(!netif_schedulable(netif)))
> > +           goto drop;
> > +
> >     /* Drop the packet if the target domain has no receive buffers. */
> > -   if (unlikely(!netif_schedulable(netif) || netbk_queue_full(netif)))
> > +   if (unlikely(netbk_queue_full(netif)))
> >             goto drop;
> >   
> 
> Are these related to the gso negotiation or a separate fix?  If they're
> separate, could I have it as a separate patch with its own description
> of the change (and if not, perhaps some comment about how this relates
> to the rest of the patch)?

I think it is just splitting the existing || clause into two separate if
statements with their own descriptive comment? IOW it's an unrelated
cleanup I guess?

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel