[PATCH 1/4] ethdev: add meter color flow matching item
Dumitrescu, Cristian
cristian.dumitrescu at intel.com
Thu May 19 16:44:41 CEST 2022
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index d8827dd184..e3f0e86eb6 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -671,6 +671,14 @@ enum rte_flow_item_type {
> * See struct rte_flow_item_gre_opt.
> */
> RTE_FLOW_ITEM_TYPE_GRE_OPTION,
> +
> + /**
> + * Matches Meter Color Marker.
> + *
> + * See struct rte_flow_item_meter_color.
> + */
> +
> + RTE_FLOW_ITEM_TYPE_METER_COLOR,
> };
>
> /**
> @@ -2201,6 +2209,22 @@ struct rte_flow_item_flex_conf {
> uint32_t nb_outputs;
> };
>
> +/**
> + * RTE_FLOW_ITEM_TYPE_METER_COLOR.
> + *
> + * Matches Color Marker set by a Meter in the DS field of a packet.
> + */
> +struct rte_flow_item_meter_color {
> + enum rte_color color; /**< Meter color marker. */
> +};
> +
> +/** Default mask for RTE_FLOW_ITEM_TYPE_METER_COLOR. */
> +#ifndef __cplusplus
> +static const struct rte_flow_item_meter_color
> rte_flow_item_meter_color_mask = {
> + .color = RTE_COLORS,
> +};
> +#endif
Adding color as one of the match items makes sense to me as well.
More information about the dev
mailing list