]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
IB/{core, umad, cm}: Rename ib_init_ah_from_wc to ib_init_ah_attr_from_wc
authorParav Pandit <parav@mellanox.com>
Tue, 14 Nov 2017 12:52:17 +0000 (14:52 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 18 Dec 2017 22:37:11 +0000 (15:37 -0700)
Currently ib_init_ah_from_wc initializes address handle attributes and
not the address handle object itself.
To avoid confusion between ah_attr vs ah, ib_init_ah_from_wc is
renamed to ib_init_ah_attr_from_wc to reflect that its initialzes
ah_attr.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cm.c
drivers/infiniband/core/user_mad.c
drivers/infiniband/core/verbs.c
include/rdma/ib_verbs.h

index 5af1c1c168b7637bff5b3f1661a07ecf162ec024..cbbaaf1a493a77c7c555ad6209fc6bc45c2574fb 100644 (file)
@@ -457,8 +457,9 @@ static int cm_init_av_for_response(struct cm_port *port, struct ib_wc *wc,
 {
        av->port = port;
        av->pkey_index = wc->pkey_index;
-       return ib_init_ah_from_wc(port->cm_dev->ib_device, port->port_num, wc,
-                                 grh, &av->ah_attr);
+       return ib_init_ah_attr_from_wc(port->cm_dev->ib_device,
+                                      port->port_num, wc,
+                                      grh, &av->ah_attr);
 }
 
 static int cm_init_av_by_path(struct sa_path_rec *path, struct cm_av *av,
index 3179fed4b40810e701230d50c3ef6358f64b59c2..3ef8ee5d4aa204e38657519f4a406493c67a8e8f 100644 (file)
@@ -248,10 +248,10 @@ static void recv_handler(struct ib_mad_agent *agent,
                const struct ib_global_route *grh;
                int ret;
 
-               ret = ib_init_ah_from_wc(agent->device, agent->port_num,
-                                        mad_recv_wc->wc,
-                                        mad_recv_wc->recv_buf.grh,
-                                        &ah_attr);
+               ret = ib_init_ah_attr_from_wc(agent->device, agent->port_num,
+                                             mad_recv_wc->wc,
+                                             mad_recv_wc->recv_buf.grh,
+                                             &ah_attr);
                if (ret)
                        goto err2;
 
index 2d2e0aabccc7255ab690fb39020df18508230799..43e02543541849aad84ead6ed166683f7e352ffd 100644 (file)
@@ -526,7 +526,7 @@ done:
 }
 
 /*
- * This function creates ah from the incoming packet.
+ * This function initializes address handle attributes from the incoming packet.
  * Incoming packet has dgid of the receiver node on which this code is
  * getting executed and, sgid contains the GID of the sender.
  *
@@ -535,9 +535,9 @@ done:
  * GID whom to respond to.
  *
  */
-int ib_init_ah_from_wc(struct ib_device *device, u8 port_num,
-                      const struct ib_wc *wc, const struct ib_grh *grh,
-                      struct rdma_ah_attr *ah_attr)
+int ib_init_ah_attr_from_wc(struct ib_device *device, u8 port_num,
+                           const struct ib_wc *wc, const struct ib_grh *grh,
+                           struct rdma_ah_attr *ah_attr)
 {
        u32 flow_class;
        u16 gid_index;
@@ -611,7 +611,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num,
                return 0;
        }
 }
-EXPORT_SYMBOL(ib_init_ah_from_wc);
+EXPORT_SYMBOL(ib_init_ah_attr_from_wc);
 
 struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, const struct ib_wc *wc,
                                   const struct ib_grh *grh, u8 port_num)
@@ -619,7 +619,7 @@ struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, const struct ib_wc *wc,
        struct rdma_ah_attr ah_attr;
        int ret;
 
-       ret = ib_init_ah_from_wc(pd->device, port_num, wc, grh, &ah_attr);
+       ret = ib_init_ah_attr_from_wc(pd->device, port_num, wc, grh, &ah_attr);
        if (ret)
                return ERR_PTR(ret);
 
index cfd837049a32bd094a3f2d3d8d1696da2f510087..60c3268c8c0464daf52d4dc74c65a928da644f7c 100644 (file)
@@ -2904,7 +2904,7 @@ int ib_get_gids_from_rdma_hdr(const union rdma_network_hdr *hdr,
 int ib_get_rdma_header_version(const union rdma_network_hdr *hdr);
 
 /**
- * ib_init_ah_from_wc - Initializes address handle attributes from a
+ * ib_init_ah_attr_from_wc - Initializes address handle attributes from a
  *   work completion.
  * @device: Device on which the received message arrived.
  * @port_num: Port on which the received message arrived.
@@ -2914,9 +2914,9 @@ int ib_get_rdma_header_version(const union rdma_network_hdr *hdr);
  * @ah_attr: Returned attributes that can be used when creating an address
  *   handle for replying to the message.
  */
-int ib_init_ah_from_wc(struct ib_device *device, u8 port_num,
-                      const struct ib_wc *wc, const struct ib_grh *grh,
-                      struct rdma_ah_attr *ah_attr);
+int ib_init_ah_attr_from_wc(struct ib_device *device, u8 port_num,
+                           const struct ib_wc *wc, const struct ib_grh *grh,
+                           struct rdma_ah_attr *ah_attr);
 
 /**
  * ib_create_ah_from_wc - Creates an address handle associated with the