cancel
Showing results for 
Search instead for 
Did you mean: 

ENET with DMA RING: wrong packet size ?!

paolo239955_stm1
Associate II
Posted on May 22, 2009 at 15:25

ENET with DMA RING: wrong packet size ?!

1 REPLY 1
paolo239955_stm1
Associate II
Posted on May 17, 2011 at 09:58

Hi all,

I am debugging an app wich receives Ethenet packets via DMA ring buffer. I break early at ENET interrupt, and the problem I am facing is: all DMA RING registers for the actual ring element:

dmaCntl

dmaAddr

dmaNext

dmaPackStatus

are correct, except that dmaPackStatus (which is set by DMA HW) reports a wrong rx packet size. Size should be

u16 size = (u16)( (pDescr->dmaPackStatus & 0x7ff) - 4);

but If I send a get 42 bytes Broadcast packet (logged with Wireshark)

0000 ff ff ff ff ff ff 00 16 36 15 9a 7b 08 06 00 01 ........ 6..{....

0010 08 00 06 04 00 01 00 16 36 15 9a 7b c0 a8 00 63 ........ 6..{...c

0020 00 00 00 00 00 00 c0 a8 00 fe

I receive and indication of 106 bytes received, this is my buffer dump:

FF FF FF FF FF FF 00 16 36 15 9A 7B 08 06 00 01 08 00 06 04 00 01 00 16

36 15 9A 7B C0 A8 00 63 00 00 00 00 00 00 C0 A8 00 FE 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00

VERY strange, cause it seem not to happen with all packets types.

Did anybody had a similar problem ?!?!? I am using ENET library 2.0.

Thanks in advance !