From: Paolo Abeni <pabeni@redhat.com>
To: Steffen Klassert <steffen.klassert@secunet.com>, netdev@vger.kernel.org
Cc: Willem de Bruijn <willemb@google.com>,
"Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: Re: [PATCH RFC 1/3] net: Prepare GSO return values for fraglist GSO.
Date: Tue, 08 Jan 2019 14:53:52 +0100 [thread overview]
Message-ID: <7f353a949e6d8bd89a0b7b63e07cbcf3cf66b6a9.camel@redhat.com> (raw)
In-Reply-To: <20181221075334.9000-2-steffen.klassert@secunet.com>
On Fri, 2018-12-21 at 08:53 +0100, Steffen Klassert wrote:
> On fraglist GSO, we don't need to clone the original
> skb. So we don't have anything to return to free.
> Prepare GSO that it frees the original skb only
> if the return pointer really changed. Fraglist
> GSO frees the original skb itself on error and
> returns -EREMOTE in this case.
I think it would be nicer preseving the same sematic with gro list, so
that we don't have to add this special handling.
e.g. calling skb_get(skb) in skb_segment_list() when successful, would
avoid the special handling for the no error case (at the cost of 2
atomic ops per gso_list packet)
> diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
> index 4ae87c5ce2e3..1941dc2a80a0 100644
> --- a/net/xfrm/xfrm_output.c
> +++ b/net/xfrm/xfrm_output.c
> @@ -183,7 +183,8 @@ static int xfrm_output_gso(struct net *net, struct sock *sk, struct sk_buff *skb
> BUILD_BUG_ON(sizeof(*IPCB(skb)) > SKB_SGO_CB_OFFSET);
> BUILD_BUG_ON(sizeof(*IP6CB(skb)) > SKB_SGO_CB_OFFSET);
> segs = skb_gso_segment(skb, 0);
> - kfree_skb(skb);
> + if (segs != skb)
> + kfree_skb(skb);
> if (IS_ERR(segs))
what if IS_ERR(segs) == -EREMOTE here?
> return PTR_ERR(segs);
> if (segs == NULL)
next prev parent reply other threads:[~2019-01-08 13:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 7:53 [PATCH RFC 0/3] Support fraglist GRO/GSO Steffen Klassert
2018-12-21 7:53 ` [PATCH RFC 1/3] net: Prepare GSO return values for fraglist GSO Steffen Klassert
2019-01-08 13:53 ` Paolo Abeni [this message]
2019-01-14 12:53 ` Steffen Klassert
2018-12-21 7:53 ` [PATCH RFC 2/3] net: Support GRO/GSO fraglist chaining Steffen Klassert
2018-12-21 7:53 ` [PATCH RFC 3/3] udp: Support UDP fraglist GRO/GSO Steffen Klassert
2019-01-08 15:00 ` Paolo Abeni
2019-01-25 7:58 ` Steffen Klassert
2019-01-26 9:36 ` Paolo Abeni
2019-01-28 8:09 ` Steffen Klassert
2018-12-24 1:15 ` [PATCH RFC 0/3] Support " Willem de Bruijn
2018-12-26 13:09 ` Marcelo Ricardo Leitner
2019-01-14 12:50 ` Steffen Klassert
2019-01-14 17:09 ` Willem de Bruijn
2019-01-25 8:14 ` Steffen Klassert
2019-01-25 13:57 ` Willem de Bruijn
2019-01-28 7:51 ` Steffen Klassert
2019-01-28 16:46 ` Willem de Bruijn
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=7f353a949e6d8bd89a0b7b63e07cbcf3cf66b6a9.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=Jason@zx2c4.com \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
--cc=willemb@google.com \
/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).