archive mirror
 help / color / mirror / Atom feed
From: David Miller <>
Subject: Re: [PATCH net] tun: fix ethtool_ops get_msglvl and set_msglvl handlers
Date: Tue, 03 Mar 2020 14:59:16 -0800 (PST)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Michal Kubecek <>
Date: Tue,  3 Mar 2020 09:22:52 +0100 (CET)

> The get_msglvl and setmsglvl handlers only work as expected if TUN_DEBUG
> is defined (which required editing the source). Otherwise tun_get_msglvl()
> returns -EOPNOTSUPP but as this handler is not supposed to return error
> code, it is not recognized as one and passed to userspace as is, resulting
> in bogus output of ethtool command. The set_msglvl handler ignores its
> argument and does nothing if TUN_DEBUG is left undefined.
> The way to return EOPNOTSUPP to userspace for both requests is not to
> provide these ethtool_ops callbacks at all if TUN_DEBUG is left undefined.
> Signed-off-by: Michal Kubecek <>

I agree with your analysis.

But this TUN_DEBUG thing stands outside of what we let drivers do.  Either
this tracing is not so useful and can be deleted, or the tracing should
be available unconditionally so that it can be turned on by the vast
majority of users who do not edit the source.

I suspect making the TUN_DEBUG code unconditional is that way to go here.

  reply	other threads:[~2020-03-03 22:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03  8:22 Michal Kubecek
2020-03-03 22:59 ` David Miller [this message]
2020-03-04  6:57   ` Michal Kubecek

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:

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

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH net] tun: fix ethtool_ops get_msglvl and set_msglvl handlers' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).