diff options
| author | Eric Joyner <erj@FreeBSD.org> | 2020-05-11 17:42:04 +0000 |
|---|---|---|
| committer | Eric Joyner <erj@FreeBSD.org> | 2020-05-11 17:42:04 +0000 |
| commit | cf1509179cd14a34ef5fa7492f62b1082cfae2b2 (patch) | |
| tree | 3b1c3af4eeb8e0e547e442b195a964fa7b9e10a7 /sys/dev/ixgbe/if_ixv.c | |
| parent | e51e957e17799feae80e11da5620af1a338171e2 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ixgbe/if_ixv.c')
| -rw-r--r-- | sys/dev/ixgbe/if_ixv.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c index 1345268ded55e..7b8c7f169a7e5 100644 --- a/sys/dev/ixgbe/if_ixv.c +++ b/sys/dev/ixgbe/if_ixv.c @@ -110,6 +110,7 @@ static void ixv_if_register_vlan(if_ctx_t, u16); static void ixv_if_unregister_vlan(if_ctx_t, u16); static uint64_t ixv_if_get_counter(if_ctx_t, ift_counter); +static bool ixv_if_needs_restart(if_ctx_t, enum iflib_restart_event); static void ixv_save_stats(struct adapter *); static void ixv_init_stats(struct adapter *); @@ -172,6 +173,7 @@ static device_method_t ixv_if_methods[] = { DEVMETHOD(ifdi_vlan_register, ixv_if_register_vlan), DEVMETHOD(ifdi_vlan_unregister, ixv_if_unregister_vlan), DEVMETHOD(ifdi_get_counter, ixv_if_get_counter), + DEVMETHOD(ifdi_needs_restart, ixv_if_needs_restart), DEVMETHOD_END }; @@ -1187,6 +1189,25 @@ ixv_if_get_counter(if_ctx_t ctx, ift_counter cnt) } } /* ixv_if_get_counter */ +/* ixv_if_needs_restart - Tell iflib when the driver needs to be reinitialized + * @ctx: iflib context + * @event: event code to check + * + * Defaults to returning true for every event. + * + * @returns true if iflib needs to reinit the interface + */ +static bool +ixv_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) +{ + switch (event) { + case IFLIB_RESTART_VLAN_CONFIG: + /* XXX: This may not need to return true */ + default: + return (true); + } +} + /************************************************************************ * ixv_initialize_transmit_units - Enable transmit unit. ************************************************************************/ |
