Subject: Re: [RFC/PATCH net-next v2 5/5] flow_offload: validate flags of filter and actions

From: Simon Horman <[email-masked]>
Date: Wed, 27 Oct 2021 16:42:23 +0200

Hi Vlad,

On Fri, Oct 01, 2021 at 08:45:18PM +0300, Vlad Buslov wrote:
> 
> On Fri 01 Oct 2021 at 14:32, Simon Horman <[email-masked]> wrote:
> > From: Baowen Zheng <[email-masked]>
> >
> > Add process to validate flags of filter and actions when adding
> > a tc filter.

As per comment on 2/4.

        Thanks for your review and sorry for the delay in responding.
        I believe that at this point we have addressed most of the points
        your raised and plan to post a v3 shortly.

        At this point I'd like to relay some responses from Baowen who
        has been working on addressing your review.
...

> > +/**
> > + * tcf_exts_validate_actions - check if exts actions flags are compatible with
> > + * tc filter flags
> > + * @exts: tc filter extensions handle
> > + * @flags: tc filter flags
> > + *
> > + * Returns true if exts actions flags are compatible with tc filter flags
> > + */
> > +static inline bool
> > +tcf_exts_validate_actions(const struct tcf_exts *exts, u32 flags)

...

> There is already a function named tcf_exts_validate() that is called by
> classifiers before this new one and is responsible for action validation
> and initialization. Having two similarly-named functions is confusing
> and additional call complicates classifier init implementations, which
> are already quite complex as they are. Could you perform the necessary
> validation inside existing exts initialization call chain?

Thanks, updated v3 to address this as per your suggestion.

...