From: Stephen Hemminger <stephen@networkplumber.org>
To: "Robin Jarry" <rjarry@redhat.com>
Cc: "Morten Brørup" <mb@smartsharesystems.com>,
"Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>,
dev@dpdk.org
Subject: Re: rte_fib network order bug
Date: Fri, 15 Nov 2024 08:20:51 -0800 [thread overview]
Message-ID: <20241115082046.46af52d5@hermes.local> (raw)
In-Reply-To: <D5MTNHCSEMOQ.18ENWI4TZGKD1@redhat.com>
On Fri, 15 Nov 2024 15:28:33 +0100
"Robin Jarry" <rjarry@redhat.com> wrote:
> Morten Brørup, Nov 15, 2024 at 14:52:
> > Robin, you've totally won me over on this endian discussion. :-)
> > Especially the IPv6 comparison make it clear why IPv4 should also be
> > network byte order.
> >
> > API/ABI stability is a pain... we're stuck with host endian IPv4
> > addresses; e.g. for the RTE_IPV4() macro, which I now agree produces
> > the wrong endian value (on little endian CPUs).
>
> At least for 24.11 it is too late. But maybe we could make it right for
> the next LTS?
>
> >> Vladimir, could we at least consider adding a real network order mode
> >> for the rib and fib libraries? So that we can have consistent APIs
> >> between IPv4 and IPv6?
> >
> > And/or rename RTE_FIB_F_NETWORK_ORDER to
> > RTE_FIB_F_NETWORK_ORDER_LOOKUP or similar. This is important if real
> > network order mode is added (now or later)!
>
> Maybe we could revert that patch and defer a complete change of the
> rib/fib APIs to only expose network order addresses? It would be an ABI
> breakage but if properly announced in advance, it should be possible.
>
> Thinking about it some more. Having a flag for such a drastic change in
> behaviour does not seem right.
It was a mistake for DPDK to define its own data structures for IP addresses.
Would have been much better to stick with the legacy what BSD, Linux (and Windows)
uses in API. 'struct in_addr' and 'struct in6_addr'
Reinvention did not help users.
prev parent reply other threads:[~2024-11-15 16:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 9:31 Robin Jarry
2024-11-13 10:42 ` Medvedkin, Vladimir
2024-11-13 13:27 ` Robin Jarry
2024-11-13 19:39 ` Medvedkin, Vladimir
2024-11-14 7:43 ` Morten Brørup
2024-11-14 10:18 ` Robin Jarry
2024-11-14 14:35 ` Morten Brørup
2024-11-15 13:01 ` Robin Jarry
2024-11-15 13:52 ` Morten Brørup
2024-11-15 14:07 ` Bruce Richardson
2024-11-15 14:28 ` Robin Jarry
2024-11-15 16:20 ` Stephen Hemminger [this message]
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=20241115082046.46af52d5@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--cc=rjarry@redhat.com \
--cc=vladimir.medvedkin@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).