From patchwork Fri May 19 02:59:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 127059 X-Patchwork-Delegate: ferruh.yigit@amd.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 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> 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?q?mt32cnb07AJh0jk6PAmiHyXq1WEm?= =?utf-8?q?xDWzoY9LkRjvt01Nva2aTw8gnM9/K9jmQZSaAtKXc9Vz6iLVDVRZiOd6t/uzocge0?= =?utf-8?q?nQaGBoq+Mn3idvqarNmLYvAk/X31wYLht4fZEpmJwz1E7CpcK3nF8cz0vKaZXw1Re?= =?utf-8?q?4jdL+euvXlkdpsXfPQ81TTerWCMWUBjm9Q/xsaqQj/P9spezNXVTbCcXuqsYM//iU?= =?utf-8?q?4mb6QWJUJKDlvKuAKg/Z2UfDN8i+dlM1MYy3pSHZpjl39/2cHSd4Wxlu+aTBtDwnD?= =?utf-8?q?XfmQUzXCVn6dhzQf85hiSQBidrcOW4AkKoypTn57mmYa6OQCnIRpeMP8pQqwakNIv?= =?utf-8?q?dnXpe+WyRYxR0P8M3c1a6xYliVS8UJ7cIXfYH72Jxmb5KVMm7WOQBh3+CzxTcoh35?= =?utf-8?q?XYeZMWsHIrIYfPnTEFXf0SIWeSlgwUE0U/3zFtQYYKTLzSsANcHF6t3s7sfREXX5C?= =?utf-8?q?7EcHtyYsZWXDplmWOYiI9Nqbag+kvhh0mlvGlzXVDjtEkba5iuPBSHtX1IrlJ2N7R?= =?utf-8?q?DwAD1YLpvkRVa7RxbBOja9qDm3hWP4R7ppeks/DG/avu4Ccky457svAmNOuGoUmIB?= =?utf-8?q?VO3zt87ZhFHpu9Ggg/ri9tIEQosXrD8n1ZGWvD6xVAt1t0xhlIZMaXzXfG9RgDkMH?= =?utf-8?q?j83S/McB+Lh+EzDamJHqY3WqS1fEiffcywnU+Fa0pHdd1FZKnq3y/SotByAvCGljG?= =?utf-8?q?qOJTdOajz4U6auR9X0RhOi0N9zu66qsT0icBpnoidwIaOEBC+aYI374fGQQqvX8cI?= =?utf-8?q?Y3ceZl5M1YLgd5wYwCetDAXFEfmLrk7xAWwRE8NUE6gZhNIEeuPrdeoEFW07MczbP?= =?utf-8?q?mjArILThEHNKd/Imykm4g1w2ddZkmUNnyN17UpcaTqw2WmqOTX9aQNwVXG5hwnFFr?= =?utf-8?q?U5draqXC7E7vN62jLZY7zxiWQpRykwqNiV3jea++ERaaqDEBlOiWXerbD5JBDDmDO?= =?utf-8?q?8H7PPOMFvB4fUTq5J4wTjXUU8qeT5hrdT9PZR8wR1CIzNQostuJj7DSKBVVkyTp0U?= =?utf-8?q?iTKSne8B03FxndlUpTNp2QHg8XVotc5GfhCa9VikI4/RSGQq6bxkRdfdYmuMWHEB1?= =?utf-8?q?AdCB1DgdwV8f6rkfx1Yw7ziWxZhx+8xxwnwRuIUC+PwjonVMKguO4qclNldo0NBG5?= =?utf-8?q?raiAFjQm6o0lw+FXPeHZ2adEyyc1/TFpS5tLdskfFgSsGuY6Zb+9GF+mcTwgMiEsS?= =?utf-8?q?n2WtJU3vNdKuAa4z4srLs44WWufwaIwSS+NisJcXbnmpkvEeDnrNPEBrzr61+cjcb?= =?utf-8?q?kOBkO5YTp7+nHsqkB5ZYTkvLcazy54yoyDjV4swxfryWsa8fmYfCKR6xLi/qbZgfg?= =?utf-8?q?iuiBMuTPC19YVZ6yrN6pOmkAxR+sY1tlEc8QTB/Q1yOaDeNFmkh4hGrR280dbDL74?= =?utf-8?q?uqitwBxPoVOUAv6rV+KpHioZah8tuee3T9oTqW2hf2i99HTGKeZ3y7aWMKT2KFp4D?= =?utf-8?q?FeWXI/+QEy5RnZuzBhPakl6IN3ccqFa2YGHIQicUwmWLZsUmyCHi5t4rNSWYm2acT?= =?utf-8?q?ZMtZtLn3cZNpW9wqgGfIP/45jIRK+a8X/g=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78b088c5-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 */