mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-07 09:54:19 +00:00
do_execute_actions() function can be called recursively multiple
times while executing actions that require pipeline forking or
recirculations. It may also be re-entered multiple times if the packet
leaves openvswitch module and re-enters it through a different port.
Currently, there is a 256-byte array allocated on stack in this
function that is supposed to hold NSH header. Compilers tend to
pre-allocate that space right at the beginning of the function:
a88: 48 81 ec b0 01 00 00 sub $0x1b0,%rsp
NSH is not a very common protocol, but the space is allocated on every
recursive call or re-entry multiplying the wasted stack space.
Move the stack allocation to push_nsh() function that is only used
if NSH actions are actually present. push_nsh() is also a simple
function without a possibility for re-entry, so the stack is returned
right away.
With this change the preallocated space is reduced by 256 B per call:
b18: 48 81 ec b0 00 00 00 sub $0xb0,%rsp
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Eelco Chaudron echaudro@redhat.com
Reviewed-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||
|---|---|---|
| .. | ||
| actions.c | ||
| conntrack.c | ||
| conntrack.h | ||
| datapath.c | ||
| datapath.h | ||
| dp_notify.c | ||
| drop.h | ||
| flow_netlink.c | ||
| flow_netlink.h | ||
| flow_table.c | ||
| flow_table.h | ||
| flow.c | ||
| flow.h | ||
| Kconfig | ||
| Makefile | ||
| meter.c | ||
| meter.h | ||
| openvswitch_trace.c | ||
| openvswitch_trace.h | ||
| vport-geneve.c | ||
| vport-gre.c | ||
| vport-internal_dev.c | ||
| vport-internal_dev.h | ||
| vport-netdev.c | ||
| vport-netdev.h | ||
| vport-vxlan.c | ||
| vport.c | ||
| vport.h | ||