2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved. 2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * PURPOSE: Interface Adapter management 2N/A * Description: Interfaces in this file are completely described in 2N/A * the DAPL 1.1 API, Chapter 6, section 2 2N/A#
endif /* IBHOSTS_NAMING */ 2N/A * Determine whether the platform supports RO (Relaxed ordering) 2N/A * Return B_TRUE if it does support RO and B_FALSE if it does not support RO 2N/A * udapl_ro_disallowed is an out paramter returning whether or not 2N/A * relaxed ordering should be disabled (regardless of whether the platform 2N/A * is capable of supporting relaxed ordering) 2N/A "SUNW,Sun-Fire-V215",
2N/A "SUNW,Sun-Fire-V245",
2N/A "SUNW,Sun-Fire-V445",
2N/A "SUNW,Sun-Fire-T1000",
2N/A "SUNW,Sun-Fire-T200",
2N/A "SUNW,Sun-Blade-T6300",
2N/A "SUNW,Sun-Blade-T6320",
2N/A "SUNW,SPARC-Enterprise-T1000",
2N/A "SUNW,SPARC-Enterprise-T2000",
2N/A "SUNW,SPARC-Enterprise-T5120",
2N/A "SUNW,SPARC-Enterprise-T5220",
2N/A "pci-relaxed-ordering-disallowed";
2N/A * This function only finds and looks at the FIRST udapl node. 2N/A * It is assumed that there can only be one such node. 2N/A * DAPL Requirements Version xxx, 6.2.1.1 2N/A * Open a provider and return a handle. The handle enables the user 2N/A * to invoke operations on this provider. 2N/A * The dat_ia_open call is actually part of the DAT registration module. 2N/A * That function maps the DAT_NAME parameter of dat_ia_open to a DAT_PROVIDER, 2N/A * and calls this function. 2N/A * async_evd_handle_ptr 2N/A * DAT_INSUFFICIENT_RESOURCES 2N/A * DAT_INVALID_PARAMETER 2N/A * DAT_INVALID_HANDLE 2N/A * DAT_NAME_NOT_FOUND (returned by dat registry if necessary) 2N/A "dapl_ia_open(%s, %d, %p, %p, %d)\n",
2N/A "dapl_ia_open: dapl_provider_list_search(\"%s\") returned " 2N/A /* ia_handle_ptr and async_evd_handle_ptr cannot be NULL */ 2N/A /* initialize the caller's OUT param */ 2N/A /* get the hca_ptr */ 2N/A * Open the HCA if it has not been done before. 2N/A /* register with the HW */ 2N/A /* create a cq domain for this HCA */ 2N/A * Obtain the IP address associated with this name and HCA. 2N/A#
endif /* IBHOSTS_NAMING */ 2N/A * Obtain IA attributes from the HCA to limit certain 2N/A * If using DAPL_ATS naming, ib_query_hca will also set the ip 2N/A /* is the IA going to use the ConnectX? */ 2N/A * We are running with a ConnectX. 2N/A * Determine whether platform is RO capable. 2N/A * If platform support RO and client does not 2N/A * support RO and we are not disabling RO, reject the open. 2N/A "dapl_ia_open: failing ro_disallowed %d " 2N/A "ro_aware_client %d \n",
2N/A /* We are not running with a Connect X */ 2N/A /* Take a reference on the hca_handle */ 2N/A /* Allocate and initialize ia structure */ 2N/A * Note when we should be disabling relaxed ordering. 2N/A * If the property indicates that we should not use relaxed ordering 2N/A * we remember that fact. If the platform is supposed to be 2N/A * non relaxed ordering capable, we disable relaxed ordering as 2N/A * well, just in case the property or the list indicating that 2N/A * this platform is not relaxed ordering capable is mistaken. 2N/A * we need an async EVD for this IA 2N/A * use the one passed in (if non-NULL) or create one 2N/A * InfiniBand allows only 1 asychronous event handler per HCA 2N/A * (see InfiniBand Spec, release 1.1, vol I, section 11.5.2, 2N/A * We only need to make sure that this EVD's CQ belongs to 2N/A * the same HCA as is being opened. 2N/A * Verify we have >0 length, and let the provider check the 2N/A * The async EVD for this HCA has already been assigned. 2N/A * It's an error to try and assign another one. 2N/A * However, we need to somehow allow multiple IAs 2N/A * off of the same HCA. The right way to do this 2N/A * is by dispatching events off the HCA to the 2N/A * appropriate IA, but we aren't there yet. So for 2N/A * now we create the EVD but don't connect it to 2N/A * Register the handlers associated with the async EVD. 2N/A /* Assign the EVD so it gets cleaned up */ 2N/A /* This will release the async EVD if needed. */ 2N/A "dapl_ia_open () returns 0x%x\n",
2N/A * Clean up partially allocated HCA stuff. Strictly to make cleanup 2N/A * dapli_assign_hca_ip_address 2N/A * Obtain the IP address of the passed in name, which represents a 2N/A * port on the hca. There are three methods here to obtain the 2N/A * appropriate IP address, each with their own shortcoming: 2N/A * 1) IPOIB_NAMING. Requires the implementation of the IPoIB 2N/A * not the recommended interface as IPoIB is limited at 2N/A * the point we need to obtain an IP address on the 2N/A * passive side of a connection. The code supporting this 2N/A * implementation has been removed. 2N/A * file. The immediate drawback here is that we must dictate 2N/A * how to name the interface, which is a stated DAPL non-goal. 2N/A * In the broader perspective, this method requires us to xmit 2N/A * the IP address in the private data of a connection, which has 2N/A * other fun problems. This is the default method and is known to 2N/A * work, but it has problems. 2N/A * 3) Obtain the IP address from the driver, which has registered 2N/A * the address with the SA for retrieval. 2N/A * hca_ptr Pointer to HCA structure 2N/A * device_name Name of device as reported by the provider 2N/A * char * to string number 2N/A * Obtain the IP address of the adapter. This is a simple 2N/A * scheme that creates a name that must appear available to 2N/A * DNS, e.g. it must be in the local site DNS or in the local 2N/A * <hostname>-ib<index> 2N/A * This scheme obviously doesn't work with adapters from 2N/A * multiple vendors, but will suffice in common installations. 2N/A /* Not registered in DNS, provide a dummy value */ 2N/A * hca_address is defined as a DAT_SOCK_ADDR6 whereas ai_addr 2N/A * dapli_stup_dummy_addr 2N/A * Set up a dummy local address for the HCA. Things are not going 2N/A * to work too well if this happens. 2N/A * We call this routine if: 2N/A * - remote host adapter name is not in DNS 2N/A * - IPoIB implementation is not correctly set up 2N/A * - Similar nonsense. 2N/A * rhost_name Name of remote adapter 2N/A /* Not registered in DNS, provide a dummy value */ 2N/A * dapls_get_adapter_num 2N/A * Given a device name, return a string of the device number 2N/A * device_name Name of device as reported by the provider 2N/A * char * to string number 2N/A * Optimisticaly simple algorithm: the device number appears at 2N/A * the end of the device name string. Device that do not end 2N/A * in a number are by default "0". 2N/A#
endif /* IBHOSTS_NAMING */