[dpdk-dev] [RFC 2/3] ethdev: add flow modify mark action

Jerin Jacob Kollanukkaran jerinj at marvell.com
Thu Jun 6 12:35:42 CEST 2019


> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Yongseok Koh
> Sent: Tuesday, June 4, 2019 3:03 AM
> To: shahafs at mellanox.com; thomas at monjalon.net; ferruh.yigit at intel.com;
> arybchenko at solarflare.com; adrien.mazarguil at 6wind.com;
> olivier.matz at 6wind.com
> Cc: dev at dpdk.org
> Subject: [dpdk-dev] [RFC 2/3] ethdev: add flow modify mark action
> 
> Mark ID can be modified when supporting multiple tables. Partial bit
> alteration is supported to preserve some bit-fields set by previous match.
> 
> Signed-off-by: Yongseok Koh <yskoh at mellanox.com>
> ---
>  doc/guides/prog_guide/rte_flow.rst | 21 +++++++++++++++++++++
>  lib/librte_ethdev/rte_flow.h       | 24 ++++++++++++++++++++++++
>  2 files changed, 45 insertions(+)
> 
> diff --git a/doc/guides/prog_guide/rte_flow.rst
> b/doc/guides/prog_guide/rte_flow.rst
> index 016cd90e52..2907edfff4 100644
> --- a/doc/guides/prog_guide/rte_flow.rst
> +++ b/doc/guides/prog_guide/rte_flow.rst
> @@ -1463,6 +1463,27 @@ depends on the underlying implementation. It is
> returned in the
>     | ``id`` | integer value to return with packets |
>     +--------+--------------------------------------+
> 
> +Action: ``MODIFY_MARK``
> +^^^^^^^^^^^^^^^^^^^^^^^
> +
> +Alter partial bits of mark ID set by ``MARK`` action.
> +
> +``mask`` indicates which bits are modified. For bits which have never
> +been set by ``MARK`` or ``MODIFY_MARK``, unpredictable value will be
> +seen depending on driver implementation.
> +
> +.. _table_rte_flow_action_modify_mark:
> +
> +.. table:: MODIFY_MARK
> +
> +   +----------+--------------------------------------+
> +   | Field    | Value                                |
> +   +==========+======================================+
> +   | ``id``   | integer value to return with packets |
> +   +----------+--------------------------------------+
> +   | ``mask`` | bit-mask applies to "id"             |
> +   +----------+--------------------------------------+
> +
>  Action: ``FLAG``
>  ^^^^^^^^^^^^^^^^
> 
> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index
> cda8628183..d811f8a06e 100644
> --- a/lib/librte_ethdev/rte_flow.h
> +++ b/lib/librte_ethdev/rte_flow.h
> @@ -1316,6 +1316,13 @@ enum rte_flow_action_type {
>  	 */
>  	RTE_FLOW_ACTION_TYPE_MARK,
> 
> +	/**
> +	 * Alter partial bits of mark ID set by
> RTE_FLOW_ACTION_TYPE_MARK.
> +	 *
> +	 * See struct rte_flow_action_modify_mark.
> +	 */
> +	RTE_FLOW_ACTION_TYPE_MODIFY_MARK,
> +

I think, we need to define the case where application calls MODIFY_MARK first on given pattern before MARK
I think, either we can 
# Introduce an error number for that?
# Treat first MODIFY_MARK as MARK

Just to understand, in this absence of this new action, an application needs
to destroy the given pattern with associated  existing MARK action and
add the same pattern with updated value as MARK action? Right?




More information about the dev mailing list