From: Doug Ledford <doug.ledford@hpe.com>
To: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
Slingshot Open Source Team <slingshot-os-team@groups.ext.hpe.com>
Cc: <linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Doug Ledford <doug.ledford@hpe.com>
Subject: [PATCH 03/11] RDMA/core: add Slingshot identifiers and driver-owned GIDs
Date: Fri, 30 Oct 2026 21:35:31 -0700 [thread overview]
Message-ID: <20261030-cxi-for-next-v1-3-bc6e49e07037@hpe.com> (raw)
In-Reply-To: <20261030-cxi-for-next-v1-0-bc6e49e07037@hpe.com>
Add the identifiers the CXI RDMA driver needs from the core: the
RDMA_NODE_SLINGSHOT node type and RDMA_TRANSPORT_SLINGSHOT transport,
the RDMA_CORE_CAP_PROT_SLINGSHOT port capability with the matching
rdma_protocol_slingshot() helper, and the IB_GID_TYPE_SLINGSHOT_UFH
GID type. Names are added to the sysfs, GID cache and node/transport
lookup tables so the new values are reported like any other.
A Slingshot GID carries only the 20-bit NID of the port, so the port
exposes a single GID type and does not take part in the RoCE style
netdev GID population. RDMA_CORE_PORT_SLINGSHOT combines the new
capability with RDMA_CORE_CAP_ETH_AH.
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
drivers/infiniband/core/cache.c | 3 +++
drivers/infiniband/core/nldev.c | 3 +++
drivers/infiniband/core/roce_gid_mgmt.c | 3 +++
drivers/infiniband/core/sysfs.c | 2 ++
drivers/infiniband/core/verbs.c | 2 ++
include/rdma/ib_verbs.h | 14 ++++++++++++++
include/uapi/rdma/ib_user_ioctl_verbs.h | 2 ++
include/uapi/rdma/rdma_netlink.h | 1 +
8 files changed, 30 insertions(+)
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
index d5e17a36f186..b407e5e25dbc 100644
--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -141,6 +141,7 @@ static const char * const gid_type_str[] = {
[IB_GID_TYPE_ROCE_UDP_ENCAP] = "RoCE v2",
[IB_GID_TYPE_UET_UDP] = "UET UDP",
[IB_GID_TYPE_UET_IP] = "UET IP",
+ [IB_GID_TYPE_SLINGSHOT_UFH] = "SLINGSHOT UFH",
};
const char *ib_cache_gid_type_str(enum ib_gid_type gid_type)
@@ -1404,6 +1405,8 @@ static int config_non_roce_gid_cache(struct ib_device *device,
gid_attr.device = device;
gid_attr.port_num = port;
+ if (rdma_protocol_slingshot(device, port))
+ gid_attr.gid_type = IB_GID_TYPE_SLINGSHOT_UFH;
table = rdma_gid_table(device, port);
mutex_lock(&table->lock);
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index 5313eb4849c7..97ee2f5118d6 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -350,6 +350,9 @@ static int fill_dev_info(struct sk_buff *msg, struct ib_device *device)
ret = nla_put_string(msg, RDMA_NLDEV_ATTR_DEV_PROTOCOL, "iw");
else if (rdma_protocol_roce(device, port))
ret = nla_put_string(msg, RDMA_NLDEV_ATTR_DEV_PROTOCOL, "roce");
+ else if (rdma_protocol_slingshot(device, port))
+ ret = nla_put_string(msg, RDMA_NLDEV_ATTR_DEV_PROTOCOL,
+ "slingshot");
else if (rdma_protocol_uet(device, port))
ret = nla_put_string(msg, RDMA_NLDEV_ATTR_DEV_PROTOCOL, "uet");
else if (rdma_protocol_usnic(device, port))
diff --git a/drivers/infiniband/core/roce_gid_mgmt.c b/drivers/infiniband/core/roce_gid_mgmt.c
index 214af921341a..bcdbb9e45107 100644
--- a/drivers/infiniband/core/roce_gid_mgmt.c
+++ b/drivers/infiniband/core/roce_gid_mgmt.c
@@ -77,6 +77,7 @@ static const struct {
{rdma_protocol_roce_udp_encap, IB_GID_TYPE_ROCE_UDP_ENCAP},
{rdma_protocol_uet_udp, IB_GID_TYPE_UET_UDP},
{rdma_protocol_uet_ip, IB_GID_TYPE_UET_IP},
+ {rdma_protocol_slingshot, IB_GID_TYPE_SLINGSHOT_UFH},
};
#define CAP_TO_GID_TABLE_SIZE ARRAY_SIZE(PORT_CAP_TO_GID_TYPE)
@@ -86,6 +87,8 @@ unsigned long roce_gid_type_mask_support(struct ib_device *ib_dev, u32 port)
int i;
unsigned int ret_flags = 0;
+ if (rdma_protocol_slingshot(ib_dev, port))
+ return 1UL << IB_GID_TYPE_SLINGSHOT_UFH;
if (!rdma_port_gids_from_netdev(ib_dev, port))
return 1UL << IB_GID_TYPE_IB;
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index 4cd861b5d953..5121a622f822 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -1262,6 +1262,8 @@ static const char *node_type_string(int node_type)
return "usNIC UDP";
case RDMA_NODE_UNSPECIFIED:
return "unspecified";
+ case RDMA_NODE_SLINGSHOT:
+ return "Slingshot";
}
return "<unknown>";
}
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index adcda33b04f2..77d1d71d7167 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -282,6 +282,8 @@ rdma_node_get_transport(unsigned int node_type)
return RDMA_TRANSPORT_IWARP;
if (node_type == RDMA_NODE_UNSPECIFIED)
return RDMA_TRANSPORT_UNSPECIFIED;
+ if (node_type == RDMA_NODE_SLINGSHOT)
+ return RDMA_TRANSPORT_SLINGSHOT;
return RDMA_TRANSPORT_IB;
}
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 5aa1fa576a44..c26d7e562914 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -147,6 +147,7 @@ enum ib_gid_type {
IB_GID_TYPE_ROCE_UDP_ENCAP = IB_UVERBS_GID_TYPE_ROCE_V2,
IB_GID_TYPE_UET_UDP = IB_UVERBS_GID_TYPE_UET_UDP,
IB_GID_TYPE_UET_IP = IB_UVERBS_GID_TYPE_UET_IP,
+ IB_GID_TYPE_SLINGSHOT_UFH = IB_UVERBS_GID_TYPE_SLINGSHOT_UFH,
IB_GID_TYPE_SIZE
};
@@ -171,6 +172,7 @@ enum rdma_transport_type {
RDMA_TRANSPORT_USNIC,
RDMA_TRANSPORT_USNIC_UDP,
RDMA_TRANSPORT_UNSPECIFIED,
+ RDMA_TRANSPORT_SLINGSHOT,
};
enum rdma_protocol_type {
@@ -682,6 +684,7 @@ void rdma_free_hw_stats_struct(struct rdma_hw_stats *stats);
#define RDMA_CORE_CAP_PROT_USNIC 0x02000000
#define RDMA_CORE_CAP_PROT_UET_UDP 0x04000000
#define RDMA_CORE_CAP_PROT_UET_IP 0x08000000
+#define RDMA_CORE_CAP_PROT_SLINGSHOT 0x20000000
#define RDMA_CORE_CAP_PROT_UET (RDMA_CORE_CAP_PROT_UET_UDP \
| RDMA_CORE_CAP_PROT_UET_IP)
@@ -722,6 +725,8 @@ void rdma_free_hw_stats_struct(struct rdma_hw_stats *stats);
#define RDMA_CORE_PORT_USNIC (RDMA_CORE_CAP_PROT_USNIC)
+#define RDMA_CORE_PORT_SLINGSHOT (RDMA_CORE_CAP_PROT_SLINGSHOT | RDMA_CORE_CAP_ETH_AH)
+
struct ib_port_attr {
u64 subnet_prefix;
enum ib_port_state state;
@@ -3596,6 +3601,13 @@ static inline bool rdma_protocol_uet_ip(const struct ib_device *device,
RDMA_CORE_CAP_PROT_UET_IP;
}
+static inline bool rdma_protocol_slingshot(const struct ib_device *device,
+ u32 port_num)
+{
+ return device->port_data[port_num].immutable.core_cap_flags &
+ RDMA_CORE_CAP_PROT_SLINGSHOT;
+}
+
static inline bool rdma_port_gids_from_netdev(const struct ib_device *device,
u32 port_num)
{
@@ -5219,6 +5231,8 @@ void rdma_move_ah_attr(struct rdma_ah_attr *dest, struct rdma_ah_attr *src);
static inline enum rdma_ah_attr_type rdma_ah_find_type(struct ib_device *dev,
u32 port_num)
{
+ if (rdma_protocol_slingshot(dev, port_num))
+ return RDMA_AH_ATTR_TYPE_IB;
if (rdma_protocol_roce(dev, port_num) ||
rdma_protocol_uet(dev, port_num))
return RDMA_AH_ATTR_TYPE_ROCE;
diff --git a/include/uapi/rdma/ib_user_ioctl_verbs.h b/include/uapi/rdma/ib_user_ioctl_verbs.h
index 75cdfdbdb2f7..e8e84aa034ef 100644
--- a/include/uapi/rdma/ib_user_ioctl_verbs.h
+++ b/include/uapi/rdma/ib_user_ioctl_verbs.h
@@ -258,6 +258,7 @@ enum rdma_driver_id {
RDMA_DRIVER_ERDMA,
RDMA_DRIVER_MANA,
RDMA_DRIVER_IONIC,
+ RDMA_DRIVER_CXI,
};
enum ib_uverbs_gid_type {
@@ -266,6 +267,7 @@ enum ib_uverbs_gid_type {
IB_UVERBS_GID_TYPE_ROCE_V2,
IB_UVERBS_GID_TYPE_UET_UDP,
IB_UVERBS_GID_TYPE_UET_IP,
+ IB_UVERBS_GID_TYPE_SLINGSHOT_UFH,
};
struct ib_uverbs_gid_entry {
diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index ee11c3bbbae2..69ff1dee2db6 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -158,6 +158,7 @@ enum {
RDMA_NODE_USNIC,
RDMA_NODE_USNIC_UDP,
RDMA_NODE_UNSPECIFIED,
+ RDMA_NODE_SLINGSHOT,
};
/*
--
2.56.0
next prev parent reply other threads:[~2026-10-31 4:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 4:35 [PATCH 00/11] Subject: [PATCH for-next 00/11] RDMA/cxi: add the HPE Cassini verbs driver Doug Ledford
2026-10-31 4:35 ` [PATCH 01/11] RDMA/core: read selected counters with timestamps Doug Ledford
2026-10-31 4:35 ` [PATCH 02/11] RDMA/core: allow jobs without an address table Doug Ledford
2026-10-31 4:35 ` Doug Ledford [this message]
2026-10-31 4:35 ` [PATCH 04/11] RDMA/cxi: add the native ABI and resource definitions Doug Ledford
2026-10-31 4:35 ` [PATCH 05/11] RDMA/cxi: add the auxiliary device and driver ops Doug Ledford
2026-10-31 4:35 ` [PATCH 06/11] RDMA/cxi: add explicit context LNI and PID lifetimes Doug Ledford
2026-10-31 4:35 ` [PATCH 07/11] RDMA/cxi: add VNI-isolated queue pairs Doug Ledford
2026-10-31 4:35 ` [PATCH 08/11] RDMA/cxi: add native memory registration Doug Ledford
2026-10-31 4:35 ` [PATCH 09/11] RDMA/cxi: add services jobs profiles queues and counting triggers Doug Ledford
2026-10-31 4:35 ` [PATCH 10/11] RDMA/cxi: read the NIC telemetry through counters Doug Ledford
2026-10-31 4:35 ` [PATCH 11/11] RDMA/cxi: wire the driver into the build Doug Ledford
2026-11-03 14:28 ` [PATCH 00/11] Subject: [PATCH for-next 00/11] RDMA/cxi: add the HPE Cassini verbs driver Leon Romanovsky
2026-11-03 14:30 ` Jason Gunthorpe
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=20261030-cxi-for-next-v1-3-bc6e49e07037@hpe.com \
--to=doug.ledford@hpe.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=slingshot-os-team@groups.ext.hpe.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
all inboxes | Powered by JetHome®