On 12/19/23 04:33, Suanming Mou wrote:
The new item type is added for the case user wants to match traffic
based on packet field compare result with other fields or immediate
value.

e.g. take advantage the compare item user will be able to accumulate
a IPv4/TCP packet's TCP data_offset and IPv4 IHL field to a tag
register, then compare the tag register with IPv4 header total length
to understand the packet has payload or not.

The supported operations can be as below:
  - RTE_FLOW_ITEM_COMPARE_EQ (equal)
  - RTE_FLOW_ITEM_COMPARE_NE (not equal)
  - RTE_FLOW_ITEM_COMPARE_LT (less than)
  - RTE_FLOW_ITEM_COMPARE_LE (less than or equal)
  - RTE_FLOW_ITEM_COMPARE_GT (great than)
  - RTE_FLOW_ITEM_COMPARE_GE (great than or equal)

Signed-off-by: Suanming Mou <suanmi...@nvidia.com>

Just one nit below, anyway
Acked-by: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru>

I dislike that many line of code are moved, but it looks like
it is better than keeping them in place and break order in the
file.

diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst 
b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 447e28e694..220b396295 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3841,6 +3841,12 @@ This section lists supported pattern items and their 
attributes, if any.
- ``packet_type {unsigned}``: packet type. +- ``compare``: match the comparison result between packet fields or value.
+
+        - ``op {string}``: comparison operation type.
+        - ``a_type {string}``: compared field.
+        - ``b_type {string}``: comparator field.
+        - ``width {unsigned}``: comparison width.

Missing one more empty line before the next section.

Actions list
  ^^^^^^^^^^^^

[snip]

Reply via email to