arm64: dts: imx8mp-evk: configure multiple queues on eqos
Subsystems (6)
PATCH 1/2 arm64: dts: imx8mp-evk: configure multiple queues on eqos
Eqos ethernet support five queues on hardware, enable these queues and configure the priority of each queue.
--- arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 41 ++++++++++++++++++++ 1 file changed, 41 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-evk.dts +41 -0
@@ -86,6 +86,9 @@ pinctrl-0 = <&pinctrl_eqos>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + snps,force_thresh_dma_mode; + snps,mtl-tx-config = <&mtl_tx_setup>; + snps,mtl-rx-config = <&mtl_rx_setup>; status = "okay"; mdio {
@@ -99,6 +102,44 @@ eee-broken-1000t; }; }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <5>; + queue0 { + snps,priority = <0x0>; + }; + queue1 { + snps,priority = <0x1>; + }; + queue2 { + snps,priority = <0x2>; + }; + queue3 { + snps,priority = <0x3>; + }; + queue4 { + snps,priority = <0x4>; + }; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <5>; + queue0 { + snps,priority = <0x0>; + }; + queue1 { + snps,priority = <0x1>; + }; + queue2 { + snps,priority = <0x2>; + }; + queue3 { + snps,priority = <0x3>; + }; + queue4 { + snps,priority = <0x4>; + }; + }; }; &fec {
Signature · 1 line
2.17.1
PATCH 2/2 net: stmmac: make stmmac-tx-timeout configurable in Kconfig
stmmac_tx_timeout() function is called when a queue transmission timeout. When Strict Priority is used as scheduling algorithms, the lower priority queue may be blocked by a higher prority queue, which will lead to tx timeout. We don't want to enable the tx watchdog timeout in this case. Therefore, this patch make stmmac-tx-timeout configurable.
This patch set the CONFIG_STMMAC_TX_TIMEOUT by default when STMMAC_ETH is selected. If anyone want to disable the tx watchdog timeout of stmmac, he can unset the CONFIG_STMMAC_TX_TIMEOUT in menuconfig.
--- drivers/net/ethernet/stmicro/stmmac/Kconfig | 12 ++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++ 2 files changed, 16 insertions(+)
drivers/net/ethernet/stmicro/stmmac/Kconfig +12 -0
@@ -271,4 +271,16 @@ config STMMAC_PCI If you have a controller with this interface, say Y or M here. If unsure, say N. + +config STMMAC_TX_TIMEOUT + bool "STMMAC TX timeout support" + default STMMAC_ETH + depends on STMMAC_ETH + help + Support for TX timeout enable on stmmac. + + This selects the TX watchdog timeout support for stmmac driver. The + feature is enabled by default when STMMAC_ETH is selected. If you + want to disable the TX watchdog timeout feature, say N here. + endif
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +4 -0
@@ -5421,6 +5421,7 @@ static int stmmac_napi_poll_rxtx(struct napi_struct *napi, int budget)return min (rxtx_done, budget -1 ); } +#ifdef CONFIG_STMMAC_TX_TIMEOUT /** * stmmac_tx_timeout * @dev : Pointer to net device structure
@@ -5436,6 +5437,7 @@ static void stmmac_tx_timeout(struct net_device *dev, unsigned int txqueue) stmmac_global_err(priv); } +#endif /** * stmmac_set_rx_mode - entry point for multicast addressing
@@ -6632,7 +6634,9 @@ static const struct net_device_ops stmmac_netdev_ops = { .ndo_fix_features = stmmac_fix_features, .ndo_set_features = stmmac_set_features, .ndo_set_rx_mode = stmmac_set_rx_mode, +#ifdef CONFIG_STMMAC_TX_TIMEOUT .ndo_tx_timeout = stmmac_tx_timeout, +#endif .ndo_eth_ioctl = stmmac_ioctl, .ndo_setup_tc = stmmac_setup_tc, .ndo_select_queue = stmmac_select_queue,
Signature · 1 line
2.17.1
Sorry, this patch is missing the net-next prefix and series description,please reject it. I sent a new one.
Quoted 70 lines
Eqos ethernet support five queues on hardware, enable these queues and configure the priority of each queue.
Signed-off-by Xiaoliang Yang <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 41 ++++++++++++++++++++ 1 file changed, 41 insertions(+)arch/arm64/boot/dts/freescale/imx8mp-evk.dts +41
-1@@ -86,6 +86,9 @@ pinctrl-0 = <&pinctrl_eqos>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + snps,force_thresh_dma_mode; + snps,mtl-tx-config = <&mtl_tx_setup>; + snps,mtl-rx-config = <&mtl_rx_setup>; status = "okay"; mdio {@@ -99,6 +102,44 @@ eee-broken-1000t; }; }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <5>; + queue0 { + snps,priority = <0x0>; + }; + queue1 { + snps,priority = <0x1>; + }; + queue2 { + snps,priority = <0x2>; + }; + queue3 { + snps,priority = <0x3>; + }; + queue4 { + snps,priority = <0x4>; + }; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <5>; + queue0 { + snps,priority = <0x0>; + }; + queue1 { + snps,priority = <0x1>; + }; + queue2 { + snps,priority = <0x2>; + }; + queue3 { + snps,priority = <0x3>; + }; + queue4 { + snps,priority = <0x4>; + }; + }; }; &fec { --
Quoted 1 line
2.17.1
Thanks,
Xiaoliang