From: tzachid Date: Tue, 4 Nov 2008 13:38:16 +0000 (+0000) Subject: [ipoib] Remove unused functions. X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=85f764f06e3dd991389c6f9adafe6a087694fe05;p=~shefty%2Frdma-win.git [ipoib] Remove unused functions. Signed off by: reuven@mellanox.com git-svn-id: svn://openib.tc.cornell.edu/gen1@1725 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_xfr_mgr.h b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_xfr_mgr.h index ebdb2327..af4e2e27 100644 --- a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_xfr_mgr.h +++ b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_xfr_mgr.h @@ -231,49 +231,53 @@ ipoib_mac_from_mlx_guid( return IB_SUCCESS; } +/* +* PARAMETERS +* port_guid +* The port GUID, in network byte order, for which to generate a +* MAC address. +* +* p_mac_addr +* Pointer to a mac address in which to store the results. +* +* RETURN VALUES +* IB_SUCCESS +* The MAC address was successfully converted. +* +* IB_INVALID_GUID +* The port GUID provided was not a known GUID format. +* +*********/ + -/****f* IPOIB/ipoib_mac_from_dell_guid +/****f* IPOIB/ipoib_mac_from_voltaire_guid * NAME -* ipoib_mac_from_dell_guid +* ipoib_mac_from_voltaire_guid * * DESCRIPTION -* Generates an ethernet MAC address given a DELL port GUID. +* Generates an ethernet MAC address given a Voltaire port GUID. * * SYNOPSIS */ static inline ib_api_status_t -ipoib_mac_from_dell_guid( +ipoib_mac_from_voltaire_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] == 0x18 && p_guid[2] == 0x8b ); - + ASSERT( p_guid[0] == 0x00 && p_guid[1] == 0x08 && p_guid[2] == 0xf1 ); + p_mac_addr->addr[0] = p_guid[0]; p_mac_addr->addr[1] = p_guid[1]; p_mac_addr->addr[2] = p_guid[2]; - p_mac_addr->addr[3] = p_guid[5]; - p_mac_addr->addr[4] = p_guid[6]; - p_mac_addr->addr[5] = p_guid[7]; - + p_mac_addr->addr[3] = p_guid[4] ^ p_guid[6]; + p_mac_addr->addr[4] = p_guid[5] ^ p_guid[7]; + p_mac_addr->addr[5] = p_guid[5] + p_guid[6] + p_guid[7]; + return IB_SUCCESS; } -/* -* PARAMETERS -* port_guid -* The port GUID, in network byte order, for which to generate a -* MAC address. -* -* p_mac_addr -* Pointer to a mac address in which to store the results. -* -* RETURN VALUES -* IB_SUCCESS -* The MAC address was successfully converted. -* -*********/ /****f* IPOIB/ipoib_mac_from_guid_mask @@ -317,7 +321,6 @@ ipoib_mac_from_guid_mask( return IB_SUCCESS; } - /* * PARAMETERS * port_guid @@ -344,36 +347,6 @@ ipoib_mac_from_guid_mask( *********/ -/****f* IPOIB/ipoib_mac_from_voltaire_guid -* NAME -* ipoib_mac_from_voltaire_guid -* -* DESCRIPTION -* Generates an ethernet MAC address given a Voltaire port GUID. -* -* SYNOPSIS -*/ -static inline ib_api_status_t -ipoib_mac_from_voltaire_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] == 0x08 && p_guid[2] == 0xf1 ); - - p_mac_addr->addr[0] = p_guid[0]; - p_mac_addr->addr[1] = p_guid[1]; - p_mac_addr->addr[2] = p_guid[2]; - p_mac_addr->addr[3] = p_guid[4] ^ p_guid[6]; - p_mac_addr->addr[4] = p_guid[5] ^ p_guid[7]; - p_mac_addr->addr[5] = p_guid[5] + p_guid[6] + p_guid[7]; - - return IB_SUCCESS; -} - - /****f* IPOIB/ipoib_mac_from_guid * NAME * ipoib_mac_from_guid @@ -478,143 +451,6 @@ ipoib_mac_from_guid( *********/ -/****f* IPOIB/ipoib_sst_guid_from_mac -* NAME -* ipoib_sst_guid_from_mac -* -* DESCRIPTION -* Generates a port GUID given an ethernet MAC address. -* -* SYNOPSIS -*/ -static inline ib_api_status_t -ipoib_sst_guid_from_mac( - IN const mac_addr_t mac, - OUT net64_t* const p_port_guid ) -{ - uint8_t *p_guid = (uint8_t*)p_port_guid; - uint32_t low24; - - /* MAC address is in network byte order. OUI is in lower 3 bytes. */ - if( mac.addr[0] != 0x00 || - mac.addr[1] != 0x06 || - mac.addr[2] != 0x6a ) - { - return IB_INVALID_GUID; - } - - low24 = mac.addr[3] << 16 || mac.addr[4] << 8 || mac.addr[5]; - - low24 = 0x00FFF000 - low24; - /* Divide by two */ - low24 >>= 1; - /* Add the serial number base offset. */ - low24 += 0x101; - - /* OUI */ - p_guid[0] = mac.addr[0]; - p_guid[1] = mac.addr[1]; - p_guid[2] = mac.addr[2]; - /* Port number */ - p_guid[3] = mac.addr[5] & 0x01; - /* Type */ - p_guid[4] = 0x98; - /* Serial Number */ - p_guid[5] = (uint8_t)(low24 >> 16); - p_guid[6] = (uint8_t)(low24 >> 8); - p_guid[7] = (uint8_t)low24; - - return IB_SUCCESS; -} -/* -* PARAMETERS -* port_guid -* The port GUID, in network byte order, for which to generate a -* MAC address. -* -* p_mac_addr -* Pointer to a mac address in which to store the results. -* -* RETURN VALUES -* IB_SUCCESS -* The MAC address was successfully converted. -* -* IB_INVALID_GUID -* The port GUID provided was not a known GUID format. -* -* NOTES -* The algorithm to convert portGuid to MAC address is as per DN0074, and -* assumes a 2 port HCA. -* -* SEE ALSO -* IPOIB -*********/ - - -/****f* IPOIB/ipoib_mlx_guid_from_mac -* NAME -* ipoib_mlx_guid_from_mac -* -* DESCRIPTION -* Generates a port GUID given an ethernet MAC address. -* -* SYNOPSIS -*/ -static inline ib_api_status_t -ipoib_mlx_guid_from_mac( - IN const mac_addr_t mac, - OUT net64_t* const p_port_guid ) -{ - uint8_t *p_guid = (uint8_t*)p_port_guid; - uint32_t low24; - - /* MAC address is in network byte order. OUI is in lower 3 bytes. */ - if( mac.addr[0] != 0x00 || - mac.addr[1] != 0x02 || - mac.addr[2] != 0xc9 ) - { - return IB_INVALID_GUID; - } - - low24 = mac.addr[3] << 16 || mac.addr[4] << 8 || mac.addr[5]; - - /* OUI */ - p_guid[0] = mac.addr[0]; - p_guid[1] = mac.addr[1]; - p_guid[2] = mac.addr[2]; - p_guid[3] = 0x02; - p_guid[4] = 0x00; - /* Serial Number */ - p_guid[5] = (uint8_t)(low24 >> 16); - p_guid[6] = (uint8_t)(low24 >> 8); - p_guid[7] = (uint8_t)low24; - - return IB_SUCCESS; -} -/* -* PARAMETERS -* port_guid -* The port GUID, in network byte order, for which to generate a -* MAC address. -* -* p_mac_addr -* Pointer to a mac address in which to store the results. -* -* RETURN VALUES -* IB_SUCCESS -* The MAC address was successfully converted. -* -* IB_INVALID_GUID -* The port GUID provided was not a known GUID format. -* -* NOTES -* The algorithm to convert portGuid to MAC address is as -* -* SEE ALSO -* IPOIB -*********/ - - /****f* IPOIB/ipoib_is_voltaire_router_gid * NAME * ipoib_is_voltaire_router_gid