• David Arinzon's avatar
    net: ena: Add more information on TX timeouts · 071271f3
    David Arinzon authored
    The function responsible for polling TX completions might not receive
    the CPU resources it needs due to higher priority tasks running on the
    requested core.
    
    The driver might not be able to recognize such cases, but it can use its
    state to suspect that they happened. If both conditions are met:
    
    - napi hasn't been executed more than the TX completion timeout value
    - napi is scheduled (meaning that we've received an interrupt)
    
    Then it's more likely that the napi handler isn't scheduled because of
    an overloaded CPU.
    It was decided that for this case, the driver would wait twice as long
    as the regular timeout before scheduling a reset.
    The driver uses ENA_REGS_RESET_SUSPECTED_POLL_STARVATION reset reason to
    indicate this case to the device.
    
    This patch also adds more information to the ena_tx_timeout() callback.
    This function is called by the kernel when it detects that a specific TX
    queue has been closed for too long.
    Signed-off-by: default avatarShay Agroskin <shayagr@amazon.com>
    Signed-off-by: default avatarDavid Arinzon <darinzon@amazon.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    071271f3
ena_regs_defs.h 6.41 KB