* Half Duplex and Zero Copy IP
@ 2001-08-10 9:53 Subba Rao
2001-08-10 18:36 ` Andrew Morton
2001-08-10 18:46 ` Andi Kleen
0 siblings, 2 replies; 6+ messages in thread
From: Subba Rao @ 2001-08-10 9:53 UTC (permalink / raw)
To: Linux Kernel
Hello,
I have 2 3Com NICs on my system. They are 3c905C Tornado PCI cards.
The drivers are compiled into the kernel (Slackware 8.0 with kernel 2.4.7).
One of the interfaces will be used as a sniffer interface (without IP address)
and a very high traffic pipes. I do not wish to loose any packets coming to this
interface. Is it better if I initialize the interface in HALF DUPLEX mode? If yes,
how do I set the card to HALF DUPLEX mode? How can I find out the HW (NIC) settings
on the system?
Another question about 3Com NICs, do they perform zero-copy IP? I read that
the performance improves a lot WITHOUT zero-copy IP.
Thanks for any info.
--
Subba Rao
subba9@home.com
http://members.home.net/subba9/
GPG public key ID 27FC9217
Key fingerprint = 2B4C 498E 1860 5A2B 6570 5852 7527 882A 27FC 9217
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Half Duplex and Zero Copy IP
2001-08-10 9:53 Half Duplex and Zero Copy IP Subba Rao
@ 2001-08-10 18:36 ` Andrew Morton
2001-08-11 7:59 ` Subba Rao
2001-08-10 18:46 ` Andi Kleen
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2001-08-10 18:36 UTC (permalink / raw)
To: Subba Rao; +Cc: Linux Kernel
Subba Rao wrote:
>
> Hello,
>
> I have 2 3Com NICs on my system. They are 3c905C Tornado PCI cards.
> The drivers are compiled into the kernel (Slackware 8.0 with kernel 2.4.7).
>
> One of the interfaces will be used as a sniffer interface (without IP address)
> and a very high traffic pipes. I do not wish to loose any packets coming to this
> interface. Is it better if I initialize the interface in HALF DUPLEX mode? If yes,
> how do I set the card to HALF DUPLEX mode? How can I find out the HW (NIC) settings
> on the system?
No, this will provide no benefit.
> Another question about 3Com NICs, do they perform zero-copy IP?
Linux's zerocopy infrastructure allows the sendfile() system call
to save a copy with NICs which have hardware checksumming and
scatter/gather. 3c905C is one such NIC. Kernel is not generally
"zero copy", but large savings are available in certain situations.
NFS packet reassembly benefits from 905C's as well.
> I read that the performance improves a lot WITHOUT zero-copy IP.
Not right. Where did you read that?
-
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Half Duplex and Zero Copy IP
2001-08-10 18:36 ` Andrew Morton
@ 2001-08-11 7:59 ` Subba Rao
0 siblings, 0 replies; 6+ messages in thread
From: Subba Rao @ 2001-08-11 7:59 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Kernel
On 0, Andrew Morton <akpm@zip.com.au> wrote:
> Subba Rao wrote:
> >
> > Hello,
> >
> > I have 2 3Com NICs on my system. They are 3c905C Tornado PCI cards.
> > The drivers are compiled into the kernel (Slackware 8.0 with kernel 2.4.7).
> >
> > One of the interfaces will be used as a sniffer interface (without IP address)
> > and a very high traffic pipes. I do not wish to loose any packets coming to this
> > interface. Is it better if I initialize the interface in HALF DUPLEX mode? If yes,
> > how do I set the card to HALF DUPLEX mode? How can I find out the HW (NIC) settings
> > on the system?
>
> No, this will provide no benefit.
So, is the card set in half-duplex mode by default and full-duplex is a forced
option?
>
> > Another question about 3Com NICs, do they perform zero-copy IP?
>
> Linux's zerocopy infrastructure allows the sendfile() system call
> to save a copy with NICs which have hardware checksumming and
> scatter/gather. 3c905C is one such NIC. Kernel is not generally
> "zero copy", but large savings are available in certain situations.
> NFS packet reassembly benefits from 905C's as well.
>
> > I read that the performance improves a lot WITHOUT zero-copy IP.
>
> Not right. Where did you read that?
>
http://www.fefe.de/linuxeth/
"To achieve gigabit throughput, it is important that the operating system does
not copy the data in the packets before sending them (this is called zero-copy
IP). Unfortunately, the kernel needs to put a header before the data in the
packet, so not copying the data to a buffer in kernel space means that the NIC
needs to be able to fetch the header from a different place in memory than the
user data in the packet. This is called scatter/gather and is necessary for
zero-copy IP."
--
Subba Rao
subba9@home.com
http://members.home.net/subba9/
GPG public key ID 27FC9217
Key fingerprint = 2B4C 498E 1860 5A2B 6570 5852 7527 882A 27FC 9217
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Half Duplex and Zero Copy IP
2001-08-10 9:53 Half Duplex and Zero Copy IP Subba Rao
2001-08-10 18:36 ` Andrew Morton
@ 2001-08-10 18:46 ` Andi Kleen
2001-08-10 23:50 ` Jamie Lokier
1 sibling, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2001-08-10 18:46 UTC (permalink / raw)
To: Subba Rao; +Cc: linux-kernel
In article <20010810095313.A6219@home.com>,
subba9@home.com (Subba Rao) writes:
> Hello,
> I have 2 3Com NICs on my system. They are 3c905C Tornado PCI cards.
> The drivers are compiled into the kernel (Slackware 8.0 with kernel 2.4.7).
> One of the interfaces will be used as a sniffer interface (without IP address)
> and a very high traffic pipes. I do not wish to loose any packets coming to this
> interface. Is it better if I initialize the interface in HALF DUPLEX mode? If yes,
> how do I set the card to HALF DUPLEX mode? How can I find out the HW (NIC) settings
> on the system?
Half duplex mode will only make your line slower, it has no benefit.
> Another question about 3Com NICs, do they perform zero-copy IP? I read that
> the performance improves a lot WITHOUT zero-copy IP.
The sniffer zero copy implementation as implemented in some libpcaps
does not depend on any special NIC support; it should work with any.
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Half Duplex and Zero Copy IP
2001-08-10 18:46 ` Andi Kleen
@ 2001-08-10 23:50 ` Jamie Lokier
2001-08-11 0:00 ` Andi Kleen
0 siblings, 1 reply; 6+ messages in thread
From: Jamie Lokier @ 2001-08-10 23:50 UTC (permalink / raw)
To: Andi Kleen; +Cc: Subba Rao, linux-kernel
Andi Kleen wrote:
> The sniffer zero copy implementation as implemented in some libpcaps
> does not depend on any special NIC support; it should work with any.
Do you mean mmap() on a packet socket? Unless I am mistaken, the data
is still copied once to the mmap area, however only the capture length
is copied -- the rest of the packet is discarded.
This means that you cannot use mmap() on a packet socket to zero-copy
read whole packets. In fact there is no way to zero-copy read whole
packets into user space, without modifying the kernel.
Am I mistaken (it would be nice)?
Thanks,
-- Jamie
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Half Duplex and Zero Copy IP
2001-08-10 23:50 ` Jamie Lokier
@ 2001-08-11 0:00 ` Andi Kleen
0 siblings, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2001-08-11 0:00 UTC (permalink / raw)
To: Jamie Lokier; +Cc: linux-kernel
In article <20010811005037.A5591@thefinal.cern.ch>,
lk@tantalophile.demon.co.uk (Jamie Lokier) writes:
> This means that you cannot use mmap() on a packet socket to zero-copy
> read whole packets. In fact there is no way to zero-copy read whole
> packets into user space, without modifying the kernel.
[...]
Yes, sorry, I should have written single copy.
Zero copy read is currently only possible for kernel clients with hacks.
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-08-11 11:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-10 9:53 Half Duplex and Zero Copy IP Subba Rao
2001-08-10 18:36 ` Andrew Morton
2001-08-11 7:59 ` Subba Rao
2001-08-10 18:46 ` Andi Kleen
2001-08-10 23:50 ` Jamie Lokier
2001-08-11 0:00 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox