2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00
linux-next/drivers/infiniband/hw/nes
Shani Michaeli 7083e42ee2 IB/core: Add "type 2" memory windows support
This patch enhances the IB core support for Memory Windows (MWs).

MWs allow an application to have better/flexible control over remote
access to memory.

Two types of MWs are supported, with the second type having two flavors:

    Type 1  - associated with PD only
    Type 2A - associated with QPN only
    Type 2B - associated with PD and QPN

Applications can allocate a MW once, and then repeatedly bind the MW
to different ranges in MRs that are associated to the same PD. Type 1
windows are bound through a verb, while type 2 windows are bound by
posting a work request.

The 32-bit memory key is composed of a 24-bit index and an 8-bit
key. The key is changed with each bind, thus allowing more control
over the peer's use of the memory key.

The changes introduced are the following:

* add memory window type enum and a corresponding parameter to ib_alloc_mw.
* type 2 memory window bind work request support.
* create a struct that contains the common part of the bind verb struct
  ibv_mw_bind and the bind work request into a single struct.
* add the ib_inc_rkey helper function to advance the tag part of an rkey.

Consumer interface details:

* new device capability flags IB_DEVICE_MEM_WINDOW_TYPE_2A and
  IB_DEVICE_MEM_WINDOW_TYPE_2B are added to indicate device support
  for these features.

  Devices can set either IB_DEVICE_MEM_WINDOW_TYPE_2A or
  IB_DEVICE_MEM_WINDOW_TYPE_2B if it supports type 2A or type 2B
  memory windows. It can set neither to indicate it doesn't support
  type 2 windows at all.

* modify existing provides and consumers code to the new param of
  ib_alloc_mw and the ib_mw_bind_info structure

Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Shani Michaeli <shanim@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2013-02-21 11:51:45 -08:00
..
Kconfig RDMA/nes: Update copyright and branding string 2009-12-09 15:21:56 -08:00
Makefile RDMA/nes: Support for Packed And Unaligned fpdus 2011-10-10 10:54:47 -07:00
nes_cm.c RDMA/nes: Fix for BUG_ON due to adding already-pending timer 2012-12-08 00:31:02 -08:00
nes_cm.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_context.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_hw.c RDMA/nes: Fix for terminate timer crash 2012-12-08 00:31:02 -08:00
nes_hw.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_mgt.c RDMA/nes: Use WARN() 2012-11-22 00:49:15 -08:00
nes_mgt.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_nic.c RDMA/nes: Fix for incorrect multicast address in the perfect filter table 2012-11-22 00:49:14 -08:00
nes_user.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_utils.c RDMA/nes: Print hardware resource type 2012-09-30 20:34:55 -07:00
nes_verbs.c IB/core: Add "type 2" memory windows support 2013-02-21 11:51:45 -08:00
nes_verbs.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes.c Drivers: infinband: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
nes.h RDMA/nes: Fix for terminate timer crash 2012-12-08 00:31:02 -08:00