From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: jbenc@redhat.com, "David Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Daniel Borkmann" <dborkman@redhat.com>,
"Simon Horman" <horms@verge.net.au>,
"Paul Durrant" <Paul.Durrant@citrix.com>,
"Thomas Graf" <tgraf@suug.ch>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"Miklos Szeredi" <mszeredi@suse.cz>,
=?us-ascii?B?PT9VVEYtOD9xP1BldGVyPTIwUGFuPTI4PUU2PUJEPTk4PUU1PThEPUFC?=
=?us-ascii?B?PUU1PUI5PUIzPTI5Pz0=?= <panweiping3@gmail.com>,
netdev@vger.kernel.org
Subject: [PATCH 4/5] skbuff: skb_segment: s/fskb/list_skb/
Date: Mon, 10 Mar 2014 19:27:59 +0200 [thread overview]
Message-ID: <1394468807-25980-5-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1394468807-25980-1-git-send-email-mst@redhat.com>
fskb is unrelated to frag: it's coming from
frag_list. Rename it list_skb to avoid confusion.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
net/core/skbuff.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index af386e1..64ee4e6 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2853,7 +2853,7 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
{
struct sk_buff *segs = NULL;
struct sk_buff *tail = NULL;
- struct sk_buff *fskb = skb_shinfo(head_skb)->frag_list;
+ struct sk_buff *list_skb = skb_shinfo(head_skb)->frag_list;
skb_frag_t *frag = skb_shinfo(head_skb)->frags;
unsigned int mss = skb_shinfo(head_skb)->gso_size;
unsigned int doffset = head_skb->data - skb_mac_header(head_skb);
@@ -2894,14 +2894,14 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
if (hsize > len || !sg)
hsize = len;
- if (!hsize && i >= nfrags && skb_headlen(fskb) &&
- (skb_headlen(fskb) == len || sg)) {
- BUG_ON(skb_headlen(fskb) > len);
+ if (!hsize && i >= nfrags && skb_headlen(list_skb) &&
+ (skb_headlen(list_skb) == len || sg)) {
+ BUG_ON(skb_headlen(list_skb) > len);
i = 0;
- nfrags = skb_shinfo(fskb)->nr_frags;
- frag = skb_shinfo(fskb)->frags;
- pos += skb_headlen(fskb);
+ nfrags = skb_shinfo(list_skb)->nr_frags;
+ frag = skb_shinfo(list_skb)->frags;
+ pos += skb_headlen(list_skb);
while (pos < offset + len) {
BUG_ON(i >= nfrags);
@@ -2915,8 +2915,8 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
frag++;
}
- nskb = skb_clone(fskb, GFP_ATOMIC);
- fskb = fskb->next;
+ nskb = skb_clone(list_skb, GFP_ATOMIC);
+ list_skb = list_skb->next;
if (unlikely(!nskb))
goto err;
@@ -2983,15 +2983,15 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
while (pos < offset + len) {
if (i >= nfrags) {
- BUG_ON(skb_headlen(fskb));
+ BUG_ON(skb_headlen(list_skb));
i = 0;
- nfrags = skb_shinfo(fskb)->nr_frags;
- frag = skb_shinfo(fskb)->frags;
+ nfrags = skb_shinfo(list_skb)->nr_frags;
+ frag = skb_shinfo(list_skb)->frags;
BUG_ON(!nfrags);
- fskb = fskb->next;
+ list_skb = list_skb->next;
}
if (unlikely(skb_shinfo(nskb)->nr_frags >=
--
MST
next prev parent reply other threads:[~2014-03-10 17:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 16:29 [PATCH 0/5] skbuff: fix skb_segment with zero copy skbs Michael S. Tsirkin
2014-03-10 16:29 ` [PATCH 1/5] skbuff: skb_segment: s/frag/nskb_frag/ Michael S. Tsirkin
2014-03-10 16:29 ` [PATCH 2/5] skbuff: skb_segment: s/skb_frag/frag/ Michael S. Tsirkin
2014-03-10 16:29 ` [PATCH 3/5] skbuff: skb_segment: s/skb/head_skb/ Michael S. Tsirkin
2014-03-10 17:27 ` Michael S. Tsirkin [this message]
2014-03-10 17:40 ` [PATCH 4/5] skbuff: skb_segment: s/fskb/list_skb/ David Miller
2014-03-10 17:43 ` David Miller
2014-03-10 17:56 ` Michael S. Tsirkin
2014-03-10 20:45 ` David Miller
2014-03-10 17:28 ` [PATCH 5/5] skbuff: skb_segment: orphan frags before copying Michael S. Tsirkin
2014-03-10 21:34 ` Herbert Xu
2014-03-10 21:52 ` Michael S. Tsirkin
2014-03-10 21:56 ` Herbert Xu
2014-03-10 22:07 ` Michael S. Tsirkin
2014-03-10 22:12 ` Herbert Xu
2014-03-10 22:30 ` Michael S. Tsirkin
2014-03-11 0:39 ` Herbert Xu
2014-03-11 6:41 ` Michael S. Tsirkin
2014-03-11 7:21 ` Herbert Xu
2014-03-11 20:27 ` [PATCH 0/5] skbuff: fix skb_segment with zero copy skbs David Miller
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=1394468807-25980-5-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=Paul.Durrant@citrix.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=horms@verge.net.au \
--cc=jbenc@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mszeredi@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=panweiping3@gmail.com \
--cc=tgraf@suug.ch \
/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).