Blame SOURCES/0003-ibverbs-Allow-creation-of-QP-with-cvlan-stripping-of.patch

23f80e
From 9a0668e887dfab9df405d3b76286a1ee5ec3efaf Mon Sep 17 00:00:00 2001
23f80e
From: Noa Osherovich <noaos@mellanox.com>
23f80e
Date: Tue, 29 Nov 2016 10:12:31 +0200
23f80e
Subject: [PATCH rdma-core 3/6] ibverbs: Allow creation of QP with cvlan
23f80e
 stripping offload
23f80e
23f80e
Allow users to create a QP that uses cvlan stripping capabilities if
23f80e
supported by the hardware.
23f80e
23f80e
Setting cvlan stripping offload will cause the device to strip the
23f80e
cvlan from incoming raw Ethernet packets and provide its data in the
23f80e
matching work completion.
23f80e
23f80e
In addition, aligned ibv_create_qp_ex's man page with current code
23f80e
(added ibv_qp_create_flags enum).
23f80e
23f80e
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
23f80e
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
23f80e
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
23f80e
---
23f80e
 libibverbs/cmd.c                  | 3 ++-
23f80e
 libibverbs/man/ibv_create_qp_ex.3 | 8 ++++++++
23f80e
 libibverbs/verbs.h                | 1 +
23f80e
 3 files changed, 11 insertions(+), 1 deletion(-)
23f80e
23f80e
diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
23f80e
index b8fe76df..06ec6711 100644
23f80e
--- a/libibverbs/cmd.c
23f80e
+++ b/libibverbs/cmd.c
23f80e
@@ -926,7 +926,8 @@ static void create_qp_handle_resp_common(struct ibv_context *context,
23f80e
 
23f80e
 enum {
23f80e
 	CREATE_QP_EX2_SUP_CREATE_FLAGS = IBV_QP_CREATE_BLOCK_SELF_MCAST_LB |
23f80e
-		IBV_QP_CREATE_SCATTER_FCS,
23f80e
+					 IBV_QP_CREATE_SCATTER_FCS |
23f80e
+					 IBV_QP_CREATE_CVLAN_STRIPPING,
23f80e
 };
23f80e
 
23f80e
 int ibv_cmd_create_qp_ex2(struct ibv_context *context,
23f80e
diff --git a/libibverbs/man/ibv_create_qp_ex.3 b/libibverbs/man/ibv_create_qp_ex.3
23f80e
index c778d159..99ae4975 100644
23f80e
--- a/libibverbs/man/ibv_create_qp_ex.3
23f80e
+++ b/libibverbs/man/ibv_create_qp_ex.3
23f80e
@@ -52,6 +52,14 @@ uint32_t                max_inline_data;/* Requested max number of data (bytes)
23f80e
 .in -8
23f80e
 };
23f80e
 .nf
23f80e
+enum ibv_qp_create_flags {
23f80e
+.in +8
23f80e
+IBV_QP_CREATE_BLOCK_SELF_MCAST_LB       = 1 << 1, /* Prevent self multicast loopback */
23f80e
+IBV_QP_CREATE_SCATTER_FCS               = 1 << 8, /* FCS field will be scattered to host memory */
23f80e
+IBV_QP_CREATE_CVLAN_STRIPPING           = 1 << 9, /* CVLAN field will be stripped from incoming packets */
23f80e
+.in -8
23f80e
+};
23f80e
+.nf
23f80e
 struct ibv_rx_hash_conf {
23f80e
 .in +8
23f80e
 uint8_t                rx_hash_function;       /* RX hash function, use enum ibv_rx_hash_function_flags */
23f80e
diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h
23f80e
index 33985666..c9084ea1 100644
23f80e
--- a/libibverbs/verbs.h
23f80e
+++ b/libibverbs/verbs.h
23f80e
@@ -780,6 +780,7 @@ enum ibv_qp_init_attr_mask {
23f80e
 enum ibv_qp_create_flags {
23f80e
 	IBV_QP_CREATE_BLOCK_SELF_MCAST_LB	= 1 << 1,
23f80e
 	IBV_QP_CREATE_SCATTER_FCS		= 1 << 8,
23f80e
+	IBV_QP_CREATE_CVLAN_STRIPPING		= 1 << 9,
23f80e
 };
23f80e
 
23f80e
 struct ibv_rx_hash_conf {
23f80e
-- 
23f80e
2.12.1
23f80e