Skip to content
  • Jose Abreu's avatar
    net: stmmac: Prevent RX starvation in stmmac_napi_poll() · fa0be0a4
    Jose Abreu authored
    
    
    Currently, TX is given a budget which is consumed by stmmac_tx_clean()
    and stmmac_rx() is given the remaining non-consumed budget.
    
    This is wrong and in case we are sending a large number of packets this
    can starve RX because remaining budget will be low.
    
    Let's give always the same budget for RX and TX clean.
    
    While at it, check if we missed any interrupts while we were in NAPI
    callback by looking at DMA interrupt status.
    
    Cc: Joao Pinto <jpinto@synopsys.com>
    Cc: David S. Miller <davem@davemloft.net>
    Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
    Cc: Alexandre Torgue <alexandre.torgue@st.com>
    Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    fa0be0a4