From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 52A1242658; Thu, 28 Sep 2023 05:29:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00DE8402AC; Thu, 28 Sep 2023 05:29:20 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id CF39340277 for ; Thu, 28 Sep 2023 05:29:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695871759; x=1727407759; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=868Q9I4khwTU5QYItCL6Nqd+5nwuINbO5CLsRVPYOJk=; b=B6jDhPoSNdygrQlCqWyEOSZzHyKerFlRArLUf37clh1XheRa6kbdghFg 01pYBN/o4AY7I+lK/l6yljNo3OTUJ7dQ8hjmJCblN0D8oeEWi4Fv/KT/Z hfN21OOpeQ739o1nTBaThOQJHM98XPzJOhJ5nV4IuBrhorIWWbrhsJZSZ I13mZpqoZFNUUm2vv4kjSoO+l0gA/kqwKms/OYLf0XmKC2XLFJCrP9bt3 3X0Nf/unRrXSOyIWIMqgaqpm6YzadSE4sdvdCoE/OLhA6ipdxlGs3Foeh 17gtYDVXuOTX8VcYl01YeThpGvOHdc1yf6T1BQzpal3/GvDO9kW1y/aA/ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10846"; a="412892951" X-IronPort-AV: E=Sophos;i="6.03,182,1694761200"; d="scan'208";a="412892951" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2023 20:29:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10846"; a="892865979" X-IronPort-AV: E=Sophos;i="6.03,182,1694761200"; d="scan'208";a="892865979" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 27 Sep 2023 20:28:07 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 27 Sep 2023 20:29:16 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 27 Sep 2023 20:29:15 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Wed, 27 Sep 2023 20:29:15 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.43) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Wed, 27 Sep 2023 20:29:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QfIXv56FrD0F0TS5i7gNg7FQAP8rCnFTNrojIvD4Ugm5abg6GI7siuUqvVZEZ5Uq/K4bDIMNY1Nn6S9Ndd6/vEu9ErvpJSijp05N3wYBrRfUtYBuLGTwcol9JUJvTLJmLW5q+l6IIOlZGk8He0mqin36AW9MZlmiEc6fTx+otKH6Mg0PS9riVv2M3JbnMQUSs1elnFX104ekztV6Zg3LWqNdUXWPl9RqDzz9T0c9E5whVULYToiEv5cn4lZHnw4foVPhDAnPQ7YGKtOcvVIBqzJHr3NJdij7DMs+TqfIPwu8t6EFtueByB3ZVdKeO5mfuDkX5xHJj0ZPXaX8vnNjcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ooi5LcdDg7Zv7mFwJYywIvBMfHRLxueyOloJjqe1pNI=; b=LnZpfIhDcQcK4+HZQnhZrp8mi+oMr18Ecdvz3Bqf7zFtYzC7N9XfMQIEsqJeH9w1uWn7A9IjiHMdUuYf4uiYUufpdDeUlHbZ1xLNcnlc4wVfEENEx42P77Jm4LQfXvpbZFIMXmCut5KrTnfuTxQDX+22FwR2njkd0opJn27ky/4CbLmk3WuVFzzStp/6XRoDpZzGIqhBdWO5B//NL0QWbPfjjfcdLqTu+Lz7lN5Eq9eP73R0nlOs/vO5zUxbhoofmXlP1ZWdpz8gWF8KrMEcx2XsgSQh8UxNxJ9vEZbZAdYarZnDiLuExD+TY1HZ/kTcDKKbjgQ3MZ3F8SHrJPwDpw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by PH0PR11MB5805.namprd11.prod.outlook.com (2603:10b6:510:14a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.28; Thu, 28 Sep 2023 03:29:08 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::27ea:67e:2966:23e3]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::27ea:67e:2966:23e3%3]) with mapi id 15.20.6813.017; Thu, 28 Sep 2023 03:29:08 +0000 From: "Zhang, Qi Z" To: "Zhang, Yuying" , "dev@dpdk.org" , "Wu, Jingjing" , "Xing, Beilei" Subject: RE: [PATCH v7 6/8] net/cpfl: add fxp rule module Thread-Topic: [PATCH v7 6/8] net/cpfl: add fxp rule module Thread-Index: AQHZ8KXAcfLvIao3DUud9PJYdvGJPrAvljXg Date: Thu, 28 Sep 2023 03:29:07 +0000 Message-ID: References: <20230822010226.17783-1-yuying.zhang@intel.com> <20230926181703.2268199-1-yuying.zhang@intel.com> <20230926181703.2268199-7-yuying.zhang@intel.com> In-Reply-To: <20230926181703.2268199-7-yuying.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5994:EE_|PH0PR11MB5805:EE_ x-ms-office365-filtering-correlation-id: d2698efa-747f-448c-b658-08dbbfd312fb x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tBiVguSLJBlC9BllUy7rMNNsVxGbzPdL2LJTK6o0q2uPQKQ+wu8+XFGEjSXgx4MMIbFu3p6T5yvWkrZLLSUy7vdRINplVvQ5Tuiqf6ae7sgfpNHuAxrjKs4BOqbzEwBr3inZGPAotQ3MK+p0szlrXwVnFFO8FBQfU/aAaKoxAx57u+G6pXro4vDesTXdW1v4VOB9MuASfJkSFb1XvToVzdg9r1oU3DoOKZprWdmtrr5WJPfRqjwnNawuvF8Ypsd6ddqeJFK+k2CnlsH2fmlWnLWHKtYwRbsVgKXtR0UX6KNryF6zbM4k6IqcZVbKS5mip6J7dD7gWs3Jn4eXQvvCK11QnII4xqb3qNUmBSEoe543oITbUYJmAkGAsKmG9wBZn0f+Whm1uabeBQbZxmwBgdh3Xp5tXP6WSjHbfi5HuX9tp3026rFlbi77j+148WdRA9IiQvXTtrwndlES6bHPPRQCvjGDAxXRj/oZW5EMNCrI8x55HlH6SE+OBGHj1cF67lg72isOyfwxqjuR76+EB8d5M1lJQxdEfct7V4e+5gW2hHxiOfW7iZpGM3SUA+eLdW/9cVUVB6gpeMsXFpIiDGfVVhVX6g77NYghPxbVua+zEIEabGmcrkjDCSS9C5Sd x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(346002)(39860400002)(376002)(366004)(396003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(33656002)(86362001)(55016003)(8676002)(5660300002)(41300700001)(82960400001)(6506007)(7696005)(26005)(83380400001)(9686003)(52536014)(8936002)(53546011)(66946007)(64756008)(38070700005)(66446008)(66556008)(76116006)(6636002)(316002)(38100700002)(2906002)(478600001)(71200400001)(122000001)(110136005)(66476007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PwhD1Ua9HLxuPAc4Ab2WkBntI2VZj5u/I18hDH2c24bO9GWglBS7PZpD83sK?= =?us-ascii?Q?q4AJcgXA1sAsbuL0ZmyfXJOSOQWEABjqcb8uUIRzmeCi6rsgggxZWoHVSF0q?= =?us-ascii?Q?0YONh/mEXKyVMf3k+GSS1ILJ6Hsn4fNrkpIedSgHEXetWGK9ANT2GalmNBgL?= =?us-ascii?Q?4kIV5Ri+qr3BVhNMiASSK68sUeXHY9KEPOQmIAPNXTVhM/rgfcU/V4zfj9E5?= =?us-ascii?Q?wK+L6vegyPIEb1eJ3+PRUiSZaCz74jZEadeJ5PofI9JAu5E+QnCAY9q0ehcB?= =?us-ascii?Q?7CRYhN33H4pJ1n/x+MTbDOrzlgL3iOHlEyvv05CLkcFLHeo1+9xjCm3/FiiV?= =?us-ascii?Q?WrAKHNUZ8sgC3DRtoj/vRR9TZVp0IupySwIy+avpCvES04yLb6Gjbxxw1BYZ?= =?us-ascii?Q?Iqka+TgyfH5O8KuJJrPeEd/SkZKVY8yhxkgY9cXx+iiE+H6UbdOkjvHRhNDF?= =?us-ascii?Q?DWb720tJdAq/VJoh1En7FcCXXQDTwrfWNY5tfzDCDH5yrnKPfwBDmZ864Jto?= =?us-ascii?Q?O15CdfHhOQeuV6BDNnLuRhVPkV7nD8tyEqXaFJ1A1YDhuTiFkm9CnYwypLme?= =?us-ascii?Q?7FQVbI/iNZADMzbZsxPy9V6sjouAWLjEuWOKP5unEcz+YJxt9j6NFvEkTyZ1?= =?us-ascii?Q?+HaxjvWljQKJyFeGsjuyo3+b6/1pDmgNi74cA1c3vSSROskZAUiaJxHerdVQ?= =?us-ascii?Q?fhIqWTJk+edi9wMsQMBNmoVBcREute9IH2pLnXRMve9mVGqIIrHPFFZz+r4V?= =?us-ascii?Q?hnAZ2KMwJSHgH6n4KKffm0RKrGiuwFbzbPpi+DMvrYcsXP8Di7sUncBkPJPM?= =?us-ascii?Q?yyuoIZoIeuv6hfijq+BY5hcFFdbHif8uRqNifoao7u7GiC6EaD6ImhhN1USU?= =?us-ascii?Q?S344cWYs88uKVra3xgvaWDtwdLcZ65NvDd6mDgIO67/D7AmdgauugnLZhg/M?= =?us-ascii?Q?0Uui2KwW9uxjGjAOedBhAZW5/MAEn8swtwpm2QS3ntqdTwB9ikmoUzt1rYw0?= =?us-ascii?Q?SfhNuuYlkN1+U2zSY5XyTJlm5yEeLb8uA7aeRw/swqoufKLP6Izjm+eJe+vm?= =?us-ascii?Q?Ne/fMGyFD4+ce4EhRKO2vQYgWMegG7wXQaHeo0bCWJkpnfecPFgk/GgRuwZ1?= =?us-ascii?Q?R7SVkkmcIjt1gin6pXr2vrwD4qws738bRMNXKNUfKUjK3IKhe0dY4HkoidtC?= =?us-ascii?Q?59gALNhSosWNmGdNnmUo4AutV/Bs9+qEJFnUPmG8irXJxZ2AHKEdwjrv45JN?= =?us-ascii?Q?OlBMy9svaq8USfV66hTs5r1qVkxUJPj1SdxZoNblc+u5GibSszcCwRInF0mk?= =?us-ascii?Q?aDZ3uY+7so5zj3fkDbb5xi84W6bj4lRVJQJw45zecRKbf69w3mBh5d1Kkj9H?= =?us-ascii?Q?t2L1tVZeBEqGdoM7uGEboX5/SOWxPazr/UhdnPoEvwSmf2j4qu3rkljNy5mW?= =?us-ascii?Q?7v7A3jnkBrFb67pHcyr8s0WoFybRg4+Wh6AHcyp81yjPALhpfkHb3hPTZdx2?= =?us-ascii?Q?NLqgTzWWp2naxYvi3PlkY1+BFc0/ETHQYjadCluny+kKaArhS7acL+wYu3me?= =?us-ascii?Q?ldVctvIDzvf8onJI3MeTqsIPYGzWvoh3fVbo61h7?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2698efa-747f-448c-b658-08dbbfd312fb X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2023 03:29:08.0449 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OJfpjie5OGG2e63atq7EVep9eNIAypjUDFMQNSSQkry5N13jkYEI0ZQD3unB+//JgVsgiIxupLp/wFT1/LPh4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5805 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Zhang, Yuying > Sent: Wednesday, September 27, 2023 2:17 AM > To: Zhang, Yuying ; dev@dpdk.org; Zhang, Qi Z > ; Wu, Jingjing ; Xing, Beile= i > > Subject: [PATCH v7 6/8] net/cpfl: add fxp rule module >=20 > From: Yuying Zhang >=20 > Implement FXP rule creation / destroying. >=20 > Signed-off-by: Yuying Zhang > --- > drivers/net/cpfl/cpfl_ethdev.c | 31 ++++ > drivers/net/cpfl/cpfl_ethdev.h | 6 + > drivers/net/cpfl/cpfl_fxp_rule.c | 296 +++++++++++++++++++++++++++++++ > drivers/net/cpfl/cpfl_fxp_rule.h | 68 +++++++ > drivers/net/cpfl/meson.build | 1 + > 5 files changed, 402 insertions(+) > create mode 100644 drivers/net/cpfl/cpfl_fxp_rule.c create mode 100644 > drivers/net/cpfl/cpfl_fxp_rule.h >=20 > diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethde= v.c > index a2bc6784d0..da78e79652 100644 > --- a/drivers/net/cpfl/cpfl_ethdev.c > +++ b/drivers/net/cpfl/cpfl_ethdev.c > @@ -16,6 +16,7 @@ > #include > #include "cpfl_rxtx.h" > #include "cpfl_flow.h" > +#include "cpfl_rules.h" >=20 > #define CPFL_REPRESENTOR "representor" > #define CPFL_TX_SINGLE_Q "tx_single" > @@ -1127,6 +1128,7 @@ cpfl_dev_close(struct rte_eth_dev *dev) > adapter->cur_vport_nb--; > dev->data->dev_private =3D NULL; > adapter->vports[vport->sw_idx] =3D NULL; > + idpf_free_dma_mem(NULL, &cpfl_vport->itf.flow_dma); > rte_free(cpfl_vport); >=20 > return 0; > @@ -2466,6 +2468,26 @@ cpfl_p2p_queue_info_init(struct cpfl_vport > *cpfl_vport, > return 0; > } >=20 > +int > +cpfl_alloc_dma_mem_batch(struct idpf_dma_mem *orig_dma, struct > idpf_dma_mem *dma, uint32_t size, > + int batch_size) > +{ > + int i; > + > + if (!idpf_alloc_dma_mem(NULL, orig_dma, size * (1 + batch_size))) { > + PMD_INIT_LOG(ERR, "Could not alloc dma memory"); > + return -ENOMEM; > + } > + > + for (i =3D 0; i < batch_size; i++) { > + dma[i].va =3D (void *)((uint64_t)orig_dma->va + size * (i + 1)); > + dma[i].pa =3D orig_dma->pa + size * (i + 1); > + dma[i].size =3D size; > + dma[i].zone =3D NULL; > + } > + return 0; > +} > + > static int > cpfl_dev_vport_init(struct rte_eth_dev *dev, void *init_params) { @@ - > 2515,6 +2537,15 @@ cpfl_dev_vport_init(struct rte_eth_dev *dev, void > *init_params) > rte_ether_addr_copy((struct rte_ether_addr *)vport- > >default_mac_addr, > &dev->data->mac_addrs[0]); >=20 > + memset(cpfl_vport->itf.dma, 0, sizeof(cpfl_vport->itf.dma)); > + memset(cpfl_vport->itf.msg, 0, sizeof(cpfl_vport->itf.msg)); > + ret =3D cpfl_alloc_dma_mem_batch(&cpfl_vport->itf.flow_dma, > + cpfl_vport->itf.dma, > + sizeof(union cpfl_rule_cfg_pkt_record), > + CPFL_FLOW_BATCH_SIZE); > + if (ret < 0) > + goto err_mac_addrs; > + > if (!adapter->base.is_rx_singleq && !adapter->base.is_tx_singleq) { > memset(&p2p_queue_grps_info, 0, > sizeof(p2p_queue_grps_info)); > ret =3D cpfl_p2p_q_grps_add(vport, &p2p_queue_grps_info, > p2p_q_vc_out_info); diff --git a/drivers/net/cpfl/cpfl_ethdev.h > b/drivers/net/cpfl/cpfl_ethdev.h index 7f83d170d7..8eeeac9910 100644 > --- a/drivers/net/cpfl/cpfl_ethdev.h > +++ b/drivers/net/cpfl/cpfl_ethdev.h > @@ -147,10 +147,14 @@ enum cpfl_itf_type { >=20 > TAILQ_HEAD(cpfl_flow_list, rte_flow); >=20 > +#define CPFL_FLOW_BATCH_SIZE 490 > struct cpfl_itf { > enum cpfl_itf_type type; > struct cpfl_adapter_ext *adapter; > struct cpfl_flow_list flow_list; > + struct idpf_dma_mem flow_dma; > + struct idpf_dma_mem dma[CPFL_FLOW_BATCH_SIZE]; > + struct idpf_ctlq_msg msg[CPFL_FLOW_BATCH_SIZE]; > void *data; > }; >=20 > @@ -240,6 +244,8 @@ int cpfl_cc_vport_info_get(struct cpfl_adapter_ext > *adapter, int cpfl_vc_create_ctrl_vport(struct cpfl_adapter_ext *adapter= ); int > cpfl_config_ctlq_rx(struct cpfl_adapter_ext *adapter); int > cpfl_config_ctlq_tx(struct cpfl_adapter_ext *adapter); > +int cpfl_alloc_dma_mem_batch(struct idpf_dma_mem *orig_dma, struct > idpf_dma_mem *dma, > + uint32_t size, int batch_size); >=20 > #define CPFL_DEV_TO_PCI(eth_dev) \ > RTE_DEV_TO_PCI((eth_dev)->device) > diff --git a/drivers/net/cpfl/cpfl_fxp_rule.c b/drivers/net/cpfl/cpfl_fxp= _rule.c > new file mode 100644 > index 0000000000..50fac55432 > --- /dev/null > +++ b/drivers/net/cpfl/cpfl_fxp_rule.c > @@ -0,0 +1,296 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2023 Intel Corporation > + */ > +#include "cpfl_ethdev.h" > + > +#include "cpfl_fxp_rule.h" > +#include "cpfl_logs.h" > + > +#define CTLQ_SEND_RETRIES 100 > +#define CTLQ_RECEIVE_RETRIES 100 > + > +int > +cpfl_send_ctlq_msg(struct idpf_hw *hw, struct idpf_ctlq_info *cq, u16 > num_q_msg, > + struct idpf_ctlq_msg q_msg[]) > +{ > + struct idpf_ctlq_msg **msg_ptr_list; > + u16 clean_count =3D 0; > + int num_cleaned =3D 0; > + int retries =3D 0; > + int ret =3D 0; > + > + msg_ptr_list =3D calloc(num_q_msg, sizeof(struct idpf_ctlq_msg *)); > + if (!msg_ptr_list) { > + PMD_INIT_LOG(ERR, "no memory for cleaning ctlq"); > + ret =3D -ENOMEM; > + goto err; > + } > + > + ret =3D cpfl_vport_ctlq_send(hw, cq, num_q_msg, q_msg); > + if (ret) { > + PMD_INIT_LOG(ERR, "cpfl_vport_ctlq_send() failed with > error: 0x%4x", ret); > + goto send_err; > + } > + > + while (retries <=3D CTLQ_SEND_RETRIES) { > + clean_count =3D num_q_msg - num_cleaned; > + ret =3D cpfl_vport_ctlq_clean_sq(cq, &clean_count, > + &msg_ptr_list[num_cleaned]); > + if (ret) { > + PMD_INIT_LOG(ERR, "clean ctlq failed: 0x%4x", ret); > + goto send_err; > + } > + > + num_cleaned +=3D clean_count; > + retries++; > + if (num_cleaned >=3D num_q_msg) > + break; > + rte_delay_us_sleep(10); > + } > + > + if (retries > CTLQ_SEND_RETRIES) { > + PMD_INIT_LOG(ERR, "timed out while polling for > completions"); > + ret =3D -1; > + goto send_err; > + } > + > +send_err: > + if (msg_ptr_list) > + free(msg_ptr_list); > +err: > + return ret; > +} > + > +static int > +cpfl_process_rx_ctlq_msg(u16 num_q_msg, struct idpf_ctlq_msg *q_msg) { > + u16 i; > + > + if (!num_q_msg || !q_msg) > + return -EINVAL; > + > + for (i =3D 0; i < num_q_msg; i++) { > + if (q_msg[i].status =3D=3D CPFL_CFG_PKT_ERR_OK) { > + continue; > + } else if (q_msg[i].status =3D=3D CPFL_CFG_PKT_ERR_EEXIST && > + q_msg[i].opcode =3D=3D cpfl_ctlq_sem_add_rule) { > + PMD_INIT_LOG(ERR, "The rule has confliction with > already existed one"); > + return -EINVAL; > + } else if (q_msg[i].status =3D=3D CPFL_CFG_PKT_ERR_ENOTFND && > + q_msg[i].opcode =3D=3D cpfl_ctlq_sem_del_rule) { > + PMD_INIT_LOG(ERR, "The rule has already deleted"); > + return -EINVAL; > + } else { > + PMD_INIT_LOG(ERR, "Invalid rule"); > + return -EINVAL; > + } Please fix checkpatch warning due to unnecessary else.