summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2018-10-24 15:36:15 +0300
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:06 +0200
commit0ddd11437a9abc940061cbb2a046105413b9d6bf (patch)
treed8c5bf50622fba643466e0e328afbdfb5443f9c1 /drivers
parent246636411536a165637fc8e970192cc5b62de0f5 (diff)
downloaddpdk-0ddd11437a9abc940061cbb2a046105413b9d6bf.zip
dpdk-0ddd11437a9abc940061cbb2a046105413b9d6bf.tar.gz
dpdk-0ddd11437a9abc940061cbb2a046105413b9d6bf.tar.xz
net/mlx5: fix bit width of item and action flags
Most of the code uses uint64_t for MLX5_FLOW_LAYER_* and MLX5_FLOW_ACTION_*, but there're some code using uint32_t. Fixes: 2ed2fe5f0a9c ("net/mlx5: rewrite IP address UDP/TCP port by E-Switch") Fixes: 57123c00c1b8 ("net/mlx5: add Linux TC flower driver for E-Switch flow") Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items") Fixes: 3d69434113d1 ("net/mlx5: add Direct Verbs validation function") Fixes: 84c406e74524 ("net/mlx5: add flow translate function") Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/mlx5/mlx5_flow.c2
-rw-r--r--drivers/net/mlx5/mlx5_flow.h6
-rw-r--r--drivers/net/mlx5/mlx5_flow_dv.c4
-rw-r--r--drivers/net/mlx5/mlx5_flow_tcf.c6
-rw-r--r--drivers/net/mlx5/mlx5_flow_verbs.c4
5 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b170856..280af0a 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -477,7 +477,7 @@ mlx5_flow_item_acceptable(const struct rte_flow_item *item,
*/
uint64_t
mlx5_flow_hashfields_adjust(struct mlx5_flow *dev_flow,
- int tunnel __rte_unused, uint32_t layer_types,
+ int tunnel __rte_unused, uint64_t layer_types,
uint64_t hash_fields)
{
struct rte_flow *flow = dev_flow->flow;
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 4b1f36f..61299d6 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -215,7 +215,7 @@ struct mlx5_flow_verbs {
struct mlx5_flow {
LIST_ENTRY(mlx5_flow) next;
struct rte_flow *flow; /**< Pointer to the main flow. */
- uint32_t layers;
+ uint64_t layers;
/**< Bit-fields of present layers, see MLX5_FLOW_LAYER_*. */
union {
#ifdef HAVE_IBV_FLOW_DV_SUPPORT
@@ -251,7 +251,7 @@ struct rte_flow {
uint16_t (*queue)[]; /**< Destination queues to redirect traffic to. */
LIST_HEAD(dev_flows, mlx5_flow) dev_flows;
/**< Device flows that are part of the flow. */
- uint32_t actions;
+ uint64_t actions;
/**< Bit-fields of detected actions, see MLX5_FLOW_ACTION_*. */
};
typedef int (*mlx5_flow_validate_t)(struct rte_eth_dev *dev,
@@ -293,7 +293,7 @@ struct mlx5_flow_driver_ops {
/* mlx5_flow.c */
uint64_t mlx5_flow_hashfields_adjust(struct mlx5_flow *dev_flow, int tunnel,
- uint32_t layer_types,
+ uint64_t layer_types,
uint64_t hash_fields);
uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
uint32_t subpriority);
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 53e9a17..8f729f4 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -165,8 +165,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
struct rte_flow_error *error)
{
int ret;
- uint32_t action_flags = 0;
- uint32_t item_flags = 0;
+ uint64_t action_flags = 0;
+ uint64_t item_flags = 0;
int tunnel = 0;
uint8_t next_protocol = 0xff;
int actions_n = 0;
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index dca9f71..719fb10 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -963,8 +963,8 @@ flow_tcf_validate(struct rte_eth_dev *dev,
const struct rte_flow_action_set_ipv4 *set_ipv4;
const struct rte_flow_action_set_ipv6 *set_ipv6;
} conf;
- uint32_t item_flags = 0;
- uint32_t action_flags = 0;
+ uint64_t item_flags = 0;
+ uint64_t action_flags = 0;
uint8_t next_protocol = -1;
unsigned int tcm_ifindex = 0;
uint8_t pedit_validated = 0;
@@ -1181,7 +1181,7 @@ flow_tcf_validate(struct rte_eth_dev *dev,
}
for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
unsigned int i;
- uint32_t current_action_flag = 0;
+ uint64_t current_action_flag = 0;
switch (actions->type) {
case RTE_FLOW_ACTION_TYPE_VOID:
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index a435d65..81bc39f 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1114,8 +1114,8 @@ flow_verbs_validate(struct rte_eth_dev *dev,
struct rte_flow_error *error)
{
int ret;
- uint32_t action_flags = 0;
- uint32_t item_flags = 0;
+ uint64_t action_flags = 0;
+ uint64_t item_flags = 0;
int tunnel = 0;
uint8_t next_protocol = 0xff;