Hello,
I am writing an ethernet driver for cadence enhanced MAC in FE mode.
The ethernet controller is having limitation that out of one frame it
can copy only 512 bytes in one buffer.
Hence the the received frame is distributed over multiple buffers.
So any frame which is more than 512 bytes will be in buffer pointed by
next receive buffer queue descriptor.
I am using NAPI mode in which when I am collecting the frame spread
across multiple buffers and assign it to a single sk_buff handed over
to stack, the data gets corrupt. And stack rejects the packet. One
solution is to make receive buffer length 1536 bytes(jumbo frames) or
1518 bytes which is IEEE 802.2/3 standard. But the controller doesn't
accept the value greater than 512 and the allocated memory is wasted.
So what care should I take while collecting the data spread across
multiple buffers and sending to stack?
Thanks,
Sagar
|