diff options
author | hrs <hrs@FreeBSD.org> | 2014-10-01 21:37:32 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2014-10-01 21:37:32 +0000 |
commit | 667a2b736994fabf5ccb434e354a82390b85607e (patch) | |
tree | eac48fef50344f3ef26c23cfa7d7fd20d5e8afa6 /sys/net/if_lagg.h | |
parent | e6ca9a3b21e901c5d307611c1dde00e02f6549e1 (diff) | |
download | FreeBSD-src-667a2b736994fabf5ccb434e354a82390b85607e.zip FreeBSD-src-667a2b736994fabf5ccb434e354a82390b85607e.tar.gz |
Virtualize lagg(4) cloner. This change fixes a panic when tearing down
if_lagg(4) interfaces which were cloned in a vnet jail.
Sysctl nodes which are dynamically generated for each cloned interface
(net.link.lagg.N.*) have been removed, and use_flowid and flowid_shift
ifconfig(8) parameters have been added instead. Flags and per-interface
statistics counters are displayed in "ifconfig -v".
CR: D842
Diffstat (limited to 'sys/net/if_lagg.h')
-rw-r--r-- | sys/net/if_lagg.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/net/if_lagg.h b/sys/net/if_lagg.h index 5aeae57..6c39d1c 100644 --- a/sys/net/if_lagg.h +++ b/sys/net/if_lagg.h @@ -125,6 +125,19 @@ struct lagg_reqall { struct lacp_opreq rpsc_lacp; } ra_psc; #define ra_lacpreq ra_psc.rpsc_lacp + int ra_opts; /* Option bitmap */ +#define LAGG_OPT_NONE 0x00 +#define LAGG_OPT_USE_FLOWID 0x01 /* use M_FLOWID */ +/* Pseudo flags which are used in ra_opts but not stored into sc_opts. */ +#define LAGG_OPT_FLOWIDSHIFT 0x02 /* Set flowid */ +#define LAGG_OPT_FLOWIDSHIFT_MASK 0x1f /* flowid is uint32_t */ +#define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ +#define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ +#define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ + u_int ra_count; /* number of ports */ + u_int ra_active; /* active port count */ + u_int ra_flapping; /* number of flapping */ + int ra_flowid_shift; /* shift the flowid */ }; #define SIOCGLAGG _IOWR('i', 143, struct lagg_reqall) @@ -212,9 +225,7 @@ struct lagg_softc { eventhandler_tag vlan_attach; eventhandler_tag vlan_detach; struct callout sc_callout; - struct sysctl_ctx_list ctx; /* sysctl variables */ - struct sysctl_oid *sc_oid; /* sysctl tree oid */ - int use_flowid; /* use M_FLOWID */ + u_int sc_opts; int flowid_shift; /* shift the flowid */ struct lagg_counters detached_counters; /* detached ports sum */ }; |