Skip to content

Commit f1b8780

Browse files
Zhu Yanjunvijay-suman
authored andcommitted
net/rds: Use rdma_read_gids to get connection SGID/DGID in IPv6
In IPv4, the newly introduced rdma_read_gids is used to read the SGID/DGID for the connection which returns GID correctly for RoCE transport as well. In IPv6, rdma_read_gids is also used. The following are why rdma_read_gids is introduced. rdma_addr_get_dgid() for RoCE for client side connections returns MAC address, instead of DGID. rdma_addr_get_sgid() for RoCE doesn't return correct SGID for IPv6 and when more than one IP address is assigned to the netdevice. So the transport agnostic rdma_read_gids() API is provided by rdma_cm module. Signed-off-by: Zhu Yanjun <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: David S. Miller <[email protected]> (cherry picked from commit 53ae914) Orabug: 28289486 Signed-off-by: Zhu Yanjun <[email protected]> Reviewed-by: Håkon Bugge <[email protected]> Orabug: 33590097 UEK6 => UEK7 (cherry picked from commit c5d2833) cherry-pick-repo=UEK/production/linux-uek.git Signed-off-by: Gerd Rausch <[email protected]> Reviewed-by: William Kucharski <[email protected]> Orabug: 33590087 UEK7 => LUCI (cherry picked from commit a4ba0d2) cherry-pick-repo=UEK/production/linux-uek.git Signed-off-by: Gerd Rausch <[email protected]> Reviewed-by: William Kucharski <[email protected]>
1 parent 5dbd2d7 commit f1b8780

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

net/rds/ib.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,10 @@ static int rds6_ib_conn_info_visitor(struct rds_connection *conn,
319319

320320
if (rds_conn_state(conn) == RDS_CONN_UP) {
321321
struct rds_ib_device *rds_ibdev;
322-
struct rdma_dev_addr *dev_addr;
323322

324323
ic = conn->c_transport_data;
325-
dev_addr = &ic->i_cm_id->route.addr.dev_addr;
326-
rdma_addr_get_sgid(dev_addr,
327-
(union ib_gid *)&iinfo6->src_gid);
328-
rdma_addr_get_dgid(dev_addr,
329-
(union ib_gid *)&iinfo6->dst_gid);
330-
324+
rdma_read_gids(ic->i_cm_id, (union ib_gid *)&iinfo6->src_gid,
325+
(union ib_gid *)&iinfo6->dst_gid);
331326
rds_ibdev = ic->rds_ibdev;
332327
iinfo6->max_send_wr = ic->i_send_ring.w_nr;
333328
iinfo6->max_recv_wr = ic->i_recv_ring.w_nr;

0 commit comments

Comments
 (0)