Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_lagg.h
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | struct lagg_reqopts { | ||||
char ro_ifname[IFNAMSIZ]; /* name of the lagg */ | char ro_ifname[IFNAMSIZ]; /* name of the lagg */ | ||||
int ro_opts; /* Option bitmap */ | int ro_opts; /* Option bitmap */ | ||||
#define LAGG_OPT_NONE 0x00 | #define LAGG_OPT_NONE 0x00 | ||||
#define LAGG_OPT_USE_FLOWID 0x01 /* enable use of flowid */ | #define LAGG_OPT_USE_FLOWID 0x01 /* enable use of flowid */ | ||||
/* Pseudo flags which are used in ro_opts but not stored into sc_opts. */ | /* Pseudo flags which are used in ro_opts but not stored into sc_opts. */ | ||||
#define LAGG_OPT_FLOWIDSHIFT 0x02 /* set flowid shift */ | #define LAGG_OPT_FLOWIDSHIFT 0x02 /* set flowid shift */ | ||||
#define LAGG_OPT_USE_NUMA 0x04 /* enable use of numa */ | #define LAGG_OPT_USE_NUMA 0x04 /* enable use of numa */ | ||||
#define LAGG_OPT_USE_RL 0x08 /* enable use of ratelimit */ | |||||
#define LAGG_OPT_FLOWIDSHIFT_MASK 0x1f /* flowid is uint32_t */ | #define LAGG_OPT_FLOWIDSHIFT_MASK 0x1f /* flowid is uint32_t */ | ||||
#define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ | #define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ | ||||
#define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ | #define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ | ||||
#define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ | #define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ | ||||
#define LAGG_OPT_LACP_TIMEOUT 0x80 /* LACP timeout */ | #define LAGG_OPT_LACP_TIMEOUT 0x80 /* LACP timeout */ | ||||
#define LAGG_OPT_RR_LIMIT 0x100 /* RR stride */ | #define LAGG_OPT_RR_LIMIT 0x100 /* RR stride */ | ||||
u_int ro_count; /* number of ports */ | u_int ro_count; /* number of ports */ | ||||
u_int ro_active; /* active port count */ | u_int ro_active; /* active port count */ | ||||
u_int ro_flapping; /* number of flapping */ | u_int ro_flapping; /* number of flapping */ | ||||
int ro_flowid_shift; /* shift the flowid */ | int ro_flowid_shift; /* shift the flowid */ | ||||
uint32_t ro_bkt; /* stride for RR */ | uint32_t ro_bkt; /* stride for RR */ | ||||
}; | }; | ||||
#define SIOCGLAGGOPTS _IOWR('i', 152, struct lagg_reqopts) | #define SIOCGLAGGOPTS _IOWR('i', 152, struct lagg_reqopts) | ||||
#define SIOCSLAGGOPTS _IOW('i', 153, struct lagg_reqopts) | #define SIOCSLAGGOPTS _IOW('i', 153, struct lagg_reqopts) | ||||
#define LAGG_OPT_BITS "\020\001USE_FLOWID\003USE_NUMA" \ | #define LAGG_OPT_BITS "\020\001USE_FLOWID\003USE_NUMA" \ | ||||
"\005LACP_STRICT\006LACP_TXTEST" \ | "\004USE_RL\005LACP_STRICT\006LACP_TXTEST" \ | ||||
"\007LACP_RXTEST" | "\007LACP_RXTEST" | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
/* | /* | ||||
* Internal kernel part | * Internal kernel part | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | struct lagg_port { | ||||
int (*lp_ioctl)(struct ifnet *, u_long, caddr_t); | int (*lp_ioctl)(struct ifnet *, u_long, caddr_t); | ||||
int (*lp_output)(struct ifnet *, struct mbuf *, | int (*lp_output)(struct ifnet *, struct mbuf *, | ||||
const struct sockaddr *, struct route *); | const struct sockaddr *, struct route *); | ||||
struct lagg_counters port_counters; /* ifp counters copy */ | struct lagg_counters port_counters; /* ifp counters copy */ | ||||
CK_SLIST_ENTRY(lagg_port) lp_entries; | CK_SLIST_ENTRY(lagg_port) lp_entries; | ||||
struct epoch_context lp_epoch_ctx; | struct epoch_context lp_epoch_ctx; | ||||
}; | }; | ||||
struct lagg_snd_tag { | |||||
struct m_snd_tag com; | |||||
struct m_snd_tag *tag; | |||||
}; | |||||
extern struct mbuf *(*lagg_input_p)(struct ifnet *, struct mbuf *); | extern struct mbuf *(*lagg_input_p)(struct ifnet *, struct mbuf *); | ||||
extern void (*lagg_linkstate_p)(struct ifnet *, int ); | extern void (*lagg_linkstate_p)(struct ifnet *, int ); | ||||
int lagg_enqueue(struct ifnet *, struct mbuf *); | int lagg_enqueue(struct ifnet *, struct mbuf *); | ||||
SYSCTL_DECL(_net_link_lagg); | SYSCTL_DECL(_net_link_lagg); | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* _NET_LAGG_H */ | #endif /* _NET_LAGG_H */ |