Re: [PATCHv2 net-next 1/8] skb: report completion status for zero copy skbs

2 messages, 2 authors, 2012-11-01 · open the first message on its own page

Re: [PATCHv2 net-next 1/8] skb: report completion status for zero copy skbs

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2012-11-01 16:14:04

On Thu, Nov 01, 2012 at 11:50:24AM -0400, David Miller wrote:
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Wed, 31 Oct 2012 12:31:06 +0200
quoted
-void vhost_zerocopy_callback(struct ubuf_info *ubuf)
+void vhost_zerocopy_callback(struct ubuf_info *ubuf, int zerocopy_status)
If you're only reporting true/false values, even just for now,
please use 'bool' for this.
In fact next patch reports -ENOMEM when tun hits OOM so callback can
distinguish between copy (>0 value) and error (<0 value)
and reduce zerocopy more aggressively in case of errors.

The *callback* in vhost-net currently handles all non-zero
values identically, but I am not sure it's the optimal behaviour
so I thought it's worth it to give callbacks the info.

Do you think it's over-engineering, or a good idea?

-- 
MST

Re: [PATCHv2 net-next 1/8] skb: report completion status for zero copy skbs

From: David Miller <davem@davemloft.net>
Date: 2012-11-01 16:20:15

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Thu, 1 Nov 2012 18:16:11 +0200
Do you think it's over-engineering, or a good idea?
Engineer what you need, not what you might need.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help