Skip to content

Commit 947c99e

Browse files
paravmellanoxjgunthorpe
authored andcommitted
IB/core: Tidy ib_resolve_eth_dmac
No reason to call rdma_ah_retrieve_grh, tidy whitespace, and add a function comment block. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
1 parent 8d9ec9a commit 947c99e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

drivers/infiniband/core/verbs.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,13 +1455,19 @@ bool ib_modify_qp_is_ok(enum ib_qp_state cur_state, enum ib_qp_state next_state,
14551455
}
14561456
EXPORT_SYMBOL(ib_modify_qp_is_ok);
14571457

1458+
/**
1459+
* ib_resolve_eth_dmac - Resolve destination mac address
1460+
* @device: Device to consider
1461+
* @ah_attr: address handle attribute which describes the
1462+
* source and destination parameters
1463+
* ib_resolve_eth_dmac() resolves destination mac address and L3 hop limit It
1464+
* returns 0 on success or appropriate error code. It initializes the
1465+
* necessary ah_attr fields when call is successful.
1466+
*/
14581467
static int ib_resolve_eth_dmac(struct ib_device *device,
14591468
struct rdma_ah_attr *ah_attr)
14601469
{
1461-
int ret = 0;
1462-
struct ib_global_route *grh;
1463-
1464-
grh = rdma_ah_retrieve_grh(ah_attr);
1470+
int ret = 0;
14651471

14661472
if (rdma_is_multicast_addr((struct in6_addr *)ah_attr->grh.dgid.raw)) {
14671473
if (ipv6_addr_v4mapped((struct in6_addr *)ah_attr->grh.dgid.raw)) {

0 commit comments

Comments
 (0)