Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_var.h
Show First 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
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; | struct if_snd_tag_rate_limit_params unlimited; | ||||
struct if_snd_tag_rate_limit_params tls_rate_limit; | struct if_snd_tag_rate_limit_params tls_rate_limit; | ||||
}; | }; | ||||
typedef int (if_snd_tag_alloc_t)(struct ifnet *, union if_snd_tag_alloc_params *, | |||||
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_query_t)(struct m_snd_tag *, union if_snd_tag_query_params *); | |||||
typedef void (if_snd_tag_free_t)(struct m_snd_tag *); | |||||
typedef struct m_snd_tag *(if_next_send_tag_t)(struct m_snd_tag *); | |||||
struct if_snd_tag_sw { | |||||
if_snd_tag_modify_t *snd_tag_modify; | |||||
if_snd_tag_query_t *snd_tag_query; | |||||
if_snd_tag_free_t *snd_tag_free; | |||||
if_next_send_tag_t *next_snd_tag; | |||||
}; | |||||
/* Query return flags */ | /* Query return flags */ | ||||
#define RT_NOSUPPORT 0x00000000 /* Not supported */ | #define RT_NOSUPPORT 0x00000000 /* Not supported */ | ||||
#define RT_IS_INDIRECT 0x00000001 /* | #define RT_IS_INDIRECT 0x00000001 /* | ||||
* Interface like a lagg, select | * Interface like a lagg, select | ||||
* the actual interface for | * the actual interface for | ||||
* capabilities. | * capabilities. | ||||
*/ | */ | ||||
#define RT_IS_SELECTABLE 0x00000002 /* | #define RT_IS_SELECTABLE 0x00000002 /* | ||||
* No rate table, you select | * No rate table, you select | ||||
* rates and the first | * rates and the first | ||||
* number_of_rates are created. | * number_of_rates are created. | ||||
*/ | */ | ||||
#define RT_IS_FIXED_TABLE 0x00000004 /* A fixed table is attached */ | #define RT_IS_FIXED_TABLE 0x00000004 /* A fixed table is attached */ | ||||
#define RT_IS_UNUSABLE 0x00000008 /* It is not usable for this */ | #define RT_IS_UNUSABLE 0x00000008 /* It is not usable for this */ | ||||
#define RT_IS_SETUP_REQ 0x00000010 /* The interface setup must be called before use */ | #define RT_IS_SETUP_REQ 0x00000010 /* The interface setup must be called before use */ | ||||
struct if_ratelimit_query_results { | struct if_ratelimit_query_results { | ||||
const uint64_t *rate_table; /* Pointer to table if present */ | const uint64_t *rate_table; /* Pointer to table if present */ | ||||
uint32_t flags; /* Flags indicating results */ | uint32_t flags; /* Flags indicating results */ | ||||
uint32_t max_flows; /* Max flows using, 0=unlimited */ | uint32_t max_flows; /* Max flows using, 0=unlimited */ | ||||
uint32_t number_of_rates; /* How many unique rates can be created */ | uint32_t number_of_rates; /* How many unique rates can be created */ | ||||
uint32_t min_segment_burst; /* The amount the adapter bursts at each send */ | uint32_t min_segment_burst; /* The amount the adapter bursts at each send */ | ||||
}; | }; | ||||
typedef int (if_snd_tag_alloc_t)(struct ifnet *, union if_snd_tag_alloc_params *, | |||||
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_query_t)(struct m_snd_tag *, union if_snd_tag_query_params *); | |||||
typedef void (if_snd_tag_free_t)(struct m_snd_tag *); | |||||
typedef struct m_snd_tag *(if_next_send_tag_t)(struct m_snd_tag *); | |||||
typedef void (if_ratelimit_query_t)(struct ifnet *, | typedef void (if_ratelimit_query_t)(struct ifnet *, | ||||
struct if_ratelimit_query_results *); | struct if_ratelimit_query_results *); | ||||
typedef int (if_ratelimit_setup_t)(struct ifnet *, uint64_t, uint32_t); | typedef int (if_ratelimit_setup_t)(struct ifnet *, uint64_t, uint32_t); | ||||
/* | /* | ||||
* Structure defining a network interface. | * Structure defining a network interface. | ||||
*/ | */ | ||||
struct ifnet { | struct ifnet { | ||||
▲ Show 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | struct ifnet { | ||||
u_int if_hw_tsomax; /* TSO maximum size in bytes */ | u_int if_hw_tsomax; /* TSO maximum size in bytes */ | ||||
u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ | u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ | ||||
u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ | u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ | ||||
/* | /* | ||||
* Network adapter send tag support: | * Network adapter send tag support: | ||||
*/ | */ | ||||
if_snd_tag_alloc_t *if_snd_tag_alloc; | if_snd_tag_alloc_t *if_snd_tag_alloc; | ||||
if_snd_tag_modify_t *if_snd_tag_modify; | |||||
if_snd_tag_query_t *if_snd_tag_query; | /* Ratelimit (packet pacing) */ | ||||
if_snd_tag_free_t *if_snd_tag_free; | |||||
if_next_send_tag_t *if_next_snd_tag; | |||||
if_ratelimit_query_t *if_ratelimit_query; | if_ratelimit_query_t *if_ratelimit_query; | ||||
if_ratelimit_setup_t *if_ratelimit_setup; | if_ratelimit_setup_t *if_ratelimit_setup; | ||||
/* Ethernet PCP */ | /* Ethernet PCP */ | ||||
uint8_t if_pcp; | uint8_t if_pcp; | ||||
/* | /* | ||||
* Debugnet (Netdump) hooks to be called while in db/panic. | * Debugnet (Netdump) hooks to be called while in db/panic. | ||||
▲ Show 20 Lines • Show All 367 Lines • Show Last 20 Lines |