mmcly
November 15, 2022, 3:27am
1
Hi, nvidia team:
In our custom board, we use XFI to port with Marvell 88Q6113 switch for eth1. we use RGMII connect with YT8531S phy for eth0.
when we want to modify ring buffer size of eth* with cmd “ethtool -G eth1 rx 4096”
the systom said: “cannot get device ring settings: Operation not support”
so my question is does the ethernet driver support ringbuffer?
if the driver do not support ringbuffer ,how the driver handle input data from ethernet in low level driver?
maybe there are other method to handle the data and what is the exact param ?
jetpack: 5.0.2
Try to set that in device tree.
diff --git a/kernel-dts/tegra234-soc/tegra234-soc-eqos.dtsi b/kernel-dts/tegra234-soc/tegra234-soc-eqos.dtsi
index cbe344e..43e0419 100644
--- a/kernel-dts/tegra234-soc/tegra234-soc-eqos.dtsi
+++ b/kernel-dts/tegra234-soc/tegra234-soc-eqos.dtsi
@@ -129,5 +129,7 @@
pinctrl-names = "mii_rx_disable", "mii_rx_enable";
pinctrl-0 = <&eqos_mii_rx_input_state_disable>;
pinctrl-1 = <&eqos_mii_rx_input_state_enable>;
+ nvidia,dma_rx_ring_sz = <1024>;
+ nvidia,dma_tx_ring_sz = <1024>;
};
};
diff --git a/kernel-dts/tegra234-soc/tegra234-soc-mgbe.dtsi b/kernel-dts/tegra234-soc/tegra234-soc-mgbe.dtsi
index 20d343a..0a242dc 100644
--- a/kernel-dts/tegra234-soc/tegra234-soc-mgbe.dtsi
+++ b/kernel-dts/tegra234-soc/tegra234-soc-mgbe.dtsi
@@ -116,6 +116,8 @@
nvidia,ptp_ref_clock_speed = <312500000>;
nvidia,instance_id = <0>; /* MGBE0 instance */
nvidia,ptp-rx-queue = <3>;
+ nvidia,dma_rx_ring_sz = <4096>;
+ nvidia,dma_tx_ring_sz = <4096>;
};
ethernet@6910000 {
@@ -186,6 +188,8 @@
nvidia,ptp_ref_clock_speed = <312500000>;
nvidia,instance_id = <1>; /* MGBE1 instance */
nvidia,ptp-rx-queue = <3>;
+ nvidia,dma_rx_ring_sz = <4096>;
+ nvidia,dma_tx_ring_sz = <4096>;
};
ethernet@6A10000 {
@@ -256,6 +260,8 @@
nvidia,ptp_ref_clock_speed = <312500000>;
nvidia,instance_id = <2>; /* MGBE2 instance */
nvidia,ptp-rx-queue = <3>;
+ nvidia,dma_rx_ring_sz = <4096>;
+ nvidia,dma_tx_ring_sz = <4096>;
};
ethernet@6B10000 {
@@ -326,5 +332,7 @@
nvidia,ptp_ref_clock_speed = <312500000>;
nvidia,instance_id = <3>; /* MGBE3 instance */
nvidia,ptp-rx-queue = <3>;
+ nvidia,dma_rx_ring_sz = <4096>;
+ nvidia,dma_tx_ring_sz = <4096>;
};
};
mmcly
November 15, 2022, 4:04pm
4
ok thank you. another question is , how can I verify the change take effect ?
mmcly
November 16, 2022, 3:36am
5
hi, @WayneWWW .
I have try the patch and but I still can not set ringbuffer via ethtool.
by the way, I didn’t see any code to parse this device tree attribute.
Hi,
Sorry that I just notice this version of jetpack does not have kernel logic to parse the ring size in dtb. It will be added in next release.
mmcly
November 16, 2022, 7:19am
7
so for now, how can I fix this issus.
change OSI_MGBE_MAX_NUM_CHANS
or rx_buf_len
?
mmcly
November 18, 2022, 3:30am
8
@WayneWWW any update about this problem?