[ovs-dev] [PATCH] netdev-linux: do not remove ingress qdisc when disable policing.
Guoshuai Li
ligs at dtdream.com
Fri Oct 13 06:01:07 UTC 2017
rate limiting may be implemented in other ways (such as nova),
this time need to disable rate limiting.
I think it should not remove tc qdisk when ingress_policing_burst
is disabled.
Signed-off-by: Guoshuai Li <ligs at dtdream.com>
Co-authored-by: huweihua <huwh at dtdream.com>
---
lib/netdev-linux.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 2ff3e2bcc..eafe38257 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -2127,16 +2127,16 @@ 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 (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;
+ }
+
error = tc_add_del_ingress_qdisc(ifindex, true);
if (error) {
VLOG_WARN_RL(&rl, "%s: adding policing qdisc failed: %s",
--
2.13.2.windows.1
More information about the dev
mailing list