public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: fec: remove the xdp_return_frame when lack of tx BDs
@ 2023-05-12 13:38 Shenwei Wang
  2023-05-12 13:57 ` Horatiu Vultur
  2023-05-15  7:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Shenwei Wang @ 2023-05-12 13:38 UTC (permalink / raw)
  To: Wei Fang, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Shenwei Wang, Clark Wang, NXP Linux Team, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend,
	Alexander Lobakin, Horatiu Vultur, Simon Horman, netdev,
	linux-kernel, imx

In the implementation, the sent_frame count does not increment when
transmit errors occur. Therefore, bq_xmit_all() will take care of
returning the XDP frames.

Fixes: 26312c685ae0 ("net: fec: correct the counting of XDP sent frames")
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 42ec6ca3bf03..2a3e8b69b70a 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3798,7 +3798,6 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
 	entries_free = fec_enet_get_free_txdesc_num(txq);
 	if (entries_free < MAX_SKB_FRAGS + 1) {
 		netdev_err(fep->netdev, "NOT enough BD for SG!\n");
-		xdp_return_frame(frame);
 		return NETDEV_TX_BUSY;
 	}

--
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: fec: remove the xdp_return_frame when lack of tx BDs
  2023-05-12 13:38 [PATCH net] net: fec: remove the xdp_return_frame when lack of tx BDs Shenwei Wang
@ 2023-05-12 13:57 ` Horatiu Vultur
  2023-05-15  7:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Horatiu Vultur @ 2023-05-12 13:57 UTC (permalink / raw)
  To: Shenwei Wang
  Cc: Wei Fang, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Clark Wang, NXP Linux Team, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend,
	Alexander Lobakin, Simon Horman, netdev, linux-kernel, imx

The 05/12/2023 08:38, Shenwei Wang wrote:
> 
> In the implementation, the sent_frame count does not increment when
> transmit errors occur. Therefore, bq_xmit_all() will take care of
> returning the XDP frames.

Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>

> 
> Fixes: 26312c685ae0 ("net: fec: correct the counting of XDP sent frames")
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 42ec6ca3bf03..2a3e8b69b70a 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -3798,7 +3798,6 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
>         entries_free = fec_enet_get_free_txdesc_num(txq);
>         if (entries_free < MAX_SKB_FRAGS + 1) {
>                 netdev_err(fep->netdev, "NOT enough BD for SG!\n");
> -               xdp_return_frame(frame);
>                 return NETDEV_TX_BUSY;
>         }
> 
> --
> 2.34.1
> 
> 

-- 
/Horatiu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: fec: remove the xdp_return_frame when lack of tx BDs
  2023-05-12 13:38 [PATCH net] net: fec: remove the xdp_return_frame when lack of tx BDs Shenwei Wang
  2023-05-12 13:57 ` Horatiu Vultur
@ 2023-05-15  7:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-15  7:50 UTC (permalink / raw)
  To: Shenwei Wang
  Cc: wei.fang, davem, edumazet, kuba, pabeni, xiaoning.wang, linux-imx,
	ast, daniel, hawk, john.fastabend, alexandr.lobakin,
	horatiu.vultur, horms, netdev, linux-kernel, imx

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 12 May 2023 08:38:43 -0500 you wrote:
> In the implementation, the sent_frame count does not increment when
> transmit errors occur. Therefore, bq_xmit_all() will take care of
> returning the XDP frames.
> 
> Fixes: 26312c685ae0 ("net: fec: correct the counting of XDP sent frames")
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> 
> [...]

Here is the summary with links:
  - [net] net: fec: remove the xdp_return_frame when lack of tx BDs
    https://git.kernel.org/netdev/net/c/6ead9c98cafc

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:[~2023-05-15  7:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12 13:38 [PATCH net] net: fec: remove the xdp_return_frame when lack of tx BDs Shenwei Wang
2023-05-12 13:57 ` Horatiu Vultur
2023-05-15  7:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox