From: Leon Romanovsky <leon@kernel.org>
To: Veerasenareddy Burru <vburru@marvell.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Abhijit Ayarekar <aayarekar@marvell.com>,
Sathesh B Edara <sedara@marvell.com>,
Satananda Burla <sburla@marvell.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [EXT] Re: [PATCH net-next v4 8/8] octeon_ep: add heartbeat monitor
Date: Wed, 29 Mar 2023 10:33:13 +0300 [thread overview]
Message-ID: <20230329073313.GG831478@unreal> (raw)
In-Reply-To: <MN2PR18MB2430F4C6F2EE41D650C3651DCC879@MN2PR18MB2430.namprd18.prod.outlook.com>
On Thu, Mar 23, 2023 at 06:14:10PM +0000, Veerasenareddy Burru wrote:
>
>
> > -----Original Message-----
> > From: Leon Romanovsky <leon@kernel.org>
> > Sent: Thursday, March 23, 2023 3:47 AM
> > To: Veerasenareddy Burru <vburru@marvell.com>
> > Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Abhijit Ayarekar
> > <aayarekar@marvell.com>; Sathesh B Edara <sedara@marvell.com>;
> > Satananda Burla <sburla@marvell.com>; linux-doc@vger.kernel.org; David S.
> > Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>;
> > Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>
> > Subject: [EXT] Re: [PATCH net-next v4 8/8] octeon_ep: add heartbeat
> > monitor
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > On Wed, Mar 22, 2023 at 02:19:57AM -0700, Veerasenareddy Burru wrote:
> > > Monitor periodic heartbeat messages from device firmware.
> > > Presence of heartbeat indicates the device is active and running.
> > > If the heartbeat is missed for configured interval indicates firmware
> > > has crashed and device is unusable; in this case, PF driver stops and
> > > uninitialize the device.
> > >
> > > Signed-off-by: Veerasenareddy Burru <vburru@marvell.com>
> > > Signed-off-by: Abhijit Ayarekar <aayarekar@marvell.com>
> > > ---
> > > v3 -> v4:
> > > * 0007-xxx.patch in v3 is 0008-xxx.patch in v4.
> > >
> > > v2 -> v3:
> > > * 0009-xxx.patch in v2 is now 0007-xxx.patch in v3 due to
> > > 0007 and 0008.patch from v2 are removed in v3.
> > >
> > > v1 -> v2:
> > > * no change
<...>
> > > + struct octep_device *oct = container_of(work, struct octep_device,
> > > + hb_task.work);
> > > +
> > > + int miss_cnt;
> > > +
> > > + atomic_inc(&oct->hb_miss_cnt);
> > > + miss_cnt = atomic_read(&oct->hb_miss_cnt);
> >
> > miss_cnt = atomic_inc_return(&oct->hb_miss_cnt);
> >
>
> Thanks for the feedback. Will fix it.
>
> > > + if (miss_cnt < oct->conf->max_hb_miss_cnt) {
> >
> > How is this heartbeat working? You increment on every entry to
> > octep_hb_timeout_task(), After max_hb_miss_cnt invocations, you will stop
> > your device.
> >
> > Thanks
> >
>
> Yes, device will be stopped after max_hb_miss_cnt heartbeats are missed.
If I read code correctly, device will stop after octep_hb_timeout_task()
calls which happens every msecs_to_jiffies(oct->conf->hb_interval * 1000.
You don't cancel/resechdule job if timeout doesn't happen.
Thanks
>
> > > + queue_delayed_work(octep_wq, &oct->hb_task,
> > > + msecs_to_jiffies(oct->conf->hb_interval *
> > 1000));
prev parent reply other threads:[~2023-03-29 7:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 9:19 [PATCH net-next v4 0/8] octeon_ep: deferred probe and mailbox Veerasenareddy Burru
2023-03-22 9:19 ` [PATCH net-next v4 1/8] octeon_ep: defer probe if firmware not ready Veerasenareddy Burru
2023-03-22 9:19 ` [PATCH net-next v4 2/8] octeon_ep: poll for control messages Veerasenareddy Burru
2023-03-22 9:19 ` [PATCH net-next v4 3/8] octeon_ep: control mailbox for multiple PFs Veerasenareddy Burru
2023-03-22 9:19 ` [PATCH net-next v4 4/8] octeon_ep: add separate mailbox command and response queues Veerasenareddy Burru
2023-03-22 9:19 ` [PATCH net-next v4 5/8] octeon_ep: include function id in mailbox commands Veerasenareddy Burru
2023-03-22 9:19 ` [PATCH net-next v4 6/8] octeon_ep: support asynchronous notifications Veerasenareddy Burru
2023-03-23 10:39 ` Leon Romanovsky
2023-03-23 17:24 ` [EXT] " Veerasenareddy Burru
2023-03-29 7:29 ` Leon Romanovsky
2023-03-22 9:19 ` [PATCH net-next v4 7/8] octeon_ep: function id in link info and stats mailbox commands Veerasenareddy Burru
2023-03-22 9:19 ` [PATCH net-next v4 8/8] octeon_ep: add heartbeat monitor Veerasenareddy Burru
2023-03-23 10:47 ` Leon Romanovsky
2023-03-23 18:14 ` [EXT] " Veerasenareddy Burru
2023-03-29 7:33 ` Leon Romanovsky [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=20230329073313.GG831478@unreal \
--to=leon@kernel.org \
--cc=aayarekar@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sburla@marvell.com \
--cc=sedara@marvell.com \
--cc=vburru@marvell.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).