All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Paasch <cpaasch at apple.com>
To: mptcp at lists.01.org
Subject: Re: [MPTCP] [RFC PATCH v3 05/16] tcp: Add IPPROTO_SUBFLOW
Date: Wed, 10 Oct 2018 13:15:01 -0700	[thread overview]
Message-ID: <20181010201501.GD36310@MacBook-Pro-19.local> (raw)
In-Reply-To: 1539200845.19533.14.camel@intel.com

[-- Attachment #1: Type: text/plain, Size: 3429 bytes --]

On 10/10/18 - 19:47:29, Krystad, Peter wrote:
> On Tue, 2018-10-09 at 20:35 -0700, Mat Martineau wrote:
> > On Tue, 9 Oct 2018, Matthieu Baerts wrote:
> > 
> > > On Sat, Oct 6, 2018 at 1:04 AM Mat Martineau
> > > <mathew.j.martineau(a)linux.intel.com> wrote:
> > > > 
> > > > From: Peter Krystad <peter.krystad(a)intel.com>
> > > > 
> > > > IANA protocol numbers fit in a single byte, however the protocol field
> > > > of struct inet_protosw is an unsigned short so defining IPPROTO_SUBFLOW
> > > > as a 16-bit value greater than 0xFF with the same LSB as IPPROTO_TCP is
> > > > convenient for registering a unique protocol with inet_register_protosw()
> > > > that still transmits packets with IPPROTO_TCP as the protocol number.
> > > 
> > > Should we then call it IPPROTO_TCP_SUBFLOW? :)
> > > 
> > 
> > Hopefully we won't need a special IPPROTO_ for the subflows in the long 
> > run. It could be defined internally for kernel code with some checks to 
> > prevent userspace-owned sockets of this type. Since the MPTCP kernel code 
> > has complete control over the subflow sockets, maybe we could create 
> > regular TCP sockets and modify them before using them (kind of like ULP 
> > does, but without using the ULP infrastructure between an MPTCP socket and 
> > its subflows).
> > 
> > Mat
> > 
> The purpose of my approach with IPPROTO_SUBFLOW was it reduced a lot of
> impacts to the TCP code by allowing overriding all the 'struct proto'
> routines, and defining the sock structure size as the size of
> subflow_sock. Tradeoff would be more "if (sk->is_mptcp)" hooks in TCP
> code.

Yes, I think it's a good approach to have a separate struct proto for
subflows.


Christoph

> 
> Peter.
> 
> > 
> > > > 
> > > > Signed-off-by: Peter Krystad <peter.krystad(a)intel.com>
> > > > ---
> > > >  include/uapi/linux/in.h | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > > 
> > > > diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h
> > > > index f65975c801e5..6986aecd0f46 100644
> > > > --- a/include/uapi/linux/in.h
> > > > +++ b/include/uapi/linux/in.h
> > > > @@ -78,6 +78,8 @@ enum {
> > > >  #define IPPROTO_MPLS           IPPROTO_MPLS
> > > >    IPPROTO_RAW = 255,           /* Raw IP packets                       */
> > > >  #define IPPROTO_RAW            IPPROTO_RAW
> > > > +  IPPROTO_SUBFLOW = 262,       /* Multipath TCP (IPPROTO_TCP | 0x100)  */
> > > > +#define IPPROTO_SUBFLOW                IPPROTO_SUBFLOW
> > > >    IPPROTO_MAX
> > > >  };
> > > >  #endif
> > > > --
> > > > 2.19.1
> > > > 
> > > > _______________________________________________
> > > > mptcp mailing list
> > > > mptcp(a)lists.01.org
> > > > https://lists.01.org/mailman/listinfo/mptcp
> > > 
> > > 
> > > 
> > > -- 
> > > Matthieu Baerts | R&D Engineer
> > > matthieu.baerts(a)tessares.net
> > > Tessares SA | Hybrid Access Solutions
> > > www.tessares.net
> > > 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium
> > > 
> > > Disclaimer: https://www.tessares.net/mail-disclaimer/
> > > 
> > 
> > --
> > Mat Martineau
> > Intel OTC
> > _______________________________________________
> > mptcp mailing list
> > mptcp(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/mptcp
> _______________________________________________
> mptcp mailing list
> mptcp(a)lists.01.org
> https://lists.01.org/mailman/listinfo/mptcp

             reply	other threads:[~2018-10-10 20:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 20:15 Christoph Paasch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-10-11 12:33 [MPTCP] [RFC PATCH v3 05/16] tcp: Add IPPROTO_SUBFLOW Matthieu Baerts
2018-10-10 21:04 Mat Martineau
2018-10-10 19:47 Krystad, Peter
2018-10-10  3:35 Mat Martineau
2018-10-09 13:37 Matthieu Baerts
2018-10-05 22:59 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=20181010201501.GD36310@MacBook-Pro-19.local \
    --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.