From: Babu Shanmugam <bscha...@redhat.com> Added an additional option 'qos_dscp' for VMI Logical_Ports
Signed-off-by: Babu Shanmugam <bscha...@redhat.com> --- ovn/controller/binding.c | 10 +++++++++- ovn/ovn-nb.xml | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ovn/controller/binding.c b/ovn/controller/binding.c index 6b6c40a..0e20938 100644 --- a/ovn/controller/binding.c +++ b/ovn/controller/binding.c @@ -51,6 +51,7 @@ binding_register_ovs_idl(struct ovsdb_idl *ovs_idl) ovsdb_idl_add_table(ovs_idl, &ovsrec_table_queue); ovsdb_idl_add_column(ovs_idl, &ovsrec_queue_col_other_config); + ovsdb_idl_add_column(ovs_idl, &ovsrec_queue_col_dscp); } static void @@ -146,6 +147,7 @@ update_qos(struct ovsdb_idl_txn *txn, { int rate = smap_get_int(&pb->options, "qos_max_rate", 0); int burst = smap_get_int(&pb->options, "qos_burst", 0); + int64_t dscp = smap_get_int(&pb->options, "qos_dscp", -1); struct smap other_config = SMAP_INITIALIZER(&other_config); struct ovsrec_queue *default_queue; bool is_empty_config; @@ -157,7 +159,7 @@ update_qos(struct ovsdb_idl_txn *txn, smap_add_format(&other_config, "burst", "%d", burst); } - is_empty_config = smap_is_empty(&other_config); + is_empty_config = smap_is_empty(&other_config) && dscp < 0; if (port_rec->qos) { if (is_empty_config) { struct ovsrec_qos *qos = port_rec->qos; @@ -183,6 +185,12 @@ update_qos(struct ovsdb_idl_txn *txn, } } ovsrec_queue_set_other_config(default_queue, &other_config); + if (dscp >= 0) { + ovsrec_queue_set_dscp(default_queue, &dscp, 1); + } else { + ovsrec_queue_set_dscp(default_queue, NULL, 0); + } + smap_destroy(&other_config); } diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml index 8cca2ed..eeec05b 100644 --- a/ovn/ovn-nb.xml +++ b/ovn/ovn-nb.xml @@ -211,6 +211,11 @@ If set, indicates the maximum burst size for data sent from this interface, in kb. </column> + + <column name="options" key="qos_dscp"> + If set, indicates the DSCP marking to be be done on packets sent + from this interface. + </column> </group> </group> -- 2.5.0 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev