From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4E86CA0613 for ; Tue, 27 Aug 2019 09:12:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2A0CB1C10F; Tue, 27 Aug 2019 09:10:03 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id AFBEC1BFE3 for ; Tue, 27 Aug 2019 09:09:27 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8340A1A020A; Tue, 27 Aug 2019 09:09:27 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8090A1A0211; Tue, 27 Aug 2019 09:09:25 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 6C8A9402E7; Tue, 27 Aug 2019 15:09:22 +0800 (SGT) From: Sachin Saxena To: dev@dpdk.org Cc: thomas@monjalon.net, Sachin Saxena Date: Tue, 27 Aug 2019 12:37:19 +0530 Message-Id: <20190827070730.11206-20-sachin.saxena@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190827070730.11206-1-sachin.saxena@nxp.com> References: <20190827070730.11206-1-sachin.saxena@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v1 19/30] net/dpaa2: use LFQIDs in Tx instead of qdid 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" Signed-off-by: Sachin Saxena --- drivers/net/dpaa2/dpaa2_ethdev.c | 10 ++++++++++ drivers/net/dpaa2/dpaa2_rxtx.c | 12 +++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 925637409..8814de271 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -677,6 +677,7 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev, struct dpni_queue tx_conf_cfg; struct dpni_queue tx_flow_cfg; uint8_t options = 0, flow_id; + struct dpni_queue_id qid; uint32_t tc_id; int ret; @@ -718,6 +719,15 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev, } dpaa2_q->tc_index = tc_id; + ret = dpni_get_queue(dpni, CMD_PRI_LOW, priv->token, + DPNI_QUEUE_TX, dpaa2_q->tc_index, + dpaa2_q->flow_id, &tx_flow_cfg, &qid); + if (ret) { + DPAA2_PMD_ERR("Error in getting LFQID err=%d", ret); + return -1; + } + dpaa2_q->fqid = qid.fqid; + if (!(priv->flags & DPAA2_TX_CGR_OFF)) { struct dpni_congestion_notification_cfg cong_notif_cfg = {}; diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 19838180f..2209b78a4 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -869,8 +869,8 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) /*Prepare enqueue descriptor*/ qbman_eq_desc_clear(&eqdesc); qbman_eq_desc_set_no_orp(&eqdesc, DPAA2_EQ_RESP_ERR_FQ); - qbman_eq_desc_set_qd(&eqdesc, priv->qdid, - dpaa2_q->flow_id, dpaa2_q->tc_index); + qbman_eq_desc_set_fq(&eqdesc, dpaa2_q->fqid); + /*Clear the unused FD fields before sending*/ while (nb_pkts) { /*Check if the queue is congested*/ @@ -1021,8 +1021,7 @@ dpaa2_set_enqueue_descriptor(struct dpaa2_queue *dpaa2_q, uint16_t orpid, seqnum; uint8_t dq_idx; - qbman_eq_desc_set_qd(eqdesc, priv->qdid, dpaa2_q->flow_id, - dpaa2_q->tc_index); + qbman_eq_desc_set_fq(eqdesc, dpaa2_q->fqid); if (m->seqn & DPAA2_ENQUEUE_FLAG_ORP) { orpid = (m->seqn & DPAA2_EQCR_OPRID_MASK) >> @@ -1128,9 +1127,8 @@ dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) } else { qbman_eq_desc_set_no_orp(&eqdesc[loop], DPAA2_EQ_RESP_ERR_FQ); - qbman_eq_desc_set_qd(&eqdesc[loop], priv->qdid, - dpaa2_q->flow_id, - dpaa2_q->tc_index); + qbman_eq_desc_set_fq(&eqdesc[loop], + dpaa2_q->fqid); } if (likely(RTE_MBUF_DIRECT(*bufs))) { -- 2.17.1