IB/core: Better checking of userspace values for receive flow steering
- Don't allow unsupported comp_mask values, user should check
ibv_query_device to know which features are supported.
- Add a check in ib_uverbs_create_flow() to verify the size passed
from the user space.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 274205d..bd151ea 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -1098,6 +1098,8 @@
IB_FLOW_SPEC_UDP = 0x41
};
+#define IB_FLOW_SPEC_SUPPORT_LAYERS 4
+
/* Flow steering rule priority is set according to it's domain.
* Lower domain value means higher priority.
*/