/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <hxge_impl.h>
#include <hpi_pfc.h>
static uint64_t
{
switch (op_type) {
case TCAM_RWC_STAT:
while ((try_counter) &&
try_counter--;
}
if (!try_counter) {
" TCAM RWC_STAT operation"
" failed to complete \n"));
return (HPI_PFC_TCAM_HW_ERROR);
}
break;
case TCAM_RWC_MATCH:
while ((try_counter) &&
try_counter--;
}
if (!try_counter) {
" TCAM Match operationfailed to find match \n"));
}
break;
default:
" Invalid TCAM completion Request \n"));
}
}
{
/*
* Hydra doesn't allow to read TCAM entries. Use compare instead.
*/
return (HPI_SUCCESS);
else
return (HPI_FAILURE);
}
{
if (tcam_stat & HPI_FAILURE) {
"TCAM RAM read failed loc %d \n", location));
return (HPI_PFC_ASC_RAM_RD_ERROR);
}
return (HPI_SUCCESS);
}
{
" tcam ascr write: location %x data %llx ctl value %llx \n",
if (tcam_stat & HPI_FAILURE) {
"TCAM RAM write failed loc %d \n", location));
return (HPI_PFC_ASC_RAM_WR_ERROR);
}
return (HPI_SUCCESS);
}
static hpi_status_t
{
offset = PFC_CONFIG;
return (HPI_SUCCESS);
}
static hpi_status_t
{
offset = PFC_CONFIG;
return (HPI_SUCCESS);
}
{
/*
* Read the register first.
*/
if (tcam)
else
}
{
/*
* Read the register first.
*/
if (l2_hash)
else
}
{
/*
* Read the register first.
*/
if (cksum)
else
}
{
return (HPI_FAILURE);
}
{
if (slot >= PFC_N_MAC_ADDRESSES) {
return (HPI_FAILURE);
}
if (slot < 24) {
} else {
}
}
{
if (slot >= PFC_N_MAC_ADDRESSES) {
return (HPI_FAILURE);
}
if (slot < 24) {
} else {
}
}
{
if (force)
else
}
{
int i;
int offset;
table_entry.value = 0;
for (i = 0; i < HXGE_VLAN_TABLE_ENTRIES; i++) {
}
return (HPI_SUCCESS);
}
{
/*
* Assumes that the hardware will generate the new parity
* data.
*/
return (HPI_SUCCESS);
}
{
/*
* Assumes that the hardware will generate the new parity
* data.
*/
return (HPI_SUCCESS);
}
{
vlan_control.value = 0;
if (parity)
else
if (valid)
else
return (HPI_SUCCESS);
}
{
return (HPI_SUCCESS);
}
{
if (slot >= PFC_N_MAC_ADDRESSES)
return (HPI_FAILURE);
}
{
if (slot >= PFC_N_MAC_ADDRESSES)
return (HPI_FAILURE);
return (HPI_SUCCESS);
}
{
if (slot >= PFC_N_MAC_ADDRESSES)
return (HPI_FAILURE);
return (HPI_SUCCESS);
}
{
if (slot >= PFC_N_MAC_ADDRESSES)
return (HPI_FAILURE);
return (HPI_SUCCESS);
}
int slot)
{
if (slot >= PFC_N_MAC_ADDRESSES)
return (HPI_FAILURE);
if (valid)
else
return (HPI_SUCCESS);
}
{
if (slot >= PFC_N_MAC_ADDRESSES)
return (HPI_FAILURE);
if (cfg.lookup_enable)
else
else
return (HPI_SUCCESS);
}
{
if (slot >= PFC_N_MAC_ADDRESSES)
return (HPI_FAILURE);
else
cfg->lookup_enable = 0;
else
return (HPI_SUCCESS);
}
static hpi_status_t
{
return (HPI_SUCCESS);
}
{
return (HPI_SUCCESS);
}
{
int i;
for (i = 0; i < PFC_N_TCAM_ENTRIES; i++) {
(void) hpi_pfc_tcam_entry_invalidate(handle, i);
}
return (HPI_SUCCESS);
}
{
" tcam write: location %x\n key: %llx %llx\n mask: %llx %llx\n",
if (tcam_stat & HPI_FAILURE) {
"TCAM Write failed loc %d \n", location));
return (HPI_PFC_TCAM_WR_ERROR);
}
return (HPI_SUCCESS);
}
{
return (HPI_SUCCESS);
}
{
return (HPI_SUCCESS);
}
{
if (discard)
else
return (HPI_SUCCESS);
}
{
if (fin)
else
return (HPI_SUCCESS);
}
{
if (syn)
else
return (HPI_SUCCESS);
}
{
if (rst)
else
return (HPI_SUCCESS);
}
{
if (push)
else
return (HPI_SUCCESS);
}
{
if (ack)
else
return (HPI_SUCCESS);
}
{
src_hash_seed.value = 0;
return (HPI_SUCCESS);
}
{
return (HPI_SUCCESS);
}
{
return (HPI_SUCCESS);
}
{
if (drop)
else
if (tcam_parity_error)
else
if (vlan_parity_error)
else
return (HPI_SUCCESS);
}
{
return (HPI_SUCCESS);
}
{
if (vlan_drop)
if (tcam_drop)
if (class_code_drop)
if (l2_addr_drop)
if (tcp_ctrl_drop)
return (HPI_SUCCESS);
}
{
return (HPI_SUCCESS);
}
{
return (HPI_SUCCESS);
}
{
return (HPI_SUCCESS);
}
{
if (slot >= PFC_N_MAC_ADDRESSES)
return (HPI_FAILURE);
/*
* Read the MAC address out of the SPROM at the blade's
* specific location.
*/
return (HPI_SUCCESS);
}
{
int i;
for (i = 0; i < 16; i++) {
num++;
}
return (HPI_SUCCESS);
}