64-bit SNMP counters for FreeBSD && graphing bandwidth usage

Anders Nordby anders at FreeBSD.org
Tue Feb 14 02:37:26 PST 2006


Hi,

On Tue, Feb 14, 2006 at 11:44:59AM +0300, Gleb Smirnoff wrote:
> H> The driver reports a speed of 10Mbits/sec. ifHighSpeed is ifi_baudrate 
> H> divided by 10^6 (and rounded). This is the default set by ether_ifattach() 
> H> if the driver did not set another value. It seems that bge never sets that 
> H> value so you end up with the default. This looks like a bug.
> 
> Harti, we are thinking in parallel :)
> 
> Andres, pls try the attached patch.
> 
> Index: if_bge.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v
> retrieving revision 1.118
> diff -u -r1.118 if_bge.c
> --- if_bge.c	30 Jan 2006 13:45:55 -0000	1.118
> +++ if_bge.c	14 Feb 2006 08:43:24 -0000
> @@ -2192,6 +2192,7 @@
>  	ifp->if_snd.ifq_drv_maxlen = BGE_TX_RING_CNT - 1;
>  	IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
>  	IFQ_SET_READY(&ifp->if_snd);
> +	ifp->if_baudrate = IF_Gbps(1);
>  	ifp->if_hwassist = BGE_CSUM_FEATURES;
>  	ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWTAGGING |
>  	    IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM;

The patches gives me ifHighSpeed = 1000 on bge interfaces, also where
the interface is forced to 100baseTX. In any case I get ifHCOutOctets
and ifHCInOctets, which was what I was originally looking for. Making
bsnmpd report actual speed seems sensible, yes.

I should make a list of "what bsnmpd needs" to be more usable, in case
Harti is interested. ;-P

Mvh,

-- 
Anders.


More information about the freebsd-net mailing list