[dpdk-dev] [EXT] [RFC v5] regexdev: introduce regexdev subsystem

Pavan Nikhilesh Bhagavatula pbhagavatula at marvell.com
Sun Mar 1 07:13:10 CET 2020


Hi Ori,

Minor comments below.

<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. */

This should be *mbuf.

>+
>+	/* W2 */
>+	uint16_t group_id0;

This should be group_id1.

>+	/**< First group_id to match the rule against. Minimum one
>group id
>+	 * must be provided by application.
>+	 * When RTE_REGEX_OPS_REQ_GROUP_ID1_VALID_F set then
>group_id1
>+	 * is valid, respectively similar flags for group_id2 and group_id3.
>+	 * Upon the match, struct rte_regex_match::group_id shall be
>updated
>+	 * with matching group ID by the device. Group ID scheme
>provides
>+	 * rule isolation and effective pattern matching.
>+	 */
>+	uint16_t group_id1;
>+	/**< Second group_id to match the rule against.
>+	 *
>+	 * @see RTE_REGEX_OPS_REQ_GROUP_ID1_VALID_F
>+	 */

The above `group_id1` should be removed as its duplicate.

>+	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
>+	 */
>+};


More information about the dev mailing list