rate limiting may be implemented in other ways (such as nova/libvirt), ovs never enable policing. I think ovs need not control qdisc, such as remove qdisk added by other.
Signed-off-by: Guoshuai Li <l...@dtdream.com> Signed-off-by: huweihua <h...@dtdream.com> --- v2: Fix cannot disable policing when set ingress_policing_rate to 0. --- lib/netdev-linux.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index fbbbb7205..99704938d 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -2128,13 +2128,15 @@ netdev_linux_set_policing(struct netdev *netdev_, goto out; } - COVERAGE_INC(netdev_set_policing); - /* Remove any existing ingress qdisc. */ - error = tc_add_del_ingress_qdisc(ifindex, false); - if (error) { - VLOG_WARN_RL(&rl, "%s: removing policing failed: %s", - netdev_name, ovs_strerror(error)); - goto out; + if (netdev->kbits_rate || kbits_rate) { + COVERAGE_INC(netdev_set_policing); + /* Remove any existing ingress qdisc. */ + error = tc_add_del_ingress_qdisc(ifindex, false); + if (error) { + VLOG_WARN_RL(&rl, "%s: removing policing failed: %s", + netdev_name, ovs_strerror(error)); + goto out; + } } if (kbits_rate) { -- 2.13.2.windows.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev