* [dpdk-dev] [PATCH 0/5] net/mlx5: fixes
@ 2017-10-31 15:51 Nelio Laranjeiro
2017-10-31 15:51 ` [dpdk-dev] [PATCH 1/5] net/mlx5: fix parser inner value Nelio Laranjeiro
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Nelio Laranjeiro @ 2017-10-31 15:51 UTC (permalink / raw)
To: dev; +Cc: Yongseok Koh, Adrien Mazarguil
- Multiple fixes for tunnels in flow actions.
- fix some mistakes in flow director code.
Nelio Laranjeiro (5):
net/mlx5: fix parser inner value
net/mlx5: fix flows when VXLAN tunnel is 0
net/mlx5: fix RSS tunneled flow without outer
net/mlx5: fix fdir flow removal
net/mlx5: fix flow director TCPv6 filter
doc/guides/nics/mlx5.rst | 2 ++
drivers/net/mlx5/mlx5_flow.c | 29 +++++++++++++++++++----------
2 files changed, 21 insertions(+), 10 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dpdk-dev] [PATCH 1/5] net/mlx5: fix parser inner value
2017-10-31 15:51 [dpdk-dev] [PATCH 0/5] net/mlx5: fixes Nelio Laranjeiro
@ 2017-10-31 15:51 ` Nelio Laranjeiro
2017-10-31 23:46 ` Yongseok Koh
2017-10-31 15:51 ` [dpdk-dev] [PATCH 2/5] net/mlx5: fix flows when VXLAN tunnel is 0 Nelio Laranjeiro
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Nelio Laranjeiro @ 2017-10-31 15:51 UTC (permalink / raw)
To: dev; +Cc: Yongseok Koh, Adrien Mazarguil, stable
In validate() it sets the value to 1 whereas the expected one is
IBV_FLOW_SPEC_INNER.
Fixes: c2c6ddd51da4 ("net/mlx5: limit flow API rules to one tunnel")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 3eb84e2a4..68cc8bff5 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -866,7 +866,7 @@ priv_flow_convert_items_validate(struct priv *priv,
" VXLAN encapsulations");
return -rte_errno;
}
- parser->inner = 1;
+ parser->inner = IBV_FLOW_SPEC_INNER;
}
if (parser->drop) {
parser->drop_q.offset += cur_item->dst_sz;
--
2.11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dpdk-dev] [PATCH 2/5] net/mlx5: fix flows when VXLAN tunnel is 0
2017-10-31 15:51 [dpdk-dev] [PATCH 0/5] net/mlx5: fixes Nelio Laranjeiro
2017-10-31 15:51 ` [dpdk-dev] [PATCH 1/5] net/mlx5: fix parser inner value Nelio Laranjeiro
@ 2017-10-31 15:51 ` Nelio Laranjeiro
2017-11-01 18:56 ` Yongseok Koh
2017-10-31 15:51 ` [dpdk-dev] [PATCH 3/5] net/mlx5: fix RSS tunneled flow without outer Nelio Laranjeiro
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Nelio Laranjeiro @ 2017-10-31 15:51 UTC (permalink / raw)
To: dev; +Cc: Yongseok Koh, Adrien Mazarguil, stable
Fix a strange behavior from the NIC, when the flow starts with a VXLAN
layer with a VNI equals to zero all the traffic will match within this
rule.
Fixes: 2e709b6aa0f5 ("net/mlx5: support VXLAN flow item")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
doc/guides/nics/mlx5.rst | 2 ++
drivers/net/mlx5/mlx5_flow.c | 12 +++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index cdb880a4c..19da9f1ed 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -129,6 +129,8 @@ Limitations
is set to multi-packet send or Enhanced multi-packet send. Otherwise it must have
less than 50 segments.
- Count action for RTE flow is only supported in Mellanox OFED 4.2.
+- Flows with a VXLAN Network Identifier equal (or ends to be equal)
+ to 0 are not supported.
Configuration
-------------
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 68cc8bff5..a7864871c 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1158,7 +1158,7 @@ priv_flow_convert(struct priv *priv,
cur_item->mask),
parser);
if (ret) {
- rte_flow_error_set(error, ENOTSUP,
+ rte_flow_error_set(error, ret,
RTE_FLOW_ERROR_TYPE_ITEM,
items, "item not supported");
goto exit_free;
@@ -1605,6 +1605,16 @@ mlx5_flow_create_vxlan(const struct rte_flow_item *item,
/* Remove unwanted bits from values. */
vxlan.val.tunnel_id &= vxlan.mask.tunnel_id;
}
+ /*
+ * Tunnel id 0 is equivalent as not adding a VXLAN layer, if only this
+ * layer is defined in the Verbs specification it is interpreted as
+ * wildcard and all packets will match this rule, if it follows a full
+ * stack layer (ex: eth / ipv4 / udp), all packets matching the layers
+ * before will also match this rule.
+ * To avoid such situation, VNI 0 is currently refused.
+ */
+ if (!vxlan.val.tunnel_id)
+ return EINVAL;
mlx5_flow_create_copy(parser, &vxlan, size);
return 0;
}
--
2.11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dpdk-dev] [PATCH 3/5] net/mlx5: fix RSS tunneled flow without outer
2017-10-31 15:51 [dpdk-dev] [PATCH 0/5] net/mlx5: fixes Nelio Laranjeiro
2017-10-31 15:51 ` [dpdk-dev] [PATCH 1/5] net/mlx5: fix parser inner value Nelio Laranjeiro
2017-10-31 15:51 ` [dpdk-dev] [PATCH 2/5] net/mlx5: fix flows when VXLAN tunnel is 0 Nelio Laranjeiro
@ 2017-10-31 15:51 ` Nelio Laranjeiro
2017-11-01 18:56 ` Yongseok Koh
2017-10-31 15:51 ` [dpdk-dev] [PATCH 4/5] net/mlx5: fix fdir flow removal Nelio Laranjeiro
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Nelio Laranjeiro @ 2017-10-31 15:51 UTC (permalink / raw)
To: dev; +Cc: Yongseok Koh, Adrien Mazarguil, shahafs
Allow to use the RSS when the outer part of the packet is not defined. The
RSS is still performed on the outer.
This modification only serves the internal engine to create the necessary
Verbs flows according to the user request.
Fixes: 39797c6db80b ("net/mlx5: fix RSS action for tunneled packets")
Cc: shahafs@mellanox.com
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_flow.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index a7864871c..fcc9a260e 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1010,15 +1010,13 @@ priv_flow_convert_finalise(struct priv *priv, struct mlx5_flow_parse *parser)
if (hash_rxq_init[i].ip_version == MLX5_IPV4) {
size = sizeof(struct ibv_flow_spec_ipv4_ext);
specs.ipv4 = (struct ibv_flow_spec_ipv4_ext){
- .type = IBV_FLOW_SPEC_IPV4_EXT |
- parser->inner,
+ .type = IBV_FLOW_SPEC_IPV4_EXT,
.size = size,
};
} else {
size = sizeof(struct ibv_flow_spec_ipv6);
specs.ipv6 = (struct ibv_flow_spec_ipv6){
- .type = IBV_FLOW_SPEC_IPV6 |
- parser->inner,
+ .type = IBV_FLOW_SPEC_IPV6,
.size = size,
};
}
@@ -1038,8 +1036,7 @@ priv_flow_convert_finalise(struct priv *priv, struct mlx5_flow_parse *parser)
.type = ((i == HASH_RXQ_UDPV4 ||
i == HASH_RXQ_UDPV6) ?
IBV_FLOW_SPEC_UDP :
- IBV_FLOW_SPEC_TCP) |
- parser->inner,
+ IBV_FLOW_SPEC_TCP),
.size = size,
};
if (parser->queue[i].ibv_attr) {
--
2.11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dpdk-dev] [PATCH 4/5] net/mlx5: fix fdir flow removal
2017-10-31 15:51 [dpdk-dev] [PATCH 0/5] net/mlx5: fixes Nelio Laranjeiro
` (2 preceding siblings ...)
2017-10-31 15:51 ` [dpdk-dev] [PATCH 3/5] net/mlx5: fix RSS tunneled flow without outer Nelio Laranjeiro
@ 2017-10-31 15:51 ` Nelio Laranjeiro
2017-11-01 0:43 ` Yongseok Koh
2017-10-31 15:51 ` [dpdk-dev] [PATCH 5/5] net/mlx5: fix flow director TCPv6 filter Nelio Laranjeiro
2017-11-01 21:34 ` [dpdk-dev] [PATCH 0/5] net/mlx5: fixes Ferruh Yigit
5 siblings, 1 reply; 12+ messages in thread
From: Nelio Laranjeiro @ 2017-10-31 15:51 UTC (permalink / raw)
To: dev; +Cc: Yongseok Koh, Adrien Mazarguil
Initialise struct mlx5_fdir to avoid passing non initialised items/actions
arrays elements to the generic flow interpreter.
Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_flow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index fcc9a260e..d8b0d7508 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2847,7 +2847,9 @@ static int
priv_fdir_filter_delete(struct priv *priv,
const struct rte_eth_fdir_filter *fdir_filter)
{
- struct mlx5_fdir attributes;
+ struct mlx5_fdir attributes = {
+ .attr.group = 0,
+ };
struct mlx5_flow_parse parser = {
.create = 1,
.layer = HASH_RXQ_ETH,
--
2.11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dpdk-dev] [PATCH 5/5] net/mlx5: fix flow director TCPv6 filter
2017-10-31 15:51 [dpdk-dev] [PATCH 0/5] net/mlx5: fixes Nelio Laranjeiro
` (3 preceding siblings ...)
2017-10-31 15:51 ` [dpdk-dev] [PATCH 4/5] net/mlx5: fix fdir flow removal Nelio Laranjeiro
@ 2017-10-31 15:51 ` Nelio Laranjeiro
2017-11-01 0:43 ` Yongseok Koh
2017-11-01 21:34 ` [dpdk-dev] [PATCH 0/5] net/mlx5: fixes Ferruh Yigit
5 siblings, 1 reply; 12+ messages in thread
From: Nelio Laranjeiro @ 2017-10-31 15:51 UTC (permalink / raw)
To: dev; +Cc: Yongseok Koh, Adrien Mazarguil
Flow director to generic flow conversion wrongly handles TCPv6 layer.
Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index d8b0d7508..8ff2a02c8 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2754,7 +2754,7 @@ priv_fdir_filter_convert(struct priv *priv,
.spec = &attributes->l3,
};
attributes->items[2] = (struct rte_flow_item){
- .type = RTE_FLOW_ITEM_TYPE_UDP,
+ .type = RTE_FLOW_ITEM_TYPE_TCP,
.spec = &attributes->l4,
};
break;
--
2.11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/5] net/mlx5: fix parser inner value
2017-10-31 15:51 ` [dpdk-dev] [PATCH 1/5] net/mlx5: fix parser inner value Nelio Laranjeiro
@ 2017-10-31 23:46 ` Yongseok Koh
0 siblings, 0 replies; 12+ messages in thread
From: Yongseok Koh @ 2017-10-31 23:46 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: dev, Adrien Mazarguil, stable
> On Oct 31, 2017, at 8:51 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
>
> In validate() it sets the value to 1 whereas the expected one is
> IBV_FLOW_SPEC_INNER.
>
> Fixes: c2c6ddd51da4 ("net/mlx5: limit flow API rules to one tunnel")
> Cc: stable@dpdk.org
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Thanks
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 5/5] net/mlx5: fix flow director TCPv6 filter
2017-10-31 15:51 ` [dpdk-dev] [PATCH 5/5] net/mlx5: fix flow director TCPv6 filter Nelio Laranjeiro
@ 2017-11-01 0:43 ` Yongseok Koh
0 siblings, 0 replies; 12+ messages in thread
From: Yongseok Koh @ 2017-11-01 0:43 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: dev, Adrien Mazarguil
> On Oct 31, 2017, at 8:51 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
>
> Flow director to generic flow conversion wrongly handles TCPv6 layer.
>
> Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Thanks
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 4/5] net/mlx5: fix fdir flow removal
2017-10-31 15:51 ` [dpdk-dev] [PATCH 4/5] net/mlx5: fix fdir flow removal Nelio Laranjeiro
@ 2017-11-01 0:43 ` Yongseok Koh
0 siblings, 0 replies; 12+ messages in thread
From: Yongseok Koh @ 2017-11-01 0:43 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: dev, Adrien Mazarguil
> On Oct 31, 2017, at 8:51 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
>
> Initialise struct mlx5_fdir to avoid passing non initialised items/actions
> arrays elements to the generic flow interpreter.
>
> Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Thanks
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 3/5] net/mlx5: fix RSS tunneled flow without outer
2017-10-31 15:51 ` [dpdk-dev] [PATCH 3/5] net/mlx5: fix RSS tunneled flow without outer Nelio Laranjeiro
@ 2017-11-01 18:56 ` Yongseok Koh
0 siblings, 0 replies; 12+ messages in thread
From: Yongseok Koh @ 2017-11-01 18:56 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: dev, Adrien Mazarguil, Shahaf Shuler
> On Oct 31, 2017, at 8:51 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
>
> Allow to use the RSS when the outer part of the packet is not defined. The
> RSS is still performed on the outer.
> This modification only serves the internal engine to create the necessary
> Verbs flows according to the user request.
>
> Fixes: 39797c6db80b ("net/mlx5: fix RSS action for tunneled packets")
> Cc: shahafs@mellanox.com
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Thanks
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 2/5] net/mlx5: fix flows when VXLAN tunnel is 0
2017-10-31 15:51 ` [dpdk-dev] [PATCH 2/5] net/mlx5: fix flows when VXLAN tunnel is 0 Nelio Laranjeiro
@ 2017-11-01 18:56 ` Yongseok Koh
0 siblings, 0 replies; 12+ messages in thread
From: Yongseok Koh @ 2017-11-01 18:56 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: dev, Adrien Mazarguil, stable
> On Oct 31, 2017, at 8:51 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
>
> Fix a strange behavior from the NIC, when the flow starts with a VXLAN
> layer with a VNI equals to zero all the traffic will match within this
> rule.
>
> Fixes: 2e709b6aa0f5 ("net/mlx5: support VXLAN flow item")
> Cc: stable@dpdk.org
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Thanks
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 0/5] net/mlx5: fixes
2017-10-31 15:51 [dpdk-dev] [PATCH 0/5] net/mlx5: fixes Nelio Laranjeiro
` (4 preceding siblings ...)
2017-10-31 15:51 ` [dpdk-dev] [PATCH 5/5] net/mlx5: fix flow director TCPv6 filter Nelio Laranjeiro
@ 2017-11-01 21:34 ` Ferruh Yigit
5 siblings, 0 replies; 12+ messages in thread
From: Ferruh Yigit @ 2017-11-01 21:34 UTC (permalink / raw)
To: Nelio Laranjeiro, dev; +Cc: Yongseok Koh, Adrien Mazarguil
On 10/31/2017 8:51 AM, Nelio Laranjeiro wrote:
> - Multiple fixes for tunnels in flow actions.
> - fix some mistakes in flow director code.
>
> Nelio Laranjeiro (5):
> net/mlx5: fix parser inner value
> net/mlx5: fix flows when VXLAN tunnel is 0
> net/mlx5: fix RSS tunneled flow without outer
> net/mlx5: fix fdir flow removal
> net/mlx5: fix flow director TCPv6 filter
Series applied to dpdk-next-net/master, thanks.
Except patch 3/5, it squashed into relevant commit [1].
[1]: "net/mlx5: fix RSS action for tunneled packets"
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2017-11-01 21:34 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 15:51 [dpdk-dev] [PATCH 0/5] net/mlx5: fixes Nelio Laranjeiro
2017-10-31 15:51 ` [dpdk-dev] [PATCH 1/5] net/mlx5: fix parser inner value Nelio Laranjeiro
2017-10-31 23:46 ` Yongseok Koh
2017-10-31 15:51 ` [dpdk-dev] [PATCH 2/5] net/mlx5: fix flows when VXLAN tunnel is 0 Nelio Laranjeiro
2017-11-01 18:56 ` Yongseok Koh
2017-10-31 15:51 ` [dpdk-dev] [PATCH 3/5] net/mlx5: fix RSS tunneled flow without outer Nelio Laranjeiro
2017-11-01 18:56 ` Yongseok Koh
2017-10-31 15:51 ` [dpdk-dev] [PATCH 4/5] net/mlx5: fix fdir flow removal Nelio Laranjeiro
2017-11-01 0:43 ` Yongseok Koh
2017-10-31 15:51 ` [dpdk-dev] [PATCH 5/5] net/mlx5: fix flow director TCPv6 filter Nelio Laranjeiro
2017-11-01 0:43 ` Yongseok Koh
2017-11-01 21:34 ` [dpdk-dev] [PATCH 0/5] net/mlx5: fixes 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).