lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 1 May 2019 07:44:57 -0700 From: Matthew Wilcox <willy@...radead.org> To: davem@...emloft.net Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>, hch@....de, netdev@...r.kernel.org Subject: [PATCH v2 7/7] net: Convert skb_frag_t to bio_vec From: "Matthew Wilcox (Oracle)" <willy@...radead.org> There are a lot of users of frag->page_offset, and of struct skb_frag_struct, so use a union and a compatibility define respectively to avoid converting those users today. Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org> --- include/linux/bvec.h | 5 ++++- include/linux/skbuff.h | 9 +++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/bvec.h b/include/linux/bvec.h index ff13cbc1887d..49a8ad6c331b 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -31,7 +31,10 @@ 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 { diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index df07b3144c77..d61d496e0083 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -18,6 +18,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> @@ -312,13 +313,9 @@ extern int sysctl_max_skb_frags; */ #define GSO_BY_FRAGS 0xFFFF -typedef struct skb_frag_struct skb_frag_t; +#define skb_frag_struct bio_vec -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 -- 2.20.1
Powered by blists - more mailing lists