• T
    net: Infrastructure for checksum unnecessary conversions · d96535a1
    Tom Herbert 提交于
    For normal path, added skb_checksum_try_convert which is called
    to attempt to convert CHECKSUM_UNNECESSARY to CHECKSUM_COMPLETE. The
    primary condition to allow this is that ip_summed is CHECKSUM_NONE
    and csum_valid is true, which will be the state after consuming
    a CHECKSUM_UNNECESSARY.
    
    For GRO path, added skb_gro_checksum_try_convert which is the GRO
    analogue of skb_checksum_try_convert. The primary condition to allow
    this is that NAPI_GRO_CB(skb)->csum_cnt == 0 and
    NAPI_GRO_CB(skb)->csum_valid is set. This implies that we have consumed
    all available CHECKSUM_UNNECESSARY checksums in the GRO path.
    Signed-off-by: NTom Herbert <therbert@google.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    d96535a1
skbuff.h 91.3 KB