]> git.ipfire.org Git - thirdparty/linux.git/commit
net: airoha: npu: Add a NPU callback to initialize flow stats
authorLorenzo Bianconi <lorenzo@kernel.org>
Wed, 24 Sep 2025 21:14:53 +0000 (23:14 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 27 Sep 2025 00:29:54 +0000 (17:29 -0700)
commit105ce7ad57e492b75ab40f2dc591db645fadbaa2
tree4630c2dac6d375942e885aad8ef1a3f53817bfe7
parent20a2e46f9e4c3c9a8a17708f81db672a26738adc
net: airoha: npu: Add a NPU callback to initialize flow stats

Introduce a NPU callback to initialize flow stats and remove NPU stats
initialization from airoha_npu_get routine. Add num_stats_entries to
airoha_npu_ppe_stats_setup routine.
This patch makes the code more readable since NPU statistic are now
initialized on demand by the NPU consumer (at the moment NPU statistic
are configured just by the airoha_eth driver).
Moreover this patch allows the NPU consumer (PPE module) to explicitly
enable/disable NPU flow stats.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250924-airoha-npu-init-stats-callback-v1-1-88bdf3c941b2@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/airoha/airoha_npu.c
drivers/net/ethernet/airoha/airoha_ppe.c
include/linux/soc/airoha/airoha_offload.h