On Mon, Sep 12, 2022 at 03:02:06PM +0200, Eelco Chaudron wrote:
> 
> 
> On 7 Sep 2022, at 11:36, Simon Horman wrote:
> 
> > From: Tianyu Yuan <[email protected]>
> >
> > When we apply meter police on both directions of TCP traffic, the
> > dumped stats is shown same (as shown below). This issue is introduced
> > by modifying the stats update strategy.
> >
> > ...,in_port(6),eth(),eth_type(0x0800),ipv4(frag=no), packets:1488557,
> > bytes:2089059644, used:0.040s, actions:meter(0),9
> > ...,in_port(9),eth(),eth_type(0x0800),ipv4(frag=no), packets:1488557,
> > bytes:2089059644, used:0.040s, actions:meter(0),6
> >
> > In previous patch, after parsing police action, the flower stats will
> > be updated by dumped meter table stats, which will result in the issue
> > above.
> >
> > Thus, the stats of meter table should not be used when dumping flow
> > stats. Ignore the stats update when police.index belongs to meter.
> >
> > Fixes: a9b8cdde69de ("tc: Add support parsing tc police action")
> > Signed-off-by: Tianyu Yuan <[email protected]>
> > Reviewed-by: Baowen Zheng <[email protected]>
> > Signed-off-by: Simon Horman <[email protected]>

...

> > +    /*
> > +     * Skip the stats update when act_police is meter, since there are 
> > always
> > +     * some other actions following meter. For other potential kind of 
> > police,
> > +     * whose stats could not be skipped (e.g. filter has only one police
> > +     * action), update the action stats to flow rule
> > +     */
> 
> Small nit:
> 
> 
>  +    /* Skip the stats update when act_police is meter since there are always
>  +     * some other actions following meter. For other potential kinds of
>  +     * act_police actions, whose stats could not be skipped (e.g. filter has
>  +     * only one police action), update the action stats to the flow rule. */
> 
> The rest looks good to me.
> 
> Acked-by: Eelco Chaudron <[email protected]>

Thanks Eelco,

I've made the change suggested above and applied the patch to master and
branch-3.0.

* on master
  dd9881ed55e6 ("tc: Fix stats dump when using same meter table")
  
https://github.com/openvswitch/ovs/commit/dd9881ed55e6bf98b77a8c2347ec6001b0bee3f8

* on branch-3.0
  787648996993 ("tc: Fix stats dump when using same meter table")
  
https://github.com/openvswitch/ovs/commit/dd9881ed55e6bf98b77a8c2347ec6001b0bee3f8

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to