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

Kevin Bowling <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a79fd54.3a03e.2b09023a__22785.3745500155$1786379643$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by kbowling:

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

commit c410551b9feadf9b65f920fd25714fcda8299a56
Author:     Kevin Bowling <[email protected]>
AuthorDate: 2026-08-10 15:09:56 +0000
Commit:     Kevin Bowling <[email protected]>
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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.