git: 699014f7981b - stable/13 - ice: Don't restart on VLAN changes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 11 Sep 2023 22:35:38 UTC
The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=699014f7981bdda8826ecb6aab783911a0f5c43c commit 699014f7981bdda8826ecb6aab783911a0f5c43c Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2023-08-24 20:40:35 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2023-09-11 22:34:20 +0000 ice: 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 re-init is unnecessary for ice(4). Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D41558 (cherry picked from commit 14a14e36aee2e6b848c239ac29090ad4cb66fbf7) --- sys/dev/ice/if_ice_iflib.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 58e4b77585ee..be1aa86234c7 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -83,6 +83,7 @@ static int ice_if_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data); static int ice_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req); static int ice_if_suspend(if_ctx_t ctx); static int ice_if_resume(if_ctx_t ctx); +static bool ice_if_needs_restart(if_ctx_t, enum iflib_restart_event); static int ice_msix_que(void *arg); static int ice_msix_admin(void *arg); @@ -170,6 +171,7 @@ static device_method_t ice_iflib_methods[] = { DEVMETHOD(ifdi_i2c_req, ice_if_i2c_req), DEVMETHOD(ifdi_suspend, ice_if_suspend), DEVMETHOD(ifdi_resume, ice_if_resume), + DEVMETHOD(ifdi_needs_restart, ice_if_needs_restart), DEVMETHOD_END }; @@ -3084,3 +3086,21 @@ ice_if_resume(if_ctx_t ctx) return (0); } +/* ice_if_needs_restart - Tell iflib when the driver needs to be reinitialized + * @ctx: iflib context + * @event: event code to check + * + * Defaults to returning false for unknown events. + * + * @returns true if iflib needs to reinit the interface + */ +static bool +ice_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) +{ + switch (event) { + case IFLIB_RESTART_VLAN_CONFIG: + default: + return (false); + } +} +