From owner-freebsd-net@FreeBSD.ORG Fri Nov 18 20:53:53 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84103106568A; Fri, 18 Nov 2011 20:53:53 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2B0438FC13; Fri, 18 Nov 2011 20:53:53 +0000 (UTC) Received: by ywe9 with SMTP id 9so4313166ywe.13 for ; Fri, 18 Nov 2011 12:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=XkGtvxlRV5zkWkLRGMytXuzzOS9fuOaiJLSbwzc7/SM=; b=tOhJCRY0CWOK/nSe4Ry5qY7wdUSddE/5rVglmcwsxoKLMZvbWOUdpZjfs54v/Pxc73 NSCxKm4DHs5WPX0V4t3G2zyn9crHOVa9PkpDLqrzHGE7gXlLYzsnFZXG9fHeiWJ04cD7 MvPgTAAzliGDF+erFb1Ssmqu6bx7LraiZjeH4= MIME-Version: 1.0 Received: by 10.236.184.225 with SMTP id s61mr8054901yhm.80.1321649632632; Fri, 18 Nov 2011 12:53:52 -0800 (PST) Received: by 10.100.122.19 with HTTP; Fri, 18 Nov 2011 12:53:52 -0800 (PST) In-Reply-To: References: Date: Fri, 18 Nov 2011 12:53:52 -0800 Message-ID: From: Maksim Yevmenkin To: Juli Mallett Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net Subject: Re: confused with if_baudrate X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2011 20:53:53 -0000 On Thu, Nov 17, 2011 at 1:39 PM, Juli Mallett wrote: > On Thu, Nov 17, 2011 at 13:12, Maksim Yevmenkin > wrote: >> hello, >> >> i'm a little bit confused about if_baudrate. from system headers >> >> #define if_baudrate =A0 =A0 if_data.ifi_baudrate >> >> and >> >> u_long =A0ifi_baudrate; =A0 =A0 =A0 =A0 =A0 /* linespeed */ >> >> so, i'm taking this as if_baudrate really should be an interface line >> speed in megabits per second. am i correct? if so, then it appears >> that at least some drivers lie about true line speed. for example from >> ixgbe(4) >> >> =A0 =A0 =A0 =A0ifp->if_baudrate =3D 1000000000; >> >> it looks like its order of magnitude lower (i.e. 1 gigabit per second >> instead of 10 gigabits per second). am i missing something here or its >> just a typo? > > ixgbe's developer is excessively concerned about overflow on 32-bit > hosts (and unwilling to correct it under a preprocessor conditional), > unlike several of the other 10GbE driver developers, although I think > one 10GbE driver opts to omit if_baudrate entirely. well, this is unfortunate as if_baudrate reported as part of ifmib, so, when interface is monitored over snmp value of ifSpeed and HCOutSpeed can not be trusted :( thanks, max