The vmxnet3 driver enables vlan filters if filtering is enabled for
any vlan. In promiscuous mode the filter table is cleared to in
order to disable filtering. However, if a vlan device is subsequently
created that vlan will be added to the filter, re-engaging it. As a
result, not only do we not see all the vlans in promiscuous mode, we
don't even see vlans for which a filter was previously created.
CC: Scott J. Goldman <redacted>
CC: Shreyas Bhatewara <redacted>
CC: VMware PV-Drivers <redacted>
Signed-off-by: Jesse Gross <redacted>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 34 ++++++++++++++++++++--------------
1 files changed, 20 insertions(+), 14 deletions(-)
If this is done, the driver will ignore all vlan tag registrations (and
deletions) while the interface is in promiscuous mode. Better solution
would be to send UPDATE_VLAN_FILTERS command alone inside the promiscuous
condition. vfTable can be set/unset unconditionally as before. By doing
this, when the interface comes out of promiscuous mode, the restored vlan
state will have all the added/removed vlan tags into effect.
If this is done, the driver will ignore all vlan tag registrations (and
deletions) while the interface is in promiscuous mode. Better solution
would be to send UPDATE_VLAN_FILTERS command alone inside the promiscuous
condition. vfTable can be set/unset unconditionally as before. By doing
this, when the interface comes out of promiscuous mode, the restored vlan
state will have all the added/removed vlan tags into effect.
Adds and removes are not ignored when in promiscuous mode because the
active_vlans bitfield is still being updated (this is in the context
that you clipped out). When we come out of promiscuous mode,
vmxnet3_restore_vlan() is called which will update the hardware with
the vlans that have been registered. This is much safer than directly
updating vfTable because it will get overwritten if vmxnet3_set_mc()
is called again and is potentially very error prone to have it not
reflect what we actually want programmed in the hardware.
Adds and removes are not ignored when in promiscuous mode because the
active_vlans bitfield is still being updated (this is in the context
that you clipped out). When we come out of promiscuous mode,
vmxnet3_restore_vlan() is called which will update the hardware with
the vlans that have been registered. This is much safer than directly
updating vfTable because it will get overwritten if vmxnet3_set_mc()
is called again and is potentially very error prone to have it not
reflect what we actually want programmed in the hardware.
Thats right.
Signed-off-by: Shreyas N Bhatewara <redacted>
The vmxnet3 driver enables vlan filters if filtering is enabled for
any vlan. In promiscuous mode the filter table is cleared to in
order to disable filtering. However, if a vlan device is subsequently
created that vlan will be added to the filter, re-engaging it. As a
result, not only do we not see all the vlans in promiscuous mode, we
don't even see vlans for which a filter was previously created.
CC: Scott J. Goldman <redacted>
CC: Shreyas Bhatewara <redacted>
CC: VMware PV-Drivers <redacted>
Signed-off-by: Jesse Gross <redacted>