Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Dec 2008 10:27:49 -0800
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        Harti Brandt <harti@freebsd.org>
Cc:        freebsd-net@freebsd.org, Sergey Matveychuk <sem@FreeBSD.org>
Subject:   Re: bsnmpd & 64bits counters problem
Message-ID:  <20081216182749.GE3082@citylink.fud.org.nz>
In-Reply-To: <20081216190932.I74416@beagle.kn.op.dlr.de>
References:  <4947D7A9.2050407@FreeBSD.org> <20081216181850.O74416@beagle.kn.op.dlr.de> <4947EE0B.9050902@FreeBSD.org> <20081216190932.I74416@beagle.kn.op.dlr.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--SUOF0GtieIMvvwua
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Dec 16, 2008 at 07:12:24PM +0100, Harti Brandt wrote:
> On Tue, 16 Dec 2008, Sergey Matveychuk wrote:
> SM>> 
> SM>> The highspeed counters are only there if this is a high-speed interface.
> SM>> High speed means that the baudrate in the interface MIB (the one in the
> SM>> kernel) must be larger than 20Mbaud.
> SM>
> SM>Well, these is lagg interfaces:
> SM>lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
> SM>        options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
> SM>        ether 00:30:48:67:d4:68
> SM>        media: Ethernet autoselect
> SM>        status: active
> SM>        laggproto lacp
> SM>        laggport: em2 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
> SM>        laggport: em0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
> SM>
> SM>There is no baudrate on them. But they are really high-speed however.
> 
> All interfaces have a baudrate. Its in net/if.h ifi_baudrate. We had the 
> problem in the past with other interface types. 'virtual' interfaces must 
> take care to somehow propagate the rate of the underlying physical 
> interfaces up to the virtual one.

This patch should fix it for the lacp case. What is the correct value to
use for a collection of interfaces with possibly different speeds?
highest/lowest?


Andrew

--SUOF0GtieIMvvwua
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="ieee8023ad_lacp.diff"

Index: ieee8023ad_lacp.c
===================================================================
--- ieee8023ad_lacp.c	(revision 186188)
+++ ieee8023ad_lacp.c	(working copy)
@@ -901,6 +901,7 @@ lacp_aggregator_bandwidth(struct lacp_aggregator *
 static void
 lacp_select_active_aggregator(struct lacp_softc *lsc)
 {
+	struct lagg_softc *sc = lsc->lsc_softc;
 	struct lacp_aggregator *la;
 	struct lacp_aggregator *best_la = NULL;
 	uint64_t best_speed = 0;
@@ -956,6 +957,7 @@ lacp_select_active_aggregator(struct lacp_softc *l
 #endif /* defined(LACP_DEBUG) */
 
 	if (lsc->lsc_active_aggregator != best_la) {
+		sc->sc_ifp->if_baudrate = speed;
 		lsc->lsc_active_aggregator = best_la;
 		lacp_update_portmap(lsc);
 		if (best_la) {

--SUOF0GtieIMvvwua--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081216182749.GE3082>