Skip to content

Commit

Permalink
ofproto-dpif: Add table_is_internal() helper
Browse files Browse the repository at this point in the history
This will be used by a subsequent patch to add support for
recirculation for MPLS.

Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
horms authored and blp committed May 2, 2014
1 parent d4e7819 commit 56c091e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ofproto/ofproto-dpif.c
Original file line number Diff line number Diff line change
Expand Up @@ -4514,6 +4514,13 @@ ofproto_dpif_unixctl_init(void)
ofproto_unixctl_dpif_dump_flows, NULL);
}

/* Returns true if 'table' is the table used for internal rules,
* false otherwise. */
bool
table_is_internal(uint8_t table_id)
{
return table_id == TBL_INTERNAL;
}

/* Linux VLAN device support (e.g. "eth0.10" for VLAN 10.)
*
Expand Down
2 changes: 2 additions & 0 deletions ofproto/ofproto-dpif.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ static inline bool rule_dpif_is_internal(const struct rule_dpif *);

uint8_t rule_dpif_get_table(const struct rule_dpif *);

bool table_is_internal(uint8_t table_id);

const struct rule_actions *rule_dpif_get_actions(const struct rule_dpif *);

ovs_be64 rule_dpif_get_flow_cookie(const struct rule_dpif *rule);
Expand Down

0 comments on commit 56c091e

Please sign in to comment.