On Mon, 31 Aug 2026 18:29:05 +0200
Dariusz Sosnowski <[email protected]> wrote:

> * Background on rte_eth_representor_info_get()
> 
> rte_eth_representor_info_get() experimental function was added
> to ethdev public API in 21.05 DPDK release [1].

You know the API shouldn't have stayed experimental so long.
There is no good reason for API to stay experimental across multiple LTS 
releases!

The code would be much simpler if you use sentinel values rather than
carrying around all the XX_valid flag values.

With int fields and -1 (or a named RTE_ETH_REPRESENTOR_UNSPEC),
 the whole comparator collapses to something like:


static bool field_match(int a, int b)
{
        return a == -1 || b == -1 || a == b;
}

return field_match(info.controller, other->controller) &&
       field_match(info.pf, other->pf) &&
       info.type == other->type &&
       (info.type != RTE_ETH_REPRESENTOR_VF || field_match(info.vf, other->vf)) 
&&

Reply via email to