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 7/7] net: Convert skb_frag_t to bio_vec
Date: Fri, 12 Jul 2019 06:43:45 -0700 [thread overview]
Message-ID: <20190712134345.19767-8-willy@infradead.org> (raw)
In-Reply-To: <20190712134345.19767-1-willy@infradead.org>
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
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>
---
include/linux/bvec.h | 5 ++++-
include/linux/skbuff.h | 9 ++-------
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index a032f01e928c..7f2b2ea9399c 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -18,7 +18,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 e849e411d1f3..718742b1c505 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -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
--
2.20.1
next prev parent reply other threads:[~2019-07-12 13:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-12 13:43 [PATCH v3 0/7] Convert skb_frag_t to bio_vec Matthew Wilcox
2019-07-12 13:43 ` [PATCH v3 1/7] net: Use skb accessors in network drivers Matthew Wilcox
2019-07-12 13:43 ` [PATCH v3 2/7] net: Use skb accessors in network core Matthew Wilcox
2019-07-12 13:43 ` [PATCH v3 3/7] net: Increase the size of skb_frag_t Matthew Wilcox
2019-07-12 13:43 ` [PATCH v3 4/7] net: Reorder the contents " Matthew Wilcox
2019-07-23 22:29 ` Saeed Mahameed
2019-07-24 1:28 ` Matthew Wilcox
2019-07-24 17:55 ` Saeed Mahameed
2019-07-12 13:43 ` [PATCH v3 5/7] net: Rename skb_frag page to bv_page Matthew Wilcox
2019-07-12 13:43 ` [PATCH v3 6/7] net: Rename skb_frag_t size to bv_len Matthew Wilcox
2019-07-23 22:33 ` Saeed Mahameed
2019-07-24 1:30 ` Matthew Wilcox
2019-07-24 17:58 ` Saeed Mahameed
2019-07-12 13:43 ` Matthew Wilcox [this message]
2019-07-12 18:27 ` [PATCH v3 0/7] Convert skb_frag_t to bio_vec David Miller
2019-07-22 20:39 ` Matthew Wilcox
2019-07-22 20:45 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2019-07-23 3:08 Matthew Wilcox
2019-07-23 3:08 ` [PATCH v3 7/7] net: " 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=20190712134345.19767-8-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