[ofw] [Patch] [IPoIB_NDIS6_CM] Fixing DHCP problem

Smith, Stan stan.smith at intel.com
Tue Jan 5 12:47:45 PST 2010


Committed.

Revision: 2651
Author: stansmith
Date: 10:51:23 AM, Tuesday, January 05, 2010
Message:[IPoIB_NDIS6_CM] - DHCP not working.
Fix the wrong length calculation of first MDL within Net Buffer object.
The actual length of first MDL should be decremented by it's offset.

signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)
----
Modified : /gen1/branches/WOF2-2/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
Modified : /gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
________________________________
From: Alex Naslednikov
Sent: Sunday, December 27, 2009 3:27 PM
To: ofw at lists.openfabrics.org
Subject: [ofw] [Patch] [IPoIB_NDIS6_CM] Fixing DHCP problem

This patch fixes the wrong length calculation of
first MDL within Net Buffer object.
The actual length of first MDL should be incremented by it's offset
signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)
Index: kernel/ipoib_port.cpp
===================================================================
--- kernel/ipoib_port.cpp (revision 5387)
+++ kernel/ipoib_port.cpp (working copy)
@@ -3504,6 +3504,9 @@
   return NDIS_STATUS_FAILURE;
  }

+ ULONG MdlDataOffset = NET_BUFFER_CURRENT_MDL_OFFSET(p_net_buffer);
+ *p_mdl_len -= MdlDataOffset;
+
  if( *p_mdl_len < sizeof(eth_hdr_t) )
  {
   IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,
@@ -3512,7 +3515,8 @@
   return NDIS_STATUS_BUFFER_TOO_SHORT;
  }

- *pp_eth_hdr = (eth_hdr_t*)(p_head + NET_BUFFER_CURRENT_MDL_OFFSET(p_net_buffer));
+ *pp_eth_hdr = (eth_hdr_t*)(p_head + MdlDataOffset);
+

  IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SEND,
   ("Ethernet header:\n"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20100105/c7b53f1e/attachment.html>


More information about the ofw mailing list