UDP packets are getting dropped because of invalied checksum though checksum offload is enabled in kernel-2.6.32
Kristof Provost
kristof at sigsegv.be
Thu Jul 19 09:22:55 EDT 2012
On 2012-07-19 18:28:57 (+0530), Murali Annamneni <a.murali at hcl.com> wrote:
> Hi All,
>
> I have written a kernel module using netfilter framework. In my code I'll do some modifications to the header & payload parts of UDP packet in pre & post hooks.
> After modifying the udp packet, I'm computing ip & udp checksum. This computation is consuming some cpu cycles.
> Now, I want to offload this computation to the Ethernet device. For this I have commented the checksum computation in my code and enabled the checksum offload parameters of my Ethernet device.
> While testing, I found that kernel is dropping the packets because of invalid checksums for ip & udp packets.
> I have few doubts regarding checksum offload
>
Wild guess: try setting the checksum to zero before sending the packet.
It's possible that the offload engine won't recompute checksums unless
they're zero (i.e. it might assume non-zero checksums are already correct).
Regards,
Kristof
More information about the Kernelnewbies
mailing list