@@ -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);
@@ -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);
}
@@ -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>
@@ -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
ovn-northd sets 'ip.dscp' to the DSCP value Signed-off-by: Babu Shanmugam <bschanmu@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(-)