<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Trebuchet MS","sans-serif";
        color:#17365D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:2141919864;
        mso-list-type:hybrid;
        mso-list-template-ids:-2029764746 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>Hi All,<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>I have written a kernel module using netfilter framework. In my code I&#8217;ll do some modifications to the header &amp; payload parts of UDP packet in pre &amp; post hooks.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>After modifying the udp packet, I&#8217;m computing ip &amp; udp checksum. This computation is consuming some cpu cycles.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>While testing, I found that kernel is dropping the packets because of invalid checksums for ip &amp; udp packets.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>I have few doubts regarding checksum offload<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'><span style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>Shall I need to do anything in my kernel code.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'><span style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>I&#8217;m using the below command &nbsp;to enable checksum offload<o:p></o:p></span></p><p class=MsoListParagraph><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>ethtool &#8211;K eth0 rx on tx on<o:p></o:p></span></p><p class=MsoListParagraph><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>Is there anything I need to do apart from this ?<o:p></o:p></span></p><p class=MsoListParagraph><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'>I&#8217;m testing my kernel code in kernel-2.6.32.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#17365D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#002060'>Thanks &amp; Regards<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS","sans-serif";color:#002060'>Murali Annamneni</span><span style='color:#17365D'><o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: gray; FONT-SIZE: 7.5pt; mso-fareast-font-family: 'Times New Roman'">
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><br><br><font style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: gray; FONT-SIZE: 9px">::DISCLAIMER::<br>----------------------------------------------------------------------------------------------------------------------------------------------------</font></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><font style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: gray; FONT-SIZE: 11px">The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.<br>E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, <br>lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents <br>(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. <br>Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the <br>views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, <br>distribution and / or publication of this message without the prior written consent of authorized representative of <br>HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. <br>Before opening any email and/or attachments, please check them for viruses and other defects.</font></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><font style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: gray; FONT-SIZE: 11px">----------------------------------------------------------------------------------------------------------------------------------------------------</font></span></P></body></html>