arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
Subsystems (2)
PATCH 1/1 arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
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.
--- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 + 2 files changed, 3 insertions(+)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +2 -0
@@ -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>,
arch/arm64/boot/dts/rockchip/rk3399.dtsi +1 -0
@@ -288,6 +288,7 @@ resets = <&cru SRST_A_GMAC>; reset-names = "stmmaceth"; rockchip,grf = <&grf>; + snps,txpbl = <0x4>; status = "disabled"; };
Signature · 1 line
2.20.1
Heiko Stuebner
maintainerAm Dienstag, 18. Februar 2020, 23:10:37 CET schrieb Carlos de Paula:
Quoted 8 lines
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.
Quoted 6 lines
This patch sets snps,txpbl to
0x4which 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 <[email protected]>
applied for 5.7
Thanks
Heiko
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
Quoted 10 lines · 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
0x4which 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?
Quoted 41 lines
For reference, see https://lkml.org/lkml/2019/4/1/1382.
Signed-off-by Carlos de Paula <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 + 2 files changed, 3 insertions(+)arch/arm64/boot/dts/rockchip/rk3328.dtsi +2
-0@@ -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>,arch/arm64/boot/dts/rockchip/rk3399.dtsi +1
-0@@ -288,6 +288,7 @@ resets = <&cru SRST_A_GMAC>; reset-names = "stmmaceth"; rockchip,grf = <&grf>; + snps,txpbl = <0x4>; status = "disabled"; };
Signature · 5 lines
<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
Quoted 10 lines · 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
0x4which is a safe number tested ok for the most popular MTU value of 1500.
What about using something like:
or
?
Quoted 41 lines
For reference, see https://lkml.org/lkml/2019/4/1/1382.
Signed-off-by Carlos de Paula <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 + 2 files changed, 3 insertions(+)arch/arm64/boot/dts/rockchip/rk3328.dtsi +2
-0@@ -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>,arch/arm64/boot/dts/rockchip/rk3399.dtsi +1
-0@@ -288,6 +288,7 @@ resets = <&cru SRST_A_GMAC>; reset-names = "stmmaceth"; rockchip,grf = <&grf>; + snps,txpbl = <0x4>; status = "disabled"; };
Signature · 5 lines
<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