mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
Support accepting and displaying table names in OVS tools.
OpenFlow has little-known support for naming tables. Open vSwitch has supported table names for ages, but it has never used or displayed them outside of commands dedicated to table manipulation. This commit adds support for table names in ovs-ofctl. When a table has a name, it displays that name in flows and actions, so that, for example, the following: table=1, arp, actions=resubmit(,2) might become: table=ingress_acl, arp, actions=resubmit(,mac_learning) given appropriately named tables. For backward compatibility, only interactive ovs-ofctl commands by default display table names; to display them in scripts, use the new --names option. This feature was inspired by a talk that Kei Nohguchi presented at Open vSwitch 2017 Fall Conference. CC: Kei Nohguchi <kei@nohguchi.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com> Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
This commit is contained in:
@@ -1068,6 +1068,7 @@ uint32_t ofpacts_get_meter(const struct ofpact[], size_t ofpacts_len);
|
||||
struct ofpact_format_params {
|
||||
/* Input. */
|
||||
const struct ofputil_port_map *port_map;
|
||||
const struct ofputil_table_map *table_map;
|
||||
|
||||
/* Output. */
|
||||
struct ds *s;
|
||||
@@ -1080,6 +1081,7 @@ const char *ofpact_name(enum ofpact_type);
|
||||
struct ofpact_parse_params {
|
||||
/* Input. */
|
||||
const struct ofputil_port_map *port_map;
|
||||
const struct ofputil_table_map *table_map;
|
||||
|
||||
/* Output. */
|
||||
struct ofpbuf *ofpacts;
|
||||
|
Reference in New Issue
Block a user