/*
* 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 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* MAC Hybrid I/O related code.
*/
#include <sys/mac_impl.h>
#include <sys/mac_client_impl.h>
#include <sys/mac_client_priv.h>
#include <sys/mac_soft_ring.h>
/*
* Return the number of shares supported by the specified MAC.
*/
int
{
}
/*
* Allocate a share to the specified MAC client. Invoked when
* mac_client_open() is invoked with MAC_OPEN_FLAGS_SHARES_DESIRED set.
*/
void
{
int rv;
mac_client_impl_t *, mcip);
return;
}
}
/*
* Free a share previously allocated through i_mac_share_alloc().
* Safely handles the case when no shares were allocated to the MAC client.
*/
void
{
/* MAC clients are required to unbind they shares before freeing them */
return;
}
}
/*
* Bind a share. After this operation the rings that were associated
* with the MAC client are mapped directly into the corresponding
* guest domain.
*/
int
{
int rv;
return (ENOTSUP);
}
/*
* Temporarly suspend the TX traffic for that client to make sure
* there are no in flight packets through a transmit ring
* which is being bound to another domain.
*/
/*
* For the receive path, no traffic will be sent up through
* the rings to the IO domain. For TX, we need to ensure
* that traffic sent by the MAC client are sent through
* the default ring.
*
* For the transmit path we ensure that packets are sent through the
* default ring if the share of the MAC client is bound, see MAC_TX().
*/
if (rv == 0)
/*
* Resume transmit traffic for the MAC client.
*/
return (rv);
}
/*
* Unbind a share.
*/
void
{
return;
}
/*
* If the link state changed while the share was bound, the
* soft rings fanout associated with the client would have not
* been updated by mac_fanout_recompute(). Do the check here
* now that the share has been unbound.
*/
}