[PATCH v1 08/15] net/ixgbe: do not use flow list to count flows

Bruce Richardson bruce.richardson at intel.com
Wed May 6 11:24:02 CEST 2026


On Thu, Apr 30, 2026 at 12:14:37PM +0100, Anatoly Burakov wrote:
> Currently, FDIR code will use emptiness of its flow list as an indicator
> that there are no flows (and that we can install a mask). That usage is the
> only thing preventing us from getting rid of the FDIR flow list
> altogether, so introduce a new mechanism for flow count tracking.
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
>  drivers/net/intel/ixgbe/ixgbe_ethdev.c | 1 +
>  drivers/net/intel/ixgbe/ixgbe_ethdev.h | 1 +
>  drivers/net/intel/ixgbe/ixgbe_fdir.c   | 8 +++++---
>  drivers/net/intel/ixgbe/ixgbe_flow.c   | 3 ++-
>  4 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.c b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
> index 1c4a2e1177..ee1b499b49 100644
> --- a/drivers/net/intel/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
> @@ -1465,6 +1465,7 @@ static int ixgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
>  		rte_hash_free(fdir_info->hash_handle);
>  		return -ENOMEM;
>  	}
> +	fdir_info->n_flows = 0;
>  	fdir_info->mask_added = FALSE;
>  
>  	return 0;
> diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
> index 2fb6d55387..6147cd6bdf 100644
> --- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h
> +++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
> @@ -199,6 +199,7 @@ struct ixgbe_hw_fdir_info {
>  	struct ixgbe_fdir_filter **hash_map;
>  	struct rte_hash *hash_handle; /* cuckoo hash handler */
>  	bool mask_added; /* If already got mask from consistent filter */
> +	uint32_t    n_flows;
>  };
>  
Minor nit, for future reference: best to put this before the mask_added
field, so that we have the fields sorted for size and avoid gaps.
However, this struct already has gaps, and is not perf sensitive, so not a
big deal here. If you don't mind me doing so, I can reorder the new field
on apply.

/Bruce


More information about the dev mailing list