Message ID | 20171116061826.10456-1-ligs@dtdream.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [ovs-dev,v2] netdev-linux: Do not remove ingress qdisc when policing is never enabled. | expand |
On Thu, Nov 16, 2017 at 02:18:26PM +0800, Guoshuai Li wrote: > 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 <ligs@dtdream.com> > Signed-off-by: huweihua <huwh@dtdream.com> > --- > > v2: Fix cannot disable policing when set ingress_policing_rate to 0. I am not sure that this is the right solution. I am willing to try it anyway and see if anything breaks. However, I do not understand the sign-off chain. Who is the author of this patch? Who is the other person who signed off on it? Thanks, Ben.
> On Thu, Nov 16, 2017 at 02:18:26PM +0800, Guoshuai Li wrote: >> 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 <ligs@dtdream.com> >> Signed-off-by: huweihua <huwh@dtdream.com> >> --- >> >> v2: Fix cannot disable policing when set ingress_policing_rate to 0. > I am not sure that this is the right solution. I am willing to try it > anyway and see if anything breaks. > > However, I do not understand the sign-off chain. Who is the author of > this patch? Who is the other person who signed off on it? This problem is discovered by huweihua and he gives the solution, Then I change it and tested. Is it better to use "Co-authored-by"? > Thanks, > > Ben.
On Thu, Nov 30, 2017 at 04:56:16PM +0800, Guoshuai Li wrote: > > > >On Thu, Nov 16, 2017 at 02:18:26PM +0800, Guoshuai Li wrote: > >>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 <ligs@dtdream.com> > >>Signed-off-by: huweihua <huwh@dtdream.com> > >>--- > >> > >>v2: Fix cannot disable policing when set ingress_policing_rate to 0. > >I am not sure that this is the right solution. I am willing to try it > >anyway and see if anything breaks. > > > >However, I do not understand the sign-off chain. Who is the author of > >this patch? Who is the other person who signed off on it? > This problem is discovered by huweihua and he gives the solution, > Then I change it and tested. > Is it better to use "Co-authored-by"? I think so.
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) {