From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id B74C9A0471
	for <public@inbox.dpdk.org>; Thu, 20 Jun 2019 11:01:27 +0200 (CEST)
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 <dev@dpdk.org>; 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" <xiao.w.wang@intel.com>
To: "Yang, Qiming" <qiming.yang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "Zhao1, Wei" <wei.zhao1@intel.com>, "Zhang, Qi Z" <qi.z.zhang@intel.com>, 
 "Xing, Beilei" <beilei.xing@intel.com>
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: <B7F2E978279D1D49A3034B7786DACF407AF49D35@SHSMSX106.ccr.corp.intel.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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 <wei.zhao1@intel.com>
> Subject: [dpdk-dev] [PATCH v3 1/3] net/ice: enable switch filter
>=20
> From: wei zhao <wei.zhao1@intel.com>
>=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 <wei.zhao1@intel.com>
> ---
>  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;
> +}
> +