All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Lijun Pan <lijunp213@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] ibmvnic: add sysfs entry for timeout and fatal reset
Date: Mon, 12 Apr 2021 19:49:36 -0700	[thread overview]
Message-ID: <20210412194936.7c0d2e4f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <CAOhMmr5H_0QuSwOU-FEBQb3CHegSi4f3hdtEtprKKF7i1WebEw@mail.gmail.com>

On Mon, 12 Apr 2021 15:26:00 -0500 Lijun Pan wrote:
> On Mon, Apr 12, 2021 at 1:23 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > On Mon, 12 Apr 2021 02:43:30 -0500 Lijun Pan wrote:  
> > > Add timeout and fatal reset sysfs entries so that both functions
> > > can be triggered manually the tested. Otherwise, you have to run
> > > the program for enough time and check both randomly generated
> > > resets in the long long log.  
> >
> > This looks more suitable for debugfs.
> >
> > But can't you use ethtool or devlink reset functionality somehow?  
> 
> ethtool and devlink reset seem better to be implemented by a FAILVOER reset for
> this driver. ethtool/devlink reset are not implemented in this driver,
> which will be a todo list for me.

ethtool isn't really much to implement, its basically a bunch of ops
the driver implements. You can pick and choose which ones you implement.

It'd be better to use ethtool or devlink, but I guess debugfs could be
acceptable too. sysfs is a stable API, so it's definitely a no-go.

> This timeout reset can be triggered by tx watchdog,
> .ndo_tx_timeout->ibmvnic_tx_timeout->ibmvnic_reset(adapter, VNIC_RESET_TIMEOUT);
> Do you know is there a way to trigger that ndo_tx_timeout from some
> user space tool?
> 
> The FATAL reset is triggered by Firmware, quite specific for this driver.
> So in order to verify that, I put it in sysfs entry.

Good question, I don't think we have a way to trigger the timeout 
in a generic way. My first instinct would be to use ethtool self test
(ethtool_ops->self_test) to call the same function within the driver.

      reply	other threads:[~2021-04-13  2:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12  7:43 [PATCH net-next 0/2] ibmvnic: sysfs changes Lijun Pan
2021-04-12  7:43 ` [PATCH net-next 1/2] ibmvnic: improve failover sysfs entry Lijun Pan
2021-04-12  7:43 ` [PATCH net-next 2/2] ibmvnic: add sysfs entry for timeout and fatal reset Lijun Pan
2021-04-12 18:23   ` Jakub Kicinski
2021-04-12 20:26     ` Lijun Pan
2021-04-13  2:49       ` Jakub Kicinski [this message]

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=20210412194936.7c0d2e4f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=lijunp213@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.