1. 25 Aug, 2014 7 commits
    • David S. Miller's avatar
      Merge branch 'csums-next' · c1e60bd4
      David S. Miller authored
      Tom Herbert says:
      
      ====================
      net: Checksum offload changes - Part V
      
      I am working on overhauling RX checksum offload. Goals of this effort
      are:
      
      - Specify what exactly it means when driver returns CHECKSUM_UNNECESSARY
      - Preserve CHECKSUM_COMPLETE through encapsulation layers
      - Don't do skb_checksum more than once per packet
      - Unify GRO and non-GRO csum verification as much as possible
      - Unify the checksum functions (checksum_init)
      - Simplify code
      
      What is in this fifth patch set:
      
      - Added GRO checksum validation functions
      - Call the GRO validations functions from TCP and GRE gro_receive
      - Perform checksum verification in the UDP gro_receive path using
        GRO functions and add support for gro_receive in UDP6
      
      Changes in V2:
      
      - Change ip_summed to CHECKSUM_UNNECESSARY instead of moving it
        to CHECKSUM_COMPLETE from GRO checksum validation. This avoids
        performance penalty in checksumming bytes which are before the header
        GRO is at.
      
      Please review carefully and test if possible, mucking with basic
      checksum functions is always a little precarious :-)
      
      ----
      
      Test results with this patch set are below. I did not notice any
      performace regression.
      
      Tests run:
         TCP_STREAM: super_netperf with 200 streams
         TCP_RR: super_netperf with 200 streams and -r 1,1
      
      Device bnx2x (10Gbps):
         No GRE RSS hash (RX interrupts occur on one core)
         UDP RSS port hashing enabled.
      
      * GRE with checksum with IPv4 encapsulated packets
        With fix:
          TCP_STREAM
              9.91% CPU utilization
              5163.78 Mbps
          TCP_RR
              50.64% CPU utilization
              219/347/502 90/95/99% latencies
              834103 tps
        Without fix:
          TCP_STREAM
              10.05% CPU utilization
              5186.22 tps
          TCP_RR
              49.70% CPU utilization
              227/338/486 90/95/99% latencies
              813450 tps
      
      * GRE without checksum with IPv4 encapsulated packets
        With fix:
          TCP_STREAM
              10.18% CPU utilization
              5159 Mbps
          TCP_RR
              51.86% CPU utilization
              214/325/471 90/95/99% latencies
              865943 tps
        Without fix:
          TCP_STREAM
              10.26% CPU utilization
              5307.87 Mbps
          TCP_RR
              50.59% CPU utilization
              224/325/476 90/95/99% latencies
              846429 tps
      
      *** Simulate device returns CHECKSUM_COMPLETE
      
      * VXLAN with checksum
        With fix:
          TCP_STREAM
              13.03% CPU utilization
              9093.9 Mbps
          TCP_RR
              95.96% CPU utilization
              161/259/474 90/95/99% latencies
              1.14806e+06 tps
        Without fix:
          TCP_STREAM
              13.59% CPU utilization
              9093.97 Mbps
          TCP_RR
              93.95% CPU utilization
              160/259/484 90/95/99% latencies
              1.10262e+06 tps
      
      * VXLAN without checksum
        With fix:
          TCP_STREAM
              13.28% CPU utilization
              9093.87 Mbps
          TCP_RR
              95.04% CPU utilization
              155/246/439 90/95/99% latencies
              1.15e+06 tps
        Without fix:
          TCP_STREAM
              13.37% CPU utilization
              9178.45 Mbps
          TCP_RR
              93.74% CPU utilization
              161/257/469 90/95/99% latencies
              1.1068e+06 Mbps
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1e60bd4
    • Tom Herbert's avatar
      gre: When GRE csum is present count as encap layer wrt csum · 48a5fc77
      Tom Herbert authored
      In GRE demux if the GRE checksum pop rcv encapsulation so that any
      encapsulated checksums are treated as tunnel checksums.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48a5fc77
    • Tom Herbert's avatar
      udp: additional GRO support · 57c67ff4
      Tom Herbert authored
      Implement GRO for UDPv6. Add UDP checksum verification in gro_receive
      for both UDP4 and UDP6 calling skb_gro_checksum_validate_zero_check.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      57c67ff4
    • Tom Herbert's avatar
      tcp: Call skb_gro_checksum_validate · 149d0774
      Tom Herbert authored
      In tcp[64]_gro_receive call skb_gro_checksum_validate to validate TCP
      checksum in the gro context.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      149d0774
    • Tom Herbert's avatar
      758f75d1
    • Tom Herbert's avatar
      net: add gro_compute_pseudo functions · 1933a785
      Tom Herbert authored
      Add inet_gro_compute_pseudo and ip6_gro_compute_pseudo. These are
      the logical equivalents of inet_compute_pseudo and ip6_compute_pseudo
      for GRO path. The IP header is taken from skb_gro_network_header.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1933a785
    • Tom Herbert's avatar
      net: skb_gro_checksum_* functions · 573e8fca
      Tom Herbert authored
      Add skb_gro_checksum_validate, skb_gro_checksum_validate_zero_check,
      and skb_gro_checksum_simple_validate, and __skb_gro_checksum_complete.
      These are the cognates of the normal checksum functions but are used
      in the gro_receive path and operate on GRO related fields in sk_buffs.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      573e8fca
  2. 23 Aug, 2014 33 commits