Page MenuHomeFreeBSD

D57084.id.diff
No OneTemporary

D57084.id.diff

diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.c b/sys/dev/bnxt/bnxt_re/ib_verbs.c
--- a/sys/dev/bnxt/bnxt_re/ib_verbs.c
+++ b/sys/dev/bnxt/bnxt_re/ib_verbs.c
@@ -241,7 +241,7 @@
return 0;
}
-static void __to_ib_speed_width(u32 espeed, u8 lanes, u8 *speed, u8 *width)
+static void __to_ib_speed_width(u32 espeed, u8 lanes, u16 *speed, u8 *width)
{
if (!lanes) {
switch (espeed) {
@@ -342,7 +342,8 @@
{
struct bnxt_re_dev *rdev = to_bnxt_re_dev(ibdev, ibdev);
struct bnxt_qplib_dev_attr *dev_attr = rdev->dev_attr;
- u8 active_speed = 0, active_width = 0;
+ u16 active_speed = 0;
+ u8 active_width = 0;
dev_dbg(rdev_to_dev(rdev), "QUERY PORT with port_num 0x%x\n", port_num);
memset(port_attr, 0, sizeof(*port_attr));
diff --git a/sys/dev/irdma/irdma_kcompat.c b/sys/dev/irdma/irdma_kcompat.c
--- a/sys/dev/irdma/irdma_kcompat.c
+++ b/sys/dev/irdma/irdma_kcompat.c
@@ -1634,7 +1634,7 @@
props->state = IB_PORT_DOWN;
props->phys_state = IB_PORT_PHYS_STATE_DISABLED;
}
- ib_get_eth_speed(ibdev, port, (u16 *)& props->active_speed, &props->active_width);
+ ib_get_eth_speed(ibdev, port, &props->active_speed, &props->active_width);
if (rdma_protocol_roce(ibdev, 1)) {
props->gid_tbl_len = 32;
diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
--- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
+++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
@@ -155,7 +155,7 @@
return ndev;
}
-static int translate_eth_proto_oper(u32 eth_proto_oper, u8 *active_speed,
+static int translate_eth_proto_oper(u32 eth_proto_oper, u16 *active_speed,
u8 *active_width)
{
switch (eth_proto_oper) {
@@ -216,7 +216,7 @@
return 0;
}
-static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u8 *active_speed,
+static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed,
u8 *active_width)
{
switch (eth_proto_oper) {
@@ -969,7 +969,7 @@
if (err)
goto out;
- props->active_speed = (u8)ptys->ib_proto_oper;
+ props->active_speed = (u16)ptys->ib_proto_oper;
pmtu->local_port = port;
err = mlx5_core_access_pmtu(mdev, pmtu, 0);
diff --git a/sys/dev/qlnx/qlnxr/qlnxr_verbs.c b/sys/dev/qlnx/qlnxr/qlnxr_verbs.c
--- a/sys/dev/qlnx/qlnxr/qlnxr_verbs.c
+++ b/sys/dev/qlnx/qlnxr/qlnxr_verbs.c
@@ -546,7 +546,7 @@
}
static inline void
-get_link_speed_and_width(int speed, uint8_t *ib_speed, uint8_t *ib_width)
+get_link_speed_and_width(int speed, uint16_t *ib_speed, uint8_t *ib_width)
{
switch (speed) {
case 1000:
diff --git a/sys/ofed/drivers/infiniband/core/ib_uverbs_std_types_device.c b/sys/ofed/drivers/infiniband/core/ib_uverbs_std_types_device.c
--- a/sys/ofed/drivers/infiniband/core/ib_uverbs_std_types_device.c
+++ b/sys/ofed/drivers/infiniband/core/ib_uverbs_std_types_device.c
@@ -153,7 +153,8 @@
resp->subnet_timeout = attr->subnet_timeout;
resp->init_type_reply = attr->init_type_reply;
resp->active_width = attr->active_width;
- resp->active_speed = attr->active_speed;
+ /* This ABI needs to be extended to provide any speed more than IB_SPEED_NDR */
+ resp->active_speed = min_t(u16, attr->active_speed, IB_SPEED_NDR);
resp->phys_state = attr->phys_state;
resp->link_layer = rdma_port_get_link_layer(ib_dev, port_num);
}
diff --git a/sys/ofed/include/rdma/ib_verbs.h b/sys/ofed/include/rdma/ib_verbs.h
--- a/sys/ofed/include/rdma/ib_verbs.h
+++ b/sys/ofed/include/rdma/ib_verbs.h
@@ -609,7 +609,7 @@
u8 subnet_timeout;
u8 init_type_reply;
u8 active_width;
- u8 active_speed;
+ u16 active_speed;
u8 phys_state;
bool grh_required;
};

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 30, 4:54 AM (7 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35670000
Default Alt Text
D57084.id.diff (3 KB)

Event Timeline