[v6,1/3] ethdev: skip congestion management configuration

Message ID 20230210082623.1005496-1-rkudurumalla@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series [v6,1/3] ethdev: skip congestion management configuration |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Rakesh Kudurumalla Feb. 10, 2023, 8:26 a.m. UTC
  Introduce new flow action to skip congestion management configuration
This feature helps to skip the congestion management processing
based on per flow or the packet color identified by
rte_flow meter object. For example, If one Rx queue configured as
RED congestion and application wants tobypass the RED congestion
processing for all GREEN color packet can be expressed though
RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
v6: Moved cnxk.ini and cnxk_vf.ini to cnxk specific patch
 doc/guides/nics/features/default.ini |  1 +
 doc/guides/prog_guide/rte_flow.rst   | 22 ++++++++++++++++++++++
 lib/ethdev/rte_flow.h                | 11 +++++++++++
 3 files changed, 34 insertions(+)
  

Comments

Jerin Jacob Feb. 10, 2023, 9:27 a.m. UTC | #1
On Fri, Feb 10, 2023 at 1:56 PM Rakesh Kudurumalla
<rkudurumalla@marvell.com> wrote:
>
> Introduce new flow action to skip congestion management configuration
> This feature helps to skip the congestion management processing
> based on per flow or the packet color identified by
> rte_flow meter object. For example, If one Rx queue configured as
> RED congestion and application wants tobypass the RED congestion
> processing for all GREEN color packet can be expressed though
> RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action
>
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> Acked-by: Ori Kam <orika@nvidia.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>


> ---
> v6: Moved cnxk.ini and cnxk_vf.ini to cnxk specific patch
>  doc/guides/nics/features/default.ini |  1 +
>  doc/guides/prog_guide/rte_flow.rst   | 22 ++++++++++++++++++++++
>  lib/ethdev/rte_flow.h                | 11 +++++++++++
>  3 files changed, 34 insertions(+)
>
> diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
> index 510cc6679d..b93f053a2b 100644
> --- a/doc/guides/nics/features/default.ini
> +++ b/doc/guides/nics/features/default.ini
> @@ -198,6 +198,7 @@ set_tag              =
>  set_tp_dst           =
>  set_tp_src           =
>  set_ttl              =
> +skip_cman            =
>  vf                   =
>  vxlan_decap          =
>  vxlan_encap          =
> diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
> index 3e6242803d..4efadcc87b 100644
> --- a/doc/guides/prog_guide/rte_flow.rst
> +++ b/doc/guides/prog_guide/rte_flow.rst
> @@ -1840,6 +1840,28 @@ Drop packets.
>     | no properties |
>     +---------------+
>
> +
> +Action: ``SKIP_CMAN``
> +^^^^^^^^^^^^^^^^^^^^^
> +
> +Skip congestion management on received packets
> +
> +- Using ``rte_eth_cman_config_set()``, application can configure ethdev Rx
> +  queue's congestion mechanism.Once applied packets congestion configuration
> +  is bypassed on that particular ethdev Rx queue for all packets directed
> +  to that receive queue
> +
> +.. _table_rte_flow_action_skip_cman:
> +
> +.. table:: SKIP_CMAN
> +
> +   +---------------+
> +   | Field         |
> +   +===============+
> +   | no properties |
> +   +---------------+
> +
> +
>  Action: ``COUNT``
>  ^^^^^^^^^^^^^^^^^
>
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index b60987db4b..f4eb4232d4 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -2203,6 +2203,17 @@ enum rte_flow_action_type {
>          */
>         RTE_FLOW_ACTION_TYPE_DROP,
>
> +       /**
> +        * Skip congestion management configuration
> +        *
> +        * Using rte_eth_cman_config_set() API the application
> +        * can configure ethdev Rx queue's congestion mechanism.
> +        * Introducing RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action to skip the
> +        * congestion configuration applied to the given ethdev Rx queue.
> +        *
> +        */
> +       RTE_FLOW_ACTION_TYPE_SKIP_CMAN,
> +
>         /**
>          * Enables counters for this flow rule.
>          *
> --
> 2.25.1
>
  
Ferruh Yigit Feb. 10, 2023, 11:10 p.m. UTC | #2
On 2/10/2023 8:26 AM, Rakesh Kudurumalla wrote:
> Introduce new flow action to skip congestion management configuration
> This feature helps to skip the congestion management processing
> based on per flow or the packet color identified by
> rte_flow meter object. For example, If one Rx queue configured as
> RED congestion and application wants tobypass the RED congestion
> processing for all GREEN color packet can be expressed though
> RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action
> 
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> Acked-by: Ori Kam <orika@nvidia.com>
> ---
> v6: Moved cnxk.ini and cnxk_vf.ini to cnxk specific patch
>  doc/guides/nics/features/default.ini |  1 +
>  doc/guides/prog_guide/rte_flow.rst   | 22 ++++++++++++++++++++++
>  lib/ethdev/rte_flow.h                | 11 +++++++++++

Should the release notes needs to be updated for this?
  
Ferruh Yigit Feb. 11, 2023, 12:35 a.m. UTC | #3
On 2/10/2023 8:26 AM, Rakesh Kudurumalla wrote:
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index b60987db4b..f4eb4232d4 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -2203,6 +2203,17 @@ enum rte_flow_action_type {
>  	 */
>  	RTE_FLOW_ACTION_TYPE_DROP,
>  
> +	/**
> +	 * Skip congestion management configuration
> +	 *
> +	 * Using rte_eth_cman_config_set() API the application
> +	 * can configure ethdev Rx queue's congestion mechanism.
> +	 * Introducing RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action to skip the
> +	 * congestion configuration applied to the given ethdev Rx queue.
> +	 *
> +	 */
> +	RTE_FLOW_ACTION_TYPE_SKIP_CMAN,
> +

Inserting new enum item in to the middle of the enum upsets the ABI
checks [1], can it go to the end?




[1]
1 function with some indirect sub-type change:

  [C] 'function size_t rte_flow_copy(rte_flow_desc*, size_t, const
rte_flow_attr*, const rte_flow_item*, const rte_flow_action*)' at
rte_flow.c:1092:1 has some indirect sub-type changes:
    parameter 1 of type 'rte_flow_desc*' has sub-type changes:
      in pointed to type 'struct rte_flow_desc' at rte_flow.h:4326:1:
        type size hasn't changed
        1 data member changes (1 filtered):
          type of 'rte_flow_action* actions' changed:
            in pointed to type 'struct rte_flow_action' at
rte_flow.h:3775:1:
              type size hasn't changed
              1 data member change:
                type of 'rte_flow_action_type type' changed:
                  type size hasn't changed
                  1 enumerator insertion:

'rte_flow_action_type::RTE_FLOW_ACTION_TYPE_SKIP_CMAN' value '8'
                  50 enumerator changes:
                    'rte_flow_action_type::RTE_FLOW_ACTION_TYPE_COUNT'
from value '8' to '9' at rte_flow.h:2216:1
                    ...
  
Jerin Jacob Feb. 11, 2023, 5:16 a.m. UTC | #4
On Sat, Feb 11, 2023 at 6:05 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 2/10/2023 8:26 AM, Rakesh Kudurumalla wrote:
> > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> > index b60987db4b..f4eb4232d4 100644
> > --- a/lib/ethdev/rte_flow.h
> > +++ b/lib/ethdev/rte_flow.h
> > @@ -2203,6 +2203,17 @@ enum rte_flow_action_type {
> >        */
> >       RTE_FLOW_ACTION_TYPE_DROP,
> >
> > +     /**
> > +      * Skip congestion management configuration
> > +      *
> > +      * Using rte_eth_cman_config_set() API the application
> > +      * can configure ethdev Rx queue's congestion mechanism.
> > +      * Introducing RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action to skip the
> > +      * congestion configuration applied to the given ethdev Rx queue.
> > +      *
> > +      */
> > +     RTE_FLOW_ACTION_TYPE_SKIP_CMAN,
> > +
>
> Inserting new enum item in to the middle of the enum upsets the ABI
> checks [1], can it go to the end?

Yes.

>
>
>
>
> [1]
> 1 function with some indirect sub-type change:
>
>   [C] 'function size_t rte_flow_copy(rte_flow_desc*, size_t, const
> rte_flow_attr*, const rte_flow_item*, const rte_flow_action*)' at
> rte_flow.c:1092:1 has some indirect sub-type changes:
>     parameter 1 of type 'rte_flow_desc*' has sub-type changes:
>       in pointed to type 'struct rte_flow_desc' at rte_flow.h:4326:1:
>         type size hasn't changed
>         1 data member changes (1 filtered):
>           type of 'rte_flow_action* actions' changed:
>             in pointed to type 'struct rte_flow_action' at
> rte_flow.h:3775:1:
>               type size hasn't changed
>               1 data member change:
>                 type of 'rte_flow_action_type type' changed:
>                   type size hasn't changed
>                   1 enumerator insertion:
>
> 'rte_flow_action_type::RTE_FLOW_ACTION_TYPE_SKIP_CMAN' value '8'
>                   50 enumerator changes:
>                     'rte_flow_action_type::RTE_FLOW_ACTION_TYPE_COUNT'
> from value '8' to '9' at rte_flow.h:2216:1
>                     ...
  
Ori Kam Feb. 13, 2023, 12:34 p.m. UTC | #5
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@amd.com>
> Sent: Saturday, 11 February 2023 1:10
> 
> On 2/10/2023 8:26 AM, Rakesh Kudurumalla wrote:
> > Introduce new flow action to skip congestion management configuration
> > This feature helps to skip the congestion management processing
> > based on per flow or the packet color identified by
> > rte_flow meter object. For example, If one Rx queue configured as
> > RED congestion and application wants tobypass the RED congestion
> > processing for all GREEN color packet can be expressed though
> > RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action
> >
> > Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> > Acked-by: Ori Kam <orika@nvidia.com>
> > ---
> > v6: Moved cnxk.ini and cnxk_vf.ini to cnxk specific patch
> >  doc/guides/nics/features/default.ini |  1 +
> >  doc/guides/prog_guide/rte_flow.rst   | 22 ++++++++++++++++++++++
> >  lib/ethdev/rte_flow.h                | 11 +++++++++++
> 
> Should the release notes needs to be updated for this?

Yes, I think so it is a new rte_flow action
  
Ferruh Yigit Feb. 13, 2023, 1:54 p.m. UTC | #6
On 2/13/2023 12:34 PM, Ori Kam wrote:
> 
> 
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@amd.com>
>> Sent: Saturday, 11 February 2023 1:10
>>
>> On 2/10/2023 8:26 AM, Rakesh Kudurumalla wrote:
>>> Introduce new flow action to skip congestion management configuration
>>> This feature helps to skip the congestion management processing
>>> based on per flow or the packet color identified by
>>> rte_flow meter object. For example, If one Rx queue configured as
>>> RED congestion and application wants tobypass the RED congestion
>>> processing for all GREEN color packet can be expressed though
>>> RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action
>>>
>>> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
>>> Acked-by: Ori Kam <orika@nvidia.com>
>>> ---
>>> v6: Moved cnxk.ini and cnxk_vf.ini to cnxk specific patch
>>>  doc/guides/nics/features/default.ini |  1 +
>>>  doc/guides/prog_guide/rte_flow.rst   | 22 ++++++++++++++++++++++
>>>  lib/ethdev/rte_flow.h                | 11 +++++++++++
>>
>> Should the release notes needs to be updated for this?
> 
> Yes, I think so it is a new rte_flow action

Hi Jerin, what do you think about this?
  
Jerin Jacob Feb. 13, 2023, 3:44 p.m. UTC | #7
On Mon, Feb 13, 2023 at 7:25 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 2/13/2023 12:34 PM, Ori Kam wrote:
> >
> >
> >> -----Original Message-----
> >> From: Ferruh Yigit <ferruh.yigit@amd.com>
> >> Sent: Saturday, 11 February 2023 1:10
> >>
> >> On 2/10/2023 8:26 AM, Rakesh Kudurumalla wrote:
> >>> Introduce new flow action to skip congestion management configuration
> >>> This feature helps to skip the congestion management processing
> >>> based on per flow or the packet color identified by
> >>> rte_flow meter object. For example, If one Rx queue configured as
> >>> RED congestion and application wants tobypass the RED congestion
> >>> processing for all GREEN color packet can be expressed though
> >>> RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action
> >>>
> >>> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> >>> Acked-by: Ori Kam <orika@nvidia.com>
> >>> ---
> >>> v6: Moved cnxk.ini and cnxk_vf.ini to cnxk specific patch
> >>>  doc/guides/nics/features/default.ini |  1 +
> >>>  doc/guides/prog_guide/rte_flow.rst   | 22 ++++++++++++++++++++++
> >>>  lib/ethdev/rte_flow.h                | 11 +++++++++++
> >>
> >> Should the release notes needs to be updated for this?
> >
> > Yes, I think so it is a new rte_flow action
>
> Hi Jerin, what do you think about this?

Yes. Rakesh already send a new version with this change. Thanks.
  
Ferruh Yigit Feb. 13, 2023, 3:53 p.m. UTC | #8
On 2/13/2023 3:44 PM, Jerin Jacob wrote:
> On Mon, Feb 13, 2023 at 7:25 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>>
>> On 2/13/2023 12:34 PM, Ori Kam wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Ferruh Yigit <ferruh.yigit@amd.com>
>>>> Sent: Saturday, 11 February 2023 1:10
>>>>
>>>> On 2/10/2023 8:26 AM, Rakesh Kudurumalla wrote:
>>>>> Introduce new flow action to skip congestion management configuration
>>>>> This feature helps to skip the congestion management processing
>>>>> based on per flow or the packet color identified by
>>>>> rte_flow meter object. For example, If one Rx queue configured as
>>>>> RED congestion and application wants tobypass the RED congestion
>>>>> processing for all GREEN color packet can be expressed though
>>>>> RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action
>>>>>
>>>>> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
>>>>> Acked-by: Ori Kam <orika@nvidia.com>
>>>>> ---
>>>>> v6: Moved cnxk.ini and cnxk_vf.ini to cnxk specific patch
>>>>>  doc/guides/nics/features/default.ini |  1 +
>>>>>  doc/guides/prog_guide/rte_flow.rst   | 22 ++++++++++++++++++++++
>>>>>  lib/ethdev/rte_flow.h                | 11 +++++++++++
>>>>
>>>> Should the release notes needs to be updated for this?
>>>
>>> Yes, I think so it is a new rte_flow action
>>
>> Hi Jerin, what do you think about this?
> 
> Yes. Rakesh already send a new version with this change. Thanks.


v7 doesn't have release notes update, that is why I am pinging again.
  

Patch

diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index 510cc6679d..b93f053a2b 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -198,6 +198,7 @@  set_tag              =
 set_tp_dst           =
 set_tp_src           =
 set_ttl              =
+skip_cman            =
 vf                   =
 vxlan_decap          =
 vxlan_encap          =
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 3e6242803d..4efadcc87b 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -1840,6 +1840,28 @@  Drop packets.
    | no properties |
    +---------------+
 
+
+Action: ``SKIP_CMAN``
+^^^^^^^^^^^^^^^^^^^^^
+
+Skip congestion management on received packets
+
+- Using ``rte_eth_cman_config_set()``, application can configure ethdev Rx
+  queue's congestion mechanism.Once applied packets congestion configuration
+  is bypassed on that particular ethdev Rx queue for all packets directed
+  to that receive queue
+
+.. _table_rte_flow_action_skip_cman:
+
+.. table:: SKIP_CMAN
+
+   +---------------+
+   | Field         |
+   +===============+
+   | no properties |
+   +---------------+
+
+
 Action: ``COUNT``
 ^^^^^^^^^^^^^^^^^
 
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index b60987db4b..f4eb4232d4 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -2203,6 +2203,17 @@  enum rte_flow_action_type {
 	 */
 	RTE_FLOW_ACTION_TYPE_DROP,
 
+	/**
+	 * Skip congestion management configuration
+	 *
+	 * Using rte_eth_cman_config_set() API the application
+	 * can configure ethdev Rx queue's congestion mechanism.
+	 * Introducing RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action to skip the
+	 * congestion configuration applied to the given ethdev Rx queue.
+	 *
+	 */
+	RTE_FLOW_ACTION_TYPE_SKIP_CMAN,
+
 	/**
 	 * Enables counters for this flow rule.
 	 *