Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2023 22:35:36 GMT
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: ca3fc7aabe39 - stable/13 - bnxt: Don't restart on VLAN changes
Message-ID:  <202309112235.38BMZax9056827@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kbowling:

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

commit ca3fc7aabe3998822c6e1357df922618afb18648
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2023-08-24 20:16:24 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2023-09-11 22:34:20 +0000

    bnxt: Don't restart on VLAN changes
    
    In rS360398, a new iflib device method was added with default of opt out
    for VLAN events needing an interface reset.
    
    This is unintentional for bnxt(4) and is causing another bug in its VLAN
    initialization code to affect the common case of adding and removing
    VLANs on an existing interface.
    
    PR:             269133
    Tested by:      kp
    Sponsored by:   BBOX.io
    Differential Revision:  https://reviews.freebsd.org/D41558
    
    (cherry picked from commit bce864d1c274faeb6678028aad1e07e91fe430ac)
---
 sys/dev/bnxt/if_bnxt.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c
index 2eb41cf7ade8..db8b4125e5bd 100644
--- a/sys/dev/bnxt/if_bnxt.c
+++ b/sys/dev/bnxt/if_bnxt.c
@@ -224,6 +224,7 @@ static uint8_t get_phy_type(struct bnxt_softc *softc);
 static uint64_t bnxt_get_baudrate(struct bnxt_link_info *link);
 static void bnxt_get_wol_settings(struct bnxt_softc *softc);
 static int bnxt_wol_config(if_ctx_t ctx);
+static bool bnxt_if_needs_restart(if_ctx_t, enum iflib_restart_event);
 
 /*
  * Device Interface Declaration
@@ -288,6 +289,8 @@ static device_method_t bnxt_iflib_methods[] = {
 	DEVMETHOD(ifdi_shutdown, bnxt_shutdown),
 	DEVMETHOD(ifdi_resume, bnxt_resume),
 
+	DEVMETHOD(ifdi_needs_restart, bnxt_if_needs_restart),
+
 	DEVMETHOD_END
 };
 
@@ -2497,6 +2500,16 @@ bnxt_wol_config(if_ctx_t ctx)
 	return 0;
 }
 
+static bool
+bnxt_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event)
+{
+	switch (event) {
+	case IFLIB_RESTART_VLAN_CONFIG:
+	default:
+		return (false);
+	}
+}
+
 static int
 bnxt_shutdown(if_ctx_t ctx)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309112235.38BMZax9056827>