mac_flow.h revision da14cebe459d3275048785f25bd869cb09b5307f
/*
* 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.
*/
#ifndef _MAC_FLOW_H
#define _MAC_FLOW_H
/*
* Main structure describing a flow of packets, for classification use
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/ethernet.h>
#define MAXFLOWNAME 32
/* need to use MAXMACADDRLEN from dld.h instead of this one */
#define MAXMACADDR 20
/* Bit-mask for the selectors carried in the flow descriptor */
typedef uint64_t flow_mask_t;
#pragma pack(4)
#endif
typedef struct flow_desc_s {
} flow_desc_t;
#define MRP_NCPUS 128
/*
* In MCM_CPUS mode, cpu bindings is user specified. In MCM_FANOUT mode,
* user only specifies a fanout count.
* mc_fanout_cnt gives the number of CPUs used for fanout soft rings.
* mc_fanout_cpus[] array stores the CPUs used for fanout soft rings.
*/
typedef enum {
MCM_FANOUT = 1,
typedef struct mac_cpus_props_s {
/*
* interrupt cpu: mrp_intr_cpu less than 0 implies platform limitation
* in retargetting the interrupt assignment.
*/
} mac_cpus_t;
/* Priority values */
typedef enum {
/* The default priority for links */
#define MPL_LINK_DEFAULT MPL_HIGH
/* The default priority for flows */
#define MPL_SUBFLOW_DEFAULT MPL_MEDIUM
#define MRP_THROTTLE MRP_MAXBW
/* 3 levels - low, medium, high */
#define MRP_PRIORITY_LEVELS 3
/* Special value denoting no bandwidth control */
#define MRP_MAXBW_RESETVAL -1ULL
/*
* Until sub-megabit limit is implemented,
* reject values lower than 1 MTU per tick or 1.2Mbps
*/
#define MRP_MAXBW_MINVAL 1200000
typedef struct mac_resource_props_s {
/*
* Bit-mask for the network resource control types types
*/
int ncpus; \
} else { \
} \
}
typedef struct flow_stats_s {
} flow_stats_t;
typedef enum {
} flow_stat_t;
#pragma pack()
#endif
#ifdef __cplusplus
}
#endif
#endif /* _MAC_FLOW_H */