mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
classifier: New function cls_rule_move().
This function will acquire its first user in an upcoming commit. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
This commit is contained in:
@@ -89,7 +89,7 @@ cls_rule_init_from_minimatch(struct cls_rule *rule,
|
||||
|
||||
/* Initializes 'dst' as a copy of 'src'.
|
||||
*
|
||||
* The caller must eventually destroy 'rule' with cls_rule_destroy(). */
|
||||
* The caller must eventually destroy 'dst' with cls_rule_destroy(). */
|
||||
void
|
||||
cls_rule_clone(struct cls_rule *dst, const struct cls_rule *src)
|
||||
{
|
||||
@@ -97,6 +97,16 @@ cls_rule_clone(struct cls_rule *dst, const struct cls_rule *src)
|
||||
dst->priority = src->priority;
|
||||
}
|
||||
|
||||
/* Initializes 'dst' with the data in 'src', destroying 'src'.
|
||||
*
|
||||
* The caller must eventually destroy 'dst' with cls_rule_destroy(). */
|
||||
void
|
||||
cls_rule_move(struct cls_rule *dst, struct cls_rule *src)
|
||||
{
|
||||
minimatch_move(&dst->match, &src->match);
|
||||
dst->priority = src->priority;
|
||||
}
|
||||
|
||||
/* Frees memory referenced by 'rule'. Doesn't free 'rule' itself (it's
|
||||
* normally embedded into a larger structure).
|
||||
*
|
||||
|
Reference in New Issue
Block a user