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

RE: [Xen-devel] RE: GPLPV: Respecting SG capability

To: "Russ Blaine" <russell.blaine@xxxxxxx>
Subject: RE: [Xen-devel] RE: GPLPV: Respecting SG capability
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Fri, 19 Jun 2009 22:39:14 +1000
Cc: Mark Johnson <Mark.Johnson@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 19 Jun 2009 05:39:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A3AC05A.3020209@xxxxxxx>
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>
References: <49F5FA5A.7060204@xxxxxxx> <AEC6C66638C05B468B556EA548C1A77D0162D2A3@trantor> <4A3AC05A.3020209@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnwZlbYtrdAqkjXT6m+uNF2okhRnQAcdy5w
Thread-topic: [Xen-devel] RE: GPLPV: Respecting SG capability
> Another piece of future work will be to have
> the net driver disable sg if the backend doesn't have "feature-sg" set
to 1 in
> xenstore.

I've just pushed a fix for that - config-sg should now be disabled of
feature-sg is 0 in the backend. Let me know how it goes (nothing
actually uses config-sg yet though).

Contrary to my ramblings in the previous email, it may just be best to
allocate a bunch of MTU sized buffers and coalesce to those instead, as
you have done.

So the patch will need to check for !config_sg and:
. Make sure that TSO can only be a maximum of PAGE_SIZE (assuming sun
supports TSO at all under Xen?)
. Don't allocate the header buffers
. Allocate packet buffers - NET_TX_RING_SIZE (256 I think) should be
enough
. Don't make the call to NdisMInitializeScatterGatherDma at all
. Don't get ScatterGatherListPacketInfo at all (it won't exist due to
the absence of the above call)
. Most of the rest of what you did, except not to hbs but to the new
buffers

The reason for not calling NdisMInitializeScatterGatherDma when
!config_sg is that it's expensive if we aren't going to use it.

Does that sound like something you can put together?

Also remember that NdisMAllocateSharedMemory calls my DMA_ADAPTER code
in xenpci_pdo which constructs a bus-centric ('logical') address of
((GREF << PAGE_SHIFT) | page_offset), eg the grant table ref is encoded
into the logical address, and the lower PAGE_SHIFT (12) bits remain the
same as the virtual address. This is why the xennet driver doesn't have
to bother allocating grant references - the bus driver does it all for
it.

James


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

<Prev in Thread] Current Thread [Next in Thread>