• Wei Fang's avatar
    net: fec: recycle pages for transmitted XDP frames · 20f79739
    Wei Fang authored
    Once the XDP frames have been successfully transmitted through the
    ndo_xdp_xmit() interface, it's the driver responsibility to free
    the frames so that the page_pool can recycle the pages and reuse
    them. However, this action is not implemented in the fec driver.
    This leads to a user-visible problem that the console will print
    the following warning log.
    
    [  157.568851] page_pool_release_retry() stalled pool shutdown 1389 inflight 60 sec
    [  217.983446] page_pool_release_retry() stalled pool shutdown 1389 inflight 120 sec
    [  278.399006] page_pool_release_retry() stalled pool shutdown 1389 inflight 181 sec
    [  338.812885] page_pool_release_retry() stalled pool shutdown 1389 inflight 241 sec
    [  399.226946] page_pool_release_retry() stalled pool shutdown 1389 inflight 302 sec
    
    Therefore, to solve this issue, we free XDP frames via xdp_return_frame()
    while cleaning the tx BD ring.
    
    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>
    20f79739
fec_main.c 122 KB