[PATCH v3 04/29] net/ixgbe: use adapter in flow-related calls

Stephen Hemminger stephen at networkplumber.org
Sun Apr 19 17:41:05 CEST 2026


On Fri, 10 Apr 2026 14:12:58 +0100
Anatoly Burakov <anatoly.burakov at intel.com> wrote:

> Currently, a lot of rte_flow-related code paths depend on using the `dev`
> pointer. This has been okay up until now, because all the infrastructure
> surrounding rte_flow has been ad-hoc and did not have any persistent driver
> identification mechanism that works across multiple drivers, so any API
> call was tied to immediate rte_eth_dev API invocation.
> 
> However, with coming shared infrastructure, we can no longer rely on things
> that are process-local (such as `dev` pointer), and because most calls can
> be implemented using `adapter` anyway, we'll just switch the flow-related
> internal calls to use `adapter` instead of `dev`.
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---

Rather than one monster AI review, lets split the responses.

----------------------------------------------------------------------
Patch 4/29: net/ixgbe: use adapter in flow-related calls
----------------------------------------------------------------------

Error: In ixgbe_clear_all_l2_tn_filter(), the macro is called with
the wrong argument:

  struct ixgbe_adapter *adapter = IXGBE_DEV_PRIVATE_TO_ADAPTER(dev);

This casts the rte_eth_dev pointer directly to ixgbe_adapter, which
is a type confusion. Every other call site in this patch passes
dev->data->dev_private. Should be:

  struct ixgbe_adapter *adapter = IXGBE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);


More information about the dev mailing list