2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

Support accepting and displaying port names in OVS tools.

Until now, most ovs-ofctl commands have not accepted names for ports, only
numbers, and have not been able to display port names either.  It's a lot
easier for users if they can use and see meaningful names instead of
arbitrary numbers.  This commit adds that support.

For backward compatibility, only interactive ovs-ofctl commands by default
display port names; to display them in scripts, use the new --names
option.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Tested-by: Aaron Conole <aconole@redhat.com>
This commit is contained in:
Ben Pfaff
2017-05-31 16:06:12 -07:00
parent 52182c5f50
commit 50f96b10e1
45 changed files with 1383 additions and 617 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
* Copyright (c) 2009-2017 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -269,9 +269,9 @@ cls_rule_equal(const struct cls_rule *a, const struct cls_rule *b)
/* Appends a string describing 'rule' to 's'. */
void
cls_rule_format(const struct cls_rule *rule, const struct tun_table *tun_table,
struct ds *s)
const struct ofputil_port_map *port_map, struct ds *s)
{
minimatch_format(&rule->match, tun_table, s, rule->priority);
minimatch_format(&rule->match, tun_table, port_map, s, rule->priority);
}
/* Returns true if 'rule' matches every packet, false otherwise. */