All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kalle.valo@iki.fi>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: "Luis R. Rodriguez" <mcgrof@gmail.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 0/2] cfg80211: firmware and hardware version
Date: Thu, 01 Oct 2009 19:20:09 +0300	[thread overview]
Message-ID: <873a63qe6e.fsf@purkki.valot.fi> (raw)
In-Reply-To: <20091001151820.GA2895@tuxdriver.com> (John W. Linville's message of "Thu\, 1 Oct 2009 11\:18\:20 -0400")

"John W. Linville" <linville@tuxdriver.com> writes:

> On Thu, Oct 01, 2009 at 05:18:33PM +0300, Kalle Valo wrote:
>> 
>> I'm not worried about the implementation complexity, and as your
>> patches show it was easy. My concern is the overall design for
>> wireless devices. Instead of using nl80211 for everything, with some
>> features we would use nl80211/iw and with some ethtool. That's just
>> confusing and I don't like that. I would prefer that nl80211 provides
>> everything, it makes things so much easier.
>
> Well, if the hw/fw version numbers were the only thing then I'd
> probably say it's not a big deal.  But having ethtool support is nice
> in that it makes a familiar tool work for us.  Among other things,
> this probably helps with some distro scripts that don't work quite
> right without it.  Plus, there is lots of debugging stuff that could
> be turned-on without having to write new tools.

Agreed, maybe expect the distro scripts part. To me that just sounds
as a bug in the scripts.

> I suppose I understand the 'one API' idea, but why duplicate
> functionality?

Just because the common functionality in this case isn't high enough.
I'm worried that we will use 10% of the functionality in nl80211 and
the rest 90% will be something we can't use and have to reimplement in
nl80211.

> Anyway, adding a couple of ioctl calls isn't a big deal.

Sure, but we need to support this forever. If, say after two years, we
decide that ethtool is not the way to go, it's very difficult to
remove it. The less interfaces we have, the easier it is to maintain
them.

> And don't forget, we are still network drivers too...

I hope ethtool isn't a strict requirement for a network driver, at
least I haven't heard about that.

>> One example is the hw version, ethtool only provides u32 to userspace
>> and moves the burden of translating hw id to the user. For us a string
>> is much better choise because when debuggin we need to often (or
>> always?) know the chip version.
>
> Look at the way most drivers set the version (using each byte as a
> field).

Yes, that's how it is also with wl1251. A number like '0x7030101' is
just not that user friendly.

> If you want prettier output, adding a parser to the userland ethtool
> is fairly trivial. It looks something like the patch below...

Oh wow, that's cool and a truly useful feature. One complaint less
from me :)

>>         ethtool -c|--show-coalesce DEVNAME      Show coalesce options
>>         ethtool -C|--coalesce DEVNAME   Set coalesce options
>>                 [adaptive-rx on|off]
>>                 [adaptive-tx on|off]
>>                 [rx-usecs N]
>>                 [rx-frames N]
>>                 [rx-usecs-irq N]
>>                 [rx-frames-irq N]
>>                 [tx-usecs N]
>>                 [tx-frames N]
>>                 [tx-usecs-irq N]
>>                 [tx-frames-irq N]
>>                 [stats-block-usecs N]
>>                 [pkt-rate-low N]
>>                 [rx-usecs-low N]
>>                 [rx-frames-low N]
>>                 [tx-usecs-low N]
>>                 [tx-frames-low N]
>>                 [pkt-rate-high N]
>>                 [rx-usecs-high N]
>>                 [rx-frames-high N]
>>                 [tx-usecs-high N]
>>                 [tx-frames-high N]
>>                 [sample-interval N]
>
> These _could_ be useful if wireless becomes more
> performance-oriented...

Maybe, or maybe not. We will only find out within the next few years.

And what will we do if the parameters are actually a bit different? Is
it ok to extend ethtool for supporting wireless or do we later on have
to add separate support to nl80211? The latter would suck big time.

>>         ethtool -g|--show-ring DEVNAME  Query RX/TX ring parameters
>>         ethtool -G|--set-ring DEVNAME   Set RX/TX ring parameters
>>                 [ rx N ]
>>                 [ rx-mini N ]
>>                 [ rx-jumbo N ]
>>                 [ tx N ]
>
> Wireless devices have ring buffers, no?

Yes, there is hardware which have them but again the question is this
relevant for wireless devices. In ethernet the hardware is the
bottleneck but in 802.11 the wireless medium is the bottleneck, so the
parameters we need to configure are usually different.

>>         ethtool -r|--negotiate DEVNAME  Restart N-WAY negotation
>
> Ethernet-specific...might could be overloaded for wireless to trigger
> reassoc...?

Please no, I don't want to see any reassociation or anything else
802.11 state related in ethtool, nl80211 was created for this. This is
something I would object loudly :)

> Anyway, it doesn't really matter if we don't use the whole API -- many
> older ethernet devices don't support all these features.  The point
> is that the API exists and has some overlap with our needs.  It is a
> driver-oriented API, with nitty-gritty stuff that need not clutter a
> configuraiton API like cfg80211.  There is even the potential of us
> adding our own extensions (e.g. WoW) that are also device-oriented.
>
> Anyway, between the link detection and making distro scripts work
> plus enabling a familiar tool for basic driver info I think this is
> a win.  So much the better if some drivers move to ethtool for register
> dumping, setting message verbosity, querying/changing eeprom values,
> etc, etc...

Sounds good enough. As I said in my earlier email, I'm not going argue
about this for too long. You know this better than I do. So let's go
forward with ethtool. 

Thanks for listening to my concerns.

-- 
Kalle Valo

  parent reply	other threads:[~2009-10-01 16:20 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 18:02 [PATCH 0/2] cfg80211: firmware and hardware version Kalle Valo
2009-09-24 18:02 ` [PATCH 1/2] cfg80211: add firmware and hardware version to wiphy Kalle Valo
2009-09-24 18:32   ` Luis R. Rodriguez
2009-09-24 19:14     ` Kalle Valo
2009-09-24 20:08       ` Luis R. Rodriguez
2009-09-24 18:02 ` [PATCH 2/2] at76c50x-usb: set firmware and hardware version in wiphy Kalle Valo
2009-09-24 18:35   ` Luis R. Rodriguez
2009-09-24 19:10     ` Kalle Valo
2009-09-24 20:11       ` Luis R. Rodriguez
2009-09-25 19:11         ` Kalle Valo
2009-09-25 19:27           ` Luis R. Rodriguez
2009-09-26 12:07           ` Johannes Berg
2009-09-26 13:59             ` Kalle Valo
2009-09-24 21:13   ` Joerg Albert
2009-09-25 19:06     ` Kalle Valo
2009-09-24 18:09 ` [PATCH 1/2] iw: update nl80211.h from wireless-testing Kalle Valo
2009-09-24 18:09 ` [PATCH 2/2] iw: print firmware and hardware version Kalle Valo
2009-09-24 20:20 ` [PATCH 0/2] cfg80211: " Luis R. Rodriguez
2009-09-25  4:42   ` John W. Linville
2009-09-25 16:47     ` Kalle Valo
2009-09-25 16:53       ` Luis R. Rodriguez
2009-10-01  1:13         ` John W. Linville
2009-10-01  1:19           ` [PATCH 1/3] wireless: implement basic ethtool support for cfg80211 devices John W. Linville
2009-10-01  1:19             ` John W. Linville
2009-10-01  1:19             ` [PATCH 2/3] cfg80211: add firmware and hardware version to wiphy John W. Linville
2009-10-01  1:19               ` [PATCH 3/3] at76c50x-usb: set firmware and hardware version in wiphy John W. Linville
2009-10-01  1:19                 ` John W. Linville
2009-10-01  1:32                 ` Ben Hutchings
2009-10-01 14:27                   ` Kalle Valo
2009-10-01  1:30             ` [PATCH 1/3] wireless: implement basic ethtool support for cfg80211 devices Ben Hutchings
2009-10-01  8:51             ` Johannes Berg
2009-10-01  8:51               ` Johannes Berg
2009-10-01 14:18           ` [PATCH 0/2] cfg80211: firmware and hardware version Kalle Valo
2009-10-01 15:18             ` John W. Linville
2009-10-01 15:33               ` Ben Hutchings
2009-10-01 16:56                 ` John W. Linville
2009-10-01 16:56                   ` John W. Linville
2009-10-01 16:20               ` Kalle Valo [this message]
2009-10-01 17:07                 ` John W. Linville
2009-10-01 19:56                   ` Luis R. Rodriguez
2009-10-01 19:56                     ` Luis R. Rodriguez
2009-10-01 20:12                     ` Inaky Perez-Gonzalez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873a63qe6e.fsf@purkki.valot.fi \
    --to=kalle.valo@iki.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.