• Wei Fang's avatar
    net: fec: use netdev_err_once() instead of netdev_err() · 84a10947
    Wei Fang authored
    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: 6d6b39f1 ("net: fec: add initial XDP support")
    Signed-off-by: default avatarWei Fang <wei.fang@nxp.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    84a10947
fec_main.c 122 KB