From: Miquel RAYNAL <miquel.raynal@free-electrons.com>
To: Stefan Chulski <stefanc@marvell.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Antoine Tenart <antoine.tenart@free-electrons.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: mvpp2: add ethtool GOP statistics
Date: Mon, 6 Nov 2017 23:45:23 +0100 [thread overview]
Message-ID: <20171106234523.7e170a71@xps13> (raw)
In-Reply-To: <09d456be927a46c0970bd677651a4098@IL-EXCH01.marvell.com>
Hi Stefan,
+David Miller/Net ML
> > @@ -6844,6 +7023,10 @@ static int mvpp2_open(struct net_device
> > *dev)
> >
> > mvpp2_start_dev(port);
> >
> > + /* Start hardware statistics gathering */
> > + queue_delayed_work(priv->stats_queue, &priv->stats_work,
> > + MVPP2_MIB_COUNTERS_STATS_DELAY);
> > +
> > return 0;
> >
> > err_free_link_irq:
> > @@ -6888,6 +7071,9 @@ static int mvpp2_stop(struct net_device *dev)
> > mvpp2_cleanup_rxqs(port);
> > mvpp2_cleanup_txqs(port);
> >
> > + cancel_delayed_work_sync(&priv->stats_work);
> > + flush_workqueue(priv->stats_queue);
> > +
>
> Hi Miquel,
>
> I think there are bug here.
> priv is common for all ports on same CPN and they have same
> priv->stats_work.
>
> For example on A7K board with 3 Ports. queue_delayed_work and
> cancel_delayed_work_sync called for each port stop and start
> procedure. For example:
> If Port0 and Port1 were started, then if only Port0 stopped, delayed
> work would be canceled for both ports.
Thanks for spotting it, you are right this is a bug since I moved
starting/stopping the queues in the opening and close procedure of the
ports (to avoid using CPU time while no interface is actually up).
Maybe I should have a work per port, it would be easier to
handle.
Thank you,
Miquèl
next prev parent reply other threads:[~2017-11-06 22:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 11:04 [PATCH net-next v2] net: mvpp2: add ethtool GOP statistics Miquel Raynal
2017-11-03 11:26 ` Miquel RAYNAL
2017-11-03 15:19 ` Andrew Lunn
2017-11-06 10:06 ` Miquel RAYNAL
2017-11-06 14:25 ` Andrew Lunn
2017-11-06 21:02 ` Miquel RAYNAL
[not found] ` <09d456be927a46c0970bd677651a4098@IL-EXCH01.marvell.com>
2017-11-06 22:45 ` Miquel RAYNAL [this message]
2017-11-07 8:22 ` [EXT] " Stefan Chulski
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=20171106234523.7e170a71@xps13 \
--to=miquel.raynal@free-electrons.com \
--cc=antoine.tenart@free-electrons.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stefanc@marvell.com \
--cc=thomas.petazzoni@free-electrons.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 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.