All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-02-18 22:10 ` Carlos de Paula
  0 siblings, 0 replies; 14+ messages in thread
From: Carlos de Paula @ 2020-02-18 22:10 UTC (permalink / raw)
  Cc: papadakospan, jose.abreu, Carlos de Paula, Rob Herring,
	Mark Rutland, Heiko Stuebner, Robin Murphy, Jonas Karlman,
	Peter Geis, Katsuhiro Suzuki, Johan Jonker, Philipp Tomsich,
	Christoph Muellner, Enric Balletbo i Serra, Daniel Lezcano,
	devicetree, linux-arm-kernel, linux-rockchip, linux-kernel

Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
where tx checksumming does not work with packets larger than 1498.

The default Programmable Buffer Length for TX in these GMAC's is
not suitable for MTUs higher than 1498. The workaround is to disable
TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
impacts as it disables hardware checksumming.

This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
the most popular MTU value of 1500.

For reference, see https://lkml.org/lkml/2019/4/1/1382.

Signed-off-by: Carlos de Paula <me@carlosedp.com>
---
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
 2 files changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index 1f53ead52c7f..b7f1de4b7fd0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -906,6 +906,7 @@
 		resets = <&cru SRST_GMAC2IO_A>;
 		reset-names = "stmmaceth";
 		rockchip,grf = <&grf>;
+		snps,txpbl = <0x4>;
 		status = "disabled";
 	};
 
@@ -913,6 +914,7 @@
 		compatible = "rockchip,rk3328-gmac";
 		reg = <0x0 0xff550000 0x0 0x10000>;
 		rockchip,grf = <&grf>;
+		snps,txpbl = <0x4>;
 		interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 		interrupt-names = "macirq";
 		clocks = <&cru SCLK_MAC2PHY_SRC>, <&cru SCLK_MAC2PHY_RXTX>,
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 33cc21fcf4c1..cd5415d7e559 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -288,6 +288,7 @@
 		resets = <&cru SRST_A_GMAC>;
 		reset-names = "stmmaceth";
 		rockchip,grf = <&grf>;
+		snps,txpbl = <0x4>;
 		status = "disabled";
 	};
 
-- 
2.20.1


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

* [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-02-18 22:10 ` Carlos de Paula
  0 siblings, 0 replies; 14+ messages in thread
From: Carlos de Paula @ 2020-02-18 22:10 UTC (permalink / raw)
  Cc: papadakospan-Re5JQEeQqe8AvxtiuMwx3w,
	jose.abreu-HKixBCOQz3hWk0Htik3J/w, Carlos de Paula, Rob Herring,
	Mark Rutland, Heiko Stuebner, Robin Murphy, Jonas Karlman,
	Peter Geis, Katsuhiro Suzuki, Johan Jonker, Philipp Tomsich,
	Christoph Muellner, Enric Balletbo i Serra, Daniel Lezcano,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
where tx checksumming does not work with packets larger than 1498.

The default Programmable Buffer Length for TX in these GMAC's is
not suitable for MTUs higher than 1498. The workaround is to disable
TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
impacts as it disables hardware checksumming.

This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
the most popular MTU value of 1500.

For reference, see https://lkml.org/lkml/2019/4/1/1382.

Signed-off-by: Carlos de Paula <me-FwFLQrstKkX3oGB3hsPCZA@public.gmane.org>
---
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
 2 files changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index 1f53ead52c7f..b7f1de4b7fd0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -906,6 +906,7 @@
 		resets = <&cru SRST_GMAC2IO_A>;
 		reset-names = "stmmaceth";
 		rockchip,grf = <&grf>;
+		snps,txpbl = <0x4>;
 		status = "disabled";
 	};
 
@@ -913,6 +914,7 @@
 		compatible = "rockchip,rk3328-gmac";
 		reg = <0x0 0xff550000 0x0 0x10000>;
 		rockchip,grf = <&grf>;
+		snps,txpbl = <0x4>;
 		interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 		interrupt-names = "macirq";
 		clocks = <&cru SCLK_MAC2PHY_SRC>, <&cru SCLK_MAC2PHY_RXTX>,
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 33cc21fcf4c1..cd5415d7e559 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -288,6 +288,7 @@
 		resets = <&cru SRST_A_GMAC>;
 		reset-names = "stmmaceth";
 		rockchip,grf = <&grf>;
+		snps,txpbl = <0x4>;
 		status = "disabled";
 	};
 
-- 
2.20.1

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

* [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-02-18 22:10 ` Carlos de Paula
  0 siblings, 0 replies; 14+ messages in thread
From: Carlos de Paula @ 2020-02-18 22:10 UTC (permalink / raw)
  Cc: jose.abreu, Mark Rutland, Carlos de Paula, Heiko Stuebner,
	Jonas Karlman, Katsuhiro Suzuki, Daniel Lezcano, linux-kernel,
	linux-rockchip, devicetree, Rob Herring, linux-arm-kernel,
	Peter Geis, Enric Balletbo i Serra, Johan Jonker,
	Philipp Tomsich, Robin Murphy, papadakospan, Christoph Muellner

Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
where tx checksumming does not work with packets larger than 1498.

The default Programmable Buffer Length for TX in these GMAC's is
not suitable for MTUs higher than 1498. The workaround is to disable
TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
impacts as it disables hardware checksumming.

This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
the most popular MTU value of 1500.

For reference, see https://lkml.org/lkml/2019/4/1/1382.

Signed-off-by: Carlos de Paula <me@carlosedp.com>
---
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
 2 files changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index 1f53ead52c7f..b7f1de4b7fd0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -906,6 +906,7 @@
 		resets = <&cru SRST_GMAC2IO_A>;
 		reset-names = "stmmaceth";
 		rockchip,grf = <&grf>;
+		snps,txpbl = <0x4>;
 		status = "disabled";
 	};
 
@@ -913,6 +914,7 @@
 		compatible = "rockchip,rk3328-gmac";
 		reg = <0x0 0xff550000 0x0 0x10000>;
 		rockchip,grf = <&grf>;
+		snps,txpbl = <0x4>;
 		interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 		interrupt-names = "macirq";
 		clocks = <&cru SCLK_MAC2PHY_SRC>, <&cru SCLK_MAC2PHY_RXTX>,
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 33cc21fcf4c1..cd5415d7e559 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -288,6 +288,7 @@
 		resets = <&cru SRST_A_GMAC>;
 		reset-names = "stmmaceth";
 		rockchip,grf = <&grf>;
+		snps,txpbl = <0x4>;
 		status = "disabled";
 	};
 
-- 
2.20.1


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

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

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-03-01  0:25   ` Heiko Stuebner
  0 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2020-03-01  0:25 UTC (permalink / raw)
  To: Carlos de Paula
  Cc: papadakospan, jose.abreu, Rob Herring, Mark Rutland,
	Robin Murphy, Jonas Karlman, Peter Geis, Katsuhiro Suzuki,
	Johan Jonker, Philipp Tomsich, Christoph Muellner,
	Enric Balletbo i Serra, Daniel Lezcano, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

Am Dienstag, 18. Februar 2020, 23:10:37 CET schrieb Carlos de Paula:
> Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
> where tx checksumming does not work with packets larger than 1498.
> 
> The default Programmable Buffer Length for TX in these GMAC's is
> not suitable for MTUs higher than 1498. The workaround is to disable
> TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
> impacts as it disables hardware checksumming.
> 
> This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
> the most popular MTU value of 1500.
> 
> For reference, see https://lkml.org/lkml/2019/4/1/1382.
> 
> Signed-off-by: Carlos de Paula <me@carlosedp.com>

applied for 5.7

Thanks
Heiko



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

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-03-01  0:25   ` Heiko Stuebner
  0 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2020-03-01  0:25 UTC (permalink / raw)
  To: Carlos de Paula
  Cc: papadakospan-Re5JQEeQqe8AvxtiuMwx3w,
	jose.abreu-HKixBCOQz3hWk0Htik3J/w, Rob Herring, Mark Rutland,
	Robin Murphy, Jonas Karlman, Peter Geis, Katsuhiro Suzuki,
	Johan Jonker, Philipp Tomsich, Christoph Muellner,
	Enric Balletbo i Serra, Daniel Lezcano,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Am Dienstag, 18. Februar 2020, 23:10:37 CET schrieb Carlos de Paula:
> Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
> where tx checksumming does not work with packets larger than 1498.
> 
> The default Programmable Buffer Length for TX in these GMAC's is
> not suitable for MTUs higher than 1498. The workaround is to disable
> TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
> impacts as it disables hardware checksumming.
> 
> This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
> the most popular MTU value of 1500.
> 
> For reference, see https://lkml.org/lkml/2019/4/1/1382.
> 
> Signed-off-by: Carlos de Paula <me-FwFLQrstKkX3oGB3hsPCZA@public.gmane.org>

applied for 5.7

Thanks
Heiko

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

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-03-01  0:25   ` Heiko Stuebner
  0 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2020-03-01  0:25 UTC (permalink / raw)
  To: Carlos de Paula
  Cc: jose.abreu, Mark Rutland, Jonas Karlman, Katsuhiro Suzuki,
	Daniel Lezcano, linux-kernel, linux-rockchip, devicetree,
	Rob Herring, linux-arm-kernel, Peter Geis,
	Enric Balletbo i Serra, Johan Jonker, Philipp Tomsich,
	Robin Murphy, papadakospan, Christoph Muellner

Am Dienstag, 18. Februar 2020, 23:10:37 CET schrieb Carlos de Paula:
> Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
> where tx checksumming does not work with packets larger than 1498.
> 
> The default Programmable Buffer Length for TX in these GMAC's is
> not suitable for MTUs higher than 1498. The workaround is to disable
> TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
> impacts as it disables hardware checksumming.
> 
> This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
> the most popular MTU value of 1500.
> 
> For reference, see https://lkml.org/lkml/2019/4/1/1382.
> 
> Signed-off-by: Carlos de Paula <me@carlosedp.com>

applied for 5.7

Thanks
Heiko



_______________________________________________
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] 14+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
  2020-03-01  0:25   ` Heiko Stuebner
  (?)
@ 2020-03-01  2:06     ` Leonidas P.
  -1 siblings, 0 replies; 14+ messages in thread
From: Leonidas P. @ 2020-03-01  2:06 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Carlos de Paula, jose.abreu, Rob Herring, Mark Rutland,
	Robin Murphy, Jonas Karlman, Peter Geis, Katsuhiro Suzuki,
	Johan Jonker, Philipp Tomsich, Christoph Muellner,
	Enric Balletbo i Serra, Daniel Lezcano, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel


I am also in favor of this but I think we should remove the line that 
specifies the txpbl in the rk3328-roc-cc.dts gmac2io since it will get 
applied here in the .dtsi



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

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-03-01  2:06     ` Leonidas P.
  0 siblings, 0 replies; 14+ messages in thread
From: Leonidas P. @ 2020-03-01  2:06 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Carlos de Paula, jose.abreu-HKixBCOQz3hWk0Htik3J/w, Rob Herring,
	Mark Rutland, Robin Murphy, Jonas Karlman, Peter Geis,
	Katsuhiro Suzuki, Johan Jonker, Philipp Tomsich,
	Christoph Muellner, Enric Balletbo i Serra, Daniel Lezcano,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA


I am also in favor of this but I think we should remove the line that 
specifies the txpbl in the rk3328-roc-cc.dts gmac2io since it will get 
applied here in the .dtsi

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

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-03-01  2:06     ` Leonidas P.
  0 siblings, 0 replies; 14+ messages in thread
From: Leonidas P. @ 2020-03-01  2:06 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: jose.abreu, Mark Rutland, Carlos de Paula, Jonas Karlman,
	Katsuhiro Suzuki, Daniel Lezcano, linux-kernel, linux-rockchip,
	devicetree, Rob Herring, Peter Geis, Enric Balletbo i Serra,
	Johan Jonker, Philipp Tomsich, Robin Murphy, linux-arm-kernel,
	Christoph Muellner


I am also in favor of this but I think we should remove the line that 
specifies the txpbl in the rk3328-roc-cc.dts gmac2io since it will get 
applied here in the .dtsi



_______________________________________________
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] 14+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
  2020-02-18 22:10 ` Carlos de Paula
@ 2020-03-01  8:22   ` Daniel Lezcano
  -1 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2020-03-01  8:22 UTC (permalink / raw)
  To: Carlos de Paula
  Cc: papadakospan, jose.abreu, Rob Herring, Mark Rutland,
	Heiko Stuebner, Robin Murphy, Jonas Karlman, Peter Geis,
	Katsuhiro Suzuki, Johan Jonker, Philipp Tomsich,
	Christoph Muellner, Enric Balletbo i Serra, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

On 18/02/2020 23:10, Carlos de Paula wrote:
> Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
> where tx checksumming does not work with packets larger than 1498.
> 
> The default Programmable Buffer Length for TX in these GMAC's is
> not suitable for MTUs higher than 1498. The workaround is to disable
> TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
> impacts as it disables hardware checksumming.
> 
> This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
> the most popular MTU value of 1500.

I don't know what this option says, why not specify a mtu in the DT?

The hardware limitation will be more clear, no?

> For reference, see https://lkml.org/lkml/2019/4/1/1382.
> 
> Signed-off-by: Carlos de Paula <me@carlosedp.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> index 1f53ead52c7f..b7f1de4b7fd0 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> @@ -906,6 +906,7 @@
>  		resets = <&cru SRST_GMAC2IO_A>;
>  		reset-names = "stmmaceth";
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		status = "disabled";
>  	};
>  
> @@ -913,6 +914,7 @@
>  		compatible = "rockchip,rk3328-gmac";
>  		reg = <0x0 0xff550000 0x0 0x10000>;
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
>  		interrupt-names = "macirq";
>  		clocks = <&cru SCLK_MAC2PHY_SRC>, <&cru SCLK_MAC2PHY_RXTX>,
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 33cc21fcf4c1..cd5415d7e559 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -288,6 +288,7 @@
>  		resets = <&cru SRST_A_GMAC>;
>  		reset-names = "stmmaceth";
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		status = "disabled";
>  	};
>  
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-03-01  8:22   ` Daniel Lezcano
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2020-03-01  8:22 UTC (permalink / raw)
  To: Carlos de Paula
  Cc: jose.abreu, Mark Rutland, Heiko Stuebner, Jonas Karlman,
	Katsuhiro Suzuki, linux-kernel, linux-rockchip, devicetree,
	Rob Herring, linux-arm-kernel, Peter Geis,
	Enric Balletbo i Serra, Johan Jonker, Philipp Tomsich,
	Robin Murphy, papadakospan, Christoph Muellner

On 18/02/2020 23:10, Carlos de Paula wrote:
> Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
> where tx checksumming does not work with packets larger than 1498.
> 
> The default Programmable Buffer Length for TX in these GMAC's is
> not suitable for MTUs higher than 1498. The workaround is to disable
> TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
> impacts as it disables hardware checksumming.
> 
> This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
> the most popular MTU value of 1500.

I don't know what this option says, why not specify a mtu in the DT?

The hardware limitation will be more clear, no?

> For reference, see https://lkml.org/lkml/2019/4/1/1382.
> 
> Signed-off-by: Carlos de Paula <me@carlosedp.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> index 1f53ead52c7f..b7f1de4b7fd0 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> @@ -906,6 +906,7 @@
>  		resets = <&cru SRST_GMAC2IO_A>;
>  		reset-names = "stmmaceth";
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		status = "disabled";
>  	};
>  
> @@ -913,6 +914,7 @@
>  		compatible = "rockchip,rk3328-gmac";
>  		reg = <0x0 0xff550000 0x0 0x10000>;
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
>  		interrupt-names = "macirq";
>  		clocks = <&cru SCLK_MAC2PHY_SRC>, <&cru SCLK_MAC2PHY_RXTX>,
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 33cc21fcf4c1..cd5415d7e559 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -288,6 +288,7 @@
>  		resets = <&cru SRST_A_GMAC>;
>  		reset-names = "stmmaceth";
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		status = "disabled";
>  	};
>  
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
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] 14+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-03-01  9:02   ` Daniel Lezcano
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2020-03-01  9:02 UTC (permalink / raw)
  To: Carlos de Paula
  Cc: papadakospan, jose.abreu, Rob Herring, Mark Rutland,
	Heiko Stuebner, Robin Murphy, Jonas Karlman, Peter Geis,
	Katsuhiro Suzuki, Johan Jonker, Philipp Tomsich,
	Christoph Muellner, Enric Balletbo i Serra, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

On 18/02/2020 23:10, Carlos de Paula wrote:
> Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
> where tx checksumming does not work with packets larger than 1498.
> 
> The default Programmable Buffer Length for TX in these GMAC's is
> not suitable for MTUs higher than 1498. The workaround is to disable
> TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
> impacts as it disables hardware checksumming.
> 
> This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
> the most popular MTU value of 1500.

What about using something like:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt#n16

or

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/ethernet-controller.yaml#n37

?

> For reference, see https://lkml.org/lkml/2019/4/1/1382.
> 
> Signed-off-by: Carlos de Paula <me@carlosedp.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> index 1f53ead52c7f..b7f1de4b7fd0 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> @@ -906,6 +906,7 @@
>  		resets = <&cru SRST_GMAC2IO_A>;
>  		reset-names = "stmmaceth";
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		status = "disabled";
>  	};
>  
> @@ -913,6 +914,7 @@
>  		compatible = "rockchip,rk3328-gmac";
>  		reg = <0x0 0xff550000 0x0 0x10000>;
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
>  		interrupt-names = "macirq";
>  		clocks = <&cru SCLK_MAC2PHY_SRC>, <&cru SCLK_MAC2PHY_RXTX>,
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 33cc21fcf4c1..cd5415d7e559 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -288,6 +288,7 @@
>  		resets = <&cru SRST_A_GMAC>;
>  		reset-names = "stmmaceth";
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		status = "disabled";
>  	};
>  
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-03-01  9:02   ` Daniel Lezcano
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2020-03-01  9:02 UTC (permalink / raw)
  To: Carlos de Paula
  Cc: papadakospan-Re5JQEeQqe8AvxtiuMwx3w,
	jose.abreu-HKixBCOQz3hWk0Htik3J/w, Rob Herring, Mark Rutland,
	Heiko Stuebner, Robin Murphy, Jonas Karlman, Peter Geis,
	Katsuhiro Suzuki, Johan Jonker, Philipp Tomsich,
	Christoph Muellner, Enric Balletbo i Serra,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 18/02/2020 23:10, Carlos de Paula wrote:
> Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
> where tx checksumming does not work with packets larger than 1498.
> 
> The default Programmable Buffer Length for TX in these GMAC's is
> not suitable for MTUs higher than 1498. The workaround is to disable
> TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
> impacts as it disables hardware checksumming.
> 
> This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
> the most popular MTU value of 1500.

What about using something like:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt#n16

or

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/ethernet-controller.yaml#n37

?

> For reference, see https://lkml.org/lkml/2019/4/1/1382.
> 
> Signed-off-by: Carlos de Paula <me-FwFLQrstKkX3oGB3hsPCZA@public.gmane.org>
> ---
>  arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> index 1f53ead52c7f..b7f1de4b7fd0 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> @@ -906,6 +906,7 @@
>  		resets = <&cru SRST_GMAC2IO_A>;
>  		reset-names = "stmmaceth";
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		status = "disabled";
>  	};
>  
> @@ -913,6 +914,7 @@
>  		compatible = "rockchip,rk3328-gmac";
>  		reg = <0x0 0xff550000 0x0 0x10000>;
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
>  		interrupt-names = "macirq";
>  		clocks = <&cru SCLK_MAC2PHY_SRC>, <&cru SCLK_MAC2PHY_RXTX>,
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 33cc21fcf4c1..cd5415d7e559 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -288,6 +288,7 @@
>  		resets = <&cru SRST_A_GMAC>;
>  		reset-names = "stmmaceth";
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		status = "disabled";
>  	};
>  
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* Re: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
@ 2020-03-01  9:02   ` Daniel Lezcano
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2020-03-01  9:02 UTC (permalink / raw)
  To: Carlos de Paula
  Cc: jose.abreu, Mark Rutland, Heiko Stuebner, Jonas Karlman,
	Katsuhiro Suzuki, linux-kernel, linux-rockchip, devicetree,
	Rob Herring, linux-arm-kernel, Peter Geis,
	Enric Balletbo i Serra, Johan Jonker, Philipp Tomsich,
	Robin Murphy, papadakospan, Christoph Muellner

On 18/02/2020 23:10, Carlos de Paula wrote:
> Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
> where tx checksumming does not work with packets larger than 1498.
> 
> The default Programmable Buffer Length for TX in these GMAC's is
> not suitable for MTUs higher than 1498. The workaround is to disable
> TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
> impacts as it disables hardware checksumming.
> 
> This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
> the most popular MTU value of 1500.

What about using something like:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt#n16

or

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/ethernet-controller.yaml#n37

?

> For reference, see https://lkml.org/lkml/2019/4/1/1382.
> 
> Signed-off-by: Carlos de Paula <me@carlosedp.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> index 1f53ead52c7f..b7f1de4b7fd0 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> @@ -906,6 +906,7 @@
>  		resets = <&cru SRST_GMAC2IO_A>;
>  		reset-names = "stmmaceth";
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		status = "disabled";
>  	};
>  
> @@ -913,6 +914,7 @@
>  		compatible = "rockchip,rk3328-gmac";
>  		reg = <0x0 0xff550000 0x0 0x10000>;
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
>  		interrupt-names = "macirq";
>  		clocks = <&cru SCLK_MAC2PHY_SRC>, <&cru SCLK_MAC2PHY_RXTX>,
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 33cc21fcf4c1..cd5415d7e559 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -288,6 +288,7 @@
>  		resets = <&cru SRST_A_GMAC>;
>  		reset-names = "stmmaceth";
>  		rockchip,grf = <&grf>;
> +		snps,txpbl = <0x4>;
>  		status = "disabled";
>  	};
>  
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
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] 14+ messages in thread

end of thread, other threads:[~2020-03-01  9:03 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 22:10 [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328 Carlos de Paula
2020-02-18 22:10 ` Carlos de Paula
2020-02-18 22:10 ` Carlos de Paula
2020-03-01  0:25 ` Heiko Stuebner
2020-03-01  0:25   ` Heiko Stuebner
2020-03-01  0:25   ` Heiko Stuebner
2020-03-01  2:06   ` Leonidas P.
2020-03-01  2:06     ` Leonidas P.
2020-03-01  2:06     ` Leonidas P.
2020-03-01  8:22 ` Daniel Lezcano
2020-03-01  8:22   ` Daniel Lezcano
2020-03-01  9:02 ` Daniel Lezcano
2020-03-01  9:02   ` Daniel Lezcano
2020-03-01  9:02   ` Daniel Lezcano

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.