ice: disable stripping in default VSI ctx
Subsystems (2)
PATCH v2 1/1 ice: disable stripping in default VSI ctx
From: Michal Swiatkowski <[email protected]>
In case when driver is in eswitch mode, having VLAN stripping enabled causes failure in communication. All VLAN configuration commands are blocked. Because of that VF driver can't disable VLAN stripping at initialization. It leads to the situation when VLAN stripping on VF VSI is on, but in kernel it is off.
To prevent this, disable VLAN stripping in VSI initialization. It doesn't break other usecases, because it is set according to kernel settings.
To reproduce:
modprobe ice
devlink dev eswitch set $PF_PCI mode switchdev ip link add br0 type bridge
ip link set br0 up
ip link set $PF_DEV master br0
ip link set $PF_DEV up
echo 1 > /sys/class/net/$PF_DEV/device/sriov_numvfs ip link set $VF1 up
ip link set $VF1_PR master br0
ip link set $VF1_PR up
ip link add link $VF1 name vlan100 type vlan id 100 ip addr add $VLAN_IP/$MASK dev vlan100
ip link set vlan100 up
On link partner:
ip link add link $PF name vlan100 type vlan id 100 ip addr add $PEER_VLAN_IP/$MASK dev vlan100 ip link set vlan100 up
ping $VLAN_IP
Ping fails.
---
v2:
* Small corrections in commit msg
* Added reproduction steps
* Removed Fixes tag, added squash note
This patch should be squashed with "ice: remove VLAN representor specific logs"
drivers/net/ethernet/intel/ice/ice_lib.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/ice/ice_lib.c +3 -0
@@ -887,6 +887,9 @@ static void ice_set_dflt_vsi_ctx(struct ice_hw *hw, struct ice_vsi_ctx *ctxt) (ICE_AQ_VSI_OUTER_TAG_VLAN_8100 <<ICE_AQ_VSI_OUTER_TAG_TYPE_S ) &ICE_AQ_VSI_OUTER_TAG_TYPE_M ; + ctxt->info.outer_vlan_flags |= +FIELD_PREP (ICE_AQ_VSI_OUTER_VLAN_EMODE_M , +ICE_AQ_VSI_OUTER_VLAN_EMODE_NOTHING ); }/* Have 1:1 UP mapping for both ingress/egress tables */ table |=ICE_UP_TABLE_TRANSLATE (0 ,0 );
Signature · 1 line
2.35.1
Penigalapati
PATCH v2 1/1 ice: disable stripping in default VSI ctx
Quoted 4 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Marcin Szycik
Sent: Monday, May 30, 2022 10:21 PM
Quoted 38 lines
Subject: [Intel-wired-lan] [PATCH net-next v2] ice: disable stripping in default VSI ctx
From: Michal Swiatkowski <[email protected]>
In case when driver is in eswitch mode, having VLAN stripping enabled causes failure in communication. All VLAN configuration commands are blocked. Because of that VF driver can't disable VLAN stripping at initialization. It leads to the situation when VLAN stripping on VF VSI is on, but in kernel it is off.
To prevent this, disable VLAN stripping in VSI initialization. It doesn't break other usecases, because it is set according to kernel settings.
To reproduce:
modprobe ice
devlink dev eswitch set $PF_PCI mode switchdev ip link add br0 type bridge ip link set br0 up ip link set $PF_DEV master br0 ip link set $PF_DEV up echo 1 >/sys/class/net/$PF_DEV/device/sriov_numvfs
ip link set $VF1 up
ip link set $VF1_PR master br0
ip link set $VF1_PR up
ip link add link $VF1 name vlan100 type vlan id 100 ip addr add $VLAN_IP/$MASK dev vlan100 ip link set vlan100 upOn link partner:
ip link add link $PF name vlan100 type vlan id 100 ip addr add $PEER_VLAN_IP/$MASK dev vlan100 ip link set vlan100 up ping $VLAN_IPPing fails.
Signed-off-by Michal Swiatkowski <[email protected]>Signed-off-by Marcin Szycik <[email protected]>---
v2:
* Small corrections in commit msg
* Added reproduction steps
* Removed Fixes tag, added squash note
Quoted 5 lines
This patch should be squashed with "ice: remove VLAN representor specific logs"
drivers/net/ethernet/intel/ice/ice_lib.c| 3 +++1 file changed, 3 insertions(+)