Skip to content

Commit

Permalink
net: fec: remove the xdp_return_frame when lack of tx BDs
Browse files Browse the repository at this point in the history
[ Upstream commit 6ead9c9 ]

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: 26312c6 ("net: fec: correct the counting of XDP sent frames")
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Shenwei Wang authored and gregkh committed May 24, 2023
1 parent cb38e62 commit ac7106a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/ethernet/freescale/fec_main.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit ac7106a

Please sign in to comment.