netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: andrew@lunn.ch
Cc: saeedm@mellanox.com, netdev@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH net-next 0/2] Add ethtool set regs support
Date: Tue, 06 Dec 2016 21:57:32 -0500 (EST)	[thread overview]
Message-ID: <20161206.215732.1535653926791462641.davem@davemloft.net> (raw)
In-Reply-To: <20161207024143.GA655@lunn.ch>

From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 7 Dec 2016 03:41:43 +0100

> On Wed, Dec 07, 2016 at 12:33:08AM +0200, Saeed Mahameed wrote:
>> Hi Dave,
>> 
>> This series adds the support for setting device registers from user
>> space ethtool.
> 
> Is this not the start of allowing binary only drivers in user space?
> 
> Do we want this?

I don't think we do.

> 
>> mlx5 driver have registers allowed access list and will check the user 
>> Request validity before forwarding it to HW registers. Mlx5 will allow only mlx5 specific
>> configurations to be set (e.g. Device Diag Counters for HW performance debugging and analysis)
>> which has no standard API to access it.
> 
> Would it not be better to define an flexible API to do this? We have
> lots of HW performance counters for CPUs. Why is it not possible to do
> this for a network device?

So if this isn't for raw PIO register access, then we should define
an appropriate interface for it.

The ethtool regs stuff is untyped, and arbitrary.

Please create something properly structured, and typed, which would
allow accessing the information you want the user to be able to
access.

That way the kernel can tell what the user is reading or writing,
and thus properly control access.

  reply	other threads:[~2016-12-07  2:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 22:33 [PATCH net-next 0/2] Add ethtool set regs support Saeed Mahameed
2016-12-06 22:33 ` [PATCH net-next 1/2] ethtool: Add set regs -D option support Saeed Mahameed
2016-12-06 22:33 ` [PATCH net-next 2/2] net/mlx5e: Add ethtool get/set reg support Saeed Mahameed
2016-12-06 22:45 ` [PATCH net-next 0/2] Add ethtool set regs support Stephen Hemminger
2016-12-11 11:56   ` Saeed Mahameed
2016-12-07  2:41 ` Andrew Lunn
2016-12-07  2:57   ` David Miller [this message]
2016-12-11 12:41     ` Saeed Mahameed
2016-12-11 12:18   ` Saeed Mahameed
2016-12-11 15:22     ` Andrew Lunn
2016-12-12 17:00       ` Florian Fainelli

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=20161206.215732.1535653926791462641.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew@lunn.ch \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).