Message ID | 379f79687ca4a7d0394a04d14fb3890ce257e706.1706256158.git.esben@geanix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | net: stmmac: dwmac-imx: Time Based Scheduling support | expand |
On Fri Jan 26 2024, Esben Haabendal wrote: > TSO and TBS cannot coexist. For now we set i.MX Ethernet QOS controller to > use the first TX queue with TSO and the rest for TBS. > > TX queues with TBS can support etf qdisc hw offload. > > Signed-off-by: Esben Haabendal <esben@geanix.com> Thanks for fixing this, Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
On 26/01/2024 09:10, Esben Haabendal wrote: > TSO and TBS cannot coexist. For now we set i.MX Ethernet QOS controller to > use the first TX queue with TSO and the rest for TBS. > > TX queues with TBS can support etf qdisc hw offload. > > Signed-off-by: Esben Haabendal <esben@geanix.com> > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c > index 8f730ada71f9..6b65420e11b5 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c > @@ -353,6 +353,10 @@ static int imx_dwmac_probe(struct platform_device *pdev) > if (data->flags & STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY) > plat_dat->flags |= STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY; > > + /* Default TX Q0 to use TSO and rest TXQ for TBS */ > + for (int i = 1; i < plat_dat->tx_queues_to_use; i++) > + plat_dat->tx_queues_cfg[i].tbs_en = 1; > + > plat_dat->host_dma_width = dwmac->ops->addr_width; > plat_dat->init = imx_dwmac_init; > plat_dat->exit = imx_dwmac_exit; Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c index 8f730ada71f9..6b65420e11b5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c @@ -353,6 +353,10 @@ static int imx_dwmac_probe(struct platform_device *pdev) if (data->flags & STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY) plat_dat->flags |= STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY; + /* Default TX Q0 to use TSO and rest TXQ for TBS */ + for (int i = 1; i < plat_dat->tx_queues_to_use; i++) + plat_dat->tx_queues_cfg[i].tbs_en = 1; + plat_dat->host_dma_width = dwmac->ops->addr_width; plat_dat->init = imx_dwmac_init; plat_dat->exit = imx_dwmac_exit;
TSO and TBS cannot coexist. For now we set i.MX Ethernet QOS controller to use the first TX queue with TSO and the rest for TBS. TX queues with TBS can support etf qdisc hw offload. Signed-off-by: Esben Haabendal <esben@geanix.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 4 ++++ 1 file changed, 4 insertions(+)