From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DF652A09D9; Wed, 11 Nov 2020 17:10:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C69B8593A; Wed, 11 Nov 2020 17:10:08 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 54BC12AB for ; Wed, 11 Nov 2020 17:10:06 +0100 (CET) IronPort-SDR: V9MHBaz0CB3vrnws0XhRafpup+hxCeOW3BV9WaznNGDX27pK27PyB8rmUgH/3/qxQjTmD+C6Tj RjeLEkUtScUw== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="166659054" X-IronPort-AV: E=Sophos;i="5.77,469,1596524400"; d="scan'208";a="166659054" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2020 08:10:02 -0800 IronPort-SDR: mPPzZhOxaj2LxWOlxr2JetSNdzKin6sUtBqZ9CYPaPygPFdI3D5UAlW5Gmy+q3I26gqyjrqhyb wj7/4w5f6aUA== X-IronPort-AV: E=Sophos;i="5.77,469,1596524400"; d="scan'208";a="473904639" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.241.123]) ([10.213.241.123]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2020 08:10:01 -0800 To: Jiawen Wu , dev@dpdk.org References: <20201111064936.768604-1-jiawenwu@trustnetic.com> <20201111064936.768604-13-jiawenwu@trustnetic.com> From: Ferruh Yigit Message-ID: Date: Wed, 11 Nov 2020 16:10:00 +0000 MIME-Version: 1.0 In-Reply-To: <20201111064936.768604-13-jiawenwu@trustnetic.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 12/37] net/txgbe: add L2 tunnel filter parse rule 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" On 11/11/2020 6:49 AM, Jiawen Wu wrote: > Add support to parse flow for L2 tunnel filter. > <...> > +static int > +txgbe_parse_l2_tn_filter(struct rte_eth_dev *dev, > + const struct rte_flow_attr *attr, > + const struct rte_flow_item pattern[], > + const struct rte_flow_action actions[], > + struct txgbe_l2_tunnel_conf *l2_tn_filter, > + struct rte_flow_error *error) > +{ > + int ret = 0; > + > + ret = cons_parse_l2_tn_filter(dev, attr, pattern, > + actions, l2_tn_filter, error); > + > + memset(l2_tn_filter, 0, sizeof(struct txgbe_l2_tunnel_conf)); > + rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ITEM, > + NULL, "Not supported by L2 tunnel filter"); > + ret = -rte_errno; > + return ret; > +} If at the end of the day, error is send unconditionally, why parsed at all? Or why this filter type exists at all?