All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem at davemloft.net>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: sock diag uAPI and MPTCP
Date: Sat, 20 Jun 2020 17:44:08 -0700	[thread overview]
Message-ID: <20200620.174408.1728600398443363480.davem@davemloft.net> (raw)
In-Reply-To: c5b53444ca4c79b887629c93d954dadbc4a777da.camel@redhat.com

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

From: Paolo Abeni <pabeni(a)redhat.com>
Date: Fri, 19 Jun 2020 12:54:40 +0200

> IPPROTO_MPTCP value (0x106) can't be represented using the current sock
> diag uAPI, as the 'sdiag_protocol' field is 8 bits wide.
> 
> To implement diag support for MPTCP socket, we will likely need a
> 'inet_diag_req_v3' with a wider 'sdiag_protocol'
> field. inet_diag_handler_cmd() could detect the version of
> the inet_diag_req_v* provided by user-space checking nlmsg_len() and
> convert _v2 reqs to _v3.
> 
> This change will be a bit invasive, as all in kernel diag users will
> then operate only on 'inet_diag_req_v3' (many functions' signature
> change required), but the code-related changes will be encapsulated
> by inet_diag_handler_cmd().

Another way to extend the size of a field is to add an attribute which
supercedes the header structure field when present.

We did this when we needed to make the fib rule table ID number larger,
see FRA_TABLE.

You'd only need to specify this when using protocol values larger than
8 bits in size.

WARNING: multiple messages have this Message-ID (diff)
From: David Miller <davem@davemloft.net>
To: pabeni@redhat.com
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org, mptcp@lists.01.org
Subject: Re: sock diag uAPI and MPTCP
Date: Sat, 20 Jun 2020 17:44:08 -0700 (PDT)	[thread overview]
Message-ID: <20200620.174408.1728600398443363480.davem@davemloft.net> (raw)
In-Reply-To: <c5b53444ca4c79b887629c93d954dadbc4a777da.camel@redhat.com>

From: Paolo Abeni <pabeni@redhat.com>
Date: Fri, 19 Jun 2020 12:54:40 +0200

> IPPROTO_MPTCP value (0x106) can't be represented using the current sock
> diag uAPI, as the 'sdiag_protocol' field is 8 bits wide.
> 
> To implement diag support for MPTCP socket, we will likely need a
> 'inet_diag_req_v3' with a wider 'sdiag_protocol'
> field. inet_diag_handler_cmd() could detect the version of
> the inet_diag_req_v* provided by user-space checking nlmsg_len() and
> convert _v2 reqs to _v3.
> 
> This change will be a bit invasive, as all in kernel diag users will
> then operate only on 'inet_diag_req_v3' (many functions' signature
> change required), but the code-related changes will be encapsulated
> by inet_diag_handler_cmd().

Another way to extend the size of a field is to add an attribute which
supercedes the header structure field when present.

We did this when we needed to make the fib rule table ID number larger,
see FRA_TABLE.

You'd only need to specify this when using protocol values larger than
8 bits in size.


             reply	other threads:[~2020-06-21  0:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-21  0:44 David Miller [this message]
2020-06-21  0:44 ` sock diag uAPI and MPTCP David Miller
  -- strict thread matches above, loose matches on Subject: below --
2020-06-22 10:18 [MPTCP] " Paolo Abeni
2020-06-22 10:18 ` Paolo Abeni
2020-06-19 10:54 [MPTCP] " Paolo Abeni
2020-06-19 10:54 ` Paolo Abeni

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=20200620.174408.1728600398443363480.davem@davemloft.net \
    --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.