OSDN Git Service

RDMA/netlink: Avoid double pass for RDMA netlink messages
authorLeon Romanovsky <leonro@mellanox.com>
Thu, 8 Jun 2017 06:05:12 +0000 (09:05 +0300)
committerLeon Romanovsky <leon@kernel.org>
Thu, 10 Aug 2017 10:15:42 +0000 (13:15 +0300)
commit3c3e75d5ff75f9a076cac254fd32476ca80fdffc
tree357ac5b8943cda31ce53e0d29e576dc4029ec4f4
parent64401b69b29164c5731018cc44fc9b144ac9c5ae
RDMA/netlink: Avoid double pass for RDMA netlink messages

The standard netlink_rcv_skb function skips messages without
NLM_F_REQUEST flag in it, while SA netlink client issues them.

In commit bc10ed7d3d19 ("IB/core: Add rdma netlink helper functions")
the local function was introduced to allow such messages.

This led to double pass for every incoming message.

In this patch, we unify that local implementation and netlink_rcv_skb
functions, so there will be no need for double pass anymore.

As a outcome, this combined function gained more strict check
for NLM_F_REQUEST flag and it is now allowed for SA pathquery
client only.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/core/netlink.c