DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH] net/ice: fix FDIR rule duplication check failure
  2019-11-19 16:01 [dpdk-dev] [PATCH] net/ice: fix FDIR rule duplication check failure Yahui Cao
@ 2019-11-19  9:26 ` Zhang, Qi Z
  2019-11-20  8:56 ` Ye Xiaolong
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2019-11-19  9:26 UTC (permalink / raw)
  To: Cao, Yahui, Yang, Qiming, Lu, Wenzhuo; +Cc: dev, Ye, Xiaolong, Wang, Ying A



> -----Original Message-----
> From: Cao, Yahui <yahui.cao@intel.com>
> Sent: Wednesday, November 20, 2019 12:01 AM
> To: Yang, Qiming <qiming.yang@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Cao, Yahui
> <yahui.cao@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>; Wang, Ying A
> <ying.a.wang@intel.com>
> Subject: [PATCH] net/ice: fix FDIR rule duplication check failure
> 
> When FDIR filter detects duplicated rule and then returns EEXIST, ice flow will
> capture this error and return immediately.
> 
> Fixes: 4e27d3ed02bd ("net/ice: fix flow API framework")
> Cc: ying.a.wang@intel.com
> 
> Signed-off-by: Yahui Cao <yahui.cao@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>



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

* [dpdk-dev] [PATCH] net/ice: fix FDIR rule duplication check failure
@ 2019-11-19 16:01 Yahui Cao
  2019-11-19  9:26 ` Zhang, Qi Z
  2019-11-20  8:56 ` Ye Xiaolong
  0 siblings, 2 replies; 3+ messages in thread
From: Yahui Cao @ 2019-11-19 16:01 UTC (permalink / raw)
  To: Qiming Yang, Wenzhuo Lu
  Cc: dev, Qi Zhang, Yahui Cao, Xiaolong Ye, Ying A Wang

When FDIR filter detects duplicated rule and then returns EEXIST, ice
flow will capture this error and return immediately.

Fixes: 4e27d3ed02bd ("net/ice: fix flow API framework")
Cc: ying.a.wang@intel.com

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 5594f8555..1d8c83418 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1698,6 +1698,8 @@ ice_parse_engine_create(struct ice_adapter *ad,
 	void *temp;
 
 	TAILQ_FOREACH_SAFE(parser_node, parser_list, node, temp) {
+		int ret;
+
 		if (parser_node->parser->parse_pattern_action(ad,
 				parser_node->parser->array,
 				parser_node->parser->array_len,
@@ -1712,8 +1714,11 @@ ice_parse_engine_create(struct ice_adapter *ad,
 			continue;
 		}
 
-		if (!(engine->create(ad, flow, *meta, error)))
+		ret = engine->create(ad, flow, *meta, error);
+		if (ret == 0)
 			return engine;
+		else if (ret == -EEXIST)
+			return NULL;
 	}
 	return NULL;
 }
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] net/ice: fix FDIR rule duplication check failure
  2019-11-19 16:01 [dpdk-dev] [PATCH] net/ice: fix FDIR rule duplication check failure Yahui Cao
  2019-11-19  9:26 ` Zhang, Qi Z
@ 2019-11-20  8:56 ` Ye Xiaolong
  1 sibling, 0 replies; 3+ messages in thread
From: Ye Xiaolong @ 2019-11-20  8:56 UTC (permalink / raw)
  To: Yahui Cao; +Cc: Qiming Yang, Wenzhuo Lu, dev, Qi Zhang, Ying A Wang

On 11/20, Yahui Cao wrote:
>When FDIR filter detects duplicated rule and then returns EEXIST, ice
>flow will capture this error and return immediately.
>
>Fixes: 4e27d3ed02bd ("net/ice: fix flow API framework")
>Cc: ying.a.wang@intel.com
>
>Signed-off-by: Yahui Cao <yahui.cao@intel.com>
>---
> drivers/net/ice/ice_generic_flow.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
>index 5594f8555..1d8c83418 100644
>--- a/drivers/net/ice/ice_generic_flow.c
>+++ b/drivers/net/ice/ice_generic_flow.c
>@@ -1698,6 +1698,8 @@ ice_parse_engine_create(struct ice_adapter *ad,
> 	void *temp;
> 
> 	TAILQ_FOREACH_SAFE(parser_node, parser_list, node, temp) {
>+		int ret;
>+
> 		if (parser_node->parser->parse_pattern_action(ad,
> 				parser_node->parser->array,
> 				parser_node->parser->array_len,
>@@ -1712,8 +1714,11 @@ ice_parse_engine_create(struct ice_adapter *ad,
> 			continue;
> 		}
> 
>-		if (!(engine->create(ad, flow, *meta, error)))
>+		ret = engine->create(ad, flow, *meta, error);
>+		if (ret == 0)
> 			return engine;
>+		else if (ret == -EEXIST)
>+			return NULL;
> 	}
> 	return NULL;
> }
>-- 
>2.17.1
>

Applied to dpdk-next-net-intel, Thanks.

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

end of thread, other threads:[~2019-11-20  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 16:01 [dpdk-dev] [PATCH] net/ice: fix FDIR rule duplication check failure Yahui Cao
2019-11-19  9:26 ` Zhang, Qi Z
2019-11-20  8:56 ` Ye Xiaolong

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