app/testpmd: add tunnel types
PATCH 1/2 app/testpmd: add tunnel types
Current testpmd implementation supports VXLAN only for tunnel offload. Add GRE, NVGRE and GENEVE for tunnel offload flow matches.
--- app/test-pmd/config.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
app/test-pmd/config.c +15 -0
@@ -1212,6 +1212,15 @@ port_flow_tunnel_type(struct rte_flow_tunnel *tunnel)case RTE_FLOW_ITEM_TYPE_VXLAN : type ="vxlan" ;break ; +case RTE_FLOW_ITEM_TYPE_GRE : + type ="gre" ; +break ; +case RTE_FLOW_ITEM_TYPE_NVGRE : + type ="nvgre" ; +break ; +case RTE_FLOW_ITEM_TYPE_GENEVE : + type ="geneve" ; +break ; }return type;
@@ -1272,6 +1281,12 @@ void port_flow_tunnel_create(portid_t port_id, const struct tunnel_ops *ops)if (!strcmp (ops->type,"vxlan" )) type =RTE_FLOW_ITEM_TYPE_VXLAN ; +else if (!strcmp (ops->type,"gre" )) + type =RTE_FLOW_ITEM_TYPE_GRE ; +else if (!strcmp (ops->type,"nvgre" )) + type =RTE_FLOW_ITEM_TYPE_NVGRE ; +else if (!strcmp (ops->type,"geneve" )) + type =RTE_FLOW_ITEM_TYPE_GENEVE ;else {fprintf (stderr,"cannot offload \"%s\" tunnel type\n" , ops->type);
Signature · 1 line
2.28.0.2311.g225365fb51
PATCH 2/2 net/mlx5: add support for more tunnel types
Accept RTE_FLOW_ITEM_TYPE_GRE, RTE_FLOW_ITEM_TYPE_NVGRE and RTE_FLOW_ITEM_TYPE_GENEVE as valid tunnel types.
--- drivers/net/mlx5/mlx5_flow.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/mlx5/mlx5_flow.c +3 -0
@@ -9099,6 +9099,9 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev, err_msg ="unsupported tunnel type" ; goto out;case RTE_FLOW_ITEM_TYPE_VXLAN : +case RTE_FLOW_ITEM_TYPE_GRE : +case RTE_FLOW_ITEM_TYPE_NVGRE : +case RTE_FLOW_ITEM_TYPE_GENEVE :break ; }
Signature · 1 line
2.28.0.2311.g225365fb51
Re: [dpdk-dev] [PATCH 2/2] net/mlx5: add support for more tunnel types
Quoted 9 lines
-----Original Message-----
From: Eli Britstein <[email protected]>
Sent: Monday, September 13, 2021 17:26
To: [email protected]
Cc: [email protected]; Matan Azrad <[email protected]>; Shahaf Shuler <[email protected]>; Slava Ovsiienko <[email protected]>; Gregory Etelson <[email protected]>; Eli Britstein <[email protected]>
Subject: [PATCH 2/2] net/mlx5: add support for more tunnel types
Quoted 4 lines
Accept
RTE_FLOW_ITEM_TYPE_GRE,RTE_FLOW_ITEM_TYPE_NVGREandRTE_FLOW_ITEM_TYPE_GENEVEas valid tunnel types.Signed-off-by Eli Britstein <[email protected]>
Quoted 3 lines · Eli Britstein
Current testpmd implementation supports VXLAN only for tunnel offload. Add GRE, NVGRE and GENEVE for tunnel offload flow matches.
Hi Eli,
I assume tunnel types are added, but forgot to add the flow tunnel support for them, so this patch is fixing it. If so can you please add the fixes commits?
Also it may help to give a sample of the enabled commands in the commit log, to record.
Thanks,
ferruh
Quoted 39 lines
Signed-off-by Eli Britstein <[email protected]>--- app/test-pmd/config.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)app/test-pmd/config.c +15
-0@@ -1212,6 +1212,15 @@ port_flow_tunnel_type(struct rte_flow_tunnel *tunnel)case RTE_FLOW_ITEM_TYPE_VXLAN : type ="vxlan" ;break ; +case RTE_FLOW_ITEM_TYPE_GRE : + type ="gre" ; +break ; +case RTE_FLOW_ITEM_TYPE_NVGRE : + type ="nvgre" ; +break ; +case RTE_FLOW_ITEM_TYPE_GENEVE : + type ="geneve" ; +break ; }return type;@@ -1272,6 +1281,12 @@ void port_flow_tunnel_create(portid_t port_id, const struct tunnel_ops *ops)if (!strcmp (ops->type,"vxlan" )) type =RTE_FLOW_ITEM_TYPE_VXLAN ; +else if (!strcmp (ops->type,"gre" )) + type =RTE_FLOW_ITEM_TYPE_GRE ; +else if (!strcmp (ops->type,"nvgre" )) + type =RTE_FLOW_ITEM_TYPE_NVGRE ; +else if (!strcmp (ops->type,"geneve" )) + type =RTE_FLOW_ITEM_TYPE_GENEVE ;else {fprintf (stderr,"cannot offload \"%s\" tunnel type\n" , ops->type);
PATCH v2 1/2 app/testpmd: add tunnel types
Current testpmd implementation supports VXLAN only for tunnel offload. Add GRE, NVGRE and GENEVE for tunnel offload flow matches.
For example:
testpmd> flow tunnel create 0 type vxlan
port 0: flow tunnel #1 type vxlan
testpmd> flow tunnel create 0 type nvgre
port 0: flow tunnel #2 type nvgre
testpmd> flow tunnel create 0 type gre
port 0: flow tunnel #3 type gre
testpmd> flow tunnel create 0 type geneve
port 0: flow tunnel #4 type geneve
--- app/test-pmd/config.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
app/test-pmd/config.c +15 -0
@@ -1210,6 +1210,15 @@ port_flow_tunnel_type(struct rte_flow_tunnel *tunnel)case RTE_FLOW_ITEM_TYPE_VXLAN : type ="vxlan" ;break ; +case RTE_FLOW_ITEM_TYPE_GRE : + type ="gre" ; +break ; +case RTE_FLOW_ITEM_TYPE_NVGRE : + type ="nvgre" ; +break ; +case RTE_FLOW_ITEM_TYPE_GENEVE : + type ="geneve" ; +break ; }return type;
@@ -1270,6 +1279,12 @@ void port_flow_tunnel_create(portid_t port_id, const struct tunnel_ops *ops)if (!strcmp (ops->type,"vxlan" )) type =RTE_FLOW_ITEM_TYPE_VXLAN ; +else if (!strcmp (ops->type,"gre" )) + type =RTE_FLOW_ITEM_TYPE_GRE ; +else if (!strcmp (ops->type,"nvgre" )) + type =RTE_FLOW_ITEM_TYPE_NVGRE ; +else if (!strcmp (ops->type,"geneve" )) + type =RTE_FLOW_ITEM_TYPE_GENEVE ;else {fprintf (stderr,"cannot offload \"%s\" tunnel type\n" , ops->type);
Signature · 1 line
2.28.0.2311.g225365fb51
PATCH v2 2/2 net/mlx5: add support for more tunnel types
Accept RTE_FLOW_ITEM_TYPE_GRE, RTE_FLOW_ITEM_TYPE_NVGRE and RTE_FLOW_ITEM_TYPE_GENEVE as valid tunnel types.
--- drivers/net/mlx5/mlx5_flow.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/mlx5/mlx5_flow.c +3 -0
@@ -9123,6 +9123,9 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev, err_msg ="unsupported tunnel type" ; goto out;case RTE_FLOW_ITEM_TYPE_VXLAN : +case RTE_FLOW_ITEM_TYPE_GRE : +case RTE_FLOW_ITEM_TYPE_NVGRE : +case RTE_FLOW_ITEM_TYPE_GENEVE :break ; }
Signature · 1 line
2.28.0.2311.g225365fb51
Re: [dpdk-dev] [PATCH V2 2/2] net/mlx5: add support for more tunnel types
Quoted 7 lines · Eli Britstein
Accept
RTE_FLOW_ITEM_TYPE_GRE,RTE_FLOW_ITEM_TYPE_NVGREandRTE_FLOW_ITEM_TYPE_GENEVEas valid tunnel types.Fixes 4ec6360de37d ("net/mlx5: implement tunnel offload")Signed-off-by Eli Britstein <[email protected]>
Moving ack form first version of the set for record:
Quoted 13 lines · Eli Britstein
Current testpmd implementation supports VXLAN only for tunnel offload. Add GRE, NVGRE and GENEVE for tunnel offload flow matches.
For example:
testpmd> flow tunnel create 0 type vxlan
port 0: flow tunnel #1 type vxlan
testpmd> flow tunnel create 0 type nvgre
port 0: flow tunnel #2 type nvgre
testpmd> flow tunnel create 0 type gre
port 0: flow tunnel #3 type gre
testpmd> flow tunnel create 0 type geneve
port 0: flow tunnel #4 type geneve
Quoted 4 lines
Fixes 1b9f274623b8 ("app/testpmd: add commands for tunnel offload")Signed-off-by Eli Britstein <[email protected]>
Hi Matan, Gregory,
Set looks good to me but can you please help reviewing it?
Thanks,
ferruh
Quoted 18 lines
Subject: [PATCH V2 1/2] app/testpmd: add tunnel types
Current testpmd implementation supports VXLAN only for tunnel offload.
Add GRE, NVGRE and GENEVE for tunnel offload flow matches.For example:
testpmd> flow tunnel create 0 type vxlan port 0: flow tunnel #1 type vxlan testpmd> flow tunnel create 0 type nvgre port 0: flow tunnel #2 type nvgre testpmd> flow tunnel create 0 type gre port 0: flow tunnel #3 type gre testpmd> flow tunnel create 0 type geneve port 0: flow tunnel #4 type geneve
Quoted 5 lines
Fixes 1b9f274623b8 ("app/testpmd: addcommands for tunnel offload")
Cc: [email protected]Signed-off-by Eli Britstein <[email protected]>
Quoted 49 lines
--- app/test-pmd/config.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)app/test- renamed from app/test-pmd/config.c +0
-0
pmd/config.c
indexf5765b34f7..2bb9fc6784100644app/test-pmd/config.c +0
-0@@ -1210,6 +1210,15 @@
port_flow_tunnel_type(struct rte_flow_tunnel *tunnel)app/test-pmd/config.c +9
-0case RTE_FLOW_ITEM_TYPE_VXLAN : type ="vxlan" ;break ; +case RTE_FLOW_ITEM_TYPE_GRE : + type ="gre" ; +break ; +case RTE_FLOW_ITEM_TYPE_NVGRE : + type ="nvgre" ; +break ; +case RTE_FLOW_ITEM_TYPE_GENEVE : + type ="geneve" ; +break ; }return type;@@ -1270,6 +1279,12 @@ void
port_flow_tunnel_create(portid_t port_id, const struct tunnel_ops *ops)app/test-pmd/config.c +0
-0if (!strcmp (ops->type,"vxlan" )) type =
RTE_FLOW_ITEM_TYPE_VXLAN;app/test-pmd/config.c +2
-0+else if (!strcmp (ops->type,"gre" )) + type =
RTE_FLOW_ITEM_TYPE_GRE;app/test-pmd/config.c +2
-0+else if (!strcmp (ops->type,"nvgre" )) + type =
RTE_FLOW_ITEM_TYPE_NVGRE;app/test-pmd/config.c +2
-0+else if (!strcmp (ops->type,"geneve" )) + type =
RTE_FLOW_ITEM_TYPE_GENEVE;app/test-pmd/config.c +0
-0else { fprintf(stderr, "cannot offload\"%s\" tunnel type\n",
ops->type);
--
2.28.0.2311.g225365fb51
Quoted 18 lines · Gregory Etelson
Quoted 18 lines
Subject: [PATCH V2 1/2] app/testpmd: add tunnel types
Current testpmd implementation supports VXLAN only for tunnel offload.
Add GRE, NVGRE and GENEVE for tunnel offload flow matches.For example:
testpmd> flow tunnel create 0 type vxlan port 0: flow tunnel #1 type vxlan testpmd> flow tunnel create 0 type nvgre port 0: flow tunnel #2 type nvgre testpmd> flow tunnel create 0 type gre port 0: flow tunnel #3 type gre testpmd> flow tunnel create 0 type geneve port 0: flow tunnel #4 type geneve
Quoted 8 lines
Quoted 5 lines
Fixes 1b9f274623b8 ("app/testpmd: addcommands for tunnel offload")
Cc: [email protected]Signed-off-by Eli Britstein <[email protected]>Reviewed-by Gregory Etelson <[email protected]>
Series applied to dpdk-next-net/main, thanks.