e1000e: Fixing packet loss issues on new platforms
Subsystems (2)
PATCH 2/2 e1000e: Fixing packet loss issues on new platforms
Update the HW MAC initialization flow. Do not gate DMA clock from the modPHY block. Keeping this clock will prevent drop packets sent in burst mode on the Kumeran interface.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213651
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213377
--- drivers/net/ethernet/intel/e1000e/ich8lan.c | 11 ++++++++++- drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +10 -1
@@ -4813,7 +4813,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)static s32 e1000_init_hw_ich8lan (struct e1000_hw *hw) {struct e1000_mac_info *mac = &hw->mac; -u32 ctrl_ext, txdctl, snoop; +u32 ctrl_ext, txdctl, snoop, fflt_dbg;s32 ret_val;u16 i;
@@ -4872,6 +4872,15 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) snoop = (u32 )~(PCIE_NO_SNOOP_ALL );e1000e_set_pcie_no_snoop (hw, snoop); +/* Enable workaround for packet loss issue on TGP PCH +* Do not gate DMA clock from the modPHY block +*/ +if (mac->type >= e1000_pch_tgp) { + fflt_dbg =er32 (FFLT_DBG ); + fflt_dbg |=E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK ; +ew32 (FFLT_DBG , fflt_dbg); + } + ctrl_ext =er32 (CTRL_EXT ); ctrl_ext |=E1000_CTRL_EXT_RO_DIS ;ew32 (CTRL_EXT , ctrl_ext);
drivers/net/ethernet/intel/e1000e/ich8lan.h +3 -0
@@ -289,6 +289,9 @@/* Proprietary Latency Tolerance Reporting PCI Capability */ #define E1000_PCI_LTR_CAP_LPT 0xA8 +/* Don't gate wake DMA clock */ +#define E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK 0x1000 +void e1000e_write_protect_nvm_ich8lan (struct e1000_hw *hw);void e1000e_set_kmrn_lock_loss_workaround_ich8lan (struct e1000_hw *hw,bool state);
Signature · 1 line
2.25.1
PATCH 2/2 e1000e: Fixing packet loss issues on new platforms
Dear Sasha,
THank you for the patch.
Am 22.09.21 um 08:55 schrieb Sasha Neftin:
Please use imperative mood in the commit message summary: Fix ?. Maybe:
e1000e: Fix packet loss on Tiger Lake and later
Quoted 2 lines
Update the HW MAC initialization flow. Do not gate DMA clock from the modPHY block. Keeping this clock will prevent drop packets sent
dropped
Quoted 1 line
in burst mode on the Kumeran interface.
What is Kumeran?
Where is the new HW MAC initialization flow documented? The spec or some errata?
How can the bug be reproduced?
Quoted 23 lines
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213651
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213377Fixes bc7f75fa9788 ("New pci-express e1000 driver");Signed-off-by Sasha Neftin <[email protected]>--- drivers/net/ethernet/intel/e1000e/ich8lan.c | 11 ++++++++++- drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-)drivers/net/ethernet/intel/e1000e/ich8lan.c +1
-1@@ -4813,7 +4813,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)static s32 e1000_init_hw_ich8lan (struct e1000_hw *hw) {struct e1000_mac_info *mac = &hw->mac; -u32 ctrl_ext, txdctl, snoop; +u32 ctrl_ext, txdctl, snoop, fflt_dbg;s32 ret_val;u16 i;
drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) · line 4875
Quoted 4 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +1
-0@@ -4872,6 +4872,15 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) snoop = (u32 )~(PCIE_NO_SNOOP_ALL );e1000e_set_pcie_no_snoop (hw, snoop); +/* Enable workaround for packet loss issue on TGP PCH
Maybe:
drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) · line 4879
Quoted 6 lines
Work around packet loss issue on TGP PCH and later
drivers/net/ethernet/intel/e1000e/ich8lan.c +4
-0+* Do not gate DMA clock from the modPHY block +*/ +if (mac->type >= e1000_pch_tgp) { + fflt_dbg =er32 (FFLT_DBG );
Maybe the variable ctrl_ext could be renamed to tmp or tmp32, and reused.
Quoted 22 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +4
-0+ fflt_dbg |=E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK ; +ew32 (FFLT_DBG , fflt_dbg); + } + ctrl_ext =er32 (CTRL_EXT ); ctrl_ext |=E1000_CTRL_EXT_RO_DIS ;ew32 (CTRL_EXT , ctrl_ext);drivers/net/ethernet/intel/e1000e/ich8lan.h +3
-0@@ -289,6 +289,9 @@/* Proprietary Latency Tolerance Reporting PCI Capability */ #define E1000_PCI_LTR_CAP_LPT 0xA8 +/* Don't gate wake DMA clock */ +#define E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK 0x1000 +void e1000e_write_protect_nvm_ich8lan (struct e1000_hw *hw);void e1000e_set_kmrn_lock_loss_workaround_ich8lan (struct e1000_hw *hw,bool state);
PATCH 2/2 e1000e: Fixing packet loss issues on new platforms
Quoted 11 lines · Paul Menzel
Dear Sasha,
THank you for the patch.
Am 22.09.21 um 08:55 schrieb Sasha Neftin:
Please use imperative mood in the commit message summary: Fix ?. Maybe:
e1000e: Fix packet loss on Tiger Lake and later
Quoted 8 lines
Quoted 2 lines
Update the HW MAC initialization flow. Do not gate DMA clock from the modPHY block. Keeping this clock will prevent drop packets sent
dropped
Quoted 1 line
in burst mode on the Kumeran interface.
What is Kumeran?
interface to external Gigabit Ethernet PHY
Quoted 5 lines
Where is the new HW MAC initialization flow documented? The spec or some errata?
How can the bug be reproduced?
Described in bugzilla - please, make sure the burst traffic:
run commands:
tc qdisc add dev eno1 (lan device name) root netem delay 5 ms on client side iperf -s on server side
iperf -c server_IP -R on client side
Quoted 34 lines
Quoted 25 lines
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213651
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213377Fixes bc7f75fa9788 ("New pci-express e1000 driver");Signed-off-by Sasha Neftin <[email protected]>---
?drivers/net/ethernet/intel/e1000e/ich8lan.c| 11 ++++++++++- ?drivers/net/ethernet/intel/e1000e/ich8lan.h|? 3 +++ ? 2 files changed, 13 insertions(+), 1 deletion(-)drivers/net/ethernet/intel/e1000e/ich8lan.c +1
-1@@ -4813,7 +4813,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) ? static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) ? { ????? struct e1000_mac_info *mac = &hw->mac; -??? u32 ctrl_ext, txdctl, snoop; +??? u32 ctrl_ext, txdctl, snoop, fflt_dbg; ????? s32 ret_val; ????? u16 i;drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_init_hw_ich8lan(struct · line 4875
Quoted 4 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +1
-0@@ -4872,6 +4872,15 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) ????????? snoop = (u32)~(PCIE_NO_SNOOP_ALL); ????? e1000e_set_pcie_no_snoop(hw, snoop); +??? /* Enable workaround for packet loss issue on TGP PCHMaybe:
Quoted 1 line
Work around packet loss issue on TGP PCH and later
Quoted 7 lines
Quoted 4 lines
+???? * Do not gate DMA clock from the modPHY block +???? */
+??? if (mac->type>=e1000_pch_tgp) { +???????fflt_dbg=er32(FFLT_DBG);Maybe the variable
ctrl_extcould be renamed totmportmp32, and reused.
I prefer to stay with a meaningful name
Quoted 23 lines
Quoted 23 lines
+???????
fflt_dbg|=E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK; +???????ew32(FFLT_DBG, fflt_dbg);
+??? }
+
?????ctrl_ext=er32(CTRL_EXT);
?????ctrl_ext|=E1000_CTRL_EXT_RO_DIS;
?????ew32(CTRL_EXT, ctrl_ext);drivers/net/ethernet/intel/e1000e/ich8lan.h +0
-0@@ -289,6 +289,9 @@? /* Proprietary Latency Tolerance Reporting PCI Capability */ ? #define
E1000_PCI_LTR_CAP_LPT???????0xA8drivers/net/ethernet/intel/e1000e/ich8lan.h +3
-0+/* Don't gate wake DMA clock */ +#define E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK ??? 0x1000 +? void
e1000e_write_protect_nvm_ich8lan(struct e1000_hw *hw); ? voide1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw, ??????????????????????????? bool state);
PATCH 2/2 e1000e: Fixing packet loss issues on new platforms
Dear Sasha,
Am 22.09.21 um 09:30 schrieb Sasha Neftin:
Quoted 11 lines · Paul Menzel
Quoted 10 lines
Am 22.09.21 um 08:55 schrieb Sasha Neftin:
Please use imperative mood in the commit message summary: Fix ?. Maybe:
e1000e: Fix packet loss on Tiger Lake and later
Quoted 2 lines
Update the HW MAC initialization flow. Do not gate DMA clock from the modPHY block. Keeping this clock will prevent drop packets sent
Quoted 6 lines
Quoted 5 lines
dropped
Quoted 1 line
in burst mode on the Kumeran interface.
What is Kumeran?
interface to external Gigabit Ethernet PHY
Thank you. For somebody not having all names memorized, this would be good to know in my opinion.
Quoted 9 lines
Quoted 4 lines
Where is the new HW MAC initialization flow documented? The spec or some errata?
How can the bug be reproduced?
Described in bugzilla - please, make sure the burst traffic:
run commands:
tc qdisc add dev eno1 (lan device name) root netem delay 5 ms on client side iperf -s on server side
iperf -cserver_IP-R on client side
Thank you. In my opinion, reviewers should have this in the commit message, instead of reading through several comments in the Linux Bugzilla. Also, at least in #213651 the title and first comment talks about Intel ME (Management Engine).
Quoted 33 lines
Quoted 33 lines
Quoted 24 lines
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213651
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213377Fixes bc7f75fa9788 ("New pci-express e1000 driver");Signed-off-by Sasha Neftin <[email protected]>---
?drivers/net/ethernet/intel/e1000e/ich8lan.c| 11 ++++++++++- ?drivers/net/ethernet/intel/e1000e/ich8lan.h|? 3 +++ ? 2 files changed, 13 insertions(+), 1 deletion(-)drivers/net/ethernet/intel/e1000e/ich8lan.c +1
-1@@ -4813,7 +4813,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) ? static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) ? { ????? struct e1000_mac_info *mac = &hw->mac; -??? u32 ctrl_ext, txdctl, snoop; +??? u32 ctrl_ext, txdctl, snoop, fflt_dbg; ????? s32 ret_val; ????? u16 i;drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_init_hw_ich8lan(struct · line 4875
Quoted 4 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +1
-0@@ -4872,6 +4872,15 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) ????????? snoop = (u32)~(PCIE_NO_SNOOP_ALL); ????? e1000e_set_pcie_no_snoop(hw, snoop); +??? /* Enable workaround for packet loss issue on TGP PCHMaybe:
Quoted 1 line
Work around packet loss issue on TGP PCH and later
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
+???? * Do not gate DMA clock from the modPHY block +???? */
+??? if (mac->type>=e1000_pch_tgp) { +???????fflt_dbg=er32(FFLT_DBG);Maybe the variable
ctrl_extcould be renamed totmportmp32, and reused.I prefer to stay with a meaningful name
Understood. I know it?s personal preference.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
+???????
fflt_dbg|=E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK; +???????ew32(FFLT_DBG, fflt_dbg);
+??? }
+
?????ctrl_ext=er32(CTRL_EXT);
?????ctrl_ext|=E1000_CTRL_EXT_RO_DIS;
?????ew32(CTRL_EXT, ctrl_ext);drivers/net/ethernet/intel/e1000e/ich8lan.h +0
-0@@ -289,6 +289,9 @@? /* Proprietary Latency Tolerance Reporting PCI Capability */
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
? #define
E1000_PCI_LTR_CAP_LPT???????0xA8drivers/net/ethernet/intel/e1000e/ich8lan.h +3
-0+/* Don't gate wake DMA clock */ +#define E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK ??? 0x1000 +? void
e1000e_write_protect_nvm_ich8lan(struct e1000_hw *hw); ? voide1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw, ??????????????????????????? bool state);
Kind regards,
Paul
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 e1000e: Fixing packet loss issues on new platforms
Thanks Sasha,
Confirmed this fixes the problem on my X13 G2
Mark
Quoted 71 lines · Sasha Neftin
-------- Forwarded Message --------
Subject: [PATCH v1 2/2] e1000e: Fixing packet loss issues on new platforms
Date: Wed, 22 Sep 2021 09:55:42 +0300
From: Sasha Neftin <[email protected]>
To: intel-wired-lan at lists.osuosl.org
CC: Sasha Neftin <[email protected]>Update the HW MAC initialization flow. Do not gate DMA clock from the modPHY block. Keeping this clock will prevent drop packets sent in burst mode on the Kumeran interface.
Fixes bc7f75fa9788 ("New pci-express e1000 driver");Signed-off-by Sasha Neftin <[email protected]>--- ?drivers/net/ethernet/intel/e1000e/ich8lan.c | 11 ++++++++++-?drivers/net/ethernet/intel/e1000e/ich8lan.h |? 3 +++ ?2 files changed, 13 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +1
-1@@ -4813,7 +4813,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) ?static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) ?{ ???? struct e1000_mac_info *mac = &hw->mac; -??? u32 ctrl_ext, txdctl, snoop; +??? u32 ctrl_ext, txdctl, snoop, fflt_dbg; ???? s32 ret_val; ???? u16 i;?@@ -4872,6 +4872,15 @@ static s32 e1000_init_hw_ich8lan(struct
e1000_hw*hw)
???????? snoop = (u32)~(PCIE_NO_SNOOP_ALL);
????e1000e_set_pcie_no_snoop(hw, snoop);
?+??? /* Enable workaround for packet loss issue on TGP PCH
+???? * Do not gate DMA clock from the modPHY block +???? */
+??? if (mac->type>=e1000_pch_tgp) {
+???????fflt_dbg=er32(FFLT_DBG);
+???????fflt_dbg|=E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK; +???????ew32(FFLT_DBG, fflt_dbg);
+??? }drivers/net/ethernet/intel/e1000e/ich8lan.c +1
-0+ ???? ctrl_ext = er32(CTRL_EXT); ???? ctrl_ext |= E1000_CTRL_EXT_RO_DIS; ???? ew32(CTRL_EXT, ctrl_ext);drivers/net/ethernet/intel/e1000e/ich8lan.h +2
-0@@ -289,6 +289,9 @@ ?/* Proprietary Latency Tolerance Reporting PCI Capability */ ?#define E1000_PCI_LTR_CAP_LPT??????? 0xA8 ?+/* Don't gate wake DMA clock */ +#define E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK ??? 0x1000 + ?void e1000e_write_protect_nvm_ich8lan(struct e1000_hw *hw); ?void e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw, ?????????????????????????? bool state);
Kraus
PATCH 2/2 e1000e: Fixing packet loss issues on new platforms
In reply to Sasha NeftinQuoted 4 lines · Sasha Neftin
Update the HW MAC initialization flow. Do not gate DMA clock from the modPHY block. Keeping this clock will prevent drop packets sent in burst mode on the Kumeran interface.
Quoted 9 lines
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213651
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213377Fixes bc7f75fa9788 ("New pci-express e1000 driver");Signed-off-by Sasha Neftin <[email protected]>--- drivers/net/ethernet/intel/e1000e/ich8lan.c | 11 ++++++++++- drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-)