Skip to content
Snippets Groups Projects
Commit fac51590 authored by Matan Barak's avatar Matan Barak Committed by Doug Ledford
Browse files

IB/cma: cma_match_net_dev needs to take into account port_num


Previously, cma_match_net_dev called cma_protocol_roce which
tried to verify that the IB device uses RoCE protocol. However,
if rdma_id wasn't bound to a port, then the check would occur
against the first port of the device without regard to whether
that port was even of the same type as the type of port the
incoming packet was received on.

Fix this by passing the port of the request and only checking
against the same port of the device.

Reported-by: default avatarOr Gerlitz <gerlitz.or@gmail.com>
Fixes: b8cab5da ('IB/cma: Accept connection without a valid netdev on RoCE')
Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent ab5cdc31
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment