Subject: Re: RTL8169 hw IP4CSUM_Tx workaround
To: None <bouyer@antioche.eu.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-net
Date: 10/26/2006 23:12:15
bouyer@antioche.eu.org wrote:

> > - There are quite few packets which require padding.
> 
> It depends on the workload I guess.

Could you take any statistics on real machiens?
I wonder what type of application will require such packets
since on my macppc (mostly client) there are only less than
0.01% short packets on TX.

> > - Setting up a dummy descriptor would make foo_start() function
> >   a bit complicated and its overhead affects all TX packets.
> 
> It probably depends on how the foo_start() function is structured;
> it may be only a if() after filling in the descriptors to add a pointer
> to the zero buf, and adjust the EOF pointer. I didn't look at re(4)
> for this.

Well, my point is how we can figure out which way is more efficient
and readable.

> > - Such zeroed memory for padding has to be allocated by
> >   bus_dmamem_alloc(9) and it wastes resouces only for rare packets.
> >   (though most drivers have some room for padding in thier DMA descriptor
> >    structures)
> 
> It's only 64 bytes, and only one time (you don't need one per interface)

But it also requires bus_dmamap_create() and bus_dmamap_load() calls
which may consume some more resources and they are never freed.
---
Izumi Tsutsui