Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
79bf968
RDMA/core: Commonize RDMA IOCTL declarations location
Jul 19, 2016
e578dbb
RDMA/core: Move legacy MAD IOCTL declarations to common file
Jul 20, 2016
48e4dbc
RDMA/hfi1: Avoid redeclaration error
Jul 26, 2016
89333d4
RDMA/core: Move HFI1 IOCTL declarations to common file
Jul 20, 2016
7a95c8e
RDMA/core: Rename RDMA magic number
Jul 20, 2016
b4b10b0
RDMA/core: Unify style of IOCTL commands
Jul 21, 2016
670bc2a
IB/core: Refactor IDR to be per-device
Jun 27, 2016
894dd87
IB/core: Add support for custom types
matanb10 Jun 27, 2016
70e923a
IB/core: Add support for fd objects
matanb10 Dec 20, 2016
27cfe96
IB/core: Add generic ucontext initialization and teardown
matanb10 Dec 21, 2016
c110aa7
IB/core: Add macros for declaring types and type groups.
matanb10 Dec 8, 2016
2ced250
IB/core: Declare all common IB types
matanb10 Dec 11, 2016
a5ffb8b
IB/core: Use the new IDR and locking infrastructure in uverbs_cmd
matanb10 Jul 6, 2016
c2e837e
IB/core: Add support to finalize objects in one transaction
matanb10 Dec 26, 2016
319aba0
IB/core: Add types to represent attributes and actions
matanb10 Dec 21, 2016
3f8a48e
IB/core: Add new ioctl interface
matanb10 Jun 27, 2016
e18c622
IB/core: Add macros for declaring actions and attributes
matanb10 Dec 21, 2016
0d73bd9
IB/core: Add DEVICE type
matanb10 Dec 26, 2016
18bde89
IB/core: Add uverbs types, actions, handlers and attributes
matanb10 Jul 12, 2016
6cab7be
IB/core: Add uverbs merge trees functionality
matanb10 Dec 4, 2016
16c5f63
IB: Implement common uverb objects
matanb10 Aug 9, 2016
78fb181
IB/{core,mlx5}: Support uhw definition per driver
matanb10 Dec 5, 2016
1651c78
IB/core: Support getting IOCTL header/SGEs from kernel space
matanb10 Oct 10, 2016
4a8e511
IB/core: Implement compatibility layer for get context command
matanb10 Oct 10, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions drivers/infiniband/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ config INFINIBAND_USER_ACCESS
libibverbs, libibcm and a hardware driver library from
<http://www.openfabrics.org/git/>.

config INFINIBAND_EXP_USER_ACCESS
bool "Allow experimental support for Infiniband ABI"
depends on INFINIBAND_USER_ACCESS
---help---
IOCTL based ABI support for Infiniband. This allows userspace
to invoke the experimental IOCTL based ABI.

config INFINIBAND_USE_IOCTL_BACKWARD_COMP
bool "Use IOCTL parsing for write commands"
depends on INFINIBAND_USER_ACCESS
---help---
Transform supported write commands to IOCTL commands and
execute them. Serialize the response back to the write schema.

config INFINIBAND_USER_MEM
bool
depends on INFINIBAND_USER_ACCESS != n
Expand Down
4 changes: 3 additions & 1 deletion drivers/infiniband/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ ib_umad-y := user_mad.o

ib_ucm-y := ucm.o

ib_uverbs-y := uverbs_main.o uverbs_cmd.o uverbs_marshall.o
ib_uverbs-y := uverbs_main.o uverbs_cmd.o uverbs_marshall.o \
rdma_core.o uverbs_ioctl_cmd.o uverbs_ioctl.o \
uverbs_ioctl_merge.o
14 changes: 14 additions & 0 deletions drivers/infiniband/core/core_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,18 @@ int ib_nl_handle_set_timeout(struct sk_buff *skb,
int ib_nl_handle_ip_res_resp(struct sk_buff *skb,
struct netlink_callback *cb);

/* Remove ignored fields set in the attribute mask */
static inline int modify_qp_mask(enum ib_qp_type qp_type, int mask)
{
switch (qp_type) {
case IB_QPT_XRC_INI:
return mask & ~(IB_QP_MAX_DEST_RD_ATOMIC | IB_QP_MIN_RNR_TIMER);
case IB_QPT_XRC_TGT:
return mask & ~(IB_QP_MAX_QP_RD_ATOMIC | IB_QP_RETRY_CNT |
IB_QP_RNR_RETRY);
default:
return mask;
}
}

#endif /* _CORE_PRIV_H */
14 changes: 14 additions & 0 deletions drivers/infiniband/core/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,23 @@ static int alloc_name(char *name)
return 0;
}

static void ib_device_allocate_idrs(struct ib_device *device)
{
spin_lock_init(&device->idr_lock);
idr_init(&device->idr);
}

static void ib_device_destroy_idrs(struct ib_device *device)
{
idr_destroy(&device->idr);
}

static void ib_device_release(struct device *device)
{
struct ib_device *dev = container_of(device, struct ib_device, dev);

ib_cache_release_one(dev);
ib_device_destroy_idrs(dev);
kfree(dev->port_immutable);
kfree(dev);
}
Expand Down Expand Up @@ -219,6 +231,8 @@ struct ib_device *ib_alloc_device(size_t size)
if (!device)
return NULL;

ib_device_allocate_idrs(device);

device->dev.class = &ib_class;
device_initialize(&device->dev);

Expand Down
Loading