1. 05 Jun, 2014 3 commits
    • Tom Herbert's avatar
      net: Support for multiple checksums with gso · 7e2b10c1
      Tom Herbert authored
      When creating a GSO packet segment we may need to set more than
      one checksum in the packet (for instance a TCP checksum and
      UDP checksum for VXLAN encapsulation). To be efficient, we want
      to do checksum calculation for any part of the packet at most once.
      
      This patch adds csum_start offset to skb_gso_cb. This tracks the
      starting offset for skb->csum which is initially set in skb_segment.
      When a protocol needs to compute a transport checksum it calls
      gso_make_checksum which computes the checksum value from the start
      of transport header to csum_start and then adds in skb->csum to get
      the full checksum. skb->csum and csum_start are then updated to reflect
      the checksum of the resultant packet starting from the transport header.
      
      This patch also adds a flag to skbuff, encap_hdr_csum, which is set
      in *gso_segment fucntions to indicate that a tunnel protocol needs
      checksum calculation
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7e2b10c1
    • Tom Herbert's avatar
      l2tp: call udp{6}_set_csum · 77157e19
      Tom Herbert authored
      Call common functions to set checksum for UDP tunnel.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77157e19
    • Tom Herbert's avatar
      udp: Generic functions to set checksum · af5fcba7
      Tom Herbert authored
      Added udp_set_csum and udp6_set_csum functions to set UDP checksums
      in packets. These are for simple UDP packets such as those that might
      be created in UDP tunnels.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      af5fcba7
  2. 04 Jun, 2014 32 commits
  3. 03 Jun, 2014 5 commits