From: Yongseok Koh <yskoh@mellanox.com>
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Yongseok Koh <yskoh@mellanox.com>,
Ori Kam <orika@mellanox.com>
Subject: [dpdk-dev] [PATCH 3/7] net/mlx5: rename flow macros
Date: Mon, 8 Oct 2018 18:02:13 +0000 [thread overview]
Message-ID: <20181008180150.39273-4-yskoh@mellanox.com> (raw)
In-Reply-To: <20181008180150.39273-1-yskoh@mellanox.com>
MLX5_ACTION_* -> MLX5_FLOW_ACTION_*
MLX5_VXLAN* -> MLX5_UDP_PORT_VXLAN*
Fixes: 0f8775dd8f1c ("net/mlx5: add support for multiple flow drivers")
Fixes: edcdef4e5fe4 ("net/mlx5: add Linux TC flower driver for E-Switch flow")
Cc: Ori Kam <orika@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 31 +++++++++++++++------------
drivers/net/mlx5/mlx5_flow.h | 28 ++++++++++++------------
drivers/net/mlx5/mlx5_flow_dv.c | 24 ++++++++++-----------
drivers/net/mlx5/mlx5_flow_tcf.c | 26 +++++++++++-----------
drivers/net/mlx5/mlx5_flow_verbs.c | 44 +++++++++++++++++++-------------------
5 files changed, 78 insertions(+), 75 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index ef5e4684f..69afd4625 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -537,7 +537,7 @@ mlx5_flow_rxq_flags_set(struct rte_eth_dev *dev, struct rte_flow *flow)
{
struct priv *priv = dev->data->dev_private;
const int mark = !!(flow->actions &
- (MLX5_ACTION_FLAG | MLX5_ACTION_MARK));
+ (MLX5_FLOW_ACTION_FLAG | MLX5_FLOW_ACTION_MARK));
const int tunnel = !!(flow->layers & MLX5_FLOW_LAYER_TUNNEL);
unsigned int i;
@@ -581,7 +581,7 @@ mlx5_flow_rxq_flags_trim(struct rte_eth_dev *dev, struct rte_flow *flow)
{
struct priv *priv = dev->data->dev_private;
const int mark = !!(flow->actions &
- (MLX5_ACTION_FLAG | MLX5_ACTION_MARK));
+ (MLX5_FLOW_ACTION_FLAG | MLX5_FLOW_ACTION_MARK));
const int tunnel = !!(flow->layers & MLX5_FLOW_LAYER_TUNNEL);
unsigned int i;
@@ -656,15 +656,15 @@ mlx5_flow_validate_action_flag(uint64_t action_flags,
struct rte_flow_error *error)
{
- if (action_flags & MLX5_ACTION_DROP)
+ if (action_flags & MLX5_FLOW_ACTION_DROP)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't drop and flag in same flow");
- if (action_flags & MLX5_ACTION_MARK)
+ if (action_flags & MLX5_FLOW_ACTION_MARK)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't mark and flag in same flow");
- if (action_flags & MLX5_ACTION_FLAG)
+ if (action_flags & MLX5_FLOW_ACTION_FLAG)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't have 2 flag"
@@ -703,15 +703,15 @@ mlx5_flow_validate_action_mark(const struct rte_flow_action *action,
&mark->id,
"mark id must in 0 <= id < "
RTE_STR(MLX5_FLOW_MARK_MAX));
- if (action_flags & MLX5_ACTION_DROP)
+ if (action_flags & MLX5_FLOW_ACTION_DROP)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't drop and mark in same flow");
- if (action_flags & MLX5_ACTION_FLAG)
+ if (action_flags & MLX5_FLOW_ACTION_FLAG)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't flag and mark in same flow");
- if (action_flags & MLX5_ACTION_MARK)
+ if (action_flags & MLX5_FLOW_ACTION_MARK)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't have 2 flag actions in same"
@@ -734,16 +734,17 @@ int
mlx5_flow_validate_action_drop(uint64_t action_flags,
struct rte_flow_error *error)
{
- if (action_flags & MLX5_ACTION_FLAG)
+ if (action_flags & MLX5_FLOW_ACTION_FLAG)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't drop and flag in same flow");
- if (action_flags & MLX5_ACTION_MARK)
+ if (action_flags & MLX5_FLOW_ACTION_MARK)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't drop and mark in same flow");
if (action_flags &
- (MLX5_ACTION_DROP | MLX5_ACTION_QUEUE | MLX5_ACTION_RSS))
+ (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE |
+ MLX5_FLOW_ACTION_RSS))
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't have 2 fate actions in"
@@ -776,7 +777,8 @@ mlx5_flow_validate_action_queue(const struct rte_flow_action *action,
const struct rte_flow_action_queue *queue = action->conf;
if (action_flags &
- (MLX5_ACTION_DROP | MLX5_ACTION_QUEUE | MLX5_ACTION_RSS))
+ (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE |
+ MLX5_FLOW_ACTION_RSS))
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't have 2 fate actions in"
@@ -820,7 +822,8 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
unsigned int i;
if (action_flags &
- (MLX5_ACTION_DROP | MLX5_ACTION_QUEUE | MLX5_ACTION_RSS))
+ (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE |
+ MLX5_FLOW_ACTION_RSS))
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't have 2 fate actions"
@@ -2304,7 +2307,7 @@ mlx5_flow_query_count(struct rte_flow *flow __rte_unused,
struct rte_flow_error *error)
{
#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT
- if (flow->actions & MLX5_ACTION_COUNT) {
+ if (flow->actions & MLX5_FLOW_ACTION_COUNT) {
struct rte_flow_query_count *qc = data;
uint64_t counters[2] = {0, 0};
struct ibv_query_counter_set_attr query_cs_attr = {
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 1ac871b3a..309e4d4f2 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -67,25 +67,25 @@
MLX5_FLOW_LAYER_INNER_L4)
/* Actions */
-#define MLX5_ACTION_DROP (1u << 0)
-#define MLX5_ACTION_QUEUE (1u << 1)
-#define MLX5_ACTION_RSS (1u << 2)
-#define MLX5_ACTION_FLAG (1u << 3)
-#define MLX5_ACTION_MARK (1u << 4)
-#define MLX5_ACTION_COUNT (1u << 5)
-#define MLX5_ACTION_PORT_ID (1u << 6)
-#define MLX5_ACTION_OF_POP_VLAN (1u << 7)
-#define MLX5_ACTION_OF_PUSH_VLAN (1u << 8)
-#define MLX5_ACTION_OF_SET_VLAN_VID (1u << 9)
-#define MLX5_ACTION_OF_SET_VLAN_PCP (1u << 10)
+#define MLX5_FLOW_ACTION_DROP (1u << 0)
+#define MLX5_FLOW_ACTION_QUEUE (1u << 1)
+#define MLX5_FLOW_ACTION_RSS (1u << 2)
+#define MLX5_FLOW_ACTION_FLAG (1u << 3)
+#define MLX5_FLOW_ACTION_MARK (1u << 4)
+#define MLX5_FLOW_ACTION_COUNT (1u << 5)
+#define MLX5_FLOW_ACTION_PORT_ID (1u << 6)
+#define MLX5_FLOW_ACTION_OF_POP_VLAN (1u << 7)
+#define MLX5_FLOW_ACTION_OF_PUSH_VLAN (1u << 8)
+#define MLX5_FLOW_ACTION_OF_SET_VLAN_VID (1u << 9)
+#define MLX5_FLOW_ACTION_OF_SET_VLAN_PCP (1u << 10)
#ifndef IPPROTO_MPLS
#define IPPROTO_MPLS 137
#endif
-/* Internent Protocol versions. */
-#define MLX5_VXLAN 4789
-#define MLX5_VXLAN_GPE 4790
+/* UDP port numbers for VxLAN. */
+#define MLX5_UDP_PORT_VXLAN 4789
+#define MLX5_UDP_PORT_VXLAN_GPE 4790
/* Priority reserved for default flows. */
#define MLX5_FLOW_PRIO_RSVD ((uint32_t)-1)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 5678dc35f..e6c84d444 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -236,7 +236,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_FLAG;
+ action_flags |= MLX5_FLOW_ACTION_FLAG;
++actions_n;
break;
case RTE_FLOW_ACTION_TYPE_MARK:
@@ -245,7 +245,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_MARK;
+ action_flags |= MLX5_FLOW_ACTION_MARK;
++actions_n;
break;
case RTE_FLOW_ACTION_TYPE_DROP:
@@ -253,7 +253,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_DROP;
+ action_flags |= MLX5_FLOW_ACTION_DROP;
++actions_n;
break;
case RTE_FLOW_ACTION_TYPE_QUEUE:
@@ -262,7 +262,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_QUEUE;
+ action_flags |= MLX5_FLOW_ACTION_QUEUE;
++actions_n;
break;
case RTE_FLOW_ACTION_TYPE_RSS:
@@ -271,14 +271,14 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_RSS;
+ action_flags |= MLX5_FLOW_ACTION_RSS;
++actions_n;
break;
case RTE_FLOW_ACTION_TYPE_COUNT:
ret = mlx5_flow_validate_action_count(dev, error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_COUNT;
+ action_flags |= MLX5_FLOW_ACTION_COUNT;
++actions_n;
break;
default:
@@ -838,8 +838,8 @@ flow_dv_translate_item_vxlan(void *matcher, void *key,
outer_headers);
headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
}
- dport = item->type == RTE_FLOW_ITEM_TYPE_VXLAN ? MLX5_VXLAN :
- MLX5_VXLAN_GPE;
+ dport = item->type == RTE_FLOW_ITEM_TYPE_VXLAN ?
+ MLX5_UDP_PORT_VXLAN : MLX5_UDP_PORT_VXLAN_GPE;
if (!MLX5_GET16(fte_match_set_lyr_2_4, headers_v, udp_dport)) {
MLX5_SET(fte_match_set_lyr_2_4, headers_m, udp_dport, 0xFFFF);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport, dport);
@@ -978,7 +978,7 @@ flow_dv_create_action(const struct rte_flow_action *action,
break;
case RTE_FLOW_ACTION_TYPE_DROP:
dev_flow->dv.actions[actions_n].type = MLX5DV_FLOW_ACTION_DROP;
- flow->actions |= MLX5_ACTION_DROP;
+ flow->actions |= MLX5_FLOW_ACTION_DROP;
break;
case RTE_FLOW_ACTION_TYPE_QUEUE:
queue = action->conf;
@@ -1195,7 +1195,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
LIST_FOREACH(dev_flow, &flow->dev_flows, next) {
dv = &dev_flow->dv;
n = dv->actions_n;
- if (flow->actions & MLX5_ACTION_DROP) {
+ if (flow->actions & MLX5_FLOW_ACTION_DROP) {
dv->hrxq = mlx5_hrxq_drop_new(dev);
if (!dv->hrxq) {
rte_flow_error_set
@@ -1251,7 +1251,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
LIST_FOREACH(dev_flow, &flow->dev_flows, next) {
struct mlx5_flow_dv *dv = &dev_flow->dv;
if (dv->hrxq) {
- if (flow->actions & MLX5_ACTION_DROP)
+ if (flow->actions & MLX5_FLOW_ACTION_DROP)
mlx5_hrxq_drop_release(dev);
else
mlx5_hrxq_release(dev, dv->hrxq);
@@ -1318,7 +1318,7 @@ flow_dv_remove(struct rte_eth_dev *dev, struct rte_flow *flow)
dv->flow = NULL;
}
if (dv->hrxq) {
- if (flow->actions & MLX5_ACTION_DROP)
+ if (flow->actions & MLX5_FLOW_ACTION_DROP)
mlx5_hrxq_drop_release(dev);
else
mlx5_hrxq_release(dev, dv->hrxq);
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index 14376188e..c87046365 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -225,7 +225,7 @@ struct flow_tcf_ptoi {
unsigned int ifindex; /**< Network interface index. */
};
-#define MLX5_TCF_FATE_ACTIONS (MLX5_ACTION_DROP | MLX5_ACTION_PORT_ID)
+#define MLX5_TCF_FATE_ACTIONS (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_PORT_ID)
/**
* Retrieve mask for pattern item.
@@ -668,7 +668,7 @@ flow_tcf_validate(struct rte_eth_dev *dev,
conf.port_id,
"missing data to convert port ID to"
" ifindex");
- action_flags |= MLX5_ACTION_PORT_ID;
+ action_flags |= MLX5_FLOW_ACTION_PORT_ID;
break;
case RTE_FLOW_ACTION_TYPE_DROP:
if (action_flags & MLX5_TCF_FATE_ACTIONS)
@@ -676,19 +676,19 @@ flow_tcf_validate(struct rte_eth_dev *dev,
(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, actions,
"can't have multiple fate actions");
- action_flags |= MLX5_ACTION_DROP;
+ action_flags |= MLX5_FLOW_ACTION_DROP;
break;
case RTE_FLOW_ACTION_TYPE_OF_POP_VLAN:
- action_flags |= MLX5_ACTION_OF_POP_VLAN;
+ action_flags |= MLX5_FLOW_ACTION_OF_POP_VLAN;
break;
case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
- action_flags |= MLX5_ACTION_OF_PUSH_VLAN;
+ action_flags |= MLX5_FLOW_ACTION_OF_PUSH_VLAN;
break;
case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID:
- action_flags |= MLX5_ACTION_OF_SET_VLAN_VID;
+ action_flags |= MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
break;
case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP:
- action_flags |= MLX5_ACTION_OF_SET_VLAN_PCP;
+ action_flags |= MLX5_FLOW_ACTION_OF_SET_VLAN_PCP;
break;
default:
return rte_flow_error_set(error, ENOTSUP,
@@ -809,26 +809,26 @@ flow_tcf_get_actions_and_size(const struct rte_flow_action actions[],
SZ_NLATTR_STRZ_OF("mirred") +
SZ_NLATTR_NEST + /* TCA_ACT_OPTIONS. */
SZ_NLATTR_TYPE_OF(struct tc_mirred);
- flags |= MLX5_ACTION_PORT_ID;
+ flags |= MLX5_FLOW_ACTION_PORT_ID;
break;
case RTE_FLOW_ACTION_TYPE_DROP:
size += SZ_NLATTR_NEST + /* na_act_index. */
SZ_NLATTR_STRZ_OF("gact") +
SZ_NLATTR_NEST + /* TCA_ACT_OPTIONS. */
SZ_NLATTR_TYPE_OF(struct tc_gact);
- flags |= MLX5_ACTION_DROP;
+ flags |= MLX5_FLOW_ACTION_DROP;
break;
case RTE_FLOW_ACTION_TYPE_OF_POP_VLAN:
- flags |= MLX5_ACTION_OF_POP_VLAN;
+ flags |= MLX5_FLOW_ACTION_OF_POP_VLAN;
goto action_of_vlan;
case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
- flags |= MLX5_ACTION_OF_PUSH_VLAN;
+ flags |= MLX5_FLOW_ACTION_OF_PUSH_VLAN;
goto action_of_vlan;
case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID:
- flags |= MLX5_ACTION_OF_SET_VLAN_VID;
+ flags |= MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
goto action_of_vlan;
case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP:
- flags |= MLX5_ACTION_OF_SET_VLAN_PCP;
+ flags |= MLX5_FLOW_ACTION_OF_SET_VLAN_PCP;
goto action_of_vlan;
action_of_vlan:
size += SZ_NLATTR_NEST + /* na_act_index. */
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 076bb39e6..0ecbc8121 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -755,7 +755,7 @@ flow_verbs_translate_action_drop(uint64_t *action_flags,
};
flow_verbs_spec_add(dev_flow, &drop, size);
- *action_flags |= MLX5_ACTION_DROP;
+ *action_flags |= MLX5_FLOW_ACTION_DROP;
}
/**
@@ -781,7 +781,7 @@ flow_verbs_translate_action_queue(const struct rte_flow_action *action,
if (flow->queue)
(*flow->queue)[0] = queue->index;
flow->rss.queue_num = 1;
- *action_flags |= MLX5_ACTION_QUEUE;
+ *action_flags |= MLX5_FLOW_ACTION_QUEUE;
}
/**
@@ -811,7 +811,7 @@ flow_verbs_translate_action_rss(const struct rte_flow_action *action,
memcpy(flow->key, rss->key, MLX5_RSS_HASH_KEY_LEN);
flow->rss.types = rss->types;
flow->rss.level = rss->level;
- *action_flags |= MLX5_ACTION_RSS;
+ *action_flags |= MLX5_FLOW_ACTION_RSS;
}
/**
@@ -838,7 +838,7 @@ flow_verbs_translate_action_flag
.size = size,
.tag_id = mlx5_flow_mark_set(MLX5_FLOW_MARK_DEFAULT),
};
- *action_flags |= MLX5_ACTION_MARK;
+ *action_flags |= MLX5_FLOW_ACTION_MARK;
flow_verbs_spec_add(dev_flow, &tag, size);
}
@@ -898,14 +898,14 @@ flow_verbs_translate_action_mark(const struct rte_flow_action *action,
};
struct mlx5_flow_verbs *verbs = &dev_flow->verbs;
- if (*action_flags & MLX5_ACTION_FLAG) {
+ if (*action_flags & MLX5_FLOW_ACTION_FLAG) {
flow_verbs_mark_update(verbs, mark->id);
size = 0;
} else {
tag.tag_id = mlx5_flow_mark_set(mark->id);
flow_verbs_spec_add(dev_flow, &tag, size);
}
- *action_flags |= MLX5_ACTION_MARK;
+ *action_flags |= MLX5_FLOW_ACTION_MARK;
}
/**
@@ -954,7 +954,7 @@ flow_verbs_translate_action_count(struct rte_eth_dev *dev,
"cannot get counter"
" context.");
}
- *action_flags |= MLX5_ACTION_COUNT;
+ *action_flags |= MLX5_FLOW_ACTION_COUNT;
#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT
counter.counter_set_handle = flow->counter->cs->handle;
flow_verbs_spec_add(dev_flow, &counter, size);
@@ -1116,7 +1116,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_FLAG;
+ action_flags |= MLX5_FLOW_ACTION_FLAG;
break;
case RTE_FLOW_ACTION_TYPE_MARK:
ret = mlx5_flow_validate_action_mark(actions,
@@ -1124,14 +1124,14 @@ flow_verbs_validate(struct rte_eth_dev *dev,
error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_MARK;
+ action_flags |= MLX5_FLOW_ACTION_MARK;
break;
case RTE_FLOW_ACTION_TYPE_DROP:
ret = mlx5_flow_validate_action_drop(action_flags,
error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_DROP;
+ action_flags |= MLX5_FLOW_ACTION_DROP;
break;
case RTE_FLOW_ACTION_TYPE_QUEUE:
ret = mlx5_flow_validate_action_queue(actions,
@@ -1139,7 +1139,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_QUEUE;
+ action_flags |= MLX5_FLOW_ACTION_QUEUE;
break;
case RTE_FLOW_ACTION_TYPE_RSS:
ret = mlx5_flow_validate_action_rss(actions,
@@ -1147,13 +1147,13 @@ flow_verbs_validate(struct rte_eth_dev *dev,
error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_RSS;
+ action_flags |= MLX5_FLOW_ACTION_RSS;
break;
case RTE_FLOW_ACTION_TYPE_COUNT:
ret = mlx5_flow_validate_action_count(dev, error);
if (ret < 0)
return ret;
- action_flags |= MLX5_ACTION_COUNT;
+ action_flags |= MLX5_FLOW_ACTION_COUNT;
break;
default:
return rte_flow_error_set(error, ENOTSUP,
@@ -1191,27 +1191,27 @@ flow_verbs_get_actions_and_size(const struct rte_flow_action actions[],
break;
case RTE_FLOW_ACTION_TYPE_FLAG:
size += sizeof(struct ibv_flow_spec_action_tag);
- detected_actions |= MLX5_ACTION_FLAG;
+ detected_actions |= MLX5_FLOW_ACTION_FLAG;
break;
case RTE_FLOW_ACTION_TYPE_MARK:
size += sizeof(struct ibv_flow_spec_action_tag);
- detected_actions |= MLX5_ACTION_MARK;
+ detected_actions |= MLX5_FLOW_ACTION_MARK;
break;
case RTE_FLOW_ACTION_TYPE_DROP:
size += sizeof(struct ibv_flow_spec_action_drop);
- detected_actions |= MLX5_ACTION_DROP;
+ detected_actions |= MLX5_FLOW_ACTION_DROP;
break;
case RTE_FLOW_ACTION_TYPE_QUEUE:
- detected_actions |= MLX5_ACTION_QUEUE;
+ detected_actions |= MLX5_FLOW_ACTION_QUEUE;
break;
case RTE_FLOW_ACTION_TYPE_RSS:
- detected_actions |= MLX5_ACTION_RSS;
+ detected_actions |= MLX5_FLOW_ACTION_RSS;
break;
case RTE_FLOW_ACTION_TYPE_COUNT:
#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT
size += sizeof(struct ibv_flow_spec_counter_action);
#endif
- detected_actions |= MLX5_ACTION_COUNT;
+ detected_actions |= MLX5_FLOW_ACTION_COUNT;
break;
default:
break;
@@ -1519,7 +1519,7 @@ flow_verbs_remove(struct rte_eth_dev *dev, struct rte_flow *flow)
verbs->flow = NULL;
}
if (verbs->hrxq) {
- if (flow->actions & MLX5_ACTION_DROP)
+ if (flow->actions & MLX5_FLOW_ACTION_DROP)
mlx5_hrxq_drop_release(dev);
else
mlx5_hrxq_release(dev, verbs->hrxq);
@@ -1578,7 +1578,7 @@ flow_verbs_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
LIST_FOREACH(dev_flow, &flow->dev_flows, next) {
verbs = &dev_flow->verbs;
- if (flow->actions & MLX5_ACTION_DROP) {
+ if (flow->actions & MLX5_FLOW_ACTION_DROP) {
verbs->hrxq = mlx5_hrxq_drop_new(dev);
if (!verbs->hrxq) {
rte_flow_error_set
@@ -1628,7 +1628,7 @@ flow_verbs_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
LIST_FOREACH(dev_flow, &flow->dev_flows, next) {
verbs = &dev_flow->verbs;
if (verbs->hrxq) {
- if (flow->actions & MLX5_ACTION_DROP)
+ if (flow->actions & MLX5_FLOW_ACTION_DROP)
mlx5_hrxq_drop_release(dev);
else
mlx5_hrxq_release(dev, verbs->hrxq);
--
2.11.0
next prev parent reply other threads:[~2018-10-08 18:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-08 18:02 [dpdk-dev] [PATCH 0/7] net/mlx5: fixes for the new flow engine Yongseok Koh
2018-10-08 18:02 ` [dpdk-dev] [PATCH 1/7] net/mlx5: fix wrong flow action macro usage Yongseok Koh
2018-10-09 7:45 ` Ori Kam
2018-10-08 18:02 ` [dpdk-dev] [PATCH 2/7] net/mlx5: use standard IP protocol numbers Yongseok Koh
2018-10-09 7:37 ` Ori Kam
2018-10-09 8:02 ` Yongseok Koh
2018-10-09 15:39 ` Ferruh Yigit
2018-10-08 18:02 ` Yongseok Koh [this message]
2018-10-09 7:43 ` [dpdk-dev] [PATCH 3/7] net/mlx5: rename flow macros Ori Kam
2018-10-09 8:05 ` Yongseok Koh
2018-10-09 8:17 ` Yongseok Koh
2018-10-10 11:57 ` Ferruh Yigit
2018-10-08 18:02 ` [dpdk-dev] [PATCH 4/7] net/mlx5: fix validation of VLAN ID in flow spec Yongseok Koh
2018-10-09 7:47 ` Ori Kam
2018-10-09 15:44 ` Ferruh Yigit
2018-10-08 18:02 ` [dpdk-dev] [PATCH 5/7] net/mlx5: fix flow validation for no fate action Yongseok Koh
2018-10-09 7:49 ` Ori Kam
2018-10-10 12:24 ` Ferruh Yigit
2018-10-08 18:02 ` [dpdk-dev] [PATCH 6/7] net/mlx5: add missing VLAN action constraints Yongseok Koh
2018-10-08 19:48 ` Or Gerlitz
2018-10-08 18:02 ` [dpdk-dev] [PATCH 7/7] net/mlx5: fix errno values for flow engine Yongseok Koh
2018-10-09 7:53 ` Ori Kam
2018-10-10 12:59 ` Ferruh Yigit
2018-10-09 8:58 ` [dpdk-dev] [PATCH 0/7] net/mlx5: fixes for the new " Shahaf Shuler
2018-10-09 15:49 ` Ferruh Yigit
2018-10-10 5:57 ` Shahaf Shuler
2018-10-10 10:57 ` Ferruh Yigit
2018-10-10 13:01 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181008180150.39273-4-yskoh@mellanox.com \
--to=yskoh@mellanox.com \
--cc=dev@dpdk.org \
--cc=orika@mellanox.com \
--cc=shahafs@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).