You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current documentation for protocol agnostic filtering for ICE driver is a
bit terse and relies on a lot of assumed knowledge. Document the feature
better and make all of the assumptions explicit.
Signed-off-by: Anatoly Burakov <[email protected]>
Acked-by: Vladimir Medvedkin <[email protected]>
One notable feature is the ice PMD's ability to leverage the Raw pattern, enabling protocol-agnostic flow offloading.
631
+
This feature allows users to create flow rules for any protocol recognized by the hardware parser, by manually specifying the raw packet structure.
632
+
Therefore, flow offloading can be used even in cases where desired protocol isn't explicitly supported by RTE_FLOW interface.
633
+
634
+
Raw Pattern Components
635
+
++++++++++++++++++++++
636
+
637
+
Raw patterns consist of two key components:
638
+
639
+
**Pattern Spec**
640
+
An ASCII hexadecimal string representing the complete packet structure that defines the packet type and protocol layout.
641
+
The hardware parser analyzes this structure to determine the packet type (PTYPE) and identify protocol headers and their offsets.
642
+
This specification must represent a valid packet structure that the hardware can parse and classify.
643
+
If the hardware parser does not support a particular protocol stack, it may not correctly identify the packet type.
644
+
645
+
**Pattern Mask**
646
+
An ASCII hexadecimal string of the same length as the spec that determines which specific fields within the packet will be extracted and used for matching.
647
+
The mask control field extraction without affecting the packet type identification.
648
+
649
+
.. note::
650
+
Raw pattern must be the only flow item in the flow item list.
651
+
652
+
Generating Raw Pattern Values
653
+
+++++++++++++++++++++++++++++
654
+
655
+
To create raw patterns, follow these steps:
656
+
657
+
1. **Verify parser support**: Confirm that the hardware parser supports the protocol combination needed for the intended flow rule.
658
+
This can be checked against the documentation for the DDP package currently in use.
659
+
660
+
2. **Build the packet template**: Create a complete, valid packet header with all necessary sections (Ethernet, IP, UDP/TCP, etc.) using the exact field values that need to be matched.
661
+
662
+
3. **Convert to hexadecimal**: Transform the entire header into a continuous ASCII hexadecimal string, with each byte represented as two hex characters.
663
+
664
+
4. **Create the extraction mask**: Generate a mask of the same length as the spec, where set bits would indicate the fields used for extraction/matching.
665
+
666
+
VPP project's `flow_parse.py` script can be used to generate packet templates and masks for raw patterns.
667
+
This tool takes a human-readable flow description and outputs the corresponding ASCII hexadecimal spec and mask.
668
+
This script can be found under ``extras/packetforge`` in `VPP project <https://github.com/FDio/vpp/blob/master/extras/packetforge/flow_parse.py>`_.
0 commit comments