c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * CDDL HEADER START
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * The contents of this file are subject to the terms of the
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * Common Development and Distribution License (the "License").
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * You may not use this file except in compliance with the License.
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * See the License for the specific language governing permissions
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * and limitations under the License.
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * When distributing Covered Code, include this CDDL HEADER in each
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * If applicable, add the following below this CDDL HEADER, with the
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * fields enclosed by brackets "[]" replaced with your own identifying
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * information: Portions Copyright [yyyy] [name of copyright owner]
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * CDDL HEADER END
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Otaextern int rdsv3_init(void);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Otaextern void rdsv3_exit(void);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Otaextern void rdsv3_cong_init(void);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Otaextern void rdsv3_cong_exit(void);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Otaextern void rdsv3_trans_init(void);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Otaextern void rdsv3_trans_exit(void);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Otaextern int rdsv3_sock_init(void);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Otaextern void rdsv3_sock_exit(void);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota/* global */
80166370c2a40fb8d363daf1c827e4ddc7d69cf6agiriextern void rdsv3_bind_init();
80166370c2a40fb8d363daf1c827e4ddc7d69cf6agiriextern void rdsv3_bind_exit();
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota rdsv3_alloc_cache = kmem_cache_create("rdsv3_alloc_cache",
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota sizeof (struct rsock) + sizeof (struct rdsv3_sock), 0, NULL,
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota "kmem_cache_create(rdsv3_alloc_cache) failed");
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota return (-1);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota mutex_init(&rdsv3_sock_lock, NULL, MUTEX_DRIVER, NULL);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota list_create(&rdsv3_sock_list, sizeof (struct rdsv3_sock),
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota return (0);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota RDSV3_DPRINTF2("rdsv3_attach", "Enter (dip: %p)", dip);
6e18d381c642549b8bb1774a803d3510aec6baafagiri RDSV3_DPRINTF2("rdsv3_attach", "Multiple RDS instances are"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota " not supported (rdsv3_dev_info: 0x%p)", rdsv3_dev_info);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota mutex_init(&rdsv3_rdma_listen_id_lock, NULL, MUTEX_DRIVER, NULL);
6e18d381c642549b8bb1774a803d3510aec6baafagiri RDSV3_DPRINTF2("rdsv3_attach", "rdsv3_init failed: %d", ret);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota ret = ddi_create_minor_node(dip, "rdsv3", S_IFCHR, 0, DDI_PSEUDO, 0);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota cmn_err(CE_CONT, "ddi_create_minor_node failed: %d", ret);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota RDSV3_DPRINTF2("rdsv3_detach", "Enter (dip: %p)", dip);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota/* ARGSUSED */
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Otardsv3_info(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg, void **result)
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota RDSV3_DPRINTF2("rdsv3_info", "Enter (dip: %p, cmd: %d)", dip, cmd);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota/* Driver entry points */
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota/* Device options */
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota 0, /* refcnt */
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota &rdsv3_cb_ops, /* driver ops - devctl interfaces */
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * Module linkage information.
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota /* Initialize logging */
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota if (ret != 0) {
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * Could not load module
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota return (0);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * Remove module
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota /* Stop logging */
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota return (0);