netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Ethernet CRC questions
@ 2009-12-29 17:17 thomas yang
  2009-12-29 17:39 ` Ben Hutchings
  0 siblings, 1 reply; 7+ messages in thread
From: thomas yang @ 2009-12-29 17:17 UTC (permalink / raw)
  To: netdev

How does Linux  generate Ethernet CRC ?
by the hardware (Ethernet controller)  or  use crc32_le() /
crc32_be()     ( lib/crc32.c )  ?

P.S.   my  network card is  rtl8139d  , use  8139too driver


--
thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet CRC questions
  2009-12-29 17:17 Ethernet CRC questions thomas yang
@ 2009-12-29 17:39 ` Ben Hutchings
  2009-12-30  5:53   ` thomas yang
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Hutchings @ 2009-12-29 17:39 UTC (permalink / raw)
  To: thomas yang; +Cc: netdev

On Wed, 2009-12-30 at 01:17 +0800, thomas yang wrote:
> How does Linux  generate Ethernet CRC ?
> by the hardware (Ethernet controller)  or  use crc32_le() /
> crc32_be()     ( lib/crc32.c )  ?
> 
> P.S.   my  network card is  rtl8139d  , use  8139too driver

The Ethernet frame CRC is normally generated and verified in hardware.
These library functions are needed for the few MACs that don't, or where
the same CRC function is used for some other purpose (e.g. as a hash
function for multicast filtering).

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet CRC questions
  2009-12-29 17:39 ` Ben Hutchings
@ 2009-12-30  5:53   ` thomas yang
  2009-12-30  6:43     ` Matti Aarnio
  2009-12-30 10:37     ` Ben Hutchings
  0 siblings, 2 replies; 7+ messages in thread
From: thomas yang @ 2009-12-30  5:53 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: netdev

2009/12/30 Ben Hutchings <bhutchings@solarflare.com>:
> On Wed, 2009-12-30 at 01:17 +0800, thomas yang wrote:
>> How does Linux  generate Ethernet CRC ?
>> by the hardware (Ethernet controller)  or  use crc32_le() /
>> crc32_be()     ( lib/crc32.c )  ?
>>
>> P.S.   my  network card is  rtl8139d  , use  8139too driver
>
> The Ethernet frame CRC is normally generated and verified in hardware.
> These library functions are needed for the few MACs that don't, or where
> the same CRC function is used for some other purpose (e.g. as a hash
> function for multicast filtering).
>

Does the Ethernet frame CRC (generate and verify in hardware)  make
the TX / RX  rate  a little smaller , and a longer end-to-end  delay ?
 Could I disable CRC appending / verifying  in the network card driver
  on all of my nodes (machines) ?

Thanks.



--
Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet CRC questions
  2009-12-30  5:53   ` thomas yang
@ 2009-12-30  6:43     ` Matti Aarnio
  2009-12-30 10:37     ` Ben Hutchings
  1 sibling, 0 replies; 7+ messages in thread
From: Matti Aarnio @ 2009-12-30  6:43 UTC (permalink / raw)
  To: thomas yang; +Cc: netdev

On Wed, Dec 30, 2009 at 01:53:09PM +0800, thomas yang wrote:
> 2009/12/30 Ben Hutchings <bhutchings@solarflare.com>:
> > On Wed, 2009-12-30 at 01:17 +0800, thomas yang wrote:
> >> How does Linux  generate Ethernet CRC ?
> >> by the hardware (Ethernet controller)  or  use crc32_le() /
> >> crc32_be()     ( lib/crc32.c )  ?
> >>
> >> P.S.   my  network card is  rtl8139d  , use  8139too driver
> >
> > The Ethernet frame CRC is normally generated and verified in hardware.
> > These library functions are needed for the few MACs that don't, or where
> > the same CRC function is used for some other purpose (e.g. as a hash
> > function for multicast filtering).
> 
> Does the Ethernet frame CRC (generate and verify in hardware)  make
> the TX / RX  rate  a little smaller , and a longer end-to-end  delay ?
>  Could I disable CRC appending / verifying  in the network card driver
>   on all of my nodes (machines) ?

You would need to similarly disable the checking and generating at your
network switches as well.  It really is not worthwhile.

You are better to use multiple links in between the machines in parallel,
and bond them together as load-sharing link.  Or go to 10G.
(We used to do that kind of things with quad fast-ethernet cards, but
with gigaethers we did not bother anymore.)

> Thanks.

Best Regards,  Matti Aarnio

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet CRC questions
  2009-12-30  5:53   ` thomas yang
  2009-12-30  6:43     ` Matti Aarnio
@ 2009-12-30 10:37     ` Ben Hutchings
  2009-12-30 16:19       ` thomas yang
  1 sibling, 1 reply; 7+ messages in thread
From: Ben Hutchings @ 2009-12-30 10:37 UTC (permalink / raw)
  To: thomas yang; +Cc: netdev

On Wed, 2009-12-30 at 13:53 +0800, thomas yang wrote:
> 2009/12/30 Ben Hutchings <bhutchings@solarflare.com>:
> > On Wed, 2009-12-30 at 01:17 +0800, thomas yang wrote:
> >> How does Linux  generate Ethernet CRC ?
> >> by the hardware (Ethernet controller)  or  use crc32_le() /
> >> crc32_be()     ( lib/crc32.c )  ?
> >>
> >> P.S.   my  network card is  rtl8139d  , use  8139too driver
> >
> > The Ethernet frame CRC is normally generated and verified in hardware.
> > These library functions are needed for the few MACs that don't, or where
> > the same CRC function is used for some other purpose (e.g. as a hash
> > function for multicast filtering).
> >
> 
> Does the Ethernet frame CRC (generate and verify in hardware)  make
> the TX / RX  rate  a little smaller , and a longer end-to-end  delay ?

Relative to what?

>  Could I disable CRC appending / verifying  in the network card driver
>   on all of my nodes (machines) ?

Maybe if you want switches to discard everything you send...

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet CRC questions
  2009-12-30 10:37     ` Ben Hutchings
@ 2009-12-30 16:19       ` thomas yang
  2009-12-30 16:29         ` Ben Hutchings
  0 siblings, 1 reply; 7+ messages in thread
From: thomas yang @ 2009-12-30 16:19 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: netdev

>>
>> Does the Ethernet frame CRC (generate and verify in hardware)  make
>> the TX / RX  rate  a little smaller , and a longer end-to-end  delay ?
>
> Relative to what?
>

Relative to the Ethernet frame without CRC appending / verifying .


In IEEE 802.3 standard, all network devices should append/verify CRC?

>>  Could I disable CRC appending / verifying  in the network card driver
>>   on all of my nodes (machines) ?
>
> Maybe if you want switches to discard everything you send...
>

So, I should disable CRC appending / verifying on all kinds of network
devices in my network?
In this way I will  TX/RX packets more faster ?


--
Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet CRC questions
  2009-12-30 16:19       ` thomas yang
@ 2009-12-30 16:29         ` Ben Hutchings
  0 siblings, 0 replies; 7+ messages in thread
From: Ben Hutchings @ 2009-12-30 16:29 UTC (permalink / raw)
  To: thomas yang; +Cc: netdev

On Thu, 2009-12-31 at 00:19 +0800, thomas yang wrote:
> >>
> >> Does the Ethernet frame CRC (generate and verify in hardware)  make
> >> the TX / RX  rate  a little smaller , and a longer end-to-end  delay ?
> >
> > Relative to what?
> >
> 
> Relative to the Ethernet frame without CRC appending / verifying .
> 
> 
> In IEEE 802.3 standard, all network devices should append/verify CRC?

Not 'should' but 'must'.

> >>  Could I disable CRC appending / verifying  in the network card driver
> >>   on all of my nodes (machines) ?
> >
> > Maybe if you want switches to discard everything you send...
> >
> 
> So, I should disable CRC appending / verifying on all kinds of network
> devices in my network?
> In this way I will  TX/RX packets more faster ?

You will probably not be able to disable CRC validation on switches
because it is not a sensible thing to do.  So if you disable CRC
generation on NICs then your network will notwork.

Really, 32 bit-times is not much to worry about (only 320 ns even at
100M).  There are likely to be much bigger sources of latency to attack.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-30 16:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-29 17:17 Ethernet CRC questions thomas yang
2009-12-29 17:39 ` Ben Hutchings
2009-12-30  5:53   ` thomas yang
2009-12-30  6:43     ` Matti Aarnio
2009-12-30 10:37     ` Ben Hutchings
2009-12-30 16:19       ` thomas yang
2009-12-30 16:29         ` Ben Hutchings

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).