netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Syromiatnikov <esyr@redhat.com>
To: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: netdev@vger.kernel.org, Matt Johnston <matt@codeconstruct.com.au>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next v3] mctp: Implement extended addressing
Date: Fri, 15 Oct 2021 15:44:48 +0200	[thread overview]
Message-ID: <20211015134448.GA16157@asgard.redhat.com> (raw)
In-Reply-To: <20211014083420.2050417-1-jk@codeconstruct.com.au>

On Thu, Oct 14, 2021 at 04:34:20PM +0800, Jeremy Kerr wrote:
> This change allows an extended address struct - struct sockaddr_mctp_ext
> - to be passed to sendmsg/recvmsg. This allows userspace to specify
> output ifindex and physical address information (for sendmsg) or receive
> the input ifindex/physaddr for incoming messages (for recvmsg). This is
> typically used by userspace for MCTP address discovery and assignment
> operations.
> 
> The extended addressing facility is conditional on a new sockopt:
> MCTP_OPT_ADDR_EXT; userspace must explicitly enable addressing before
> the kernel will consume/populate the extended address data.

[...]

> +/* setsockopt(2) level & options */
> +#define SOL_MCTP		0

Socket option levels tend to be globally unique and additionally defined
in include/linux/socket.h (which led to them not being exposed to UAPI
in many cases, but that is another, entirely avoiadable, problem), with
Bluetooth socket option levels being most notable exception (and IEEE 802.15.4
and mISDN being less notable).  So, unless there is existing code that relies
on this socket level definition, it is probably worth re-defining it to 284
and put a copy of SOL_MCTP definition after SOL_XDP in include/linux/socket.h.


  reply	other threads:[~2021-10-15 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14  8:34 [PATCH net-next v3] mctp: Implement extended addressing Jeremy Kerr
2021-10-15 13:44 ` Eugene Syromiatnikov [this message]
2021-10-21  3:45   ` Jeremy Kerr

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=20211015134448.GA16157@asgard.redhat.com \
    --to=esyr@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jk@codeconstruct.com.au \
    --cc=kuba@kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=netdev@vger.kernel.org \
    /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).