Thread (12 messages) flat view 12 messages, 2 authors, 2021-10-27

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

From: Simon Horman <hidden>
Date: 2021-10-27 14:42:36

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 [off-list ref] wrote:
quoted
From: Baowen Zheng <redacted>

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.
...
quoted
+/**
+ * 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.

...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help