]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/cma: Consider scope_id while binding to ipv6 ll address
authorParav Pandit <parav@mellanox.com>
Wed, 10 Apr 2019 08:23:04 +0000 (11:23 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 24 Apr 2019 13:39:16 +0000 (10:39 -0300)
commitd35ead50ab6b8732e4d546ac4d25931267f0dd8a
treecbef1b33a319f96571a2cda569879e4d92a2b2c3
parent2e7a0fa1aee714b86cee286f96c9bd428727f192
RDMA/cma: Consider scope_id while binding to ipv6 ll address

When two netdev have same link local addresses (such as vlan and non
vlan), two rdma cm listen id should be able to bind to following different
addresses.

listener-1: addr=lla, scope_id=A, port=X
listener-2: addr=lla, scope_id=B, port=X

However while comparing the addresses only addr and port are considered,
due to which 2nd listener fails to listen.

In below example of two listeners, 2nd listener is failing with address in
use error.

$ rping -sv -a fe80::268a:7ff:feb3:d113%ens2f1 -p 4545&

$ rping -sv -a fe80::268a:7ff:feb3:d113%ens2f1.200 -p 4545
rdma_bind_addr: Address already in use

To overcome this, consider the scope_ids as well which forms the accurate
IPv6 link local address.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cma.c