Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2012 14:10:56 -0700
From:      Maksim Yevmenkin <emax@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r241616 - in head/sys: dev/ixgbe net
Message-ID:  <CAFPOs6p0aQEadjPAY0nS3nf7D_hCHX0qYCGG9EwWvYPQQCeXug@mail.gmail.com>
In-Reply-To: <201210161702.06330.jhb@freebsd.org>
References:  <201210162018.q9GKIG9q013028@svn.freebsd.org> <201210161702.06330.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 16, 2012 at 2:02 PM, John Baldwin <jhb@freebsd.org> 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



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