<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>The distribution version of OS of mime is&nbsp;CentOS Linux release 7.5.1804 (Core),and the kernel version is&nbsp;3.10.0-862.14.4.el7.x86_64.&nbsp; &nbsp;I plan to merge the meters patch to the 3.10.0-862 kernel of CentOS7.5.&nbsp;</div><div>Where is the function patch address?&nbsp; Do you have some suggestions£¿&nbsp;</div><div><br></div><div>Regards,</div><div>yunxiang</div><br><br><br><br><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><br><pre><br>At 2019-01-29 02:49:59, "Justin Pettit" &lt;jpettit@ovn.org&gt; wrote:
&gt;I'd have to look at the history, but the feature wouldn't have been added to OVN unless it was supported by OVS.  Currently, we expect OVN to work with the same version number of OVS.  (Although, I expect you could use a newer version of OVS and an older OVN.)  We plan to break that requirement so that each OVS and OVN can use different version going forward, but we're not there yet.
&gt;
&gt;--Justin
&gt;
&gt;
&gt;&gt; On Jan 28, 2019, at 3:15 AM, taoyunupt &lt;taoyunupt@126.com&gt; wrote:
&gt;&gt; 
&gt;&gt; Hello,justin
&gt;&gt;                Forgive me!  I have another question. As OVN use meters to implement  QoS and meters was added from ovs2.10, how the ovn(&lt;2.10) support QoS?
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; Regards,
&gt;&gt; Yunxiang
&gt;&gt; 
&gt;&gt; 
&gt;&gt; At 2019-01-28 15:43:24, "Justin Pettit" &lt;jpettit@ovn.org&gt; wrote:
&gt;&gt; &gt;Sorry, I was thinking of another system that used OVS's tc instead of meters to implement basic QoS.  OVN does use meters to implement most modes of QoS.  If you don't want to use meters, you could try looking at the "qos_max_rate" and "qos_burst" options in the ovn-nb man page, but I don't have any experience using them.
&gt;&gt; &gt;
&gt;&gt; &gt;--Justin
&gt;&gt; &gt;
&gt;&gt; &gt;
&gt;&gt; &gt;&gt; On Jan 27, 2019, at 11:26 PM, taoyunupt &lt;taoyunupt@126.com&gt; wrote:
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; The method build_qos in  /ovn/northd/ovn-northd.c is as fellows,in the end of the method,it  adds logical flow by the code of
&gt;&gt; &gt;&gt; ovn_lflow_add(lflows, od, stage,qos-&gt;priority,qos-&gt;match, ds_cstr(&amp;meter_action));
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; Does this mean the meter table is the only way for ovn to add Qos?
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt;                           
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; build_qos(struct ovn_datapath *od, struct hmap *lflows) {
&gt;&gt; &gt;&gt;     ovn_lflow_add(lflows, od, S_SWITCH_IN_QOS_MARK, 0, "1", "next;");
&gt;&gt; &gt;&gt;     ovn_lflow_add(lflows, od, S_SWITCH_OUT_QOS_MARK, 0, "1", "next;");
&gt;&gt; &gt;&gt;     ovn_lflow_add(lflows, od, S_SWITCH_IN_QOS_METER, 0, "1", "next;");
&gt;&gt; &gt;&gt;     ovn_lflow_add(lflows, od, S_SWITCH_OUT_QOS_METER, 0, "1", "next;");
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt;     for (size_t i = 0; i &lt; od-&gt;nbs-&gt;n_qos_rules; i++) {
&gt;&gt; &gt;&gt;         struct nbrec_qos *qos = od-&gt;nbs-&gt;qos_rules[i];
&gt;&gt; &gt;&gt;         bool ingress = !strcmp(qos-&gt;direction, "from-lport") ? true :false;
&gt;&gt; &gt;&gt;         enum ovn_stage stage = ingress ? S_SWITCH_IN_QOS_MARK : S_SWITCH_OUT_QOS_MARK;
&gt;&gt; &gt;&gt;         int64_t rate = 0;
&gt;&gt; &gt;&gt;         int64_t burst = 0;
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt;         for (size_t j = 0; j &lt; qos-&gt;n_action; j++) {
&gt;&gt; &gt;&gt;             if (!strcmp(qos-&gt;key_action[j], "dscp")) {
&gt;&gt; &gt;&gt;                 struct ds dscp_action = DS_EMPTY_INITIALIZER;
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt;                 ds_put_format(&amp;dscp_action, "ip.dscp = %"PRId64"; next;",
&gt;&gt; &gt;&gt;                               qos-&gt;value_action[j]);
&gt;&gt; &gt;&gt;                 ovn_lflow_add(lflows, od, stage,
&gt;&gt; &gt;&gt;                               qos-&gt;priority,
&gt;&gt; &gt;&gt;                               qos-&gt;match, ds_cstr(&amp;dscp_action));
&gt;&gt; &gt;&gt;                 ds_destroy(&amp;dscp_action);
&gt;&gt; &gt;&gt;             }
&gt;&gt; &gt;&gt;         }
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt;         for (size_t n = 0; n &lt; qos-&gt;n_bandwidth; n++) {
&gt;&gt; &gt;&gt;             if (!strcmp(qos-&gt;key_bandwidth[n], "rate")) {
&gt;&gt; &gt;&gt;                 rate = qos-&gt;value_bandwidth[n];
&gt;&gt; &gt;&gt;             } else if (!strcmp(qos-&gt;key_bandwidth[n], "burst")) {
&gt;&gt; &gt;&gt;                 burst = qos-&gt;value_bandwidth[n];
&gt;&gt; &gt;&gt;             }
&gt;&gt; &gt;&gt;         }
&gt;&gt; &gt;&gt;         if (rate) {
&gt;&gt; &gt;&gt;             struct ds meter_action = DS_EMPTY_INITIALIZER;
&gt;&gt; &gt;&gt;             stage = ingress ? S_SWITCH_IN_QOS_METER : S_SWITCH_OUT_QOS_METER;
&gt;&gt; &gt;&gt;             if (burst) {
&gt;&gt; &gt;&gt;                 ds_put_format(&amp;meter_action,
&gt;&gt; &gt;&gt;                               "set_meter(%"PRId64", %"PRId64"); next;",
&gt;&gt; &gt;&gt;                               rate, burst);
&gt;&gt; &gt;&gt;             } else {
&gt;&gt; &gt;&gt;                 ds_put_format(&amp;meter_action,
&gt;&gt; &gt;&gt;                               "set_meter(%"PRId64"); next;",
&gt;&gt; &gt;&gt;                               rate);
&gt;&gt; &gt;&gt;             }
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt;             /* Ingress and Egress QoS Meter Table.
&gt;&gt; &gt;&gt;              *
&gt;&gt; &gt;&gt;              * We limit the bandwidth of this flow by adding a meter table.
&gt;&gt; &gt;&gt;              */
&gt;&gt; &gt;&gt;             ovn_lflow_add(lflows, od, stage,
&gt;&gt; &gt;&gt;                           qos-&gt;priority,
&gt;&gt; &gt;&gt;                           qos-&gt;match, ds_cstr(&amp;meter_action));
&gt;&gt; &gt;&gt;             ds_destroy(&amp;meter_action);
&gt;&gt; &gt;&gt;         }
&gt;&gt; &gt;&gt;     }
&gt;&gt; &gt;&gt; }
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; At 2019-01-28 15:15:51, "Justin Pettit" &lt;jpettit@ovn.org&gt; wrote:
&gt;&gt; &gt;&gt; &gt;QoS is most likely using the kernel's built-in traffic-shaping algorithms in tc.  Those should work the same on all supported kernels.
&gt;&gt; &gt;&gt; &gt;
&gt;&gt; &gt;&gt; &gt;--Justin
&gt;&gt; &gt;&gt; &gt;
&gt;&gt; &gt;&gt; &gt;
&gt;&gt; &gt;&gt; &gt;&gt; On Jan 27, 2019, at 11:10 PM, taoyunupt &lt;taoyunupt@126.com&gt; wrote:
&gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; Thanks justin,
&gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; My environment is OVS for the OVN/openstack.I also want to know ,if i must use meter for the  openstack/ovn feature 'Qos'.Does any other methods to achive this?
&gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; Regards,
&gt;&gt; &gt;&gt; &gt;&gt; Yunxiang
&gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; At 2019-01-28 14:58:19, "Justin Pettit" &lt;jpettit@ovn.org&gt; wrote:
&gt;&gt; &gt;&gt; &gt;&gt; &gt;This is the patch:
&gt;&gt; &gt;&gt; &gt;&gt; &gt;
&gt;&gt; &gt;&gt; &gt;&gt; &gt;        http://patchwork.ozlabs.org/patch/950513/
&gt;&gt; &gt;&gt; &gt;&gt; &gt;
&gt;&gt; &gt;&gt; &gt;&gt; &gt;I think it was only broken in kernels 4.15, 4.16, and 4.17.  I expect that 4.20 will be fine.
&gt;&gt; &gt;&gt; &gt;&gt; &gt;
&gt;&gt; &gt;&gt; &gt;&gt; &gt;--Justin
&gt;&gt; &gt;&gt; &gt;&gt; &gt;
&gt;&gt; &gt;&gt; &gt;&gt; &gt;
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; On Jan 27, 2019, at 10:16 PM, taoyunupt &lt;taoyunupt@126.com&gt; wrote:
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Hello,justin,
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;          I  met a supporting problem of meter of OVS 2.10. I found a mail from you,after searching the internet.The address of this mail is "https://www.mail-archive.com/ovs-discuss@openvswitch.org/msg04180.html"
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;          The kernel version of  "4.20.5-1.el7.elrepo.x86_64" goes well with meter table of ovs,but I want to know how to fit the  maintained older kernels.
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;          If i want to use ovs with maintained older kernels,which patch you metioned in the mail, should i import ?
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Regards,
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; yunxiang
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; _______________________________________________
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; discuss mailing list
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; discuss@openvswitch.org
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
&gt;&gt; &gt;&gt; &gt;&gt; 
&gt;&gt; &gt;&gt; 
&gt;&gt; 
</pre></div>