Signed-off-by: "Ed L. Cashin" <[email protected]>
Explicitly set the minimum packet length to ETH_ZLEN and zero the
packet data.
diff -u 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c
--- 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c 2005-09-29 12:01:55.000000000 -0400
+++ 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c 2005-09-29 12:01:56.000000000 -0400
@@ -20,6 +20,9 @@
{
struct sk_buff *skb;
+ if (len < ETH_ZLEN)
+ len = ETH_ZLEN;
+
skb = alloc_skb(len, GFP_ATOMIC);
if (skb) {
skb->nh.raw = skb->mac.raw = skb->data;
@@ -27,6 +30,7 @@
skb->protocol = __constant_htons(ETH_P_AOE);
skb->priority = 0;
skb_put(skb, len);
+ memset(skb->head, 0, len);
skb->next = skb->prev = NULL;
/* tell the network layer not to perform IP checksums
--
Ed L. Cashin <[email protected]>
On Iau, 2005-09-29 at 12:45 -0400, Ed L. Cashin wrote:
> Signed-off-by: "Ed L. Cashin" <[email protected]>
>
> Explicitly set the minimum packet length to ETH_ZLEN and zero the
> packet data.
You still haven't explained why this is neccessary. The drivers should
be doing it for you.
Alan Cox <[email protected]> writes:
> On Iau, 2005-09-29 at 12:45 -0400, Ed L. Cashin wrote:
>> Signed-off-by: "Ed L. Cashin" <[email protected]>
>>
>> Explicitly set the minimum packet length to ETH_ZLEN and zero the
>> packet data.
>
> You still haven't explained why this is neccessary. The drivers should
> be doing it for you.
I did respond to your earlier request post, but I forgot to make sure
you were in the CC list, sorry. I've quoted my response below.
Ed L Cashin <[email protected]> writes:
> Alan Cox <[email protected]> writes:
...
>> The network driver is supposed to pad frames if the hardware cannot and
>> to blank the spare bits.
>
> Ah ha.
>
>> If it isn't occurring please try and trace down
>> the offender.
>
> My colleague Sam observed problems with the e1000 driver in the
> 2.6.11.4-21.9-smp kernel from Suse 9.3 and also the e1000 driver in
> 2.6.12-1.1398_FC4smp from Fedora Core 4.
>
> The problems aren't fully characterized, but AoE ATA read packets
> appeared to be getting dropped and/or corrupted.
>
> When using the tg3 driver instead of e1000 the problems went away, and
> making the aoe driver alloc_skb with a minimum length of ETH_ZLEN also
> made the problems go away.
We suspect that the e1000 driver is misbehaving when given short
packets, but we have not had time to pinpoint what part of the e1000
driver is involved or what the specific problem is.
--
Ed L Cashin <[email protected]>
From: Ed L Cashin <[email protected]>
Date: Thu, 29 Sep 2005 18:31:02 -0400
> We suspect that the e1000 driver is misbehaving when given short
> packets, but we have not had time to pinpoint what part of the e1000
> driver is involved or what the specific problem is.
Then the e1000 driver is where the fix belongs, not the
aoe driver.
"David S. Miller" <[email protected]> writes:
> From: Ed L Cashin <[email protected]>
> Date: Thu, 29 Sep 2005 18:31:02 -0400
>
>> We suspect that the e1000 driver is misbehaving when given short
>> packets, but we have not had time to pinpoint what part of the e1000
>> driver is involved or what the specific problem is.
>
> Then the e1000 driver is where the fix belongs, not the
> aoe driver.
OK, then I guess this one of the three patches can be dropped.
--
Ed L Cashin <[email protected]>