• Shannon Nelson's avatar
    ionic: count SGs in packet to minimize linearize · 4d9d7220
    Shannon Nelson authored
    There are some cases where an skb carries more frags than the
    number of SGs that ionic can support per descriptor - this
    forces the driver to linearize the skb.  However, if this
    is a TSO packet that is going to become multiple descriptors
    (one per MTU-sized packet) and spread the frags across them,
    this time-consuming linearization is likely not necessary.
    
    We scan the frag list and count up the number of SGs that
    would be created for each descriptor that would be generated,
    and only linearize if we hit the SG limit on a descriptor.
    In most cases, we won't even get to the frag list scan, so
    this doesn't affect typical traffic.
    Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4d9d7220
ionic_txrx.c 34.6 KB