OSDN Git Service

datapath: Avoid using stack larger than 1024.
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Fri, 30 Jun 2017 00:27:44 +0000 (17:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Jul 2017 16:09:59 +0000 (09:09 -0700)
commit9cc9a5cb176ccb4f2cda5ac34da5a659926f125f
tree3fd2e4ecc9d5c9ef188ee1c85e25234bcde82a28
parent7e5988df26cdd7d823ab473ad3e3ca6623a66f21
datapath: Avoid using stack larger than 1024.

When compiling OvS-master on 4.4.0-81 kernel,
there is a warning:

    CC [M]  /root/ovs/datapath/linux/datapath.o
    /root/ovs/datapath/linux/datapath.c: In function
    'ovs_flow_cmd_set':
    /root/ovs/datapath/linux/datapath.c:1221:1: warning:
    the frame size of 1040 bytes is larger than 1024 bytes
    [-Wframe-larger-than=]

This patch factors out match-init and action-copy to avoid
"Wframe-larger-than=1024" warning. Because mask is only
used to get actions, we new a function to save some
stack space.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/datapath.c