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 EA97342B42; Fri, 19 May 2023 05:00:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B98EF42D44; Fri, 19 May 2023 05:00:22 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2129.outbound.protection.outlook.com [40.107.92.129]) by mails.dpdk.org (Postfix) with ESMTP id 24CA04282D for ; Fri, 19 May 2023 05:00:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S4d6Z00UnkkgWdcmJyVfAPno9j3SE2kL89XbhtzU0lXqrrx410HPnIJGCDMXx3dV1ufTnDWKiuyCNZqC25VPkzwYCewYbaWo86xwOfjPbRsV440i7SLvU+jJ1NLPCbfioVOMIof2oIRg45/oYA4UKO8y2ArYpmRJmDHOc4+7kpSp4UlpEeGHx5gwuV67U6aWoC0H4gWdugrGyDMLDi2CmfG2RIlL7Uzs0fRFjlo9ptZcDdAgHEa4AmJHH4EFWlrm2QOr/FrKZg3zdrNrCmb43edlwUrbF4rmiI1h1VzBidOOF1yWL5V0mIh66F9bgx2TMzMYgJ0Myu45kGQRnhoDRg== 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=MxvGQHWRFVxfMJUUd+qyLPCxzeFEBX4LWTNv+Qg9JQs=; b=WjcNDLDGAsh0rO4jzANjTsg0YluVk4YQmEmAMRhu59HVrYBvns+OIvA8BTnKju8pXfb5+oXKMWt+MzzHrX4HxGer/jTBxq0NajvMP9RXw/jqiKwzPp48dncXbCheSFiJ2JlCCNTVXfdboPTW57u7bm56rWVuTpb/W3zbxodDvR93YMpygwqd3iZ8JfXWUphZK6J3Ug1jZRiQdBARTfjoABWRWDMvbg6nxpcOjzsBlu8N+ky9P6pY/B1EwpOiKr1i+W8Yb5ijjr5LZ38iGkaG1L8rLMqMYOvwbw6894PZ/crY5SP9c29W31XHqDZwQm/XQ8plmDJcuTVPGCxPdZaQVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MxvGQHWRFVxfMJUUd+qyLPCxzeFEBX4LWTNv+Qg9JQs=; b=tZufMDMNGofOLAZCa2mt7VRPg9yHLSBZY/r3/xWmwjjDPzYDBOaET04RO2iWRd30GLGJALLzi6ucrUWHtTaczk0Y2Pjei7ihlNG5gdG7MyyHBMhk+1bsD/htGzVBT7+jls4PCneSWSKr5WNzpxVeLsONyHcywlh+2bCodDSauY0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SJ0PR13MB5769.namprd13.prod.outlook.com (2603:10b6:a03:40c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30; Fri, 19 May 2023 03:00:19 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ac2e:52b6:82ec:4994]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ac2e:52b6:82ec:4994%3]) with mapi id 15.20.6411.017; Fri, 19 May 2023 03:00:19 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH 4/8] net/nfp: modify the txq struct Date: Fri, 19 May 2023 10:59:46 +0800 Message-Id: <20230519025950.1642943-5-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230519025950.1642943-1-chaoyong.he@corigine.com> References: <20230519025950.1642943-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR01CA0005.apcprd01.prod.exchangelabs.com (2603:1096:4:191::23) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB5769:EE_ X-MS-Office365-Filtering-Correlation-Id: 78b088c5-4915-482b-8638-08db58152e28 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6S0jTo1rGjIRwGCMSNXaNe51pfM8fRJiHS2psp9LMyv3w3meQ2WNeItYsCLbdlfaLRdxsXk0uVgr0+pLD8GovXw1W3sBBKh41O75585vRaiMK3brkgronVPR1g8FAnG7OdGp3q6VTWU7BERyedgwWorYIEdXbkrD+z3X3Z2T2JeG8X0t/aF2hvMCmAhV4bq6sKYaTD0Tp+1TnuoiWZHfki5rI9ABokwcL5oSYSxJ0ZgXd0NbO7N5+D+xU57+/v9Oc58HTQNkDWASLv4JXXMu2iyNgyI/yjqdV3b/U2AAxlm70VaU2OQNTWsYbz1a6M6QShEytWwpaecZrw6Fsonvj0HG9WmNaMVnrxnYDojC1IOzkFHmio0IcKEAnQ50SP7L2YSDnuHIf6hgatiKHNqhuWetz2sZmNqVXEKTSDfWTJwCrmanzI4txeMubsAzhK3SFY3FceSH0mAY5Mti10rqVX3TS17luOHfpPOVQcu66Gu7DOhy1DKnHnz+xXy29uvBwdr1EMrZJB76xESMsFLPYFuRX4DnhAE2aNwLUqM/5KyWxaKcRsgvvFRR4HSiclkUyutpl1buikoHib5gAntgGch9K1VK6hQKXgZYY9MBB9nmhJKw/QD6uGlL3jgk8hFr X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(346002)(136003)(376002)(39840400004)(396003)(451199021)(6916009)(66476007)(66574015)(2616005)(6666004)(6512007)(41300700001)(2906002)(6486002)(83380400001)(478600001)(66556008)(107886003)(52116002)(66946007)(26005)(6506007)(1076003)(186003)(5660300002)(4326008)(316002)(8676002)(8936002)(44832011)(86362001)(38100700002)(36756003)(38350700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bXQzMmNuYjA3QUpoMGprNlBBbWlIeVhxMVdFbXhEV3pvWTlMa1JqdnQwMU52?= =?utf-8?B?YTJhVHc4Z25NOS9LOWptUVpTYUF0S1hjOVZ6NmlMVkRWUlppT2Q2dC91em9j?= =?utf-8?B?Z2UwblFhR0JvcStNbjNpZHZxYXJObUxZdkFrL1gzMXdZTGh0NGZaRXBtSnd6?= =?utf-8?B?MUU3Q3BjSzNuRjhjejB2S2FaWHcxUmU0amRMK2V1dlhsa2Rwc1hmUFE4MVRU?= =?utf-8?B?ZXJXQ01XVUJqbTlRL3hzYXFRai9QOXNwZXpOWFZUYkNjWHVxc1lNLy9pVTRt?= =?utf-8?B?YjZRV0pVSktEbHZLdUFLZy9aMlVmRE44aStkbE0xTVl5M3BTSFpwamwzOS8y?= =?utf-8?B?Y0hTZDRXeGx1K2FUQnREd25EWGZtUVV6WENWbjZkaHpRZjg1aGlTUUJpZHJj?= =?utf-8?B?T1c0QWtLb3lwVG41N21tWWE2T1FDbklScGVNUDhwUXF3Y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5-4915-482b-8638-08db58152e28 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2023 03:00:19.7361 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nYz8wgJe51nxZh0jcEdRaDYNyr5Ye51jZiqNwvcMCMG4koVU6kcLt5C96DqfdIJa1egnRPYQiqfNt5owUkvVFX9zAWqgug+vqz+fuJQWpzQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5769 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 Modify the struct nfp_net_txq, remove the unused fields, change the type of some fields and make the comment message more suitable. Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/flower/nfp_flower.c | 7 +-- .../net/nfp/flower/nfp_flower_representor.c | 3 - drivers/net/nfp/nfd3/nfp_nfd3_dp.c | 7 +-- drivers/net/nfp/nfdk/nfp_nfdk_dp.c | 7 +-- drivers/net/nfp/nfp_rxtx.c | 4 +- drivers/net/nfp/nfp_rxtx.h | 63 ++++++++----------- 6 files changed, 35 insertions(+), 56 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index 8847849adc..9a08ae3b75 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -508,7 +508,7 @@ nfp_flower_pf_xmit_pkts(void *tx_queue, hw = txq->hw; txds = &txq->txds[txq->wr_p]; - PMD_TX_LOG(DEBUG, "working for queue %d at pos %u and %u packets", + PMD_TX_LOG(DEBUG, "working for queue %hu at pos %u and %hu packets", txq->qidx, txq->wr_p, nb_pkts); if ((nfp_net_nfd3_free_tx_desc(txq) < nb_pkts) || (nfp_net_nfd3_txq_full(txq))) @@ -685,7 +685,7 @@ nfp_flower_init_vnic_common(struct nfp_net_hw *hw, const char *vnic_type) static int nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw) { - uint32_t i; + uint16_t i; int ret = 0; uint16_t n_txq; uint16_t n_rxq; @@ -869,9 +869,6 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw) txq->tx_count = CTRL_VNIC_NB_DESC; txq->tx_free_thresh = DEFAULT_RX_FREE_THRESH; - txq->tx_pthresh = DEFAULT_TX_PTHRESH; - txq->tx_hthresh = DEFAULT_TX_HTHRESH; - txq->tx_wthresh = DEFAULT_TX_WTHRESH; /* Queue mapping based on firmware configuration */ txq->qidx = i; diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c index 94a04e6235..0479eb4792 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.c +++ b/drivers/net/nfp/flower/nfp_flower_representor.c @@ -151,9 +151,6 @@ nfp_pf_repr_tx_queue_setup(struct rte_eth_dev *dev, txq->tx_count = nb_desc; txq->tx_free_thresh = tx_free_thresh; - txq->tx_pthresh = tx_conf->tx_thresh.pthresh; - txq->tx_hthresh = tx_conf->tx_thresh.hthresh; - txq->tx_wthresh = tx_conf->tx_thresh.wthresh; /* queue mapping based on firmware configuration */ txq->qidx = queue_idx; diff --git a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c index 909156d69c..1a960fbe63 100644 --- a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c +++ b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c @@ -112,7 +112,7 @@ nfp_net_nfd3_xmit_pkts(void *tx_queue, hw = txq->hw; txds = &txq->txds[txq->wr_p]; - PMD_TX_LOG(DEBUG, "working for queue %u at pos %d and %u packets", + PMD_TX_LOG(DEBUG, "working for queue %hu at pos %d and %hu packets", txq->qidx, txq->wr_p, nb_pkts); if (nfp_net_nfd3_free_tx_desc(txq) < NFD3_TX_DESC_PER_PKT * nb_pkts || @@ -126,7 +126,7 @@ nfp_net_nfd3_xmit_pkts(void *tx_queue, pkt = *tx_pkts; issued_descs = 0; - PMD_TX_LOG(DEBUG, "queue: %u. Sending %u packets", txq->qidx, nb_pkts); + PMD_TX_LOG(DEBUG, "queue: %hu. Sending %hu packets", txq->qidx, nb_pkts); /* Sending packets */ for (i = 0; i < nb_pkts && free_descs > 0; i++) { @@ -304,9 +304,6 @@ nfp_net_nfd3_tx_queue_setup(struct rte_eth_dev *dev, txq->tx_count = nb_desc * NFD3_TX_DESC_PER_PKT; txq->tx_free_thresh = tx_free_thresh; - txq->tx_pthresh = tx_conf->tx_thresh.pthresh; - txq->tx_hthresh = tx_conf->tx_thresh.hthresh; - txq->tx_wthresh = tx_conf->tx_thresh.wthresh; /* queue mapping based on firmware configuration */ txq->qidx = queue_idx; diff --git a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c index 12233393fc..b35aa9a610 100644 --- a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c +++ b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c @@ -164,7 +164,7 @@ nfp_net_nfdk_xmit_pkts(void *tx_queue, txq = tx_queue; hw = txq->hw; - PMD_TX_LOG(DEBUG, "working for queue %u at pos %d and %u packets", + PMD_TX_LOG(DEBUG, "working for queue %hu at pos %d and %hu packets", txq->qidx, txq->wr_p, nb_pkts); if (nfp_net_nfdk_free_tx_desc(txq) < NFDK_TX_DESC_PER_SIMPLE_PKT * nb_pkts || @@ -175,7 +175,7 @@ nfp_net_nfdk_xmit_pkts(void *tx_queue, if (unlikely(free_descs == 0)) return 0; - PMD_TX_LOG(DEBUG, "queue: %u. Sending %u packets", txq->qidx, nb_pkts); + PMD_TX_LOG(DEBUG, "queue: %hu. Sending %hu packets", txq->qidx, nb_pkts); /* Sending packets */ while (npkts < nb_pkts && free_descs > 0) { @@ -398,9 +398,6 @@ nfp_net_nfdk_tx_queue_setup(struct rte_eth_dev *dev, txq->tx_count = nb_desc * NFDK_TX_DESC_PER_SIMPLE_PKT; txq->tx_free_thresh = tx_free_thresh; - txq->tx_pthresh = tx_conf->tx_thresh.pthresh; - txq->tx_hthresh = tx_conf->tx_thresh.hthresh; - txq->tx_wthresh = tx_conf->tx_thresh.wthresh; /* queue mapping based on firmware configuration */ txq->qidx = queue_idx; diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c index b34a9b9374..8283953702 100644 --- a/drivers/net/nfp/nfp_rxtx.c +++ b/drivers/net/nfp/nfp_rxtx.c @@ -679,14 +679,14 @@ nfp_net_tx_free_bufs(struct nfp_net_txq *txq) uint32_t qcp_rd_p; int todo; - PMD_TX_LOG(DEBUG, "queue %u. Check for descriptor with a complete" + PMD_TX_LOG(DEBUG, "queue %hu. Check for descriptor with a complete" " status", txq->qidx); /* Work out how many packets have been sent */ qcp_rd_p = nfp_qcp_read(txq->qcp_q, NFP_QCP_READ_PTR); if (qcp_rd_p == txq->rd_p) { - PMD_TX_LOG(DEBUG, "queue %u: It seems harrier is not sending " + PMD_TX_LOG(DEBUG, "queue %hu: It seems harrier is not sending " "packets (%u, %u)", txq->qidx, qcp_rd_p, txq->rd_p); return 0; diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h index 83dc9960e8..4a310c0083 100644 --- a/drivers/net/nfp/nfp_rxtx.h +++ b/drivers/net/nfp/nfp_rxtx.h @@ -14,7 +14,6 @@ #ifndef _NFP_RXTX_H_ #define _NFP_RXTX_H_ -#include #include #define NFP_DESC_META_LEN(d) ((d)->rxd.meta_len_dd & PCIE_DESC_RX_META_LEN_MASK) @@ -103,63 +102,55 @@ struct nfp_net_dp_buf { }; struct nfp_net_txq { - struct nfp_net_hw *hw; /* Backpointer to nfp_net structure */ - - /* - * Queue information: @qidx is the queue index from Linux's - * perspective. @tx_qcidx is the index of the Queue - * Controller Peripheral queue relative to the TX queue BAR. - * @cnt is the size of the queue in number of - * descriptors. @qcp_q is a pointer to the base of the queue - * structure on the NFP - */ + /** Backpointer to nfp_net structure */ + struct nfp_net_hw *hw; + + /** Point to the base of the queue structure on the NFP. */ uint8_t *qcp_q; - /* - * Read and Write pointers. @wr_p and @rd_p are host side pointer, - * they are free running and have little relation to the QCP pointers * - * @qcp_rd_p is a local copy queue controller peripheral read pointer + /** + * Host side read and write pointer, they are free running and + * have little relation to the QCP pointers. */ - uint32_t wr_p; uint32_t rd_p; + /** The size of the queue in number of descriptors. */ uint32_t tx_count; uint32_t tx_free_thresh; - /* + /** * For each descriptor keep a reference to the mbuf and * DMA address used until completion is signalled. */ struct nfp_net_dp_buf *txbufs; - /* - * Information about the host side queue location. @txds is - * the virtual address for the queue, @dma is the DMA address - * of the queue and @size is the size in bytes for the queue - * (needed for free) + /** + * Information about the host side queue location. + * It is the virtual address for the queue. */ union { struct nfp_net_nfd3_tx_desc *txds; struct nfp_net_nfdk_tx_desc *ktxds; }; - /* - * At this point 48 bytes have been used for all the fields in the - * TX critical path. We have room for 8 bytes and still all placed - * in a cache line. We are not using the threshold values below but - * if we need to, we can add the most used in the remaining bytes. - */ - uint32_t tx_rs_thresh; /* not used by now. Future? */ - uint32_t tx_pthresh; /* not used by now. Future? */ - uint32_t tx_hthresh; /* not used by now. Future? */ - uint32_t tx_wthresh; /* not used by now. Future? */ + /** The index of the QCP queue relative to the TX queue BAR. */ + uint32_t tx_qcidx; + + /** The queue index from Linux's perspective. */ + uint16_t qidx; uint16_t port_id; - uint16_t data_pending; /* used by nfdk only */ - int qidx; - int tx_qcidx; - __le64 dma; + + /** Used by NFDk only */ + uint16_t data_pending; + + /** + * At this point 58 bytes have been used for all the fields in the + * TX critical path. We have room for 6 bytes and still all placed + * in a cache line. + */ + uint64_t dma; } __rte_aligned(64); /* RX and freelist descriptor format */ -- 2.39.1