On Thu, Oct 20, 2022 at 01:31:55PM +0300, Roi Dayan wrote:
> 
> 
> On 29/08/2022 12:59, Roi Dayan wrote:
> > OVN is setting ct drop rule with a ct clear action.
> > OVS datapath behavior is if there is no forward action
> > the default is drop.
> > TC behavior is to continue with next match.
> > Fix to match tc to ovs behavior by setting last action
> > attribute as drop instead of pipe.
> > Also update lastused when parsing ct action.
> > 
> > example rule
> > recirc_id(0x1),in_port(2),ct_state(+trk),eth(),eth_type(0x0800),ipv4(frag=no),
> > packets:82, bytes:8036, used:2.108s, actions:ct_clear
> > 
> > Reviewed-by: Maor Dickman <[email protected]>
> > Signed-off-by: Roi Dayan <[email protected]>
> > ---
> >  lib/tc.c | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> > 
> > diff --git a/lib/tc.c b/lib/tc.c
> > index f8fbe44bf244..180e6bda870c 100644
> > --- a/lib/tc.c
> > +++ b/lib/tc.c
> > @@ -1551,6 +1551,7 @@ nl_parse_act_ct(struct nlattr *options, struct 
> > tc_flower *flower)
> >      struct tc_action *action;
> >      const struct tc_ct *ct;
> >      uint16_t ct_action = 0;
> > +    struct tcf_t tm;
> >  
> >      if (!nl_parse_nested(options, ct_policy, ct_attrs,
> >                           ARRAY_SIZE(ct_policy))) {
> > @@ -1636,6 +1637,11 @@ nl_parse_act_ct(struct nlattr *options, struct 
> > tc_flower *flower)
> >      }
> >      action->type = TC_ACT_CT;
> >  
> > +    if (ct_attrs[TCA_CT_TM]) {
> 
> been some time and I noticed stats would not update correctly
> as i forgot to add TCA_CT_TM to ct_policy. will send v2.
> since this was not merged yet i'll send rebased and fixed v2 . 

Thanks Roi,

please do CC me on v2.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to