]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: Convert skb_frag_t to bio_vec
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 23 Jul 2019 03:08:31 +0000 (20:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jul 2019 03:47:56 +0000 (20:47 -0700)
There are a lot of users of frag->page_offset, so use a union
to avoid converting those users today.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bvec.h
include/linux/skbuff.h

index a032f01e928c5e71ce805c3aa51b563b82090b87..7f2b2ea9399c7f431ec6726c44a8b5ad74104fc4 100644 (file)
 struct bio_vec {
        struct page     *bv_page;
        unsigned int    bv_len;
-       unsigned int    bv_offset;
+       union {
+               __u32           page_offset;
+               unsigned int    bv_offset;
+       };
 };
 
 struct bvec_iter {
index e849e411d1f3553fdc9cea4137908f448ca67252..718742b1c50502f1891378621d3c622ff388c008 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/compiler.h>
 #include <linux/time.h>
 #include <linux/bug.h>
+#include <linux/bvec.h>
 #include <linux/cache.h>
 #include <linux/rbtree.h>
 #include <linux/socket.h>
@@ -308,13 +309,7 @@ extern int sysctl_max_skb_frags;
  */
 #define GSO_BY_FRAGS   0xFFFF
 
-typedef struct skb_frag_struct skb_frag_t;
-
-struct skb_frag_struct {
-       struct page *bv_page;
-       unsigned int bv_len;
-       __u32 page_offset;
-};
+typedef struct bio_vec skb_frag_t;
 
 /**
  * skb_frag_size - Returns the size of a skb fragment