From patchwork Tue Jun 6 10:03:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xing, Beilei" X-Patchwork-Id: 128158 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D0D442C39; Tue, 6 Jun 2023 04:29:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62E4442D31; Tue, 6 Jun 2023 04:28:50 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id C061A42D5D for ; Tue, 6 Jun 2023 04:28:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686018527; x=1717554527; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iqzcS7OKvPVcHQ4C92jAVgseqdZ7RA+QZ5fwiV4s71o=; b=E+j6p5K4IPfvJoFaPXonJphU8werx1mDwy/kmt+Yz+iC5lTvgju0RyRO Y8ZCcN1afxFR+aokd9uldlao2VGnWBR2RQF+YMjEE9Jc7Stf0tRPlvCRN BTlc6cf15ekfSP+r7ayaCAjymMih5PM3eh+Ufy8XkakU5f1A0gc0awvvD 88qbmF2gNO1kLIL2Ci5SMAUnXH93pxRD8MzHW9ekTunpANfq2VdB6Nfhk 7ybwrzVcLyeVVy6t7ZGUdqVXpoFxRYhbH0N0stKL57W5R1qu2bqQaFy8x vXsNgXYWFdRmlSYIsuB12DlCUAcavOKPyOlXV1uL0aRoaYZCWnHbQH1Bm w==; X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="422368299" X-IronPort-AV: E=Sophos;i="6.00,219,1681196400"; d="scan'208";a="422368299" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 19:28:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="708891174" X-IronPort-AV: E=Sophos;i="6.00,219,1681196400"; d="scan'208";a="708891174" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.253]) by orsmga002.jf.intel.com with ESMTP; 05 Jun 2023 19:28:44 -0700 From: beilei.xing@intel.com To: jingjing.wu@intel.com Cc: dev@dpdk.org, mingxia.liu@intel.com, Beilei Xing Subject: [PATCH v10 11/14] net/cpfl: enable write back based on ITR expire Date: Tue, 6 Jun 2023 10:03:21 +0000 Message-Id: <20230606100324.67659-12-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20230606100324.67659-1-beilei.xing@intel.com> References: <20230605090641.36525-1-beilei.xing@intel.com> <20230606100324.67659-1-beilei.xing@intel.com> MIME-Version: 1.0 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 From: Beilei Xing This patch enables write back based on ITR expire (WR_ON_ITR) for hairpin queues. Signed-off-by: Mingxia Liu Signed-off-by: Beilei Xing --- drivers/net/cpfl/cpfl_ethdev.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c index 4fb9aef68b..fedf2c1fa1 100644 --- a/drivers/net/cpfl/cpfl_ethdev.c +++ b/drivers/net/cpfl/cpfl_ethdev.c @@ -735,11 +735,22 @@ cpfl_dev_configure(struct rte_eth_dev *dev) static int cpfl_config_rx_queues_irqs(struct rte_eth_dev *dev) { + uint32_t qids[CPFL_MAX_P2P_NB_QUEUES + IDPF_DEFAULT_RXQ_NUM] = {0}; struct cpfl_vport *cpfl_vport = dev->data->dev_private; struct idpf_vport *vport = &cpfl_vport->base; uint16_t nb_rx_queues = dev->data->nb_rx_queues; + struct cpfl_rx_queue *cpfl_rxq; + int i; - return idpf_vport_irq_map_config(vport, nb_rx_queues); + for (i = 0; i < nb_rx_queues; i++) { + cpfl_rxq = dev->data->rx_queues[i]; + if (cpfl_rxq->hairpin_info.hairpin_q) + qids[i] = cpfl_hw_qid_get(cpfl_vport->p2p_q_chunks_info->rx_start_qid, + (i - cpfl_vport->nb_data_rxq)); + else + qids[i] = cpfl_hw_qid_get(vport->chunks_info.rx_start_qid, i); + } + return idpf_vport_irq_map_config_by_qids(vport, qids, nb_rx_queues); } /* Update hairpin_info for dev's tx hairpin queue */