diff options
author | emax <emax@FreeBSD.org> | 2012-10-16 22:43:14 +0000 |
---|---|---|
committer | emax <emax@FreeBSD.org> | 2012-10-16 22:43:14 +0000 |
commit | f4127691ff8eb4cd732a46b615fb3d55cb1e7aa9 (patch) | |
tree | 82e313fcb1ec76a80644e0f18eab555df70d3841 /sys | |
parent | 7097039d8dbf67d1efd7e5ae636a00900137746e (diff) | |
download | FreeBSD-src-f4127691ff8eb4cd732a46b615fb3d55cb1e7aa9.zip FreeBSD-src-f4127691ff8eb4cd732a46b615fb3d55cb1e7aa9.tar.gz |
report total number of ports for each lagg(4) interface
via net.link.lagg.X.count sysctl
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_lagg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index b8fe05b..9919542 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -288,6 +288,9 @@ lagg_clone_create(struct if_clone *ifc, int unit, caddr_t params) SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "use_flowid", CTLTYPE_INT|CTLFLAG_RW, &sc->use_flowid, sc->use_flowid, "Use flow id for load sharing"); + SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "count", CTLTYPE_INT|CTLFLAG_RO, &sc->sc_count, sc->sc_count, + "Total number of ports"); /* Hash all layers by default */ sc->sc_flags = LAGG_F_HASHL2|LAGG_F_HASHL3|LAGG_F_HASHL4; |