OSDN Git Service

RDMA/IWPM: Support no port mapping requirements
authorSteve Wise <swise@opengridcomputing.com>
Tue, 29 Jan 2019 21:33:16 +0000 (13:33 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 4 Feb 2019 23:26:02 +0000 (16:26 -0700)
commitb0bad9ad514fc1dd8890f1749f5d2425a73270e3
tree02d5b43d9a5e8d2a57dc1d06b95af1c9c0c1a553
parentf76903d574b26bc596951a5c5e757eb02c67abbd
RDMA/IWPM: Support no port mapping requirements

A soft iwarp driver that uses the host TCP stack via a kernel mode socket
does not need port mapping.  In fact, if the port map daemon, iwpmd, is
running, then iwpmd must not try and create/bind a socket to the actual
port for a soft iwarp connection, since the driver already has that socket
bound.

Yet if the soft iwarp driver wants to interoperate with hard iwarp devices
that -are- using port mapping, then the soft iwarp driver's mappings still
need to be maintained and advertised by the iwpm protocol.

This patch enhances the rdma driver<->iwcm interface to allow an iwarp
driver to specify that it does not want port mapping.  The iwpm
kernel<->iwpmd interface is also enhanced to pass up this information on
map requests.

Care is taken to interoperate with the current iwpmd version (ABI version
3) and only use the new NL attributes if iwpmd supports ABI version 4.

The ABI version define has also been created in rdma_netlink.h so both
kernel and user code can share it.  The iwcm and iwpmd negotiate the ABI
version to use with a new HELLO netlink message.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Reviewed-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/iwcm.c
drivers/infiniband/core/iwpm_msg.c
drivers/infiniband/core/iwpm_util.c
drivers/infiniband/core/iwpm_util.h
include/rdma/iw_cm.h
include/rdma/iw_portmap.h
include/uapi/rdma/rdma_netlink.h