Skip to content

Commit

Permalink
IB/{core, cm, cma, ipoib}: Rename ib_init_ah_from_path to ib_init_ah_…
Browse files Browse the repository at this point in the history
…attr_from_path

Since ib_init_ah_from_path initializes the address handle attribute, it is
renamed to reflect so.

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>
  • Loading branch information
Parav Pandit authored and Jason Gunthorpe committed Dec 18, 2017
1 parent 33f93e1 commit 4ad6a02
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/core/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ static int cm_init_av_by_path(struct sa_path_rec *path, struct cm_av *av,
return ret;

av->port = port;
ret = ib_init_ah_from_path(cm_dev->ib_device, port->port_num, path,
&av->ah_attr);
ret = ib_init_ah_attr_from_path(cm_dev->ib_device, port->port_num, path,
&av->ah_attr);
if (ret)
return ret;

Expand Down
7 changes: 4 additions & 3 deletions drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -3396,9 +3396,10 @@ static int cma_sidr_rep_handler(struct ib_cm_id *cm_id,
event.status = ret;
break;
}
ib_init_ah_from_path(id_priv->id.device, id_priv->id.port_num,
id_priv->id.route.path_rec,
&event.param.ud.ah_attr);
ib_init_ah_attr_from_path(id_priv->id.device,
id_priv->id.port_num,
id_priv->id.route.path_rec,
&event.param.ud.ah_attr);
event.param.ud.qp_num = rep->qpn;
event.param.ud.qkey = rep->qkey;
event.event = RDMA_CM_EVENT_ESTABLISHED;
Expand Down
8 changes: 4 additions & 4 deletions drivers/infiniband/core/sa_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,9 +1227,9 @@ static u8 get_src_path_mask(struct ib_device *device, u8 port_num)
return src_path_mask;
}

int ib_init_ah_from_path(struct ib_device *device, u8 port_num,
struct sa_path_rec *rec,
struct rdma_ah_attr *ah_attr)
int ib_init_ah_attr_from_path(struct ib_device *device, u8 port_num,
struct sa_path_rec *rec,
struct rdma_ah_attr *ah_attr)
{
int ret;
u16 gid_index;
Expand Down Expand Up @@ -1341,7 +1341,7 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num,

return 0;
}
EXPORT_SYMBOL(ib_init_ah_from_path);
EXPORT_SYMBOL(ib_init_ah_attr_from_path);

static int alloc_mad(struct ib_sa_query *query, gfp_t gfp_mask)
{
Expand Down
3 changes: 2 additions & 1 deletion drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,8 @@ static void path_rec_completion(int status,
if (!status) {
struct rdma_ah_attr av;

if (!ib_init_ah_from_path(priv->ca, priv->port, pathrec, &av))
if (!ib_init_ah_attr_from_path(priv->ca, priv->port,
pathrec, &av))
ah = ipoib_create_ah(dev, priv->pd, &av);
}

Expand Down
10 changes: 5 additions & 5 deletions include/rdma/ib_sa.h
Original file line number Diff line number Diff line change
Expand Up @@ -549,12 +549,12 @@ int ib_init_ah_from_mcmember(struct ib_device *device, u8 port_num,
struct rdma_ah_attr *ah_attr);

/**
* ib_init_ah_from_path - Initialize address handle attributes based on an SA
* path record.
* ib_init_ah_attr_from_path - Initialize address handle attributes based on
* an SA path record.
*/
int ib_init_ah_from_path(struct ib_device *device, u8 port_num,
struct sa_path_rec *rec,
struct rdma_ah_attr *ah_attr);
int ib_init_ah_attr_from_path(struct ib_device *device, u8 port_num,
struct sa_path_rec *rec,
struct rdma_ah_attr *ah_attr);

/**
* ib_sa_pack_path - Conert a path record from struct ib_sa_path_rec
Expand Down

0 comments on commit 4ad6a02

Please sign in to comment.