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 05e1eaf..35bc659 100644 --- a/ovn/controller/lflow.c +++ b/ovn/controller/lflow.c @@ -103,7 +103,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 78c87c9..742ebf2 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -1909,6 +1909,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 ef97d12..79e57e9 100644 --- a/ovn/ovn-nb.xml +++ b/ovn/ovn-nb.xml @@ -228,6 +228,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 be44bcb..8b6c143 100644 --- a/ovn/ovn-sb.xml +++ b/ovn/ovn-sb.xml @@ -1719,6 +1719,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