Commit 8842d285 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by David S. Miller
Browse files

net: Convert skb_frag_t to bio_vec



There are a lot of users of frag->page_offset, so use a union
to avoid converting those users today.

Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b8b576a1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -18,8 +18,11 @@
struct bio_vec {
	struct page	*bv_page;
	unsigned int	bv_len;
	union {
		__u32		page_offset;
		unsigned int	bv_offset;
	};
};

struct bvec_iter {
	sector_t		bi_sector;	/* device address in 512 byte
+2 −7
Original line number Diff line number Diff line
@@ -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