Various cleanups
cover Various cleanups
From: Leon Romanovsky <[email protected]>
Various simple cleanups to mlx4, mlx5 and core.
Parav Pandit (10):
IB/mlx5: Move mlx5_port_caps from mlx5_core_dev to mlx5_ib_dev IB/mlx5: Avoid calling query device for reading pkey table length IB/mlx5: Support default partition key for representor port IB/mlx5: Improve query port for representor port RDMA/core: Introduce and use API to read port immutable data IB/mlx5: Use rdma_for_each_port for port iteration IB/mlx5: Return appropriate error code instead of ENOMEM IB/cm: Avoid a loop when device has 255 ports
IB/mlx4: Use port iterator and validation APIs IB/core: Use valid port number to check link layer
drivers/infiniband/core/cm.c | 8 +- drivers/infiniband/core/device.c | 14 +++ drivers/infiniband/core/verbs.c | 4 +- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx4/sysfs.c | 4 +- drivers/infiniband/hw/mlx5/mad.c | 10 +- drivers/infiniband/hw/mlx5/main.c | 137 +++++++-------------------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 9 +- drivers/infiniband/hw/mlx5/odp.c | 4 - drivers/infiniband/hw/mlx5/qp.c | 20 ++-- drivers/infiniband/hw/mlx5/wr.c | 2 +- include/linux/mlx5/driver.h | 8 -- include/rdma/ib_verbs.h | 3 + 13 files changed, 84 insertions(+), 141 deletions(-)
--
2.29.2
PATCH 1/10 IB/mlx5: Move mlx5_port_caps from mlx5_core_dev to mlx5_ib_dev
From: Parav Pandit <[email protected]>
mlx5_port_caps are RDMA specific capabilities. These are not used by the mlx5_core_device at all. Move them to mlx5_ib_dev where it is used and reduce the scope of it to multiple drivers.
--- drivers/infiniband/hw/mlx5/mad.c | 8 ++++---- drivers/infiniband/hw/mlx5/main.c | 14 ++++++-------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 8 ++++++++ drivers/infiniband/hw/mlx5/qp.c | 6 +++--- drivers/infiniband/hw/mlx5/wr.c | 2 +- include/linux/mlx5/driver.h | 8 -------- 6 files changed, 22 insertions(+), 24 deletions(-)
drivers/infiniband/hw/mlx5/mad.c +4 -4
@@ -48,7 +48,7 @@ static bool can_do_mad_ifc(struct mlx5_ib_dev *dev, u8 port_num,if (in_mad->mad_hdr.mgmt_class !=IB_MGMT_CLASS_SUBN_LID_ROUTED && in_mad->mad_hdr.mgmt_class !=IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE )return true; -return dev->mdev->port_caps[port_num -1 ].has_smi; +return dev->port_caps[port_num -1 ].has_smi; } static int mlx5_MAD_IFC(struct mlx5_ib_dev *dev, int ignore_mkey,
@@ -299,7 +299,7 @@ int mlx5_query_ext_port_caps(struct mlx5_ib_dev *dev, u8 port) packet_error =be16_to_cpu (out_mad->status); - dev->mdev->port_caps[port -1 ].ext_port_cap = (!err && !packet_error) ? + dev->port_caps[port -1 ].ext_port_cap = (!err && !packet_error) ?MLX_EXT_PORT_CAP_FLAG_EXTENDED_PORT_INFO :0 ; out:
@@ -549,7 +549,7 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u8 port, props->port_cap_flags =be32_to_cpup ((__be32 *)(out_mad->data +20 )); props->gid_tbl_len = out_mad->data[50 ]; props->max_msg_sz =1 <<MLX5_CAP_GEN (mdev, log_max_msg); - props->pkey_tbl_len = mdev->port_caps[port -1 ].pkey_table_len; + props->pkey_tbl_len = dev->port_caps[port -1 ].pkey_table_len; props->bad_pkey_cntr =be16_to_cpup ((__be16 *)(out_mad->data +46 )); props->qkey_viol_cntr =be16_to_cpup ((__be16 *)(out_mad->data +48 )); props->active_width = out_mad->data[31 ] &0xf ;
@@ -589,7 +589,7 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u8 port,/* If reported active speed is QDR, check if is FDR-10 */ if (props->active_speed ==4 ) { -if (mdev->port_caps[port -1 ].ext_port_cap & +if (dev->port_caps[port -1 ].ext_port_cap &MLX_EXT_PORT_CAP_FLAG_EXTENDED_PORT_INFO ) {init_query_mad (in_mad); in_mad->attr_id =MLX5_ATTR_EXTENDED_PORT_INFO ;
drivers/infiniband/hw/mlx5/main.c +6 -8
@@ -2960,8 +2960,8 @@ static int set_has_smi_cap(struct mlx5_ib_dev *dev)int err;int port; -for (port =1 ; port <=ARRAY_SIZE (dev->mdev->port_caps); port++) { - dev->mdev->port_caps[port -1 ].has_smi = false; +for (port =1 ; port <=ARRAY_SIZE (dev->port_caps); port++) { + dev->port_caps[port -1 ].has_smi = false;if (MLX5_CAP_GEN (dev->mdev, port_type) ==MLX5_CAP_PORT_TYPE_IB ) {if (MLX5_CAP_GEN (dev->mdev, ib_virt)) {
@@ -2973,10 +2973,10 @@ static int set_has_smi_cap(struct mlx5_ib_dev *dev) port, err);return err; } - dev->mdev->port_caps[port -1 ].has_smi = + dev->port_caps[port -1 ].has_smi = vport_ctx.has_smi; }else { - dev->mdev->port_caps[port -1 ].has_smi = true; + dev->port_caps[port -1 ].has_smi = true; } } }
@@ -3018,10 +3018,8 @@ static int __get_port_caps(struct mlx5_ib_dev *dev, u8 port) goto out; } - dev->mdev->port_caps[port -1 ].pkey_table_len = - dprops->max_pkeys; - dev->mdev->port_caps[port -1 ].gid_table_len = - pprops->gid_tbl_len; + dev->port_caps[port -1 ].pkey_table_len = dprops->max_pkeys; + dev->port_caps[port -1 ].gid_table_len = pprops->gid_tbl_len;mlx5_ib_dbg (dev,"port %d: pkey_table_len %d, gid_table_len %d\n" , port, dprops->max_pkeys, pprops->gid_tbl_len);
drivers/infiniband/hw/mlx5/mlx5_ib.h +8 -0
@@ -1033,6 +1033,13 @@ struct mlx5_var_table {u64 num_var_hw_entries; }; +struct mlx5_port_caps { +int gid_table_len; +int pkey_table_len; +bool has_smi; +u8 ext_port_cap; +}; +struct mlx5_ib_dev {struct ib_device ib_dev;struct mlx5_core_dev *mdev;
@@ -1088,6 +1095,7 @@ struct mlx5_ib_dev {struct mlx5_var_table var_table;struct xarray sig_mrs; +struct mlx5_port_caps port_caps[MLX5_MAX_PORTS ]; };static inline struct mlx5_ib_cq *to_mibcq (struct mlx5_core_cq *mcq)
drivers/infiniband/hw/mlx5/qp.c +3 -3
@@ -3178,10 +3178,10 @@ static int mlx5_set_path(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,if (ah_flags &IB_AH_GRH ) {if (grh->sgid_index >= - dev->mdev->port_caps[port -1 ].gid_table_len) { + dev->port_caps[port -1 ].gid_table_len) {pr_err ("sgid_index (%u) too large. max is %d\n" , grh->sgid_index, - dev->mdev->port_caps[port -1 ].gid_table_len); + dev->port_caps[port -1 ].gid_table_len);return -EINVAL ; } }
@@ -4313,7 +4313,7 @@ int mlx5_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,if (attr_mask &IB_QP_PKEY_INDEX ) { port = attr_mask &IB_QP_PORT ? attr->port_num : qp->port;if (attr->pkey_index >= - dev->mdev->port_caps[port -1 ].pkey_table_len) { + dev->port_caps[port -1 ].pkey_table_len) {mlx5_ib_dbg (dev,"invalid pkey index %d\n" , attr->pkey_index); goto out;
drivers/infiniband/hw/mlx5/wr.c +1 -1
@@ -1369,7 +1369,7 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,handle_qpt_uc (wr, &seg, &size);break ;case IB_QPT_SMI : -if (unlikely (!mdev->port_caps[qp->port -1 ].has_smi)) { +if (unlikely (!dev->port_caps[qp->port -1 ].has_smi)) {mlx5_ib_warn (dev,"Send SMP MADs is not allowed\n" ); err = -EPERM ; *bad_wr = wr;
include/linux/mlx5/driver.h +0 -8
@@ -305,13 +305,6 @@ struct mlx5_cmd {struct mlx5_cmd_stats *stats; }; -struct mlx5_port_caps { -int gid_table_len; -int pkey_table_len; -u8 ext_port_cap; -bool has_smi; -}; -struct mlx5_cmd_mailbox {void *buf;dma_addr_t dma;
@@ -697,7 +690,6 @@ struct mlx5_core_dev {u8 rev_id;char board_id[MLX5_BOARD_ID_LEN ];struct mlx5_cmd cmd; -struct mlx5_port_caps port_caps[MLX5_MAX_PORTS ];struct {u32 hca_cur[MLX5_CAP_NUM ][MLX5_UN_SZ_DW (hca_cap_union)];u32 hca_max[MLX5_CAP_NUM ][MLX5_UN_SZ_DW (hca_cap_union)];
--
2.29.2
PATCH 2/10 IB/mlx5: Avoid calling query device for reading pkey table length
In reply to Leon RomanovskyFrom: Parav Pandit <[email protected]>
Pkey table length for all the ports of the device is the same. Currently get_ports_cap() reads and stores it for each port by querying the device which reads more than just pkey table length.
For representor device ports which can be in range of hundreds, it queries is for each such port and end up returning same value for all the ports.
When in representor mode, modify QP accesses pkey port caps for a port index that can be outside of the port_caps table.
Hence, simplify the logic to query the max pkey table length only once during device initialization sequence.
--- drivers/infiniband/hw/mlx5/mad.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 24 ++++++------------------ drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/qp.c | 12 ++++-------- 4 files changed, 12 insertions(+), 28 deletions(-)
drivers/infiniband/hw/mlx5/mad.c +1 -1
@@ -549,7 +549,7 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u8 port, props->port_cap_flags =be32_to_cpup ((__be32 *)(out_mad->data +20 )); props->gid_tbl_len = out_mad->data[50 ]; props->max_msg_sz =1 <<MLX5_CAP_GEN (mdev, log_max_msg); - props->pkey_tbl_len = dev->port_caps[port -1 ].pkey_table_len; + props->pkey_tbl_len = dev->pkey_table_len; props->bad_pkey_cntr =be16_to_cpup ((__be16 *)(out_mad->data +46 )); props->qkey_viol_cntr =be16_to_cpup ((__be16 *)(out_mad->data +48 )); props->active_width = out_mad->data[31 ] &0xf ;
drivers/infiniband/hw/mlx5/main.c +6 -18
@@ -816,9 +816,7 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,if (err)return err; - err =mlx5_query_max_pkeys (ibdev, &props->max_pkeys); -if (err) -return err; + props->max_pkeys = dev->pkey_table_len; err =mlx5_query_vendor_id (ibdev, &props->vendor_id);if (err)
@@ -2993,7 +2991,6 @@ static void get_ext_port_caps(struct mlx5_ib_dev *dev)static int __get_port_caps (struct mlx5_ib_dev *dev,u8 port) { -struct ib_device_attr *dprops =NULL ;struct ib_port_attr *pprops =NULL ;int err = -ENOMEM ;
@@ -3001,16 +2998,6 @@ static int __get_port_caps(struct mlx5_ib_dev *dev, u8 port)if (!pprops) goto out; - dprops =kmalloc (sizeof (*dprops),GFP_KERNEL ); -if (!dprops) - goto out; - - err =mlx5_ib_query_device (&dev->ib_dev, dprops,NULL ); -if (err) { -mlx5_ib_warn (dev,"query_device failed %d\n" , err); - goto out; - } - err =mlx5_ib_query_port (&dev->ib_dev, port, pprops);if (err) { mlx5_ib_warn(dev, "query_port %d failed %d\n",
@@ -3018,15 +3005,12 @@ static int __get_port_caps(struct mlx5_ib_dev *dev, u8 port) goto out; } - dev->port_caps[port -1 ].pkey_table_len = dprops->max_pkeys; dev->port_caps[port -1 ].gid_table_len = pprops->gid_tbl_len;mlx5_ib_dbg (dev,"port %d: pkey_table_len %d, gid_table_len %d\n" , - port, dprops->max_pkeys, pprops->gid_tbl_len); + port, dev->pkey_table_len, pprops->gid_tbl_len); out:kfree (pprops); -kfree (dprops); -return err; }
@@ -3993,6 +3977,10 @@ static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev)if (err) goto err_mp; + err =mlx5_query_max_pkeys (&dev->ib_dev, &dev->pkey_table_len); +if (err) + goto err_mp; +if (mlx5_use_mad_ifc (dev))get_ext_port_caps (dev);
drivers/infiniband/hw/mlx5/mlx5_ib.h +1 -1
@@ -1035,7 +1035,6 @@ struct mlx5_var_table {struct mlx5_port_caps {int gid_table_len; -int pkey_table_len;bool has_smi;u8 ext_port_cap; };
@@ -1096,6 +1095,7 @@ struct mlx5_ib_dev {struct xarray sig_mrs;struct mlx5_port_caps port_caps[MLX5_MAX_PORTS ]; +u16 pkey_table_len; };static inline struct mlx5_ib_cq *to_mibcq (struct mlx5_core_cq *mcq)
drivers/infiniband/hw/mlx5/qp.c +4 -8
@@ -4310,14 +4310,10 @@ int mlx5_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, goto out; } -if (attr_mask &IB_QP_PKEY_INDEX ) { - port = attr_mask &IB_QP_PORT ? attr->port_num : qp->port; -if (attr->pkey_index >= - dev->port_caps[port -1 ].pkey_table_len) { -mlx5_ib_dbg (dev,"invalid pkey index %d\n" , - attr->pkey_index); - goto out; - } +if ((attr_mask &IB_QP_PKEY_INDEX ) && + attr->pkey_index >= dev->pkey_table_len) { +mlx5_ib_dbg (dev,"invalid pkey index %d\n" , attr->pkey_index); + goto out; } if (attr_mask & IB_QP_MAX_QP_RD_ATOMIC &&
--
2.29.2
Re: [PATCH rdma-next 02/10] IB/mlx5: Avoid calling query device for reading pkey table length
Quoted 137 lines · Leon Romanovsky
From: Parav Pandit <[email protected]>
Pkey table length for all the ports of the device is the same. Currently
get_ports_cap()reads and stores it for each port by querying the device which reads more than just pkey table length.For representor device ports which can be in range of hundreds, it queries is for each such port and end up returning same value for all the ports.
When in representor mode, modify QP accesses pkey port caps for a port index that can be outside of the
port_capstable.Hence, simplify the logic to query the max pkey table length only once during device initialization sequence.
Signed-off-by Parav Pandit <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/hw/mlx5/mad.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 24 ++++++------------------ drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/qp.c | 12 ++++-------- 4 files changed, 12 insertions(+), 28 deletions(-)drivers/infiniband/hw/mlx5/mad.c +1
-1@@ -549,7 +549,7 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u8 port, props->port_cap_flags =be32_to_cpup ((__be32 *)(out_mad->data +20 )); props->gid_tbl_len = out_mad->data[50 ]; props->max_msg_sz =1 <<MLX5_CAP_GEN (mdev, log_max_msg); - props->pkey_tbl_len = dev->port_caps[port -1 ].pkey_table_len; + props->pkey_tbl_len = dev->pkey_table_len; props->bad_pkey_cntr =be16_to_cpup ((__be16 *)(out_mad->data +46 )); props->qkey_viol_cntr =be16_to_cpup ((__be16 *)(out_mad->data +48 )); props->active_width = out_mad->data[31 ] &0xf ;drivers/infiniband/hw/mlx5/main.c +6
-18@@ -816,9 +816,7 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,if (err)return err; - err =mlx5_query_max_pkeys (ibdev, &props->max_pkeys); -if (err) -return err; + props->max_pkeys = dev->pkey_table_len; err =mlx5_query_vendor_id (ibdev, &props->vendor_id);if (err)@@ -2993,7 +2991,6 @@ static void get_ext_port_caps(struct mlx5_ib_dev *dev)static int __get_port_caps (struct mlx5_ib_dev *dev,u8 port) { -struct ib_device_attr *dprops =NULL ;struct ib_port_attr *pprops =NULL ;int err = -ENOMEM ;@@ -3001,16 +2998,6 @@ static int __get_port_caps(struct mlx5_ib_dev *dev, u8 port)if (!pprops) goto out; - dprops =kmalloc (sizeof (*dprops),GFP_KERNEL ); -if (!dprops) - goto out; - - err =mlx5_ib_query_device (&dev->ib_dev, dprops,NULL ); -if (err) { -mlx5_ib_warn (dev,"query_device failed %d\n" , err); - goto out; - } - err =mlx5_ib_query_port (&dev->ib_dev, port, pprops);if (err) { mlx5_ib_warn(dev, "query_port %d failed %d\n",@@ -3018,15 +3005,12 @@ static int __get_port_caps(struct mlx5_ib_dev *dev, u8 port) goto out; } - dev->port_caps[port -1 ].pkey_table_len = dprops->max_pkeys; dev->port_caps[port -1 ].gid_table_len = pprops->gid_tbl_len;mlx5_ib_dbg (dev,"port %d: pkey_table_len %d, gid_table_len %d\n" , - port, dprops->max_pkeys, pprops->gid_tbl_len); + port, dev->pkey_table_len, pprops->gid_tbl_len); out:kfree (pprops); -kfree (dprops); -return err; }@@ -3993,6 +3977,10 @@ static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev)if (err) goto err_mp; + err =mlx5_query_max_pkeys (&dev->ib_dev, &dev->pkey_table_len); +if (err) + goto err_mp; +if (mlx5_use_mad_ifc (dev))get_ext_port_caps (dev);drivers/infiniband/hw/mlx5/mlx5_ib.h +1
-1@@ -1035,7 +1035,6 @@ struct mlx5_var_table {struct mlx5_port_caps {int gid_table_len; -int pkey_table_len;bool has_smi;u8 ext_port_cap; };@@ -1096,6 +1095,7 @@ struct mlx5_ib_dev {struct xarray sig_mrs;struct mlx5_port_caps port_caps[MLX5_MAX_PORTS ]; +u16 pkey_table_len; };static inline struct mlx5_ib_cq *to_mibcq (struct mlx5_core_cq *mcq)drivers/infiniband/hw/mlx5/qp.c +0
-3@@ -4310,14 +4310,10 @@ int mlx5_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, goto out; } -if (attr_mask &IB_QP_PKEY_INDEX ) { - port = attr_mask &IB_QP_PORT ? attr->port_num : qp->port; - if (attr->pkey_index >=
drivers/infiniband/hw/mlx5/qp.c int mlx5_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, · line 4317
Quoted 10 lines
drivers/infiniband/hw/mlx5/qp.c +4
-5- dev->port_caps[port - 1].pkey_table_len) { -mlx5_ib_dbg (dev,"invalid pkey index %d\n" , - attr->pkey_index); - goto out; - } +if ((attr_mask &IB_QP_PKEY_INDEX ) && + attr->pkey_index >= dev->pkey_table_len) { +mlx5_ib_dbg (dev,"invalid pkey index %d\n" , attr->pkey_index); + goto out; }
This hunk made "int port;" in mlx5_ib_modify_qp() obsolete.
Thanks
Quoted 5 lines
drivers/infiniband/hw/mlx5/qp.c +0
-1if (attr_mask & IB_QP_MAX_QP_RD_ATOMIC && --2.29.2
PATCH 3/10 IB/mlx5: Support default partition key for representor port
In reply to Leon RomanovskyFrom: Parav Pandit <[email protected]>
Representor port has only one default pkey.
Hence have simpler query pkey callback or it.
--- drivers/infiniband/hw/mlx5/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/infiniband/hw/mlx5/main.c +11 -0
@@ -1398,6 +1398,16 @@ static int mlx5_ib_rep_query_port(struct ib_device *ibdev, u8 port,return ret; } +static int mlx5_ib_rep_query_pkey (struct ib_device *ibdev,u8 port,u16 index, +u16 *pkey) +{ +/* Default special Pkey for representor device port as per the +* IB specification 1.3 section 10.9.1.2. +*/ + *pkey =0xffff ; +return 0 ; +} +static int mlx5_ib_query_gid (struct ib_device *ibdev,u8 port,int index,union ib_gid *gid) {
@@ -4217,6 +4227,7 @@ static int mlx5_ib_stage_non_default_cb(struct mlx5_ib_dev *dev)static const struct ib_device_ops mlx5_ib_dev_port_rep_ops = { .get_port_immutable = mlx5_port_rep_immutable, .query_port = mlx5_ib_rep_query_port, + .query_pkey = mlx5_ib_rep_query_pkey, };static int mlx5_ib_stage_raw_eth_non_default_cb (struct mlx5_ib_dev *dev)
--
2.29.2
PATCH 4/10 IB/mlx5: Improve query port for representor port
In reply to Leon RomanovskyFrom: Parav Pandit <[email protected]>
Improve query port functionality for representor port as below.
1. RoCE Qkey violation counters are not applicable for representor port.
2. Avoid setting gid_tbl_len twice for representor port.
3. Avoid setting ip_gids and IB_PORT_CM_SUP property for representor port as GID table is empty and CM support is not present in representor mode.
--- drivers/infiniband/hw/mlx5/main.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-)
drivers/infiniband/hw/mlx5/main.c +10 -21
@@ -462,7 +462,6 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num,struct net_device *ndev, *upper;enum ib_mtu ndev_ib_mtu;bool put_mdev = true; -u16 qkey_viol_cntr;u32 eth_prot_oper;u8 mdev_port_num;bool ext;
@@ -500,20 +499,22 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num,translate_eth_proto_oper (eth_prot_oper, &props->active_speed, &props->active_width, ext); - props->port_cap_flags |=IB_PORT_CM_SUP ; - props->ip_gids = true; +if (!dev->is_rep &&mlx5_is_roce_enabled (mdev)) { +u16 qkey_viol_cntr; - props->gid_tbl_len =MLX5_CAP_ROCE (dev->mdev, - roce_address_table_size); + props->port_cap_flags |=IB_PORT_CM_SUP ; + props->ip_gids = true; + props->gid_tbl_len =MLX5_CAP_ROCE (dev->mdev, + roce_address_table_size); +mlx5_query_nic_vport_qkey_viol_cntr (mdev, &qkey_viol_cntr); + props->qkey_viol_cntr = qkey_viol_cntr; + } props->max_mtu =IB_MTU_4096 ; props->max_msg_sz =1 <<MLX5_CAP_GEN (dev->mdev, log_max_msg); props->pkey_tbl_len =1 ; props->state =IB_PORT_DOWN ; props->phys_state =IB_PORT_PHYS_STATE_DISABLED ; -mlx5_query_nic_vport_qkey_viol_cntr (mdev, &qkey_viol_cntr); - props->qkey_viol_cntr = qkey_viol_cntr; -/* If this is a stub query for an unaffiliated port stop here */ if (!put_mdev) goto out;
@@ -1383,19 +1384,7 @@ int mlx5_ib_query_port(struct ib_device *ibdev, u8 port,static int mlx5_ib_rep_query_port (struct ib_device *ibdev,u8 port,struct ib_port_attr *props) { -int ret; - -/* Only link layer == ethernet is valid for representors -* and we always use port 1 -*/ - ret =mlx5_query_port_roce (ibdev, port, props); -if (ret || !props) -return ret; - -/* We don't support GIDS */ - props->gid_tbl_len =0 ; - -return ret; +return mlx5_query_port_roce (ibdev, port, props); } static int mlx5_ib_rep_query_pkey(struct ib_device *ibdev, u8 port, u16 index,
--
2.29.2
PATCH 5/10 RDMA/core: Introduce and use API to read port immutable data
In reply to Leon RomanovskyFrom: Parav Pandit <[email protected]>
Currently mlx5 driver caches port GID table length for 2 ports. It is also cached by IB core as port immutable data.
When mlx5 representor ports are present, which are usually more than 2, invalid access to port_caps array can happen while validating the GID table length which is only for 2 ports.
To avoid this, take help of the IB cores port immutable data by exposing an API to read the port immutable fields.
Remove mlx5 driver's internal cache, thereby reduce code and data.
--- drivers/infiniband/core/device.c | 14 +++++++ drivers/infiniband/hw/mlx5/main.c | 55 +--------------------------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 - drivers/infiniband/hw/mlx5/qp.c | 8 ++-- include/rdma/ib_verbs.h | 3 ++ 5 files changed, 23 insertions(+), 58 deletions(-)
drivers/infiniband/core/device.c +14 -0
@@ -848,6 +848,20 @@ static int setup_port_data(struct ib_device *device)return 0 ; } +/** +* ib_port_immutable_read() - Read rdma port's immutable data +* @dev - IB device +* @port - port number whose immutable data to read. It starts with index 1 and +* valid upto including rdma_end_port(). +*/ +const struct ib_port_immutable * +ib_port_immutable_read (struct ib_device *dev,unsigned int port) +{ +WARN_ON (!rdma_is_port_valid (dev, port)); +return &dev->port_data[port].immutable; +} +EXPORT_SYMBOL (ib_port_immutable_read); +void ib_get_device_fw_str (struct ib_device *dev,char *str) {if (dev->ops.get_dev_fw_str)
drivers/infiniband/hw/mlx5/main.c +1 -54
81 lines not on this page · raw message
drivers/infiniband/hw/mlx5/mlx5_ib.h +0 -1
@@ -1034,7 +1034,6 @@ struct mlx5_var_table { };struct mlx5_port_caps { -int gid_table_len;bool has_smi;u8 ext_port_cap; };
drivers/infiniband/hw/mlx5/qp.c +5 -3
@@ -3177,11 +3177,13 @@ static int mlx5_set_path(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp, alt ? attr->alt_pkey_index : attr->pkey_index);if (ah_flags &IB_AH_GRH ) { -if (grh->sgid_index >= - dev->port_caps[port -1 ].gid_table_len) { +const struct ib_port_immutable *immutable; + + immutable =ib_port_immutable_read (&dev->ib_dev, port); +if (grh->sgid_index >= immutable->gid_tbl_len) {pr_err ("sgid_index (%u) too large. max is %d\n" , grh->sgid_index, - dev->port_caps[port -1 ].gid_table_len); + immutable->gid_tbl_len);return -EINVAL ; } }
include/rdma/ib_verbs.h +3 -0
@@ -4674,4 +4674,7 @@ static inline u32 rdma_calc_flow_label(u32 lqpn, u32 rqpn) return (u32)(v & IB_GRH_FLOWLABEL_MASK); } + +const struct ib_port_immutable * +ib_port_immutable_read (struct ib_device *dev,unsigned int port);#endif /* IB_VERBS_H */
--
2.29.2
Jason Gunthorpe
maintainerRe: [PATCH rdma-next 05/10] RDMA/core: Introduce and use API to read port immutable data
drivers/infiniband/core/device.c static int setup_port_data(struct ib_device *device) · line 863
Quoted 12 lines · Leon Romanovsky
+ *
ib_port_immutable_read()- Read rdma port's immutable data
+ * @dev - IB device
+ * @port - port number whose immutable data to read. It starts with index 1 and
+ * valid upto includingrdma_end_port().
+ */drivers/infiniband/core/device.c +7
-0+const struct ib_port_immutable * +ib_port_immutable_read (struct ib_device *dev,unsigned int port) +{ +WARN_ON (!rdma_is_port_valid (dev, port)); +return &dev->port_data[port].immutable; +} +EXPORT_SYMBOL (ib_port_immutable_read);
Why add this function and only call it in one place?
Jason
RE: [PATCH rdma-next 05/10] RDMA/core: Introduce and use API to read port immutable data
Quoted 10 lines
From: Jason Gunthorpe <[email protected]>
Sent: Tuesday, February 2, 2021 10:20 PMQuoted 3 lines · Leon Romanovsky
+ *
ib_port_immutable_read()- Read rdma port's immutable data
+ * @dev - IB device
+ * @port - port number whose immutable data to read. It starts withindex 1 and
Quoted 10 lines
drivers/infiniband/core/device.c static int setup_port_data(struct ib_device *device) · line 863
Quoted 7 lines
+ * valid upto including
rdma_end_port().
+ */drivers/infiniband/core/device.c +5
-0+const struct ib_port_immutable * +ib_port_immutable_read (struct ib_device *dev,unsigned int port) { +WARN_ON (!rdma_is_port_valid (dev, port)); +return &dev->port_data[port].immutable; } +EXPORT_SYMBOL (ib_port_immutable_read);Why add this function and only call it in one place?
A helper API from core helps
(a) to cut down mlx5 ib per port data structures and code around it
(b) it also avoids the need to maintain such driver internal data for large port count (which is not done today)
May be in future more drivers can use the same APIs.
Jason Gunthorpe
maintainerRe: [PATCH rdma-next 05/10] RDMA/core: Introduce and use API to read port immutable data
Quoted 20 lines · Parav Pandit
Quoted 10 lines
From: Jason Gunthorpe <[email protected]>
Sent: Tuesday, February 2, 2021 10:20 PMQuoted 3 lines · Leon Romanovsky
+ *
ib_port_immutable_read()- Read rdma port's immutable data
+ * @dev - IB device
+ * @port - port number whose immutable data to read. It starts withindex 1 and
Quoted 10 lines
drivers/infiniband/core/device.c static int setup_port_data(struct ib_device *device) · line 863
Quoted 7 lines
+ * valid upto including
rdma_end_port().
+ */drivers/infiniband/core/device.c +5
-0+const struct ib_port_immutable * +ib_port_immutable_read (struct ib_device *dev,unsigned int port) { +WARN_ON (!rdma_is_port_valid (dev, port)); +return &dev->port_data[port].immutable; } +EXPORT_SYMBOL (ib_port_immutable_read);Why add this function and only call it in one place?
Quoted 4 lines
A helper API from core helps
(a) to cut down mlx5 ib per port data structures and code around it
(b) it also avoids the need to maintain such driver internal data for large port count (which is not done today)
I mean why not just access the pointer directly, is isn't in a private header or anything
Jason
RE: [PATCH rdma-next 05/10] RDMA/core: Introduce and use API to read port immutable data
Quoted 27 lines
From: Jason Gunthorpe <[email protected]>
Sent: Tuesday, February 2, 2021 11:44 PMQuoted 21 lines · Parav Pandit
Quoted 21 lines
From: Jason Gunthorpe <[email protected]>
Sent: Tuesday, February 2, 2021 10:20 PMQuoted 4 lines · Leon Romanovsky
+ *
ib_port_immutable_read()- Read rdma port's immutable data
+ * @dev - IB device
+ * @port - port number whose immutable data to read. It starts
+ withindex 1 and
drivers/infiniband/core/device.c static int setup_port_data(struct ib_device *device) · line 863
Quoted 7 lines
+ * valid upto including
rdma_end_port().
+ */drivers/infiniband/core/device.c +5
-0+const struct ib_port_immutable * +ib_port_immutable_read (struct ib_device *dev,unsigned int port) { +WARN_ON (!rdma_is_port_valid (dev, port)); +return &dev->port_data[port].immutable; } +EXPORT_SYMBOL (ib_port_immutable_read);Why add this function and only call it in one place?
Quoted 7 lines
Quoted 5 lines
A helper API from core helps
(a) to cut down mlx5 ib per port data structures and code around it
(b) it also avoids the need to maintain such driver internal data for large port count (which is not done today)I mean why not just access the pointer directly, is isn't in a private header or anything
Oh I see. Yes its accessible directly. An API just looked better to indicate that its RO for drivers by doing const*.
PATCH 6/10 IB/mlx5: Use rdma_for_each_port for port iteration
In reply to Leon RomanovskyFrom: Parav Pandit <[email protected]>
Instead of open coding the loop for port iteration, use rdma_for_each_port macro provided by core.
To use such macro, early initialization of phys_port_cnt is needed. Hence, initialize such constant early enough in the init stage.
Whichever functions are called with port using rdma_for_each_port(), convert their port type from u8 to unsigned int to match the core API.
--- drivers/infiniband/hw/mlx5/mad.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 15 ++++++++------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-)
drivers/infiniband/hw/mlx5/mad.c +1 -1
@@ -279,7 +279,7 @@ int mlx5_ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,return IB_MAD_RESULT_SUCCESS |IB_MAD_RESULT_REPLY ; } -int mlx5_query_ext_port_caps (struct mlx5_ib_dev *dev,u8 port) +int mlx5_query_ext_port_caps (struct mlx5_ib_dev *dev,unsigned int port) {struct ib_smp *in_mad =NULL ;struct ib_smp *out_mad =NULL ;
drivers/infiniband/hw/mlx5/main.c +8 -7
@@ -2982,9 +2982,9 @@ static int set_has_smi_cap(struct mlx5_ib_dev *dev)static void get_ext_port_caps (struct mlx5_ib_dev *dev) { -int port; +unsigned int port; -for (port =1 ; port <= dev->num_ports; port++) + rdma_for_each_port (&dev->ib_dev, port)mlx5_query_ext_port_caps (dev, port); }
@@ -3905,6 +3905,12 @@ static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev)int err;int i; + dev->ib_dev.node_type =RDMA_NODE_IB_CA ; + dev->ib_dev.local_dma_lkey =0 /* not supported for now */ ; + dev->ib_dev.phys_port_cnt = dev->num_ports; + dev->ib_dev.dev.parent = mdev->device; + dev->ib_dev.lag_flags =RDMA_LAG_FLAGS_HASH_ALL_SLAVES ; +for (i =0 ; i < dev->num_ports; i++) {spin_lock_init (&dev->port[i].mp.mpi_lock);rwlock_init (&dev->port[i].roce.netdev_lock);
@@ -3930,12 +3936,7 @@ static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev)if (mlx5_use_mad_ifc (dev))get_ext_port_caps (dev); - dev->ib_dev.node_type =RDMA_NODE_IB_CA ; - dev->ib_dev.local_dma_lkey =0 /* not supported for now */ ; - dev->ib_dev.phys_port_cnt = dev->num_ports; dev->ib_dev.num_comp_vectors =mlx5_comp_vectors_count (mdev); - dev->ib_dev.dev.parent = mdev->device; - dev->ib_dev.lag_flags =RDMA_LAG_FLAGS_HASH_ALL_SLAVES ;mutex_init (&dev->cap_mask_mutex);INIT_LIST_HEAD (&dev->qp_list);
drivers/infiniband/hw/mlx5/mlx5_ib.h +1 -1
@@ -1291,7 +1291,7 @@ int mlx5_ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, size_t *out_mad_size, u16 *out_mad_pkey_index);int mlx5_ib_alloc_xrcd (struct ib_xrcd *xrcd,struct ib_udata *udata);int mlx5_ib_dealloc_xrcd (struct ib_xrcd *xrcd,struct ib_udata *udata); -int mlx5_query_ext_port_caps (struct mlx5_ib_dev *dev,u8 port); +int mlx5_query_ext_port_caps (struct mlx5_ib_dev *dev,unsigned int port);int mlx5_query_mad_ifc_system_image_guid (struct ib_device *ibdev,__be64 *sys_image_guid); int mlx5_query_mad_ifc_max_pkeys(struct ib_device *ibdev,
--
2.29.2
PATCH 7/10 IB/mlx5: Return appropriate error code instead of ENOMEM
In reply to Leon RomanovskyFrom: Parav Pandit <[email protected]>
When mlx5_ib_stage_init_init() fails, return the error code related to failure instead of -ENOMEM.
--- drivers/infiniband/hw/mlx5/main.c | 3 +-- drivers/infiniband/hw/mlx5/odp.c | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-)
drivers/infiniband/hw/mlx5/main.c +1 -2
@@ -3952,8 +3952,7 @@ static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev) err_mp:mlx5_ib_cleanup_multiport_master (dev); - -return -ENOMEM ; +return err; }static int mlx5_ib_enable_driver (struct ib_device *dev)
drivers/infiniband/hw/mlx5/odp.c +0 -4
@@ -484,10 +484,6 @@ static struct mlx5_ib_mr *implicit_get_child_mr(struct mlx5_ib_mr *imr, }xa_lock (&imr->implicit_children); -/* -* Once the store to either xarray completes any error unwind has to -* use synchronize_srcu(). Avoid this with xa_reserve() -*/ ret =__xa_cmpxchg (&imr->implicit_children, idx,NULL , mr,GFP_KERNEL );if (unlikely (ret)) {
--
2.29.2
Jason Gunthorpe
maintainerRe: [PATCH rdma-next 07/10] IB/mlx5: Return appropriate error code instead of ENOMEM
Quoted 29 lines · Leon Romanovsky
From: Parav Pandit <[email protected]>
When
mlx5_ib_stage_init_init()fails, return the error code related to failure instead of-ENOMEM.Fixes 16c1975f1032 ("IB/mlx5: Create profile infrastructure to add and remove stages")Signed-off-by Parav Pandit <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>drivers/infiniband/hw/mlx5/main.c | 3 +-- drivers/infiniband/hw/mlx5/odp.c | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-)drivers/infiniband/hw/mlx5/main.c +2
-2+++ b/drivers/infiniband/hw/mlx5/main.c@@ -3952,8 +3952,7 @@ static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev) err_mp:mlx5_ib_cleanup_multiport_master (dev); - -return -ENOMEM ; +return err; }static int mlx5_ib_enable_driver (struct ib_device *dev)drivers/infiniband/hw/mlx5/odp.c +1
-0+++ b/drivers/infiniband/hw/mlx5/odp.c
drivers/infiniband/hw/mlx5/odp.c static struct mlx5_ib_mr *implicit_get_child_mr(struct mlx5_ib_mr *imr, · line 490
Quoted 7 lines
drivers/infiniband/hw/mlx5/odp.c +0
-4@@ -484,10 +484,6 @@ static struct mlx5_ib_mr *implicit_get_child_mr(struct mlx5_ib_mr *imr, }xa_lock (&imr->implicit_children); -/* -* Once the store to either xarray completes any error unwind has to -* use synchronize_srcu(). Avoid this with xa_reserve() -*/
It is not wrong to remove this comment, but why is it in this patch?
Jason
RE: [PATCH rdma-next 07/10] IB/mlx5: Return appropriate error code instead of ENOMEM
Quoted 13 lines
From: Jason Gunthorpe <[email protected]>
Sent: Tuesday, February 2, 2021 8:51 PMdrivers/infiniband/hw/mlx5/odp.c static struct mlx5_ib_mr *implicit_get_child_mr(struct mlx5_ib_mr *imr, · line 490
Quoted 6 lines
drivers/infiniband/hw/mlx5/odp.c +0
-4xa_lock (&imr->implicit_children); -/* -* Once the store to either xarray completes any error unwind has to -* use synchronize_srcu(). Avoid this with xa_reserve() -*/ It is not wrong to remove this comment, but why is it in this patch?
Quoted 1 line
Jason
Hi Leon,
Can you please check your tree, how this hunk got merged in this patch? In my internal gerrit submission, I do not have this hunk. May be somehow it got here as part of Yishai's ODP srcu patches?
Re: [PATCH rdma-next 07/10] IB/mlx5: Return appropriate error code instead of ENOMEM
Quoted 13 lines · Parav Pandit
Quoted 13 lines
From: Jason Gunthorpe <[email protected]>
Sent: Tuesday, February 2, 2021 8:51 PMdrivers/infiniband/hw/mlx5/odp.c static struct mlx5_ib_mr *implicit_get_child_mr(struct mlx5_ib_mr *imr, · line 490
Quoted 6 lines
drivers/infiniband/hw/mlx5/odp.c +0
-4xa_lock (&imr->implicit_children); -/* -* Once the store to either xarray completes any error unwind has to -* use synchronize_srcu(). Avoid this with xa_reserve() -*/ It is not wrong to remove this comment, but why is it in this patch?
Quoted 6 lines
Quoted 1 line
Jason
Hi Leon,
Can you please check your tree, how this hunk got merged in this patch? In my internal gerrit submission, I do not have this hunk. May be somehow it got here as part of Yishai's ODP srcu patches?
This explains why I didn't find this hunk in Yishai's patch.
https://lore.kernel.org/linux-rdma/[email protected]
Thanks.
PATCH 8/10 IB/cm: Avoid a loop when device has 255 ports
In reply to Leon RomanovskyFrom: Parav Pandit <[email protected]>
When RDMA device has 255 ports, loop iterator i overflows. Due to which cm_add_one() port iterator loops infinitely. Use core provided port iterator to avoid the infinite loop.
--- drivers/infiniband/core/cm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/infiniband/core/cm.c +4 -4
@@ -4333,7 +4333,7 @@ static int cm_add_one(struct ib_device *ib_device)unsigned long flags;int ret;int count =0 ; -u8 i; +unsigned int i; cm_dev =kzalloc (struct_size (cm_dev, port, ib_device->phys_port_cnt),GFP_KERNEL );
@@ -4345,7 +4345,7 @@ static int cm_add_one(struct ib_device *ib_device) cm_dev->going_down =0 ;set_bit (IB_MGMT_METHOD_SEND , reg_req.method_mask); -for (i =1 ; i <= ib_device->phys_port_cnt; i++) { + rdma_for_each_port (ib_device, i) {if (!rdma_cap_ib_cm (ib_device, i))continue ;
@@ -4431,7 +4431,7 @@ static void cm_remove_one(struct ib_device *ib_device, void *client_data) .clr_port_cap_mask = IB_PORT_CM_SUP };unsigned long flags; -int i; +unsigned int i;write_lock_irqsave (&cm.device_lock, flags);list_del (&cm_dev->list);
@@ -4441,7 +4441,7 @@ static void cm_remove_one(struct ib_device *ib_device, void *client_data) cm_dev->going_down =1 ;spin_unlock_irq (&cm.lock); -for (i =1 ; i <= ib_device->phys_port_cnt; i++) { + rdma_for_each_port (ib_device, i) {if (!rdma_cap_ib_cm (ib_device, i))continue ;
--
2.29.2
PATCH 9/10 IB/mlx4: Use port iterator and validation APIs
In reply to Leon RomanovskyFrom: Parav Pandit <[email protected]>
Use IB core provided routine to check if the port is valid or not and to iterate over IB ports.
--- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx4/sysfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/infiniband/hw/mlx4/main.c +1 -1
@@ -1699,7 +1699,7 @@ static struct ib_flow *mlx4_ib_create_flow(struct ib_qp *qp,struct mlx4_dev *dev = (to_mdev (qp->device))->dev;int is_bonded =mlx4_is_bonded (dev); -if (flow_attr->port <1 || flow_attr->port > qp->device->phys_port_cnt) +if (!rdma_is_port_valid (qp->device, flow_attr->port))return ERR_PTR (-EINVAL );if (flow_attr->flags & ~IB_FLOW_ATTR_FLAGS_DONT_TRAP )
drivers/infiniband/hw/mlx4/sysfs.c +2 -2
@@ -798,7 +798,7 @@ static void unregister_pkey_tree(struct mlx4_ib_dev *device)int mlx4_ib_device_register_sysfs (struct mlx4_ib_dev *dev) { -int i; +unsigned int i;int ret =0 ;if (!mlx4_is_master (dev->dev))
@@ -817,7 +817,7 @@ int mlx4_ib_device_register_sysfs(struct mlx4_ib_dev *dev) goto err_ports; } -for (i =1 ; i <= dev->ib_dev.phys_port_cnt; ++i) { +rdma_for_each_port (&dev->ib_dev, i) { ret =add_port_entries (dev, i);if (ret) goto err_add_entries;
--
2.29.2
PATCH 10/10 IB/core: Use valid port number to check link layer
In reply to Leon RomanovskyFrom: Parav Pandit <[email protected]>
IB HCA port starts from 1. Use IB core provided port iterator API to avoid any assumption with start port number.
--- drivers/infiniband/core/verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/core/verbs.c +2 -2
@@ -2281,7 +2281,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid)struct ib_qp_init_attr init_attr = {};struct ib_qp_attr attr = {};int num_eth_ports =0 ; -int port; +unsigned int port;/* If QP state >= init, it is assigned to a port and we can check this * port only.
@@ -2296,7 +2296,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid) }/* Can't get a quick answer, iterate over all ports */ -for (port =0 ; port < qp->device->phys_port_cnt; port++) +rdma_for_each_port (qp->device, port)if (rdma_port_get_link_layer (qp->device, port) !=IB_LINK_LAYER_INFINIBAND ) num_eth_ports++;
Signature · 1 line
2.29.2
Jason Gunthorpe
maintainerQuoted 10 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Various simple cleanups to mlx4, mlx5 and core.
Parav Pandit (10):
IB/mlx5: Movemlx5_port_capsfrommlx5_core_devtomlx5_ib_devIB/mlx5: Avoid calling query device for reading pkey table length IB/mlx5: Improve query port for representor port RDMA/core: Introduce and use API to read port immutable data IB/mlx5: Userdma_for_each_portfor port iteration
These didn't want to apply, can you resend them with that other thing fixed?
Quoted 5 lines
IB/mlx5: Support default partition key for representor port IB/mlx5: Return appropriate error code instead of ENOMEM IB/cm: Avoid a loop when device has 255 ports IB/mlx4: Use port iterator and validation APIs IB/core: Use valid port number to check link layer
I fixed the misplaced hunk and took these to for-next though
Thanks,
Jason
Quoted 15 lines · Jason Gunthorpe
Quoted 10 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Various simple cleanups to mlx4, mlx5 and core.
Parav Pandit (10):
IB/mlx5: Movemlx5_port_capsfrommlx5_core_devtomlx5_ib_devIB/mlx5: Avoid calling query device for reading pkey table length IB/mlx5: Improve query port for representor port RDMA/core: Introduce and use API to read port immutable data IB/mlx5: Userdma_for_each_portfor port iterationThese didn't want to apply, can you resend them with that other thing fixed?
Quoted 7 lines
Quoted 5 lines
IB/mlx5: Support default partition key for representor port IB/mlx5: Return appropriate error code instead of ENOMEM IB/cm: Avoid a loop when device has 255 ports IB/mlx4: Use port iterator and validation APIs IB/core: Use valid port number to check link layer
I fixed the misplaced hunk and took these to for-next though
Thanks, I'll resend.
Quoted 3 lines
Thanks,
Jason