- ``hdr``: eCPRI header definition (``rte_ecpri.h``).
- Default ``mask`` matches nothing, for all eCPRI messages.
+Item: ``PACKET_INTEGRITY_CHECKS``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Matches packet integrity.
+For some devices application needs to enable integration checks in HW
+before using this item.
+
+- ``level``: the encapsulation level that should be checked:
+ - ``level == 0`` means the default PMD mode (can be inner most / outermost).
+ - ``level == 1`` means outermost header.
+ - ``level > 1`` means inner header. See also RSS level.
+- ``packet_ok``: All HW packet integrity checks have passed based on the
+ topmost network layer. For example, for ICMP packet the topmost network
+ layer is L3 and for TCP or UDP packet the topmost network layer is L4.
+- ``l2_ok``: all layer 2 HW integrity checks passed.
+- ``l3_ok``: all layer 3 HW integrity checks passed.
+- ``l4_ok``: all layer 4 HW integrity checks passed.
+- ``l2_crc_ok``: layer 2 CRC check passed.
+- ``ipv4_csum_ok``: IPv4 checksum check passed.
+- ``l4_csum_ok``: layer 4 checksum check passed.
+- ``l3_len_ok``: the layer 3 length is smaller than the frame length.
+
Actions
~~~~~~~
to support metering traffic by packet per second (PPS),
in addition to the initial bytes per second (BPS) mode (value 0).
+* **Added packet integrity match to flow rules.**
+
+ * Added ``RTE_FLOW_ITEM_TYPE_INTEGRITY`` flow item.
+ * Added ``rte_flow_item_integrity`` data structure.
+
* **Updated Arkville PMD driver.**
Updated Arkville net driver with new features and improvements, including:
* See struct rte_flow_item_geneve_opt
*/
RTE_FLOW_ITEM_TYPE_GENEVE_OPT,
+
+ /**
+ * [META]
+ *
+ * Matches on packet integrity.
+ * For some devices application needs to enable integration checks in HW
+ * before using this item.
+ *
+ * @see struct rte_flow_item_integrity.
+ */
+ RTE_FLOW_ITEM_TYPE_INTEGRITY,
};
/**
};
#endif
+struct rte_flow_item_integrity {
+ /**< Tunnel encapsulation level the item should apply to.
+ * @see rte_flow_action_rss
+ */
+ uint32_t level;
+ RTE_STD_C11
+ union {
+ __extension__
+ struct {
+ /**< The packet is valid after passing all HW checks. */
+ uint64_t packet_ok:1;
+ /**< L2 layer is valid after passing all HW checks. */
+ uint64_t l2_ok:1;
+ /**< L3 layer is valid after passing all HW checks. */
+ uint64_t l3_ok:1;
+ /**< L4 layer is valid after passing all HW checks. */
+ uint64_t l4_ok:1;
+ /**< L2 layer CRC is valid. */
+ uint64_t l2_crc_ok:1;
+ /**< IPv4 layer checksum is valid. */
+ uint64_t ipv4_csum_ok:1;
+ /**< L4 layer checksum is valid. */
+ uint64_t l4_csum_ok:1;
+ /**< The l3 length is smaller than the frame length. */
+ uint64_t l3_len_ok:1;
+ uint64_t reserved:56;
+ };
+ uint64_t value;
+ };
+};
+
+#ifndef __cplusplus
+static const struct rte_flow_item_integrity
+rte_flow_item_integrity_mask = {
+ .level = 0,
+ .value = 0,
+};
+#endif
+
/**
* Matching pattern item definition.
*