DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: [RFC 02/21] ethdev: use byte order instead of ntohl
Date: Sun,  2 Aug 2026 11:15:07 -0700	[thread overview]
Message-ID: <20260802181835.476887-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20260802181835.476887-1-stephen@networkplumber.org>

DPDK has its own byte order macros which are preferred
over the Linux ones in arpa/inet.h

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 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


  parent reply	other threads:[~2026-08-02 18:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-02 18:15 [RFC 00/21] ethdev: isolate legacy flow director Stephen Hemminger
2026-08-02 18:15 ` [RFC 01/21] net/dpaa, net/dpaa2: remove unused include Stephen Hemminger
2026-08-02 18:15 ` Stephen Hemminger [this message]
2026-08-02 18:15 ` [RFC 03/21] net/ixgbe: remove experimental FDIR API Stephen Hemminger
2026-08-02 18:15 ` [RFC 04/21] net/i40e: " Stephen Hemminger
2026-08-02 18:15 ` [RFC 05/21] app/testpmd: remove support for flow director Stephen Hemminger
2026-08-02 18:15 ` [RFC 06/21] net/gve: include IP, UDP and TCP header Stephen Hemminger
2026-08-02 18:15 ` [RFC 07/21] crypto/dpaa_sec: include UDP header Stephen Hemminger
2026-08-02 18:15 ` [RFC 08/21] net/nfp: break implicit dependency on rte_eth_ctrl.h Stephen Hemminger
2026-08-02 18:15 ` [RFC 09/21] net/mana: include used network headers Stephen Hemminger
2026-08-02 18:15 ` [RFC 10/21] gro: include headers directly Stephen Hemminger
2026-08-02 18:15 ` [RFC 11/21] test: " Stephen Hemminger
2026-08-02 19:37   ` Marat Khalili
2026-08-03  3:01     ` Stephen Hemminger
2026-08-02 18:15 ` [RFC 12/21] node: get UDP header Stephen Hemminger
2026-08-02 18:15 ` [RFC 13/21] net/rnp: include network headers Stephen Hemminger
2026-08-02 18:15 ` [RFC 14/21] net/r8169: get " Stephen Hemminger
2026-08-02 18:15 ` [RFC 15/21] net/ngbe: include network protocol headers Stephen Hemminger
2026-08-02 18:15 ` [RFC 16/21] examples: include network headers Stephen Hemminger
2026-08-02 18:15 ` [RFC 17/21] net/mlx5: include rte_flow as needed Stephen Hemminger
2026-08-02 18:15 ` [RFC 18/21] net/sfc: include rte_flow Stephen Hemminger
2026-08-02 18:15 ` [RFC 19/21] net/intel: include network headers Stephen Hemminger
2026-08-02 18:15 ` [RFC 20/21] ethdev, drivers: isolate flow director Stephen Hemminger
2026-08-02 18:15 ` [RFC 21/21] doc: add release not about rte_ethdev changes Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260802181835.476887-3-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox