From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [RFC PATCH] Squash-to: "tcp: Prevent coalesce/collapse when skb has MPTCP extensions"
Date: Thu, 19 Dec 2019 03:02:38 +0100 [thread overview]
Message-ID: <20191219020238.GB795@breakpoint.cc> (raw)
In-Reply-To: alpine.OSX.2.21.1912181557200.32925@mjmartin-mac01.local
[-- Attachment #1: Type: text/plain, Size: 1875 bytes --]
Mat Martineau <mathew.j.martineau(a)linux.intel.com> wrote:
> > moving bits from skb1 to skb2, as the mapping in skb2 will already
> > fit, and mapping in skb1 will be dropped as/if needed.
> >
> > When coalescing to a newly allocated skb, we transfer the relevant
> > extension to. An MPTCP specific helper is added for that goal,
> > possibly we could use/create a generic one.
> >
> > Completely untested, just to collect early feedback.
> >
> > Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
> > ---
> > include/net/mptcp.h | 38 ++++++++++++++++++++++++++++++++++++++
> > include/net/tcp.h | 2 +-
> > net/ipv4/tcp_input.c | 9 +++++----
> > 3 files changed, 44 insertions(+), 5 deletions(-)
> >
> > diff --git a/include/net/mptcp.h b/include/net/mptcp.h
> > index 43ddfdf9e4a3..8a702e7566e6 100644
> > --- a/include/net/mptcp.h
> > +++ b/include/net/mptcp.h
> > @@ -27,17 +27,55 @@ struct mptcp_ext {
> >
> > #ifdef CONFIG_MPTCP
> >
> > +static inline void mptcp_skb_ext_move(struct sk_buff *to,
> > + const struct sk_buff *from)
> > +{
> > + skb_ext_put(to);
>
> We don't want to accidentally free the ext. Since the refcount is part of
> the ext (not the skb), better to leave it unchanged. It may or may not be
> referenced by other skbs.
Maybe change this so that the extension from the first skb is carried
over.
This should be fine because mptcp_skb_can_collapse() told us
that the extensions are the same.
> > + to->active_extensions = from->active_extensions;
> > + to->extensions = from->extensions;
> > + from->extensions = NULL;
> > + from->active_extensions = 0;
> > +}
>
> For the "move" case, do we care if there are active non-MPTCP extensions?
I don't think so. Current code doesn't copy/consider them and with
exception of mptcp they have no meaning/use anymore at this point.
next reply other threads:[~2019-12-19 2:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 2:02 Florian Westphal [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-12-19 8:53 [MPTCP] Re: [RFC PATCH] Squash-to: "tcp: Prevent coalesce/collapse when skb has MPTCP extensions" Paolo Abeni
2019-12-19 8:49 Paolo Abeni
2019-12-19 1:54 Florian Westphal
2019-12-19 0:37 Mat Martineau
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=20191219020238.GB795@breakpoint.cc \
--to=unknown@example.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.