Re: [RFC PATCH] Subject: virtio: Add unused buffers detach from vring
- From: "Michael S. Tsirkin" <mst@xxxxxxxxxx>
- Date: Tue, 15 Dec 2009 23:14:50 +0200
On Tue, Dec 15, 2009 at 11:14:07AM -0800, Shirley Ma wrote:
Hello Michael,
On Tue, 2009-12-15 at 20:47 +0200, Michael S. Tsirkin wrote:
+ detach_buf(vq, i);
+ END_USE(vq);
+ return vq->data[i];
In fact, this will return NULL always, won't it?
Nope, I changed the destroy to detach and return the buffers without
destroying them within the call. I thought it might be useful in some
other case.
Maybe I should put destroy call back?
Thanks
Shirley
No I think it's good as is, we do not need a callback.
I was simply saying that detach_buf sets data to NULL,
so return vq->data[i] after detach does not make sense.
You need to save data as comment below says.c
--
MST
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH v2 0/4] Defer skb allocation for both mergeable buffers and big packets in virtio_net
- From: Shirley Ma
- PATCH v2 3/4] Defer skb allocation -- new recvbuf alloc & receive calls
- From: Shirley Ma
- Re: PATCH v2 3/4] Defer skb allocation -- new recvbuf alloc & receive calls
- From: Michael S. Tsirkin
- Re: PATCH v2 3/4] Defer skb allocation -- new recvbuf alloc & receive calls
- From: Shirley Ma
- Re: PATCH v2 3/4] Defer skb allocation -- new recvbuf alloc & receive calls
- From: Michael S. Tsirkin
- Re: PATCH v2 3/4] Defer skb allocation -- new recvbuf alloc & receive calls
- From: Shirley Ma
- Re: PATCH v2 3/4] Defer skb allocation -- new recvbuf alloc & receive calls
- From: Michael S. Tsirkin
- [RFC PATCH] Subject: virtio: Add unused buffers detach from vring
- From: Shirley Ma
- Re: [RFC PATCH] Subject: virtio: Add unused buffers detach from vring
- From: Michael S. Tsirkin
- Re: [RFC PATCH] Subject: virtio: Add unused buffers detach from vring
- From: Shirley Ma
- [PATCH v2 0/4] Defer skb allocation for both mergeable buffers and big packets in virtio_net
- Prev by Date: [patch] GPIO support for HTC Dream
- Next by Date: Re: [PATCH] Fix compilation error of drivers/staging/panel/panel.c w/ custom lcd charset
- Previous by thread: Re: [RFC PATCH] Subject: virtio: Add unused buffers detach from vring
- Next by thread: [PATCH v2 4/4] Defer skb allocation -- change allocation & receiving in recv path
- Index(es):
Relevant Pages
|