netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Or Gerlitz <ogerlitz@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Amir Vadai <amir@vadai.me>, Ido Schimmel <idosch@mellanox.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Roi Dayan <roid@mellanox.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH RFC net] net/mlx5e: Add preemption enable/disable around TC statistics upcall
Date: Thu, 9 Feb 2017 17:34:41 -0800	[thread overview]
Message-ID: <20170209173441.1f1eb96e@cakuba.netronome.com> (raw)
In-Reply-To: <1486654723-25777-1-git-send-email-ogerlitz@mellanox.com>

On Thu,  9 Feb 2017 17:38:43 +0200, Or Gerlitz wrote:
> Running with CONFIG_PREEMPT set, I get a
> 
> BUG: using smp_processor_id() in preemptible [00000000] code: tc/3793
> 
> asserion from the TC action (mirred) stats_update callback, when the do
> 
> 	_bstats_cpu_update(this_cpu_ptr(a->cpu_bstats), bytes, packets)
> 
> As done by commit 66860be "nfp: bpf: allow offloaded filters to update stats",
> disabling/enabling preemption around the TC upcall solves that.
> 
> Fixes: aad7e08d39bd ('net/mlx5e: Hardware offloaded flower filter statistics support')
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> ---
> 
> I marked it as RFC, since I wasn't fully sure on the nature of the 
> problem, nor if this is the direction we should take to the fix.

I think it's the right fix, for net-next we could perhaps redo the
tcf_action_stats_update() helper so that it takes care of preemption and
the iteration so more people don't trip over this?

  reply	other threads:[~2017-02-10  1:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 15:38 [PATCH RFC net] net/mlx5e: Add preemption enable/disable around TC statistics upcall Or Gerlitz
2017-02-10  1:34 ` Jakub Kicinski [this message]
2017-02-10 16:21   ` Or Gerlitz
2017-02-10 18:14     ` Jakub Kicinski
2017-02-12  9:07       ` Or Gerlitz

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=20170209173441.1f1eb96e@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=amir@vadai.me \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=roid@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).