Skip to content
  • Eric Dumazet's avatar
    IPoIB: fix skb truesize underestimatiom · b28ba726
    Eric Dumazet authored
    
    
    Or Gerlitz reported triggering of WARN_ON_ONCE(delta < len); in
    skb_try_coalesce()
    This warning tracks drivers that incorrectly set skb->truesize
    
    IPoIB indeed allocates a full page to store a fragment, but only
    accounts in skb->truesize the used part of the page (frame length)
    
    This patch fixes skb truesize underestimation, and
    also fixes a performance issue, because RX skbs have not enough tailroom
    to allow IP and TCP stacks to pull their header in skb linear part
    without an expensive call to pskb_expand_head()
    
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Reported-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
    Cc: Erez Shitrit <erezsh@mellanox.com>
    Cc: Shlomo Pongartz <shlomop@mellanox.com>
    Cc: Roland Dreier <roland@purestorage.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b28ba726