All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robin Jarry" <rjarry@redhat.com>
To: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>, <dev@dpdk.org>
Subject: Re: [PATCH dpdk] fib,rib: implement full network order support for IPv4
Date: Thu, 05 Nov 2026 17:55:48 +0100	[thread overview]
Message-ID: <DMNFOGW1LT7T.3MNPAEW881VDD@redhat.com> (raw)
In-Reply-To: <374fbd82-3167-4e77-8571-3b4b8679b210@intel.com>

Hey Vladimir,

Medvedkin, Vladimir, Nov 03, 2026 at 18:24:
>> Yes, because the control plane will iterate over the RIB and will 
>> expect addresses to be in a consistent endianness.
>>
>> Honestly, I would really prefer if that host-order thing was only an 
>> internal implementation detail of the FIB algorithm and that *all* 
>> user facing APIs only dealt with *network order* addresses.
>>
>> But that would be a hard-break of the ABI. Would that be so terrible? 
>> Who reasonably needs IPv4 host-order addresses for real world 
>> applications?
>>
> I think we can't just give up host order, we need to maintain some 
> level of backward compatibility with the good old LPM library. People 
> have been using it for a long time and have built their code around 
> its API, which uses host order in both the control and data planes.

Too bad, it was worth a try ;)

I would be interested to know which real applications use the LPM/FIB 
libraries. It would give us some confidence if we ever need to break the 
APIs.

> FIB keeps the same semantics, which makes migrating from LPM 
> straightforward. The problem with a hard break is not only the ABI, 
> function prototypes remains the same (use uint32_t), so existing apps 
> would still compile and links without warnings, they just will install 
> byte-swapped routes.

Yeah, we had talked about this last year [1]. The solutions wouldn't be 
pretty. We would need to change the APIs to use a struct instead of 
integers. That wouldn't be that bad honestly.

[1] https://inbox.dpdk.org/dev/D5SUAHQG4BFP.IRLD8VYLD2U7@redhat.com/

Let's table this discussion for next time.

> The existing RTE_FIB_F_LOOKUP_NETWORK_ORDER flag has been there since 
> 24.11 and is part of two LTS releases, so I would keep it as is, at 
> least for a while.
>
> However you have a fair point about the RIB, it is exposed through 
> rte_fib_get_rib(), it is not 100% internal, and user may expect to 
> have the same byte order as was used for FIB add/del. I'm fine with 
> propagating the flag to the internal RIB, although we can just mark 
> host order in documentation.

> So I'd suggest:
> - keep host order (for both CP and DP ops) as default (to maintain 
>   alignment with legacy LPM)
> - keep RTE_FIB_F_LOOKUP_NETWORK_ORDER unchanged (lookup only)
> - add a new flag that makes all IPv4 operations (CP and DP) use 
>   network order (with this flag order propagated to the RIB if you 
>   think it would be better)

OK.

-- 
Robin

# Portions not affecting outcome have been edited for broadcast.


      reply	other threads:[~2026-11-05 16:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18  8:39 [PATCH dpdk] fib,rib: implement full network order support for IPv4 Robin Jarry
2026-09-30 17:12 ` Medvedkin, Vladimir
2026-10-16 15:56   ` Robin Jarry
2026-11-03 17:24     ` Medvedkin, Vladimir
2026-11-05 16:55       ` Robin Jarry [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=DMNFOGW1LT7T.3MNPAEW881VDD@redhat.com \
    --to=rjarry@redhat.com \
    --cc=dev@dpdk.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.