git: 0c4de0f986a7 - stable/13 - mlx5en: Create flowtables in correct order.

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Tue, 08 Feb 2022 15:14:09 UTC
The branch stable/13 has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=0c4de0f986a7227c8880da0fe07324bae740c328

commit 0c4de0f986a7227c8880da0fe07324bae740c328
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-02-08 15:08:53 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-02-08 15:08:53 +0000

    mlx5en: Create flowtables in correct order.
    
    Because it affects how the flow tables may re-direct traffic.
    
    Sponsored by:   NVIDIA Networking
    
    (cherry picked from commit 001106f807702592647e2ab4c3dadf31f7ec9427)
---
 sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
index 5d52415381aa..dab2d4bfda38 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
@@ -2292,21 +2292,21 @@ mlx5e_open_flow_tables(struct mlx5e_priv *priv)
 	if (err)
 		goto err_destroy_vlan_flow_table;
 
-	err = mlx5e_create_main_flow_table(priv, false);
+	err = mlx5e_create_main_flow_table(priv, true);
 	if (err)
 		goto err_destroy_vxlan_flow_table;
 
-	err = mlx5e_create_main_flow_table(priv, true);
+	err = mlx5e_create_inner_rss_flow_table(priv);
 	if (err)
-		goto err_destroy_main_flow_table;
+		goto err_destroy_main_flow_table_true;
 
-	err = mlx5e_create_inner_rss_flow_table(priv);
+	err = mlx5e_create_main_flow_table(priv, false);
 	if (err)
-		goto err_destroy_main_vxlan_flow_table;
+		goto err_destroy_inner_rss_flow_table;
 
 	err = mlx5e_add_vxlan_catchall_rule(priv);
 	if (err)
-		goto err_destroy_inner_rss_flow_table;
+		goto err_destroy_main_flow_table_false;
 
 	err = mlx5e_accel_fs_tcp_create(priv);
 	if (err)
@@ -2316,12 +2316,12 @@ mlx5e_open_flow_tables(struct mlx5e_priv *priv)
 
 err_del_vxlan_catchall_rule:
 	mlx5e_del_vxlan_catchall_rule(priv);
+err_destroy_main_flow_table_false:
+	mlx5e_destroy_main_flow_table(priv);
 err_destroy_inner_rss_flow_table:
 	mlx5e_destroy_inner_rss_flow_table(priv);
-err_destroy_main_vxlan_flow_table:
+err_destroy_main_flow_table_true:
 	mlx5e_destroy_main_vxlan_flow_table(priv);
-err_destroy_main_flow_table:
-	mlx5e_destroy_main_flow_table(priv);
 err_destroy_vxlan_flow_table:
 	mlx5e_destroy_vxlan_flow_table(priv);
 err_destroy_vlan_flow_table:
@@ -2335,9 +2335,9 @@ mlx5e_close_flow_tables(struct mlx5e_priv *priv)
 {
 	mlx5e_accel_fs_tcp_destroy(priv);
 	mlx5e_del_vxlan_catchall_rule(priv);
+	mlx5e_destroy_main_flow_table(priv);
 	mlx5e_destroy_inner_rss_flow_table(priv);
 	mlx5e_destroy_main_vxlan_flow_table(priv);
-	mlx5e_destroy_main_flow_table(priv);
 	mlx5e_destroy_vxlan_flow_table(priv);
 	mlx5e_destroy_vlan_flow_table(priv);
 }