Subject: Re: RTL8169 hw IP4CSUM_Tx workaround
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-net
Date: 10/26/2006 15:49:07
On Thu, Oct 26, 2006 at 10:40:51PM +0900, Izumi Tsutsui wrote:
> Yes, I know your recent zeroed padding work.
>
> But after I saw the code in if_bge.c (which allocate a mbuf chain
> for padding), I wonder which way is better because:
> - There are quite few packets which require padding.
It depends on the workload I guess.
> - 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.
> - 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)
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--