netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] ip: Support checksum returned in csmg
@ 2014-12-04  0:44 Tom Herbert
  2014-12-04  0:44 ` [PATCH net-next 1/3] ip: Move checksum convert defines to inet Tom Herbert
  2014-12-04  0:44 ` [PATCH net-next 3/3] ip: Add support for IP_CHECKSUM cmsg Tom Herbert
  0 siblings, 2 replies; 5+ messages in thread
From: Tom Herbert @ 2014-12-04  0:44 UTC (permalink / raw)
  To: davem, netdev

This patch set allows the packet checksum for a datagram socket
to be returned in csum data in recvmsg. This allows userspace
to implement its own checksum over the data, for instance if an
IP tunnel was be implemented in user space, the inner checksum
could be validated.

Changes in this patch set:
  - Move checksum conversion to inet_sock from udp_sock. This
    generalizes checksum conversion for use with other protocols.
  - Move IP cmsg constants to a header file and make processing
    of the flags more efficient in ip_cmsg_recv.
  - Return checksum value in cmsg. This is specifically the unfolded
    32 bit checksum of the full packet starting from the first byte
    returned in recvmsg.

Tested: Wrote a little server to get checksums in cmsg for UDP and
        verfied correct checksum is returned.

Tom Herbert (3):
  ip: Move checksum convert defines to inet
  ip: IP cmsg cleanup
  ip: Add support for IP_CHECKSUM cmsg

 include/linux/udp.h     | 16 +--------
 include/net/inet_sock.h | 27 ++++++++++++++
 include/uapi/linux/in.h |  1 +
 net/ipv4/fou.c          |  2 +-
 net/ipv4/ip_sockglue.c  | 96 +++++++++++++++++++++++++++++++++++--------------
 net/ipv4/udp.c          | 12 +++++--
 net/ipv4/udp_tunnel.c   |  2 +-
 net/ipv6/udp.c          |  2 +-
 8 files changed, 111 insertions(+), 47 deletions(-)

-- 
2.2.0.rc0.207.ga3a616c

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-05  1:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04  0:44 [PATCH net-next 0/3] ip: Support checksum returned in csmg Tom Herbert
2014-12-04  0:44 ` [PATCH net-next 1/3] ip: Move checksum convert defines to inet Tom Herbert
2014-12-04  0:44 ` [PATCH net-next 3/3] ip: Add support for IP_CHECKSUM cmsg Tom Herbert
2014-12-04  0:56   ` Eric Dumazet
2014-12-05  1:17   ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).