From: Tom Herbert <therbert@google.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH net-next v3 0/4] ip: Support checksum returned in csmg
Date: Mon, 5 Jan 2015 13:56:13 -0800 [thread overview]
Message-ID: <1420494977-15026-1-git-send-email-therbert@google.com> (raw)
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 (4):
ip: Move checksum convert defines to inet
ip: IP cmsg cleanup
ip: Add offset parameter to ip_cmsg_recv
ip: Add offset parameter to ip_cmsg_recv
include/linux/udp.h | 16 +------
include/net/inet_sock.h | 29 ++++++++++++-
include/net/ip.h | 7 +++-
include/uapi/linux/in.h | 1 +
net/ipv4/fou.c | 2 +-
net/ipv4/ip_sockglue.c | 108 +++++++++++++++++++++++++++++++++++-------------
net/ipv4/udp.c | 4 +-
net/ipv4/udp_tunnel.c | 2 +-
net/ipv6/udp.c | 2 +-
9 files changed, 120 insertions(+), 51 deletions(-)
--
2.2.0.rc0.207.ga3a616c
next reply other threads:[~2015-01-05 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 21:56 Tom Herbert [this message]
2015-01-05 21:56 ` [PATCH net-next v3 1/4] ip: Move checksum convert defines to inet Tom Herbert
2015-01-05 21:56 ` [PATCH net-next v3 3/4] ip: Add offset parameter to ip_cmsg_recv Tom Herbert
2015-01-05 21:56 ` [PATCH net-next v3 4/4] " Tom Herbert
2015-01-06 3:47 ` [PATCH net-next v3 0/4] ip: Support checksum returned in csmg David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1420494977-15026-1-git-send-email-therbert@google.com \
--to=therbert@google.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).