DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion
@ 2018-01-23  8:05 Nelio Laranjeiro
  2018-01-23  8:05 ` [dpdk-dev] [PATCH 2/3] net/mlx5: fix flow item validation Nelio Laranjeiro
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nelio Laranjeiro @ 2018-01-23  8:05 UTC (permalink / raw)
  To: dev, Shahaf Shuler; +Cc: Adrien Mazarguil, stable

Flow director must provide the same spec and mask to be sure to be
validated.

Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 13b6483ba..c56ef54cf 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2656,10 +2656,12 @@ priv_fdir_filter_convert(struct priv *priv,
 		attributes->items[1] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_IPV4,
 			.spec = &attributes->l3,
+			.mask = &attributes->l3,
 		};
 		attributes->items[2] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_UDP,
 			.spec = &attributes->l4,
+			.mask = &attributes->l4,
 		};
 		break;
 	case RTE_ETH_FLOW_NONFRAG_IPV4_TCP:
@@ -2677,10 +2679,12 @@ priv_fdir_filter_convert(struct priv *priv,
 		attributes->items[1] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_IPV4,
 			.spec = &attributes->l3,
+			.mask = &attributes->l3,
 		};
 		attributes->items[2] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_TCP,
 			.spec = &attributes->l4,
+			.mask = &attributes->l4,
 		};
 		break;
 	case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER:
@@ -2694,6 +2698,7 @@ priv_fdir_filter_convert(struct priv *priv,
 		attributes->items[1] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_IPV4,
 			.spec = &attributes->l3,
+			.mask = &attributes->l3,
 		};
 		break;
 	case RTE_ETH_FLOW_NONFRAG_IPV6_UDP:
@@ -2714,10 +2719,12 @@ priv_fdir_filter_convert(struct priv *priv,
 		attributes->items[1] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_IPV6,
 			.spec = &attributes->l3,
+			.mask = &attributes->l3,
 		};
 		attributes->items[2] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_UDP,
 			.spec = &attributes->l4,
+			.mask = &attributes->l4,
 		};
 		break;
 	case RTE_ETH_FLOW_NONFRAG_IPV6_TCP:
@@ -2738,10 +2745,12 @@ priv_fdir_filter_convert(struct priv *priv,
 		attributes->items[1] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_IPV6,
 			.spec = &attributes->l3,
+			.mask = &attributes->l3,
 		};
 		attributes->items[2] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_TCP,
 			.spec = &attributes->l4,
+			.mask = &attributes->l4,
 		};
 		break;
 	case RTE_ETH_FLOW_NONFRAG_IPV6_OTHER:
@@ -2758,6 +2767,7 @@ priv_fdir_filter_convert(struct priv *priv,
 		attributes->items[1] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_IPV6,
 			.spec = &attributes->l3,
+			.mask = &attributes->l3,
 		};
 		break;
 	default:
-- 
2.11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 2/3] net/mlx5: fix flow item validation
  2018-01-23  8:05 [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion Nelio Laranjeiro
@ 2018-01-23  8:05 ` Nelio Laranjeiro
  2018-01-23  8:05 ` [dpdk-dev] [PATCH 3/3] net/mlx5: support IPv4 time-to-live filter Nelio Laranjeiro
  2018-01-25 15:52 ` [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion Shahaf Shuler
  2 siblings, 0 replies; 4+ messages in thread
From: Nelio Laranjeiro @ 2018-01-23  8:05 UTC (permalink / raw)
  To: dev, Shahaf Shuler; +Cc: Adrien Mazarguil, stable

Two masks were compared instead of verifying the spec was included in the
supported mask.

Fixes: 2097d0d1e2cc ("net/mlx5: support basic flow items and actions")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.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 c56ef54cf..01e290484 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -529,7 +529,7 @@ mlx5_flow_item_validate(const struct rte_flow_item *item,
 	}
 	if (item->mask) {
 		unsigned int i;
-		const uint8_t *spec = item->mask;
+		const uint8_t *spec = item->spec;
 
 		for (i = 0; i < size; ++i)
 			if ((spec[i] | mask[i]) != mask[i])
-- 
2.11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 3/3] net/mlx5: support IPv4 time-to-live filter
  2018-01-23  8:05 [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion Nelio Laranjeiro
  2018-01-23  8:05 ` [dpdk-dev] [PATCH 2/3] net/mlx5: fix flow item validation Nelio Laranjeiro
@ 2018-01-23  8:05 ` Nelio Laranjeiro
  2018-01-25 15:52 ` [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion Shahaf Shuler
  2 siblings, 0 replies; 4+ messages in thread
From: Nelio Laranjeiro @ 2018-01-23  8:05 UTC (permalink / raw)
  To: dev, Shahaf Shuler; +Cc: Adrien Mazarguil

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 01e290484..516f60939 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -353,6 +353,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
 				.dst_addr = -1,
 				.type_of_service = -1,
 				.next_proto_id = -1,
+				.time_to_live = -1,
 			},
 		},
 		.default_mask = &rte_flow_item_ipv4_mask,
-- 
2.11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion
  2018-01-23  8:05 [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion Nelio Laranjeiro
  2018-01-23  8:05 ` [dpdk-dev] [PATCH 2/3] net/mlx5: fix flow item validation Nelio Laranjeiro
  2018-01-23  8:05 ` [dpdk-dev] [PATCH 3/3] net/mlx5: support IPv4 time-to-live filter Nelio Laranjeiro
@ 2018-01-25 15:52 ` Shahaf Shuler
  2 siblings, 0 replies; 4+ messages in thread
From: Shahaf Shuler @ 2018-01-25 15:52 UTC (permalink / raw)
  To: Nélio Laranjeiro, dev; +Cc: Adrien Mazarguil, stable

Tuesday, January 23, 2018 10:05 AM, Nelio Laranjeiro:
> Subject: [PATCH 1/3] net/mlx5: fix flow director conversion
> 
> Flow director must provide the same spec and mask to be sure to be
> validated.
> 
> Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Series applied to next-net-mlx, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-25 15:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23  8:05 [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion Nelio Laranjeiro
2018-01-23  8:05 ` [dpdk-dev] [PATCH 2/3] net/mlx5: fix flow item validation Nelio Laranjeiro
2018-01-23  8:05 ` [dpdk-dev] [PATCH 3/3] net/mlx5: support IPv4 time-to-live filter Nelio Laranjeiro
2018-01-25 15:52 ` [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion Shahaf Shuler

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).