1. 14 Jun, 2021 18 commits
  2. 13 Jun, 2021 17 commits
  3. 12 Jun, 2021 5 commits
    • David S. Miller's avatar
      Merge branch 'rmnet-checksums-part-2' · ffbbc5e5
      David S. Miller authored
      Alex Elder says:
      
      ====================
      net: qualcomm: rmnet: MAPv4 download checksum cleanup, part 2
      
      This is part 2 of a large series that reworks some code that handles
      downloaded packets when MAPv4 checksum offload is enabled.  The
      first part, which includes an overview, is here:
        https://lore.kernel.org/netdev/20210611190529.3085813-1-elder@linaro.org/
      
      This second part of the series completes the simplification of this
      handling code, removing unnecessary byte swaps and bitwise inversions
      of checksum values, and along the way avoids the need for almost all
      of the forced type casts.  The checksum field in an RMNet download
      trailer is given __sum16_t type to accurately reflect the meaning of
      that field.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ffbbc5e5
    • Alex Elder's avatar
      net: qualcomm: rmnet: IPv6 payload length is simple · 185a108f
      Alex Elder authored
      We don't support any extension headers for IPv6 packets.  Extension
      headers therefore contribute 0 bytes to the payload length.  As a
      result we can just use the IPv6 payload length as the length used to
      compute the pseudo header checksum for both UDP and TCP messages.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      185a108f
    • Alex Elder's avatar
      net: qualcomm: rmnet: drop some unary NOTs · 411a795e
      Alex Elder authored
      We compare a payload checksum with a pseudo checksum value for
      equality in rmnet_map_ipv4_dl_csum_trailer().  Both of those values
      are computed with a unary NOT (~) operation.  The result of the
      comparison is the same if we omit that NOT for both values.
      
      Remove these operations in rmnet_map_ipv6_dl_csum_trailer() also.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      411a795e
    • Alex Elder's avatar
      net: qualcomm: rmnet: trailer value is a checksum · be754f64
      Alex Elder authored
      The csum_value field in the rmnet_map_dl_csum_trailer structure is a
      "real" Internet checksum.  It is a 16 bit value, in big endian format,
      which represents an inverted ones' complement sum over pairs of bytes.
      
      Make that clear by changing its type to __sum16.
      
      This makes a typecast in rmnet_map_ipv4_dl_csum_trailer() and
      another in rmnet_map_ipv6_dl_csum_trailer() unnecessary.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be754f64
    • Alex Elder's avatar
      net: qualcomm: rmnet: remove unneeded code · 698aa6c4
      Alex Elder authored
      The previous patch makes rmnet_map_ipv4_dl_csum_trailer() return
      early with an error if it is determined that the computed checksum
      for the IP payload does not match what was expected.
      
      If the computed checksum *does* match the expected value, the IP
      payload (i.e., the transport message), can be considered good.
      There is no need to do any further processing of the message.
      
      This means a big block of code is unnecessary for validating the
      transport checksum value, and can be removed.
      
      Make comparable changes in rmnet_map_ipv6_dl_csum_trailer().
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      698aa6c4