UDP packets are getting dropped because of invalied checksum though checksum offload is enabled in kernel-2.6.32

Murali Annamneni a.murali at hcl.com
Thu Jul 19 08:58:57 EDT 2012


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

1)    Shall I need to do anything in my kernel code.

2)    I'm using the below command  to enable checksum offload

ethtool -K eth0 rx on tx on

Is there anything I need to do apart from this ?


I'm testing my kernel code in kernel-2.6.32.

Thanks & Regards
Murali Annamneni



::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120719/34e0d503/attachment.html 


More information about the Kernelnewbies mailing list