From owner-freebsd-net@FreeBSD.ORG Thu Nov 17 21:39:46 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 DD0301065687 for ; Thu, 17 Nov 2011 21:39:46 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB9F8FC16 for ; Thu, 17 Nov 2011 21:39:46 +0000 (UTC) Received: by wwg14 with SMTP id 14so3753086wwg.31 for ; Thu, 17 Nov 2011 13:39:45 -0800 (PST) Received: by 10.227.207.205 with SMTP id fz13mr293084wbb.0.1321565985057; Thu, 17 Nov 2011 13:39:45 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.227.135.5 with HTTP; Thu, 17 Nov 2011 13:39:24 -0800 (PST) In-Reply-To: References: From: Juli Mallett Date: Thu, 17 Nov 2011 13:39:24 -0800 X-Google-Sender-Auth: K2nUddfanCyWwVGKxF2iA2TONrc Message-ID: To: Maksim Yevmenkin Content-Type: text/plain; charset=UTF-8 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: Thu, 17 Nov 2011 21:39:46 -0000 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 =C2=A0 =C2=A0 if_data.ifi_baudrate > > and > > u_long =C2=A0ifi_baudrate; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* linespee= d */ > > 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) > > =C2=A0 =C2=A0 =C2=A0 =C2=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. Thanks, Juli.