static inline const struct rule_actions * rule_get_actions(const struct rule *);
static inline bool rule_is_table_miss(const struct rule *);
+static inline bool rule_is_hidden(const struct rule *);
/* A set of actions within a "struct rule".
*
return rule->cr.priority == 0 && cls_rule_is_catchall(&rule->cr);
}
+/* Returns true if 'rule' should be hidden from the controller.
+ *
+ * Rules with priority higher than UINT16_MAX are set up by ofproto itself
+ * (e.g. by in-band control) and are intentionally hidden from the
+ * controller. */
+static inline bool
+rule_is_hidden(const struct rule *rule)
+{
+ return rule->cr.priority > UINT16_MAX;
+}
+
static inline struct rule *
rule_from_cls_rule(const struct cls_rule *cls_rule)
{
}
}
-/* Returns true if 'rule' should be hidden from the controller.
- *
- * Rules with priority higher than UINT16_MAX are set up by ofproto itself
- * (e.g. by in-band control) and are intentionally hidden from the
- * controller. */
-static bool
-ofproto_rule_is_hidden(const struct rule *rule)
-{
- return (rule->cr.priority > UINT16_MAX);
-}
-
static bool
oftable_is_modifiable(const struct oftable *table,
enum ofputil_flow_mod_flags flags)
* rules to be selected. (This doesn't allow OpenFlow clients to meddle
* with hidden flows because OpenFlow uses only a 16-bit field to specify
* priority.) */
- if (ofproto_rule_is_hidden(rule) && c->cr.priority <= UINT16_MAX) {
+ if (rule_is_hidden(rule) && c->cr.priority <= UINT16_MAX) {
return 0;
} else if (rule->pending) {
return OFPROTO_POSTPONE;
struct ofputil_flow_removed fr;
long long int used;
- if (ofproto_rule_is_hidden(rule) ||
- !(rule->flags & OFPUTIL_FF_SEND_FLOW_REM)) {
+ if (rule_is_hidden(rule) || !(rule->flags & OFPUTIL_FF_SEND_FLOW_REM)) {
return;
}
{
enum nx_flow_monitor_flags update;
- if (ofproto_rule_is_hidden(rule)) {
+ if (rule_is_hidden(rule)) {
return;
}
- The operation's only effect was to update rule->modified. */
if (!(op->error
- || ofproto_rule_is_hidden(rule)
+ || rule_is_hidden(rule)
|| (op->type == OFOPERATION_MODIFY
&& !op->actions
&& rule->flow_cookie == op->flow_cookie))) {