mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
i40e: don't allow changes to HW VLAN stripping on active port VLANs
[ Upstream commit bfb0ebed53 ]
Modifying the VLAN stripping options when a port VLAN is configured
will break traffic for the VSI, and conceptually doesn't make sense,
so don't allow this.
Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6b7d2831fa
commit
63da7afddd
@@ -2499,6 +2499,10 @@ void i40e_vlan_stripping_enable(struct i40e_vsi *vsi)
|
||||
struct i40e_vsi_context ctxt;
|
||||
i40e_status ret;
|
||||
|
||||
/* Don't modify stripping options if a port VLAN is active */
|
||||
if (vsi->info.pvid)
|
||||
return;
|
||||
|
||||
if ((vsi->info.valid_sections &
|
||||
cpu_to_le16(I40E_AQ_VSI_PROP_VLAN_VALID)) &&
|
||||
((vsi->info.port_vlan_flags & I40E_AQ_VSI_PVLAN_MODE_MASK) == 0))
|
||||
@@ -2529,6 +2533,10 @@ void i40e_vlan_stripping_disable(struct i40e_vsi *vsi)
|
||||
struct i40e_vsi_context ctxt;
|
||||
i40e_status ret;
|
||||
|
||||
/* Don't modify stripping options if a port VLAN is active */
|
||||
if (vsi->info.pvid)
|
||||
return;
|
||||
|
||||
if ((vsi->info.valid_sections &
|
||||
cpu_to_le16(I40E_AQ_VSI_PROP_VLAN_VALID)) &&
|
||||
((vsi->info.port_vlan_flags & I40E_AQ_VSI_PVLAN_EMOD_MASK) ==
|
||||
|
||||
Reference in New Issue
Block a user