• zhangliping's avatar
    openvswitch: fix the incorrect flow action alloc size · 67c8d22a
    zhangliping authored
    If we want to add a datapath flow, which has more than 500 vxlan outputs'
    action, we will get the following error reports:
      openvswitch: netlink: Flow action size 32832 bytes exceeds max
      openvswitch: netlink: Flow action size 32832 bytes exceeds max
      openvswitch: netlink: Actions may not be safe on all matching packets
      ... ...
    
    It seems that we can simply enlarge the MAX_ACTIONS_BUFSIZE to fix it, but
    this is not the root cause. For example, for a vxlan output action, we need
    about 60 bytes for the nlattr, but after it is converted to the flow
    action, it only occupies 24 bytes. This means that we can still support
    more than 1000 vxlan output actions for a single datapath flow under the
    the current 32k max limitation.
    
    So even if the nla_len(attr) is larger than MAX_ACTIONS_BUFSIZE, we
    shouldn't report EINVAL and keep it move on, as the judgement can be
    done by the reserve_sfa_size.
    Signed-off-by: default avatarzhangliping <zhangliping02@baidu.com>
    Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    67c8d22a
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
actions.c Loading commit data...
conntrack.c Loading commit data...
conntrack.h Loading commit data...
datapath.c Loading commit data...
datapath.h Loading commit data...
dp_notify.c Loading commit data...
flow.c Loading commit data...
flow.h Loading commit data...
flow_netlink.c Loading commit data...
flow_netlink.h Loading commit data...
flow_table.c Loading commit data...
flow_table.h Loading commit data...
meter.c Loading commit data...
meter.h Loading commit data...
vport-geneve.c Loading commit data...
vport-gre.c Loading commit data...
vport-internal_dev.c Loading commit data...
vport-internal_dev.h Loading commit data...
vport-netdev.c Loading commit data...
vport-netdev.h Loading commit data...
vport-vxlan.c Loading commit data...
vport.c Loading commit data...
vport.h Loading commit data...