/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* DL_IB MAC Type plugin for the Nemo mac module
*/
#include <sys/byteorder.h>
0xff, 0x10, 0x40, 0x1b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff };
"Infiniband MAC Type plugin 1.0"
};
};
int
_init(void)
{
int err;
return (ENOTSUP);
/*
* So far, generic stats maintained by GLDv3 are sufficient for IB.
*/
mtrp->mtr_statcount = 0;
(void) mactype_unregister(MAC_PLUGIN_IDENT_IB);
}
return (err);
}
int
_fini(void)
{
int err;
return (err);
return (mod_remove(&mac_ib_modlinkage));
}
int
{
}
/*
* MAC Type plugin operations
*/
/* ARGSUSED */
int
{
/*
* The address must not be a multicast address.
*/
}
int
{
/*
* The address must be a multicast address.
*/
return (EINVAL);
/*
* The address must not be the broadcast address.
*/
MAC_IB_GID_SIZE, MAC_IB_GID_SIZE) == 0)
return (EINVAL);
return (0);
}
/*
* Check the legality of a SAP value. The following values are
* allowed, as specified by PSARC 2003/150:
*
* min-ethertype-sap (256).. EtherType max(65535) ethertype semantics
* (0) .. max-802-sap(255) IEEE 802 semantics
*/
{
return (B_TRUE);
}
if (sap <= MAC_IB_MAX_802_SAP) {
*bind_sap = DLS_SAP_LLC;
return (B_TRUE);
}
return (B_FALSE);
}
/* ARGSUSED */
mblk_t *
{
return (NULL);
return (NULL);
return (mp);
}
int
{
return (EINVAL);
else
mac_pdata) == 0) {
} else {
}
hdr_info->mhi_pktsize = 0;
return (0);
}
/*
* Take the provided `mp' (which is expected to have a header "dst + type"),
* and return a pointer to an mblk_t with a header "GRH + type".
* If the conversion cannot be performed, return NULL.
*/
static mblk_t *
{
return (NULL);
return (NULL);
/*
* The plugin framework guarantees that we have the only reference
* to the mblk_t, so we can safely modify it.
*/
return (llmp);
}
/*
* Take the provided `mp' (which is expected to have a header "GRH + type"),
* and return a pointer to an mblk_t with a header "type". If the conversion
* cannot be performed, return NULL.
*/
static mblk_t *
{
/*
* The plugin framework guarantees that we have the only reference to
* the mblk_t and the underlying dblk_t, so we can safely modify it.
*/
return (mp);
}
void
{
/* convert to Mbps */
speed /= 1000000;
buf[0] = 0;
}
NULL,
};