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).

MFC after:	2 weeks
Sponsored by:	BBOX.io
Differential Revision:	https://reviews.freebsd.org/D41558
This commit is contained in:
Kevin Bowling 2023-08-24 13:40:35 -07:00
parent 1d6c12c511
commit 14a14e36ae

View file

@ -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
};
@ -3076,3 +3078,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);
}
}