ethdev: fix endian annotation for SPI item
authorDavid Marchand <david.marchand@redhat.com>
Tue, 20 Aug 2019 13:45:03 +0000 (15:45 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 27 Aug 2019 13:15:00 +0000 (15:15 +0200)
Security Parameters Index (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@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
lib/librte_ethdev/rte_flow.h

index b66bf14..354cb1d 100644 (file)
@@ -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