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>
This commit is contained in:
Matan Barak
2013-09-01 18:39:52 +03:00
committed by Roland Dreier
parent f77c0162a3
commit 22878dbc91
2 changed files with 17 additions and 1 deletions

View File

@@ -1098,6 +1098,8 @@ enum ib_flow_spec_type {
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.
*/