netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: davem@davemloft.net
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	hch@lst.de, netdev@vger.kernel.org
Subject: [PATCH v3 5/7] net: Rename skb_frag page to bv_page
Date: Mon, 22 Jul 2019 20:08:29 -0700	[thread overview]
Message-ID: <20190723030831.11879-6-willy@infradead.org> (raw)
In-Reply-To: <20190723030831.11879-1-willy@infradead.org>

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

One step closer to turning the skb_frag_t into a bio_vec.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.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 b9dc8b4f24b1..8076e2ba8349 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -311,9 +311,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;
 };
@@ -374,7 +372,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,
@@ -2084,7 +2082,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);
 
@@ -2872,7 +2870,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;
 }
 
 /**
@@ -2958,7 +2956,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 e32081709a0d..0acaf55fc482 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3364,7 +3364,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


  parent reply	other threads:[~2019-07-23  3:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23  3:08 [PATCH v3 0/7] Convert skb_frag_t to bio_vec Matthew Wilcox
2019-07-23  3:08 ` [PATCH v3 1/7] net: Use skb accessors in network drivers Matthew Wilcox
2019-07-23  3:08 ` [PATCH v3 2/7] net: Use skb accessors in network core Matthew Wilcox
2019-07-23  3:56   ` Yunsheng Lin
2019-07-23 11:17     ` Matthew Wilcox
2019-07-23  3:08 ` [PATCH v3 3/7] net: Increase the size of skb_frag_t Matthew Wilcox
2019-07-23  3:08 ` [PATCH v3 4/7] net: Reorder the contents " Matthew Wilcox
2019-07-23  3:08 ` Matthew Wilcox [this message]
2019-07-23  3:08 ` [PATCH v3 6/7] net: Rename skb_frag_t size to bv_len Matthew Wilcox
2019-07-24 10:49   ` David Laight
2019-07-24 11:41     ` Matthew Wilcox
2019-07-24 18:46       ` David Miller
2019-07-23  3:08 ` [PATCH v3 7/7] net: Convert skb_frag_t to bio_vec Matthew Wilcox
2019-07-23  3:48 ` [PATCH v3 0/7] " David Miller
2019-07-25 16:26 ` Jonathan Lemon
  -- strict thread matches above, loose matches on Subject: below --
2019-07-12 13:43 Matthew Wilcox
2019-07-12 13:43 ` [PATCH v3 5/7] net: Rename skb_frag page to bv_page Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190723030831.11879-6-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=davem@davemloft.net \
    --cc=hch@lst.de \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).