[RFC 02/21] ethdev: use byte order instead of ntohl

Stephen Hemminger <[email protected]> Sun, 2 Aug 2026 11:15:07 -0700
Newsgroups org.dpdk.dev
Message-ID <[email protected]>
DPDK has its own byte order macros which are preferred
over the Linux ones in arpa/inet.h

Signed-off-by: Stephen Hemminger <[email protected]>
---
 lib/ethdev/sff_8472.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/ethdev/sff_8472.c b/lib/ethdev/sff_8472.c
index 97f231854c..acbbcee210 100644
--- a/lib/ethdev/sff_8472.c
+++ b/lib/ethdev/sff_8472.c
@@ -4,6 +4,7 @@
  */
 
 #include <stdio.h>
+#include <rte_byteorder.h>
 
 #include "sff_common.h"
 
@@ -176,7 +177,7 @@ static float befloattoh(const uint32_t *source)
 		float dst;
 	} converter;
 
-	converter.src = ntohl(*source);
+	converter.src = rte_be_to_cpu_32(*source);
 	return converter.dst;
 }
 
-- 
2.53.0