Skip to content

Commit 84a1094

Browse files
WeiFang-NXPPaolo Abeni
authored andcommitted
net: fec: use netdev_err_once() instead of netdev_err()
In the case of heavy XDP traffic to be transmitted, the console will print the error log continuously if there are lack of enough BDs to accommodate the frames. The log looks like below. [ 160.013112] fec 30be0000.ethernet eth0: NOT enough BD for SG! [ 160.023116] fec 30be0000.ethernet eth0: NOT enough BD for SG! [ 160.028926] fec 30be0000.ethernet eth0: NOT enough BD for SG! [ 160.038946] fec 30be0000.ethernet eth0: NOT enough BD for SG! [ 160.044758] fec 30be0000.ethernet eth0: NOT enough BD for SG! Not only will this log be replicated and redundant, it will also degrade XDP performance. So we use netdev_err_once() instead of netdev_err() now. Fixes: 6d6b39f ("net: fec: add initial XDP support") Signed-off-by: Wei Fang <wei.fang@nxp.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 56b3c6b commit 84a1094

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3836,7 +3836,7 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
38363836

38373837
entries_free = fec_enet_get_free_txdesc_num(txq);
38383838
if (entries_free < MAX_SKB_FRAGS + 1) {
3839-
netdev_err(fep->netdev, "NOT enough BD for SG!\n");
3839+
netdev_err_once(fep->netdev, "NOT enough BD for SG!\n");
38403840
return -EBUSY;
38413841
}
38423842

0 commit comments

Comments
 (0)