]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
RDMA/core: Rename kernel modify_cq to better describe its usage
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 13 Nov 2017 08:51:19 +0000 (10:51 +0200)
committerDoug Ledford <dledford@redhat.com>
Mon, 13 Nov 2017 21:59:22 +0000 (16:59 -0500)
Current ib_modify_cq() is used to set CQ moderation parameters.

This patch renames ib_modify_cq() to be rdma_set_cq_moderation(),
because the kernel version of RDMA API doesn't need to follow already
exposed to user's API pattern (create_XXX/modify_XXX/query_XXX/destroy_XXX)
and better to have more accurate name which describes the actual usage.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/verbs.c
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
include/rdma/ib_verbs.h

index 53143e4b1c50f3a6fbf29ae3e2a45148ad139968..16d55710b1162aa11ca2d8ed3dd1c1690f60acc8 100644 (file)
@@ -3901,7 +3901,7 @@ int ib_uverbs_ex_modify_cq(struct ib_uverbs_file *file,
        if (!cq)
                return -EINVAL;
 
-       ret = ib_modify_cq(cq, cmd.attr.cq_count, cmd.attr.cq_period);
+       ret = rdma_set_cq_moderation(cq, cmd.attr.cq_count, cmd.attr.cq_period);
 
        uobj_put_obj_read(cq);
 
index d8f1a5d34f4ff2b3b31e0286ebbd86706b8819db..3fb8fb6cc824ef09f9c9c229e5a99a3e4801a65e 100644 (file)
@@ -1550,12 +1550,12 @@ struct ib_cq *ib_create_cq(struct ib_device *device,
 }
 EXPORT_SYMBOL(ib_create_cq);
 
-int ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period)
+int rdma_set_cq_moderation(struct ib_cq *cq, u16 cq_count, u16 cq_period)
 {
        return cq->device->modify_cq ?
                cq->device->modify_cq(cq, cq_count, cq_period) : -ENOSYS;
 }
-EXPORT_SYMBOL(ib_modify_cq);
+EXPORT_SYMBOL(rdma_set_cq_moderation);
 
 int ib_destroy_cq(struct ib_cq *cq)
 {
index 8dc1e6225cc84b220886ac9b64c40b2a06852759..2706bf26cbace4c80136da652ecbc36a42c3fd2e 100644 (file)
@@ -99,8 +99,9 @@ static int ipoib_set_coalesce(struct net_device *dev,
            coal->rx_max_coalesced_frames > 0xffff)
                return -EINVAL;
 
-       ret = ib_modify_cq(priv->recv_cq, coal->rx_max_coalesced_frames,
-                          coal->rx_coalesce_usecs);
+       ret = rdma_set_cq_moderation(priv->recv_cq,
+                                    coal->rx_max_coalesced_frames,
+                                    coal->rx_coalesce_usecs);
        if (ret && ret != -ENOSYS) {
                ipoib_warn(priv, "failed modifying CQ (%d)\n", ret);
                return ret;
index 0b484c023fa9c24f3daf0787dbd52f92e14b2ce0..fd84cda5ed7cec7577c2ae96d1b0e39275e53acf 100644 (file)
@@ -3169,13 +3169,13 @@ struct ib_cq *ib_create_cq(struct ib_device *device,
 int ib_resize_cq(struct ib_cq *cq, int cqe);
 
 /**
- * ib_modify_cq - Modifies moderation params of the CQ
+ * rdma_set_cq_moderation - Modifies moderation params of the CQ
  * @cq: The CQ to modify.
  * @cq_count: number of CQEs that will trigger an event
  * @cq_period: max period of time in usec before triggering an event
  *
  */
-int ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period);
+int rdma_set_cq_moderation(struct ib_cq *cq, u16 cq_count, u16 cq_period);
 
 /**
  * ib_destroy_cq - Destroys the specified CQ.