netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: jdmason@us.ibm.com
Cc: netdev@oss.sgi.com, niv@us.ibm.com, habanero@us.ibm.com
Subject: Re: Interdomain/interpartition communication without a checksum
Date: Mon, 16 May 2005 13:07:37 -0700 (PDT)	[thread overview]
Message-ID: <20050516.130737.77060495.davem@davemloft.net> (raw)
In-Reply-To: <20050511183554.GA28298@us.ibm.com>

From: Jon Mason <jdmason@us.ibm.com>
Date: Wed, 11 May 2005 13:35:54 -0500

> I have been working on a Xen project to remove unnecessary TCP/UDP
> checksums for local (interdomain) communication, while still having the
> checksum for all external network communication.  

I have no objections to this idea.  But let's think about
the implementation.

> +	/* If packet is forwarded to a device that needs a checksum and not 
> +	 * checksummed, correct the pointers and enable checksumming in the 
> +	 * next function.
> +	 */
> +	if (!(dev->features & NETIF_F_FWD_NO_CSUM) && skb->csum) {
> +		skb->ip_summed = CHECKSUM_HW;
> +		skb->h.raw = (void *)skb->nh.iph + (skb->nh.iph->ihl * 4);
> +	}
> +

This means that every packet which the networking tries to checksum
offload will pass this test, superfluously doing these assignments.

It also assumes ipv4.  ipv6 is possible, and for NETIF_F_CHECKSUM_HW
any protocol could be creating the packets as this flag indicates
that the card implements a totally generic 16-bit two's complement
checksum.

  reply	other threads:[~2005-05-16 20:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-11 18:35 Interdomain/interpartition communication without a checksum Jon Mason
2005-05-16 20:07 ` David S. Miller [this message]
2005-05-17 16:34   ` Jon Mason
2005-05-25 22:39     ` David S. 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=20050516.130737.77060495.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=habanero@us.ibm.com \
    --cc=jdmason@us.ibm.com \
    --cc=netdev@oss.sgi.com \
    --cc=niv@us.ibm.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).