ovn-northd sets 'ip.dscp' to the DSCP value Signed-off-by: Babu Shanmugam <bscha...@redhat.com> --- ovn/controller/lflow.c | 2 +- ovn/northd/ovn-northd.c | 4 ++++ ovn/ovn-nb.xml | 6 ++++++ ovn/ovn-sb.xml | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/ovn/controller/lflow.c b/ovn/controller/lflow.c index 52e6131..99008ba 100644 --- a/ovn/controller/lflow.c +++ b/ovn/controller/lflow.c @@ -98,7 +98,7 @@ lflow_init(void) expr_symtab_add_predicate(&symtab, "ip6", "eth.type == 0x86dd"); expr_symtab_add_predicate(&symtab, "ip", "ip4 || ip6"); expr_symtab_add_field(&symtab, "ip.proto", MFF_IP_PROTO, "ip", true); - expr_symtab_add_field(&symtab, "ip.dscp", MFF_IP_DSCP, "ip", false); + expr_symtab_add_field(&symtab, "ip.dscp", MFF_IP_DSCP_SHIFTED, "ip", false); expr_symtab_add_field(&symtab, "ip.ecn", MFF_IP_ECN, "ip", false); expr_symtab_add_field(&symtab, "ip.ttl", MFF_IP_TTL, "ip", false); diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index 9da8614..7b430a3 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -1655,6 +1655,10 @@ build_lswitch_flows(struct hmap *datapaths, struct hmap *ports, "eth.src", op->nbs->port_security, op->nbs->n_port_security, &match); const char *queue_id = smap_get(&op->sb->options, "qdisc_queue_id"); + const char *dscp = smap_get(&op->sb->options, "qos_dscp"); + if (dscp) { + ds_put_format(&action, "ip.dscp = %s;", dscp); + } if (queue_id) { ds_put_format(&action, "set_queue(%s);", queue_id); } diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml index 308ae88..9b925ab 100644 --- a/ovn/ovn-nb.xml +++ b/ovn/ovn-nb.xml @@ -204,6 +204,12 @@ If set, indicates the maximum burst size for data sent from this interface, in bits. </column> + + <column name="options" key="qos_dscp"> + If set, indicates the DSCP code to be marked on the packets egressing + the VIF interface. Value should be in the range of + 0 to 63 (inclusive). + </column> </group> </group> diff --git a/ovn/ovn-sb.xml b/ovn/ovn-sb.xml index 6655fab..9747bb0 100644 --- a/ovn/ovn-sb.xml +++ b/ovn/ovn-sb.xml @@ -1538,6 +1538,11 @@ tcp.flags = RST; interface, in bits. </column> + <column name="options" key="qos_dscp"> + If set, indicates the DSCP code to be marked on the packets egressing + the VIF interface. Value should be in the range of 0 to 63 (inclusive). + </column> + <column name="options" key="qdisc_queue_id"> Indicates the queue number on the physical device. This is same as the queue_id used in OpenFlow in struct ofp_action_enqueue. Value should -- 2.5.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev