On Wed, Sep 16, 2026 at 09:58:27PM +0800, Zhang Tengfei wrote:
> Enabling Flow Director reduces RXPBSIZE to reserve SRAM for the
> filter table. Clearing the last FDIR rule set the mode back to
> none without restoring that buffer, so the next flow create ran
> configure again and subtracted the same amount a second time.
>
> Keep the FDIR mode after rules are removed, and subtract RXPBSIZE
> only once until the next hardware reset.
>
> Fixes: 301abd26b118 ("net/ixgbe: reset flow state on clear paths")
> Cc: [email protected]
> Signed-off-by: Zhang Tengfei <[email protected]>
> ---
> drivers/net/intel/ixgbe/ixgbe_ethdev.c | 7 +++++--
> drivers/net/intel/ixgbe/ixgbe_ethdev.h | 1 +
> drivers/net/intel/ixgbe/ixgbe_fdir.c | 21 ++++++++++++++-------
> drivers/net/intel/ixgbe/ixgbe_flow.c | 1 -
> 4 files changed, 20 insertions(+), 10 deletions(-)
>
Reviewing this patch, I'm wondering if this approach is actually the best
way to fix this. For example, after this change, if flow director is used
and then all rules removed, the flow director mode is still preserved,
possibly preventing use of other features that conflict with the old fdir
mode.
I wonder if a cleaner fix - which should be shorter too - might be to
instead just restore the RXPBSIZE value back when the fdir mode is set to
NONE. This gives a clean combination of (enable + set RXPBSIZE0) and (disable +
reset RXPBSIZE).
What do you think?
/Bruce