Skip to content

Commit 35ff024

Browse files
hechaoyongshemminger
authored andcommitted
net/nfp: standard the data endian of NFDk Tx descriptor
The data endian of NFDk Tx descriptor should be little, and the related logic also should modify. Fixes: d7f6d9b ("net/nfp: adjust coding style for NFDk") Cc: [email protected] Signed-off-by: Chaoyong He <[email protected]> Reviewed-by: Long Wu <[email protected]> Reviewed-by: Peng Zhang <[email protected]>
1 parent ef1eed5 commit 35ff024

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/net/nfp/nfdk/nfp_nfdk.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,19 @@ struct nfp_net_nfdk_tx_desc {
109109
union {
110110
/** Address descriptor */
111111
struct {
112-
uint16_t dma_addr_hi; /**< High bits of host buf address */
113-
uint16_t dma_len_type; /**< Length to DMA for this desc */
114-
uint32_t dma_addr_lo; /**< Low 32bit of host buf addr */
112+
rte_le16_t dma_addr_hi; /**< High bits of host buf address */
113+
rte_le16_t dma_len_type; /**< Length to DMA for this desc */
114+
rte_le32_t dma_addr_lo; /**< Low 32bit of host buf addr */
115115
};
116116

117117
/** TSO descriptor */
118118
struct {
119-
uint16_t mss; /**< MSS to be used for LSO */
119+
rte_le16_t mss; /**< MSS to be used for LSO */
120120
uint8_t lso_hdrlen; /**< LSO, TCP payload offset */
121121
uint8_t lso_totsegs; /**< LSO, total segments */
122122
uint8_t l3_offset; /**< L3 header offset */
123123
uint8_t l4_offset; /**< L4 header offset */
124-
uint16_t lso_meta_res; /**< Rsvd bits in TSO metadata */
124+
rte_le16_t lso_meta_res; /**< Rsvd bits in TSO metadata */
125125
};
126126

127127
/** Metadata descriptor */
@@ -130,8 +130,8 @@ struct nfp_net_nfdk_tx_desc {
130130
uint8_t reserved[7]; /**< Meta byte place holder */
131131
};
132132

133-
uint32_t vals[2];
134-
uint64_t raw;
133+
rte_le32_t vals[2];
134+
rte_le64_t raw;
135135
};
136136
};
137137

0 commit comments

Comments
 (0)