RDMA/core: Add local DMA L_Key support
- Change the IB_DEVICE_ZERO_STAG flag to the transport-neutral name IB_DEVICE_LOCAL_DMA_LKEY, which is used by iWARP RNICs to indicate 0 STag support and IB HCAs to indicate reserved L_Key support. - Add a u32 local_dma_lkey member to struct ib_device. Drivers fill this in with the appropriate local DMA L_Key (if they support it). - Fix up the drivers using this flag. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
aed012279d
commit
96f15c0353
4 changed files with 8 additions and 5 deletions
|
@ -454,7 +454,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
|
|||
(IB_DEVICE_RESIZE_MAX_WR |
|
||||
IB_DEVICE_CURR_QP_STATE_MOD |
|
||||
IB_DEVICE_SYS_IMAGE_GUID |
|
||||
IB_DEVICE_ZERO_STAG |
|
||||
IB_DEVICE_LOCAL_DMA_LKEY |
|
||||
IB_DEVICE_MEM_WINDOW);
|
||||
|
||||
/* Allocate the qptr_array */
|
||||
|
|
|
@ -1325,8 +1325,10 @@ int iwch_register_device(struct iwch_dev *dev)
|
|||
memset(&dev->ibdev.node_guid, 0, sizeof(dev->ibdev.node_guid));
|
||||
memcpy(&dev->ibdev.node_guid, dev->rdev.t3cdev_p->lldev->dev_addr, 6);
|
||||
dev->ibdev.owner = THIS_MODULE;
|
||||
dev->device_cap_flags = IB_DEVICE_ZERO_STAG |
|
||||
IB_DEVICE_MEM_WINDOW;
|
||||
dev->device_cap_flags = IB_DEVICE_LOCAL_DMA_LKEY | IB_DEVICE_MEM_WINDOW;
|
||||
|
||||
/* cxgb3 supports STag 0. */
|
||||
dev->ibdev.local_dma_lkey = 0;
|
||||
if (fw_supports_fastreg(dev))
|
||||
dev->device_cap_flags |= IB_DEVICE_MEM_MGT_EXTENSIONS;
|
||||
|
||||
|
|
|
@ -398,7 +398,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
|
|||
nesadapter->base_pd = 1;
|
||||
|
||||
nesadapter->device_cap_flags =
|
||||
IB_DEVICE_ZERO_STAG | IB_DEVICE_MEM_WINDOW;
|
||||
IB_DEVICE_LOCAL_DMA_LKEY | IB_DEVICE_MEM_WINDOW;
|
||||
|
||||
nesadapter->allocated_qps = (unsigned long *)&(((unsigned char *)nesadapter)
|
||||
[(sizeof(struct nes_adapter)+(sizeof(unsigned long)-1))&(~(sizeof(unsigned long)-1))]);
|
||||
|
|
|
@ -91,7 +91,7 @@ enum ib_device_cap_flags {
|
|||
IB_DEVICE_RC_RNR_NAK_GEN = (1<<12),
|
||||
IB_DEVICE_SRQ_RESIZE = (1<<13),
|
||||
IB_DEVICE_N_NOTIFY_CQ = (1<<14),
|
||||
IB_DEVICE_ZERO_STAG = (1<<15),
|
||||
IB_DEVICE_LOCAL_DMA_LKEY = (1<<15),
|
||||
IB_DEVICE_RESERVED = (1<<16), /* old SEND_W_INV */
|
||||
IB_DEVICE_MEM_WINDOW = (1<<17),
|
||||
/*
|
||||
|
@ -1149,6 +1149,7 @@ struct ib_device {
|
|||
|
||||
char node_desc[64];
|
||||
__be64 node_guid;
|
||||
u32 local_dma_lkey;
|
||||
u8 node_type;
|
||||
u8 phys_port_cnt;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue