Hi Ori,

<snip>

>+
>+/**
>+ * The generic *rte_regex_ops* structure to hold the RegEx attributes
>+ * for enqueue and dequeue operation.
>+ */
>+struct rte_regex_ops {
>+      /* W0 */
>+      uint16_t req_flags;
>+      /**< Request flags for the RegEx ops.
>+       * @see RTE_REGEX_OPS_REQ_*
>+       */
>+      uint16_t rsp_flags;
>+      /**< Response flags for the RegEx ops.
>+       * @see RTE_REGEX_OPS_RSP_*
>+       */
>+      uint16_t nb_actual_matches;
>+      /**< The total number of actual matches detected by the
>Regex device.*/
>+      uint16_t nb_matches;
>+      /**< The total number of matches returned by the RegEx
>device for this
>+       * scan. The size of *rte_regex_ops::matches* zero length array
>will be
>+       * this value.
>+       *
>+       * @see struct rte_regex_ops::matches, struct
>rte_regex_match
>+       */
>+
>+      /* W1 */
>+      struct rte_mbuf *mbuf; /**< source mbuf, to search in. */

While implementing pcre2 SW driver I came across an oddity where having mbuf 
alone 
wouldn’t suffice, we need to have scan start offset and scan length as 
generally we would skip the
L2/L3 header.

>+
>+      /* W2 */
>+      uint16_t group_id0;
>+      /**< First group_id to match the rule against. At minimum one
>group
>+       * should be valid. Behaviour is undefined non of the groups are
>valid.
>+       *
>+       * @see RTE_REGEX_OPS_REQ_GROUP_ID0_VALID_F
>+       */
>+      uint16_t group_id1;
>+      /**< Second group_id to match the rule against.
>+       *
>+       * @see RTE_REGEX_OPS_REQ_GROUP_ID1_VALID_F
>+       */
>+      uint16_t group_id2;
>+      /**< Third group_id to match the rule against.
>+       *
>+       * @see RTE_REGEX_OPS_REQ_GROUP_ID2_VALID_F
>+       */
>+      uint16_t group_id3;
>+      /**< Forth group_id to match the rule against.
>+       *
>+       * @see RTE_REGEX_OPS_REQ_GROUP_ID3_VALID_F
>+       */
>+
>+      /* W3 */
>+      RTE_STD_C11
>+      union {
>+              uint64_t user_id;
>+              /**< Application specific opaque value. An application
>may use
>+               * this field to hold application specific value to share
>+               * between dequeue and enqueue operation.
>+               * Implementation should not modify this field.
>+               */
>+              void *user_ptr;
>+              /**< Pointer representation of *user_id* */
>+      };
>+
>+      /* W4 */
>+      struct rte_regex_match matches[];
>+      /**< Zero length array to hold the match tuples.
>+       * The struct rte_regex_ops::nb_matches value holds the
>number of
>+       * elements in this array.
>+       *
>+       * @see struct rte_regex_ops::nb_matches
>+       */
>+};
>+

Thanks,
Pavan.

Reply via email to