* [PATCH net] net: enetc: make sure all traffic classes can send large frames
@ 2021-10-20 17:33 Vladimir Oltean
2021-10-21 9:37 ` Claudiu Manoil
2021-10-21 15:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Oltean @ 2021-10-20 17:33 UTC (permalink / raw)
To: netdev, Jakub Kicinski, David S. Miller
Cc: Claudiu Manoil, Richie Pearn, Camelia Groza, Po Liu
The enetc driver does not implement .ndo_change_mtu, instead it
configures the MAC register field PTC{Traffic Class}MSDUR[MAXSDU]
statically to a large value during probe time.
The driver used to configure only the max SDU for traffic class 0, and
that was fine while the driver could only use traffic class 0. But with
the introduction of mqprio, sending a large frame into any other TC than
0 is broken.
This patch fixes that by replicating per traffic class the static
configuration done in enetc_configure_port_mac().
Fixes: cbe9e835946f ("enetc: Enable TC offloading with mqprio")
Reported-by: Richie Pearn <richard.pearn@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/net/ethernet/freescale/enetc/enetc_pf.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
index ead2b93bf614..64f92770691f 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
@@ -517,10 +517,13 @@ static void enetc_port_si_configure(struct enetc_si *si)
static void enetc_configure_port_mac(struct enetc_hw *hw)
{
+ int tc;
+
enetc_port_wr(hw, ENETC_PM0_MAXFRM,
ENETC_SET_MAXFRM(ENETC_RX_MAXFRM_SIZE));
- enetc_port_wr(hw, ENETC_PTCMSDUR(0), ENETC_MAC_MAXFRM_SIZE);
+ for (tc = 0; tc < 8; tc++)
+ enetc_port_wr(hw, ENETC_PTCMSDUR(tc), ENETC_MAC_MAXFRM_SIZE);
enetc_port_wr(hw, ENETC_PM0_CMD_CFG, ENETC_PM0_CMD_PHY_TX_EN |
ENETC_PM0_CMD_TXP | ENETC_PM0_PROMISC);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH net] net: enetc: make sure all traffic classes can send large frames
2021-10-20 17:33 [PATCH net] net: enetc: make sure all traffic classes can send large frames Vladimir Oltean
@ 2021-10-21 9:37 ` Claudiu Manoil
2021-10-21 15:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Claudiu Manoil @ 2021-10-21 9:37 UTC (permalink / raw)
To: Vladimir Oltean, netdev@vger.kernel.org, Jakub Kicinski,
David S. Miller
Cc: Richie Pearn, Camelia Alexandra Groza, Po Liu
> -----Original Message-----
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> Sent: Wednesday, October 20, 2021 8:34 PM
[...]
> Subject: [PATCH net] net: enetc: make sure all traffic classes can send large
> frames
>
> The enetc driver does not implement .ndo_change_mtu, instead it
> configures the MAC register field PTC{Traffic Class}MSDUR[MAXSDU]
> statically to a large value during probe time.
>
> The driver used to configure only the max SDU for traffic class 0, and
> that was fine while the driver could only use traffic class 0. But with
> the introduction of mqprio, sending a large frame into any other TC than
> 0 is broken.
>
> This patch fixes that by replicating per traffic class the static
> configuration done in enetc_configure_port_mac().
>
> Fixes: cbe9e835946f ("enetc: Enable TC offloading with mqprio")
> Reported-by: Richie Pearn <richard.pearn@nxp.com>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
Reviewed-by: <Claudiu Manoil <claudiu.manoil@nxp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: enetc: make sure all traffic classes can send large frames
2021-10-20 17:33 [PATCH net] net: enetc: make sure all traffic classes can send large frames Vladimir Oltean
2021-10-21 9:37 ` Claudiu Manoil
@ 2021-10-21 15:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-21 15:10 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, kuba, davem, claudiu.manoil, richard.pearn, camelia.groza,
po.liu
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 20 Oct 2021 20:33:40 +0300 you wrote:
> The enetc driver does not implement .ndo_change_mtu, instead it
> configures the MAC register field PTC{Traffic Class}MSDUR[MAXSDU]
> statically to a large value during probe time.
>
> The driver used to configure only the max SDU for traffic class 0, and
> that was fine while the driver could only use traffic class 0. But with
> the introduction of mqprio, sending a large frame into any other TC than
> 0 is broken.
>
> [...]
Here is the summary with links:
- [net] net: enetc: make sure all traffic classes can send large frames
https://git.kernel.org/netdev/net/c/e378f4967c8e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-21 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-20 17:33 [PATCH net] net: enetc: make sure all traffic classes can send large frames Vladimir Oltean
2021-10-21 9:37 ` Claudiu Manoil
2021-10-21 15:10 ` patchwork-bot+netdevbpf
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.