[ovs-dev] [PATCH v4 1/3] dpif: Add support for OVS_ACTION_ATTR_CT_CLEAR

Eric Garver e at erig.me
Mon Jan 22 14:34:43 UTC 2018


On Sat, Jan 20, 2018 at 11:22:06AM -0800, Justin Pettit wrote:
> 
> > On Jan 19, 2018, at 11:21 AM, Eric Garver <e at erig.me> wrote:
> > 
> > This supports using the ct_clear action in the kernel datapath. To
> > preserve compatibility with current ct_clear behavior on old kernels, we
> > only pass this action down to the datapath if a probe reveals the
> > datapath actually supports it.
> 
> It looks like it hasn't been added to the out-of-tree kernel module in the OVS repo.  Is there a reason for that?

No reason - just an oversight.
I will post a follow up series for the module backport.

> 
> > +int
> > +conntrack_clear(struct dp_packet *packet)
> > +{
> > +    /* According to pkt_metadata_init(), ct_state == 0 is enough to make all of
> > +     * the conntrack fields invalid. */
> > +    packet->md.ct_state = 0;
> > +
> > +    return 0;
> > +}
> 
> I made this void since it always returns success and nothing checks its return value.

Thanks.

> 
> > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> > index 6157b70aee60..675b3a697641 100644
> > --- a/ofproto/ofproto-dpif.c
> > +++ b/ofproto/ofproto-dpif.c
> > @@ -1255,6 +1255,37 @@ check_ct_eventmask(struct dpif_backer *backer)
> >     return !error;
> > }
> > 
> > +static bool
> > +check_ct_clear(struct dpif_backer *backer)
> 
> I added a comment to this function:
> 
> +/* Tests whether 'backer''s datapath supports the OVS_ACTION_ATTR_CT_CLEAR
> + * action. */
> 
> I pushed the series with those changes to master.  Did you want me to backport it to branch-2.9?

Yes. I would appreciate it going to 2.9 as well.

> 
> --Justin


More information about the dev mailing list