public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Adam Young <admiyo@amperemail.onmicrosoft.com>,
	 admiyo@os.amperecomputing.com,
	Matt Johnston <matt@codeconstruct.com.au>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sudeep Holla <sudeep.holla@arm.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	 Huisong Li <lihuisong@huawei.com>
Subject: Re: [PATCH v6 2/2] mctp pcc: Implement MCTP over PCC Transport
Date: Tue, 05 Nov 2024 22:09:15 +0800	[thread overview]
Message-ID: <f4e3ff994fe28bb2645b5fddf1850f8fcc5d1f89.camel@codeconstruct.com.au> (raw)
In-Reply-To: <c69f83fa-a4e2-48fc-8c1a-553724828d70@amperemail.onmicrosoft.com>

Hi Adam,

> > > We need a hardware address to create a socket without an EID in
> > > order
> > > to know where we are sending the packets.
> > Just to clarify that: for physical (ie, null-EID) addressing, you
> > don't
> > need the hardware address, you need:
> > 
> >   1) the outgoing interface's ifindex; and
> >   2) the hardware address of the *remote* endpoint, in whatever
> >      format is appropriate for link type
> > 
> > In cases where there is no hardware addressing in the tx packet
> > (which
> > looks to apply to PCC), (2) is empty.
> > 
> > I understand that you're needing some mechanism for finding the
> > correct
> > ifindex, but I don't think using the device lladdr is the correct
> > approach.
> > 
> > We have this model already for mctp-over-serial, which is another
> > point-to-point link type. MCTP-over-serial devices have no hardware
> > address, as there is no hardware addressing in the packet format.
> > In
> > EID-less routing, it's up to the application to determine the
> > ifindex,
> > using whatever existing device-identification mechanism is
> > suitable.
> 
> I'd like to avoid having a custom mechanism to find the right 
> interface.  Agreed that this is really find 1) above: selecting the 
> outgoing interface.

OK, but from what you're adding later it sounds like you already have
part of that mechanism custom anyway: the mapping of a socket to a
channel index?

It sounds like there will always be some requirement for a
platform-specific inventory-mapping mechanism; you're going from socket
number to ifindex. It should be just as equivalent to implement that
using a sysfs attribute rather than the device lladdr, no?

> There is already an example of using the HW address in the interface: 
> the loopback has an address in it, for some reason. Probably because
> it is inherited from the Ethernet loopback.

Yes, and that the ethernet packet format does include a physical
address, hence the lladdr being present on lo.

> In our use case, we expect there to be two MCTP-PCC links available
> on a 
> 2 Socket System, one per socket.  The end user needs a way to know
> which 
> device talks to which socket.  In the case of a single socket system,
> there should only be one.
> 
> However, there is no telling how this mechanism will be used in the 
> future, and there may be MCTP-PCC enabled devices that are not bound
> to a CPU.

That's fine; I think finding an interface based on the channel numbers
seems generally applicable.

> Technically we get the signature field in the first four bytes of the
> PCC Generic Comunications channel Shared memory region:
> 
> https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/14_Platform_Communications_Channel/Platform_Comm_Channel.html#generic-communications-channel-shared-memory-region
> 
> "The PCC signature. The signature of a subspace is computed by a 
> bitwise-or of the value 0x50434300 with the subspace ID. For example,
> subspace 3 has the signature 0x50434303."

ok! so there is some form of addressing on the packet. Can we use this
subspace ID as a form of lladdr? Could this be interpreted as the
"destination" of a packet?

You do mention that it may not be suitable though:

> One possibility is to do another revision that uses  the SIGNATURE as
> the HW address, with an understanding that if the signature changes, 
> there will be a corresponding change in the HW address,

Is that signature format expected to change across DSP0292 versions?

Cheers,


Jeremy

  reply	other threads:[~2024-11-05 14:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29 16:54 [PATCH v6 0/2] MCTP Over PCC Transport admiyo
2024-10-29 16:54 ` [PATCH v6 1/2] mctp pcc: Check before sending MCTP PCC response ACK admiyo
2024-10-30  9:45   ` lihuisong (C)
2024-11-01  0:16     ` Adam Young
2024-11-01  1:30       ` lihuisong (C)
2024-11-02 15:34         ` Adam Young
2024-11-04  3:17           ` lihuisong (C)
2024-11-04 18:44             ` Adam Young
2024-10-29 16:54 ` [PATCH v6 2/2] mctp pcc: Implement MCTP over PCC Transport admiyo
2024-10-31  1:28   ` Jeremy Kerr
2024-10-31 15:50     ` Adam Young
2024-11-01  8:55       ` Jeremy Kerr
2024-11-01 21:19         ` Adam Young
2024-11-05 14:09           ` Jeremy Kerr [this message]
2024-11-06 15:59             ` Adam Young
2024-11-12  1:00               ` Jeremy Kerr
2024-11-13 18:41                 ` Adam Young
2024-11-05 20:16         ` Adam Young
2024-11-06 10:47           ` Jeremy Kerr
2024-10-31 11:26   ` kernel test robot
2024-10-31 12:07   ` kernel test robot
2024-10-31 12:38   ` kernel test robot
2024-10-31 13:09   ` kernel test robot

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=f4e3ff994fe28bb2645b5fddf1850f8fcc5d1f89.camel@codeconstruct.com.au \
    --to=jk@codeconstruct.com.au \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=admiyo@amperemail.onmicrosoft.com \
    --cc=admiyo@os.amperecomputing.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=lihuisong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sudeep.holla@arm.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