Re: Bottom half for network drivers

Vadim Lebedev (vlebedev@aplio.fr)
Fri, 10 Sep 1999 18:33:10 +0200


Hi Alan,

When i fill my receive ring i allocate a SKB which is able to hold the max
size ethernet packet....
So you're suggesting that for small packets i'll allocate a new SKB an copy
the packet data to this new skb and
pass this new skb to netif_rx?
What do you consider as small?

And what do you think about my driver-specific bh routine idiea?

Btw, i have a strange problems... when i'm doing ping from my ucLinux device
if i use ping packet size < 128 bytes
i'm getting enormouss RTT spread. the RTT varies of 0.4 ms to 4000 ms. My
protocol analyzer shows that
the ICMP echo packet comes back usially in 0.4 ms.... so it seems that the
small packets are stuck somewhere
between my driver and ping application for variable amount of time....
With packets >128 bytes there is NO problem....
the kernel is 2.0.33 based...

Any ideas?
Regards
Vadim

PS.
Alan your e-mail address : <alan@lxorguk.ukuu.org.uk>
on the message you've sent me is wrong i get:

The original message was received at Fri, 10 Sep 1999 18:20:19 +0200
(METDST)
from [194.98.253.42]

----- The following addresses had permanent fatal errors -----
<alan@lxorguk.ukuu.org.uk>

----- Transcript of session follows -----
... while talking to lightning.swansea.uk.linux.org.:
>>> RCPT To:<alan@lxorguk.ukuu.org.uk>
<<< 550-Open relay - see http://www.orbs.org/verify.cgi?address=194.98.0.128
<<< 550 rejected: administrative prohibition
550 <alan@lxorguk.ukuu.org.uk>... User unknown

so i could not reply to you directly

----- Original Message -----
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Vadim Lebedev <vlebedev@aplio.fr>
Cc: <linux-kernel@vger.rutgers.edu>
Sent: Friday, September 10, 1999 6:05 PM
Subject: Re: Bottom half for network drivers

> > This MCU has a sofisticated built-in ethernet interface and i wrote a
> > driver for it.
>
> Wasn't the AMD 7990 about 1990 8).
>
> > When the ETH controller generates a let's say RECEIVE COMPLETE interrupt
> > I have to scan the receieve ring for all descriptors saying to hold a
good
> > received packet, for each such
> > descriptor i find corresponding skb adjust the length, call
netif_rx(skb),
> > then i allocate a new skb
>
> For small frames you need to copy/checksum the frame to keep the memory
usage
> sane. Take a look at tulip.c, lance.c and most other drivers that do this
>
> > netif_rx, dev_alloc_skb calls, inside the interrupt handler.
>
> It shouldnt take very long. netif_rx is a short queueing function
>
> >From the drivers we have I dont think it will be an issue.
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/