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 B711542BA3; Fri, 26 May 2023 05:46:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E72740A89; Fri, 26 May 2023 05:46:25 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 8FA6240A87 for ; Fri, 26 May 2023 05:46:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685072783; x=1716608783; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PffFUK5lGE82hVCXNZJTUu7dAEBMPjdD5lXCBP0GBE8=; b=nw2ErCZLOXi5PdcvDglJsa4Bc598tlfeCQYdejYyl10WbYzM1crR1vrT GaG3cEVZUigsYU9xdWhFI08FRXzfQyQTYTF0VjQwfnn8pbqbwCjPMaAyR TkSkXkNzDIbgzPMfYoVHZ3eDNYsDCOs6i3JZxSwPLl1TxBf9MZWjaE9Du H7LmAw4z8H3Gqii4eyxC+Y6i70H8S5EsUxD6S+1BMzCsGy/jO67s1JV0N vXj9Kkuptmdvkv+azfIYXw+HWYYKWosmbOhKiUIuUbR8SoTpxepMyHuky ftdLan7Y3p7c9pHitTXV4PVum2qWbtVQzG7RqElTw58L0HANRhgZX1UZc Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10721"; a="419861417" X-IronPort-AV: E=Sophos;i="6.00,193,1681196400"; d="scan'208";a="419861417" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2023 20:46:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10721"; a="879389221" X-IronPort-AV: E=Sophos;i="6.00,193,1681196400"; d="scan'208";a="879389221" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP; 25 May 2023 20:46:21 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 25 May 2023 20:46:21 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Thu, 25 May 2023 20:46:21 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Thu, 25 May 2023 20:46:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=krSyrFp7licejLp76VEIWaA9xnU0lTAQUkF2I2Xbq0hLkw5MSCVxQobpMUz4nEbNsMDq/kAArcrAAyMRK6TJZAUG/fH7YoQpmVo3WNjfIHHGkvZLlsFnier/PE6yTUiR6COhMbtvxADWZ4JuzbyNOpNENr6piGHco/UFuWFTs4zAduUcVVXD7VX26qfgAOviN5NIl863T7So5Fr+xKi0+/ibhsJ3mfnv1NJonjoFlo/rL+fPLlAHgBJLv3nKnFh65lto7zGyqLAT/9hKR/BaIUNcg9JyU8q7qmiGuDpydX3vO2LhmRfwn9qcUk7B8i2m1ff2m5S9jywTYXHAmLmliQ== 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=OMg0fW1iFDBNZiMUf4j256jojlRF90fxj87N0ubCcQo=; b=g80gfBt99j+q69P0XNM1jOsYQc8/CtyBk8BfsvaTNa7fnaj3fpCrQWD55GxGyxlFCtDQ6g3UXHI4+9i0ScDujNjO4LIozMXfr62yvnRTZGI+3cuIFWjYmtl7Yxx+IpBf5kq7uQY2QZFcX1zgWCBEQF6xaQhKcKh85RlH2kM+hrWtFurt2UG4M25/BmqnNe95+abZsgtUpSpKZgedcK8bxHGYODVZ4brUoKnoWEvFnJTQiqqvLytan+kDL3Xd1MN9CdIY1YFZvs+OgigV0Wt78WghozPh+TPhfqjqF7zf8z3rvXuLvTOZNAwvj9DOyBLLl4K3l1upk4EcB9BLbASXKg== 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 LV2PR11MB5997.namprd11.prod.outlook.com (2603:10b6:408:17f::10) by SJ0PR11MB5070.namprd11.prod.outlook.com (2603:10b6:a03:2d5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.18; Fri, 26 May 2023 03:46:18 +0000 Received: from LV2PR11MB5997.namprd11.prod.outlook.com ([fe80::a1be:2406:376c:612a]) by LV2PR11MB5997.namprd11.prod.outlook.com ([fe80::a1be:2406:376c:612a%7]) with mapi id 15.20.6433.018; Fri, 26 May 2023 03:46:18 +0000 From: "Xing, Beilei" To: "Liu, Mingxia" , "Wu, Jingjing" CC: "dev@dpdk.org" , "Wang, Xiao W" Subject: RE: [PATCH v3 05/10] net/cpfl: support hairpin queue setup and release Thread-Topic: [PATCH v3 05/10] net/cpfl: support hairpin queue setup and release Thread-Index: AQHZiidMhq0HtLdoZEu6gYKtZQyH3a9pKHqAgALMQ8A= Date: Fri, 26 May 2023 03:46:18 +0000 Message-ID: References: <20230519051055.106893-1-beilei.xing@intel.com> <20230519073116.56749-1-beilei.xing@intel.com> <20230519073116.56749-6-beilei.xing@intel.com> In-Reply-To: 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: LV2PR11MB5997:EE_|SJ0PR11MB5070:EE_ x-ms-office365-filtering-correlation-id: 49e7b6d1-c1fd-44dc-06c3-08db5d9bc347 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yROKY2mK+J+4Hox6tf2z1Tc4x3th9O9wXRdoul200eI+fnApDSw6kgdTAOpsLl97BKqic3bZRM3tGK7rFOp5/2BrVXiVka6ouluKSRkWeSEabPXyjyVD9zgFSfuIkgJ3E6yxWnsDIAyOLqRZsxyU45+eqtyWVDa5w0geYZ3AcRWpThOgG37spzzsAakAWsEihk+Maxo3N9v6yHMC3mnR/zCascCqR5lwBNf+oxbXVeRyxkmdigWVsilggtu4jGgdqTAYSvLdZnTNsJpJ1Wiy3RfMkSPgI4uXzB9Zgnus/gGmM2UUQQf4FYNnLk5HTqai14LfhbW1hP8eitW4rjp8F9QWXx59W/DlW99XJjrdPPIn8M5P1UnrB68skqicZRVF71AP0S0rvuVLQPvkfVyOGCdykhHhtOo3H9QseC04DvV/jTahaWdmgoDvNhwZwpswcWiNmYm1QAvlzDGN+HF/2VYqkvOV8dAco9bmY/TVCBxXqo0iuHunCmdYWnOEF1n8vX4RGMn6xpVu0rUVl0PLMhfd+VrQXIzJghgYXkHvIuw7DwUBW7CPqjG85EDBzmSPSue+9XRqpGFhRzdlxARy2uW8K5xrb0QMcfyK3+TnChtDKr41QCC7WovumM6RaZn5 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LV2PR11MB5997.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(366004)(346002)(376002)(136003)(396003)(451199021)(52536014)(316002)(122000001)(71200400001)(26005)(6506007)(82960400001)(53546011)(9686003)(4326008)(6636002)(107886003)(66946007)(76116006)(64756008)(66556008)(66476007)(66446008)(38100700002)(55016003)(5660300002)(33656002)(41300700001)(8676002)(8936002)(7696005)(83380400001)(86362001)(478600001)(54906003)(110136005)(186003)(2906002)(30864003)(38070700005)(559001)(579004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?YiNIMHZYgBms00GrakE3B1G+yxd+dYzU9/ZWLGjb4liaRlQA2KC69dsTqgKu?= =?us-ascii?Q?v3JbakBKXp5tA6mp5kzxC1mUGxb/SbzFOwBvTeBoc72jaUbn+f6wew+/9UaR?= =?us-ascii?Q?TA7yH1VVOQhHOnUgorn46n09XNL7c2Swb6X/rrd2921oBp4VK28voBnNR3jW?= =?us-ascii?Q?NgTBgz23So0z5SxPkdBXUXk43hoGIGNP/JNstvd8aaqB3afLw9ELY4GdV+jm?= =?us-ascii?Q?TMB5FIwdXQeOVTC2Fj+1ZAhLXhRosku7vW/gfWRUPKNl2o06wzqoMsBlGQJD?= =?us-ascii?Q?d3FoRuPADxt/JHsSjjmYr6A6YyUUmbMQul3WOVzSpXuIj7fUI4Ssb3p4jPen?= =?us-ascii?Q?7tGYaViqO9llLTMjtRQFMlnFZDInoCWystfcjnYp5V/O8/Vzuns3od2fp8fU?= =?us-ascii?Q?33Jo9L55V3yvQUeX2ijtLgryGKggARjp6eP/jhatkbEboDXuy+sJGerWijMh?= =?us-ascii?Q?/fnQo47N5yf4DJ0cEUkBwsNtpo/QkqgRs3Dyu2HS541Ak4v3QoiXxDKAW5Y3?= =?us-ascii?Q?ifVrNl2wq9PCQnnDN308dNQzZdm5TUQv04LXVBJkt47sVsvvxp4xl3Y/bKi/?= =?us-ascii?Q?4xnz8hOogOmOt4Hy4vmSdqM4XOFeX3qJ20VwzegwYf3aI1nLV+r43VIasCWV?= =?us-ascii?Q?6e5Zg/G6mEPr0y7E6+CQvmGkjcmubH48gbWv+tKM0AUkxT1dFURTPW4d3OLN?= =?us-ascii?Q?OQeb6BwzOYrpckaJo5EtysTjy64fzp057rTAtW1yXmHxhF1wdC7ZVnGMXEFy?= =?us-ascii?Q?bbdTgn77LJ0hDGXIG4ohp3/E1dyagcHbuCYW1oN9TR/yTxOnASAZPcA5XChk?= =?us-ascii?Q?HgLCOTIYLPpgpdQNZtwu69tfqBO01Iif8fph4Iczb/zuJQuBByprZ2dRmSv4?= =?us-ascii?Q?dhKn+/RxPBw2bczbqT7WMpGJhajLmb5vSbkCSNXoqhkWB2OwzyLDm8GZjome?= =?us-ascii?Q?v91G5J+SYWHR6uaZO+hu5p1aUakAT37k2t8oI4uz5y/016DsJG3cuTVDpe3E?= =?us-ascii?Q?a7OFoYJ9JYWqkjqZ8KayHuHZwcwpErGxR5uDsP1+P7xkOlCVawI/qOmTAqO4?= =?us-ascii?Q?9DNp6Cm7HG2qXTKI4VWirMJUEMr2CQq/lXhxE/ITbhoAXaB9klWaTQXaEoF0?= =?us-ascii?Q?A4lxM7ZsK6K7j4by0MZerLwL4AeTl97XQAxm21kqgD/rMpLQYpvcQPtdVt7B?= =?us-ascii?Q?rY+vbdubMG7Mq6P5b9VNOCHDOIh/q6yAnyjA2++yEkELPqUrFcBYHsPhcSCo?= =?us-ascii?Q?qMVhgfYBdpse1UIH/oxhEyAI2dxAX64VfXqXGiPYpvKQ3Sze6WpWqBH1oZEP?= =?us-ascii?Q?yqs/Pksqn6cIneZHgz7tl9BMNEiCmwB5x74qVsFbzAVD1RV4tTC6kjZ/XVRt?= =?us-ascii?Q?rPn2mmTY1d7i9eF9G0cX7Z7jqVGao8bqGxuN3RPXnNwWJPa+QYSoltZJRvGF?= =?us-ascii?Q?fvtNRQcFGb6x1gaGdowjCqOy29+c/HTgZBTupCR48akB14ZF39TNOUn6dP+n?= =?us-ascii?Q?ckQ35OFjKun8Es8G0MSxlr+jRPFuujExgF5AKoW65cqLnkC/KEfw5Pp6wVls?= =?us-ascii?Q?w/uzmTm1tAvGBoA1aNfXefDvNpTHL1Hhn43CI6sj?= 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: LV2PR11MB5997.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49e7b6d1-c1fd-44dc-06c3-08db5d9bc347 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2023 03:46:18.0523 (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: T6yyMzzpJPI4P3/j61eSNwtH8OXrkR4fJXs0sxKtyMygjHmfYCFLjdxBgz4aK96drHheaim5z5kHadYJkpNjxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5070 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: Liu, Mingxia > Sent: Wednesday, May 24, 2023 5:02 PM > To: Xing, Beilei ; Wu, Jingjing > Cc: dev@dpdk.org; Wang, Xiao W > Subject: RE: [PATCH v3 05/10] net/cpfl: support hairpin queue setup and > release >=20 > > +cpfl_tx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id= x, > > + uint16_t nb_desc, > > + const struct rte_eth_hairpin_conf *conf) { > > + struct cpfl_vport *cpfl_vport =3D > > + (struct cpfl_vport *)dev->data->dev_private; > > + > > + struct idpf_vport *vport =3D &cpfl_vport->base; > > + struct idpf_adapter *adapter_base =3D vport->adapter; > > + uint16_t logic_qid =3D cpfl_vport->nb_p2p_txq; > > + struct cpfl_txq_hairpin_info *hairpin_info; > > + struct idpf_hw *hw =3D &adapter_base->hw; > > + struct cpfl_tx_queue *cpfl_txq; > > + struct idpf_tx_queue *txq, *cq; > > + const struct rte_memzone *mz; > > + uint32_t ring_size; > > + uint16_t peer_port, peer_q; > > + > > + if (vport->txq_model =3D=3D VIRTCHNL2_QUEUE_MODEL_SINGLE) { > > + PMD_INIT_LOG(ERR, "Only spilt queue model supports hairpin > > queue."); > > + return -EINVAL; > > + } > > + > > + if (conf->peer_count !=3D 1) { > > + PMD_INIT_LOG(ERR, "Can't support Tx hairpin queue peer > > count %d", conf->peer_count); > > + return -EINVAL; > > + } > > + > > + peer_port =3D conf->peers[0].port; > > + peer_q =3D conf->peers[0].queue; > > + > > + if (nb_desc % CPFL_ALIGN_RING_DESC !=3D 0 || > > + nb_desc > CPFL_MAX_RING_DESC || > > + nb_desc < CPFL_MIN_RING_DESC) { > > + PMD_INIT_LOG(ERR, "Number (%u) of transmit descriptors is > > invalid", > > + nb_desc); > > + return -EINVAL; > > + } > > + > > + /* Free memory if needed. */ > > + if (dev->data->tx_queues[queue_idx]) { > > + cpfl_tx_queue_release(dev->data->tx_queues[queue_idx]); > > + dev->data->tx_queues[queue_idx] =3D NULL; > > + } > > + > > + /* Allocate the TX queue data structure. */ > > + cpfl_txq =3D rte_zmalloc_socket("cpfl hairpin txq", > > + sizeof(struct cpfl_tx_queue), > > + RTE_CACHE_LINE_SIZE, > > + SOCKET_ID_ANY); > > + if (!cpfl_txq) { > > + PMD_INIT_LOG(ERR, "Failed to allocate memory for tx queue > > structure"); > > + return -ENOMEM; > > + } > > + > > + txq =3D &cpfl_txq->base; > > + hairpin_info =3D &cpfl_txq->hairpin_info; > > + /* Txq ring length should be 2 times of Tx completion queue size. */ > > + txq->nb_tx_desc =3D nb_desc * 2; > > + txq->queue_id =3D cpfl_hw_qid_get(cpfl_vport- > > >p2p_q_chunks_info.tx_start_qid, logic_qid); > > + txq->port_id =3D dev->data->port_id; > > + hairpin_info->hairpin_q =3D true; > > + hairpin_info->peer_rxp =3D peer_port; > > + hairpin_info->peer_rxq_id =3D peer_q; > > + > > + if (conf->manual_bind !=3D 0) > > + cpfl_vport->p2p_manual_bind =3D true; > > + else > > + cpfl_vport->p2p_manual_bind =3D false; > > + > > + /* Always Tx hairpin queue allocates Tx HW ring */ > > + ring_size =3D RTE_ALIGN(txq->nb_tx_desc * CPFL_P2P_DESC_LEN, > > + CPFL_DMA_MEM_ALIGN); > > + mz =3D rte_eth_dma_zone_reserve(dev, "hairpin_tx_ring", logic_qid, > > + ring_size + CPFL_P2P_RING_BUF, > > + CPFL_RING_BASE_ALIGN, > > + dev->device->numa_node); > > + if (!mz) { > > + PMD_INIT_LOG(ERR, "Failed to reserve DMA memory for TX"); > > + rte_free(txq->sw_ring); > > + rte_free(txq); > > + return -ENOMEM; > > + } > > + > > + txq->tx_ring_phys_addr =3D mz->iova; > > + txq->desc_ring =3D mz->addr; > > + txq->mz =3D mz; > > + > > + cpfl_tx_hairpin_descq_reset(txq); > > + txq->qtx_tail =3D hw->hw_addr + > > + cpfl_hw_qtail_get(cpfl_vport- > > >p2p_q_chunks_info.tx_qtail_start, > > + logic_qid, cpfl_vport- > > >p2p_q_chunks_info.tx_qtail_spacing); > > + txq->ops =3D &def_txq_ops; > > + > > + if (cpfl_vport->p2p_tx_complq =3D=3D NULL) { > [Liu, Mingxia] In cpfl_rx_hairpin_queue_setup(), "logic_qid" is used to i= dentify > if it is the first time to allocate "p2p_rx_bufq" buffer, Can it be unifi= ed, using > logic_qid =3D=3D 0 or p2p_tx_complq/ p2p_rx_bufq =3D=3D NULL ? >=20 >=20 Yes, thanks for the catch. >=20 > > -----Original Message----- > > From: Xing, Beilei > > Sent: Friday, May 19, 2023 3:31 PM > > To: Wu, Jingjing > > Cc: dev@dpdk.org; Liu, Mingxia ; Xing, Beilei > > ; Wang, Xiao W > > Subject: [PATCH v3 05/10] net/cpfl: support hairpin queue setup and rel= ease > > > > From: Beilei Xing > > > > Support hairpin Rx/Tx queue setup and release. > > > > Signed-off-by: Xiao Wang > > Signed-off-by: Mingxia Liu > > Signed-off-by: Beilei Xing > > --- > > drivers/net/cpfl/cpfl_ethdev.c | 6 + > > drivers/net/cpfl/cpfl_ethdev.h | 12 + > > drivers/net/cpfl/cpfl_rxtx.c | 373 +++++++++++++++++++++++- > > drivers/net/cpfl/cpfl_rxtx.h | 26 ++ > > drivers/net/cpfl/cpfl_rxtx_vec_common.h | 4 + > > 5 files changed, 420 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_eth= dev.c > index > > 8e471d2a9b..03813716ce 100644 > > --- a/drivers/net/cpfl/cpfl_ethdev.c > > +++ b/drivers/net/cpfl/cpfl_ethdev.c > > @@ -874,6 +874,10 @@ cpfl_dev_close(struct rte_eth_dev *dev) > > struct cpfl_adapter_ext *adapter =3D CPFL_ADAPTER_TO_EXT(vport- > > >adapter); > > > > cpfl_dev_stop(dev); > > + if (cpfl_vport->p2p_mp) { > > + rte_mempool_free(cpfl_vport->p2p_mp); > > + cpfl_vport->p2p_mp =3D NULL; > > + } > > > > if (!adapter->base.is_rx_singleq && !adapter->base.is_tx_singleq) > > cpfl_p2p_queue_grps_del(vport); > > @@ -916,6 +920,8 @@ static const struct eth_dev_ops cpfl_eth_dev_ops = =3D { > > .xstats_get_names =3D cpfl_dev_xstats_get_names, > > .xstats_reset =3D cpfl_dev_xstats_reset, > > .hairpin_cap_get =3D cpfl_hairpin_cap_get, > > + .rx_hairpin_queue_setup =3D > cpfl_rx_hairpin_queue_setup, > > + .tx_hairpin_queue_setup =3D > cpfl_tx_hairpin_queue_setup, > > }; > > > > static int > > diff --git a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_eth= dev.h > index > > 65c9a195b2..a48344299c 100644 > > --- a/drivers/net/cpfl/cpfl_ethdev.h > > +++ b/drivers/net/cpfl/cpfl_ethdev.h > > @@ -89,6 +89,18 @@ struct p2p_queue_chunks_info { struct cpfl_vport { > > struct idpf_vport base; > > struct p2p_queue_chunks_info p2p_q_chunks_info; > > + > > + struct rte_mempool *p2p_mp; > > + > > + uint16_t nb_data_rxq; > > + uint16_t nb_data_txq; > > + uint16_t nb_p2p_rxq; > > + uint16_t nb_p2p_txq; > > + > > + struct idpf_rx_queue *p2p_rx_bufq; > > + struct idpf_tx_queue *p2p_tx_complq; > > + bool p2p_manual_bind; > > + > > }; > > > > struct cpfl_adapter_ext { > > diff --git a/drivers/net/cpfl/cpfl_rxtx.c b/drivers/net/cpfl/cpfl_rxtx.= c index > > 04a51b8d15..333a399e73 100644 > > --- a/drivers/net/cpfl/cpfl_rxtx.c > > +++ b/drivers/net/cpfl/cpfl_rxtx.c > > @@ -10,6 +10,79 @@ > > #include "cpfl_rxtx.h" > > #include "cpfl_rxtx_vec_common.h" > > > > +uint16_t > > +cpfl_hw_qid_get(uint16_t start_qid, uint16_t offset) { > > + return start_qid + offset; > > +} > > + > > +uint64_t > > +cpfl_hw_qtail_get(uint64_t tail_start, uint16_t offset, uint64_t > > +tail_spacing) { > > + return tail_start + offset * tail_spacing; } > > + > > +static inline void > > +cpfl_tx_hairpin_descq_reset(struct idpf_tx_queue *txq) { > > + uint32_t i, size; > > + > > + if (!txq) { > > + PMD_DRV_LOG(DEBUG, "Pointer to txq is NULL"); > > + return; > > + } > > + > > + size =3D txq->nb_tx_desc * CPFL_P2P_DESC_LEN; > > + for (i =3D 0; i < size; i++) > > + ((volatile char *)txq->desc_ring)[i] =3D 0; } > > + > > +static inline void > > +cpfl_tx_hairpin_complq_reset(struct idpf_tx_queue *cq) { > > + uint32_t i, size; > > + > > + if (!cq) { > > + PMD_DRV_LOG(DEBUG, "Pointer to complq is NULL"); > > + return; > > + } > > + > > + size =3D cq->nb_tx_desc * CPFL_P2P_DESC_LEN; > > + for (i =3D 0; i < size; i++) > > + ((volatile char *)cq->compl_ring)[i] =3D 0; } > > + > > +static inline void > > +cpfl_rx_hairpin_descq_reset(struct idpf_rx_queue *rxq) { > > + uint16_t len; > > + uint32_t i; > > + > > + if (!rxq) > > + return; > > + > > + len =3D rxq->nb_rx_desc; > > + for (i =3D 0; i < len * CPFL_P2P_DESC_LEN; i++) > > + ((volatile char *)rxq->rx_ring)[i] =3D 0; } > > + > > +static inline void > > +cpfl_rx_hairpin_bufq_reset(struct idpf_rx_queue *rxbq) { > > + uint16_t len; > > + uint32_t i; > > + > > + if (!rxbq) > > + return; > > + > > + len =3D rxbq->nb_rx_desc; > > + for (i =3D 0; i < len * CPFL_P2P_DESC_LEN; i++) > > + ((volatile char *)rxbq->rx_ring)[i] =3D 0; > > + > > + rxbq->bufq1 =3D NULL; > > + rxbq->bufq2 =3D NULL; > > +} > > + > > static uint64_t > > cpfl_rx_offload_convert(uint64_t offload) { @@ -234,7 +307,10 @@ > > cpfl_rx_queue_release(void *rxq) > > > > /* Split queue */ > > if (!q->adapter->is_rx_singleq) { > > - if (q->bufq2) > > + /* the mz is shared between Tx/Rx hairpin, let Rx_release > > + * free the buf, q->bufq1->mz and q->mz. > > + */ > > + if (!cpfl_rxq->hairpin_info.hairpin_q && q->bufq2) > > cpfl_rx_split_bufq_release(q->bufq2); > > > > if (q->bufq1) > > @@ -385,6 +461,7 @@ cpfl_rx_queue_setup(struct rte_eth_dev *dev, > uint16_t > > queue_idx, > > } > > } > > > > + cpfl_vport->nb_data_rxq++; > > rxq->q_set =3D true; > > dev->data->rx_queues[queue_idx] =3D cpfl_rxq; > > > > @@ -548,6 +625,7 @@ cpfl_tx_queue_setup(struct rte_eth_dev *dev, > uint16_t > > queue_idx, > > txq->qtx_tail =3D hw->hw_addr + (vport->chunks_info.tx_qtail_start + > > queue_idx * vport->chunks_info.tx_qtail_spacing); > > txq->ops =3D &def_txq_ops; > > + cpfl_vport->nb_data_txq++; > > txq->q_set =3D true; > > dev->data->tx_queues[queue_idx] =3D cpfl_txq; > > > > @@ -562,6 +640,297 @@ cpfl_tx_queue_setup(struct rte_eth_dev *dev, > > uint16_t queue_idx, > > return ret; > > } > > > > +static int > > +cpfl_rx_hairpin_bufq_setup(struct rte_eth_dev *dev, struct idpf_rx_que= ue > > *bufq, > > + uint16_t logic_qid, uint16_t nb_desc) { > > + struct cpfl_vport *cpfl_vport =3D > > + (struct cpfl_vport *)dev->data->dev_private; > > + struct idpf_vport *vport =3D &cpfl_vport->base; > > + struct idpf_adapter *adapter =3D vport->adapter; > > + struct rte_mempool *mp; > > + char pool_name[RTE_MEMPOOL_NAMESIZE]; > > + > > + mp =3D cpfl_vport->p2p_mp; > > + if (!mp) { > > + snprintf(pool_name, RTE_MEMPOOL_NAMESIZE, > > "p2p_mb_pool_%u", > > + dev->data->port_id); > > + mp =3D rte_pktmbuf_pool_create(pool_name, > > CPFL_P2P_NB_MBUF, CPFL_P2P_CACHE_SIZE, > > + 0, CPFL_P2P_MBUF_SIZE, dev- > > >device->numa_node); > > + if (!mp) { > > + PMD_INIT_LOG(ERR, "Failed to allocate mbuf pool for > > p2p"); > > + return -ENOMEM; > > + } > > + cpfl_vport->p2p_mp =3D mp; > > + } > > + > > + bufq->mp =3D mp; > > + bufq->nb_rx_desc =3D nb_desc; > > + bufq->queue_id =3D cpfl_hw_qid_get(cpfl_vport- > > >p2p_q_chunks_info.rx_buf_start_qid, logic_qid); > > + bufq->port_id =3D dev->data->port_id; > > + bufq->adapter =3D adapter; > > + bufq->rx_buf_len =3D CPFL_P2P_MBUF_SIZE - > > RTE_PKTMBUF_HEADROOM; > > + > > + bufq->sw_ring =3D rte_zmalloc("sw ring", > > + sizeof(struct rte_mbuf *) * nb_desc, > > + RTE_CACHE_LINE_SIZE); > > + if (!bufq->sw_ring) { > > + PMD_INIT_LOG(ERR, "Failed to allocate memory for SW ring"); > > + return -ENOMEM; > > + } > > + > > + bufq->q_set =3D true; > > + bufq->ops =3D &def_rxq_ops; > > + > > + return 0; > > +} > > + > > +int > > +cpfl_rx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id= x, > > + uint16_t nb_desc, > > + const struct rte_eth_hairpin_conf *conf) { > > + struct cpfl_vport *cpfl_vport =3D (struct cpfl_vport *)dev->data- > > >dev_private; > > + struct idpf_vport *vport =3D &cpfl_vport->base; > > + struct idpf_adapter *adapter_base =3D vport->adapter; > > + uint16_t logic_qid =3D cpfl_vport->nb_p2p_rxq; > > + struct cpfl_rxq_hairpin_info *hairpin_info; > > + struct cpfl_rx_queue *cpfl_rxq; > > + struct idpf_rx_queue *bufq1 =3D NULL; > > + struct idpf_rx_queue *rxq; > > + uint16_t peer_port, peer_q; > > + uint16_t qid; > > + int ret; > > + > > + if (vport->rxq_model =3D=3D VIRTCHNL2_QUEUE_MODEL_SINGLE) { > > + PMD_INIT_LOG(ERR, "Only spilt queue model supports hairpin > > queue."); > > + return -EINVAL; > > + } > > + > > + if (conf->peer_count !=3D 1) { > > + PMD_INIT_LOG(ERR, "Can't support Rx hairpin queue peer > > count %d", conf->peer_count); > > + return -EINVAL; > > + } > > + > > + peer_port =3D conf->peers[0].port; > > + peer_q =3D conf->peers[0].queue; > > + > > + if (nb_desc % CPFL_ALIGN_RING_DESC !=3D 0 || > > + nb_desc > CPFL_MAX_RING_DESC || > > + nb_desc < CPFL_MIN_RING_DESC) { > > + PMD_INIT_LOG(ERR, "Number (%u) of receive descriptors is > > invalid", nb_desc); > > + return -EINVAL; > > + } > > + > > + /* Free memory if needed */ > > + if (dev->data->rx_queues[queue_idx]) { > > + cpfl_rx_queue_release(dev->data->rx_queues[queue_idx]); > > + dev->data->rx_queues[queue_idx] =3D NULL; > > + } > > + > > + /* Setup Rx description queue */ > > + cpfl_rxq =3D rte_zmalloc_socket("cpfl hairpin rxq", > > + sizeof(struct cpfl_rx_queue), > > + RTE_CACHE_LINE_SIZE, > > + SOCKET_ID_ANY); > > + if (!cpfl_rxq) { > > + PMD_INIT_LOG(ERR, "Failed to allocate memory for rx queue > > data structure"); > > + return -ENOMEM; > > + } > > + > > + rxq =3D &cpfl_rxq->base; > > + hairpin_info =3D &cpfl_rxq->hairpin_info; > > + rxq->nb_rx_desc =3D nb_desc * 2; > > + rxq->queue_id =3D cpfl_hw_qid_get(cpfl_vport- > > >p2p_q_chunks_info.rx_start_qid, logic_qid); > > + rxq->port_id =3D dev->data->port_id; > > + rxq->adapter =3D adapter_base; > > + rxq->rx_buf_len =3D CPFL_P2P_MBUF_SIZE - > RTE_PKTMBUF_HEADROOM; > > + hairpin_info->hairpin_q =3D true; > > + hairpin_info->peer_txp =3D peer_port; > > + hairpin_info->peer_txq_id =3D peer_q; > > + > > + if (conf->manual_bind !=3D 0) > > + cpfl_vport->p2p_manual_bind =3D true; > > + else > > + cpfl_vport->p2p_manual_bind =3D false; > > + > > + /* setup 1 Rx buffer queue for the 1st hairpin rxq */ > > + if (logic_qid =3D=3D 0) { > > + bufq1 =3D rte_zmalloc_socket("hairpin rx bufq1", > > + sizeof(struct idpf_rx_queue), > > + RTE_CACHE_LINE_SIZE, > > + SOCKET_ID_ANY); > > + if (!bufq1) { > > + PMD_INIT_LOG(ERR, "Failed to allocate memory for > > hairpin Rx buffer queue 1."); > > + ret =3D -ENOMEM; > > + goto err_alloc_bufq1; > > + } > > + qid =3D 2 * logic_qid; > > + ret =3D cpfl_rx_hairpin_bufq_setup(dev, bufq1, qid, nb_desc); > > + if (ret) { > > + PMD_INIT_LOG(ERR, "Failed to setup hairpin Rx buffer > > queue 1"); > > + ret =3D -EINVAL; > > + goto err_setup_bufq1; > > + } > > + cpfl_vport->p2p_rx_bufq =3D bufq1; > > + } > > + > > + rxq->bufq1 =3D cpfl_vport->p2p_rx_bufq; > > + rxq->bufq2 =3D NULL; > > + > > + cpfl_vport->nb_p2p_rxq++; > > + rxq->q_set =3D true; > > + dev->data->rx_queues[queue_idx] =3D cpfl_rxq; > > + > > + return 0; > > + > > +err_setup_bufq1: > > + rte_free(bufq1); > > +err_alloc_bufq1: > > + rte_free(rxq); > > + > > + return ret; > > +} > > + > > +int > > +cpfl_tx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id= x, > > + uint16_t nb_desc, > > + const struct rte_eth_hairpin_conf *conf) { > > + struct cpfl_vport *cpfl_vport =3D > > + (struct cpfl_vport *)dev->data->dev_private; > > + > > + struct idpf_vport *vport =3D &cpfl_vport->base; > > + struct idpf_adapter *adapter_base =3D vport->adapter; > > + uint16_t logic_qid =3D cpfl_vport->nb_p2p_txq; > > + struct cpfl_txq_hairpin_info *hairpin_info; > > + struct idpf_hw *hw =3D &adapter_base->hw; > > + struct cpfl_tx_queue *cpfl_txq; > > + struct idpf_tx_queue *txq, *cq; > > + const struct rte_memzone *mz; > > + uint32_t ring_size; > > + uint16_t peer_port, peer_q; > > + > > + if (vport->txq_model =3D=3D VIRTCHNL2_QUEUE_MODEL_SINGLE) { > > + PMD_INIT_LOG(ERR, "Only spilt queue model supports hairpin > > queue."); > > + return -EINVAL; > > + } > > + > > + if (conf->peer_count !=3D 1) { > > + PMD_INIT_LOG(ERR, "Can't support Tx hairpin queue peer > > count %d", conf->peer_count); > > + return -EINVAL; > > + } > > + > > + peer_port =3D conf->peers[0].port; > > + peer_q =3D conf->peers[0].queue; > > + > > + if (nb_desc % CPFL_ALIGN_RING_DESC !=3D 0 || > > + nb_desc > CPFL_MAX_RING_DESC || > > + nb_desc < CPFL_MIN_RING_DESC) { > > + PMD_INIT_LOG(ERR, "Number (%u) of transmit descriptors is > > invalid", > > + nb_desc); > > + return -EINVAL; > > + } > > + > > + /* Free memory if needed. */ > > + if (dev->data->tx_queues[queue_idx]) { > > + cpfl_tx_queue_release(dev->data->tx_queues[queue_idx]); > > + dev->data->tx_queues[queue_idx] =3D NULL; > > + } > > + > > + /* Allocate the TX queue data structure. */ > > + cpfl_txq =3D rte_zmalloc_socket("cpfl hairpin txq", > > + sizeof(struct cpfl_tx_queue), > > + RTE_CACHE_LINE_SIZE, > > + SOCKET_ID_ANY); > > + if (!cpfl_txq) { > > + PMD_INIT_LOG(ERR, "Failed to allocate memory for tx queue > > structure"); > > + return -ENOMEM; > > + } > > + > > + txq =3D &cpfl_txq->base; > > + hairpin_info =3D &cpfl_txq->hairpin_info; > > + /* Txq ring length should be 2 times of Tx completion queue size. */ > > + txq->nb_tx_desc =3D nb_desc * 2; > > + txq->queue_id =3D cpfl_hw_qid_get(cpfl_vport- > > >p2p_q_chunks_info.tx_start_qid, logic_qid); > > + txq->port_id =3D dev->data->port_id; > > + hairpin_info->hairpin_q =3D true; > > + hairpin_info->peer_rxp =3D peer_port; > > + hairpin_info->peer_rxq_id =3D peer_q; > > + > > + if (conf->manual_bind !=3D 0) > > + cpfl_vport->p2p_manual_bind =3D true; > > + else > > + cpfl_vport->p2p_manual_bind =3D false; > > + > > + /* Always Tx hairpin queue allocates Tx HW ring */ > > + ring_size =3D RTE_ALIGN(txq->nb_tx_desc * CPFL_P2P_DESC_LEN, > > + CPFL_DMA_MEM_ALIGN); > > + mz =3D rte_eth_dma_zone_reserve(dev, "hairpin_tx_ring", logic_qid, > > + ring_size + CPFL_P2P_RING_BUF, > > + CPFL_RING_BASE_ALIGN, > > + dev->device->numa_node); > > + if (!mz) { > > + PMD_INIT_LOG(ERR, "Failed to reserve DMA memory for TX"); > > + rte_free(txq->sw_ring); > > + rte_free(txq); > > + return -ENOMEM; > > + } > > + > > + txq->tx_ring_phys_addr =3D mz->iova; > > + txq->desc_ring =3D mz->addr; > > + txq->mz =3D mz; > > + > > + cpfl_tx_hairpin_descq_reset(txq); > > + txq->qtx_tail =3D hw->hw_addr + > > + cpfl_hw_qtail_get(cpfl_vport- > > >p2p_q_chunks_info.tx_qtail_start, > > + logic_qid, cpfl_vport- > > >p2p_q_chunks_info.tx_qtail_spacing); > > + txq->ops =3D &def_txq_ops; > > + > > + if (cpfl_vport->p2p_tx_complq =3D=3D NULL) { > [Liu, Mingxia] In cpfl_rx_hairpin_queue_setup(), "logic_qid" is used to i= dentify > if it is the first time to allocate "p2p_rx_bufq" buffer, > Can it be unified, using logic_qid =3D=3D 0 or p2p_tx_complq/ p2p_rx_bufq= =3D=3D > NULL ? > > + cq =3D rte_zmalloc_socket("cpfl hairpin cq", > > + sizeof(struct idpf_tx_queue), > > + RTE_CACHE_LINE_SIZE, > > + dev->device->numa_node); > > + if (!cq) { > > + PMD_INIT_LOG(ERR, "Failed to allocate memory for tx > > queue structure"); > > + return -ENOMEM; > > + } > > + > > + cq->nb_tx_desc =3D nb_desc; > > + cq->queue_id =3D cpfl_hw_qid_get(cpfl_vport- > > >p2p_q_chunks_info.tx_compl_start_qid, 0); > > + cq->port_id =3D dev->data->port_id; > > + > > + /* Tx completion queue always allocates the HW ring */ > > + ring_size =3D RTE_ALIGN(cq->nb_tx_desc * CPFL_P2P_DESC_LEN, > > + CPFL_DMA_MEM_ALIGN); > > + mz =3D rte_eth_dma_zone_reserve(dev, "hairpin_tx_compl_ring", > > logic_qid, > > + ring_size + CPFL_P2P_RING_BUF, > > + CPFL_RING_BASE_ALIGN, > > + dev->device->numa_node); > > + if (!mz) { > > + PMD_INIT_LOG(ERR, "Failed to reserve DMA memory > > for TX completion queue"); > > + rte_free(txq->sw_ring); > > + rte_free(txq); > > + return -ENOMEM; > > + } > > + cq->tx_ring_phys_addr =3D mz->iova; > > + cq->compl_ring =3D mz->addr; > > + cq->mz =3D mz; > > + > > + cpfl_tx_hairpin_complq_reset(cq); > > + cpfl_vport->p2p_tx_complq =3D cq; > > + } > > + > > + txq->complq =3D cpfl_vport->p2p_tx_complq; > > + > > + cpfl_vport->nb_p2p_txq++; > > + txq->q_set =3D true; > > + dev->data->tx_queues[queue_idx] =3D cpfl_txq; > > + > > + return 0; > > +} > > + > > int > > cpfl_rx_queue_init(struct rte_eth_dev *dev, uint16_t rx_queue_id) { @= @ - > > 865,6 +1234,8 @@ cpfl_set_rx_function(struct rte_eth_dev *dev) > > if (vport->rx_vec_allowed) { > > for (i =3D 0; i < dev->data->nb_rx_queues; i++) { > > cpfl_rxq =3D dev->data->rx_queues[i]; > > + if (cpfl_rxq->hairpin_info.hairpin_q) > > + continue; > > (void)idpf_qc_splitq_rx_vec_setup(&cpfl_rxq- > > >base); > > } > > #ifdef CC_AVX512_SUPPORT > > diff --git a/drivers/net/cpfl/cpfl_rxtx.h b/drivers/net/cpfl/cpfl_rxtx.= h index > > 3a87a1f4b3..5e9f2dada7 100644 > > --- a/drivers/net/cpfl/cpfl_rxtx.h > > +++ b/drivers/net/cpfl/cpfl_rxtx.h > > @@ -13,6 +13,7 @@ > > #define CPFL_MIN_RING_DESC 32 > > #define CPFL_MAX_RING_DESC 4096 > > #define CPFL_DMA_MEM_ALIGN 4096 > > +#define CPFL_P2P_DESC_LEN 16 > > #define CPFL_MAX_HAIRPINQ_RX_2_TX 1 > > #define CPFL_MAX_HAIRPINQ_TX_2_RX 1 > > #define CPFL_MAX_HAIRPINQ_NB_DESC 1024 > > @@ -21,6 +22,10 @@ > > #define CPFL_P2P_NB_TX_COMPLQ 1 > > #define CPFL_P2P_NB_QUEUE_GRPS 1 > > #define CPFL_P2P_QUEUE_GRP_ID 1 > > +#define CPFL_P2P_NB_MBUF 4096 > > +#define CPFL_P2P_CACHE_SIZE 250 > > +#define CPFL_P2P_MBUF_SIZE 2048 > > +#define CPFL_P2P_RING_BUF 128 > > /* Base address of the HW descriptor ring should be 128B aligned. */ > > #define CPFL_RING_BASE_ALIGN 128 > > > > @@ -31,12 +36,26 @@ > > > > #define CPFL_SUPPORT_CHAIN_NUM 5 > > > > +struct cpfl_rxq_hairpin_info { > > + bool hairpin_q; /* if rx queue is a hairpin queue */ > > + uint16_t peer_txp; > > + uint16_t peer_txq_id; > > +}; > > + > > struct cpfl_rx_queue { > > struct idpf_rx_queue base; > > + struct cpfl_rxq_hairpin_info hairpin_info; }; > > + > > +struct cpfl_txq_hairpin_info { > > + bool hairpin_q; /* if tx queue is a hairpin queue */ > > + uint16_t peer_rxp; > > + uint16_t peer_rxq_id; > > }; > > > > struct cpfl_tx_queue { > > struct idpf_tx_queue base; > > + struct cpfl_txq_hairpin_info hairpin_info; > > }; > > > > int cpfl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, @= @ - > > 57,4 +76,11 @@ void cpfl_dev_tx_queue_release(struct rte_eth_dev *dev, > > uint16_t qid); void cpfl_dev_rx_queue_release(struct rte_eth_dev *dev, > > uint16_t qid); void cpfl_set_rx_function(struct rte_eth_dev *dev); vo= id > > cpfl_set_tx_function(struct rte_eth_dev *dev); > > +uint16_t cpfl_hw_qid_get(uint16_t start_qid, uint16_t offset); uint64_= t > > +cpfl_hw_qtail_get(uint64_t tail_start, uint16_t offset, uint64_t > > +tail_spacing); int cpfl_rx_hairpin_queue_setup(struct rte_eth_dev *dev= , > > uint16_t queue_idx, > > + uint16_t nb_desc, const struct > > rte_eth_hairpin_conf *conf); int > > +cpfl_tx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id= x, > > + uint16_t nb_desc, > > + const struct rte_eth_hairpin_conf *conf); > > #endif /* _CPFL_RXTX_H_ */ > > diff --git a/drivers/net/cpfl/cpfl_rxtx_vec_common.h > > b/drivers/net/cpfl/cpfl_rxtx_vec_common.h > > index 5690b17911..d8e9191196 100644 > > --- a/drivers/net/cpfl/cpfl_rxtx_vec_common.h > > +++ b/drivers/net/cpfl/cpfl_rxtx_vec_common.h > > @@ -85,6 +85,8 @@ cpfl_rx_vec_dev_check_default(struct rte_eth_dev > *dev) > > cpfl_rxq =3D dev->data->rx_queues[i]; > > default_ret =3D cpfl_rx_vec_queue_default(&cpfl_rxq->base); > > if (vport->rxq_model =3D=3D VIRTCHNL2_QUEUE_MODEL_SPLIT) { > > + if (cpfl_rxq->hairpin_info.hairpin_q) > > + continue; > > splitq_ret =3D cpfl_rx_splitq_vec_default(&cpfl_rxq- > > >base); > > ret =3D splitq_ret && default_ret; > > } else { > > @@ -106,6 +108,8 @@ cpfl_tx_vec_dev_check_default(struct rte_eth_dev > *dev) > > > > for (i =3D 0; i < dev->data->nb_tx_queues; i++) { > > cpfl_txq =3D dev->data->tx_queues[i]; > > + if (cpfl_txq->hairpin_info.hairpin_q) > > + continue; > > ret =3D cpfl_tx_vec_queue_default(&cpfl_txq->base); > > if (ret =3D=3D CPFL_SCALAR_PATH) > > return CPFL_SCALAR_PATH; > > -- > > 2.26.2