aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/verbs.c
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2012-03-01 12:17:51 +0200
committerRoland Dreier <roland@purestorage.com>2012-05-08 11:18:09 -0700
commitc938a616aadb621b8e26b0ac09ac13d053c7ed1c (patch)
tree85144d93d117f9d31a589385d65f36f061648b8f /drivers/infiniband/core/verbs.c
parentLinux 3.4-rc6 (diff)
downloadlinux-dev-c938a616aadb621b8e26b0ac09ac13d053c7ed1c.tar.xz
linux-dev-c938a616aadb621b8e26b0ac09ac13d053c7ed1c.zip
IB/core: Add raw packet QP type
IB_QPT_RAW_PACKET allows applications to build a complete packet, including L2 headers, when sending; on the receive side, the HW will not strip any headers. This QP type is designed for userspace direct access to Ethernet; for example by applications that do TCP/IP themselves. Only processes with the NET_RAW capability are allowed to create raw packet QPs (the name "raw packet QP" is supposed to suggest an analogy to AF_PACKET / SOL_RAW sockets). Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/core/verbs.c')
-rw-r--r--drivers/infiniband/core/verbs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 575b78045aaf..140f9a5d492f 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -479,6 +479,7 @@ static const struct {
[IB_QPT_UD] = (IB_QP_PKEY_INDEX |
IB_QP_PORT |
IB_QP_QKEY),
+ [IB_QPT_RAW_PACKET] = IB_QP_PORT,
[IB_QPT_UC] = (IB_QP_PKEY_INDEX |
IB_QP_PORT |
IB_QP_ACCESS_FLAGS),