From: sudeep list <sudeep.list@gmail.com>
To: netdev@oss.sgi.com
Subject: turning off tcp checksums.
Date: Fri, 28 Jan 2005 10:59:31 -0700 [thread overview]
Message-ID: <d50018af05012809595096dafe@mail.gmail.com> (raw)
hello,
I am trying to conduct some throughput experiments using a modified
TcP/IP stack. One of the things that I would like to do is to turn off
the TcP checksum. The idea is that the application computes its own
checksum, and having tcp duplicate the effort with a weaker checksum
doesnt make sense. This still leaves the tcp header without any
checksum, but since this is a lab environment, I hope to get away with
it for now :-)
I guess this means, modifying the tcp egress path, tcp ingress, and
turning off the hardware checksum capability on the two ends. I think
I have figured out how to change the egress path, but have no clue
about the ingress path.
egress path
------------------
Modify the tcp_ioctl function in net/ipv4/tcp.c to add a command that
sets the value of sk->sk_route_caps = NETIF_F_NO_CSUM
This shall result in the following code path being executed in the
tcp_sendmsg function.
.
.
841 if (sk->sk_route_caps &
843 (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM |
844 NETIF_F_HW_CSUM))
845 skb->ip_summed = CHECKSUM_HW;
..
which (I hope) shall result in turning off the checksum calculation in
downstream code.
Ingress Path
-------------------
On this path, I saw that its the driver routines that set the value of
skb->ip_summed. I guess I could also change my driver routine to set
the ip_summed value to CHECKSUM_HW but that appears too rash.
1) I suspect it will also turn off the ip header checksum
2) Its only for *some* sockets in my stack that I want to turn off the
checksum, not all.
may be I can find out the socket that the skb is destined for, and if
its for "my" socket I could set the value appropriately, but that
appears too ugly (and inefficient ?).
How do I go about doing this ? Does my tcp_sendmsg modification make
sense or are there better ways of doing this ?
regards
Sudeep
next reply other threads:[~2005-01-28 17:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-28 17:59 sudeep list [this message]
2005-01-28 18:10 ` turning off tcp checksums Stephen Hemminger
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=d50018af05012809595096dafe@mail.gmail.com \
--to=sudeep.list@gmail.com \
--cc=netdev@oss.sgi.com \
/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).