From: Martijn van Oosterhout <kleptog@svana.org>
To: Mandeep Sandhu <Mandeep_Sandhu@infosys.com>
Cc: dima@s2io.com, Jeff Garzik <jgarzik@pobox.com>,
linux-newbie@vger.kernel.org, linux-net@vger.kernel.org,
linux-kernel@vger.kernel.org,
kernelnewbies <kernelnewbies@nl.linux.org>
Subject: Re: zero copy issue while receiving the data (counter part of sendfil e)
Date: Wed, 22 Dec 2004 16:50:05 +0100 [thread overview]
Message-ID: <20041222155003.GA29278@svana.org> (raw)
In-Reply-To: <1103703718.3775.93.camel@samish.india.ascend.com>
[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]
On Wed, Dec 22, 2004 at 01:51:58PM +0530, Mandeep Sandhu wrote:
> On Wed, 2004-12-22 at 01:13, Dmitry Yusupov wrote:
> > indeed :)
> > another words if you have modern NIC than you get "zero-copy"(except
> > copy_to_user()) for free :)
> what does "checksum on rx" mean??? Don't most of the NIC's support
> DMA-ing to mem on rx-ing a packet? so what does "zero-copy for free"
> mean here?
It's if the network card will check the checksums of the packets on
receiving. If it doesn't, the main CPU needs to read every byte in the
packet to calculate the checksum itself. If the CPU is doing that
anyway you can copy it elsewhere for free.
Generally, reading from memory takes time because the CPU has to wait,
writing is free since it can be deferred in the cache (in theory
indefinitly) until there's free cycle.
In other words, if the card isn't checksumming but does DMA you're not
really saving any time over a manual copy.
Hope this helps,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2004-12-22 15:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-21 16:35 zero copy issue while receiving the data (counter part of sen dfil e) Rajat Jain, Noida
2004-12-21 17:22 ` Dmitry Yusupov
2004-12-21 19:30 ` Jeff Garzik
2004-12-21 19:43 ` Dmitry Yusupov
2004-12-22 8:21 ` zero copy issue while receiving the data (counter part of sendfil e) Mandeep Sandhu
2004-12-22 15:50 ` Martijn van Oosterhout [this message]
2004-12-22 16:06 ` John W. Linville
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=20041222155003.GA29278@svana.org \
--to=kleptog@svana.org \
--cc=Mandeep_Sandhu@infosys.com \
--cc=dima@s2io.com \
--cc=jgarzik@pobox.com \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
--cc=linux-newbie@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