Re: [PATCH net] net: lan966x: Stop replacing tx dcbs and dcbs_buf when changing MTU
From: patchwork-bot+netdevbpf
Date: Tue Oct 25 2022 - 00:10:34 EST
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@xxxxxxxxxx>:
On Fri, 21 Oct 2022 11:07:11 +0200 you wrote:
> When a frame is sent using FDMA, the skb is mapped and then the mapped
> address is given to an tx dcb that is different than the last used tx
> dcb. Once the HW finish with this frame, it would generate an interrupt
> and then the dcb can be reused and memory can be freed. For each dcb
> there is an dcb buf that contains some meta-data(is used by PTP, is
> it free). There is 1 to 1 relationship between dcb and dcb_buf.
> The following issue was observed. That sometimes after changing the MTU
> to allocate new tx dcbs and dcbs_buf, two frames were not
> transmitted. The frames were not transmitted because when reloading the
> tx dcbs, it was always presuming to use the first dcb but that was not
> always happening. Because it could be that the last tx dcb used before
> changing MTU was first dcb and then when it tried to get the next dcb it
> would take dcb 1 instead of 0. Because it is supposed to take a
> different dcb than the last used one. This can be fixed simply by
> changing tx->last_in_use to -1 when the fdma is disabled to reload the
> new dcb and dcbs_buff.
> But there could be a different issue. For example, right after the frame
> is sent, the MTU is changed. Now all the dcbs and dcbs_buf will be
> cleared. And now get the interrupt from HW that it finished with the
> frame. So when we try to clear the skb, it is not possible because we
> lost all the dcbs_buf.
> The solution here is to stop replacing the tx dcbs and dcbs_buf when
> changing MTU because the TX doesn't care what is the MTU size, it is
> only the RX that needs this information.
>
> [...]
Here is the summary with links:
- [net] net: lan966x: Stop replacing tx dcbs and dcbs_buf when changing MTU
https://git.kernel.org/netdev/net/c/4a4b6848d1e9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html