i40e: Disable hw-tc-offload feature on driver load.
Subsystems (2)
PATCH v2 1/1 i40e: Disable hw-tc-offload feature on driver load.
After loading driver hw-tc-offload is enabled by default. Change the behaviour of driver to disable hw-tc-offload by default. Additionaly since this impacts ntuple feature state change the way of checking NETIF_F_HW_TC flag.
Title: i40e: Fix hw-tc-offload state on driver load
Change-type: FeatureImplementation
HSDES-Number: 16014847639
HSDES-Tenant: server_platf_lan.bug
---
v2: Squashed two commits into one
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +4 -1
@@ -12724,7 +12724,8 @@ static int i40e_set_features(struct net_device *netdev,else i40e_vlan_stripping_disable (vsi); -if (!(features &NETIF_F_HW_TC ) && pf->num_cloud_filters) { +if (!(features &NETIF_F_HW_TC ) && + (netdev->features &NETIF_F_HW_TC ) && pf->num_cloud_filters) {dev_err (&pf->pdev->dev,"Offloaded tc filters active, can't turn hw_tc_offload off" );return -EINVAL ;
@@ -13476,6 +13477,8 @@ static int i40e_config_netdev(struct i40e_vsi *vsi) netdev->features |= hw_features |NETIF_F_HW_VLAN_CTAG_FILTER ; netdev->hw_enc_features |=NETIF_F_TSO_MANGLEID ; + netdev->features &= ~NETIF_F_HW_TC ; +if (vsi->type ==I40E_VSI_MAIN ) {SET_NETDEV_DEV (netdev, &pf->pdev->dev);ether_addr_copy (mac_addr, hw->mac.perm_addr);
Signature · 1 line
2.27.0
PATCH v2 1/1 i40e: Disable hw-tc-offload feature on driver load.
Quoted 9 lines · Mateusz Palczewski
After loading driver hw-tc-offload is enabled by default. Change the behaviour of driver to disable hw-tc-offload by default. Additionaly since this impacts ntuple feature state change the way of checking
NETIF_F_HW_TCflag.Title: i40e: Fix hw-tc-offload state on driver load
Change-type: FeatureImplementation
HSDES-Number: 16014847639
HSDES-Tenant: server_platf_lan.bug
How come you guys still make the same mistake of including the gerrit/internal labels in upstream commits? :<
Besides that, description is not clear to me why disabling this is needed. I could look up the hsd, but folks that will look@it in the upstream will not have that comfort. Please try to improve the commit message.
Thanks!
Quoted 39 lines
Signed-off-by Norbert Zulinski <[email protected]>Signed-off-by Przemyslaw Patynowski <[email protected]>Signed-off-by Mateusz Palczewski <[email protected]>---
v2: Squashed two commits into one--- drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/net/ethernet/intel/i40e/i40e_main.c +4
-1@@ -12724,7 +12724,8 @@ static int i40e_set_features(struct net_device *netdev,else i40e_vlan_stripping_disable (vsi); -if (!(features &NETIF_F_HW_TC ) && pf->num_cloud_filters) { +if (!(features &NETIF_F_HW_TC ) && + (netdev->features &NETIF_F_HW_TC ) && pf->num_cloud_filters) {dev_err (&pf->pdev->dev,"Offloaded tc filters active, can't turn hw_tc_offload off" );return -EINVAL ;@@ -13476,6 +13477,8 @@ static int i40e_config_netdev(struct i40e_vsi *vsi) netdev->features |= hw_features |NETIF_F_HW_VLAN_CTAG_FILTER ; netdev->hw_enc_features |=NETIF_F_TSO_MANGLEID ; + netdev->features &= ~NETIF_F_HW_TC ; +if (vsi->type ==I40E_VSI_MAIN ) {SET_NETDEV_DEV (netdev, &pf->pdev->dev);ether_addr_copy (mac_addr, hw->mac.perm_addr);Signature · 6 lines
2.27.0 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan at osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan