IB/cm: Remove the service_mask parameter from ib_cm_listen()
authorMark Zhang <markzhang@nvidia.com>
Fri, 19 Aug 2022 09:08:57 +0000 (12:08 +0300)
committerLeon Romanovsky <leonro@nvidia.com>
Tue, 30 Aug 2022 09:14:23 +0000 (12:14 +0300)
Remove the service_mask parameter of ib_cm_listen(), as all callers
use 0.

Link: https://lore.kernel.org/r/20220819090859.957943-2-markzhang@nvidia.com
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/cm.c
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/srpt/ib_srpt.c
include/rdma/ib_cm.h

index b985e0d9bc05e91b10685f670c766aaee45673d0..b59f864b3d79fca13461d55aad70d37609cbf38f 100644 (file)
@@ -1185,12 +1185,8 @@ static int cm_init_listen(struct cm_id_private *cm_id_priv, __be64 service_id,
  *   and service ID resolution requests.  The service ID should be specified
  *   network-byte order.  If set to IB_CM_ASSIGN_SERVICE_ID, the CM will
  *   assign a service ID to the caller.
- * @service_mask: Mask applied to service ID used to listen across a
- *   range of service IDs.  If set to 0, the service ID is matched
- *   exactly.  This parameter is ignored if %service_id is set to
- *   IB_CM_ASSIGN_SERVICE_ID.
  */
-int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask)
+int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id)
 {
        struct cm_id_private *cm_id_priv =
                container_of(cm_id, struct cm_id_private, id);
@@ -1203,7 +1199,7 @@ int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask)
                goto out;
        }
 
-       ret = cm_init_listen(cm_id_priv, service_id, service_mask);
+       ret = cm_init_listen(cm_id_priv, service_id, 0);
        if (ret)
                goto out;
 
index fd9d7f2c4d648ba1eb3a4f7d23bf854b5cdc8647..ebb35b809f26e0b0339b71d7db5cad10557eaefc 100644 (file)
@@ -884,8 +884,8 @@ int ipoib_cm_dev_open(struct net_device *dev)
                goto err_cm;
        }
 
-       ret = ib_cm_listen(priv->cm.id, cpu_to_be64(IPOIB_CM_IETF_ID | priv->qp->qp_num),
-                          0);
+       ret = ib_cm_listen(priv->cm.id,
+                          cpu_to_be64(IPOIB_CM_IETF_ID | priv->qp->qp_num));
        if (ret) {
                pr_warn("%s: failed to listen on ID 0x%llx\n", priv->ca->name,
                        IPOIB_CM_IETF_ID | priv->qp->qp_num);
index c1f0566bf6a0f0d0f8157c5d0b13876c25db347e..9450c609bf3b8eb19a77714a7017c5c74f1327c8 100644 (file)
@@ -3191,7 +3191,7 @@ static int srpt_add_one(struct ib_device *device)
         * if this HCA is gone bad and replaced by different HCA
         */
        ret = sdev->cm_id ?
-               ib_cm_listen(sdev->cm_id, cpu_to_be64(srpt_service_guid), 0) :
+               ib_cm_listen(sdev->cm_id, cpu_to_be64(srpt_service_guid)) :
                0;
        if (ret < 0) {
                pr_err("ib_cm_listen() failed: %d (cm_id state = %d)\n", ret,
index e23eb357b7613a2eac49f477e790d1afa87c407c..fbf260c1b1df3063e376945fb0d4084bf7beeaaf 100644 (file)
@@ -340,13 +340,8 @@ void ib_destroy_cm_id(struct ib_cm_id *cm_id);
  *   and service ID resolution requests.  The service ID should be specified
  *   network-byte order.  If set to IB_CM_ASSIGN_SERVICE_ID, the CM will
  *   assign a service ID to the caller.
- * @service_mask: Mask applied to service ID used to listen across a
- *   range of service IDs.  If set to 0, the service ID is matched
- *   exactly.  This parameter is ignored if %service_id is set to
- *   IB_CM_ASSIGN_SERVICE_ID.
  */
-int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id,
-                __be64 service_mask);
+int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id);
 
 struct ib_cm_id *ib_cm_insert_listen(struct ib_device *device,
                                     ib_cm_handler cm_handler,