aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/mctpdevice.h
diff options
context:
space:
mode:
authorKhang Nguyen <khangng@os.amperecomputing.com>2024-11-05 14:19:15 +0700
committerJakub Kicinski <kuba@kernel.org>2024-11-09 09:04:54 -0800
commit580db513b4a9d52f306580015a1872eea0a0894e (patch)
tree2d3f737e30bc78418500e95da8bba0ca7204b780 /include/net/mctpdevice.h
parentbonding: add ESP offload features when slaves support (diff)
downloadwireguard-linux-580db513b4a9d52f306580015a1872eea0a0894e.tar.xz
wireguard-linux-580db513b4a9d52f306580015a1872eea0a0894e.zip
net: mctp: Expose transport binding identifier via IFLA attribute
MCTP control protocol implementations are transport binding dependent. Endpoint discovery is mandatory based on transport binding. Message timing requirements are specified in each respective transport binding specification. However, we currently have no means to get this information from MCTP links. Add a IFLA_MCTP_PHYS_BINDING netlink link attribute, which represents the transport type using the DMTF DSP0239-defined type numbers, returned as part of RTM_GETLINK data. We get an IFLA_MCTP_PHYS_BINDING attribute for each MCTP link, for example: - 0x00 (unspec) for loopback interface; - 0x01 (SMBus/I2C) for mctpi2c%d interfaces; and - 0x05 (serial) for mctpserial%d interfaces. Signed-off-by: Khang Nguyen <khangng@os.amperecomputing.com> Reviewed-by: Matt Johnston <matt@codeconstruct.com.au> Link: https://patch.msgid.link/20241105071915.821871-1-khangng@os.amperecomputing.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/mctpdevice.h')
-rw-r--r--include/net/mctpdevice.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/mctpdevice.h b/include/net/mctpdevice.h
index 5c0d04b5c12c..957d9ef924c5 100644
--- a/include/net/mctpdevice.h
+++ b/include/net/mctpdevice.h
@@ -22,6 +22,7 @@ struct mctp_dev {
refcount_t refs;
unsigned int net;
+ enum mctp_phys_binding binding;
const struct mctp_netdev_ops *ops;
@@ -44,7 +45,8 @@ struct mctp_dev *mctp_dev_get_rtnl(const struct net_device *dev);
struct mctp_dev *__mctp_dev_get(const struct net_device *dev);
int mctp_register_netdev(struct net_device *dev,
- const struct mctp_netdev_ops *ops);
+ const struct mctp_netdev_ops *ops,
+ enum mctp_phys_binding binding);
void mctp_unregister_netdev(struct net_device *dev);
void mctp_dev_hold(struct mctp_dev *mdev);