netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Teoh <htmldeveloper@gmail.com>
To: Jon Zhou <Jon.Zhou@jdsu.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"kernelnewbies@kernelnewbies.org"
	<kernelnewbies@kernelnewbies.org>
Subject: Re: CPU instruction to calculate tcp checksum and udp integrity?
Date: Thu, 26 May 2011 10:57:28 +0800	[thread overview]
Message-ID: <BANLkTimtRFFNWthCN1ziLtuNvFYAi0WHGg@mail.gmail.com> (raw)
In-Reply-To: <4A6A2125329CFD4D8CC40C9E8ABCAB9F250D8894E6@MILEXCH2.ds.jdsu.net>

In net/ipv4/tcp_ipv4.c:

/* This routine computes an IPv4 TCP checksum. */
void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb)
{
        struct inet_sock *inet = inet_sk(sk);

        __tcp_v4_send_check(skb, inet->inet_saddr, inet->inet_daddr);
}
EXPORT_SYMBOL(tcp_v4_send_check);


On Mon, May 23, 2011 at 11:26 PM, Jon Zhou <Jon.Zhou@jdsu.com> wrote:
> hi
> now I am using sw to calculate the tcp checksum, is there CPU(nehalem)
> instruction or NIC /kernel API to do such thing?
>
> thanks a lot
> jon
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>



-- 
Regards,
Peter Teoh

      reply	other threads:[~2011-05-26  2:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 15:26 CPU instruction to calculate tcp checksum and udp integrity? Jon Zhou
2011-05-26  2:57 ` Peter Teoh [this message]

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=BANLkTimtRFFNWthCN1ziLtuNvFYAi0WHGg@mail.gmail.com \
    --to=htmldeveloper@gmail.com \
    --cc=Jon.Zhou@jdsu.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --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).