enic: 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 unintentional for vmxnet3(4). MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D41558
This commit is contained in:
parent
b6b75424c5
commit
fe6c4e214d
@ -117,6 +117,7 @@ static int enic_dev_wait(struct vnic_dev *, int (*) (struct vnic_dev *, int),
|
||||
int (*) (struct vnic_dev *, int *), int arg);
|
||||
static int enic_map_bar(struct enic_softc *, struct enic_bar_info *, int, bool);
|
||||
static void enic_update_packet_filter(struct enic *enic);
|
||||
static bool enic_if_needs_restart(if_ctx_t, enum iflib_restart_event);
|
||||
|
||||
typedef enum {
|
||||
ENIC_BARRIER_RD,
|
||||
@ -174,6 +175,8 @@ static device_method_t enic_iflib_methods[] = {
|
||||
DEVMETHOD(ifdi_intr_disable, enic_intr_disable_all),
|
||||
DEVMETHOD(ifdi_msix_intr_assign, enic_msix_intr_assign),
|
||||
|
||||
DEVMETHOD(ifdi_needs_restart, enic_if_needs_restart),
|
||||
|
||||
DEVMETHOD_END
|
||||
};
|
||||
|
||||
@ -1564,6 +1567,16 @@ enic_update_packet_filter(struct enic *enic)
|
||||
ENIC_UNLOCK(softc);
|
||||
}
|
||||
|
||||
static bool
|
||||
enic_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event)
|
||||
{
|
||||
switch (event) {
|
||||
case IFLIB_RESTART_VLAN_CONFIG:
|
||||
default:
|
||||
return (false);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
enic_setup_finish(struct enic *enic)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user