On 11/8/22 18:25, Thomas Monjalon wrote:
08/11/2022 15:38, Andrew Rybchenko:
On 11/8/22 16:29, Thomas Monjalon wrote:
08/11/2022 12:47, Andrew Rybchenko:
On 11/8/22 14:39, Andrew Rybchenko wrote:
On 11/4/22 13:44, Rongwei Liu wrote:
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 8858b56428..1eab12796f 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -5186,6 +5186,34 @@ rte_flow_actions_template_destroy(uint16_t
port_id,
     */
    struct rte_flow_template_table;
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Special optional flags for template table attribute.
+ * Each bit stands for a table specialization
+ * offering a potential optimization at PMD layer.
+ * PMD can ignore the unsupported bits silently.
+ */
+enum rte_flow_template_table_specialize {
+    /**
+     * Specialize table for transfer flows which come only from wire.
+     * It allows PMD not to allocate resources for non-wire
originated traffic.
+     * This bit is not a matching criteria, just an optimization hint.
+     * Flow rules which match non-wire originated traffic will be missed
+     * if the hint is supported.

Sorry, but if so, the hint changes behavior.

Yes the hint may change behaviour.

Let's consider a rule which matches both VF originating and
wire originating traffic. Will the rule be missed (ignored)
regardless if the hint is supported or not?

If the hint RTE_FLOW_TRANSFER_WIRE_ORIG is used,
the PMD may assume the table won't be used for traffic
which is not coming from wire ports.
As a consequence, the table may be implemented on the path
of wire traffic only.
In this case, the traffic coming from virtual ports
won't be affected by this table.
To answer the question, a rule matching both virtual and wire traffic
will be applied in a table affecting only wire traffic,
so it will still apply (not completely ignored).

If so, it is not a hint. It becomes matching criteria
which should be in pattern as we discussed.

It is not a strict matching because the PMD is free to support it or not.

It cannot be optional matching criteria. Matching criteria must
be always mandatory. Otherwise application does not know what
to expect and behaviour may legitimately vary on different
vendors.

Reply via email to