dls_soft_ring.h revision 12554c89453ad4722e4a8e4af492e416d696138e
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_DLS_SOFT_RING_H
#define _SYS_DLS_SOFT_RING_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/processor.h>
#define S_RING_NAMELEN 64
typedef struct soft_ring_s {
/* Keep the most used members 64bytes cache aligned */
int s_ring_count; /* # of mblocks in soft_ring */
void *s_ring_upcall_arg1; /* upcall argument 1 */
void *s_ring_upcall_arg2; /* upcall argument 2 */
} soft_ring_t;
/*
* type flags - combination allowed to process and drain the queue
*/
/*
* State flags.
*/
/*
* arguments for processors to bind to
*/
#define S_RING_BIND_NONE -1
/*
* Structure for dls statistics
*/
struct dls_kstats {
};
extern struct dls_kstats dls_kstat;
extern void soft_ring_init(void);
extern void soft_ring_set_destroy(soft_ring_t **, int);
extern void soft_ring_bind(void *, processorid_t);
extern void soft_ring_unbind(void *);
extern void dls_soft_ring_disable(dls_channel_t);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DLS_SOFT_RING_H */