Thread (1 message) 1 message, 1 author, 2017-06-22

Re: [PATCH net-next v3 02/13] sock: skb_copy_ubufs support for compound pages

From: David Miller <hidden>
Date: 2017-06-22 17:05:28
Also in: netdev

From: Willem de Bruijn <redacted>
Date: Wed, 21 Jun 2017 17:18:05 -0400
quoted hunk
@@ -958,15 +958,20 @@ EXPORT_SYMBOL_GPL(skb_morph);
  */
 int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask)
 {
-	int i;
 	int num_frags = skb_shinfo(skb)->nr_frags;
 	struct page *page, *head = NULL;
 	struct ubuf_info *uarg = skb_shinfo(skb)->destructor_arg;
+	int i, new_frags;
+	u32 d_off;
Reverse christmas tree with the local variable declarations.
+	page = head;
+	d_off = 0;
+	for (i = 0; i < num_frags; i++) {
+		u8 *vaddr;
+		skb_frag_t *f = &skb_shinfo(skb)->frags[i];
+		u32 f_off, f_size, copy;
Likewise.
+		f_off = f->page_offset;
+		f_size = f->size;
+
+		vaddr = kmap_atomic(skb_frag_page(f));
I looked at some kmap_atomic() implementations and I do not think
it supports compound pages.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help