e1000e: Disable TSO on i219-LM card to increase speed
Subsystems (2)
PATCH v3 1/1 e1000e: Disable TSO on i219-LM card to increase speed
From: Sebastian Basierski <[email protected]>
While using i219-LM card currently it was only possible to achieve about 60% of maximum speed due to regression introduced in Linux 5.8-rc1. This was caused by TSO not being disabled by default despite commit f29801030ac6 ("e1000e: Disable TSO for buffer overrun workaround") implementation. Fix that by disabling TSO during driver probe.
---
v3: Changed the patch to disable TSO during the probe
v2: Fixed commit message and comment inside the code
--- drivers/net/ethernet/intel/e1000e/netdev.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/intel/e1000e/netdev.c +8 -0
@@ -7529,6 +7529,14 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)NETIF_F_RXCSUM | NETIF_F_HW_CSUM); +/* Disable TSO for i219 to avoid transfer speed +* being capped at 60%. +*/ +if (hw->mac.type == e1000_pch_spt) { + netdev->features &= ~NETIF_F_TSO ; + netdev->features &= ~NETIF_F_TSO6 ; + } +/* Set user-changeable features (subset of all device features) */ netdev->hw_features = netdev->features; netdev->hw_features |=NETIF_F_RXFCS ;
Signature · 6 lines
2.31.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
[Cc: +Kai-Heng]
Dear Mateusz, dear Sebastian,
Thank you for the patch.
Am 22.02.23 um 15:07 schrieb Mateusz Palczewski:
Quoted 7 lines
From: Sebastian Basierski <[email protected]>
While using i219-LM card currently it was only possible to achieve about 60% of maximum speed due to regression introduced in Linux 5.8-rc1. This was caused by TSO not being disabled by default despite commit
f29801030ac6("e1000e: Disable TSO for buffer overrun workaround") implementation. Fix that by disabling TSO during driver probe.
Can the code added by the referenced commit then be removed?
Also the questions from the discussion of v2(?) was not answered, why the conditions in the if statement of the code added by commit f29801030ac6 where not true.
/* disable TSO for pcie and 10/100 speeds, to avoid
* some hardware issues
*/
if (!(adapter->flags & FLAG_TSO_FORCE)) {Missing Fixes: tag below.
Quoted 18 lines
Signed-off-by Sebastian Basierski <[email protected]>Signed-off-by Mateusz Palczewski <[email protected]>---
v3: Changed the patch to disable TSO during the probe
v2: Fixed commit message and comment inside the code--- drivers/net/ethernet/intel/e1000e/netdev.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/net/ethernet/intel/e1000e/netdev.c +1
-0@@ -7529,6 +7529,14 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)NETIF_F_RXCSUM | NETIF_F_HW_CSUM); +/* Disable TSO for i219 to avoid transfer speed
drivers/net/ethernet/intel/e1000e/netdev.c static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · line 7542
Quoted 10 lines
drivers/net/ethernet/intel/e1000e/netdev.c +7
-0+* being capped at 60%. +*/ +if (hw->mac.type == e1000_pch_spt) { + netdev->features &= ~NETIF_F_TSO ; + netdev->features &= ~NETIF_F_TSO6 ; + } +/* Set user-changeable features (subset of all device features) */ netdev->hw_features = netdev->features; netdev->hw_features |=NETIF_F_RXFCS ;
Kind regards,
Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Hi,
Quoted 2 lines · Paul Menzel
[Cc: +Kai-Heng]
Thanks for adding me to Cc list.
Please add me to the Cc list if there's next revision.
Quoted 15 lines
Dear Mateusz, dear Sebastian,
Thank you for the patch.
Am 22.02.23 um 15:07 schrieb Mateusz Palczewski:
Quoted 7 lines
From: Sebastian Basierski <[email protected]>
While using i219-LM card currently it was only possible to achieve about 60% of maximum speed due to regression introduced in Linux 5.8-rc1. This was caused by TSO not being disabled by default despite commit
f29801030ac6("e1000e: Disable TSO for buffer overrun workaround") implementation. Fix that by disabling TSO during driver probe.
Does that mean "watchdog_timer" isn't scheduled?
Quoted 11 lines
Can the code added by the referenced commit then be removed?
Also the questions from the discussion of v2(?) was not answered, why the conditions in the if statement of the code added by commit
f29801030ac6where not true./* disable TSO for pcie and 10/100 speeds, to avoid * some hardware issues */ if (!(adapter->flags & FLAG_TSO_FORCE)) {
Yea, my idea was to take FLAG_TSO_FORCE into consideration hence the adding the change to this if block.
Maybe someone still wants to enable TSO despite of the downside?
Kai-Heng
Quoted 35 lines
Missing Fixes: tag below.
Quoted 18 lines
Signed-off-by Sebastian Basierski <[email protected]>Signed-off-by Mateusz Palczewski <[email protected]>---
v3: Changed the patch to disable TSO during the probe
v2: Fixed commit message and comment inside the code--- drivers/net/ethernet/intel/e1000e/netdev.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/net/ethernet/intel/e1000e/netdev.c +1
-0@@ -7529,6 +7529,14 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)NETIF_F_RXCSUM | NETIF_F_HW_CSUM); +/* Disable TSO for i219 to avoid transfer speed drivers/net/ethernet/intel/e1000e/netdev.c static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · line 7542
Quoted 10 lines
drivers/net/ethernet/intel/e1000e/netdev.c +7
-0+* being capped at 60%. +*/ +if (hw->mac.type == e1000_pch_spt) { + netdev->features &= ~NETIF_F_TSO ; + netdev->features &= ~NETIF_F_TSO6 ; + } +/* Set user-changeable features (subset of all device features) */ netdev->hw_features = netdev->features; netdev->hw_features |=NETIF_F_RXFCS ;Kind regards,
Quoted 1 line
Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Hi,
Sorry for late response
Quoted 9 lines
Hi,
Quoted 2 lines · Paul Menzel
[Cc: +Kai-Heng]
Thanks for adding me to Cc list.
Please add me to the Cc list if there's next revision.
Sure, will do.
Quoted 11 lines
Quoted 11 lines
Dear Mateusz, dear Sebastian,
Thank you for the patch.
Am 22.02.23 um 15:07 schrieb Mateusz Palczewski:
Quoted 2 lines
From: Sebastian Basierski <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
While using i219-LM card currently it was only possible to achieve about 60% of maximum speed due to regression introduced in Linux 5.8-rc1. This was caused by TSO not being disabled by default despite commit
f29801030ac6("e1000e: Disable TSO for buffer overrun workaround") implementation. Fix that by disabling TSO during driver probe.Does that mean "
watchdog_timer" isn't scheduled?
I think it is, but for some reason forcing TSO to be disabled in e1000_watchdog_task() does work only after reloading the driver on server and not right away after it was booted. I believe with the solution posted in the new patch it should work right away.
Quoted 3 lines
Quoted 3 lines
Can the code added by the referenced commit then be removed?
You are right, I will prepare new patch version with removal of the code that disables TSO in watchdog task and instead does this during probe.
Quoted 5 lines
Quoted 5 lines
Also the questions from the discussion of v2(?) was not answered, why the conditions in the if statement of the code added by commit
f29801030ac6where not true.
Quoted 8 lines
Quoted 4 lines
/* disable TSO for pcie and 10/100 speeds, to avoid * some hardware issues */ if (!(adapter->flags & FLAG_TSO_FORCE)) {Yea, my idea was to take
FLAG_TSO_FORCEinto consideration hence the adding the change to this if block.Maybe someone still wants to enable TSO despite of the downside?
By disabling TSO during probe we are not shutting it down completly, if a user wants to use it anyway despite speed decrease it can be done manually with ethtool.
Quoted 5 lines
Kai-Heng
Quoted 2 lines
Missing Fixes: tag below.
Thanks, will add that in v4 version.
Quoted 34 lines
Quoted 34 lines
Quoted 20 lines
Signed-off-by Sebastian Basierski <[email protected]>Signed-off-by Mateusz Palczewski <[email protected]>---
v3: Changed the patch to disable TSO during the probe
v2: Fixed commit message and comment inside the code--- drivers/net/ethernet/intel/e1000e/netdev.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/net/ethernet/intel/e1000e/netdev.c +1
-0@@ -7529,6 +7529,14 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)NETIF_F_RXCSUM | NETIF_F_HW_CSUM); +/* Disable TSO for i219 to avoid transfer speed drivers/net/ethernet/intel/e1000e/netdev.c static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · line 7542
Quoted 10 lines
drivers/net/ethernet/intel/e1000e/netdev.c +7
-0+* being capped at 60%. +*/ +if (hw->mac.type == e1000_pch_spt) { + netdev->features &= ~NETIF_F_TSO ; + netdev->features &= ~NETIF_F_TSO6 ; + } +/* Set user-changeable features (subset of all device features) */ netdev->hw_features = netdev->features; netdev->hw_features |=NETIF_F_RXFCS ;Kind regards,
Quoted 2 lines
Quoted 1 line
Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Hi Mateusz,
On Wed, Mar 15, 2023 at 8:44 PM Palczewski, Mateusz <[email protected]> wrote:
[snipped]
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Also the questions from the discussion of v2(?) was not answered, why the conditions in the if statement of the code added by commit
f29801030ac6where not true./* disable TSO for pcie and 10/100 speeds, to avoid * some hardware issues */ if (!(adapter->flags & FLAG_TSO_FORCE)) {
Quoted 5 lines
Quoted 3 lines
Yea, my idea was to take
FLAG_TSO_FORCEinto consideration hence the adding the change to this if block.Maybe someone still wants to enable TSO despite of the downside?
By disabling TSO during probe we are not shutting it down completly, if a user wants to use it anyway despite speed decrease it can be done manually with ethtool.
Maybe move the whole block of "FLAG_TSO_FORCE" to probe routine? So the code is logically grouped.
Kai-Heng
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Hi,
Quoted 13 lines
Hi Mateusz,
On Wed, Mar 15, 2023 at 8:44 PM Palczewski, Mateusz <[email protected]> wrote:
[snipped]Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Also the questions from the discussion of v2(?) was not answered, why the conditions in the if statement of the code added by commit
f29801030ac6where not true./* disable TSO for pcie and 10/100 speeds, to avoid * some hardware issues */ if (!(adapter->flags & FLAG_TSO_FORCE)) {
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Yea, my idea was to take
FLAG_TSO_FORCEinto consideration hence the adding the change to this if block.Maybe someone still wants to enable TSO despite of the downside?
By disabling TSO during probe we are not shutting it down completly, if a user wants to use it anyway despite speed decrease it can be done manually with ethtool.
Maybe move the whole block of "
FLAG_TSO_FORCE" to probe routine? So the code is logically grouped.
Sure, I will test how this works on my setup and then if everything will be fine I will post new version on IWL.
Quoted 3 lines
Kai-Heng
Regards,
Mateusz
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan