All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms
@ 2022-04-26  7:45 Tan Tee Min
  2022-04-26 13:58   ` Kurt Kanzenbach
  0 siblings, 1 reply; 7+ messages in thread
From: Tan Tee Min @ 2022-04-26  7:45 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
	Michael Sit Wei Hong, Xiaoliang Yang, Wong Vee Khee, Tan Tee Min,
	Ling Pei Lee, Bhupesh Sharma, Kurt Kanzenbach
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, stable,
	Voon Wei Feng, Song Yoong Siang, Ong, Boon Leong, Tan Tee Min

Based on DesignWare Ethernet QoS datasheet, we are seeing the limitation
of Split Header (SPH) feature is not supported for Ipv4 fragmented packet.
This SPH limitation will cause ping failure when the packets size exceed
the MTU size. For example, the issue happens once the basic ping packet
size is larger than the configured MTU size and the data is lost inside
the fragmented packet, replaced by zeros/corrupted values, and leads to
ping fail.

So, disable the Split Header for Intel platforms.

Cc: <stable@vger.kernel.org> # 5.10.x
Suggested-by: Ong, Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
Signed-off-by: Tan Tee Min <tee.min.tan@linux.intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
 include/linux/stmmac.h                            | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index 63754a9c4ba7..0b0be0898ac5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -454,6 +454,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
 	plat->has_gmac4 = 1;
 	plat->force_sf_dma_mode = 0;
 	plat->tso_en = 1;
+	plat->sph_disable = 1;
 
 	/* Multiplying factor to the clk_eee_i clock time
 	 * period to make it closer to 100 ns. This value
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 4a4b3651ab3e..2525a80353b7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7021,7 +7021,7 @@ int stmmac_dvr_probe(struct device *device,
 		dev_info(priv->device, "TSO feature enabled\n");
 	}
 
-	if (priv->dma_cap.sphen) {
+	if (priv->dma_cap.sphen && !priv->plat->sph_disable) {
 		ndev->hw_features |= NETIF_F_GRO;
 		priv->sph_cap = true;
 		priv->sph = priv->sph_cap;
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index 24eea1b05ca2..29917850f079 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -270,5 +270,6 @@ struct plat_stmmacenet_data {
 	int msi_rx_base_vec;
 	int msi_tx_base_vec;
 	bool use_phy_wol;
+	bool sph_disable;
 };
 #endif
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms
  2022-04-26  7:45 [PATCH net 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms Tan Tee Min
@ 2022-04-26 13:58   ` Kurt Kanzenbach
  0 siblings, 0 replies; 7+ messages in thread
From: Kurt Kanzenbach @ 2022-04-26 13:58 UTC (permalink / raw)
  To: Tan Tee Min, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
	Michael Sit Wei Hong, Xiaoliang Yang, Wong Vee Khee, Tan Tee Min,
	Ling Pei Lee, Bhupesh Sharma
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, stable,
	Voon Wei Feng, Song Yoong Siang, Ong, Boon Leong, Tan Tee Min

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

Hi,

On Tue Apr 26 2022, Tan Tee Min wrote:
> Based on DesignWare Ethernet QoS datasheet, we are seeing the limitation
> of Split Header (SPH) feature is not supported for Ipv4 fragmented packet.
> This SPH limitation will cause ping failure when the packets size exceed
> the MTU size. For example, the issue happens once the basic ping packet
> size is larger than the configured MTU size and the data is lost inside
> the fragmented packet, replaced by zeros/corrupted values, and leads to
> ping fail.
>
> So, disable the Split Header for Intel platforms.

Does this issue only apply on Intel platforms?

Thanks,
Kurt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms
@ 2022-04-26 13:58   ` Kurt Kanzenbach
  0 siblings, 0 replies; 7+ messages in thread
From: Kurt Kanzenbach @ 2022-04-26 13:58 UTC (permalink / raw)
  To: Tan Tee Min, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
	Michael Sit Wei Hong, Xiaoliang Yang, Wong Vee Khee, Tan Tee Min,
	Ling Pei Lee, Bhupesh Sharma
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, stable,
	Voon Wei Feng, Song Yoong Siang, Ong, Boon Leong, Tan Tee Min


[-- Attachment #1.1: Type: text/plain, Size: 622 bytes --]

Hi,

On Tue Apr 26 2022, Tan Tee Min wrote:
> Based on DesignWare Ethernet QoS datasheet, we are seeing the limitation
> of Split Header (SPH) feature is not supported for Ipv4 fragmented packet.
> This SPH limitation will cause ping failure when the packets size exceed
> the MTU size. For example, the issue happens once the basic ping packet
> size is larger than the configured MTU size and the data is lost inside
> the fragmented packet, replaced by zeros/corrupted values, and leads to
> ping fail.
>
> So, disable the Split Header for Intel platforms.

Does this issue only apply on Intel platforms?

Thanks,
Kurt

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms
  2022-04-26 13:58   ` Kurt Kanzenbach
@ 2022-04-28  1:55     ` Tan Tee Min
  -1 siblings, 0 replies; 7+ messages in thread
From: Tan Tee Min @ 2022-04-28  1:55 UTC (permalink / raw)
  To: Kurt Kanzenbach
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
	Michael Sit Wei Hong, Xiaoliang Yang, Wong Vee Khee,
	Ling Pei Lee, Bhupesh Sharma, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel, stable, Voon Wei Feng,
	Song Yoong Siang, Ong, Boon Leong, Tan Tee Min

On Tue, Apr 26, 2022 at 03:58:56PM +0200, Kurt Kanzenbach wrote:
> Hi,
> 
> On Tue Apr 26 2022, Tan Tee Min wrote:
> > Based on DesignWare Ethernet QoS datasheet, we are seeing the limitation
> > of Split Header (SPH) feature is not supported for Ipv4 fragmented packet.
> > This SPH limitation will cause ping failure when the packets size exceed
> > the MTU size. For example, the issue happens once the basic ping packet
> > size is larger than the configured MTU size and the data is lost inside
> > the fragmented packet, replaced by zeros/corrupted values, and leads to
> > ping fail.
> >
> > So, disable the Split Header for Intel platforms.
> 
> Does this issue only apply on Intel platforms?

According to Synopsys IP support, they have confirmed the header-payload
splitting for IPv4 fragmented packets is not supported for the Synopsys
Ether IPs.

Intel platforms are integrating with GMAC EQoS IP which is impacted by the
limitation above, so we are changing the default SPH setting to disabled
for Intel Platforms only.

If anyone can confirm on their platform also having the same issues,
then we would change the SPH default to disable across the IPs.

Thanks,
Tee Min


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms
@ 2022-04-28  1:55     ` Tan Tee Min
  0 siblings, 0 replies; 7+ messages in thread
From: Tan Tee Min @ 2022-04-28  1:55 UTC (permalink / raw)
  To: Kurt Kanzenbach
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
	Michael Sit Wei Hong, Xiaoliang Yang, Wong Vee Khee,
	Ling Pei Lee, Bhupesh Sharma, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel, stable, Voon Wei Feng,
	Song Yoong Siang, Ong, Boon Leong, Tan Tee Min

On Tue, Apr 26, 2022 at 03:58:56PM +0200, Kurt Kanzenbach wrote:
> Hi,
> 
> On Tue Apr 26 2022, Tan Tee Min wrote:
> > Based on DesignWare Ethernet QoS datasheet, we are seeing the limitation
> > of Split Header (SPH) feature is not supported for Ipv4 fragmented packet.
> > This SPH limitation will cause ping failure when the packets size exceed
> > the MTU size. For example, the issue happens once the basic ping packet
> > size is larger than the configured MTU size and the data is lost inside
> > the fragmented packet, replaced by zeros/corrupted values, and leads to
> > ping fail.
> >
> > So, disable the Split Header for Intel platforms.
> 
> Does this issue only apply on Intel platforms?

According to Synopsys IP support, they have confirmed the header-payload
splitting for IPv4 fragmented packets is not supported for the Synopsys
Ether IPs.

Intel platforms are integrating with GMAC EQoS IP which is impacted by the
limitation above, so we are changing the default SPH setting to disabled
for Intel Platforms only.

If anyone can confirm on their platform also having the same issues,
then we would change the SPH default to disable across the IPs.

Thanks,
Tee Min


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms
  2022-04-28  1:55     ` Tan Tee Min
@ 2022-04-28  7:05       ` Paolo Abeni
  -1 siblings, 0 replies; 7+ messages in thread
From: Paolo Abeni @ 2022-04-28  7:05 UTC (permalink / raw)
  To: Tan Tee Min, Kurt Kanzenbach
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin,
	Michael Sit Wei Hong, Xiaoliang Yang, Wong Vee Khee,
	Ling Pei Lee, Bhupesh Sharma, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel, stable, Voon Wei Feng,
	Song Yoong Siang, Ong, Boon Leong, Tan Tee Min

Hello,

On Thu, 2022-04-28 at 09:55 +0800, Tan Tee Min wrote:
> On Tue, Apr 26, 2022 at 03:58:56PM +0200, Kurt Kanzenbach wrote:
> > Hi,
> > 
> > On Tue Apr 26 2022, Tan Tee Min wrote:
> > > Based on DesignWare Ethernet QoS datasheet, we are seeing the limitation
> > > of Split Header (SPH) feature is not supported for Ipv4 fragmented packet.
> > > This SPH limitation will cause ping failure when the packets size exceed
> > > the MTU size. For example, the issue happens once the basic ping packet
> > > size is larger than the configured MTU size and the data is lost inside
> > > the fragmented packet, replaced by zeros/corrupted values, and leads to
> > > ping fail.
> > > 
> > > So, disable the Split Header for Intel platforms.
> > 
> > Does this issue only apply on Intel platforms?
> 
> According to Synopsys IP support, they have confirmed the header-payload
> splitting for IPv4 fragmented packets is not supported for the Synopsys
> Ether IPs.
> 
> Intel platforms are integrating with GMAC EQoS IP which is impacted by the
> limitation above, so we are changing the default SPH setting to disabled
> for Intel Platforms only.
> 
> If anyone can confirm on their platform also having the same issues,
> then we would change the SPH default to disable across the IPs.

Could you please provide a Fixes tag here? 

Thanks!

Paolo


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms
@ 2022-04-28  7:05       ` Paolo Abeni
  0 siblings, 0 replies; 7+ messages in thread
From: Paolo Abeni @ 2022-04-28  7:05 UTC (permalink / raw)
  To: Tan Tee Min, Kurt Kanzenbach
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin,
	Michael Sit Wei Hong, Xiaoliang Yang, Wong Vee Khee,
	Ling Pei Lee, Bhupesh Sharma, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel, stable, Voon Wei Feng,
	Song Yoong Siang, Ong, Boon Leong, Tan Tee Min

Hello,

On Thu, 2022-04-28 at 09:55 +0800, Tan Tee Min wrote:
> On Tue, Apr 26, 2022 at 03:58:56PM +0200, Kurt Kanzenbach wrote:
> > Hi,
> > 
> > On Tue Apr 26 2022, Tan Tee Min wrote:
> > > Based on DesignWare Ethernet QoS datasheet, we are seeing the limitation
> > > of Split Header (SPH) feature is not supported for Ipv4 fragmented packet.
> > > This SPH limitation will cause ping failure when the packets size exceed
> > > the MTU size. For example, the issue happens once the basic ping packet
> > > size is larger than the configured MTU size and the data is lost inside
> > > the fragmented packet, replaced by zeros/corrupted values, and leads to
> > > ping fail.
> > > 
> > > So, disable the Split Header for Intel platforms.
> > 
> > Does this issue only apply on Intel platforms?
> 
> According to Synopsys IP support, they have confirmed the header-payload
> splitting for IPv4 fragmented packets is not supported for the Synopsys
> Ether IPs.
> 
> Intel platforms are integrating with GMAC EQoS IP which is impacted by the
> limitation above, so we are changing the default SPH setting to disabled
> for Intel Platforms only.
> 
> If anyone can confirm on their platform also having the same issues,
> then we would change the SPH default to disable across the IPs.

Could you please provide a Fixes tag here? 

Thanks!

Paolo


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-28  7:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26  7:45 [PATCH net 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms Tan Tee Min
2022-04-26 13:58 ` Kurt Kanzenbach
2022-04-26 13:58   ` Kurt Kanzenbach
2022-04-28  1:55   ` Tan Tee Min
2022-04-28  1:55     ` Tan Tee Min
2022-04-28  7:05     ` Paolo Abeni
2022-04-28  7:05       ` Paolo Abeni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.