[ofw][patch] [IPOIB] Fixing a value of the maximum number of send packets that MiniportSendPackets function can accept

Alex Naslednikov xalex at mellanox.co.il
Mon Dec 8 07:52:20 PST 2008


Fixing a value of the maximum number of send packets that
MiniportSendPackets function can accept.
Very large value causes WHQL Lan test to fail on memory allocation.
Signed-off by : Alexander Naslednikov (xalex at mellanox.co.il)
Index:
D:/Windows/MLNX_WINOF_BRANCH_2_0_0/ulp/ipoib/kernel/ipoib_driver.c
===================================================================
--- D:/Windows/MLNX_WINOF_BRANCH_2_0_0/ulp/ipoib/kernel/ipoib_driver.c
(revision 3517)
+++ D:/Windows/MLNX_WINOF_BRANCH_2_0_0/ulp/ipoib/kernel/ipoib_driver.c
(revision 3518)
@@ -688,8 +688,9 @@
 	 * query remove IRP.  We will always get unloaded before the bus
driver
 	 * since we're a child device.
 	 */
-	p_adapter->p_ifc->wdm.InterfaceDereference(
-		p_adapter->p_ifc->wdm.Context );
+	if (p_adapter->p_ifc)
+		p_adapter->p_ifc->wdm.InterfaceDereference(
+			p_adapter->p_ifc->wdm.Context );
 	IPOIB_EXIT( IPOIB_DBG_INIT );
 	return NDIS_STATUS_SUCCESS;
 }
@@ -1093,7 +1094,7 @@
 	case OID_GEN_MAXIMUM_SEND_PACKETS:
 		IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID,
 			("Port %d received query for
OID_GEN_MAXIMUM_SEND_PACKETS\n", port_num) );
-		info = MAXULONG;
+		info = MINIPORT_MAX_SEND_PACKETS;
 		break;
 
 	/* Required General Statistics */
Index:
D:/Windows/MLNX_WINOF_BRANCH_2_0_0/ulp/ipoib/kernel/ipoib_driver.h
===================================================================
--- D:/Windows/MLNX_WINOF_BRANCH_2_0_0/ulp/ipoib/kernel/ipoib_driver.h
(revision 3517)
+++ D:/Windows/MLNX_WINOF_BRANCH_2_0_0/ulp/ipoib/kernel/ipoib_driver.h
(revision 3518)
@@ -47,6 +47,9 @@
  */
 #define MAX_BUNDLE_ID_LENGTH	32
 
+/* The maximum number of send packets the MiniportSendPackets function
can accept */
+#define MINIPORT_MAX_SEND_PACKETS	200
+
 /* MLX4 supports 4K MTU */
 #define IB_MTU			4096
 /*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_ipoib_max_send_num.diff
Type: application/octet-stream
Size: 1597 bytes
Desc: patch_ipoib_max_send_num.diff
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081208/c6b45cb8/attachment.obj>


More information about the ofw mailing list