Subject: Re: RTL8169 hw IP4CSUM_Tx workaround
To: None <bouyer@antioche.eu.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 10/26/2006 22:40:51
bouyer@antioche.eu.org wrote:
> > > +/*
> > > + * This function is just taken and modified from bge(4) driver.
> > > + *
> > > + * Although re(4) chips support auto-padding small packets,
> > > + * but it seems to cause a bug on IPv4 hardware checksum offload.
> > > + * To avoid the bug, pad packets manually if ip4csum is enabled.
> > > + */
> >
> > i'm not sure if it's a good idea to allocate a mbuf for this purpose.
> > an alternative would be to set up a dummy descriptor which
> > points (system-global?) zero'ed memory.
>
> This is how it's done in tl(4)
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.
- Setting up a dummy descriptor would make foo_start() function
a bit complicated and its overhead affects all TX packets.
- 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)
Thoughts?
---
Izumi Tsutsui