ethdev: support priority based flow control
RFC PATCH 1/1 ethdev: support priority based flow control
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set() based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.
Introducing RTE_FLOW_ACTION_TYPE_PFC_SET_TC rte_flow action to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.
Also, making it as rte_flow action will enable fine control on traffic class selection to a specific queue or VF etc.
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)
doc/guides/prog_guide/rte_flow.rst +24 -0
@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct ``rte_mbuf::sched::color``) | ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS`` +- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` + +.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~
lib/ethdev/rte_flow.c +1 -0
@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int
lib/ethdev/rte_flow.h +27 -0
@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/**
@@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, +* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ +struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */
--
2.33.0
Quoted 6 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.
Quoted 8 lines
Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>
Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
Quoted 106 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)doc/guides/prog_guide/rte_flow.rst +24
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct ``rte_mbuf::sched::color``) | ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS`` +- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` + +.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~lib/ethdev/rte_flow.c +1
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +27
-1@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, +* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ +struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Hi Jerin,
Sorry for my late response,
Quoted 17 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.
Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.
What is the item that you are matching on when using rte_flow? Is it part of the tci in the vlan item?
Quoted 20 lines
Quoted 20 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)doc/guides/prog_guide/rte_flow.rst +0
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct ``rte_mbuf::sched::color``) | ``meter_color`` | Packet color | +-----------------+--------------+
Quoted 14 lines
Quoted 4 lines
doc/guides/prog_guide/rte_flow.rst +4
-0+Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification.doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct ``rte_mbuf::sched::color``) · line 3015
Quoted 10 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+ +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS`` +- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +
Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
Quoted 47 lines
Quoted 47 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~lib/ethdev/rte_flow.c +1
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +7
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ };
Quoted 16 lines
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 10 lines
lib/ethdev/rte_flow.h +10
-0+* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, +* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/
What does it mean? I must use it only on rules that have one of the above actions?
Quoted 10 lines
Quoted 10 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 21 lines
Quoted 21 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 13 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.What is the item that you are matching on when using
rte_flow? Is it part of the tci in the vlan item?
TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)doc/guides/prog_guide/rte_flow.rst +9
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct ``rte_mbuf::sched::color``) | ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS``
Quoted 8 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct ``rte_mbuf::sched::color``) · line 3015
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +5
-0+- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant for SET_TC action. Do you have any specific action in mind where SET_TC valid in addition to above actions
Quoted 58 lines
Quoted 58 lines
Quoted 58 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~lib/ethdev/rte_flow.c +1
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +17
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE,
Quoted 8 lines
Quoted 6 lines
lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Quoted 40 lines · Jerin Jacob
Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 28 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.
Quoted 7 lines
Quoted 1 line
What is the item that you are matching on when using
rte_flow? Is it part of the tci in the vlan item?TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?
I think "set" is appropriate.
Hi Jerin,
Quoted 44 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, November 23, 2021 12:58 PM
To: Ori Kam <[email protected]>Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 28 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.
Quoted 8 lines
Quoted 1 line
What is the item that you are matching on when using
rte_flow? Is it part of the tci in the vlan item?TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?
Yes, in the rte_flow_action_modify_field there is what operation you want to do, in this case the action should be set.
I assume that you are trying to set the VLAN tag priority field right?
Quoted 43 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)Quoted 5 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +0
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct``rte_mbuf::sched::color``)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
doc/guides/prog_guide/rte_flow.rst +9
-0| ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS``Quoted 8 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct ``rte_mbuf::sched::color``) · line 3015
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +5
-0+- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
Quoted 5 lines
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant forSET_TCaction. Do you have any specific action in mind whereSET_TCvalid in addition to above actions
First what happens in case of egress traffic? There is no dest action. Second what happens if for example the priority is based on the outer tunnel which I want decap and at a latter stage I want to do connection tracking and only if everything is correct I want to send this packet to a queue?
Quoted 85 lines
Quoted 60 lines
Quoted 60 lines
Quoted 60 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~lib/ethdev/rte_flow.c +1
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +17
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, Quoted 8 lines
Quoted 6 lines
lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Quoted 56 lines · Ori Kam
Hi Jerin,
Quoted 44 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, November 23, 2021 12:58 PM
To: Ori Kam <[email protected]>Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 28 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.Quoted 8 lines
Quoted 1 line
What is the item that you are matching on when using
rte_flow? Is it part of the tci in the vlan item?TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?
Quoted 2 lines
Yes, in the
rte_flow_action_modify_fieldthere is what operation you want to do, in this case the action should be set.
But RTE_FLOW_ACTION_TYPE_MODIFY_FIELD used for modify the packet content[1]. RIght?
In this case, it is more of sideband data not anything on packet content. If so, explicit action
makes sense. Right?
[1]
* RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
*
* Modify a destination header field according to the specified
* operation. Another field of the packet can be used as a source as well
* as tag, mark, metadata, immediate value or a pointer to it.
Quoted 2 lines
I assume that you are trying to set the VLAN tag priority field right?
Both VLAN tag and/or DSCP field.
Quoted 44 lines
Quoted 44 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)Quoted 5 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +0
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct``rte_mbuf::sched::color``)
Quoted 20 lines
Quoted 17 lines
Quoted 7 lines
doc/guides/prog_guide/rte_flow.rst +4
-0| ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification.doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct ``rte_mbuf::sched::color``) · line 3015
Quoted 10 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+ +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS`` +- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
Quoted 6 lines
Quoted 5 lines
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant forSET_TCaction. Do you have any specific action in mind whereSET_TCvalid in addition to above actionsFirst what happens in case of egress traffic? There is no dest action.
It will be invalid. I can change the documentation to specify egress direction is not valid.
Thoughts?
Quoted 3 lines
Second what happens if for example the priority is based on the outer tunnel which I want decap and at a latter stage I want to do connection tracking and only if everything is correct I want to send this packet to a queue?
Which is fine with the current scheme of things as per the documentation, "This action must be used with any of the following action." it does not preclude to
use of any other action. If it is not clear, we can reword like below,
---
This action must be used with any of the following action and not limited to using any of other actions in conjunction with the following action.
---
Thoughts?
Quoted 86 lines
Quoted 86 lines
Quoted 61 lines
Quoted 61 lines
Quoted 61 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~lib/ethdev/rte_flow.c +1
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +17
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, Quoted 8 lines
Quoted 6 lines
lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Quoted 64 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 24, 2021 12:48 PMQuoted 48 lines · Ori Kam
Hi Jerin,
Quoted 45 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, November 23, 2021 12:58 PM
To: Ori Kam <[email protected]>Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 29 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.What is the item that you are matching on when using
rte_flow? Is it part of the tci in the vlanitem?
Quoted 8 lines
Quoted 7 lines
TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?
Quoted 9 lines
Quoted 2 lines
Yes, in the
rte_flow_action_modify_fieldthere is what operation you want to do, in this case the action should be set.But
RTE_FLOW_ACTION_TYPE_MODIFY_FIELDused for modify the packet content[1]. RIght?
In this case, it is more of sideband data not anything on packet content. If so, explicit action
makes sense. Right?
It looks like I'm missing something,
If you don't want to change the packet and this is just data, why not use tag/mark/flag/metadata?
Who should get this data?
If the packet is hairpined and the packet is sent to wire this info should be part of the packet right?
Quoted 9 lines
[1]
*RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
*
* Modify a destination header field according to the specified
* operation. Another field of the packet can be used as a source as well
* as tag, mark, metadata, immediate value or a pointer to it.Quoted 1 line
Quoted 4 lines
Quoted 1 line
I assume that you are trying to set the VLAN tag priority field right?
Both VLAN tag and/or DSCP field.
Going back to the above comment so you are changing something in the packet.
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)Quoted 5 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +0
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct``rte_mbuf::sched::color``)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
doc/guides/prog_guide/rte_flow.rst +9
-0| ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS``Quoted 8 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct ``rte_mbuf::sched::color``) · line 3015
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +5
-0+- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant forSET_TCaction. Do you have any specific action in mind whereSET_TCvalid in addition to above actions
Quoted 6 lines
Quoted 1 line
First what happens in case of egress traffic? There is no dest action.
It will be invalid. I can change the documentation to specify egress direction is not valid.
Thoughts?
Why not? Isn't it possible that application will want to send some packet with this value?
Quoted 4 lines
Quoted 3 lines
Second what happens if for example the priority is based on the outer tunnel which I want decap and at a latter stage I want to do connection tracking and only if everything is correct I want to send this packet to a queue?
Quoted 10 lines
Which is fine with the current scheme of things as per the documentation, "This action must be used with any of the following action." it does not preclude to
use of any other action. If it is not clear, we can reword like below,
---
This action must be used with any of the following action and not limited to using any of other actions in conjunction with the following action.
---
Thoughts?
Like stated above I can see use case where you want to set this value at the start of the pipe and then based on this value act.
For example:
1. decap the packet and based on the tunnel set this value and jump to connection tracking group.
2. run connection tracking and jump to next table
3. Based on the connection tracking and the TC value send to some queue.
Best,
Ori
Quoted 86 lines
Quoted 86 lines
Quoted 86 lines
Quoted 61 lines
Quoted 61 lines
Quoted 61 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~lib/ethdev/rte_flow.c +1
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +17
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, Quoted 8 lines
Quoted 6 lines
lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Quoted 75 lines · Ori Kam
Quoted 65 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 24, 2021 12:48 PMQuoted 48 lines · Ori Kam
Hi Jerin,
Quoted 45 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, November 23, 2021 12:58 PM
To: Ori Kam <[email protected]>Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 29 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.What is the item that you are matching on when using
rte_flow? Is it part of the tci in the vlanitem?
Quoted 8 lines
Quoted 7 lines
TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?Quoted 9 lines
Quoted 2 lines
Yes, in the
rte_flow_action_modify_fieldthere is what operation you want to do, in this case the action should be set.But
RTE_FLOW_ACTION_TYPE_MODIFY_FIELDused for modify the packet content[1]. RIght?
In this case, it is more of sideband data not anything on packet content. If so, explicit action
makes sense. Right?
Quoted 7 lines
It looks like I'm missing something,
If you don't want to change the packet and this is just data, why not use tag/mark/flag/metadata?Who should get this data?
If the packet is hairpined and the packet is sent to wire this info should be part of the packet right?
No. Here is what I envisioned for working this,
User add riles like this.
Patten: VLAN TCI is value X or DSCP value Y
Action: RTE_FLOW_ACTION_TYPE_PFC_SET_TC with an value for TC(8bit defined in 802.1Qbb)
Driver use this rule to enable TC (flow control) with that value for the given VLAN TCI == X
tag/mark/flag/metadata used to embed something in mbuf. Here, This action establishes, For a given
flow what TC value needs to be enabled(it does not need to be given in mbuf or packet for application to use).
It just establishes the TC wiring for flow control enablement for a given pattern.
Is it adding up?
Quoted 10 lines
Quoted 10 lines
[1]
*RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
*
* Modify a destination header field according to the specified
* operation. Another field of the packet can be used as a source as well
* as tag, mark, metadata, immediate value or a pointer to it.Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
I assume that you are trying to set the VLAN tag priority field right?
Both VLAN tag and/or DSCP field.
Going back to the above comment so you are changing something in the packet.
No. See above.
Quoted 51 lines
Quoted 51 lines
Quoted 51 lines
Quoted 51 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)Quoted 5 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +0
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct``rte_mbuf::sched::color``)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
doc/guides/prog_guide/rte_flow.rst +9
-0| ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS``Quoted 8 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct · line 3015
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +5
-0+- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant forSET_TCaction. Do you have any specific action in mind whereSET_TCvalid in addition to above actions
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
First what happens in case of egress traffic? There is no dest action.
It will be invalid. I can change the documentation to specify egress direction is not valid.
Thoughts?Why not? Isn't it possible that application will want to send some packet with this value?
This is Rx Flow control(8bit TC value defined in 802.1Qbb), Not relevant when using on Tx.
Quoted 16 lines
Quoted 5 lines
Quoted 4 lines
Second what happens if for example the priority is based on the outer tunnel which I want decap and at a latter stage I want to do connection tracking and only if everything is correct I want to send this packet to a queue?
Quoted 10 lines
Which is fine with the current scheme of things as per the documentation, "This action must be used with any of the following action." it does not preclude to
use of any other action. If it is not clear, we can reword like below,
---
This action must be used with any of the following action and not limited to using any of other actions in conjunction with the following action.
---
Thoughts?
Quoted 7 lines
Like stated above I can see use case where you want to set this value at the start of the pipe and then based on this value act.
For example:
1. decap the packet and based on the tunnel set this value and jump to connection tracking group.
2. run connection tracking and jump to next table
3. Based on the connection tracking and the TC value send to some queue.
Yes. It is possible to have decap + connection tracking + RTE_FLOW_ACTION_TYPE_PFC_SET_TC + [RTE_FLOW_ACTION_TYPE_QUEUE or RTE_FLOW_ACTION_TYPE_RSS or RTE_FLOW_ACTION_TYPE_PF or RTE_FLOW_ACTION_TYPE_VF or RTE_FLOW_ACTION_TYPE_PHY_PORT or RTE_FLOW_ACTION_TYPE_PORT_ID] cascaded actions.
Quoted 89 lines
Best,
OriQuoted 86 lines
Quoted 86 lines
Quoted 86 lines
Quoted 61 lines
Quoted 61 lines
Quoted 61 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~lib/ethdev/rte_flow.c +1
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +17
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, Quoted 8 lines
Quoted 6 lines
lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Hi Jerin,
I think that we are not on the same page and I'm missing some critical info to decide on the best approch.
Can we please have a short meeting so you can explain to me about this feature?
I think it will be good if Thomas, Ferruh and Andrew could join.
Best,
Ori
Quoted 309 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Thursday, November 25, 2021 1:12 PM
To: Ori Kam <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 75 lines · Ori Kam
Quoted 65 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 24, 2021 12:48 PMQuoted 48 lines · Ori Kam
Hi Jerin,
Quoted 45 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, November 23, 2021 12:58 PM
To: Ori Kam <[email protected]>Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 29 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.What is the item that you are matching on when using
rte_flow? Is it part of the tci in the vlanitem?
Quoted 8 lines
Quoted 7 lines
TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?Quoted 9 lines
Quoted 2 lines
Yes, in the
rte_flow_action_modify_fieldthere is what operation you want to do, in this case the action should be set.But
RTE_FLOW_ACTION_TYPE_MODIFY_FIELDused for modify the packet content[1]. RIght?
In this case, it is more of sideband data not anything on packet content. If so, explicit action
makes sense. Right?Quoted 7 lines
It looks like I'm missing something,
If you don't want to change the packet and this is just data, why not use tag/mark/flag/metadata?Who should get this data?
If the packet is hairpined and the packet is sent to wire this info should be part of the packet right?No. Here is what I envisioned for working this,
User add riles like this.Patten: VLAN TCI is value X or DSCP value Y
Action:RTE_FLOW_ACTION_TYPE_PFC_SET_TCwith an value for TC(8bit defined in 802.1Qbb)
Driver use this rule to enable TC (flow control) with that value for the given VLAN TCI == Xtag/mark/flag/metadata used to embed something in mbuf. Here, This action establishes, For a given
flow what TC value needs to be enabled(it does not need to be given in mbuf or packet for application to use).
It just establishes the TC wiring for flow control enablement for a given pattern.
Is it adding up?Quoted 10 lines
Quoted 10 lines
[1]
*RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
*
* Modify a destination header field according to the specified
* operation. Another field of the packet can be used as a source as well
* as tag, mark, metadata, immediate value or a pointer to it.Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
I assume that you are trying to set the VLAN tag priority field right?
Both VLAN tag and/or DSCP field.
Going back to the above comment so you are changing something in the packet.
No. See above.
Quoted 51 lines
Quoted 51 lines
Quoted 51 lines
Quoted 51 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)Quoted 5 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +0
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct``rte_mbuf::sched::color``)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
doc/guides/prog_guide/rte_flow.rst +9
-0| ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS``Quoted 8 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct · line 3015
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +5
-0+- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant forSET_TCaction. Do you have any specific action in mind whereSET_TCvalid in addition to above actionsQuoted 8 lines
Quoted 6 lines
Quoted 1 line
First what happens in case of egress traffic? There is no dest action.
It will be invalid. I can change the documentation to specify egress direction is not valid.
Thoughts?Why not? Isn't it possible that application will want to send some packet with this value?
This is Rx Flow control(8bit TC value defined in 802.1Qbb), Not relevant when using on Tx.
Quoted 16 lines
Quoted 5 lines
Quoted 4 lines
Second what happens if for example the priority is based on the outer tunnel which I want decap and at a latter stage I want to do connection tracking and only if everything is correct I want to send this packet to a queue?
Quoted 10 lines
Which is fine with the current scheme of things as per the documentation, "This action must be used with any of the following action." it does not preclude to
use of any other action. If it is not clear, we can reword like below,
---
This action must be used with any of the following action and not limited to using any of other actions in conjunction with the following action.
---
Thoughts?Quoted 7 lines
Like stated above I can see use case where you want to set this value at the start of the pipe and then based on this value act.
For example:
1. decap the packet and based on the tunnel set this value and jump to connection tracking group.
2. run connection tracking and jump to next table
3. Based on the connection tracking and the TC value send to some queue.Yes. It is possible to have decap + connection tracking +
RTE_FLOW_ACTION_TYPE_PFC_SET_TC+ [RTE_FLOW_ACTION_TYPE_QUEUEorRTE_FLOW_ACTION_TYPE_RSSorRTE_FLOW_ACTION_TYPE_PForRTE_FLOW_ACTION_TYPE_VForRTE_FLOW_ACTION_TYPE_PHY_PORTorRTE_FLOW_ACTION_TYPE_PORT_ID] cascaded actions.Quoted 89 lines
Best,
OriQuoted 86 lines
Quoted 86 lines
Quoted 86 lines
Quoted 61 lines
Quoted 61 lines
Quoted 61 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~lib/ethdev/rte_flow.c +1
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +17
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, Quoted 8 lines
Quoted 6 lines
lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Quoted 9 lines · Ori Kam
Hi Jerin,
I think that we are not on the same page and I'm missing some critical info to decide on the best approch.
Can we please have a short meeting so you can explain to me about this feature?
I think it will be good if Thomas, Ferruh and Andrew could join.
Sure, Ori. Is 2 PM UTC on 29th Nov(Monday) on https://meet.jit.si/dpdk
is fine for you/Thomas/Ferruh/Andrew?
If not, Please suggest some time.
Quoted 313 lines
Best,
OriQuoted 309 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Thursday, November 25, 2021 1:12 PM
To: Ori Kam <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 75 lines · Ori Kam
Quoted 65 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 24, 2021 12:48 PMQuoted 48 lines · Ori Kam
Hi Jerin,
Quoted 45 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, November 23, 2021 12:58 PM
To: Ori Kam <[email protected]>Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 29 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.What is the item that you are matching on when using
rte_flow? Is it part of the tci in the vlanitem?
Quoted 8 lines
Quoted 7 lines
TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?Quoted 9 lines
Quoted 2 lines
Yes, in the
rte_flow_action_modify_fieldthere is what operation you want to do, in this case the action should be set.But
RTE_FLOW_ACTION_TYPE_MODIFY_FIELDused for modify the packet content[1]. RIght?
In this case, it is more of sideband data not anything on packet content. If so, explicit action
makes sense. Right?Quoted 7 lines
It looks like I'm missing something,
If you don't want to change the packet and this is just data, why not use tag/mark/flag/metadata?Who should get this data?
If the packet is hairpined and the packet is sent to wire this info should be part of the packet right?No. Here is what I envisioned for working this,
User add riles like this.Patten: VLAN TCI is value X or DSCP value Y
Action:RTE_FLOW_ACTION_TYPE_PFC_SET_TCwith an value for TC(8bit defined in 802.1Qbb)
Driver use this rule to enable TC (flow control) with that value for the given VLAN TCI == Xtag/mark/flag/metadata used to embed something in mbuf. Here, This action establishes, For a given
flow what TC value needs to be enabled(it does not need to be given in mbuf or packet for application to use).
It just establishes the TC wiring for flow control enablement for a given pattern.
Is it adding up?Quoted 10 lines
Quoted 10 lines
[1]
*RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
*
* Modify a destination header field according to the specified
* operation. Another field of the packet can be used as a source as well
* as tag, mark, metadata, immediate value or a pointer to it.Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
I assume that you are trying to set the VLAN tag priority field right?
Both VLAN tag and/or DSCP field.
Going back to the above comment so you are changing something in the packet.
No. See above.
Quoted 51 lines
Quoted 51 lines
Quoted 51 lines
Quoted 51 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)Quoted 5 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +0
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct``rte_mbuf::sched::color``)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
doc/guides/prog_guide/rte_flow.rst +9
-0| ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS``Quoted 8 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct · line 3015
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +5
-0+- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant forSET_TCaction. Do you have any specific action in mind whereSET_TCvalid in addition to above actionsQuoted 8 lines
Quoted 6 lines
Quoted 1 line
First what happens in case of egress traffic? There is no dest action.
It will be invalid. I can change the documentation to specify egress direction is not valid.
Thoughts?Why not? Isn't it possible that application will want to send some packet with this value?
This is Rx Flow control(8bit TC value defined in 802.1Qbb), Not relevant when using on Tx.
Quoted 16 lines
Quoted 5 lines
Quoted 4 lines
Second what happens if for example the priority is based on the outer tunnel which I want decap and at a latter stage I want to do connection tracking and only if everything is correct I want to send this packet to a queue?
Quoted 10 lines
Which is fine with the current scheme of things as per the documentation, "This action must be used with any of the following action." it does not preclude to
use of any other action. If it is not clear, we can reword like below,
---
This action must be used with any of the following action and not limited to using any of other actions in conjunction with the following action.
---
Thoughts?Quoted 7 lines
Like stated above I can see use case where you want to set this value at the start of the pipe and then based on this value act.
For example:
1. decap the packet and based on the tunnel set this value and jump to connection tracking group.
2. run connection tracking and jump to next table
3. Based on the connection tracking and the TC value send to some queue.Yes. It is possible to have decap + connection tracking +
RTE_FLOW_ACTION_TYPE_PFC_SET_TC+ [RTE_FLOW_ACTION_TYPE_QUEUEorRTE_FLOW_ACTION_TYPE_RSSorRTE_FLOW_ACTION_TYPE_PForRTE_FLOW_ACTION_TYPE_VForRTE_FLOW_ACTION_TYPE_PHY_PORTorRTE_FLOW_ACTION_TYPE_PORT_ID] cascaded actions.Quoted 89 lines
Best,
OriQuoted 86 lines
Quoted 86 lines
Quoted 86 lines
Quoted 61 lines
Quoted 61 lines
Quoted 61 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~lib/ethdev/rte_flow.c +1
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +17
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, Quoted 8 lines
Quoted 6 lines
lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Good for me
Please send meeting inviate.
Ori
Quoted 344 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Friday, November 26, 2021 8:46 AM
To: Ori Kam <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 9 lines · Ori Kam
Hi Jerin,
I think that we are not on the same page and I'm missing some critical info to decide on the best approch.
Can we please have a short meeting so you can explain to me about this feature?
I think it will be good if Thomas, Ferruh and Andrew could join.
Sure, Ori. Is 2 PM UTC on 29th Nov(Monday) on
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmeet.jit.si%2Fdpdk&dat
a=04%7C01%7Corika%40nvidia.com%7C515af20d94c0419f1e2208d9b0a88983%7C43083d15727340c1b7 db39efd9ccc17a%7C0%7C0%7C637735060187259293%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL jAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=V3n8P%2F%2BM udw4IMntVry8PO71PgxBAJyS9QYfTJN5i7A%3D&reserved=0
is fine for you/Thomas/Ferruh/Andrew?
If not, Please suggest some time.Quoted 67 lines
Best,
OriQuoted 63 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Thursday, November 25, 2021 1:12 PM
To: Ori Kam <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 56 lines · Ori Kam
Quoted 56 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 24, 2021 12:48 PMQuoted 48 lines · Ori Kam
Hi Jerin,
Quoted 45 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, November 23, 2021 12:58 PM
To: Ori Kam <[email protected]>Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 29 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.What is the item that you are matching on when using
rte_flow? Is it part of the tci in thevlan
Quoted 77 lines
Quoted 77 lines
Quoted 19 lines
Quoted 9 lines
item?
Quoted 8 lines
Quoted 7 lines
TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?Quoted 9 lines
Quoted 2 lines
Yes, in the
rte_flow_action_modify_fieldthere is what operation you want to do, in this case the action should be set.But
RTE_FLOW_ACTION_TYPE_MODIFY_FIELDused for modify the packet content[1]. RIght?
In this case, it is more of sideband data not anything on packet content. If so, explicit action
makes sense. Right?Quoted 7 lines
It looks like I'm missing something,
If you don't want to change the packet and this is just data, why not use tag/mark/flag/metadata?Who should get this data?
If the packet is hairpined and the packet is sent to wire this info should be part of the packet right?No. Here is what I envisioned for working this,
User add riles like this.Patten: VLAN TCI is value X or DSCP value Y
Action:RTE_FLOW_ACTION_TYPE_PFC_SET_TCwith an value for TC(8bit defined in 802.1Qbb)
Driver use this rule to enable TC (flow control) with that value for the given VLAN TCI == Xtag/mark/flag/metadata used to embed something in mbuf. Here, This action establishes, For a given
flow what TC value needs to be enabled(it does not need to be given in mbuf or packet for application to use).
It just establishes the TC wiring for flow control enablement for a given pattern.
Is it adding up?Quoted 10 lines
Quoted 10 lines
[1]
*RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
*
* Modify a destination header field according to the specified
* operation. Another field of the packet can be used as a source as well
* as tag, mark, metadata, immediate value or a pointer to it.Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
I assume that you are trying to set the VLAN tag priority field right?
Both VLAN tag and/or DSCP field.
Going back to the above comment so you are changing something in the packet.
No. See above.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 6 lines
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)(quoted diff) +0
-0
b/doc/guides/prog_guide/rte_flow.rstQuoted 59 lines
Quoted 59 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 4 lines
Quoted 4 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct
Quoted 4 lines
index
2b42d5ec8c..e59f8a2902100644doc/guides/prog_guide/rte_flow.rst +0
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct``rte_mbuf::sched::color``)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
doc/guides/prog_guide/rte_flow.rst +9
-0| ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS``Quoted 8 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct · line 3015
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +5
-0+- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant forSET_TCaction. Do you have any specific action in mind whereSET_TCvalid in addition to above actionsQuoted 8 lines
Quoted 6 lines
Quoted 1 line
First what happens in case of egress traffic? There is no dest action.
It will be invalid. I can change the documentation to specify egress direction is not valid.
Thoughts?Why not? Isn't it possible that application will want to send some packet with this value?
This is Rx Flow control(8bit TC value defined in 802.1Qbb), Not relevant when using on Tx.
Quoted 16 lines
Quoted 15 lines
Quoted 4 lines
Second what happens if for example the priority is based on the outer tunnel which I want decap and at a latter stage I want to do connection tracking and only if everything is correct I want to send this packet to a queue?
Which is fine with the current scheme of things as per the documentation, "This action must be used with any of the following action." it does not preclude to
use of any other action. If it is not clear, we can reword like below,
---
This action must be used with any of the following action and not limited to using any of other actions in conjunction with the following action.
---
Thoughts?Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Like stated above I can see use case where you want to set this value at the start of the pipe and then based on this value act.
For example:
1. decap the packet and based on the tunnel set this value and jump to connection trackinggroup.
Quoted 30 lines
Quoted 30 lines
Quoted 2 lines
2. run connection tracking and jump to next table
3. Based on the connection tracking and the TC value send to some queue.Yes. It is possible to have decap + connection tracking +
RTE_FLOW_ACTION_TYPE_PFC_SET_TC+ [RTE_FLOW_ACTION_TYPE_QUEUEorRTE_FLOW_ACTION_TYPE_RSSorRTE_FLOW_ACTION_TYPE_PForRTE_FLOW_ACTION_TYPE_VForRTE_FLOW_ACTION_TYPE_PHY_PORTorRTE_FLOW_ACTION_TYPE_PORT_ID] cascaded actions.Quoted 20 lines
Best,
OriQuoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
lib/ethdev/rte_flow.c static const struct rte_flow_desc_data rte_flow_desc_action[]
Quoted 5 lines
lib/ethdev/rte_flow.c +0
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[]= {
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
lib/ethdev/rte_flow.c +1
-0*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +17
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, Quoted 8 lines
Quoted 6 lines
lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Quoted 4 lines · Ori Kam
Good for me
Please send the meeting invite.
Meeting invite at 2 PM UTC on 29th Nov(Monday)
Hi there,
Jerin Jacob Kollanukkaran is inviting you to a scheduled Zoom meeting.
Topic: Jerin Jacob Kollanukkaran's Personal Meeting Room
Join Zoom Meeting:
https://marvell.zoom.us/j/9901077677?pwd=T2lTTGMwYlc1YTQzMnR4eGRWQXR6QT09
Password: 339888
Or Telephone:
Dial(for higher quality, dial a number based on your current location):
US: +1 301 715 8592 or +1 312 626 6799 or +1 346 248 7799
or +1 646 558 8656 or +1 669 900 6833 or +1 253 215 8782 or 888 788 0099 (Toll Free) or 833 548 0276 (Toll Free) or 833 548 0282 (Toll Free) or 877 853 5247 (Toll Free)
Meeting ID: 990 107 7677
Password: 358309
International numbers available: https://marvell.zoom.us/u/adpcCpMHYtOr a Video Conference Room:
From Touchpad: Tap Join Zoom button. When prompted, enter 990 107 7677
Password: 358309
For China locations, from Touchpad: Dial* then 990 107 7677
Password: 358309
Quoted 347 lines
Ori
Quoted 344 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Friday, November 26, 2021 8:46 AM
To: Ori Kam <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 9 lines · Ori Kam
Hi Jerin,
I think that we are not on the same page and I'm missing some critical info to decide on the best approch.
Can we please have a short meeting so you can explain to me about this feature?
I think it will be good if Thomas, Ferruh and Andrew could join.
Sure, Ori. Is 2 PM UTC on 29th Nov(Monday) on
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmeet.jit.si%2Fdpdk&dat
a=04%7C01%7Corika%40nvidia.com%7C515af20d94c0419f1e2208d9b0a88983%7C43083d15727340c1b7 db39efd9ccc17a%7C0%7C0%7C637735060187259293%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL jAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=V3n8P%2F%2BM udw4IMntVry8PO71PgxBAJyS9QYfTJN5i7A%3D&reserved=0
is fine for you/Thomas/Ferruh/Andrew?
If not, Please suggest some time.Quoted 67 lines
Best,
OriQuoted 63 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Thursday, November 25, 2021 1:12 PM
To: Ori Kam <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 56 lines · Ori Kam
Quoted 56 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 24, 2021 12:48 PMQuoted 48 lines · Ori Kam
Hi Jerin,
Quoted 45 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, November 23, 2021 12:58 PM
To: Ori Kam <[email protected]>Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 29 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.What is the item that you are matching on when using
rte_flow? Is it part of the tci in thevlan
Quoted 77 lines
Quoted 77 lines
Quoted 19 lines
Quoted 9 lines
item?
Quoted 8 lines
Quoted 7 lines
TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?Quoted 9 lines
Quoted 2 lines
Yes, in the
rte_flow_action_modify_fieldthere is what operation you want to do, in this case the action should be set.But
RTE_FLOW_ACTION_TYPE_MODIFY_FIELDused for modify the packet content[1]. RIght?
In this case, it is more of sideband data not anything on packet content. If so, explicit action
makes sense. Right?Quoted 7 lines
It looks like I'm missing something,
If you don't want to change the packet and this is just data, why not use tag/mark/flag/metadata?Who should get this data?
If the packet is hairpined and the packet is sent to wire this info should be part of the packet right?No. Here is what I envisioned for working this,
User add riles like this.Patten: VLAN TCI is value X or DSCP value Y
Action:RTE_FLOW_ACTION_TYPE_PFC_SET_TCwith an value for TC(8bit defined in 802.1Qbb)
Driver use this rule to enable TC (flow control) with that value for the given VLAN TCI == Xtag/mark/flag/metadata used to embed something in mbuf. Here, This action establishes, For a given
flow what TC value needs to be enabled(it does not need to be given in mbuf or packet for application to use).
It just establishes the TC wiring for flow control enablement for a given pattern.
Is it adding up?Quoted 10 lines
Quoted 10 lines
[1]
*RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
*
* Modify a destination header field according to the specified
* operation. Another field of the packet can be used as a source as well
* as tag, mark, metadata, immediate value or a pointer to it.Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
I assume that you are trying to set the VLAN tag priority field right?
Both VLAN tag and/or DSCP field.
Going back to the above comment so you are changing something in the packet.
No. See above.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 6 lines
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)(quoted diff) +0
-0
b/doc/guides/prog_guide/rte_flow.rstQuoted 59 lines
Quoted 59 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 4 lines
Quoted 4 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct
Quoted 4 lines
index
2b42d5ec8c..e59f8a2902100644doc/guides/prog_guide/rte_flow.rst +0
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct``rte_mbuf::sched::color``)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
doc/guides/prog_guide/rte_flow.rst +9
-0| ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS``Quoted 8 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct · line 3015
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +5
-0+- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant forSET_TCaction. Do you have any specific action in mind whereSET_TCvalid in addition to above actionsQuoted 8 lines
Quoted 6 lines
Quoted 1 line
First what happens in case of egress traffic? There is no dest action.
It will be invalid. I can change the documentation to specify egress direction is not valid.
Thoughts?Why not? Isn't it possible that application will want to send some packet with this value?
This is Rx Flow control(8bit TC value defined in 802.1Qbb), Not relevant when using on Tx.
Quoted 16 lines
Quoted 15 lines
Quoted 4 lines
Second what happens if for example the priority is based on the outer tunnel which I want decap and at a latter stage I want to do connection tracking and only if everything is correct I want to send this packet to a queue?
Which is fine with the current scheme of things as per the documentation, "This action must be used with any of the following action." it does not preclude to
use of any other action. If it is not clear, we can reword like below,
---
This action must be used with any of the following action and not limited to using any of other actions in conjunction with the following action.
---
Thoughts?Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Like stated above I can see use case where you want to set this value at the start of the pipe and then based on this value act.
For example:
1. decap the packet and based on the tunnel set this value and jump to connection trackinggroup.
Quoted 30 lines
Quoted 30 lines
Quoted 2 lines
2. run connection tracking and jump to next table
3. Based on the connection tracking and the TC value send to some queue.Yes. It is possible to have decap + connection tracking +
RTE_FLOW_ACTION_TYPE_PFC_SET_TC+ [RTE_FLOW_ACTION_TYPE_QUEUEorRTE_FLOW_ACTION_TYPE_RSSorRTE_FLOW_ACTION_TYPE_PForRTE_FLOW_ACTION_TYPE_VForRTE_FLOW_ACTION_TYPE_PHY_PORTorRTE_FLOW_ACTION_TYPE_PORT_ID] cascaded actions.Quoted 20 lines
Best,
OriQuoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
lib/ethdev/rte_flow.c static const struct rte_flow_desc_data rte_flow_desc_action[]
Quoted 5 lines
lib/ethdev/rte_flow.c +0
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[]= {
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
lib/ethdev/rte_flow.c +1
-0*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +17
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, Quoted 8 lines
Quoted 6 lines
lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Quoted 6 lines · Jerin Jacob
Quoted 4 lines · Ori Kam
Good for me
Please send the meeting invite.
Thanks, Ori, Thomas, and Ferruh for attending the meeting.
General consensus to expose the feature as ethdev API instead of rte_flow i.e rte_flow will be used for steering the traffic to Queue for given VLAN TCI field or so and the
ethdev Rx queue will have the configuration for traffic class value.
I will reject this
http://patches.dpdk.org/project/dpdk/patch/[email protected]/
patch and send a new one
based on the above theme.
Quoted 380 lines
Meeting invite at 2 PM UTC on 29th Nov(Monday)
Hi there,
Jerin Jacob Kollanukkaran is inviting you to a scheduled Zoom meeting.
Topic: Jerin Jacob Kollanukkaran's Personal Meeting Room
Join Zoom Meeting:
https://marvell.zoom.us/j/9901077677?pwd=T2lTTGMwYlc1YTQzMnR4eGRWQXR6QT09Password: 339888Or Telephone:
Dial(for higher quality, dial a number based on your current location):
US: +1 301 715 8592 or +1 312 626 6799 or +1 346 248 7799
or +1 646 558 8656 or +1 669 900 6833 or +1 253 215 8782 or 888 788 0099 (Toll Free) or 833 548 0276 (Toll Free) or 833 548 0282 (Toll Free) or 877 853 5247 (Toll Free)Meeting ID: 990 107 7677 Password: 358309 International numbers available: https://marvell.zoom.us/u/adpcCpMHYtOr a Video Conference Room:
From Touchpad: Tap Join Zoom button. When prompted, enter 990 107 7677
Password: 358309For China locations, from Touchpad: Dial* then 990 107 7677
Password: 358309Quoted 347 lines
Ori
Quoted 344 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Friday, November 26, 2021 8:46 AM
To: Ori Kam <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 9 lines · Ori Kam
Hi Jerin,
I think that we are not on the same page and I'm missing some critical info to decide on the best approch.
Can we please have a short meeting so you can explain to me about this feature?
I think it will be good if Thomas, Ferruh and Andrew could join.
Sure, Ori. Is 2 PM UTC on 29th Nov(Monday) on
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmeet.jit.si%2Fdpdk&dat
a=04%7C01%7Corika%40nvidia.com%7C515af20d94c0419f1e2208d9b0a88983%7C43083d15727340c1b7 db39efd9ccc17a%7C0%7C0%7C637735060187259293%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL jAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=V3n8P%2F%2BM udw4IMntVry8PO71PgxBAJyS9QYfTJN5i7A%3D&reserved=0
is fine for you/Thomas/Ferruh/Andrew?
If not, Please suggest some time.Quoted 67 lines
Best,
OriQuoted 63 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Thursday, November 25, 2021 1:12 PM
To: Ori Kam <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 56 lines · Ori Kam
Quoted 56 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 24, 2021 12:48 PMQuoted 48 lines · Ori Kam
Hi Jerin,
Quoted 45 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, November 23, 2021 12:58 PM
To: Ori Kam <[email protected]>Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 29 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set()based API is not generic as it can not support other than VLAN priority mapping to PFC traffic class.Introducing
RTE_FLOW_ACTION_TYPE_PFC_SET_TCrte_flowaction to set the traffic class as per 802.1Qbb specification. This will enable, Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as
rte_flowaction will enable fine control on traffic class selection to a specific queue or VF etc.Signed-off-by Jerin Jacob <[email protected]>Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.What is the item that you are matching on when using
rte_flow? Is it part of the tci in thevlan
Quoted 77 lines
Quoted 77 lines
Quoted 19 lines
Quoted 9 lines
item?
Quoted 8 lines
Quoted 7 lines
TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?Quoted 9 lines
Quoted 2 lines
Yes, in the
rte_flow_action_modify_fieldthere is what operation you want to do, in this case the action should be set.But
RTE_FLOW_ACTION_TYPE_MODIFY_FIELDused for modify the packet content[1]. RIght?
In this case, it is more of sideband data not anything on packet content. If so, explicit action
makes sense. Right?Quoted 7 lines
It looks like I'm missing something,
If you don't want to change the packet and this is just data, why not use tag/mark/flag/metadata?Who should get this data?
If the packet is hairpined and the packet is sent to wire this info should be part of the packet right?No. Here is what I envisioned for working this,
User add riles like this.Patten: VLAN TCI is value X or DSCP value Y
Action:RTE_FLOW_ACTION_TYPE_PFC_SET_TCwith an value for TC(8bit defined in 802.1Qbb)
Driver use this rule to enable TC (flow control) with that value for the given VLAN TCI == Xtag/mark/flag/metadata used to embed something in mbuf. Here, This action establishes, For a given
flow what TC value needs to be enabled(it does not need to be given in mbuf or packet for application to use).
It just establishes the TC wiring for flow control enablement for a given pattern.
Is it adding up?Quoted 10 lines
Quoted 10 lines
[1]
*RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
*
* Modify a destination header field according to the specified
* operation. Another field of the packet can be used as a source as well
* as tag, mark, metadata, immediate value or a pointer to it.Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
I assume that you are trying to set the VLAN tag priority field right?
Both VLAN tag and/or DSCP field.
Going back to the above comment so you are changing something in the packet.
No. See above.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving the feedback on this.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 6 lines
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+)(quoted diff) +0
-0
b/doc/guides/prog_guide/rte_flow.rstQuoted 59 lines
Quoted 59 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 4 lines
Quoted 4 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct
Quoted 4 lines
index
2b42d5ec8c..e59f8a2902100644doc/guides/prog_guide/rte_flow.rst +0
-0@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct``rte_mbuf::sched::color``)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
doc/guides/prog_guide/rte_flow.rst +9
-0| ``meter_color`` | Packet color | +-----------------+--------------+ +Action: ``PFC_SET_TC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Set traffic class as per PFC (802.1Qbb) specification. + +This action must be used with any of the following action. + +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` +- ``RTE_FLOW_ACTION_TYPE_RSS``Quoted 8 lines
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst which is set in the packet meta-data (i.e. struct · line 3015
Quoted 5 lines
doc/guides/prog_guide/rte_flow.rst +5
-0+- ``RTE_FLOW_ACTION_TYPE_PF`` +- ``RTE_FLOW_ACTION_TYPE_VF`` +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` +Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant forSET_TCaction. Do you have any specific action in mind whereSET_TCvalid in addition to above actionsQuoted 8 lines
Quoted 6 lines
Quoted 1 line
First what happens in case of egress traffic? There is no dest action.
It will be invalid. I can change the documentation to specify egress direction is not valid.
Thoughts?Why not? Isn't it possible that application will want to send some packet with this value?
This is Rx Flow control(8bit TC value defined in 802.1Qbb), Not relevant when using on Tx.
Quoted 16 lines
Quoted 15 lines
Quoted 4 lines
Second what happens if for example the priority is based on the outer tunnel which I want decap and at a latter stage I want to do connection tracking and only if everything is correct I want to send this packet to a queue?
Which is fine with the current scheme of things as per the documentation, "This action must be used with any of the following action." it does not preclude to
use of any other action. If it is not clear, we can reword like below,
---
This action must be used with any of the following action and not limited to using any of other actions in conjunction with the following action.
---
Thoughts?Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Like stated above I can see use case where you want to set this value at the start of the pipe and then based on this value act.
For example:
1. decap the packet and based on the tunnel set this value and jump to connection trackinggroup.
Quoted 30 lines
Quoted 30 lines
Quoted 2 lines
2. run connection tracking and jump to next table
3. Based on the connection tracking and the TC value send to some queue.Yes. It is possible to have decap + connection tracking +
RTE_FLOW_ACTION_TYPE_PFC_SET_TC+ [RTE_FLOW_ACTION_TYPE_QUEUEorRTE_FLOW_ACTION_TYPE_RSSorRTE_FLOW_ACTION_TYPE_PForRTE_FLOW_ACTION_TYPE_VForRTE_FLOW_ACTION_TYPE_PHY_PORTorRTE_FLOW_ACTION_TYPE_PORT_ID] cascaded actions.Quoted 20 lines
Best,
OriQuoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
doc/guides/prog_guide/rte_flow.rst +10
-0+.. _table_rte_flow_action_pfc_set_tc: + +.. table:: PFC_SET_PRIORITY + + +-----------------+-------------------------------------+ + | Field | Value | + +=================+=====================================+ + | ``tc`` | Traffic class as per PFC (802.1Qbb) | + +-----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
lib/ethdev/rte_flow.c static const struct rte_flow_desc_data rte_flow_desc_action[]
Quoted 5 lines
lib/ethdev/rte_flow.c +0
-0@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[]= {
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
lib/ethdev/rte_flow.c +1
-0*/ MK_FLOW_ACTION (INDIRECT ,0 ),MK_FLOW_ACTION (CONNTRACK ,sizeof (struct rte_flow_action_conntrack )), + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)), };int lib/ethdev/rte_flow.h +17
-0@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {* See struct rte_flow_action_meter_color. */ RTE_FLOW_ACTION_TYPE_METER_COLOR , + +/** +* Set traffic class as per PFC (802.1Qbb) specification. +* +* See struct rte_flow_action_pfc_set_tc. +*/ + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, };/** @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {enum rte_color color;/**< Packet color. */ }; +/** +* @warning +* @b EXPERIMENTAL: this structure may change without prior notice +* +* RTE_FLOW_ACTION_TYPE_PFC_SET_TC +* +* Set traffic class as per PFC (802.1Qbb) specification. +* +* This action must be used any of the following action. +* - RTE_FLOW_ACTION_TYPE_QUEUE, Quoted 8 lines
Quoted 6 lines
lib/ethdev/rte_flow.h struct rte_flow_action_meter_color { · line 3193
Quoted 6 lines
lib/ethdev/rte_flow.h +6
-0+* - RTE_FLOW_ACTION_TYPE_RSS, +* - RTE_FLOW_ACTION_TYPE_PF, +* - RTE_FLOW_ACTION_TYPE_VF, +* - RTE_FLOW_ACTION_TYPE_PHY_PORT, +* - RTE_FLOW_ACTION_TYPE_PORT_ID +*/ What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
lib/ethdev/rte_flow.h +4
-1+struct rte_flow_action_pfc_set_tc { +uint8_t tc;/**< Traffic class as per PFC (802.1Qbb) specification */ +}; +/** * Field IDs for MODIFY_FIELD action. */ --2.33.0
Best,
Ori
Quoted 17 lines · Jerin Jacob
Quoted 6 lines · Jerin Jacob
Quoted 4 lines · Ori Kam
Good for me
Please send the meeting invite.
Thanks, Ori, Thomas, and Ferruh for attending the meeting.
General consensus to expose the feature as ethdev API instead of
rte_flowi.erte_flowwill be used for steering the traffic to Queue for given VLAN TCI field or so and the
ethdev Rx queue will have the configuration for traffic class value.
Quoted 4 lines
I will reject this
http://patches.dpdk.org/project/dpdk/patch/[email protected]/
patch and send a new one
based on the above theme.
Sent updated patch[1] based on the above scheme.
[1]
http://patches.dpdk.org/project/dpdk/patch/[email protected]/
Quoted 381 lines
Quoted 381 lines
Meeting invite at 2 PM UTC on 29th Nov(Monday)
Hi there,
Jerin Jacob Kollanukkaran is inviting you to a scheduled Zoom meeting.
Topic: Jerin Jacob Kollanukkaran's Personal Meeting Room
Join Zoom Meeting:
https://marvell.zoom.us/j/9901077677?pwd=T2lTTGMwYlc1YTQzMnR4eGRWQXR6QT09Password: 339888Or Telephone:
Dial(for higher quality, dial a number based on your current location):
US: +1 301 715 8592 or +1 312 626 6799 or +1 346 248 7799
or +1 646 558 8656 or +1 669 900 6833 or +1 253 215 8782 or 888 788 0099 (Toll Free) or 833 548 0276 (Toll Free) or 833 548 0282 (Toll Free) or 877 853 5247 (Toll Free)Meeting ID: 990 107 7677 Password: 358309 International numbers available: https://marvell.zoom.us/u/adpcCpMHYtOr a Video Conference Room:
From Touchpad: Tap Join Zoom button. When prompted, enter 990 107 7677
Password: 358309For China locations, from Touchpad: Dial* then 990 107 7677
Password: 358309Quoted 347 lines
Ori
Quoted 344 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Friday, November 26, 2021 8:46 AM
To: Ori Kam <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 9 lines · Ori Kam
Hi Jerin,
I think that we are not on the same page and I'm missing some critical info to decide on the best approch.
Can we please have a short meeting so you can explain to me about this feature?
I think it will be good if Thomas, Ferruh and Andrew could join.
Sure, Ori. Is 2 PM UTC on 29th Nov(Monday) on
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmeet.jit.si%2Fdpdk&dat
a=04%7C01%7Corika%40nvidia.com%7C515af20d94c0419f1e2208d9b0a88983%7C43083d15727340c1b7 db39efd9ccc17a%7C0%7C0%7C637735060187259293%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL jAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=V3n8P%2F%2BM udw4IMntVry8PO71PgxBAJyS9QYfTJN5i7A%3D&reserved=0
is fine for you/Thomas/Ferruh/Andrew?
If not, Please suggest some time.Quoted 67 lines
Best,
OriQuoted 63 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Thursday, November 25, 2021 1:12 PM
To: Ori Kam <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 56 lines · Ori Kam
Quoted 56 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 24, 2021 12:48 PMQuoted 48 lines · Ori Kam
Hi Jerin,
Quoted 45 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, November 23, 2021 12:58 PM
To: Ori Kam <[email protected]>Quoted 2 lines · Ori Kam
Hi Jerin,
Hi Ori,
Quoted 2 lines
Sorry for my late response,
Thanks for the review.
Quoted 29 lines
Quoted 18 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, November 17, 2021 11:49 AM
To: Jerin Jacob <[email protected]>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow controlQuoted 10 lines · On Tue, Oct 5, 2021 at 6:32 PM <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
rte_eth_dev_priority_flow_ctrl_set() based API is not generic as it
can not support other than VLAN priority mapping to PFC traffic class.Introducing RTE_FLOW_ACTION_TYPE_PFC_SET_TC rte_flow action to
set the traffic class as per 802.1Qbb specification. This will enable,
Traffic class(8bit) to be selected based on any packet field like DSCP.Quoted 6 lines
Quoted 4 lines
Also, making it as rte_flow action will enable fine control on
traffic class selection to a specific queue or VF etc.Signed-off-by: Jerin Jacob <[email protected]>
Ping. If there are no comments on RFC, Planning to send v1 for 22.02.
All the set type of functions are going to be deprecated. you should use
RTE_FLOW_ACTION_TYPE_MODIFY_FIELD.What is the item that you are matching on when using
rte_flow? Is it part of the tci in thevlan
Quoted 77 lines
Quoted 77 lines
Quoted 19 lines
Quoted 9 lines
item?
Quoted 8 lines
Quoted 7 lines
TC can be VLAN TCI field or DSCP field in IP header or any other field in packet.
We need to set the traffic class as per 802.1Qbb specification, May I know how the "modify"
attribute helps here. It should be a "set" operation. Right?Quoted 9 lines
Quoted 2 lines
Yes, in the
rte_flow_action_modify_fieldthere is what operation you want to do, in this case the action should be set.But
RTE_FLOW_ACTION_TYPE_MODIFY_FIELDused for modify the packet content[1]. RIght?
In this case, it is more of sideband data not anything on packet content. If so, explicit action
makes sense. Right?Quoted 7 lines
It looks like I'm missing something,
If you don't want to change the packet and this is just data, why not use tag/mark/flag/metadata?Who should get this data?
If the packet is hairpined and the packet is sent to wire this info should be part of the packet right?No. Here is what I envisioned for working this,
User add riles like this.Patten: VLAN TCI is value X or DSCP value Y
Action:RTE_FLOW_ACTION_TYPE_PFC_SET_TCwith an value for TC(8bit defined in 802.1Qbb)
Driver use this rule to enable TC (flow control) with that value for the given VLAN TCI == Xtag/mark/flag/metadata used to embed something in mbuf. Here, This action establishes, For a given
flow what TC value needs to be enabled(it does not need to be given in mbuf or packet for application to use).
It just establishes the TC wiring for flow control enablement for a given pattern.
Is it adding up?Quoted 10 lines
Quoted 10 lines
[1]
*RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
*
* Modify a destination header field according to the specified
* operation. Another field of the packet can be used as a source as well
* as tag, mark, metadata, immediate value or a pointer to it.Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
I assume that you are trying to set the VLAN tag priority field right?
Both VLAN tag and/or DSCP field.
Going back to the above comment so you are changing something in the packet.
No. See above.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
---
Planning to submit the testpmd and cnxk ethdev driver changes after receiving
the feedback on this.Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++
lib/ethdev/rte_flow.c | 1 +
lib/ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++
3 files changed, 52 insertions(+)diff --git a/doc/guides/prog_guide/rte_flow.rst
b/doc/guides/prog_guide/rte_flow.rstQuoted 59 lines
Quoted 59 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
index 2b42d5ec8c..e59f8a2902 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -2999,6 +2999,30 @@ which is set in the packet meta-data (i.e. struct``rte_mbuf::sched::color``)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
| ``meter_color`` | Packet color |
+-----------------+--------------++Action: ``PFC_SET_TC``
+^^^^^^^^^^^^^^^^^^^^^^
+
+Set traffic class as per PFC (802.1Qbb) specification.
+
+This action must be used with any of the following action.
+
+- ``RTE_FLOW_ACTION_TYPE_QUEUE``
+- ``RTE_FLOW_ACTION_TYPE_RSS``Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
+- ``RTE_FLOW_ACTION_TYPE_PF``
+- ``RTE_FLOW_ACTION_TYPE_VF``
+- ``RTE_FLOW_ACTION_TYPE_PHY_PORT``
+- ``RTE_FLOW_ACTION_TYPE_PORT_ID``
+Why? All the above actions are terminating actions so if I want ot match on the value it doesn't make sense to have it only on the last rule.
In PFC, we are specifying, Given TC needs to steer to specific Queue, RSS, PF etc.
Not sure how other actions are relevant forSET_TCaction. Do you have any specific action in mind whereSET_TCvalid in addition to above actionsQuoted 8 lines
Quoted 6 lines
Quoted 1 line
First what happens in case of egress traffic? There is no dest action.
It will be invalid. I can change the documentation to specify egress direction is not valid.
Thoughts?Why not? Isn't it possible that application will want to send some packet with this value?
This is Rx Flow control(8bit TC value defined in 802.1Qbb), Not relevant when using on Tx.
Quoted 16 lines
Quoted 15 lines
Quoted 4 lines
Second what happens if for example the priority is based on the outer tunnel which I want decap and at a latter stage I want to do connection tracking and only if everything is correct I want to send this packet to a queue?
Which is fine with the current scheme of things as per the documentation, "This action must be used with any of the following action." it does not preclude to
use of any other action. If it is not clear, we can reword like below,
---
This action must be used with any of the following action and not limited to using any of other actions in conjunction with the following action.
---
Thoughts?Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Like stated above I can see use case where you want to set this value at the start of the pipe and then based on this value act.
For example:
1. decap the packet and based on the tunnel set this value and jump to connection trackinggroup.
Quoted 30 lines
Quoted 30 lines
Quoted 2 lines
2. run connection tracking and jump to next table
3. Based on the connection tracking and the TC value send to some queue.Yes. It is possible to have decap + connection tracking +
RTE_FLOW_ACTION_TYPE_PFC_SET_TC+ [RTE_FLOW_ACTION_TYPE_QUEUEorRTE_FLOW_ACTION_TYPE_RSSorRTE_FLOW_ACTION_TYPE_PForRTE_FLOW_ACTION_TYPE_VForRTE_FLOW_ACTION_TYPE_PHY_PORTorRTE_FLOW_ACTION_TYPE_PORT_ID] cascaded actions.Quoted 20 lines
Best,
OriQuoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
+.. _table_rte_flow_action_pfc_set_tc:
+
+.. table:: PFC_SET_PRIORITY
+
+ +-----------------+-------------------------------------+
+ | Field | Value |
+ +=================+=====================================+
+ | ``tc`` | Traffic class as per PFC (802.1Qbb) |
+ +-----------------+-------------------------------------+
+
Negative types
~~~~~~~~~~~~~~Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 8cb7a069c8..75c661159e 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -189,6 +189,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[]= {
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
*/
MK_FLOW_ACTION(INDIRECT, 0),
MK_FLOW_ACTION(CONNTRACK, sizeof(struct rte_flow_action_conntrack)),
+ MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_flow_action_pfc_set_tc)),
};int
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 7b1ed7f110..5298418e9e 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -2409,6 +2409,13 @@ enum rte_flow_action_type {
* See struct rte_flow_action_meter_color.
*/
RTE_FLOW_ACTION_TYPE_METER_COLOR,
+
+ /**
+ * Set traffic class as per PFC (802.1Qbb) specification.
+ *
+ * See struct rte_flow_action_pfc_set_tc.
+ */
+ RTE_FLOW_ACTION_TYPE_PFC_SET_TC,
};/**
@@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_color {
enum rte_color color; /**< Packet color. */
};+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ACTION_TYPE_PFC_SET_TC
+ *
+ * Set traffic class as per PFC (802.1Qbb) specification.
+ *
+ * This action must be used any of the following action.
+ * - RTE_FLOW_ACTION_TYPE_QUEUE,Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
+ * - RTE_FLOW_ACTION_TYPE_RSS,
+ * - RTE_FLOW_ACTION_TYPE_PF,
+ * - RTE_FLOW_ACTION_TYPE_VF,
+ * - RTE_FLOW_ACTION_TYPE_PHY_PORT,
+ * - RTE_FLOW_ACTION_TYPE_PORT_ID
+ */What does it mean? I must use it only on rules that have one of the above actions?
See above.
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
+struct rte_flow_action_pfc_set_tc {
+ uint8_t tc; /**< Traffic class as per PFC (802.1Qbb) specification */
+};
+
/**
* Field IDs for MODIFY_FIELD action.
*/
--
2.33.0Best,
Ori