From patchwork Mon Sep 28 02:31:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simei Su X-Patchwork-Id: 78952 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30D6AA04C0; Mon, 28 Sep 2020 04:38:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 269C21D5BB; Mon, 28 Sep 2020 04:38:02 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B2BF31D5B9 for ; Mon, 28 Sep 2020 04:37:59 +0200 (CEST) IronPort-SDR: dTUbT0K70Hzh9yoAYt7qEoExgVSQwyw5TXqSWkTehnB22ROcQJKtt2xl3+a1qmDJZ9Sokt0dP2 WrryibUSBioA== X-IronPort-AV: E=McAfee;i="6000,8403,9757"; a="162817414" X-IronPort-AV: E=Sophos;i="5.77,312,1596524400"; d="scan'208";a="162817414" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2020 19:37:53 -0700 IronPort-SDR: MXHlSMU+odd+S0JaSCxrBlC2ASFFbe/vyILUW+KNcqDE8FrUQeg3eQD0awNTZaRy1xlIu8BtzZ 0dEyoVkkC7MA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,312,1596524400"; d="scan'208";a="488378053" Received: from unknown (HELO npg-dpdk-cvl-simeisu-118d193.sh.intel.com) ([10.67.110.178]) by orsmga005.jf.intel.com with ESMTP; 27 Sep 2020 19:37:52 -0700 From: Simei Su To: qi.z.zhang@intel.com Cc: dev@dpdk.org, haiyue.wang@intel.com, qiming.yang@intel.com, Simei Su Date: Mon, 28 Sep 2020 10:31:56 +0800 Message-Id: <20200928023156.366178-1-simei.su@intel.com> X-Mailer: git-send-email 2.9.5 Subject: [dpdk-dev] [PATCH] net/ice: support drop action for DCF switch 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds drop action in DCF switch filter. Signed-off-by: Simei Su Acked-by: Qi Zhang --- drivers/net/ice/ice_switch_filter.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 4dfeeef..8cba6eb 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -1460,6 +1460,11 @@ ice_switch_parse_dcf_action(struct ice_dcf_adapter *ad, else rule_info->sw_act.vsi_handle = act_vf->id; break; + + case RTE_FLOW_ACTION_TYPE_DROP: + rule_info->sw_act.fltr_act = ICE_DROP_PACKET; + break; + default: rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,