Skip to contentSkip to conversation

net/ixgbe: fix drop action for signature match

PATCH Applied Qi Zhang 2 participants 2 messages Jul 17, 2017 – Jul 18, 2017 Network drivers

lore
Share & tools
lore

Qi Zhang

author
#0 lore raw

PATCH 1/1 net/ixgbe: fix drop action for signature match

Drop action is not supported by signature match, should return error when try to create a signature match flow with drop action.

Fixes a948d33bc05a ("net/ixgbe: enable signature match for consistent API")
---
 drivers/net/ixgbe/ixgbe_flow.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/ixgbe/ixgbe_flow.c +8 -0
index f70bdb0..cb177f3 100644
@@ -1233,6 +1233,14 @@ ixgbe_parse_fdir_act_attr(const struct rte_flow_attr *attr,
 		act_q = (const struct rte_flow_action_queue *)act->conf;
 		rule->queue = act_q->index;
 	} else { /* drop */
+		/* signature mode does not support drop action. */
+		if (rule->mode == RTE_FDIR_MODE_SIGNATURE) {
+			memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
+			rte_flow_error_set(error, EINVAL,
+				RTE_FLOW_ERROR_TYPE_ACTION,
+				act, "Not supported action.");
+			return -rte_errno;
+		}
 		rule->fdirflags = IXGBE_FDIRCMD_DROP;
 	}
 
Signature · 1 line
2.9.4
Applied
#1 lore raw
Quoted 6 lines · Qi Zhang

Drop action is not supported by signature match, should return error when try to create a signature match flow with drop action.

Fixes a948d33bc05a ("net/ixgbe: enable signature match for consistent API")

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