From owner-svn-src-head@FreeBSD.ORG Tue Oct 16 21:10:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5154E28D; Tue, 16 Oct 2012 21:10:57 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0F5D48FC08; Tue, 16 Oct 2012 21:10:56 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so6841319pbb.13 for ; Tue, 16 Oct 2012 14:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=tHU1GIxNNW9HVlqBk5Em4bndEBKIwGBcL3RLqdb50G4=; b=sb5gAmxqTKCTg2AJoKGkElosbZ0OTIgN7iwON4Ty5wSwXp2Ek/5UQbXG4SXWP4f7UF Z3HY3F5JKS5ZCVQjLKPRFzMeJifiBSlKRzJ2n5MFjxVjvt7a2w7McSin/cXshoW7hLHI 1C/CLN9DGFBj+fT4Y1F9S94s3k0ogYWV33BvUdrW0PnhAAs1wNIg1h0m+k4vS4rml5oU x43QXdMkLkxrLes0Z7VPhhKv3k+NGv9REI6E1ak7ElqAkfKUwVMqGYp3omjH+5+8blkn pCYr5W4yXD2x+Dk0dKEtw+yg/05TsMCOvafPVsn7FNzZsWuch3qD95nEkp1RzIepJF59 2UJA== MIME-Version: 1.0 Received: by 10.68.222.234 with SMTP id qp10mr4370798pbc.127.1350421856418; Tue, 16 Oct 2012 14:10:56 -0700 (PDT) Sender: maksim.yevmenkin@gmail.com Received: by 10.68.240.38 with HTTP; Tue, 16 Oct 2012 14:10:56 -0700 (PDT) In-Reply-To: <201210161702.06330.jhb@freebsd.org> References: <201210162018.q9GKIG9q013028@svn.freebsd.org> <201210161702.06330.jhb@freebsd.org> Date: Tue, 16 Oct 2012 14:10:56 -0700 X-Google-Sender-Auth: S2-Hpd1lyVLKBcWoQdPI_j2Upm4 Message-ID: Subject: Re: svn commit: r241616 - in head/sys: dev/ixgbe net From: Maksim Yevmenkin To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 21:10:57 -0000 On Tue, Oct 16, 2012 at 2:02 PM, John Baldwin wrote: > On Tuesday, October 16, 2012 4:18:16 pm Maksim Yevmenkin wrote: >> Author: emax >> Date: Tue Oct 16 20:18:15 2012 >> New Revision: 241616 >> URL: http://svn.freebsd.org/changeset/base/241616 >> >> Log: >> introduce concept of ifi_baudrate power factor. the idea is to work >> around the problem where high speed interfaces (such as ixgbe(4)) >> are not able to report real ifi_baudrate. bascially, take a spare >> byte from struct if_data and use it to store ifi_baudrate power >> factor. in other words, >> >> real ifi_baudrate = ifi_baudrate * 10 ^ ifi_baudrate power factor >> >> this should be backwards compatible with old binaries. use ixgbe(4) >> as an example on how drivers would set ifi_baudrate power factor >> >> Discussed with: kib, scottl, glebius >> MFC after: 1 week > > It would be a lot nicer if you could still allow one to use more > readable things like IF_Gbps(10). Note that we do have a 40G driver > (mlxen) as well. > > Maybe a helper 'if_set_baudrate(ifp, IF_Gbps(10))' that would DTRT. > (It could be a static inline or some such). I would just like to > keep the readability. well, yes, i thought about it, but decided not to do it right away. we could provide shortcuts/macros for "popular" baudrates, i.e. 1, 10, 40 and 100 Gbps. while ixgbe(4) example is not ideal, i thought it still was pretty readable :) thanks, max