OSDN Git Service

IB/core: Fix the validations of a multicast LID in attach or detach operations
authorNoa Osherovich <noaos@mellanox.com>
Mon, 12 Jun 2017 08:14:02 +0000 (11:14 +0300)
committerDoug Ledford <dledford@redhat.com>
Mon, 24 Jul 2017 14:40:23 +0000 (10:40 -0400)
commit5236333592244557a19694a51337df6ac018f0a7
tree09448c5fdf0b5e0e057f4102ac9b94c71761be52
parentfe248c3a5837848717ed566fb4aefe66f43a5e53
IB/core: Fix the validations of a multicast LID in attach or detach operations

RoCE Annex (A16.9.10/11) declares that during attach (detach) QP to a
multicast group, if the QP is associated with a RoCE port, the
multicast group MLID is unused and is ignored.

During attach or detach multicast, when the QP is associated with a
port, it is enough to check the port's link layer and validate the
LID only if it is Infiniband. Otherwise, avoid validating the
multicast LID.

Fixes: 8561eae60ff9 ("IB/core: For multicast functions, verify that LIDs are multicast LIDs")
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Reviewed-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/verbs.c