From: Rusty Russell <rusty@rustcorp.com.au>
To: brking@linux.vnet.ibm.com
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Xen Mailing List <xen-devel@lists.xensource.com>,
"jmk@plan9.bell-labs.com" <jmk@plan9.bell-labs.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
kvm-devel <kvm-devel@lists.sourceforge.net>,
virtualization <virtualization@lists.linux-foundation.org>,
Christian Borntraeger <cborntra@de.ibm.com>,
Latchesar Ionkov <lionkov@lanl.gov>,
Suzanne McIntosh <skranjac@us.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [PATCH RFC 2/3] Virtio draft III: example net driver
Date: Thu, 28 Jun 2007 21:20:40 +1000 [thread overview]
Message-ID: <1183029641.12401.36.camel@localhost.localdomain> (raw)
In-Reply-To: <467FDEAD.4030204@linux.vnet.ibm.com>
On Mon, 2007-06-25 at 10:26 -0500, Brian King wrote:
> I've started to look at these patches to figure out how easily I
> could convert the ibmveth driver to use this new infrastructure
> and have ran into a few issues. So far the two biggest issues I've
> encountered are:
Hi Brian,
Thanks for looking at this! Sorry for the slow reply, I've been
travelling.
> 1. The add_inbuf interface passes an sg list. This causes problems for
> ibmveth since its rx buffers cannot be scatterlists.
> 2. The user of this API does not have access to the sk_buf. This causes
> issues for ibmveth since it needs to reserve the first 8 bytes of the
> rx buffer for use by the firmware. It currently uses skb_reserve to do this.
>
> Would it be simpler to just pass an sk_buf rather than the scatterlist
> on these interfaces for virtio_net users?
It would be easier, but not suitable for block and other devices which
use the same interface. Fortunately, I think there are solutions to
your issues.
1. 1500 byte packets will always be 1 sg long (ie. you should BUG_ON()
if that ever happens). The issue is MTU > PAGE_SIZE, where I was
planning to allocate discontig pages. I can't quite see what your
maximum supported MTU is, though?
2. The header problem is difficult (I can't resist pointing out that if
you had sg receive capability, it would be trivial 8). The two
possibilities are to have get_buf take a "unsigned long *off" as well,
or to have ibm_veth do a memmove.
memmove sounds horrible at first glance, but since the hypervisor has
just copied the packet I'm not sure we'll notice in practice.
Benchmarking should tell...
BTW, after Avi's comments I have a new virtio draft, but still debugging
my implementation. It doesn't effect this discussion, but would involve
churn for an actual implementation if you've gotten that far...
Thanks,
Rusty.
next prev parent reply other threads:[~2007-06-28 11:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 12:02 [PATCH RFC 0/3] Virtio draft II Rusty Russell
2007-06-07 12:04 ` [PATCH RFC 1/3] Virtio draft II: virtio.h Rusty Russell
[not found] ` <1181217867.14054.195.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-07 12:05 ` [PATCH RFC 2/3] Virtio draft II: example block driver Rusty Russell
[not found] ` <1181217920.14054.196.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-07 12:07 ` [PATCH RFC 3/3] Virtio draft II: example net driver Rusty Russell
2007-06-07 12:19 ` [PATCH RFC 2/3] Virtio draft II: example block driver Avi Kivity
[not found] ` <4667F7C0.3070604-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-08 1:11 ` Rusty Russell
[not found] ` <1181217762.14054.192.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-16 13:12 ` [PATCH RFC 0/3] Virtio draft III Rusty Russell
[not found] ` <1181999552.6237.255.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-16 13:14 ` [PATCH RFC 1/3] Virtio draft III: virtio.h Rusty Russell
[not found] ` <1181999669.6237.257.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-16 13:17 ` [PATCH RFC 2/3] Virtio draft III: example net driver Rusty Russell
[not found] ` <1181999825.6237.260.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-16 13:18 ` [PATCH RFC 3/3] Virtio draft III: example block driver Rusty Russell
[not found] ` <1181999920.6237.263.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-16 13:28 ` [PATCH] Lguest implemention of virtio draft III Rusty Russell
[not found] ` <1182000514.6237.273.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-16 13:50 ` Arnd Bergmann
2007-06-17 14:25 ` [PATCH RFC 3/3] Virtio draft III: example block driver Avi Kivity
[not found] ` <46754451.2010305-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-18 8:08 ` Rusty Russell
[not found] ` <1182154095.19064.24.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-18 9:09 ` Avi Kivity
[not found] ` <46764BB5.6070704-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-19 6:27 ` Rusty Russell
[not found] ` <1182234466.19064.51.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-19 8:34 ` Avi Kivity
2007-06-25 15:26 ` [PATCH RFC 2/3] Virtio draft III: example net driver Brian King
[not found] ` <467FDEAD.4030204-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-06-25 19:33 ` Christoph Hellwig
[not found] ` <20070625193304.GB25736-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2007-06-25 21:54 ` Avi Kivity
[not found] ` <46803999.4040500-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-25 22:13 ` Brian King
[not found] ` <46803E0E.7080103-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-06-25 22:20 ` Avi Kivity
2007-06-28 11:20 ` Rusty Russell [this message]
[not found] ` <1183029641.12401.36.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-28 15:55 ` Brian King
2007-06-17 14:14 ` [PATCH RFC 0/3] Virtio draft III Avi Kivity
[not found] ` <467541DF.5060907-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-18 7:48 ` [Xen-devel] " Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1183029641.12401.36.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=brking@linux.vnet.ibm.com \
--cc=cborntra@de.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=jmk@plan9.bell-labs.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=lionkov@lanl.gov \
--cc=schwidefsky@de.ibm.com \
--cc=sfr@canb.auug.org.au \
--cc=skranjac@us.ibm.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox