net/mlx5: add indirect encap decap support
PATCH 1/1 net/mlx5: add indirect encap decap support
Support the raw_encap/decap combinations in the indirect action list, and translates to 4 types of underlayer tunnel operations:
1. Layer 2 encapsulation like VxLAN.
2. Layer 2 decapsulation like VxLAN.
3. Layer 3 encapsulation like GRE.
4. Layer 3 decapsulation like GRE.
Each indirect action list has a unique handle ID and stands for different tunnel operations. The operation is shared globally with fixed patterns. It means there is no configuration associated with each handle ID and conf pointer should be NULL always no matter in the action template or flow rules.
If the handle ID mask in the action template is NULL, each flow rule can take its own indirect handle, otherwise, the ID in action template is used for all rules.
The handle ID used in the flow rules must be the same type as the one in the action template.
Testpmd cli example:
flow indirect_action 0 create action_id 10 transfer list actions raw_decap index 1 / raw_encap index 2 / end
flow pattern_template 0 create transfer pattern_template_id 1 template eth / ipv4 / udp / end
flow actions_template 0 create transfer actions_template_id 1 template indirect_list handle 10 / jump / end mask indirect_list / jump / end
flow template_table 0 create table_id 1 group 1 priority 0 transfer rules_number 64 pattern_template 1 actions_template 1
flow queue 0 create 0 template_table 1 pattern_template 0 actions_template 0 postpone no pattern eth / ipv4 / udp / end actions indirect_list handle 11 / jump group 10 / end
Depends on the preceding series:
https://inbox.dpdk.org/dev/[email protected]/
--- drivers/net/mlx5/mlx5_flow.c | 5 + drivers/net/mlx5/mlx5_flow.h | 15 ++ drivers/net/mlx5/mlx5_flow_hw.c | 323 ++++++++++++++++++++++++++++++++ 3 files changed, 343 insertions(+)
drivers/net/mlx5/mlx5_flow.c +5 -0
@@ -66,6 +66,7 @@ void mlx5_indirect_list_handles_release(struct rte_eth_dev *dev) {struct mlx5_priv *priv = dev->data->dev_private; +struct rte_flow_error error;while (!LIST_EMPTY (&priv->indirect_list_head)) { struct mlx5_indirect_list *e =
@@ -80,6 +81,10 @@ mlx5_indirect_list_handles_release(struct rte_eth_dev *dev)case MLX5_INDIRECT_ACTION_LIST_TYPE_LEGACY :mlx5_destroy_legacy_indirect (dev, e);break ; +case MLX5_INDIRECT_ACTION_LIST_TYPE_REFORMAT : +mlx5_reformat_action_destroy (dev, + (struct rte_flow_action_list_handle *)e, &error); +break ;#endif default :DRV_LOG (ERR ,"invalid indirect list type" );
drivers/net/mlx5/mlx5_flow.h +15 -0
@@ -101,6 +101,7 @@ enum mlx5_indirect_list_type {MLX5_INDIRECT_ACTION_LIST_TYPE_ERR =0 ,MLX5_INDIRECT_ACTION_LIST_TYPE_LEGACY =1 ,MLX5_INDIRECT_ACTION_LIST_TYPE_MIRROR =2 , + MLX5_INDIRECT_ACTION_LIST_TYPE_REFORMAT = 3, };/**
@@ -1367,6 +1368,8 @@ struct mlx5_hw_jump_action {/* Encap decap action struct. */ struct mlx5_hw_encap_decap_action { +struct mlx5_indirect_list indirect; +enum mlx5dr_action_type action_type;struct mlx5dr_action *action;/* Action object. */ /* Is header_reformat action shared across flows in table. */ bool shared;
@@ -2427,6 +2430,15 @@ const struct rte_flow_action *mlx5_flow_find_actionint mlx5_validate_action_rss (struct rte_eth_dev *dev,const struct rte_flow_action *action,struct rte_flow_error *error); +struct mlx5_hw_encap_decap_action * +mlx5_reformat_action_create (struct rte_eth_dev *dev, +const struct rte_flow_indir_action_conf *conf, +const struct rte_flow_action *encap_action, +const struct rte_flow_action *decap_action, +struct rte_flow_error *error); +int mlx5_reformat_action_destroy (struct rte_eth_dev *dev, +struct rte_flow_action_list_handle *handle, +struct rte_flow_error *error);int mlx5_flow_validate_action_count (struct rte_eth_dev *dev,const struct rte_flow_attr *attr,struct rte_flow_error *error);
@@ -2860,5 +2872,8 @@ mlx5_hw_mirror_destroy(struct rte_eth_dev *dev, struct mlx5_mirror *mirror);void mlx5_destroy_legacy_indirect (struct rte_eth_dev *dev,struct mlx5_indirect_list *ptr); +void +mlx5_hw_decap_encap_destroy (struct rte_eth_dev *dev, +struct mlx5_indirect_list *reformat);#endif #endif /* RTE_PMD_MLX5_FLOW_H_ */
drivers/net/mlx5/mlx5_flow_hw.c +323 -0
375 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v2 1/1 net/mlx5: add indirect encap decap support
Support the raw_encap/decap combinations in the indirect action list, and translates to 4 types of underlayer tunnel operations:
1. Layer 2 encapsulation like VxLAN.
2. Layer 2 decapsulation like VxLAN.
3. Layer 3 encapsulation like GRE.
4. Layer 3 decapsulation like GRE.
Each indirect action list has a unique handle ID and stands for different tunnel operations. The operation is shared globally with fixed patterns. It means there is no configuration associated with each handle ID and conf pointer should be NULL always no matter in the action template or flow rules.
If the handle ID mask in the action template is NULL, each flow rule can take its own indirect handle, otherwise, the ID in action template is used for all rules.
The handle ID used in the flow rules must be the same type as the one in the action template.
Testpmd cli example:
flow indirect_action 0 create action_id 10 transfer list actions raw_decap index 1 / raw_encap index 2 / end
flow pattern_template 0 create transfer pattern_template_id 1 template eth / ipv4 / udp / end
flow actions_template 0 create transfer actions_template_id 1 template indirect_list handle 10 / jump / end mask indirect_list / jump / end
flow template_table 0 create table_id 1 group 1 priority 0 transfer rules_number 64 pattern_template 1 actions_template 1
flow queue 0 create 0 template_table 1 pattern_template 0 actions_template 0 postpone no pattern eth / ipv4 / udp / end actions indirect_list handle 11 / jump group 10 / end
v2: Code rebase
--- drivers/net/mlx5/mlx5_flow.c | 5 + drivers/net/mlx5/mlx5_flow.h | 16 ++ drivers/net/mlx5/mlx5_flow_hw.c | 323 ++++++++++++++++++++++++++++++++ 3 files changed, 344 insertions(+)
drivers/net/mlx5/mlx5_flow.c +5 -0
@@ -66,6 +66,7 @@ void mlx5_indirect_list_handles_release(struct rte_eth_dev *dev) {struct mlx5_priv *priv = dev->data->dev_private; +struct rte_flow_error error;while (!LIST_EMPTY (&priv->indirect_list_head)) { struct mlx5_indirect_list *e =
@@ -80,6 +81,10 @@ mlx5_indirect_list_handles_release(struct rte_eth_dev *dev)case MLX5_INDIRECT_ACTION_LIST_TYPE_LEGACY :mlx5_destroy_legacy_indirect (dev, e);break ; +case MLX5_INDIRECT_ACTION_LIST_TYPE_REFORMAT : +mlx5_reformat_action_destroy (dev, + (struct rte_flow_action_list_handle *)e, &error); +break ;#endif default :DRV_LOG (ERR ,"invalid indirect list type" );
drivers/net/mlx5/mlx5_flow.h +16 -0
@@ -101,6 +101,7 @@ enum mlx5_indirect_list_type {MLX5_INDIRECT_ACTION_LIST_TYPE_ERR =0 ,MLX5_INDIRECT_ACTION_LIST_TYPE_LEGACY =1 ,MLX5_INDIRECT_ACTION_LIST_TYPE_MIRROR =2 , + MLX5_INDIRECT_ACTION_LIST_TYPE_REFORMAT = 3, };/**
@@ -1366,6 +1367,8 @@ struct mlx5_hw_jump_action {/* Encap decap action struct. */ struct mlx5_hw_encap_decap_action { +struct mlx5_indirect_list indirect; +enum mlx5dr_action_type action_type;struct mlx5dr_action *action;/* Action object. */ /* Is header_reformat action shared across flows in table. */ bool shared;
@@ -2426,6 +2429,16 @@ const struct rte_flow_action *mlx5_flow_find_actionint mlx5_validate_action_rss (struct rte_eth_dev *dev,const struct rte_flow_action *action,struct rte_flow_error *error); + +struct mlx5_hw_encap_decap_action * +mlx5_reformat_action_create (struct rte_eth_dev *dev, +const struct rte_flow_indir_action_conf *conf, +const struct rte_flow_action *encap_action, +const struct rte_flow_action *decap_action, +struct rte_flow_error *error); +int mlx5_reformat_action_destroy (struct rte_eth_dev *dev, +struct rte_flow_action_list_handle *handle, +struct rte_flow_error *error);int mlx5_flow_validate_action_count (struct rte_eth_dev *dev,const struct rte_flow_attr *attr,struct rte_flow_error *error);
@@ -2859,5 +2872,8 @@ mlx5_hw_mirror_destroy(struct rte_eth_dev *dev, struct mlx5_mirror *mirror);void mlx5_destroy_legacy_indirect (struct rte_eth_dev *dev,struct mlx5_indirect_list *ptr); +void +mlx5_hw_decap_encap_destroy (struct rte_eth_dev *dev, +struct mlx5_indirect_list *reformat);#endif #endif /* RTE_PMD_MLX5_FLOW_H_ */
drivers/net/mlx5/mlx5_flow_hw.c +323 -0
375 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v3 1/1 net/mlx5: add indirect encap decap support
Support the raw_encap/decap combinations in the indirect action list, and translates to 4 types of underlayer tunnel operations:
1. Layer 2 encapsulation like VxLAN.
2. Layer 2 decapsulation like VxLAN.
3. Layer 3 encapsulation like GRE.
4. Layer 3 decapsulation like GRE.
Each indirect action list has a unique handle ID and stands for different tunnel operations. The operation is shared globally with fixed patterns. It means there is no configuration associated with each handle ID and conf pointer should be NULL always no matter in the action template or flow rules.
If the handle ID mask in the action template is NULL, each flow rule can take its own indirect handle, otherwise, the ID in action template is used for all rules.
The handle ID used in the flow rules must be the same type as the one in the action template.
Testpmd cli example:
flow indirect_action 0 create action_id 10 transfer list actions raw_decap index 1 / raw_encap index 2 / end
flow pattern_template 0 create transfer pattern_template_id 1 template eth / ipv4 / udp / end
flow actions_template 0 create transfer actions_template_id 1 template indirect_list handle 10 / jump / end mask indirect_list / jump / end
flow template_table 0 create table_id 1 group 1 priority 0 transfer rules_number 64 pattern_template 1 actions_template 1
flow queue 0 create 0 template_table 1 pattern_template 0 actions_template 0 postpone no pattern eth / ipv4 / udp / end actions indirect_list handle 11 / jump group 10 / end
v3: Protect with macro to fix warning.
v2: Code rebase
--- drivers/net/mlx5/mlx5_flow.c | 5 + drivers/net/mlx5/mlx5_flow.h | 16 ++ drivers/net/mlx5/mlx5_flow_hw.c | 323 ++++++++++++++++++++++++++++++++ 3 files changed, 344 insertions(+)
drivers/net/mlx5/mlx5_flow.c +5 -0
@@ -66,6 +66,7 @@ void mlx5_indirect_list_handles_release(struct rte_eth_dev *dev) {struct mlx5_priv *priv = dev->data->dev_private; +struct rte_flow_error error;while (!LIST_EMPTY (&priv->indirect_list_head)) { struct mlx5_indirect_list *e =
@@ -80,6 +81,10 @@ mlx5_indirect_list_handles_release(struct rte_eth_dev *dev)case MLX5_INDIRECT_ACTION_LIST_TYPE_LEGACY :mlx5_destroy_legacy_indirect (dev, e);break ; +case MLX5_INDIRECT_ACTION_LIST_TYPE_REFORMAT : +mlx5_reformat_action_destroy (dev, + (struct rte_flow_action_list_handle *)e, &error); +break ;#endif default :DRV_LOG (ERR ,"invalid indirect list type" );
drivers/net/mlx5/mlx5_flow.h +16 -0
@@ -101,6 +101,7 @@ enum mlx5_indirect_list_type {MLX5_INDIRECT_ACTION_LIST_TYPE_ERR =0 ,MLX5_INDIRECT_ACTION_LIST_TYPE_LEGACY =1 ,MLX5_INDIRECT_ACTION_LIST_TYPE_MIRROR =2 , + MLX5_INDIRECT_ACTION_LIST_TYPE_REFORMAT = 3, };/**
@@ -1366,6 +1367,8 @@ struct mlx5_hw_jump_action {/* Encap decap action struct. */ struct mlx5_hw_encap_decap_action { +struct mlx5_indirect_list indirect; +enum mlx5dr_action_type action_type;struct mlx5dr_action *action;/* Action object. */ /* Is header_reformat action shared across flows in table. */ bool shared;
@@ -2426,6 +2429,16 @@ const struct rte_flow_action *mlx5_flow_find_actionint mlx5_validate_action_rss (struct rte_eth_dev *dev,const struct rte_flow_action *action,struct rte_flow_error *error); + +struct mlx5_hw_encap_decap_action * +mlx5_reformat_action_create (struct rte_eth_dev *dev, +const struct rte_flow_indir_action_conf *conf, +const struct rte_flow_action *encap_action, +const struct rte_flow_action *decap_action, +struct rte_flow_error *error); +int mlx5_reformat_action_destroy (struct rte_eth_dev *dev, +struct rte_flow_action_list_handle *handle, +struct rte_flow_error *error);int mlx5_flow_validate_action_count (struct rte_eth_dev *dev,const struct rte_flow_attr *attr,struct rte_flow_error *error);
@@ -2859,5 +2872,8 @@ mlx5_hw_mirror_destroy(struct rte_eth_dev *dev, struct mlx5_mirror *mirror);void mlx5_destroy_legacy_indirect (struct rte_eth_dev *dev,struct mlx5_indirect_list *ptr); +void +mlx5_hw_decap_encap_destroy (struct rte_eth_dev *dev, +struct mlx5_indirect_list *reformat);#endif #endif /* RTE_PMD_MLX5_FLOW_H_ */
drivers/net/mlx5/mlx5_flow_hw.c +323 -0
375 lines not on this page · raw message
Signature · 1 line
2.27.0
Hi,
Quoted 44 lines
-----Original Message-----
From: Rongwei Liu <[email protected]>
Sent: Sunday, October 29, 2023 2:54 PM
To: [email protected]; Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>
Subject: [PATCH v3] net/mlx5: add indirect encap decap supportSupport the raw_encap/decap combinations in the indirect action list, and translates to 4 types of underlayer tunnel operations:
1. Layer 2 encapsulation like VxLAN.
2. Layer 2 decapsulation like VxLAN.
3. Layer 3 encapsulation like GRE.
4. Layer 3 decapsulation like GRE.Each indirect action list has a unique handle ID and stands for different tunnel operations. The operation is shared globally with fixed patterns. It means there is no configuration associated with each handle ID and conf pointer should be NULL always no matter in the action template or flow rules.
If the handle ID mask in the action template is NULL, each flow rule can take its own indirect handle, otherwise, the ID in action template is used for all rules. The handle ID used in the flow rules must be the same type as the one in the action template.
Testpmd cli example:
flow
indirect_action0 createaction_id10 transfer list actionsraw_decapindex 1 /raw_encapindex 2 / endflow
pattern_template0 create transferpattern_template_id1 template eth / ipv4 / udp / endflow
actions_template0 create transferactions_template_id1 templateindirect_listhandle 10 / jump / end maskindirect_list/ jump / endflow
template_table0 createtable_id1 group 1 priority 0 transferrules_number64pattern_template1actions_template1flow queue 0 create 0
template_table1pattern_template0actions_template0 postpone no pattern eth / ipv4 / udp / end actionsindirect_listhandle 11 / jump group 10 / end
Quoted 6 lines
Signed-off-by Rongwei Liu <[email protected]>Acked-by Ori Kam <[email protected]>Acked-by Suanming Mou <[email protected]>v3: Protect with macro to fix warning.
v2: Code rebase
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
It has a compilation issue,
@Rongwei Liu please lets fix it I missed it before integration
Quoted 71 lines
-----Original Message-----
From: Raslan Darawsheh
Sent: Sunday, October 29, 2023 4:33 PM
To: Rongwei Liu <[email protected]>; [email protected]; Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; NBU- Contact-Thomas Monjalon (EXTERNAL) <[email protected]>
Subject: RE: [PATCH v3] net/mlx5: add indirect encap decap supportHi,
Quoted 16 lines
-----Original Message-----
From: Rongwei Liu <[email protected]>
Sent: Sunday, October 29, 2023 2:54 PM
To: [email protected]; Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>
Subject: [PATCH v3] net/mlx5: add indirect encap decap supportSupport the raw_encap/decap combinations in the indirect action list, and translates to 4 types of underlayer tunnel operations:
1. Layer 2 encapsulation like VxLAN.
2. Layer 2 decapsulation like VxLAN.
3. Layer 3 encapsulation like GRE.
4. Layer 3 decapsulation like GRE.Quoted 4 lines
Each indirect action list has a unique handle ID and stands for different tunnel operations. The operation is shared globally with fixed patterns. It means there is no configuration associated with each handle ID and conf pointer should be NULL always no matter in the
action template or flow rules.
Quoted 3 lines
If the handle ID mask in the action template is NULL, each flow rule can take its own indirect handle, otherwise, the ID in action template is used
for all rules.
Quoted 24 lines
The handle ID used in the flow rules must be the same type as the one in the action template.
Testpmd cli example:
flow
indirect_action0 createaction_id10 transfer list actionsraw_decapindex
1 /raw_encapindex 2 / endflow
pattern_template0 create transferpattern_template_id1 template eth /
ipv4 / udp / endflow
actions_template0 create transferactions_template_id1 templateindirect_listhandle 10 / jump / end maskindirect_list/ jump / endflow
template_table0 createtable_id1 group 1 priority 0 transferrules_number64pattern_template1actions_template1flow queue 0 create 0
template_table1pattern_template0actions_template
0 postpone no pattern eth / ipv4 / udp / end actionsindirect_listhandle 11 / jump group 10 / endQuoted 6 lines
Signed-off-by Rongwei Liu <[email protected]>Acked-by Ori Kam <[email protected]>Acked-by Suanming Mou <[email protected]>v3: Protect with macro to fix warning.
v2: Code rebasePatch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
PATCH v4 1/1 net/mlx5: add indirect encap decap support
In reply to Rongwei LiuSupport the raw_encap/decap combinations in the indirect action list, and translates to 4 types of underlayer tunnel operations:
1. Layer 2 encapsulation like VxLAN.
2. Layer 2 decapsulation like VxLAN.
3. Layer 3 encapsulation like GRE.
4. Layer 3 decapsulation like GRE.
Each indirect action list has a unique handle ID and stands for different tunnel operations. The operation is shared globally with fixed patterns. It means there is no configuration associated with each handle ID and conf pointer should be NULL always no matter in the action template or flow rules.
If the handle ID mask in the action template is NULL, each flow rule can take its own indirect handle, otherwise, the ID in action template is used for all rules.
The handle ID used in the flow rules must be the same type as the one in the action template.
Testpmd cli example:
flow indirect_action 0 create action_id 10 transfer list actions raw_decap index 1 / raw_encap index 2 / end
flow pattern_template 0 create transfer pattern_template_id 1 template eth / ipv4 / udp / end
flow actions_template 0 create transfer actions_template_id 1 template indirect_list handle 10 / jump / end mask indirect_list / jump / end
flow template_table 0 create table_id 1 group 1 priority 0 transfer rules_number 64 pattern_template 1 actions_template 1
flow queue 0 create 0 template_table 1 pattern_template 0 actions_template 0 postpone no pattern eth / ipv4 / udp / end actions indirect_list handle 11 / jump group 10 / end
v4, v3: add macro to fix build failure
v2: rebase
--- drivers/net/mlx5/mlx5_flow.c | 7 + drivers/net/mlx5/mlx5_flow.h | 16 ++ drivers/net/mlx5/mlx5_flow_hw.c | 323 ++++++++++++++++++++++++++++++++ 3 files changed, 346 insertions(+)
drivers/net/mlx5/mlx5_flow.c +7 -0
@@ -66,6 +66,9 @@ void mlx5_indirect_list_handles_release(struct rte_eth_dev *dev) {struct mlx5_priv *priv = dev->data->dev_private; +#ifdef HAVE_MLX5_HWS_SUPPORT +struct rte_flow_error error; +#endif while (!LIST_EMPTY (&priv->indirect_list_head)) { struct mlx5_indirect_list *e =
@@ -80,6 +83,10 @@ mlx5_indirect_list_handles_release(struct rte_eth_dev *dev)case MLX5_INDIRECT_ACTION_LIST_TYPE_LEGACY :mlx5_destroy_legacy_indirect (dev, e);break ; +case MLX5_INDIRECT_ACTION_LIST_TYPE_REFORMAT : +mlx5_reformat_action_destroy (dev, + (struct rte_flow_action_list_handle *)e, &error); +break ;#endif default :DRV_LOG (ERR ,"invalid indirect list type" );
drivers/net/mlx5/mlx5_flow.h +16 -0
@@ -101,6 +101,7 @@ enum mlx5_indirect_list_type {MLX5_INDIRECT_ACTION_LIST_TYPE_ERR =0 ,MLX5_INDIRECT_ACTION_LIST_TYPE_LEGACY =1 ,MLX5_INDIRECT_ACTION_LIST_TYPE_MIRROR =2 , + MLX5_INDIRECT_ACTION_LIST_TYPE_REFORMAT = 3, };/**
@@ -1366,6 +1367,8 @@ struct mlx5_hw_jump_action {/* Encap decap action struct. */ struct mlx5_hw_encap_decap_action { +struct mlx5_indirect_list indirect; +enum mlx5dr_action_type action_type;struct mlx5dr_action *action;/* Action object. */ /* Is header_reformat action shared across flows in table. */ bool shared;
@@ -2426,6 +2429,16 @@ const struct rte_flow_action *mlx5_flow_find_actionint mlx5_validate_action_rss (struct rte_eth_dev *dev,const struct rte_flow_action *action,struct rte_flow_error *error); + +struct mlx5_hw_encap_decap_action * +mlx5_reformat_action_create (struct rte_eth_dev *dev, +const struct rte_flow_indir_action_conf *conf, +const struct rte_flow_action *encap_action, +const struct rte_flow_action *decap_action, +struct rte_flow_error *error); +int mlx5_reformat_action_destroy (struct rte_eth_dev *dev, +struct rte_flow_action_list_handle *handle, +struct rte_flow_error *error);int mlx5_flow_validate_action_count (struct rte_eth_dev *dev,const struct rte_flow_attr *attr,struct rte_flow_error *error);
@@ -2859,5 +2872,8 @@ mlx5_hw_mirror_destroy(struct rte_eth_dev *dev, struct mlx5_mirror *mirror);void mlx5_destroy_legacy_indirect (struct rte_eth_dev *dev,struct mlx5_indirect_list *ptr); +void +mlx5_hw_decap_encap_destroy (struct rte_eth_dev *dev, +struct mlx5_indirect_list *reformat);#endif #endif /* RTE_PMD_MLX5_FLOW_H_ */
drivers/net/mlx5/mlx5_flow_hw.c +323 -0
375 lines not on this page · raw message
Signature · 1 line
2.27.0
Hi,
Quoted 44 lines
-----Original Message-----
From: Rongwei Liu <[email protected]>
Sent: Sunday, October 29, 2023 5:30 PM
To: [email protected]; Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>
Subject: [PATCH v4] net/mlx5: add indirect encap decap supportSupport the raw_encap/decap combinations in the indirect action list, and translates to 4 types of underlayer tunnel operations:
1. Layer 2 encapsulation like VxLAN.
2. Layer 2 decapsulation like VxLAN.
3. Layer 3 encapsulation like GRE.
4. Layer 3 decapsulation like GRE.Each indirect action list has a unique handle ID and stands for different tunnel operations. The operation is shared globally with fixed patterns. It means there is no configuration associated with each handle ID and conf pointer should be NULL always no matter in the action template or flow rules.
If the handle ID mask in the action template is NULL, each flow rule can take its own indirect handle, otherwise, the ID in action template is used for all rules. The handle ID used in the flow rules must be the same type as the one in the action template.
Testpmd cli example:
flow
indirect_action0 createaction_id10 transfer list actionsraw_decapindex 1 /raw_encapindex 2 / endflow
pattern_template0 create transferpattern_template_id1 template eth / ipv4 / udp / endflow
actions_template0 create transferactions_template_id1 templateindirect_listhandle 10 / jump / end maskindirect_list/ jump / endflow
template_table0 createtable_id1 group 1 priority 0 transferrules_number64pattern_template1actions_template1flow queue 0 create 0
template_table1pattern_template0actions_template0 postpone no pattern eth / ipv4 / udp / end actionsindirect_listhandle 11 / jump group 10 / end
Quoted 6 lines
Signed-off-by Rongwei Liu <[email protected]>Acked-by Ori Kam <[email protected]>Acked-by Suanming Mou <[email protected]>v4, v3: add macro to fix build failure
v2: rebase
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh