[ovs-dev,v3,1/2] netdev-linux: Add coverage counters for netdev_set_policing when ingress tc-offload
diff mbox series

Message ID 1554927045-36902-1-git-send-email-xiangxia.m.yue@gmail.com
State New
Headers show
Series
  • [ovs-dev,v3,1/2] netdev-linux: Add coverage counters for netdev_set_policing when ingress tc-offload
Related show

Commit Message

Tonghao Zhang April 10, 2019, 8:10 p.m. UTC
When enable tc-offload, we should add coverage counters for netdev_set_policing.

Fixes: e7f6ba220e10 ("lib/tc: add ingress ratelimiting support for tc-offload")
Cc: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
---
 lib/netdev-linux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ben Pfaff April 12, 2019, 5:56 p.m. UTC | #1
On Wed, Apr 10, 2019 at 01:10:44PM -0700, Tonghao Zhang wrote:
> When enable tc-offload, we should add coverage counters for netdev_set_policing.
> 
> Fixes: e7f6ba220e10 ("lib/tc: add ingress ratelimiting support for tc-offload")
> Cc: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>

Thanks for the patches.

I'm getting patch rejects for patch 2.  Would you mind rebasing and
reposting?

Thanks,

Ben.
Tonghao Zhang April 20, 2019, 8:22 a.m. UTC | #2
On Sat, Apr 13, 2019 at 1:56 AM Ben Pfaff <blp@ovn.org> wrote:
>
> On Wed, Apr 10, 2019 at 01:10:44PM -0700, Tonghao Zhang wrote:
> > When enable tc-offload, we should add coverage counters for netdev_set_policing.
> >
> > Fixes: e7f6ba220e10 ("lib/tc: add ingress ratelimiting support for tc-offload")
> > Cc: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
> > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> > Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
>
> Thanks for the patches.
>
> I'm getting patch rejects for patch 2.  Would you mind rebasing and
> reposting?
will be sent v3 rebased
> Thanks,
>
> Ben.

Patch
diff mbox series

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index deedc69..0fce217 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -2474,6 +2474,8 @@  netdev_linux_set_policing(struct netdev *netdev_,
         goto out;
     }
 
+    COVERAGE_INC(netdev_set_policing);
+
     /* Use matchall for policing when offloadling ovs with tc-flower. */
     if (netdev_is_flow_api_enabled()) {
         error = tc_del_matchall_policer(netdev_);
@@ -2484,7 +2486,6 @@  netdev_linux_set_policing(struct netdev *netdev_,
         return error;
     }
 
-    COVERAGE_INC(netdev_set_policing);
     /* Remove any existing ingress qdisc. */
     error = tc_add_del_ingress_qdisc(ifindex, false, 0);
     if (error) {