[PATCH rdma-next v1 00/11] Introduce and use GID entry reference counts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Leon Romanovsky <leonro@xxxxxxxxxxxx>

Hi,

This series comes from Parav and Jason who worked jointly to address
feedback on v0. The code and patches are restructed to simplify review
and maintenance.

Thanks

---------------------------------------------------
>From Jason and Parav,

Currently a GID entry can be deleted from the GID table while it is
in use by ULPs, CM modules, drivers, or user space applications.
It may even get replaced with new attributes and/or GID value which
may lead to undesired traffic in the network. The previous and new
GID entry might be in two different net namespace; this may lead
to send traffic to undesired namespace.

GID entry reference count is based on standard kref structure. The
GID table entries are re-organized so they are written once before being
added to the table, and then never changed during the lifetime of the
entry.

For IB port GID table entry location is decided by the HCA provider
driver. Which means that when GID table entries are in use by the
users of it, ib_cache_update() can overwrite the GID entry and
attributes for IB link layer. Therefore, when an entry is deleted/added
(RoCE) or replaced (IB) new memory is allocated to replace the old entry
and the old entry lives on via a kref until all users finally drop it.

This series also introduces GID entry get, put and hold APIs. It
also uses them in ib_core and smc modules. Additionally it introduces
pointer returning variants of the query API, with the expectation that
all callers will be converted to use them and the copy returning
functions will be deleted.

Thanks

Jason Gunthorpe (2):
  IB/core: Provide rdma_ versions of the gid cache API
  IB/core: Make rdma_find_gid_by_filter support all protocols

Parav Pandit (9):
  IB/core: Do not set the gid type when reserving default entries
  IB/core: Store default GID property per-table instead of per-entry
  IB/core: Introduce GID entry reference counts
  RDMA: Use GID from the ib_gid_attr during the add_gid() callback
  IB/core: Introduce GID attribute get, put and hold APIs
  IB/core: Replace ib_query_gid with rdma_get_gid_attr
  net/smc: Replace ib_query_gid with rdma_get_gid_attr
  IB: Replace ib_query_gid/ib_get_cached_gid with rdma_query_gid
  IB/rxe: Use rdma GID API

 drivers/infiniband/core/cache.c                | 716 +++++++++++++++++--------
 drivers/infiniband/core/cm.c                   |   9 +-
 drivers/infiniband/core/cma.c                  |   6 +-
 drivers/infiniband/core/device.c               |  21 +-
 drivers/infiniband/core/mad.c                  |   4 +-
 drivers/infiniband/core/sysfs.c                |  66 ++-
 drivers/infiniband/core/verbs.c                |   6 +-
 drivers/infiniband/hw/bnxt_re/ib_verbs.c       |   5 +-
 drivers/infiniband/hw/bnxt_re/ib_verbs.h       |   3 +-
 drivers/infiniband/hw/hns/hns_roce_device.h    |   2 +-
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c     |   2 +-
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c     |   2 +-
 drivers/infiniband/hw/hns/hns_roce_main.c      |   6 +-
 drivers/infiniband/hw/mlx4/main.c              |  12 +-
 drivers/infiniband/hw/mlx5/main.c              |   5 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c |  10 +-
 drivers/infiniband/sw/rxe/rxe_net.c            |  50 +-
 drivers/infiniband/sw/rxe/rxe_recv.c           |  12 +-
 drivers/infiniband/ulp/ipoib/ipoib_ib.c        |   3 +-
 drivers/infiniband/ulp/ipoib/ipoib_main.c      |   4 +-
 drivers/infiniband/ulp/srp/ib_srp.c            |   2 +-
 drivers/infiniband/ulp/srpt/ib_srpt.c          |   3 +-
 include/rdma/ib_cache.h                        |  21 +
 include/rdma/ib_verbs.h                        |   8 +-
 net/smc/smc_core.c                             |  20 +-
 net/smc/smc_ib.c                               |  25 +-
 26 files changed, 626 insertions(+), 397 deletions(-)

--
2.14.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux