From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E57E4C43613 for ; Thu, 20 Jun 2019 09:01:29 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 25CBA2084A for ; Thu, 20 Jun 2019 09:01:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25CBA2084A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 32D8D1D079; Thu, 20 Jun 2019 11:01:27 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1F7551D04B for ; Thu, 20 Jun 2019 11:01:24 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2019 02:01:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,396,1557212400"; d="scan'208";a="165260700" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 20 Jun 2019 02:01:23 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Jun 2019 02:01:23 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Jun 2019 02:01:23 -0700 Received: from shsmsx106.ccr.corp.intel.com ([169.254.10.89]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.246]) with mapi id 14.03.0439.000; Thu, 20 Jun 2019 17:01:21 +0800 From: "Wang, Xiao W" To: "Yang, Qiming" , "dev@dpdk.org" CC: "Zhao1, Wei" , "Zhang, Qi Z" , "Xing, Beilei" Thread-Topic: [dpdk-dev] [PATCH v3 1/3] net/ice: enable switch filter Thread-Index: AQHVJyp4LH/yclW/ekC0get+pSVcx6akOZwA Date: Thu, 20 Jun 2019 09:01:20 +0000 Message-ID: References: <1559552722-8970-1-git-send-email-qiming.yang@intel.com> <20190620053449.32959-1-qiming.yang@intel.com> <20190620053449.32959-2-qiming.yang@intel.com> In-Reply-To: <20190620053449.32959-2-qiming.yang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2ZkYjgzZTAtMTE2NS00N2M1LTlmNzMtZjM5MWVkMDcyOTVhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVDlSRVl0ZTBPVTdhRnlheVdFSUxaNW9idUZYV3Z2WW5Lc0Nlbm8xRTluanJMY2hmUVpSYlBaQXNcL21QK2ZBN1kifQ== dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 1/3] net/ice: enable switch filter 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" Hi, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiming Yang > Sent: Thursday, June 20, 2019 1:35 PM > To: dev@dpdk.org > Cc: Zhao1, Wei > Subject: [dpdk-dev] [PATCH v3 1/3] net/ice: enable switch filter >=20 > From: wei zhao >=20 > The patch enables the backend of rte_flow. It transfers > rte_flow_xxx to device specific data structure and > configures packet process engine's binary classifier > (switch) properly. >=20 > Signed-off-by: Wei Zhao > --- > drivers/net/ice/Makefile | 1 + > drivers/net/ice/ice_ethdev.c | 18 ++ > drivers/net/ice/ice_ethdev.h | 7 + > drivers/net/ice/ice_switch_filter.c | 525 > ++++++++++++++++++++++++++++++++++++ > drivers/net/ice/ice_switch_filter.h | 24 ++ > drivers/net/ice/meson.build | 3 +- > 6 files changed, 577 insertions(+), 1 deletion(-) > create mode 100644 drivers/net/ice/ice_switch_filter.c > create mode 100644 drivers/net/ice/ice_switch_filter.h >=20 > diff --git a/drivers/net/ice/Makefile b/drivers/net/ice/Makefile > index 0e5c55e..b10d826 100644 > --- a/drivers/net/ice/Makefile > +++ b/drivers/net/ice/Makefile > @@ -60,6 +60,7 @@ ifeq ($(CONFIG_RTE_ARCH_X86), y) > SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) +=3D ice_rxtx_vec_sse.c > endif >=20 [...] > + struct ice_adv_lkup_elem *list =3D NULL; > + uint16_t lkups_num =3D 0; > + > + ret =3D ice_parse_switch_filter(pattern, actions, error, > + &rule_info, &list, &lkups_num); > + if (ret) > + goto out; > + > + ret =3D ice_parse_switch_action(pf, actions, error, &rule_info); > + if (ret) > + goto out; > + > + ret =3D ice_switch_rule_set(pf, list, lkups_num, &rule_info, flow, erro= r); > + if (ret) > + goto out; > + > + rte_free(list); > + return 0; > + It's better to change "goto out" to "goto error". BRs, Xiao > +out: > + rte_free(list); > + > + return -rte_errno; > +} > +