mbox series

[v2,rdma-next,0/3] IWPM support for no port mapping

Message ID cover.1548797615.git.swise@opengridcomputing.com (mailing list archive)
Headers show
Series IWPM support for no port mapping | expand

Message

Steve Wise Jan. 29, 2019, 9:33 p.m. UTC
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.

This patch series can also be viewed at:

https://github.com/larrystevenwise/linux/tree/topic/no-port-map-v2

The corresponding rdma-core changes are at:

https://github.com/larrystevenwise/rdma-core/tree/topic/no-port-map-v1
https://www.spinics.net/lists/linux-rdma/msg74538.html

Changes since v1:

- rename iwpm_user_ulib_version to iwpm_ulib_version

- remove unneeded local variable from iwpm_send_hello()

- pr_warn_once() if the kernel detects a down-level iwpmd

- don't use BIT()

- add reviewed-by tag

- rebased to top-of-tree rdma-for-next

Changes since rfc:

- removed the sysfs abi_version file, replaced with inband abi_version
negotiation via a new HELLO message.


Steve Wise (3):
  iw_cxgb*: kzalloc the iwcm verbs struct
  RDMA/IWPM: refactor the IWPM message attribute names
  RDMA/IWPM: Support no port mapping requirements

 drivers/infiniband/core/iwcm.c              |   7 +-
 drivers/infiniband/core/iwpm_msg.c          | 120 +++++++++++++++++++++++-----
 drivers/infiniband/core/iwpm_util.c         |  48 ++++++++++-
 drivers/infiniband/core/iwpm_util.h         |  12 +++
 drivers/infiniband/hw/cxgb3/iwch_provider.c |   2 +-
 drivers/infiniband/hw/cxgb4/provider.c      |   2 +-
 include/rdma/iw_cm.h                        |  13 +++
 include/rdma/iw_portmap.h                   |  15 +++-
 include/uapi/rdma/rdma_netlink.h            |  45 ++++++++++-
 9 files changed, 235 insertions(+), 29 deletions(-)

Comments

Jason Gunthorpe Feb. 4, 2019, 11:33 p.m. UTC | #1
On Tue, Jan 29, 2019 at 01:33:35PM -0800, Steve Wise wrote:
> 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.
> 
> This patch series can also be viewed at:
> 
> https://github.com/larrystevenwise/linux/tree/topic/no-port-map-v2
> 
> The corresponding rdma-core changes are at:
> 
> https://github.com/larrystevenwise/rdma-core/tree/topic/no-port-map-v1
> https://www.spinics.net/lists/linux-rdma/msg74538.html
> 
> Changes since v1:
> 
> - rename iwpm_user_ulib_version to iwpm_ulib_version
> 
> - remove unneeded local variable from iwpm_send_hello()
> 
> - pr_warn_once() if the kernel detects a down-level iwpmd
> 
> - don't use BIT()
> 
> - add reviewed-by tag
> 
> - rebased to top-of-tree rdma-for-next
> 
> Changes since rfc:
> 
> - removed the sysfs abi_version file, replaced with inband abi_version
> negotiation via a new HELLO message.
> 
> 
> Steve Wise (3):
>   iw_cxgb*: kzalloc the iwcm verbs struct
>   RDMA/IWPM: refactor the IWPM message attribute names
>   RDMA/IWPM: Support no port mapping requirements

Applied to for-next

You'll need to fix the github to use the kernel-headers/update script
once this is finally pushed to for-next

Jason
Steve Wise Feb. 5, 2019, 1:55 p.m. UTC | #2
> -----Original Message-----
> From: Jason Gunthorpe <jgg@ziepe.ca>
> Sent: Monday, February 4, 2019 5:34 PM
> To: Steve Wise <swise@opengridcomputing.com>
> Cc: dledford@redhat.com; linux-rdma@vger.kernel.org;
> BMT@zurich.ibm.com; shiraz.saleem@intel.com;
> tatyana.e.nikolova@intel.com
> Subject: Re: [PATCH v2 rdma-next 0/3] IWPM support for no port mapping
> 
> On Tue, Jan 29, 2019 at 01:33:35PM -0800, Steve Wise wrote:
> > 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.
> >
> > This patch series can also be viewed at:
> >
> > https://github.com/larrystevenwise/linux/tree/topic/no-port-map-v2
> >
> > The corresponding rdma-core changes are at:
> >
> > https://github.com/larrystevenwise/rdma-core/tree/topic/no-port-map-v1
> > https://www.spinics.net/lists/linux-rdma/msg74538.html
> >
> > Changes since v1:
> >
> > - rename iwpm_user_ulib_version to iwpm_ulib_version
> >
> > - remove unneeded local variable from iwpm_send_hello()
> >
> > - pr_warn_once() if the kernel detects a down-level iwpmd
> >
> > - don't use BIT()
> >
> > - add reviewed-by tag
> >
> > - rebased to top-of-tree rdma-for-next
> >
> > Changes since rfc:
> >
> > - removed the sysfs abi_version file, replaced with inband abi_version
> > negotiation via a new HELLO message.
> >
> >
> > Steve Wise (3):
> >   iw_cxgb*: kzalloc the iwcm verbs struct
> >   RDMA/IWPM: refactor the IWPM message attribute names
> >   RDMA/IWPM: Support no port mapping requirements
> 
> Applied to for-next
> 
> You'll need to fix the github to use the kernel-headers/update script
> once this is finally pushed to for-next
> 
> Jason

Will do.