<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=801433113-04112008><FONT face=Arial color=#0000ff size=2>mlnx
3420</FONT></SPAN></DIV>
<DIV><SPAN class=801433113-04112008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=801433113-04112008><FONT face=Arial color=#0000ff
size=2>Applied to trunk and branch on 1724, 1725</FONT></SPAN></DIV>
<DIV><SPAN class=801433113-04112008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=801433113-04112008><FONT face=Arial color=#0000ff
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=801433113-04112008><FONT face=Arial color=#0000ff
size=2>Tzachi</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Reuven Amitai <BR><B>Sent:</B> Monday,
November 03, 2008 3:36 PM<BR><B>To:</B> Tzachi Dar<BR><B>Cc:</B>
ofw@lists.openfabrics.org<BR><B>Subject:</B> [PATCH] remove unused
functions<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff size=2>Hi
Tzachi,</FONT></SPAN></DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff size=2>The
patch removes the following functions (they are not used
anymore):</FONT></SPAN></DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff
size=2> ipoib_mac_from_dell_guid(),</FONT></SPAN></DIV>
<DIV><SPAN class=503252813-03112008></SPAN><SPAN
class=503252813-03112008><FONT face=Arial color=#0000ff
size=2> ipoib_sst_guid_from_mac(),</FONT></SPAN></DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff
size=2> ipoib_mlx_guid_from_mac()</FONT></SPAN></DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN><SPAN class=503252813-03112008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff size=2>I'm
sure that mac_from_dell_guid() can be removed (since we used generic
function instead - mac_from_guid_mask)</FONT></SPAN></DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff size=2>I'm
not sure if we ever used/will use the latter two functions. Your
comments will be helpful.</FONT></SPAN></DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><EM>Thanks,
Reuven.</EM></FONT></DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff
size=2>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>></FONT></SPAN></DIV>
<DIV><SPAN class=503252813-03112008><FONT face=Arial color=#0000ff
size=2>Index:
ulp/ipoib/kernel/ipoib_xfr_mgr.h<BR>===================================================================<BR>---
ulp/ipoib/kernel/ipoib_xfr_mgr.h (revision 1722)<BR>+++
ulp/ipoib/kernel/ipoib_xfr_mgr.h (working copy)<BR>@@ -231,49 +231,53
@@<BR> <BR> return IB_SUCCESS;<BR> }<BR>+/*<BR>+*
PARAMETERS<BR>+* port_guid<BR>+* The port GUID, in network
byte order, for which to generate a<BR>+* MAC
address.<BR>+*<BR>+* p_mac_addr<BR>+* Pointer to a mac address
in which to store the results.<BR>+*<BR>+* RETURN
VALUES<BR>+* IB_SUCCESS<BR>+* The MAC address was successfully
converted.<BR>+*<BR>+* IB_INVALID_GUID<BR>+* The port GUID
provided was not a known GUID
format.<BR>+*<BR>+*********/<BR> <BR>-/****f*
IPOIB/ipoib_mac_from_dell_guid<BR>+<BR>+/****f*
IPOIB/ipoib_mac_from_voltaire_guid<BR> *
NAME<BR>-* ipoib_mac_from_dell_guid<BR>+* ipoib_mac_from_voltaire_guid<BR> *<BR> *
DESCRIPTION<BR>-* Generates an ethernet MAC address given a DELL port
GUID.<BR>+* Generates an ethernet MAC address given a Voltaire port
GUID.<BR> *<BR> * SYNOPSIS<BR> */<BR> static inline
ib_api_status_t<BR>-ipoib_mac_from_dell_guid(<BR>+ipoib_mac_from_voltaire_guid(<BR> IN const net64_t port_guid,<BR> OUT mac_addr_t*
const p_mac_addr )<BR> {<BR> const
uint8_t *p_guid = (const
uint8_t*)&port_guid;<BR> <BR> /* Port guid is in network
byte order. OUI is in lower 3 bytes. */<BR>- ASSERT( p_guid[0] ==
0x00 && p_guid[1] == 0x18 && p_guid[2] == 0x8b
);<BR>- <BR>+ ASSERT( p_guid[0] == 0x00 && p_guid[1] == 0x08
&& p_guid[2] == 0xf1 );<BR>+<BR> p_mac_addr->addr[0] =
p_guid[0];<BR> p_mac_addr->addr[1] =
p_guid[1];<BR> p_mac_addr->addr[2] =
p_guid[2];<BR>- p_mac_addr->addr[3] =
p_guid[5];<BR>- p_mac_addr->addr[4] =
p_guid[6];<BR>- p_mac_addr->addr[5] =
p_guid[7];<BR>- <BR>+ p_mac_addr->addr[3] = p_guid[4] ^
p_guid[6];<BR>+ p_mac_addr->addr[4] = p_guid[5] ^
p_guid[7];<BR>+ p_mac_addr->addr[5] = p_guid[5] + p_guid[6] +
p_guid[7];<BR>+<BR> return IB_SUCCESS;<BR> }<BR>-/*<BR>-*
PARAMETERS<BR>-* port_guid<BR>-* The port GUID, in network
byte order, for which to generate a<BR>-* MAC
address.<BR>-*<BR>-* p_mac_addr<BR>-* Pointer to a mac address
in which to store the results.<BR>-*<BR>-* RETURN
VALUES<BR>-* IB_SUCCESS<BR>-* The MAC address was successfully
converted.<BR>-*<BR>-*********/<BR> <BR> <BR> /****f*
IPOIB/ipoib_mac_from_guid_mask<BR>@@ -317,7 +321,6
@@<BR> <BR> return
IB_SUCCESS;<BR> }<BR>-<BR> /*<BR> *
PARAMETERS<BR> * port_guid<BR>@@ -344,36 +347,6
@@<BR> *********/<BR> <BR> <BR>-/****f*
IPOIB/ipoib_mac_from_voltaire_guid<BR>-*
NAME<BR>-* ipoib_mac_from_voltaire_guid<BR>-*<BR>-*
DESCRIPTION<BR>-* Generates an ethernet MAC address given a Voltaire port
GUID.<BR>-*<BR>-* SYNOPSIS<BR>-*/<BR>-static inline
ib_api_status_t<BR>-ipoib_mac_from_voltaire_guid(<BR>- IN const net64_t port_guid,<BR>- OUT mac_addr_t*
const p_mac_addr )<BR>-{<BR>- const uint8_t *p_guid
= (const uint8_t*)&port_guid;<BR>-<BR>- /* Port guid is in network
byte order. OUI is in lower 3 bytes. */<BR>- ASSERT( p_guid[0] ==
0x00 && p_guid[1] == 0x08 && p_guid[2] == 0xf1
);<BR>-<BR>- p_mac_addr->addr[0] =
p_guid[0];<BR>- p_mac_addr->addr[1] =
p_guid[1];<BR>- p_mac_addr->addr[2] =
p_guid[2];<BR>- p_mac_addr->addr[3] = p_guid[4] ^
p_guid[6];<BR>- p_mac_addr->addr[4] = p_guid[5] ^
p_guid[7];<BR>- p_mac_addr->addr[5] = p_guid[5] + p_guid[6] +
p_guid[7];<BR>-<BR>- return IB_SUCCESS;<BR>-}<BR>-<BR>-<BR> /****f*
IPOIB/ipoib_mac_from_guid<BR> *
NAME<BR> * ipoib_mac_from_guid<BR>@@ -478,143 +451,6
@@<BR> *********/<BR> <BR> <BR>-/****f*
IPOIB/ipoib_sst_guid_from_mac<BR>-*
NAME<BR>-* ipoib_sst_guid_from_mac<BR>-*<BR>-*
DESCRIPTION<BR>-* Generates a port GUID given an ethernet MAC
address.<BR>-*<BR>-* SYNOPSIS<BR>-*/<BR>-static inline
ib_api_status_t<BR>-ipoib_sst_guid_from_mac(<BR>- IN const mac_addr_t mac,<BR>- OUT net64_t*
const p_port_guid
)<BR>-{<BR>- uint8_t *p_guid =
(uint8_t*)p_port_guid;<BR>- uint32_t low24;<BR>-<BR>- /* MAC
address is in network byte order. OUI is in lower 3 bytes.
*/<BR>- if( mac.addr[0] != 0x00 || <BR>- mac.addr[1] != 0x06
|| <BR>- mac.addr[2] != 0x6a )<BR>- {<BR>- return
IB_INVALID_GUID;<BR>- }<BR>-<BR>- low24 = mac.addr[3] << 16 ||
mac.addr[4] << 8 || mac.addr[5];<BR>-<BR>- low24 = 0x00FFF000 -
low24;<BR>- /* Divide by two */<BR>- low24 >>= 1;<BR>- /*
Add the serial number base offset. */<BR>- low24 +=
0x101;<BR>-<BR>- /* OUI */<BR>- p_guid[0] =
mac.addr[0];<BR>- p_guid[1] = mac.addr[1];<BR>- p_guid[2] =
mac.addr[2];<BR>- /* Port number */<BR>- p_guid[3] = mac.addr[5]
& 0x01;<BR>- /* Type */<BR>- p_guid[4] = 0x98;<BR>- /*
Serial Number */<BR>- p_guid[5] = (uint8_t)(low24 >>
16);<BR>- p_guid[6] = (uint8_t)(low24 >> 8);<BR>- p_guid[7] =
(uint8_t)low24;<BR>- <BR>- return IB_SUCCESS;<BR>-}<BR>-/*<BR>-*
PARAMETERS<BR>-* port_guid<BR>-* The port GUID, in network
byte order, for which to generate a<BR>-* MAC
address.<BR>-*<BR>-* p_mac_addr<BR>-* Pointer to a mac address
in which to store the results.<BR>-*<BR>-* RETURN
VALUES<BR>-* IB_SUCCESS<BR>-* The MAC address was successfully
converted.<BR>-*<BR>-* IB_INVALID_GUID<BR>-* The port GUID
provided was not a known GUID format.<BR>-*<BR>-* NOTES<BR>-* The
algorithm to convert portGuid to MAC address is as per DN0074,
and<BR>-* assumes a 2 port HCA.<BR>-*<BR>-* SEE
ALSO<BR>-* IPOIB<BR>-*********/<BR>-<BR>-<BR>-/****f*
IPOIB/ipoib_mlx_guid_from_mac<BR>-*
NAME<BR>-* ipoib_mlx_guid_from_mac<BR>-*<BR>-*
DESCRIPTION<BR>-* Generates a port GUID given an ethernet MAC
address.<BR>-*<BR>-* SYNOPSIS<BR>-*/<BR>-static inline
ib_api_status_t<BR>-ipoib_mlx_guid_from_mac(<BR>- IN const mac_addr_t mac,<BR>- OUT net64_t*
const p_port_guid
)<BR>-{<BR>- uint8_t *p_guid =
(uint8_t*)p_port_guid;<BR>- uint32_t low24;<BR>-<BR>- /* MAC
address is in network byte order. OUI is in lower 3 bytes.
*/<BR>- if( mac.addr[0] != 0x00 || <BR>- mac.addr[1] != 0x02
|| <BR>- mac.addr[2] != 0xc9 )<BR>- {<BR>- return
IB_INVALID_GUID;<BR>- }<BR>-<BR>- low24 = mac.addr[3] << 16 ||
mac.addr[4] << 8 || mac.addr[5];<BR>-<BR>- /* OUI
*/<BR>- p_guid[0] = mac.addr[0];<BR>- p_guid[1] =
mac.addr[1];<BR>- p_guid[2] = mac.addr[2];<BR>- p_guid[3] =
0x02;<BR>- p_guid[4] = 0x00;<BR>- /* Serial Number
*/<BR>- p_guid[5] = (uint8_t)(low24 >> 16);<BR>- p_guid[6] =
(uint8_t)(low24 >> 8);<BR>- p_guid[7] =
(uint8_t)low24;<BR>- <BR>- return IB_SUCCESS;<BR>-}<BR>-/*<BR>-*
PARAMETERS<BR>-* port_guid<BR>-* The port GUID, in network
byte order, for which to generate a<BR>-* MAC
address.<BR>-*<BR>-* p_mac_addr<BR>-* Pointer to a mac address
in which to store the results.<BR>-*<BR>-* RETURN
VALUES<BR>-* IB_SUCCESS<BR>-* The MAC address was successfully
converted.<BR>-*<BR>-* IB_INVALID_GUID<BR>-* The port GUID
provided was not a known GUID format.<BR>-*<BR>-* NOTES<BR>-* The
algorithm to convert portGuid to MAC address is as <BR>-*<BR>-* SEE
ALSO<BR>-* IPOIB<BR>-*********/<BR>-<BR>-<BR> /****f*
IPOIB/ipoib_is_voltaire_router_gid<BR> *
NAME<BR> * ipoib_is_voltaire_router_gid<BR></FONT></SPAN></DIV></BLOCKQUOTE></BODY></HTML>