* [dpdk-dev] [PATCH] net/mlx5: fix drop action seg fault
@ 2017-06-21 11:55 Shachar Beiser
2017-06-21 13:02 ` Nélio Laranjeiro
` (4 more replies)
0 siblings, 5 replies; 17+ messages in thread
From: Shachar Beiser @ 2017-06-21 11:55 UTC (permalink / raw)
To: dev; +Cc: Adrien Mazarguil, Nelio Laranjeiro, Shachar Beiser
Missing room in flow allocation to store the drop specification.
Changing flow without storing the change in rte_flow.
Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 12893c6..cad3d16 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -580,6 +580,8 @@ struct mlx5_flow_action {
}
if (action->mark && !flow->ibv_attr && !action->drop)
flow->offset += sizeof(struct ibv_exp_flow_spec_action_tag);
+ if (!flow->ibv_attr && action->drop)
+ flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
if (!action->queue && !action->drop) {
rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "no valid action");
@@ -1011,9 +1013,6 @@ struct mlx5_flow_action {
return NULL;
}
rte_flow->drop = 1;
- rte_flow->ibv_attr = flow->ibv_attr;
- if (!priv->started)
- return rte_flow;
#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset);
*drop = (struct ibv_exp_flow_spec_action_drop){
@@ -1023,6 +1022,9 @@ struct mlx5_flow_action {
++flow->ibv_attr->num_of_specs;
flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
#endif
+ rte_flow->ibv_attr = flow->ibv_attr;
+ if (!priv->started)
+ return rte_flow;
rte_flow->qp = priv->flow_drop_queue->qp;
rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp,
rte_flow->ibv_attr);
--
1.8.3.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix drop action seg fault
2017-06-21 11:55 [dpdk-dev] [PATCH] net/mlx5: fix drop action seg fault Shachar Beiser
@ 2017-06-21 13:02 ` Nélio Laranjeiro
2017-06-22 9:51 ` Ferruh Yigit
2017-06-22 11:11 ` Ferruh Yigit
` (3 subsequent siblings)
4 siblings, 1 reply; 17+ messages in thread
From: Nélio Laranjeiro @ 2017-06-21 13:02 UTC (permalink / raw)
To: Shachar Beiser, Ferruh Yigit; +Cc: dev, Adrien Mazarguil
On Wed, Jun 21, 2017 at 11:55:58AM +0000, Shachar Beiser wrote:
> Missing room in flow allocation to store the drop specification.
> Changing flow without storing the change in rte_flow.
> Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
>
> Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 12893c6..cad3d16 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -580,6 +580,8 @@ struct mlx5_flow_action {
> }
> if (action->mark && !flow->ibv_attr && !action->drop)
> flow->offset += sizeof(struct ibv_exp_flow_spec_action_tag);
> + if (!flow->ibv_attr && action->drop)
> + flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
> if (!action->queue && !action->drop) {
> rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,
> NULL, "no valid action");
> @@ -1011,9 +1013,6 @@ struct mlx5_flow_action {
> return NULL;
> }
> rte_flow->drop = 1;
> - rte_flow->ibv_attr = flow->ibv_attr;
> - if (!priv->started)
> - return rte_flow;
> #ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
> drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset);
> *drop = (struct ibv_exp_flow_spec_action_drop){
> @@ -1023,6 +1022,9 @@ struct mlx5_flow_action {
> ++flow->ibv_attr->num_of_specs;
> flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
> #endif
> + rte_flow->ibv_attr = flow->ibv_attr;
> + if (!priv->started)
> + return rte_flow;
> rte_flow->qp = priv->flow_drop_queue->qp;
> rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp,
> rte_flow->ibv_attr);
> --
> 1.8.3.1
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Ferruh, this patch is fixing an issue of a patch only present in your
master-net branch, the fixline sha1 will be wrong.
Thanks,
--
Nélio Laranjeiro
6WIND
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix drop action seg fault
2017-06-21 13:02 ` Nélio Laranjeiro
@ 2017-06-22 9:51 ` Ferruh Yigit
0 siblings, 0 replies; 17+ messages in thread
From: Ferruh Yigit @ 2017-06-22 9:51 UTC (permalink / raw)
To: Nélio Laranjeiro, Shachar Beiser; +Cc: dev, Adrien Mazarguil
Hi Nelio,
On 6/21/2017 2:02 PM, Nélio Laranjeiro wrote:
> On Wed, Jun 21, 2017 at 11:55:58AM +0000, Shachar Beiser wrote:
>> Missing room in flow allocation to store the drop specification.
>> Changing flow without storing the change in rte_flow.
>> Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
>>
>> Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
<...>
>> --
>> 1.8.3.1
>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
>
> Ferruh, this patch is fixing an issue of a patch only present in your
> master-net branch, the fixline sha1 will be wrong.
I can squash this into relevant patch (88c77dedfbb0).
But there is another patch [1] that cause conflict and seems fixing same
commit (88c77dedfbb0) again.
What do you think squashing all three into one?
I can share latest patch if you want.
[1] net/mlx5: fix creation of drop flows
http://dpdk.org/browse/next/dpdk-next-net/commit/?id=e0e37c1f80a00a2acbb581649b3125a5d465f2c6
>
> Thanks,
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix drop action seg fault
2017-06-21 11:55 [dpdk-dev] [PATCH] net/mlx5: fix drop action seg fault Shachar Beiser
2017-06-21 13:02 ` Nélio Laranjeiro
@ 2017-06-22 11:11 ` Ferruh Yigit
2017-06-25 7:42 ` [dpdk-dev] [PATCH v2] fix drop action seg fault missing compilation flag Shachar Beiser
` (2 subsequent siblings)
4 siblings, 0 replies; 17+ messages in thread
From: Ferruh Yigit @ 2017-06-22 11:11 UTC (permalink / raw)
To: Shachar Beiser, dev; +Cc: Adrien Mazarguil, Nelio Laranjeiro
On 6/21/2017 12:55 PM, Shachar Beiser wrote:
> Missing room in flow allocation to store the drop specification.
> Changing flow without storing the change in rte_flow.
> Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
>
> Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 12893c6..cad3d16 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -580,6 +580,8 @@ struct mlx5_flow_action {
> }
> if (action->mark && !flow->ibv_attr && !action->drop)
> flow->offset += sizeof(struct ibv_exp_flow_spec_action_tag);
> + if (!flow->ibv_attr && action->drop)
> + flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
Is using "struct ibv_exp_flow_spec_action_drop" here required
HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP check?
> if (!action->queue && !action->drop) {
> rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,
> NULL, "no valid action");
> @@ -1011,9 +1013,6 @@ struct mlx5_flow_action {
> return NULL;
> }
> rte_flow->drop = 1;
> - rte_flow->ibv_attr = flow->ibv_attr;
> - if (!priv->started)
> - return rte_flow;
> #ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
> drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset);
> *drop = (struct ibv_exp_flow_spec_action_drop){
> @@ -1023,6 +1022,9 @@ struct mlx5_flow_action {
> ++flow->ibv_attr->num_of_specs;
> flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
> #endif
> + rte_flow->ibv_attr = flow->ibv_attr;
> + if (!priv->started)
> + return rte_flow;
> rte_flow->qp = priv->flow_drop_queue->qp;
> rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp,
> rte_flow->ibv_attr);
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v2] fix drop action seg fault missing compilation flag
2017-06-21 11:55 [dpdk-dev] [PATCH] net/mlx5: fix drop action seg fault Shachar Beiser
2017-06-21 13:02 ` Nélio Laranjeiro
2017-06-22 11:11 ` Ferruh Yigit
@ 2017-06-25 7:42 ` Shachar Beiser
2017-06-25 7:42 ` [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault Shachar Beiser
2017-06-25 7:46 ` [dpdk-dev] [PATCH v2] fix drop action seg fault missing compilation flag Shachar Beiser
2017-06-25 7:53 ` [dpdk-dev] [PATCH v2] Adding compilation flag for fix drop action seg fault Shachar Beiser
2017-06-25 7:53 ` [dpdk-dev] [PATCH v2] net/mlx5: " Shachar Beiser
4 siblings, 2 replies; 17+ messages in thread
From: Shachar Beiser @ 2017-06-25 7:42 UTC (permalink / raw)
To: dev; +Cc: Adrien Mazarguil, Nelio Laranjeiro, Shachar Beiser
Shachar Beiser (1):
net/mlx5: fix drop action seg fault
drivers/net/mlx5/mlx5_flow.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault
2017-06-25 7:42 ` [dpdk-dev] [PATCH v2] fix drop action seg fault missing compilation flag Shachar Beiser
@ 2017-06-25 7:42 ` Shachar Beiser
2017-06-25 7:46 ` Shachar Beiser
2017-06-25 7:46 ` [dpdk-dev] [PATCH v2] fix drop action seg fault missing compilation flag Shachar Beiser
1 sibling, 1 reply; 17+ messages in thread
From: Shachar Beiser @ 2017-06-25 7:42 UTC (permalink / raw)
To: dev; +Cc: Adrien Mazarguil, Nelio Laranjeiro, Shachar Beiser
Missing room in flow allocation to store the drop specification.
Changing flow without storing the change in rte_flow.
Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 12893c6..86be929 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -580,6 +580,10 @@ struct mlx5_flow_action {
}
if (action->mark && !flow->ibv_attr && !action->drop)
flow->offset += sizeof(struct ibv_exp_flow_spec_action_tag);
+#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
+ if (!flow->ibv_attr && action->drop)
+ flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
+#endif
if (!action->queue && !action->drop) {
rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "no valid action");
@@ -1011,9 +1015,6 @@ struct mlx5_flow_action {
return NULL;
}
rte_flow->drop = 1;
- rte_flow->ibv_attr = flow->ibv_attr;
- if (!priv->started)
- return rte_flow;
#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset);
*drop = (struct ibv_exp_flow_spec_action_drop){
@@ -1023,6 +1024,9 @@ struct mlx5_flow_action {
++flow->ibv_attr->num_of_specs;
flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
#endif
+ rte_flow->ibv_attr = flow->ibv_attr;
+ if (!priv->started)
+ return rte_flow;
rte_flow->qp = priv->flow_drop_queue->qp;
rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp,
rte_flow->ibv_attr);
--
1.8.3.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v2] fix drop action seg fault missing compilation flag
2017-06-25 7:42 ` [dpdk-dev] [PATCH v2] fix drop action seg fault missing compilation flag Shachar Beiser
2017-06-25 7:42 ` [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault Shachar Beiser
@ 2017-06-25 7:46 ` Shachar Beiser
1 sibling, 0 replies; 17+ messages in thread
From: Shachar Beiser @ 2017-06-25 7:46 UTC (permalink / raw)
To: dev; +Cc: Adrien Mazarguil, Nelio Laranjeiro, Shachar Beiser
Shachar Beiser (1):
net/mlx5: fix drop action seg fault
drivers/net/mlx5/mlx5_flow.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault
2017-06-25 7:42 ` [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault Shachar Beiser
@ 2017-06-25 7:46 ` Shachar Beiser
0 siblings, 0 replies; 17+ messages in thread
From: Shachar Beiser @ 2017-06-25 7:46 UTC (permalink / raw)
To: dev; +Cc: Adrien Mazarguil, Nelio Laranjeiro, Shachar Beiser
Missing room in flow allocation to store the drop specification.
Changing flow without storing the change in rte_flow.
Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 12893c6..86be929 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -580,6 +580,10 @@ struct mlx5_flow_action {
}
if (action->mark && !flow->ibv_attr && !action->drop)
flow->offset += sizeof(struct ibv_exp_flow_spec_action_tag);
+#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
+ if (!flow->ibv_attr && action->drop)
+ flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
+#endif
if (!action->queue && !action->drop) {
rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "no valid action");
@@ -1011,9 +1015,6 @@ struct mlx5_flow_action {
return NULL;
}
rte_flow->drop = 1;
- rte_flow->ibv_attr = flow->ibv_attr;
- if (!priv->started)
- return rte_flow;
#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset);
*drop = (struct ibv_exp_flow_spec_action_drop){
@@ -1023,6 +1024,9 @@ struct mlx5_flow_action {
++flow->ibv_attr->num_of_specs;
flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
#endif
+ rte_flow->ibv_attr = flow->ibv_attr;
+ if (!priv->started)
+ return rte_flow;
rte_flow->qp = priv->flow_drop_queue->qp;
rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp,
rte_flow->ibv_attr);
--
1.8.3.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v2] Adding compilation flag for fix drop action seg fault
2017-06-21 11:55 [dpdk-dev] [PATCH] net/mlx5: fix drop action seg fault Shachar Beiser
` (2 preceding siblings ...)
2017-06-25 7:42 ` [dpdk-dev] [PATCH v2] fix drop action seg fault missing compilation flag Shachar Beiser
@ 2017-06-25 7:53 ` Shachar Beiser
2017-06-25 7:55 ` Shachar Beiser
2017-06-25 7:53 ` [dpdk-dev] [PATCH v2] net/mlx5: " Shachar Beiser
4 siblings, 1 reply; 17+ messages in thread
From: Shachar Beiser @ 2017-06-25 7:53 UTC (permalink / raw)
To: dev; +Cc: Adrien Mazarguil, Nelio Laranjeiro, Shachar Beiser
Shachar Beiser (1):
net/mlx5: fix drop action seg fault
drivers/net/mlx5/mlx5_flow.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault
2017-06-21 11:55 [dpdk-dev] [PATCH] net/mlx5: fix drop action seg fault Shachar Beiser
` (3 preceding siblings ...)
2017-06-25 7:53 ` [dpdk-dev] [PATCH v2] Adding compilation flag for fix drop action seg fault Shachar Beiser
@ 2017-06-25 7:53 ` Shachar Beiser
2017-06-25 7:55 ` Shachar Beiser
2017-06-26 12:28 ` Nélio Laranjeiro
4 siblings, 2 replies; 17+ messages in thread
From: Shachar Beiser @ 2017-06-25 7:53 UTC (permalink / raw)
To: dev; +Cc: Adrien Mazarguil, Nelio Laranjeiro, Shachar Beiser
Missing room in flow allocation to store the drop specification.
Changing flow without storing the change in rte_flow.
Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 12893c6..86be929 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -580,6 +580,10 @@ struct mlx5_flow_action {
}
if (action->mark && !flow->ibv_attr && !action->drop)
flow->offset += sizeof(struct ibv_exp_flow_spec_action_tag);
+#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
+ if (!flow->ibv_attr && action->drop)
+ flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
+#endif
if (!action->queue && !action->drop) {
rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "no valid action");
@@ -1011,9 +1015,6 @@ struct mlx5_flow_action {
return NULL;
}
rte_flow->drop = 1;
- rte_flow->ibv_attr = flow->ibv_attr;
- if (!priv->started)
- return rte_flow;
#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset);
*drop = (struct ibv_exp_flow_spec_action_drop){
@@ -1023,6 +1024,9 @@ struct mlx5_flow_action {
++flow->ibv_attr->num_of_specs;
flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
#endif
+ rte_flow->ibv_attr = flow->ibv_attr;
+ if (!priv->started)
+ return rte_flow;
rte_flow->qp = priv->flow_drop_queue->qp;
rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp,
rte_flow->ibv_attr);
--
1.8.3.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v2] Adding compilation flag for fix drop action seg fault
2017-06-25 7:53 ` [dpdk-dev] [PATCH v2] Adding compilation flag for fix drop action seg fault Shachar Beiser
@ 2017-06-25 7:55 ` Shachar Beiser
0 siblings, 0 replies; 17+ messages in thread
From: Shachar Beiser @ 2017-06-25 7:55 UTC (permalink / raw)
To: shacharbe, dev; +Cc: Adrien Mazarguil, Nelio Laranjeiro
Shachar Beiser (1):
net/mlx5: fix drop action seg fault
drivers/net/mlx5/mlx5_flow.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault
2017-06-25 7:53 ` [dpdk-dev] [PATCH v2] net/mlx5: " Shachar Beiser
@ 2017-06-25 7:55 ` Shachar Beiser
2017-06-26 12:28 ` Nélio Laranjeiro
1 sibling, 0 replies; 17+ messages in thread
From: Shachar Beiser @ 2017-06-25 7:55 UTC (permalink / raw)
To: shacharbe, dev; +Cc: Adrien Mazarguil, Nelio Laranjeiro
Missing room in flow allocation to store the drop specification.
Changing flow without storing the change in rte_flow.
Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 12893c6..86be929 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -580,6 +580,10 @@ struct mlx5_flow_action {
}
if (action->mark && !flow->ibv_attr && !action->drop)
flow->offset += sizeof(struct ibv_exp_flow_spec_action_tag);
+#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
+ if (!flow->ibv_attr && action->drop)
+ flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
+#endif
if (!action->queue && !action->drop) {
rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "no valid action");
@@ -1011,9 +1015,6 @@ struct mlx5_flow_action {
return NULL;
}
rte_flow->drop = 1;
- rte_flow->ibv_attr = flow->ibv_attr;
- if (!priv->started)
- return rte_flow;
#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset);
*drop = (struct ibv_exp_flow_spec_action_drop){
@@ -1023,6 +1024,9 @@ struct mlx5_flow_action {
++flow->ibv_attr->num_of_specs;
flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
#endif
+ rte_flow->ibv_attr = flow->ibv_attr;
+ if (!priv->started)
+ return rte_flow;
rte_flow->qp = priv->flow_drop_queue->qp;
rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp,
rte_flow->ibv_attr);
--
1.8.3.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault
2017-06-25 7:53 ` [dpdk-dev] [PATCH v2] net/mlx5: " Shachar Beiser
2017-06-25 7:55 ` Shachar Beiser
@ 2017-06-26 12:28 ` Nélio Laranjeiro
2017-06-26 12:55 ` Ferruh Yigit
2017-06-26 14:12 ` Ferruh Yigit
1 sibling, 2 replies; 17+ messages in thread
From: Nélio Laranjeiro @ 2017-06-26 12:28 UTC (permalink / raw)
To: Shachar Beiser; +Cc: dev, Adrien Mazarguil
On Sun, Jun 25, 2017 at 07:55:01AM +0000, Shachar Beiser wrote:
> Missing room in flow allocation to store the drop specification.
> Changing flow without storing the change in rte_flow.
> Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
>
> Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 12893c6..86be929 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -580,6 +580,10 @@ struct mlx5_flow_action {
> }
> if (action->mark && !flow->ibv_attr && !action->drop)
> flow->offset += sizeof(struct ibv_exp_flow_spec_action_tag);
> +#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
> + if (!flow->ibv_attr && action->drop)
> + flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
> +#endif
> if (!action->queue && !action->drop) {
> rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,
> NULL, "no valid action");
> @@ -1011,9 +1015,6 @@ struct mlx5_flow_action {
> return NULL;
> }
> rte_flow->drop = 1;
> - rte_flow->ibv_attr = flow->ibv_attr;
> - if (!priv->started)
> - return rte_flow;
> #ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
> drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset);
> *drop = (struct ibv_exp_flow_spec_action_drop){
> @@ -1023,6 +1024,9 @@ struct mlx5_flow_action {
> ++flow->ibv_attr->num_of_specs;
> flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
> #endif
> + rte_flow->ibv_attr = flow->ibv_attr;
> + if (!priv->started)
> + return rte_flow;
> rte_flow->qp = priv->flow_drop_queue->qp;
> rte_flow->ibv_flow = ibv_exp_create_flow(rte_flow->qp,
> rte_flow->ibv_attr);
> --
> 1.8.3.1
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
--
Nélio Laranjeiro
6WIND
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault
2017-06-26 12:28 ` Nélio Laranjeiro
@ 2017-06-26 12:55 ` Ferruh Yigit
2017-06-26 13:41 ` Nélio Laranjeiro
2017-06-26 14:12 ` Ferruh Yigit
1 sibling, 1 reply; 17+ messages in thread
From: Ferruh Yigit @ 2017-06-26 12:55 UTC (permalink / raw)
To: Nélio Laranjeiro, Shachar Beiser; +Cc: dev, Adrien Mazarguil
On 6/26/2017 1:28 PM, Nélio Laranjeiro wrote:
> On Sun, Jun 25, 2017 at 07:55:01AM +0000, Shachar Beiser wrote:
>> Missing room in flow allocation to store the drop specification.
>> Changing flow without storing the change in rte_flow.
>> Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
>>
>> Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Hi Nelio, Shachar,
What do you think squashing this and [1] into 88c77dedfbb0? Both this
and [1] looks like fixing same commit.
[1]
e0e37c1f80a0 ("net/mlx5: fix creation of drop flows")
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault
2017-06-26 12:55 ` Ferruh Yigit
@ 2017-06-26 13:41 ` Nélio Laranjeiro
2017-06-26 13:51 ` Ferruh Yigit
0 siblings, 1 reply; 17+ messages in thread
From: Nélio Laranjeiro @ 2017-06-26 13:41 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Shachar Beiser, dev, Adrien Mazarguil
On Mon, Jun 26, 2017 at 01:55:33PM +0100, Ferruh Yigit wrote:
> On 6/26/2017 1:28 PM, Nélio Laranjeiro wrote:
> > On Sun, Jun 25, 2017 at 07:55:01AM +0000, Shachar Beiser wrote:
> >> Missing room in flow allocation to store the drop specification.
> >> Changing flow without storing the change in rte_flow.
> >> Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
> >>
> >> Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
>
> > Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
>
> Hi Nelio, Shachar,
>
> What do you think squashing this and [1] into 88c77dedfbb0? Both this
> and [1] looks like fixing same commit.
>
> [1]
> e0e37c1f80a0 ("net/mlx5: fix creation of drop flows")
Hi Ferruh,
No it is not the same issue, one this new patch is fixing some code for
the hardware drop flow support which will be available with next version
of MLNX_OFED.
e0e37c1f80a0 ("net/mlx5: fix creation of drop flows") is fixing the
current version of the software drop queue which is possible with the
current MLNX_OFED GA.
Please keep them separate.
Thanks,
--
Nélio Laranjeiro
6WIND
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault
2017-06-26 13:41 ` Nélio Laranjeiro
@ 2017-06-26 13:51 ` Ferruh Yigit
0 siblings, 0 replies; 17+ messages in thread
From: Ferruh Yigit @ 2017-06-26 13:51 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: Shachar Beiser, dev, Adrien Mazarguil
On 6/26/2017 2:41 PM, Nélio Laranjeiro wrote:
> On Mon, Jun 26, 2017 at 01:55:33PM +0100, Ferruh Yigit wrote:
>> On 6/26/2017 1:28 PM, Nélio Laranjeiro wrote:
>>> On Sun, Jun 25, 2017 at 07:55:01AM +0000, Shachar Beiser wrote:
>>>> Missing room in flow allocation to store the drop specification.
>>>> Changing flow without storing the change in rte_flow.
>>>> Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
>>>>
>>>> Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
>>
>>> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
>>
>> Hi Nelio, Shachar,
>>
>> What do you think squashing this and [1] into 88c77dedfbb0? Both this
>> and [1] looks like fixing same commit.
>>
>> [1]
>> e0e37c1f80a0 ("net/mlx5: fix creation of drop flows")
>
> Hi Ferruh,
>
> No it is not the same issue, one this new patch is fixing some code for
> the hardware drop flow support which will be available with next version
> of MLNX_OFED.
>
> e0e37c1f80a0 ("net/mlx5: fix creation of drop flows") is fixing the
> current version of the software drop queue which is possible with the
> current MLNX_OFED GA.
>
> Please keep them separate.
OK, thanks for clarification.
>
> Thanks,
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault
2017-06-26 12:28 ` Nélio Laranjeiro
2017-06-26 12:55 ` Ferruh Yigit
@ 2017-06-26 14:12 ` Ferruh Yigit
1 sibling, 0 replies; 17+ messages in thread
From: Ferruh Yigit @ 2017-06-26 14:12 UTC (permalink / raw)
To: Nélio Laranjeiro, Shachar Beiser; +Cc: dev, Adrien Mazarguil
On 6/26/2017 1:28 PM, Nélio Laranjeiro wrote:
> On Sun, Jun 25, 2017 at 07:55:01AM +0000, Shachar Beiser wrote:
>> Missing room in flow allocation to store the drop specification.
>> Changing flow without storing the change in rte_flow.
>> Fixes: 88c77dedfbb0 ("net/mlx5: implement drop action in hardware classifier")
>>
>> Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Squashed into relevant commit in next-net, thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2017-06-26 14:12 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21 11:55 [dpdk-dev] [PATCH] net/mlx5: fix drop action seg fault Shachar Beiser
2017-06-21 13:02 ` Nélio Laranjeiro
2017-06-22 9:51 ` Ferruh Yigit
2017-06-22 11:11 ` Ferruh Yigit
2017-06-25 7:42 ` [dpdk-dev] [PATCH v2] fix drop action seg fault missing compilation flag Shachar Beiser
2017-06-25 7:42 ` [dpdk-dev] [PATCH v2] net/mlx5: fix drop action seg fault Shachar Beiser
2017-06-25 7:46 ` Shachar Beiser
2017-06-25 7:46 ` [dpdk-dev] [PATCH v2] fix drop action seg fault missing compilation flag Shachar Beiser
2017-06-25 7:53 ` [dpdk-dev] [PATCH v2] Adding compilation flag for fix drop action seg fault Shachar Beiser
2017-06-25 7:55 ` Shachar Beiser
2017-06-25 7:53 ` [dpdk-dev] [PATCH v2] net/mlx5: " Shachar Beiser
2017-06-25 7:55 ` Shachar Beiser
2017-06-26 12:28 ` Nélio Laranjeiro
2017-06-26 12:55 ` Ferruh Yigit
2017-06-26 13:41 ` Nélio Laranjeiro
2017-06-26 13:51 ` Ferruh Yigit
2017-06-26 14:12 ` Ferruh Yigit
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).