[dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition

Nelio Laranjeiro nelio.laranjeiro at 6wind.com
Thu Jan 11 10:15:58 CET 2018


ESP header is defined in the RFC2406 [1] as Big Endian fields it should use
the corresponding types in DPDK as well.

Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
Cc: borisp at mellanox.com

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>

[1] https://tools.ietf.org/html/rfc2406
---
 lib/librte_net/rte_esp.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_net/rte_esp.h b/lib/librte_net/rte_esp.h
index e228af092..148c06e09 100644
--- a/lib/librte_net/rte_esp.h
+++ b/lib/librte_net/rte_esp.h
@@ -49,8 +49,8 @@ extern "C" {
  * ESP Header
  */
 struct esp_hdr {
-	uint32_t spi;  /**< Security Parameters Index */
-	uint32_t seq;  /**< packet sequence number */
+	rte_be32_t spi;  /**< Security Parameters Index */
+	rte_be32_t seq;  /**< packet sequence number */
 } __attribute__((__packed__));
 
 #ifdef __cplusplus
-- 
2.11.0



More information about the dev mailing list