e1000e: Fix TSO not being disabled on i219-LM card
Subsystems (2)
PATCH 1/1 e1000e: Fix TSO not being disabled on i219-LM card
While using i219-LM card currently it was only possible to achieve about 60% of maximum speed. This was caused by TSO not being disabled even thought it should be on this specific card. Fix that by moving the part of the code responsible for this outside of adapter->flags & FLAG_TSO_FORCE check.
--- drivers/net/ethernet/intel/e1000e/netdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/e1000e/netdev.c +6 -4
@@ -5307,10 +5307,6 @@ static void e1000_watchdog_task(struct work_struct *work)/* oops */ break ; } -if (hw->mac.type == e1000_pch_spt) { - netdev->features &= ~NETIF_F_TSO ; - netdev->features &= ~NETIF_F_TSO6 ; - } }/* enable transmits in the hardware, need to do this
@@ -5326,6 +5322,12 @@ static void e1000_watchdog_task(struct work_struct *work)if (phy->ops.cfg_on_link_up) phy->ops.cfg_on_link_up (hw); +/* Disable TSO for i219, to avoid transfer speed issue */ +if (hw->mac.type == e1000_pch_spt) { + netdev->features &= ~NETIF_F_TSO ; + netdev->features &= ~NETIF_F_TSO6 ; + } +netif_wake_queue (netdev);netif_carrier_on (netdev);
Signature · 6 lines
2.31.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Dear Mateusz,
Thank you for the patch. In the commit message summary, you could write:
Quoted 1 line
Disable TSO on i219-LM card to increase speed
Am 20.12.22 um 10:47 schrieb Mateusz Palczewski:
Quoted 1 line
While using i219-LM card currently it was only possible to achieve
Please mention, that it’s a regression in Linux 5.8-rc1.
Quoted 2 lines
about 60% of maximum speed. This was caused by TSO not being disabled even thought it should be on this specific card. Fix that by moving the
s/thought/though/
Please reference the datasheet section, where that is documented.
Quoted 2 lines
part of the code responsible for this outside of
adapter->flags&FLAG_TSO_FORCEcheck.
How did you test the speed exactly?
On a Dell Precision Tower 3620/0MWYPT, BIOS 2.22.0 07/13/2022, with
$ lspci -nn -s 00:1f.6
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet
Connection (2) I219-LM [8086:15b7] (rev 31)I get more than 60 % bandwidth with iperf3.
``` $ iperf3 -c iperf3.molgen.mpg.de Connecting to host iperf3.molgen.mpg.de, port 5201 [ 5] local 141.14.18.119 port 56092 connected to 141.14.27.109 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 102 MBytes 859 Mbits/sec 0 1.07 MBytes [ 5] 1.00-2.00 sec 98.7 MBytes 828 Mbits/sec 0 1.13 MBytes [ 5] 2.00-3.00 sec 99.8 MBytes 837 Mbits/sec 0 1.13 MBytes [ 5] 3.00-4.00 sec 99.9 MBytes 838 Mbits/sec 0 1.13 MBytes [ 5] 4.00-5.00 sec 98.7 MBytes 828 Mbits/sec 0 1.13 MBytes [ 5] 5.00-6.00 sec 99.7 MBytes 836 Mbits/sec 0 1.13 MBytes [ 5] 6.00-7.00 sec 99.9 MBytes 838 Mbits/sec 0 1.13 MBytes [ 5] 7.00-8.00 sec 98.5 MBytes 826 Mbits/sec 0 1.13 MBytes [ 5] 8.00-9.00 sec 100 MBytes 838 Mbits/sec 0 1.13 MBytes [ 5] 9.00-10.00 sec 98.8 MBytes 829 Mbits/sec 0 1.13 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 996 MBytes 836 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 994 MBytes 833 Mbits/sec receiver iperf Done. ```
Quoted 22 lines
Fixes f29801030ac6 ("e1000e: Disable TSO for buffer overrun workaround")Signed-off-by Mateusz Palczewski <[email protected]>--- drivers/net/ethernet/intel/e1000e/netdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)drivers/net/ethernet/intel/e1000e/netdev.c +0
-4@@ -5307,10 +5307,6 @@ static void e1000_watchdog_task(struct work_struct *work)/* oops */ break ; } -if (hw->mac.type == e1000_pch_spt) { - netdev->features &= ~NETIF_F_TSO ; - netdev->features &= ~NETIF_F_TSO6 ; - } }/* enable transmits in the hardware, need to do this
drivers/net/ethernet/intel/e1000e/netdev.c static void e1000_watchdog_task(struct work_struct *work) · line 5325
Quoted 4 lines
drivers/net/ethernet/intel/e1000e/netdev.c +1
-0@@ -5326,6 +5322,12 @@ static void e1000_watchdog_task(struct work_struct *work)if (phy->ops.cfg_on_link_up) phy->ops.cfg_on_link_up (hw); +/* Disable TSO for i219, to avoid transfer speed issue */
Please remove the comma, and please elaborate also in the comment.
drivers/net/ethernet/intel/e1000e/netdev.c static void e1000_watchdog_task(struct work_struct *work) · line 5332
Quoted 7 lines
drivers/net/ethernet/intel/e1000e/netdev.c +5
-0+if (hw->mac.type == e1000_pch_spt) { + netdev->features &= ~NETIF_F_TSO ; + netdev->features &= ~NETIF_F_TSO6 ; + } +netif_wake_queue (netdev);netif_carrier_on (netdev);
Kind regards,
Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Hi,
Thanks for your feedback, I will address all of the commit message and code issues in next version of the patch. Below I have added my testing results with and without the patch applied.
Quoted 24 lines
Dear Mateusz,
Thank you for the patch. In the commit message summary, you could write:
Quoted 1 line
Disable TSO on i219-LM card to increase speed
Am 20.12.22 um 10:47 schrieb Mateusz Palczewski:
Quoted 1 line
While using i219-LM card currently it was only possible to achieve
Please mention, that it’s a regression in Linux 5.8-rc1.
Quoted 3 lines
about 60% of maximum speed. This was caused by TSO not being disabled even thought it should be on this specific card. Fix that by moving the
s/thought/though/
Please reference the datasheet section, where that is documented.
Quoted 2 lines
part of the code responsible for this outside of
adapter->flags&FLAG_TSO_FORCEcheck.
Quoted 9 lines
How did you test the speed exactly?
On a Dell Precision Tower 3620/0MWYPT, BIOS 2.22.0 07/13/2022, with
$ lspci -nn -s 00:1f.6 00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-LM [8086:15b7] (rev 31)I get more than 60 % bandwidth with iperf3.
For my setup it is:
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (3) I219-LM (rev 09) with Intel Skylake platform.
Quoted 24 lines
``` $ iperf3 -c iperf3.molgen.mpg.de Connecting to host iperf3.molgen.mpg.de, port 5201 [ 5] local 141.14.18.119 port 56092 connected to 141.14.27.109 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 102 MBytes 859 Mbits/sec 0 1.07 MBytes [ 5] 1.00-2.00 sec 98.7 MBytes 828 Mbits/sec 0 1.13 MBytes [ 5] 2.00-3.00 sec 99.8 MBytes 837 Mbits/sec 0 1.13 MBytes [ 5] 3.00-4.00 sec 99.9 MBytes 838 Mbits/sec 0 1.13 MBytes [ 5] 4.00-5.00 sec 98.7 MBytes 828 Mbits/sec 0 1.13 MBytes [ 5] 5.00-6.00 sec 99.7 MBytes 836 Mbits/sec 0 1.13 MBytes [ 5] 6.00-7.00 sec 99.9 MBytes 838 Mbits/sec 0 1.13 MBytes [ 5] 7.00-8.00 sec 98.5 MBytes 826 Mbits/sec 0 1.13 MBytes [ 5] 8.00-9.00 sec 100 MBytes 838 Mbits/sec 0 1.13 MBytes [ 5] 9.00-10.00 sec 98.8 MBytes 829 Mbits/sec 0 1.13 MBytes
Quoted 8 lines
- - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 996 MBytes 836 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 994 MBytes 833 Mbits/sec receiver iperf Done. ```
I have used iperf3 to test connection between two cards in the same server with usage of namespaces, here are my results:
1. Without the patch:
ip netns exec test iperf3 -c 10.1.1.2
Connecting to host 10.1.1.2, port 5201
[ 5] local 10.1.1.1 port 60690 connected to 10.1.1.2 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 81.8 MBytes 686 Mbits/sec 0 286 KBytes [ 5] 1.00-2.00 sec 80.3 MBytes 674 Mbits/sec 0 286 KBytes [ 5] 2.00-3.00 sec 80.3 MBytes 674 Mbits/sec 0 286 KBytes [ 5] 3.00-4.00 sec 80.6 MBytes 676 Mbits/sec 0 286 KBytes [ 5] 4.00-5.00 sec 80.5 MBytes 675 Mbits/sec 0 286 KBytes [ 5] 5.00-6.00 sec 80.5 MBytes 676 Mbits/sec 0 286 KBytes [ 5] 6.00-7.00 sec 80.7 MBytes 677 Mbits/sec 0 286 KBytes [ 5] 7.00-8.00 sec 81.0 MBytes 680 Mbits/sec 0 286 KBytes [ 5] 8.00-9.00 sec 80.7 MBytes 677 Mbits/sec 0 286 KBytes [ 5] 9.00-10.00 sec 80.7 MBytes 677 Mbits/sec 0 286 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 807 MBytes 677 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 806 MBytes 676 Mbits/sec receiver
2. With the patch applied:
ip netns exec test iperf3 -c 10.1.1.2
Connecting to host 10.1.1.2, port 5201
[ 5] local 10.1.1.1 port 60686 connected to 10.1.1.2 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 113 MBytes 947 Mbits/sec 0 419 KBytes [ 5] 1.00-2.00 sec 112 MBytes 941 Mbits/sec 0 419 KBytes [ 5] 2.00-3.00 sec 111 MBytes 928 Mbits/sec 0 419 KBytes [ 5] 3.00-4.00 sec 112 MBytes 936 Mbits/sec 0 419 KBytes [ 5] 4.00-5.00 sec 111 MBytes 935 Mbits/sec 0 419 KBytes [ 5] 5.00-6.00 sec 111 MBytes 934 Mbits/sec 0 419 KBytes [ 5] 6.00-7.00 sec 112 MBytes 936 Mbits/sec 0 419 KBytes [ 5] 7.00-8.00 sec 111 MBytes 935 Mbits/sec 0 419 KBytes [ 5] 8.00-9.00 sec 111 MBytes 934 Mbits/sec 0 419 KBytes [ 5] 9.00-10.00 sec 111 MBytes 935 Mbits/sec 0 419 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 1.09 GBytes 936 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 1.09 GBytes 934 Mbits/sec receiver
Quoted 43 lines
Quoted 19 lines
Fixes f29801030ac6 ("e1000e: Disable TSO for buffer overrunworkaround")
Signed-off-by Mateusz Palczewski <[email protected]>--- drivers/net/ethernet/intel/e1000e/netdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)drivers/net/ethernet/intel/e1000e/netdev.c +0
-2@@ -5307,10 +5307,6 @@ static void e1000_watchdog_task(struct work_struct *work)/* oops */ break ; } -if (hw->mac.type == e1000_pch_spt) { - netdev->features &= ~NETIF_F_TSO ;drivers/net/ethernet/intel/e1000e/netdev.c static void e1000_watchdog_task(struct work_struct *work)
Quoted 10 lines
drivers/net/ethernet/intel/e1000e/netdev.c +2
-2- netdev->features &= ~NETIF_F_TSO6 ; - } }/* enable transmits in the hardware, need to do this @@ -5326,6 +5322,12 @@ static void e1000_watchdog_task(struct work_struct *work) if (phy->ops.cfg_on_link_up) phy->ops.cfg_on_link_up(hw); +/* Disable TSO for i219, to avoid transfer speed issue */ Please remove the comma, and please elaborate also in the comment.
drivers/net/ethernet/intel/e1000e/netdev.c static void e1000_watchdog_task(struct work_struct *work) · line 5332
Quoted 7 lines
drivers/net/ethernet/intel/e1000e/netdev.c +5
-0+if (hw->mac.type == e1000_pch_spt) { + netdev->features &= ~NETIF_F_TSO ; + netdev->features &= ~NETIF_F_TSO6 ; + } +netif_wake_queue (netdev);netif_carrier_on (netdev);Kind regards,
Quoted 2 lines
Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Dear Mateusz,
Am 21.12.22 um 11:15 schrieb Palczewski, Mateusz:
Quoted 3 lines
Thanks for your feedback, I will address all of the commit message and code issues in next version of the patch. Below I have added my testing results with and without the patch applied.
Thank you for your quick response.
Quoted 4 lines
Quoted 4 lines
How did you test the speed exactly?
On a Dell Precision Tower 3620/0MWYPT, BIOS 2.22.0 07/13/2022, with
Quoted 8 lines
Quoted 4 lines
$ lspci -nn -s 00:1f.6 00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-LM [8086:15b7] (rev 31)I get more than 60 % bandwidth with iperf3.
For my setup it is:
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (3) I219-LM (rev 09) with Intel Skylake platform.
We have two devices with that device:
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet
Connection (3) I219-LM [8086:15b9] (rev 09)
Over a “real” network it works as expected with full speed:
``` $ dmesg | grep DMI: [ 0.000000] DMI: Dell Inc. Precision 7920 Tower/060K5C, BIOS 2.14.0 07/27/2021 @sirion:~$ iperf3 -c iperf3.molgen.mpg.de Connecting to host iperf3.molgen.mpg.de, port 5201 [ 5] local 141.14.19.105 port 35338 connected to 141.14.27.109 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 113 MBytes 951 Mbits/sec 0 560 KBytes [ 5] 1.00-2.00 sec 112 MBytes 944 Mbits/sec 0 560 KBytes [ 5] 2.00-3.00 sec 112 MBytes 944 Mbits/sec 0 560 KBytes [ 5] 3.00-4.00 sec 112 MBytes 938 Mbits/sec 0 560 KBytes [ 5] 4.00-5.00 sec 112 MBytes 944 Mbits/sec 0 560 KBytes [ 5] 5.00-6.00 sec 112 MBytes 938 Mbits/sec 0 560 KBytes [ 5] 6.00-7.00 sec 112 MBytes 944 Mbits/sec 0 560 KBytes [ 5] 7.00-8.00 sec 112 MBytes 944 Mbits/sec 0 560 KBytes [ 5] 8.00-9.00 sec 112 MBytes 939 Mbits/sec 0 560 KBytes [ 5] 9.00-10.00 sec 112 MBytes 944 Mbits/sec 0 560 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 1.10 GBytes 943 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 1.10 GBytes 941 Mbits/sec receiver iperf Done. ```
Quoted 20 lines
Quoted 20 lines
```
$ iperf3 -c iperf3.molgen.mpg.de Connecting to host iperf3.molgen.mpg.de, port 5201 [ 5] local 141.14.18.119 port 56092 connected to 141.14.27.109 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 102 MBytes 859 Mbits/sec 0 1.07 MBytes [ 5] 1.00-2.00 sec 98.7 MBytes 828 Mbits/sec 0 1.13 MBytes [ 5] 2.00-3.00 sec 99.8 MBytes 837 Mbits/sec 0 1.13 MBytes [ 5] 3.00-4.00 sec 99.9 MBytes 838 Mbits/sec 0 1.13 MBytes [ 5] 4.00-5.00 sec 98.7 MBytes 828 Mbits/sec 0 1.13 MBytes [ 5] 5.00-6.00 sec 99.7 MBytes 836 Mbits/sec 0 1.13 MBytes [ 5] 6.00-7.00 sec 99.9 MBytes 838 Mbits/sec 0 1.13 MBytes [ 5] 7.00-8.00 sec 98.5 MBytes 826 Mbits/sec 0 1.13 MBytes [ 5] 8.00-9.00 sec 100 MBytes 838 Mbits/sec 0 1.13 MBytes [ 5] 9.00-10.00 sec 98.8 MBytes 829 Mbits/sec 0 1.13 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 996 MBytes 836 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 994 MBytes 833 Mbits/sec receiver
Quoted 5 lines
Quoted 2 lines
iperf Done.
```I have used iperf3 to test connection between two cards in the same server with usage of namespaces, here are my results:
Why do you need to use network namespaces, and, if you need to test it on the same server, why can’t you start iperf3 --server and run iperf3 --client localhost on the same server?
Please also provide the full instructions how to set your test environment up, as I failed to it.
Quoted 26 lines
1. Without the patch:
ip netns exec test iperf3 -c 10.1.1.2
Connecting to host 10.1.1.2, port 5201
[ 5] local 10.1.1.1 port 60690 connected to 10.1.1.2 port 5201[ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 81.8 MBytes 686 Mbits/sec 0 286 KBytes [ 5] 1.00-2.00 sec 80.3 MBytes 674 Mbits/sec 0 286 KBytes [ 5] 2.00-3.00 sec 80.3 MBytes 674 Mbits/sec 0 286 KBytes [ 5] 3.00-4.00 sec 80.6 MBytes 676 Mbits/sec 0 286 KBytes [ 5] 4.00-5.00 sec 80.5 MBytes 675 Mbits/sec 0 286 KBytes [ 5] 5.00-6.00 sec 80.5 MBytes 676 Mbits/sec 0 286 KBytes [ 5] 6.00-7.00 sec 80.7 MBytes 677 Mbits/sec 0 286 KBytes [ 5] 7.00-8.00 sec 81.0 MBytes 680 Mbits/sec 0 286 KBytes [ 5] 8.00-9.00 sec 80.7 MBytes 677 Mbits/sec 0 286 KBytes [ 5] 9.00-10.00 sec 80.7 MBytes 677 Mbits/sec 0 286 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 807 MBytes 677 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 806 MBytes 676 Mbits/sec receiver2. With the patch applied:
ip netns exec test iperf3 -c 10.1.1.2
Connecting to host 10.1.1.2, port 5201
[ 5] local 10.1.1.1 port 60686 connected to 10.1.1.2 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
Quoted 14 lines
[ 5] 0.00-1.00 sec 113 MBytes 947 Mbits/sec 0 419 KBytes [ 5] 1.00-2.00 sec 112 MBytes 941 Mbits/sec 0 419 KBytes [ 5] 2.00-3.00 sec 111 MBytes 928 Mbits/sec 0 419 KBytes [ 5] 3.00-4.00 sec 112 MBytes 936 Mbits/sec 0 419 KBytes [ 5] 4.00-5.00 sec 111 MBytes 935 Mbits/sec 0 419 KBytes [ 5] 5.00-6.00 sec 111 MBytes 934 Mbits/sec 0 419 KBytes [ 5] 6.00-7.00 sec 112 MBytes 936 Mbits/sec 0 419 KBytes [ 5] 7.00-8.00 sec 111 MBytes 935 Mbits/sec 0 419 KBytes [ 5] 8.00-9.00 sec 111 MBytes 934 Mbits/sec 0 419 KBytes [ 5] 9.00-10.00 sec 111 MBytes 935 Mbits/sec 0 419 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 1.09 GBytes 936 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 1.09 GBytes 934 Mbits/sec receiver
Please test it between two servers to rule out it has to do with network namespaces.
Kind regards,
Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan