Index: D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_adapter.c
===================================================================
--- D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_adapter.c	(revision 3222)
+++ D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_adapter.c	(revision 3228)
@@ -368,8 +368,14 @@
 	/* Validate the port GUID and generate the MAC address. */
 	status =
 		ipoib_mac_from_guid( p_adapter->guids.port_guid.guid, p_adapter->params.guid_mask, &p_adapter->mac);
-	if( status != IB_SUCCESS )
+	if (status == IB_INVALID_GUID_MASK)
 	{
+		IPOIB_PRINT( TRACE_LEVEL_WARNING, IPOIB_DBG_ERROR,
+			("Invalid GUID mask received, rejecting it") );
+		ipoib_create_log(p_adapter->h_adapter, GUID_MASK_LOG_INDEX, EVENT_IPOIB_WRONG_PARAMETER_WRN);
+	}
+	else if( status != IB_SUCCESS )
+	{
 		IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,
 			("ipoib_mac_from_guid returned %s\n", 
 			p_adapter->p_ifc->get_err_str( status )) );
Index: D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_port.c
===================================================================
--- D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_port.c	(revision 3222)
+++ D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_port.c	(revision 3228)
@@ -1823,8 +1823,14 @@
 #else	/* IPOIB_INLINE_RECV */
 				p_desc->p_buf->ib.grh.src_gid.unicast.interface_id, p_port->p_adapter->params.guid_mask, &mac );
 #endif	/* IPOIB_INLINE_RECV */
-			if( status != IB_SUCCESS )
+			if (status == IB_INVALID_GUID_MASK)
 			{
+				IPOIB_PRINT( TRACE_LEVEL_WARNING, IPOIB_DBG_ERROR,
+					("Invalid GUID mask received, rejecting it") );
+				ipoib_create_log(p_port->p_adapter->h_adapter, GUID_MASK_LOG_INDEX, EVENT_IPOIB_WRONG_PARAMETER_WRN);
+			}
+			else if( status != IB_SUCCESS )
+			{
 				IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,
 					("ipoib_mac_from_guid returned %s\n",
 					p_port->p_adapter->p_ifc->get_err_str( status )) );
@@ -2316,6 +2322,13 @@
 		p_cid[1] =  HW_ADDR_LEN +1;// CID length 
 		p_cid[2] =  DHCP_HW_TYPE_ETH;// CID type 
 		status = ipoib_mac_from_guid( gid.unicast.interface_id, p_port->p_adapter->params.guid_mask, (mac_addr_t*)&p_cid[3] );
+		if (status == IB_INVALID_GUID_MASK)
+		{
+			IPOIB_PRINT( TRACE_LEVEL_WARNING, IPOIB_DBG_ERROR,
+				("Invalid GUID mask received, rejecting it") );
+			ipoib_create_log(p_port->p_adapter->h_adapter, GUID_MASK_LOG_INDEX, EVENT_IPOIB_WRONG_PARAMETER_WRN);
+			status = IB_SUCCESS;
+		}
 		p_cid[HW_ADDR_LEN + 3] = DHCP_OPT_END; //terminate tag
 	}
 	IPOIB_EXIT( IPOIB_DBG_RECV );
@@ -2426,8 +2439,14 @@
 		/* Copy the src GID to allow aligned access */
 		cl_memcpy( &gid, &p_ib_arp->src_hw.gid, sizeof(ib_gid_t) );
 		status = ipoib_mac_from_guid( gid.unicast.interface_id, p_port->p_adapter->params.guid_mask, &mac );
-		if( status != IB_SUCCESS )
+		if (status == IB_INVALID_GUID_MASK)
 		{
+			IPOIB_PRINT( TRACE_LEVEL_WARNING, IPOIB_DBG_ERROR,
+				("Invalid GUID mask received, rejecting it") );
+			ipoib_create_log(p_port->p_adapter->h_adapter, GUID_MASK_LOG_INDEX, EVENT_IPOIB_WRONG_PARAMETER_WRN);
+		}
+		else if( status != IB_SUCCESS )
+		{
 			IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,
 				("ipoib_mac_from_guid returned %s\n",
 				p_port->p_adapter->p_ifc->get_err_str( status )) );
Index: D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_driver.c
===================================================================
--- D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_driver.c	(revision 3222)
+++ D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_driver.c	(revision 3228)
@@ -150,6 +150,8 @@
 
 IPOIB_REG_ENTRY HCARegTable[] = {
 	// reg value name             If Required  Offset in parentr struct             Field size                  Default         Min     Max
+	{NDIS_STRING_CONST("GUIDMask"),         1, IPOIB_OFFSET(guid_mask),             IPOIB_SIZE(guid_mask),          0,          0,    MAX_GUID_MAX},
+	/* GUIDMask should be the first element */
 	{NDIS_STRING_CONST("RqDepth"),          1, IPOIB_OFFSET(rq_depth),              IPOIB_SIZE(rq_depth),           512,        128,    1024},
 	{NDIS_STRING_CONST("RqLowWatermark"),   0, IPOIB_OFFSET(rq_low_watermark),      IPOIB_SIZE(rq_low_watermark),   4,          2,      8},
 	{NDIS_STRING_CONST("SqDepth"),          1, IPOIB_OFFSET(sq_depth),              IPOIB_SIZE(sq_depth),           512,        128,    1024},
@@ -160,16 +162,14 @@
 	{NDIS_STRING_CONST("RecvRatio"),        1, IPOIB_OFFSET(recv_pool_ratio),       IPOIB_SIZE(recv_pool_ratio),    1,          1,      10},
 	{NDIS_STRING_CONST("PayloadMtu"),       1, IPOIB_OFFSET(payload_mtu),           IPOIB_SIZE(payload_mtu),        2044,       60,   4092},
 	{NDIS_STRING_CONST("lso"),              0, IPOIB_OFFSET(lso),                   IPOIB_SIZE(lso),                0,          0,      1},
-	{NDIS_STRING_CONST("MCLeaveRescan"),    1, IPOIB_OFFSET(mc_leave_rescan),       IPOIB_SIZE(mc_leave_rescan),    260,        1,    3600},
-	{NDIS_STRING_CONST("GUIDMask"),         1, IPOIB_OFFSET(guid_mask),             IPOIB_SIZE(guid_mask),          0,          0,    MAX_GUID_MAX}
+	{NDIS_STRING_CONST("MCLeaveRescan"),    1, IPOIB_OFFSET(mc_leave_rescan),       IPOIB_SIZE(mc_leave_rescan),    260,        1,    3600}
 	
-	
 };  
 
 #define IPOIB_NUM_REG_PARAMS (sizeof (HCARegTable) / sizeof(IPOIB_REG_ENTRY))
 
 
-static void
+void
 ipoib_create_log(
 	NDIS_HANDLE h_adapter,
 	UINT ind,
Index: D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_driver.h
===================================================================
--- D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_driver.h	(revision 3222)
+++ D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_driver.h	(revision 3228)
@@ -119,9 +119,14 @@
 *		List of adapters in the bundle.  The adapter at the head is the
 *		primary adapter of the bundle.
 *********/
+void
+ipoib_create_log(
+	NDIS_HANDLE h_adapter,
+	UINT ind,
+	ULONG eventLogMsgId);
 
+#define GUID_MASK_LOG_INDEX 0
 
-
 void
 ipoib_resume_oids(
 	IN				ipoib_adapter_t* const		p_adapter );
Index: D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_xfr_mgr.h
===================================================================
--- D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_xfr_mgr.h	(revision 3222)
+++ D:/Windows/MLNX_WINOF/ulp/ipoib/kernel/ipoib_xfr_mgr.h	(revision 3228)
@@ -291,7 +291,7 @@
 	IN			 	uint32_t						guid_mask,
 		OUT			mac_addr_t* const			p_mac_addr )
 {
-#define MAC_ADDR_SIZE 6
+	static const mac_addr_size =  HW_ADDR_LEN;
 	uint8_t i;
 	const uint8_t	*p_guid = (const uint8_t*)&port_guid;
 	int digit_counter = 0;
@@ -301,22 +301,21 @@
 	for (i = 7; guid_mask; guid_mask >>= 1, --i) {
 		if (guid_mask & 1 ) {
 			++digit_counter;
-			if (digit_counter > MAC_ADDR_SIZE) {
+			if (digit_counter > mac_addr_size) {
 				//to avoid negative index
 				return IB_INVALID_GUID_MASK;
 			}
-			p_mac_addr->addr[MAC_ADDR_SIZE - digit_counter] = p_guid [i];
+			p_mac_addr->addr[mac_addr_size - digit_counter] = p_guid [i];
 		}
 	}
 		// check for the mask validity: it should have 6 non-zero bits
-		if (digit_counter != MAC_ADDR_SIZE) {
+		if (digit_counter != mac_addr_size) {
 			return IB_INVALID_GUID_MASK;
 		}
 		
 	return IB_SUCCESS;
 }
 
-
 /*
 * PARAMETERS
 *	port_guid
@@ -372,66 +371,7 @@
 	return IB_SUCCESS;
 }
 
-/****f* IPOIB/ipoib_mac_from_supermicro_guid
-* NAME
-*	ipoib_mac_from_supermicro_guid
-*
-* DESCRIPTION
-*	Generates an ethernet MAC address given a supermicro port GUID.
-*
-* SYNOPSIS
-*/
-static inline ib_api_status_t
-ipoib_mac_from_supermicro_guid(
-	IN		const	net64_t						port_guid,
-		OUT			mac_addr_t* const			p_mac_addr )
-{
-	const uint8_t	*p_guid = (const uint8_t*)&port_guid;
 
-	/* Port guid is in network byte order.  OUI is in lower 3 bytes. */
-	ASSERT( p_guid[0] == 0x00 && p_guid[1] == 0x30 && p_guid[2] == 0x48 
-	&& p_guid[3] == 0xff && p_guid[4] == 0xff);
-
-	p_mac_addr->addr[0] = 0;
-	p_mac_addr->addr[1] = 0x30;
-	p_mac_addr->addr[2] = 0x48; 
-	p_mac_addr->addr[3] = p_guid[5];
-	p_mac_addr->addr[4] = p_guid[6];
-	p_mac_addr->addr[5] = p_guid[7];
-
-	return IB_SUCCESS;
-}
-
-/****f* IPOIB/ipoib_mac_from_cisco_guid
-* NAME
-*	ipoib_mac_from_cisco_guid
-*
-* DESCRIPTION
-*	Generates an ethernet MAC address given a Cisco port GUID.
-*
-* SYNOPSIS
-*/
-static inline ib_api_status_t
-ipoib_mac_from_cisco_guid(
-	IN		const	net64_t						port_guid,
-		OUT			mac_addr_t* const			p_mac_addr )
-{
-	const uint8_t	*p_guid = (const uint8_t*)&port_guid;
-
-	/* Port guid is in network byte order.  OUI is in lower 3 bytes. */
-	ASSERT( p_guid[0] == 0x00 && p_guid[1] == 0x5 && p_guid[2] == 0xad);
-
-	p_mac_addr->addr[0] = 0;
-	p_mac_addr->addr[1] = 0x5;
-	p_mac_addr->addr[2] = 0xad; 
-	p_mac_addr->addr[3] = p_guid[5];
-	p_mac_addr->addr[4] = p_guid[6];
-	p_mac_addr->addr[5] = p_guid[7];
-
-	return IB_SUCCESS;
-}
-
-
 /****f* IPOIB/ipoib_mac_from_guid
 * NAME
 *	ipoib_mac_from_guid
@@ -449,26 +389,26 @@
 		)
 {
 	static const guid_default_mask = 0xE7; //==0b 11100111
-	ib_api_status_t	status;
+	ib_api_status_t	status = IB_INVALID_GUID;
+	ib_api_status_t mask_status = IB_SUCCESS;
 	const uint8_t	*p_guid = (const uint8_t*)&port_guid;
 	uint32_t		laa;
 
 	if ( guid_mask ) 
 	{
-		status = ipoib_mac_from_general_guid(port_guid, guid_mask, p_mac_addr);
-		if( status == IB_SUCCESS )
+		mask_status = ipoib_mac_from_general_guid(port_guid, guid_mask, p_mac_addr);
+		if( mask_status == IB_SUCCESS )
 				return IB_SUCCESS;
 		//otherwise, mask was invalid, getting back to standard flow
-		if (status == IB_INVALID_GUID_MASK)
+		/*if (status == IB_INVALID_GUID_MASK)
 		{
 			IPOIB_PRINT( TRACE_LEVEL_WARNING, IPOIB_DBG_ERROR,
 			("Invalid GUID mask received, rejecting it") );
-		}
+		}*/
 	}
 			
 	if( p_guid[0] == 0 ) 
 	{
-		status = IB_INVALID_GUID;
 		if( p_guid[1] == 0x02 && p_guid[2] == 0xc9 )
 		{
 			status = ipoib_mac_from_mlx_guid( port_guid, p_mac_addr );
@@ -503,9 +443,11 @@
 			status =ipoib_mac_from_general_guid(port_guid, guid_default_mask, p_mac_addr);
 		}
 		
-			if( status == IB_SUCCESS )
-				return IB_SUCCESS;
-		ASSERT(status != IB_INVALID_GUID_MASK);
+		if (status == IB_SUCCESS )
+		{
+			ASSERT ( mask_status == IB_SUCCESS || mask_status == IB_INVALID_GUID_MASK );
+			return mask_status; 
+		}
 	}
 
 	/* Value of zero is reserved. */
@@ -521,7 +463,7 @@
 	p_mac_addr->addr[4] = (uint8_t)(laa >> 8);
 	p_mac_addr->addr[5] = (uint8_t)laa;
 	
-	return IB_SUCCESS;
+	return mask_status;
 }
 /*
 * PARAMETERS