[ofw] [patch] Fix connectx dhcp packets csum

Anatoly Greenblatt anatolyg at voltaire.com
Wed Oct 15 02:46:26 PDT 2008


 <<fix_connectx_dhcp_csum.patch>> Hi,

We have seen that in some cases ip header checksum is not ocrrect with
connectx hca.
This patch makes sure that ip header cheksum in dhcp packets is always
calculated.

Regards,
Anatoly.


Index: ulp/ipoib/kernel/ipoib_port.c
===================================================================
--- ulp/ipoib/kernel/ipoib_port.c	(revision 1648)
+++ ulp/ipoib/kernel/ipoib_port.c	(working copy)
@@ -3606,11 +3606,8 @@
 		p_desc->p_buf->ip.prot.udp.hdr.length = cl_ntoh16(
sizeof(udp_hdr_t) + sizeof(dhcp_pkt_t) );
 
 		/* update crc in ip header */
-		if( !p_port->p_adapter->params.send_chksum_offload )
-		{
-			p_desc->p_buf->ip.hdr.chksum = 0;
-			p_desc->p_buf->ip.hdr.chksum =
ipchksum((unsigned short*) &p_desc->p_buf->ip.hdr, sizeof(ip_hdr_t));
-		}
+		p_desc->p_buf->ip.hdr.chksum = 0;
+		p_desc->p_buf->ip.hdr.chksum = ipchksum((unsigned
short*) &p_desc->p_buf->ip.hdr, sizeof(ip_hdr_t));
 		break;
 
 	/* Server messages. */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_connectx_dhcp_csum.patch
Type: application/octet-stream
Size: 763 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081015/33f6fcd0/attachment.obj>


More information about the ofw mailing list