summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
e1f0889)
Change-Id: I84cea7530b01302a0adeef95b4924f54dc2e41ec
Signed-off-by: Eyal Bari <ebari@cisco.com>
#define _(sym,str) L2INPUT_FEAT_##sym##_BIT,
foreach_l2input_feat
#undef _
#define _(sym,str) L2INPUT_FEAT_##sym##_BIT,
foreach_l2input_feat
#undef _
- L2INPUT_N_FEAT,
- L2INPUT_VALID_MASK =
-#define _(sym,str) L2INPUT_FEAT_##sym##_BIT |
- foreach_l2input_feat
-#undef _
- 0,
+STATIC_ASSERT (L2INPUT_N_FEAT <= 32, "too many l2 input features");
+
/* Feature bit masks */
typedef enum
{
#define _(sym,str) L2INPUT_FEAT_##sym = (1<<L2INPUT_FEAT_##sym##_BIT),
foreach_l2input_feat
#undef _
/* Feature bit masks */
typedef enum
{
#define _(sym,str) L2INPUT_FEAT_##sym = (1<<L2INPUT_FEAT_##sym##_BIT),
foreach_l2input_feat
#undef _
+ L2INPUT_VALID_MASK =
+#define _(sym,str) L2INPUT_FEAT_##sym |
+ foreach_l2input_feat
+#undef _
+ 0
+STATIC_ASSERT ((u64) L2INPUT_VALID_MASK == (1ull << L2INPUT_N_FEAT) - 1, "");
+
/** Return an array of strings containing graph node names of each feature */
char **l2input_get_feat_names (void);
/** Return an array of strings containing graph node names of each feature */
char **l2input_get_feat_names (void);