On Monday, February 21, 2022 8:12 Ori Kam <or...@nvidia.com> wrote: > > See notes about order of checks in previous patch review notes.
I'll fix order of checks in all patches, thank you for the suggestion. > > Would it be useful to mentioned that at least one direction > > bit must be set? Otherwise request does not make sense. > > > Agree one direction must be set. Will add comments about mandatory setting of the direction. > > > + */ > > > +__extension__ > > > +struct rte_flow_pattern_template_attr { > > > + /** > > > + * Relaxed matching policy. > > > + * - PMD may match only on items with mask member set and skip > > > + * matching on protocol layers specified without any masks. > > > + * - If not set, PMD will match on protocol layers > > > + * specified without any masks as well. > > > + * - Packet data must be stacked in the same order as the > > > + * protocol layers to match inside packets, starting from the lowest. > > > + */ > > > + uint32_t relaxed_matching:1; > > > > I should notice this earlier, but it looks like a new feature > > which sounds unrelated to templates. If so, it makes asymmetry > > in sync and async flow rules capabilities. > > Am I missing something? > > > > Anyway, the feature looks hidden in the patch. > > > No this is not hidden feature. > In current API application must specify all the preciding items, > For example application wants to match on udp source port. > The rte flow will look something like eth / ipv4/ udp sport = xxx .. > When PMD gets this pattern it must enforce the after the eth > there will be IPv4 and then UDP and then add the match for the > sport. > This means that the PMD addes extra matching. > If the application already validated that there is udp in the packet > in group 0 and then jump to group 1 it can save the HW those extra matching > by enabling this bit which means that the HW should only match on implicit > masked fields. This is a new capability that only exists for templates. We can think about adding it to the old rte_flow_create() API when we are allowed to break ABI again.