• Eugenia Emantayev's avatar
    net/mlx4_en: Add resilience in low memory systems · ec25bc04
    Eugenia Emantayev authored
    This patch fixes the lost of Ethernet port on low memory system,
    when driver frees its resources and fails to allocate new resources.
    Issue could happen while changing number of channels, rings size or
    changing the timestamp configuration.
    This fix is necessary because of removing vmap use in the code.
    When vmap was in use driver could allocate non-contiguous memory
    and make it contiguous with vmap. Now it could fail to allocate
    a large chunk of contiguous memory and lose the port.
    Current code tries to allocate new resources and then upon success
    frees the old resources.
    
    Fixes: 73898db0 ('net/mlx4: Avoid wrong virtual mappings')
    Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
    Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ec25bc04
en_ethtool.c 56.7 KB