The application can now specify a packet offset
in PMR rules. This offset is absolute from the
frame start. It is used to extract the PMR value.

This is useful to support arbitrary backplane
protocols and extensions.

Signed-off-by: BenoƮt Ganne <bga...@kalray.eu>
---
 include/odp/api/classification.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h
index a62528c..380d91b 100644
--- a/include/odp/api/classification.h
+++ b/include/odp/api/classification.h
@@ -237,6 +237,11 @@ typedef enum odp_pmr_term {
        ODP_PMR_IPSEC_SPI,      /**< IPsec session identifier(*val=uint32_t)*/
        ODP_PMR_LD_VNI,         /**< NVGRE/VXLAN network identifier
                                (*val=uint32_t)*/
+       ODP_PMR_CUSTOM_FRAME,   /**< Custom match rule, offset from start of
+                               frame. The match is defined by the offset, the
+                               expected value, and its size. They must be
+                               applied before any other PMR.
+                               (*val=uint8_t[val_sz])*/
 
        /** Inner header may repeat above values with this offset */
        ODP_PMR_INNER_HDR_OFF = 32
@@ -250,6 +255,9 @@ typedef struct odp_pmr_match_t {
        const void      *val;   /**< Value to be matched */
        const void      *mask;  /**< Masked set of bits to be matched */
        uint32_t        val_sz;  /**< Size of the term value */
+       uint32_t        offset;  /**< User-defined offset in packet
+                                Used if term == ODP_PMR_CUSTOM_FRAME only,
+                                ignored otherwise */
 } odp_pmr_match_t;
 
 /**
-- 
2.6.1.3.g8d02103


_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to