[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190501144457.7942-6-willy@infradead.org>
Date: Wed, 1 May 2019 07:44:55 -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 5/7] net: Rename skb_frag page to bv_page
From: "Matthew Wilcox (Oracle)" <willy@...radead.org>
One step closer to turning the skb_frag_t into a bio_vec.
Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
---
include/linux/skbuff.h | 12 +++++-------
net/core/skbuff.c | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 9c6193a57241..a75e85226bea 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -315,9 +315,7 @@ extern int sysctl_max_skb_frags;
typedef struct skb_frag_struct skb_frag_t;
struct skb_frag_struct {
- struct {
- struct page *p;
- } page;
+ struct page *bv_page;
__u32 size;
__u32 page_offset;
};
@@ -378,7 +376,7 @@ static inline bool skb_frag_must_loop(struct page *p)
* skb_frag_foreach_page - loop over pages in a fragment
*
* @f: skb frag to operate on
- * @f_off: offset from start of f->page.p
+ * @f_off: offset from start of f->bv_page
* @f_len: length from f_off to loop over
* @p: (temp var) current page
* @p_off: (temp var) offset from start of current page,
@@ -2061,7 +2059,7 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i,
* that not all callers have unique ownership of the page but rely
* on page_is_pfmemalloc doing the right thing(tm).
*/
- frag->page.p = page;
+ frag->bv_page = page;
frag->page_offset = off;
skb_frag_size_set(frag, size);
@@ -2849,7 +2847,7 @@ static inline void skb_propagate_pfmemalloc(struct page *page,
*/
static inline struct page *skb_frag_page(const skb_frag_t *frag)
{
- return frag->page.p;
+ return frag->bv_page;
}
/**
@@ -2935,7 +2933,7 @@ static inline void *skb_frag_address_safe(const skb_frag_t *frag)
*/
static inline void __skb_frag_set_page(skb_frag_t *frag, struct page *page)
{
- frag->page.p = page;
+ frag->bv_page = page;
}
/**
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index b689e13be808..357b6b2fc58b 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3198,7 +3198,7 @@ int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen)
} else {
__skb_frag_ref(fragfrom);
- fragto->page = fragfrom->page;
+ fragto->bv_page = fragfrom->bv_page;
fragto->page_offset = fragfrom->page_offset;
skb_frag_size_set(fragto, todo);
--
2.20.1
Powered by blists - more mailing lists