[dpdk-dev] [PATCH] ethdev: fix endian annotation for spi item

David Marchand david.marchand at redhat.com
Tue Aug 20 15:45:03 CEST 2019


spi should be set with network endian values.
While 0xffffffff == htonl(0xffffffff), this missing annotation is caught
by sparse when compiling ovs (dpdk-latest branch).

Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
Cc: stable at dpdk.org

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 lib/librte_ethdev/rte_flow.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index b66bf14..354cb1d 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -935,7 +935,7 @@ struct rte_flow_item_esp {
 #ifndef __cplusplus
 static const struct rte_flow_item_esp rte_flow_item_esp_mask = {
 	.hdr = {
-		.spi = 0xffffffff,
+		.spi = RTE_BE32(0xffffffff),
 	},
 };
 #endif
-- 
1.8.3.1



More information about the dev mailing list