[PATCH] net/gve: fix RSS hash endianness in DQO format

Shreesh Adiga 16567adigashreesh at gmail.com
Sun Jul 7 04:43:17 CEST 2024


The hash field in struct gve_rx_compl_desc_dqo defined in
gve_desc_dqo.h has the type __le32. Therefore the hash must be
read in little endian rather than big endian.

Bugzilla ID: 1441
Fixes: 45da16b5b181 ("net/gve: support basic Rx data path for DQO")
Cc: junfeng.guo at intel.com
Cc: stable at dpdk.org

Signed-off-by: Shreesh Adiga <16567adigashreesh at gmail.com>
---
 drivers/net/gve/gve_rx_dqo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/gve/gve_rx_dqo.c b/drivers/net/gve/gve_rx_dqo.c
index f08b58c78d..5efcce3312 100644
--- a/drivers/net/gve/gve_rx_dqo.c
+++ b/drivers/net/gve/gve_rx_dqo.c
@@ -161,7 +161,7 @@ gve_rx_burst_dqo(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		rxm->ol_flags = 0;
 		rxm->ol_flags |= RTE_MBUF_F_RX_RSS_HASH |
 				gve_parse_csum_ol_flags(rx_desc, rxq->hw);
-		rxm->hash.rss = rte_be_to_cpu_32(rx_desc->hash);
+		rxm->hash.rss = rte_le_to_cpu_32(rx_desc->hash);
 
 		rx_pkts[nb_rx++] = rxm;
 		bytes += pkt_len;
-- 
2.44.2



More information about the stable mailing list