@@ -226,6 +226,29 @@ typedef enum odp_pmr_term {
} odp_pmr_term_e;
/**
+ * Following structure is used to define a packet matching rule
+ */
+typedef struct odp_pmr_match_t {
+ odp_pmr_term_e term; /**< PMR term value to be matched */
+ 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,
+ otherwise must be 0 */
+} odp_pmr_match_t;
+
+/**
+ * Create a packet match rule with mask and value
+ *
+ * @param[in] match packet matching rule definition
+ *
+ * @return Handle of the matching rule
+ * @retval ODP_PMR_INVAL on failure
+ */
+odp_pmr_t odp_pmr_create(const odp_pmr_match_t *match);
+
+/**
* Invalidate a packet match rule and vacate its resources
*
* @param[in] pmr_id Identifier of the PMR to be destroyed
@@ -276,29 +299,6 @@ unsigned long long odp_pmr_terms_cap(void);