[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1A42CE6F5F474C41B63392A5F80372B21F58CD9A@shsmsx501.ccr.corp.intel.com>
Date: Wed, 23 Jun 2010 16:09:40 +0800
From: "Dong, Eddie" <eddie.dong@...el.com>
To: "Xin, Xiaohui" <xiaohui.xin@...el.com>,
Herbert Xu <herbert@...dor.apana.org.au>
CC: Stephen Hemminger <shemminger@...tta.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mst@...hat.com" <mst@...hat.com>, "mingo@...e.hu" <mingo@...e.hu>,
"davem@...emloft.net" <davem@...emloft.net>,
"jdike@...ux.intel.com" <jdike@...ux.intel.com>,
"Dong, Eddie" <eddie.dong@...el.com>
Subject: RE: [RFC PATCH v7 01/19] Add a new structure for skb buffer from
external.
> 3) As I have mentioned above, with this idea, netdev_alloc_skb() will
> allocate
> as usual, the data pointed by skb->data will be copied into the first
> guest buffer.
> That means we should reserve sufficient room in guest buffer. For PS
> mode
> supported driver (for example ixgbe), the room will be more than 128.
> After 128bytes,
> we will put the first frag data. Look into virtio-net.c the function
> page_to_skb()
> and receive_mergeable(), that means we should modify guest virtio-net
> driver to
> compute the offset as the parameter for skb_set_frag().
>
> How do you think about this? Attached is a patch to how to modify the
> guest driver.
> I reserve 512 bytes as an example, and transfer the header len of the
> skb in hdr->hdr_len.
>
Xiaohui & Herbert:
Mixing copy of head & 0-copy of bulk data imposes additional challange to find the guest buffer. The backend driver may be unable to find a spare guest buffer from virtqueue at that time which may block the receiving process then.
Can't we completely eliminate netdev_alloc_skb here? Assigning guest buffer at this time makes life much easier.
Thx, Eddie
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists