summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-07-15 14:35:07 +0200
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-08-22 13:24:13 -0700
commit33b165684ab70867d4545643f550a5d48d3ddc57 (patch)
treed4a64a7eeed79b253fbdac2e0351a5f17bafc10a /drivers/net/ethernet/intel/i40e/i40e_ethtool.c
parentc76c992525245ec1c7b6738bf887c42099abab02 (diff)
downloadlwn-33b165684ab70867d4545643f550a5d48d3ddc57.tar.gz
lwn-33b165684ab70867d4545643f550a5d48d3ddc57.zip
i40e: reduce stack usage in i40e_set_fc
The functions i40e_aq_get_phy_abilities_resp() and i40e_set_fc() both have giant structure on the stack, which makes each one use stack frames larger than 500 bytes. As clang decides one function into the other, we get a warning for exceeding the frame size limit on 32-bit architectures: drivers/net/ethernet/intel/i40e/i40e_common.c:1654:23: error: stack frame size of 1116 bytes in function 'i40e_set_fc' [-Werror,-Wframe-larger-than=] When building with gcc, the inlining does not happen, but i40e_set_fc() calls i40e_aq_get_phy_abilities_resp() anyway, so they add up on the kernel stack just as much. The parts that actually use large stacks don't overlap, so make sure each one is a separate function, and mark them as noinline_for_stack to prevent the compilers from combining them again. Fixes: 0a862b43acc6 ("i40e/i40evf: Add module_types and update_link_info") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_ethtool.c')
0 files changed, 0 insertions, 0 deletions