projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofp-util: Also accept NXAST_DROP_SPOOFED_ARP.
[openvswitch]
/
datapath
/
flow.c
diff --git
a/datapath/flow.c
b/datapath/flow.c
index dbfe5dd733d7692adf84732eef17ff512080fed8..7684c061aaaed2541ce202d60c39168837eaad7c 100644
(file)
--- a/
datapath/flow.c
+++ b/
datapath/flow.c
@@
-108,7
+108,10
@@
struct sw_flow_actions *flow_actions_alloc(size_t n_actions)
{
struct sw_flow_actions *sfa;
{
struct sw_flow_actions *sfa;
- if (n_actions > (PAGE_SIZE - sizeof *sfa) / sizeof(union odp_action))
+ /* At least DP_MAX_PORTS actions are required to be able to flood a
+ * packet to every port. Factor of 2 allows for setting VLAN tags,
+ * etc. */
+ if (n_actions > 2 * DP_MAX_PORTS)
return ERR_PTR(-EINVAL);
sfa = kmalloc(sizeof *sfa + n_actions * sizeof(union odp_action),
return ERR_PTR(-EINVAL);
sfa = kmalloc(sizeof *sfa + n_actions * sizeof(union odp_action),