|
@@ -650,7 +650,7 @@ static int update_root_ft_create(struct mlx5_flow_table *ft, struct fs_prio
|
|
|
if (ft->level >= min_level)
|
|
|
return 0;
|
|
|
|
|
|
- err = mlx5_cmd_update_root_ft(root->dev, ft);
|
|
|
+ err = mlx5_cmd_update_root_ft(root->dev, ft, root->underlay_qpn);
|
|
|
if (err)
|
|
|
mlx5_core_warn(root->dev, "Update root flow table of id=%u failed\n",
|
|
|
ft->id);
|
|
@@ -818,8 +818,6 @@ static struct mlx5_flow_table *__mlx5_create_flow_table(struct mlx5_flow_namespa
|
|
|
goto unlock_root;
|
|
|
}
|
|
|
|
|
|
- ft->underlay_qpn = ft_attr->underlay_qpn;
|
|
|
-
|
|
|
tree_init_node(&ft->node, 1, del_flow_table);
|
|
|
log_table_sz = ft->max_fte ? ilog2(ft->max_fte) : 0;
|
|
|
next_ft = find_next_chained_ft(fs_prio);
|
|
@@ -1489,7 +1487,8 @@ static int update_root_ft_destroy(struct mlx5_flow_table *ft)
|
|
|
|
|
|
new_root_ft = find_next_ft(ft);
|
|
|
if (new_root_ft) {
|
|
|
- int err = mlx5_cmd_update_root_ft(root->dev, new_root_ft);
|
|
|
+ int err = mlx5_cmd_update_root_ft(root->dev, new_root_ft,
|
|
|
+ root->underlay_qpn);
|
|
|
|
|
|
if (err) {
|
|
|
mlx5_core_warn(root->dev, "Update root flow table of id=%u failed\n",
|
|
@@ -2062,3 +2061,21 @@ err:
|
|
|
mlx5_cleanup_fs(dev);
|
|
|
return err;
|
|
|
}
|
|
|
+
|
|
|
+int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn)
|
|
|
+{
|
|
|
+ struct mlx5_flow_root_namespace *root = dev->priv.steering->root_ns;
|
|
|
+
|
|
|
+ root->underlay_qpn = underlay_qpn;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(mlx5_fs_add_rx_underlay_qpn);
|
|
|
+
|
|
|
+int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn)
|
|
|
+{
|
|
|
+ struct mlx5_flow_root_namespace *root = dev->priv.steering->root_ns;
|
|
|
+
|
|
|
+ root->underlay_qpn = 0;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(mlx5_fs_remove_rx_underlay_qpn);
|