linux-mips-fnet
[Top] [All Lists]

RE: declance questions

To: linux-mips@fnet.fr
Subject: RE: declance questions
From: Harald Koerfgen <harald.koerfgen@netcologne.de>
Date: Sat, 02 Jan 1999 09:36:33 +0100 (MET)
In-reply-to: <19990102002052.C23847@mini.gt.owl.de>
Organization: none
Reply-to: "Harald Koerfgen" <harald.koerfgen@netcologne.de>
Sender: harry@franz.no.dom
Hi all,

On 01-Jan-99 Florian Lohoff wrote:
> Hi,
> i found out that the transfers of the declance/nfs are VERY bursty.
> If you look at an tcpdump you see that you have heavy activity some
> seconds (10-30) and then a delay of couple of seconds to minutes.
> 
> Also - is it correct that data from&to the ethernet is copied 
> via CPU ?
> 
> --------------schnipp-----------------
>         /*
>          * copy 16 Byte chunks
>          */
>         clen = len >> 4;
>         tp = (unsigned short *)to;
>         fp = (unsigned short *)from;
>         while (clen--) {
>                 *tp++ = *fp++;
>                 *tp++ = *fp++;
>                 *tp++ = *fp++;
>                 *tp++ = *fp++;
>                 *tp++ = *fp++;
>                 *tp++ = *fp++;
>                 *tp++ = *fp++;
>                 *tp++ = *fp++;
>                 tp += 8;
>         }
> --------------schnapp-----------------

Well, normally the function eth_copy_and_sum() is used for that.
eth_copy_and_sum() calls memcpy() and csum_partial_copy(), which are
heavily optimised, architecture dependant assembly routines. So, yes, it
_is_ normal that packets are copied via the CPU.

Unfortunately these routines rely on the fact that the buffers are
continuous in memory, which is not the case here. On the IOASIC
DECstations we have 16 Bytes of valid data followed by a 16-Byte gap.
cp_*_buf are just a first approach and leave room for improvement :-).

> The comment says that there is an misalignment for the skbs ?
> But i remember reading in one of the TC DMA Docs TcIA or something
> about byte alignment.

Unfortunately the on board IOASIC isn't as intelligent. You may want to
read chapter 9 of the "DEC 3000 300/400/500/600/700/800/900 AXP Models
System Programmer's Manual", available at decstation.unix-ag.org.

Happy hacking.
---
Regards,
Harald

<Prev in Thread] Current Thread [Next in Thread>