Thread (1 message) 1 message, 1 author, 2018-09-10

Re: [PATCH net-next 04/11] tuntap: simplify error handling in tun_build_skb()

From: Jason Wang <hidden>
Date: 2018-09-10 03:44:26


On 2018年09月07日 22:17, Michael S. Tsirkin wrote:
On Fri, Sep 07, 2018 at 11:22:00AM +0800, Jason Wang wrote:
quoted
quoted
quoted
@@ -1668,6 +1668,9 @@ static struct sk_buff *tun_build_skb(struct tun_struct *tun,
   	if (copied != len)
   		return ERR_PTR(-EFAULT);
+	get_page(alloc_frag->page);
+	alloc_frag->offset += buflen;
+
This adds an atomic op on XDP_DROP which is a data path
operation for some workloads.
Yes, I have patch on top to amortize this, the idea is to have a very big
refcount once after the frag was allocated and maintain a bias and decrease
them all when allocating new frags.'
Why bother with refcounting for a drop though? It should be simple.
Right, let me fix this.

Thanks
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help