netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* via-rhine unable to send back-to-back packets?
@ 2004-11-29 22:27 Lennert Buytenhek
  2004-11-30  1:25 ` David S. Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Lennert Buytenhek @ 2004-11-29 22:27 UTC (permalink / raw)
  To: Roger Luethi; +Cc: netdev

Hi,

I'm running some pktgen experiments on an Nehemiah mini-ITX board which
has dual via-rhine controllers, and I'm seeing something odd -- it appears
as if either the hardware can't send back-to-back packets, or the driver
it making every packet two bytes longer than it should be.

For example, when transmitting 300-byte packets, I can TX 38261 packets
per second, but I should be able to TX ~38580.  When doing the math, it
turns out that 38261 is exactly the number of 302-byte packets you can
stuff into Fast Ethernet per second.

This test is not CPU limited -- I'm seeing the same issue from 100B
packet size up to 1500B.

Any ideas?  I had a look at the driver but found nothing odd.


cheers,
Lennert

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

* Re: via-rhine unable to send back-to-back packets?
  2004-11-29 22:27 via-rhine unable to send back-to-back packets? Lennert Buytenhek
@ 2004-11-30  1:25 ` David S. Miller
  2004-11-30  6:48   ` Lennert Buytenhek
  0 siblings, 1 reply; 10+ messages in thread
From: David S. Miller @ 2004-11-30  1:25 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: rl, netdev

On Mon, 29 Nov 2004 23:27:00 +0100
Lennert Buytenhek <buytenh@wantstofly.org> wrote:

> For example, when transmitting 300-byte packets, I can TX 38261 packets
> per second, but I should be able to TX ~38580.  When doing the math, it
> turns out that 38261 is exactly the number of 302-byte packets you can
> stuff into Fast Ethernet per second.

Is the packet length in those calculations taking into consideration
the CRC et al. bytes that the card adds to the packet?

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

* Re: via-rhine unable to send back-to-back packets?
  2004-11-30  1:25 ` David S. Miller
@ 2004-11-30  6:48   ` Lennert Buytenhek
  2004-11-30 17:41     ` Ben Greear
  2004-11-30 20:25     ` David S. Miller
  0 siblings, 2 replies; 10+ messages in thread
From: Lennert Buytenhek @ 2004-11-30  6:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: rl, netdev

On Mon, Nov 29, 2004 at 05:25:40PM -0800, David S. Miller wrote:

> > For example, when transmitting 300-byte packets, I can TX 38261 packets
> > per second, but I should be able to TX ~38580.  When doing the math, it
> > turns out that 38261 is exactly the number of 302-byte packets you can
> > stuff into Fast Ethernet per second.
> 
> Is the packet length in those calculations taking into consideration
> the CRC et al. bytes that the card adds to the packet?

Yeah, preamble (8 bytes), CRC (4 bytes), inter-packet gap (12 bytes).

Perhaps the via-rhine simply can't send out packets back-to-back and
needs 14 byte times of inter-packet gap.  I couldn't find any stray +2
in the driver anywhere but I'm just checking.

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

* Re: via-rhine unable to send back-to-back packets?
  2004-11-30  6:48   ` Lennert Buytenhek
@ 2004-11-30 17:41     ` Ben Greear
  2004-12-01 19:55       ` Lennert Buytenhek
  2004-11-30 20:25     ` David S. Miller
  1 sibling, 1 reply; 10+ messages in thread
From: Ben Greear @ 2004-11-30 17:41 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: netdev

Lennert Buytenhek wrote:

> Yeah, preamble (8 bytes), CRC (4 bytes), inter-packet gap (12 bytes).
> 
> Perhaps the via-rhine simply can't send out packets back-to-back and
> needs 14 byte times of inter-packet gap.  I couldn't find any stray +2
> in the driver anywhere but I'm just checking.

Couldn't you just sniff the resulting traffic to see if it is too big?

Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

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

* Re: via-rhine unable to send back-to-back packets?
  2004-11-30  6:48   ` Lennert Buytenhek
  2004-11-30 17:41     ` Ben Greear
@ 2004-11-30 20:25     ` David S. Miller
  2004-11-30 22:06       ` Roger Luethi
  1 sibling, 1 reply; 10+ messages in thread
From: David S. Miller @ 2004-11-30 20:25 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: rl, netdev

On Tue, 30 Nov 2004 07:48:23 +0100
Lennert Buytenhek <buytenh@wantstofly.org> wrote:

> Yeah, preamble (8 bytes), CRC (4 bytes), inter-packet gap (12 bytes).

Ok.

> Perhaps the via-rhine simply can't send out packets back-to-back and
> needs 14 byte times of inter-packet gap.  I couldn't find any stray +2
> in the driver anywhere but I'm just checking.

Or the via-rhine driver is not programming one of the registers
proper to get optimal spacing.

As with most Donald Becker drivers, many of the register layouts
are not documented in the sources so it's not possible to just
scan the driver looking for potential problems like this.
For example, maybe the TxConfig register has an "IPG" field but
we'll never know by reading anything in the driver source.

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

* Re: via-rhine unable to send back-to-back packets?
  2004-11-30 20:25     ` David S. Miller
@ 2004-11-30 22:06       ` Roger Luethi
  2004-12-01 20:01         ` Lennert Buytenhek
  0 siblings, 1 reply; 10+ messages in thread
From: Roger Luethi @ 2004-11-30 22:06 UTC (permalink / raw)
  To: David S. Miller; +Cc: Lennert Buytenhek, netdev

On Tue, 30 Nov 2004 12:25:03 -0800, David S. Miller wrote:
> Lennert Buytenhek <buytenh@wantstofly.org> wrote:
> > Perhaps the via-rhine simply can't send out packets back-to-back and
> > needs 14 byte times of inter-packet gap.  I couldn't find any stray +2
> > in the driver anywhere but I'm just checking.
> 
> Or the via-rhine driver is not programming one of the registers
> proper to get optimal spacing.
> 
> As with most Donald Becker drivers, many of the register layouts
> are not documented in the sources so it's not possible to just
> scan the driver looking for potential problems like this.
> For example, maybe the TxConfig register has an "IPG" field but
> we'll never know by reading anything in the driver source.

Presumably Donald Becker had only access to the publicly available
documentation at the time which is very incomplete and buggy. What
little time my day job leaves for hacking via-rhine is consumed by the
WOL issues that have come up with 2.6.9+, but if you have a specific
question that can be answered by someone who knows the chip but not
necessarily Linux I can try and poke my contacts.

Of course, you can always check if VIA's driver has the same issue. If
it doesn't, chances are we can borrow the fix.

Roger

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

* Re: via-rhine unable to send back-to-back packets?
  2004-11-30 17:41     ` Ben Greear
@ 2004-12-01 19:55       ` Lennert Buytenhek
  0 siblings, 0 replies; 10+ messages in thread
From: Lennert Buytenhek @ 2004-12-01 19:55 UTC (permalink / raw)
  To: Ben Greear; +Cc: netdev

On Tue, Nov 30, 2004 at 09:41:23AM -0800, Ben Greear wrote:

> >Yeah, preamble (8 bytes), CRC (4 bytes), inter-packet gap (12 bytes).
> >
> >Perhaps the via-rhine simply can't send out packets back-to-back and
> >needs 14 byte times of inter-packet gap.  I couldn't find any stray +2
> >in the driver anywhere but I'm just checking.
> 
> Couldn't you just sniff the resulting traffic to see if it is too big?

Sorry, forgot to mention: I did check that, and the data portion of
the packet doesn't appear to be too big.


--L

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

* Re: via-rhine unable to send back-to-back packets?
  2004-11-30 22:06       ` Roger Luethi
@ 2004-12-01 20:01         ` Lennert Buytenhek
  2004-12-02 11:01           ` Roger Luethi
  0 siblings, 1 reply; 10+ messages in thread
From: Lennert Buytenhek @ 2004-12-01 20:01 UTC (permalink / raw)
  To: Roger Luethi; +Cc: David S. Miller, netdev

On Tue, Nov 30, 2004 at 11:06:44PM +0100, Roger Luethi wrote:

> > > Perhaps the via-rhine simply can't send out packets back-to-back and
> > > needs 14 byte times of inter-packet gap.  I couldn't find any stray +2
> > > in the driver anywhere but I'm just checking.
> > 
> > Or the via-rhine driver is not programming one of the registers
> > proper to get optimal spacing.
> > 
> > As with most Donald Becker drivers, many of the register layouts
> > are not documented in the sources so it's not possible to just
> > scan the driver looking for potential problems like this.
> > For example, maybe the TxConfig register has an "IPG" field but
> > we'll never know by reading anything in the driver source.
> 
> Presumably Donald Becker had only access to the publicly available
> documentation at the time which is very incomplete and buggy. What
> little time my day job leaves for hacking via-rhine is consumed by the
> WOL issues that have come up with 2.6.9+, but if you have a specific
> question that can be answered by someone who knows the chip but not
> necessarily Linux I can try and poke my contacts.

"Is the hardware capable of sending back-to-back packets (i.e. with
an inter-packet gap of no more than 96 bit times)?"

"Can misprogramming the chip lead to the effect that the inter-packet
gap is never less than 112 bit times?"

Thanks in advance.


> Of course, you can always check if VIA's driver has the same issue. If
> it doesn't, chances are we can borrow the fix.

Hmm, didn't know they had such a driver.  Where can I find it?


cheers,
Lennert

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

* Re: via-rhine unable to send back-to-back packets?
  2004-12-01 20:01         ` Lennert Buytenhek
@ 2004-12-02 11:01           ` Roger Luethi
  2004-12-02 11:09             ` Lennert Buytenhek
  0 siblings, 1 reply; 10+ messages in thread
From: Roger Luethi @ 2004-12-02 11:01 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: David S. Miller, netdev

[Thanks to A.J. from VNT for the answer which I am relaying below.]

On Wed, 01 Dec 2004 21:01:48 +0100, Lennert Buytenhek wrote:
> "Is the hardware capable of sending back-to-back packets (i.e. with
> an inter-packet gap of no more than 96 bit times)?"

 => YES. All the VIA Rhine Fast Ethernet controllers follows the IEEE
standard (inter-frame gap is 96 bit time) and it is hardware fixed and
NOT programmable.

> "Can misprogramming the chip lead to the effect that the inter-packet
> gap is never less than 112 bit times?"

 => NO, it is fixed and neither software nor board level change could
modify the inter-frame gap of VIA Rhine Fast Ethernet controller.

> > Of course, you can always check if VIA's driver has the same issue. If
> > it doesn't, chances are we can borrow the fix.
> 
> Hmm, didn't know they had such a driver.  Where can I find it?

 => in http://www.viaarena.com/ , choose "downloads" => "Drivers" =>
choose target OS (e.g. Fedora Core Linux) => "Ethernet (Networking/LAN)"
=> choose the type of your Ethernet controller => click to download
the combo driver software package.

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

* Re: via-rhine unable to send back-to-back packets?
  2004-12-02 11:01           ` Roger Luethi
@ 2004-12-02 11:09             ` Lennert Buytenhek
  0 siblings, 0 replies; 10+ messages in thread
From: Lennert Buytenhek @ 2004-12-02 11:09 UTC (permalink / raw)
  To: Roger Luethi; +Cc: David S. Miller, netdev

On Thu, Dec 02, 2004 at 12:01:20PM +0100, Roger Luethi wrote:

> On Wed, 01 Dec 2004 21:01:48 +0100, Lennert Buytenhek wrote:
> > "Is the hardware capable of sending back-to-back packets (i.e. with
> > an inter-packet gap of no more than 96 bit times)?"
> 
>  => YES. All the VIA Rhine Fast Ethernet controllers follows the IEEE
> standard (inter-frame gap is 96 bit time) and it is hardware fixed and
> NOT programmable.

As far as I know, the IEEE standard only mandates a certain minimum
inter-frame gap.

Thanks for the information, I'll have a look at the VIA driver.


--L

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

end of thread, other threads:[~2004-12-02 11:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-29 22:27 via-rhine unable to send back-to-back packets? Lennert Buytenhek
2004-11-30  1:25 ` David S. Miller
2004-11-30  6:48   ` Lennert Buytenhek
2004-11-30 17:41     ` Ben Greear
2004-12-01 19:55       ` Lennert Buytenhek
2004-11-30 20:25     ` David S. Miller
2004-11-30 22:06       ` Roger Luethi
2004-12-01 20:01         ` Lennert Buytenhek
2004-12-02 11:01           ` Roger Luethi
2004-12-02 11:09             ` Lennert Buytenhek

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