All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Siddharth Vadapalli <s-vadapalli@ti.com>,
	Roger Quadros <rogerq@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	netdev@vger.kernel.org, linux-omap@vger.kernel.org,
	llvm@lists.linux.dev
Subject: Re: [PATCH net-next 1/3] net: ethernet: ti: am65-cpsw: Address __percpu Sparse warnings
Date: Thu, 12 Sep 2024 10:58:13 +0100	[thread overview]
Message-ID: <20240912095813.GG572255@kernel.org> (raw)
In-Reply-To: <20240911170643.7ecb1bbb@kernel.org>

On Wed, Sep 11, 2024 at 05:06:43PM -0700, Jakub Kicinski wrote:
> On Tue, 10 Sep 2024 08:17:56 +0100 Simon Horman wrote:
> > An alternate, approach would be to create a variant of
> > devm_add_action_or_reset() which expects __percpu data.  This would
> > avoid discarding the __percpu annotation, and any value it may have
> > between the casts added by this patch.  However, doing so appears to
> > require a significant amount of plumbing.  And, as far as I can see, the
> > code updated by this patch would be the only user of it.  So this patch
> > takes a simpler approach.
> 
> Sorry if this was already discussed, but struct am65_cpsw_ndev_stats
> appears to be identical to struct pcpu_sw_netstats but for ordering.
> Can we let the core allocate the stats by setting
> netdev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS?

Hi Jakub,

Thanks for pointing that out, and sorry for not thinking of it myself.

Looking over the code, and taking a first pass at implementing this,
I believe the answer is yes :)

I also think that, as a second step, by using dev_core_stats,
the custom ndo_get_stats64() implementation can be removed.
LMKWYT.

  reply	other threads:[~2024-09-12  9:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-10  7:17 [PATCH net-next 0/3] net: ethernet: ti: Address some warnings Simon Horman
2024-09-10  7:17 ` [PATCH net-next 1/3] net: ethernet: ti: am65-cpsw: Address __percpu Sparse warnings Simon Horman
2024-09-12  0:06   ` Jakub Kicinski
2024-09-12  9:58     ` Simon Horman [this message]
2024-09-12 15:45       ` Jakub Kicinski
2024-09-12 19:48         ` Simon Horman
2024-09-10  7:17 ` [PATCH net-next 2/3] net: ethernet: ti: am65-cpsw: Use __be64 type for id_temp Simon Horman
2024-09-10  8:42   ` Kalesh Anakkur Purayil
2024-09-12  7:10   ` Roger Quadros
2024-09-10  7:17 ` [PATCH net-next 3/3] net: ethernet: ti: cpsw_ale: Remove unused accessor functions Simon Horman
2024-09-12  7:07   ` Roger Quadros
2024-09-12  8:59     ` Simon Horman
2024-09-12 10:54       ` Roger Quadros
2024-09-12 11:27         ` Simon Horman
2024-09-12 13:29           ` Roger Quadros
2024-09-12 15:43             ` Simon Horman

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=20240912095813.GG572255@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=justinstitt@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.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.