linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Simon Horman <horms@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/3] net: airoha: Add FLOW_CLS_STATS callback support
Date: Mon, 19 May 2025 11:55:46 +0200	[thread overview]
Message-ID: <aCsAItPcz_9CuxaP@lore-desk> (raw)
In-Reply-To: <20250519094637.GE365796@horms.kernel.org>

[-- Attachment #1: Type: text/plain, Size: 891 bytes --]

On May 19, Simon Horman wrote:
> On Fri, May 16, 2025 at 10:00:00AM +0200, Lorenzo Bianconi wrote:
> 
> ...
> 
> > @@ -1027,6 +1255,15 @@ int airoha_ppe_init(struct airoha_eth *eth)
> >  	if (!ppe->foe_flow)
> >  		return -ENOMEM;
> >  
> > +	foe_size = PPE_STATS_NUM_ENTRIES * sizeof(*ppe->foe_stats);
> > +	if (foe_size) {
> 
> Hi Lorenzo,
> 
> It's unclear to me how foe_size can be zero.

Hi Simon,

foe_size will be 0 if you disable CONFIG_NET_AIROHA_FLOW_STATS since in this
case PPE_STATS_NUM_ENTRIES will be 0.

Regards,
Lorenzo

> 
> > +		ppe->foe_stats = dmam_alloc_coherent(eth->dev, foe_size,
> > +						     &ppe->foe_stats_dma,
> > +						     GFP_KERNEL);
> > +		if (!ppe->foe_stats)
> > +			return -ENOMEM;
> > +	}
> > +
> >  	err = rhashtable_init(&eth->flow_table, &airoha_flow_table_params);
> >  	if (err)
> >  		return err;
> 
> ...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-05-19 10:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16  7:59 [PATCH net-next v2 0/3] net: airoha: Add per-flow stats support to hw flowtable offloading Lorenzo Bianconi
2025-05-16  7:59 ` [PATCH net-next v2 1/3] net: airoha: npu: Move memory allocation in airoha_npu_send_msg() caller Lorenzo Bianconi
2025-05-19 12:13   ` Simon Horman
2025-05-16  8:00 ` [PATCH net-next v2 2/3] net: airoha: Add FLOW_CLS_STATS callback support Lorenzo Bianconi
2025-05-19  9:46   ` Simon Horman
2025-05-19  9:55     ` Lorenzo Bianconi [this message]
2025-05-19 12:10       ` Simon Horman
2025-05-16  8:00 ` [PATCH net-next v2 3/3] net: airoha: ppe: Disable packet keepalive Lorenzo Bianconi
2025-05-19 12:13   ` Simon Horman
2025-05-21  3:10 ` [PATCH net-next v2 0/3] net: airoha: Add per-flow stats support to hw flowtable offloading patchwork-bot+netdevbpf

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=aCsAItPcz_9CuxaP@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).