[dpdk-dev] net/enic: fix flow drop action

Message ID 20180510085113.14666-1-hyonkim@cisco.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Hyong Youb Kim (hyonkim) May 10, 2018, 8:51 a.m. UTC
  Drop is a fate-deciding action, so mark it as FATE. It was missing in
a previous commit.

Fixes: cc17feb90413 ("ethdev: alter behavior of flow API actions")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Cc: adrien.mazarguil@6wind.com
---
 drivers/net/enic/enic_flow.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Ferruh Yigit May 10, 2018, 11:04 p.m. UTC | #1
On 5/10/2018 9:51 AM, Hyong Youb Kim wrote:
> Drop is a fate-deciding action, so mark it as FATE. It was missing in
> a previous commit.
> 
> Fixes: cc17feb90413 ("ethdev: alter behavior of flow API actions")
> 
> Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index 525f3dd7c..0cf04aefd 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -1062,6 +1062,9 @@  enic_copy_action_v2(const struct rte_flow_action actions[],
 			break;
 		}
 		case RTE_FLOW_ACTION_TYPE_DROP: {
+			if (overlap & FATE)
+				return ENOTSUP;
+			overlap |= FATE;
 			enic_action->flags |= FILTER_ACTION_DROP_FLAG;
 			break;
 		}