Skip to content
  • Saeed Mahameed's avatar
    net/mlx5e: Support NETIF_F_SG · 12be4b21
    Saeed Mahameed authored
    
    
    When NETIF_F_SG is set, each send WQE may have a different size since
    each skb can have different number of fragments as of LSO header etc.
    
    This implies that a given WQE may wrap around the send queue, i.e begin
    at its end and continue at its start. While it is legal by the device spec,
    we preferred a solution that avoids it - when building of current WQE is
    done, if the next WQE may wrap around the send queue, fill the send queue
    with NOPs WQEs till its end, so that the next WQE will begin at send queue
    start.
    
    NOP WQE for itself cannot wrap around the send queue since it is of
    minimal size - 64 bytes, and all send WQEs are a multiple of that size.
    
    Signed-off-by: default avatarAchiad Shochat <achiad@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    12be4b21