From: Lorenzo Bianconi <lorenzo@kernel.org>
To: 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>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Lorenzo Bianconi <lorenzo@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, Simon Horman <horms@kernel.org>
Subject: [PATCH net-next v2 02/13] net: airoha: ppe: Dynamically allocate foe_check_time array in airoha_ppe struct
Date: Thu, 16 Oct 2025 12:28:16 +0200 [thread overview]
Message-ID: <20251016-an7583-eth-support-v2-2-ea6e7e9acbdb@kernel.org> (raw)
In-Reply-To: <20251016-an7583-eth-support-v2-0-ea6e7e9acbdb@kernel.org>
This is a preliminary patch to properly enable PPE support for AN7583
SoC.
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/ethernet/airoha/airoha_eth.h | 2 +-
drivers/net/ethernet/airoha/airoha_ppe.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
index cd13c1c1224f64b63d455b24ce722c33c2fa7125..4330b672d99e1e190efa5ad75d13fb35e77d070e 100644
--- a/drivers/net/ethernet/airoha/airoha_eth.h
+++ b/drivers/net/ethernet/airoha/airoha_eth.h
@@ -554,7 +554,7 @@ struct airoha_ppe {
struct rhashtable l2_flows;
struct hlist_head *foe_flow;
- u16 foe_check_time[PPE_NUM_ENTRIES];
+ u16 *foe_check_time;
struct airoha_foe_stats *foe_stats;
dma_addr_t foe_stats_dma;
diff --git a/drivers/net/ethernet/airoha/airoha_ppe.c b/drivers/net/ethernet/airoha/airoha_ppe.c
index 691361b254075555549ee80a4ed358c52e8e00b2..8d1dceadce0becb2b1ce656d64ab77bd3c2f914a 100644
--- a/drivers/net/ethernet/airoha/airoha_ppe.c
+++ b/drivers/net/ethernet/airoha/airoha_ppe.c
@@ -1440,6 +1440,11 @@ int airoha_ppe_init(struct airoha_eth *eth)
return -ENOMEM;
}
+ ppe->foe_check_time = devm_kzalloc(eth->dev, PPE_NUM_ENTRIES,
+ GFP_KERNEL);
+ if (!ppe->foe_check_time)
+ return -ENOMEM;
+
err = rhashtable_init(ð->flow_table, &airoha_flow_table_params);
if (err)
return err;
--
2.51.0
next prev parent reply other threads:[~2025-10-16 10:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 10:28 [PATCH net-next v2 00/13] net: airoha: Add AN7583 ethernet controller support Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 01/13] dt-bindings: net: airoha: Add AN7583 support Lorenzo Bianconi
2025-10-16 17:06 ` Conor Dooley
2025-10-16 10:28 ` Lorenzo Bianconi [this message]
2025-10-16 10:28 ` [PATCH net-next v2 03/13] net: airoha: Add airoha_ppe_get_num_stats_entries() and airoha_ppe_get_num_total_stats_entries() Lorenzo Bianconi
2025-10-16 15:55 ` Simon Horman
2025-10-16 10:28 ` [PATCH net-next v2 04/13] net: airoha: Add airoha_eth_soc_data struct Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 05/13] net: airoha: Generalize airoha_ppe2_is_enabled routine Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 06/13] net: airoha: ppe: Move PPE memory info in airoha_eth_soc_data struct Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 07/13] net: airoha: ppe: Remove airoha_ppe_is_enabled() where not necessary Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 08/13] net: airoha: ppe: Configure SRAM PPE entries via the cpu Lorenzo Bianconi
2025-10-16 15:54 ` Simon Horman
2025-10-16 10:28 ` [PATCH net-next v2 09/13] net: airoha: ppe: Flush PPE SRAM table during PPE setup Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 10/13] net: airoha: Select default ppe cpu port in airoha_dev_init() Lorenzo Bianconi
2025-10-16 15:59 ` Simon Horman
2025-10-16 10:28 ` [PATCH net-next v2 11/13] net: airoha: Refactor src port configuration in airhoha_set_gdm2_loopback Lorenzo Bianconi
2025-10-16 16:00 ` Simon Horman
2025-10-16 10:28 ` [PATCH net-next v2 12/13] net: airoha: ppe: Do not use magic numbers in airoha_ppe_foe_get_entry_locked() Lorenzo Bianconi
2025-10-16 16:00 ` Simon Horman
2025-10-16 10:28 ` [PATCH net-next v2 13/13] net: airoha: Add AN7583 SoC support Lorenzo Bianconi
2025-10-16 16:00 ` 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=20251016-an7583-eth-support-v2-2-ea6e7e9acbdb@kernel.org \
--to=lorenzo@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=krzk+dt@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=p.zabel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/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).