Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/if_var.h
Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Network interface send tag support. The storage of "struct | * Network interface send tag support. The storage of "struct | ||||
* m_snd_tag" comes from the network driver and it is free to allocate | * m_snd_tag" comes from the network driver and it is free to allocate | ||||
* as much additional space as it wants for its own use. | * as much additional space as it wants for its own use. | ||||
*/ | */ | ||||
struct m_snd_tag; | struct m_snd_tag; | ||||
#define IF_SND_TAG_TYPE_RATE_LIMIT 0 | #define IF_SND_TAG_TYPE_RATE_LIMIT 0 | ||||
#define IF_SND_TAG_TYPE_MAX 1 | #define IF_SND_TAG_TYPE_UNLIMITED 1 | ||||
#define IF_SND_TAG_TYPE_MAX 2 | |||||
struct if_snd_tag_alloc_header { | struct if_snd_tag_alloc_header { | ||||
uint32_t type; /* send tag type, see IF_SND_TAG_XXX */ | uint32_t type; /* send tag type, see IF_SND_TAG_XXX */ | ||||
uint32_t flowid; /* mbuf hash value */ | uint32_t flowid; /* mbuf hash value */ | ||||
uint32_t flowtype; /* mbuf hash type */ | uint32_t flowtype; /* mbuf hash type */ | ||||
}; | }; | ||||
struct if_snd_tag_alloc_rate_limit { | struct if_snd_tag_alloc_rate_limit { | ||||
struct if_snd_tag_alloc_header hdr; | struct if_snd_tag_alloc_header hdr; | ||||
uint64_t max_rate; /* in bytes/s */ | uint64_t max_rate; /* in bytes/s */ | ||||
}; | }; | ||||
struct if_snd_tag_rate_limit_params { | struct if_snd_tag_rate_limit_params { | ||||
uint64_t max_rate; /* in bytes/s */ | uint64_t max_rate; /* in bytes/s */ | ||||
uint32_t queue_level; /* 0 (empty) .. 65535 (full) */ | |||||
#define IF_SND_QUEUE_LEVEL_MIN 0 | |||||
#define IF_SND_QUEUE_LEVEL_MAX 65535 | |||||
uint32_t reserved; /* padding */ | |||||
}; | }; | ||||
union if_snd_tag_alloc_params { | union if_snd_tag_alloc_params { | ||||
struct if_snd_tag_alloc_header hdr; | struct if_snd_tag_alloc_header hdr; | ||||
struct if_snd_tag_alloc_rate_limit rate_limit; | struct if_snd_tag_alloc_rate_limit rate_limit; | ||||
struct if_snd_tag_alloc_rate_limit unlimited; | |||||
}; | }; | ||||
union if_snd_tag_modify_params { | union if_snd_tag_modify_params { | ||||
struct if_snd_tag_rate_limit_params rate_limit; | struct if_snd_tag_rate_limit_params rate_limit; | ||||
struct if_snd_tag_rate_limit_params unlimited; | |||||
}; | }; | ||||
union if_snd_tag_query_params { | union if_snd_tag_query_params { | ||||
struct if_snd_tag_rate_limit_params rate_limit; | struct if_snd_tag_rate_limit_params rate_limit; | ||||
struct if_snd_tag_rate_limit_params unlimited; | |||||
}; | }; | ||||
typedef int (if_snd_tag_alloc_t)(struct ifnet *, union if_snd_tag_alloc_params *, | typedef int (if_snd_tag_alloc_t)(struct ifnet *, union if_snd_tag_alloc_params *, | ||||
struct m_snd_tag **); | struct m_snd_tag **); | ||||
typedef int (if_snd_tag_modify_t)(struct m_snd_tag *, union if_snd_tag_modify_params *); | typedef int (if_snd_tag_modify_t)(struct m_snd_tag *, union if_snd_tag_modify_params *); | ||||
typedef int (if_snd_tag_query_t)(struct m_snd_tag *, union if_snd_tag_query_params *); | typedef int (if_snd_tag_query_t)(struct m_snd_tag *, union if_snd_tag_query_params *); | ||||
typedef void (if_snd_tag_free_t)(struct m_snd_tag *); | typedef void (if_snd_tag_free_t)(struct m_snd_tag *); | ||||
▲ Show 20 Lines • Show All 500 Lines • Show Last 20 Lines |