[PATCH 3/3] net/nfp: standard the data endian of NFDk Tx descritor

Chaoyong He chaoyong.he at corigine.com
Tue Apr 15 04:54:53 CEST 2025


The data endian of NFDk Tx descriptor should be little, and the related
logic also should modify.

Fixes: d7f6d9b21ffa ("net/nfp: adjust coding style for NFDk")
Cc: stable at dpdk.org

Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
 drivers/net/nfp/nfdk/nfp_nfdk.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/nfp/nfdk/nfp_nfdk.h b/drivers/net/nfp/nfdk/nfp_nfdk.h
index 29d862f6f0..64c2b31308 100644
--- a/drivers/net/nfp/nfdk/nfp_nfdk.h
+++ b/drivers/net/nfp/nfdk/nfp_nfdk.h
@@ -109,19 +109,19 @@ struct nfp_net_nfdk_tx_desc {
 	union {
 		/** Address descriptor */
 		struct {
-			uint16_t dma_addr_hi;  /**< High bits of host buf address */
-			uint16_t dma_len_type; /**< Length to DMA for this desc */
-			uint32_t dma_addr_lo;  /**< Low 32bit of host buf addr */
+			rte_le16_t dma_addr_hi;  /**< High bits of host buf address */
+			rte_le16_t dma_len_type; /**< Length to DMA for this desc */
+			rte_le32_t dma_addr_lo;  /**< Low 32bit of host buf addr */
 		};
 
 		/** TSO descriptor */
 		struct {
-			uint16_t mss;          /**< MSS to be used for LSO */
+			rte_le16_t mss;        /**< MSS to be used for LSO */
 			uint8_t lso_hdrlen;    /**< LSO, TCP payload offset */
 			uint8_t lso_totsegs;   /**< LSO, total segments */
 			uint8_t l3_offset;     /**< L3 header offset */
 			uint8_t l4_offset;     /**< L4 header offset */
-			uint16_t lso_meta_res; /**< Rsvd bits in TSO metadata */
+			rte_le16_t lso_meta_res; /**< Rsvd bits in TSO metadata */
 		};
 
 		/** Metadata descriptor */
@@ -130,8 +130,8 @@ struct nfp_net_nfdk_tx_desc {
 			uint8_t reserved[7];   /**< Meta byte place holder */
 		};
 
-		uint32_t vals[2];
-		uint64_t raw;
+		rte_le32_t vals[2];
+		rte_le64_t raw;
 	};
 };
 
-- 
2.43.5



More information about the dev mailing list