mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
net: airoha: ppe: Dynamically allocate foe_check_time array in airoha_ppe struct
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> Link: https://patch.msgid.link/20251017-an7583-eth-support-v3-2-f28319666667@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
committed by
Paolo Abeni
parent
51538c0c9d
commit
6d5b601d52
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user