Re: [RFC PATCH 0/2] I3C MCTP net driver

Winiarska, Iwona
2023-05-08T18:28:00Z

On Thu, 2023-04-13 at 16:11 +0800, Matt Johnston wrote:
> This series adds an I3C transport for the kernel's MCTP network
> protocol. MCTP is a communication protocol between system components
> (BMCs, drives, NICs etc), with higher level protocols such as NVMe-MI or
> PLDM built on top of it (in userspace). It runs over various transports
> such as I2C, PCIe, or I3C.
>
> The mctp-i3c driver follows a similar approach to the kernel's existing
> mctp-i2c driver, creating a "mctpi3cX" network interface for each
> numbered I3C bus. Busses opt in to support by adding a "mctp-controller"
> property to the devicetree:
>
> &i3c0 {
>         mctp-controller;
> }

Hi,

Wouldn't creating "mctpi3cX" network interface for each I3C device rather than
I3C bus be a better fit to model MCTP over I3C?
Why are we following the mctp-i2c approach rather than mctp-serial?

MCTP over I3C is (like serial) point-to-point - connection between I3C
controller and each I3C device can be treated as separate "logical" bus (since
the only way that those devices can potentially communicate with each other is
using MCTP bridging) and, potentially, a separate MCTP network.

This would also simplify the series, as we would no longer need "mctp-
controller" property, and the driver would just follow the I3C class driver
model without the need for notifiers.

Thanks
-Iwona

>
> The driver will bind to MCTP class devices (DCR 0xCC) that are on a
> supported I3C bus. Each bus is represented by a `struct mctp_i3c_bus`
> that keeps state for the network device. An individual I3C device
> (struct mctp_i3c_device) performs operations using the "parent"
> mctp_i3c_bus object. The I3C notify/enumeration patch is needed so that
> the mctp-i3c driver can handle creating/removing mctp_i3c_bus objects as
> required.
>
> The mctp-i3c driver is using the Provisioned ID as an identifier for
> target I3C devices (the neighbour address), as that will be more stable
> than the I3C dynamic address. The driver internally translates that to a
> dynamic address for bus operations.
>
> The driver has been tested using an AST2600 platform, with Jeremy's
> In-Band Interrupt support patches. A remote endpoint has been tested
> against Qemu, as well as using the target mode support in Aspeed's
> vendor tree.
>
> I'm sending this as an RFC for linux-i3c, then will submit the mctp-i3c
> driver itself to the netdev list after it has had review here.
>
> Cheers,
> Matt
>
> Jeremy Kerr (1):
>   i3c: Add support for bus enumeration & notification
>
> Matt Johnston (1):
>   mctp i3c: MCTP I3C driver
>
>  drivers/i3c/master.c        |  35 ++
>  drivers/net/mctp/Kconfig    |   9 +
>  drivers/net/mctp/Makefile   |   1 +
>  drivers/net/mctp/mctp-i3c.c | 778 ++++++++++++++++++++++++++++++++++++
>  include/linux/i3c/master.h  |  11 +
>  5 files changed, 834 insertions(+)
>  create mode 100644 drivers/net/mctp/mctp-i3c.c
>
> --
> 2.37.2