mirror_ubuntu-kernels/drivers/net/ethernet/microchip/vcap
Arnd Bergmann 129ff4de58 net: microchip: sparx5: reduce stack usage
The vcap_admin structures in vcap_api_next_lookup_advanced_test()
take several hundred bytes of stack frame, but when CONFIG_KASAN_STACK
is enabled, each one of them also has extra padding before and after
it, which ends up blowing the warning limit:

In file included from drivers/net/ethernet/microchip/vcap/vcap_api.c:3521:
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c: In function 'vcap_api_next_lookup_advanced_test':
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1954:1: error: the frame size of 1448 bytes is larger than 1400 bytes [-Werror=frame-larger-than=]
 1954 | }

Reduce the total stack usage by replacing the five structures with
an array that only needs one pair of padding areas.

Fixes: 1f741f0011 ("net: microchip: sparx5: Add KUNIT tests for enabling/disabling chains")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-20 10:50:47 +00:00
..
Kconfig net: microchip: sparx5: Add VCAP debugfs KUNIT test 2022-11-21 11:33:02 +00:00
Makefile net: microchip: vcap: Add tc flower keys for lan966x 2023-02-10 08:03:09 +00:00
vcap_ag_api.h net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model 2023-02-16 08:59:48 +01:00
vcap_api_client.h sparx5: add support for configuring PSFP via tc 2023-02-06 08:26:26 +00:00
vcap_api_debugfs_kunit.c net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model 2023-02-16 08:59:48 +01:00
vcap_api_debugfs.c net: microchip: sparx5: Add ingress information to VCAP instance 2023-01-30 07:36:22 +00:00
vcap_api_debugfs.h net: microchip: sparx5: Add VCAP debugFS support 2022-11-21 11:33:02 +00:00
vcap_api_kunit.c net: microchip: sparx5: reduce stack usage 2023-02-20 10:50:47 +00:00
vcap_api_private.h net: microchip: sparx5: Add VCAP admin locking in debugFS 2023-01-18 14:31:43 +00:00
vcap_api.c net: microchip: sparx5: Use chain ids without offsets when enabling rules 2023-02-16 08:59:48 +01:00
vcap_api.h net: microchip: sparx5: Add ingress information to VCAP instance 2023-01-30 07:36:22 +00:00
vcap_model_kunit.c net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model 2023-02-16 08:59:48 +01:00
vcap_model_kunit.h net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model 2023-02-16 08:59:48 +01:00
vcap_tc.c net: microchip: sparx5: Add TC vlan action support for the ES0 VCAP 2023-02-16 08:59:49 +01:00
vcap_tc.h net: microchip: sparx5: Add TC vlan action support for the ES0 VCAP 2023-02-16 08:59:49 +01:00