From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 28D112E41 for ; Mon, 17 Jul 2017 05:57:02 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 16 Jul 2017 20:57:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,373,1496127600"; d="scan'208";a="108767343" Received: from dpdk28.sh.intel.com ([10.67.110.203]) by orsmga004.jf.intel.com with ESMTP; 16 Jul 2017 20:57:00 -0700 From: Qi Zhang To: wenzhuo.lu@intel.com Cc: dev@dpdk.org, Qi Zhang Date: Mon, 17 Jul 2017 19:46:35 +0800 Message-Id: <20170717114635.37616-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.9.4 Subject: [dpdk-dev] [PATCH] net/ixgbe: fix drop action for signature match X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 03:57:03 -0000 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") Signed-off-by: Qi Zhang --- drivers/net/ixgbe/ixgbe_flow.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index f70bdb0..cb177f3 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -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; } -- 2.9.4