git: c410551b9fea - main - ixgbe: Compare flow control against requested mode

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Mon, 10 Aug 2026 16:33:24 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=c410551b9feadf9b65f920fd25714fcda8299a56

commit c410551b9feadf9b65f920fd25714fcda8299a56
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-10 15:09:56 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-10 16:33:12 +0000

    ixgbe: Compare flow control against requested mode
    
    The flow-control sysctl represents the configured policy, while
    current_mode is the mode negotiated with the link partner.  Comparing a
    new request with current_mode can needlessly reprogram an unchanged
    policy or skip a requested policy change that happens to match the
    current negotiation result.
    
    Compare with requested_mode before deciding that no update is needed.
    
    MFC after:      2 weeks
---
 sys/dev/ixgbe/if_ix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index 9a998b03dbd7..49b383518df4 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -5264,7 +5264,7 @@ ixgbe_sysctl_flowcntl(SYSCTL_HANDLER_ARGS)
 	/* Serialize the live register update with the administrative task. */
 	ctx_lock = iflib_ctx_lock_get(sc->ctx);
 	sx_xlock(ctx_lock);
-	if (fc == sc->hw.fc.current_mode)
+	if (fc == sc->hw.fc.requested_mode)
 		error = 0;
 	else
 		error = ixgbe_set_flowcntl(sc, fc);