projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs-vsctl: Allow "get" commands to create @names also.
[openvswitch]
/
lib
/
odp-util.h
diff --git
a/lib/odp-util.h
b/lib/odp-util.h
index dc9a43db215f66778e44d4eeeedb3d7d08aa0bf8..420bde53c01cf2390f3ee3fbee9e716ae0c3afda 100644
(file)
--- a/
lib/odp-util.h
+++ b/
lib/odp-util.h
@@
-22,6
+22,7
@@
#include <stdint.h>
#include "openflow/openflow.h"
#include "openvswitch/datapath-protocol.h"
#include <stdint.h>
#include "openflow/openflow.h"
#include "openvswitch/datapath-protocol.h"
+#include "util.h"
struct ds;
struct ds;
@@
-29,6
+30,9
@@
struct ds;
* memory, so there is no point in allocating more than that. */
enum { MAX_ODP_ACTIONS = 4096 / sizeof(union odp_action) };
* memory, so there is no point in allocating more than that. */
enum { MAX_ODP_ACTIONS = 4096 / sizeof(union odp_action) };
+/* odp_actions_add() assumes that MAX_ODP_ACTIONS is a power of 2. */
+BUILD_ASSERT_DECL(IS_POW2(MAX_ODP_ACTIONS));
+
struct odp_actions {
size_t n_actions;
union odp_action actions[MAX_ODP_ACTIONS];
struct odp_actions {
size_t n_actions;
union odp_action actions[MAX_ODP_ACTIONS];