diff options
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 9 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 5 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 9 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 3 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 25 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 11 | ||||
| -rw-r--r-- | include/linux/mlx5/fs.h | 4 |
10 files changed, 49 insertions, 23 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index 0099a3e397bc..2fd044b23875 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h | |||
| @@ -1003,7 +1003,7 @@ int mlx5e_create_direct_tirs(struct mlx5e_priv *priv); | |||
| 1003 | void mlx5e_destroy_direct_tirs(struct mlx5e_priv *priv); | 1003 | void mlx5e_destroy_direct_tirs(struct mlx5e_priv *priv); |
| 1004 | void mlx5e_destroy_rqt(struct mlx5e_priv *priv, struct mlx5e_rqt *rqt); | 1004 | void mlx5e_destroy_rqt(struct mlx5e_priv *priv, struct mlx5e_rqt *rqt); |
| 1005 | 1005 | ||
| 1006 | int mlx5e_create_ttc_table(struct mlx5e_priv *priv, u32 underlay_qpn); | 1006 | int mlx5e_create_ttc_table(struct mlx5e_priv *priv); |
| 1007 | void mlx5e_destroy_ttc_table(struct mlx5e_priv *priv); | 1007 | void mlx5e_destroy_ttc_table(struct mlx5e_priv *priv); |
| 1008 | 1008 | ||
| 1009 | int mlx5e_create_tis(struct mlx5_core_dev *mdev, int tc, | 1009 | int mlx5e_create_tis(struct mlx5_core_dev *mdev, int tc, |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c index ce7b09d72ff6..8209affa75c3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | |||
| @@ -794,7 +794,6 @@ static void get_supported(u32 eth_proto_cap, | |||
| 794 | ptys2ethtool_supported_port(link_ksettings, eth_proto_cap); | 794 | ptys2ethtool_supported_port(link_ksettings, eth_proto_cap); |
| 795 | ptys2ethtool_supported_link(supported, eth_proto_cap); | 795 | ptys2ethtool_supported_link(supported, eth_proto_cap); |
| 796 | ethtool_link_ksettings_add_link_mode(link_ksettings, supported, Pause); | 796 | ethtool_link_ksettings_add_link_mode(link_ksettings, supported, Pause); |
| 797 | ethtool_link_ksettings_add_link_mode(link_ksettings, supported, Asym_Pause); | ||
| 798 | } | 797 | } |
| 799 | 798 | ||
| 800 | static void get_advertising(u32 eth_proto_cap, u8 tx_pause, | 799 | static void get_advertising(u32 eth_proto_cap, u8 tx_pause, |
| @@ -804,7 +803,7 @@ static void get_advertising(u32 eth_proto_cap, u8 tx_pause, | |||
| 804 | unsigned long *advertising = link_ksettings->link_modes.advertising; | 803 | unsigned long *advertising = link_ksettings->link_modes.advertising; |
| 805 | 804 | ||
| 806 | ptys2ethtool_adver_link(advertising, eth_proto_cap); | 805 | ptys2ethtool_adver_link(advertising, eth_proto_cap); |
| 807 | if (tx_pause) | 806 | if (rx_pause) |
| 808 | ethtool_link_ksettings_add_link_mode(link_ksettings, advertising, Pause); | 807 | ethtool_link_ksettings_add_link_mode(link_ksettings, advertising, Pause); |
| 809 | if (tx_pause ^ rx_pause) | 808 | if (tx_pause ^ rx_pause) |
| 810 | ethtool_link_ksettings_add_link_mode(link_ksettings, advertising, Asym_Pause); | 809 | ethtool_link_ksettings_add_link_mode(link_ksettings, advertising, Asym_Pause); |
| @@ -849,6 +848,8 @@ static int mlx5e_get_link_ksettings(struct net_device *netdev, | |||
| 849 | struct mlx5e_priv *priv = netdev_priv(netdev); | 848 | struct mlx5e_priv *priv = netdev_priv(netdev); |
| 850 | struct mlx5_core_dev *mdev = priv->mdev; | 849 | struct mlx5_core_dev *mdev = priv->mdev; |
| 851 | u32 out[MLX5_ST_SZ_DW(ptys_reg)] = {0}; | 850 | u32 out[MLX5_ST_SZ_DW(ptys_reg)] = {0}; |
| 851 | u32 rx_pause = 0; | ||
| 852 | u32 tx_pause = 0; | ||
| 852 | u32 eth_proto_cap; | 853 | u32 eth_proto_cap; |
| 853 | u32 eth_proto_admin; | 854 | u32 eth_proto_admin; |
| 854 | u32 eth_proto_lp; | 855 | u32 eth_proto_lp; |
| @@ -871,11 +872,13 @@ static int mlx5e_get_link_ksettings(struct net_device *netdev, | |||
| 871 | an_disable_admin = MLX5_GET(ptys_reg, out, an_disable_admin); | 872 | an_disable_admin = MLX5_GET(ptys_reg, out, an_disable_admin); |
| 872 | an_status = MLX5_GET(ptys_reg, out, an_status); | 873 | an_status = MLX5_GET(ptys_reg, out, an_status); |
| 873 | 874 | ||
| 875 | mlx5_query_port_pause(mdev, &rx_pause, &tx_pause); | ||
| 876 | |||
| 874 | ethtool_link_ksettings_zero_link_mode(link_ksettings, supported); | 877 | ethtool_link_ksettings_zero_link_mode(link_ksettings, supported); |
| 875 | ethtool_link_ksettings_zero_link_mode(link_ksettings, advertising); | 878 | ethtool_link_ksettings_zero_link_mode(link_ksettings, advertising); |
| 876 | 879 | ||
| 877 | get_supported(eth_proto_cap, link_ksettings); | 880 | get_supported(eth_proto_cap, link_ksettings); |
| 878 | get_advertising(eth_proto_admin, 0, 0, link_ksettings); | 881 | get_advertising(eth_proto_admin, tx_pause, rx_pause, link_ksettings); |
| 879 | get_speed_duplex(netdev, eth_proto_oper, link_ksettings); | 882 | get_speed_duplex(netdev, eth_proto_oper, link_ksettings); |
| 880 | 883 | ||
| 881 | eth_proto_oper = eth_proto_oper ? eth_proto_oper : eth_proto_cap; | 884 | eth_proto_oper = eth_proto_oper ? eth_proto_oper : eth_proto_cap; |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c index 576d6787b484..53ed58320a24 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | |||
| @@ -800,7 +800,7 @@ void mlx5e_destroy_ttc_table(struct mlx5e_priv *priv) | |||
| 800 | mlx5e_destroy_flow_table(&ttc->ft); | 800 | mlx5e_destroy_flow_table(&ttc->ft); |
| 801 | } | 801 | } |
| 802 | 802 | ||
| 803 | int mlx5e_create_ttc_table(struct mlx5e_priv *priv, u32 underlay_qpn) | 803 | int mlx5e_create_ttc_table(struct mlx5e_priv *priv) |
| 804 | { | 804 | { |
| 805 | struct mlx5e_ttc_table *ttc = &priv->fs.ttc; | 805 | struct mlx5e_ttc_table *ttc = &priv->fs.ttc; |
| 806 | struct mlx5_flow_table_attr ft_attr = {}; | 806 | struct mlx5_flow_table_attr ft_attr = {}; |
| @@ -810,7 +810,6 @@ int mlx5e_create_ttc_table(struct mlx5e_priv *priv, u32 underlay_qpn) | |||
| 810 | ft_attr.max_fte = MLX5E_TTC_TABLE_SIZE; | 810 | ft_attr.max_fte = MLX5E_TTC_TABLE_SIZE; |
| 811 | ft_attr.level = MLX5E_TTC_FT_LEVEL; | 811 | ft_attr.level = MLX5E_TTC_FT_LEVEL; |
| 812 | ft_attr.prio = MLX5E_NIC_PRIO; | 812 | ft_attr.prio = MLX5E_NIC_PRIO; |
| 813 | ft_attr.underlay_qpn = underlay_qpn; | ||
| 814 | 813 | ||
| 815 | ft->t = mlx5_create_flow_table(priv->fs.ns, &ft_attr); | 814 | ft->t = mlx5_create_flow_table(priv->fs.ns, &ft_attr); |
| 816 | if (IS_ERR(ft->t)) { | 815 | if (IS_ERR(ft->t)) { |
| @@ -1147,7 +1146,7 @@ int mlx5e_create_flow_steering(struct mlx5e_priv *priv) | |||
| 1147 | priv->netdev->hw_features &= ~NETIF_F_NTUPLE; | 1146 | priv->netdev->hw_features &= ~NETIF_F_NTUPLE; |
| 1148 | } | 1147 | } |
| 1149 | 1148 | ||
| 1150 | err = mlx5e_create_ttc_table(priv, 0); | 1149 | err = mlx5e_create_ttc_table(priv); |
| 1151 | if (err) { | 1150 | if (err) { |
| 1152 | netdev_err(priv->netdev, "Failed to create ttc table, err=%d\n", | 1151 | netdev_err(priv->netdev, "Failed to create ttc table, err=%d\n", |
| 1153 | err); | 1152 | err); |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index a61b71b6fff3..41cd22a223dc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c | |||
| @@ -2976,7 +2976,7 @@ static int mlx5e_setup_tc(struct net_device *netdev, u8 tc) | |||
| 2976 | new_channels.params = priv->channels.params; | 2976 | new_channels.params = priv->channels.params; |
| 2977 | new_channels.params.num_tc = tc ? tc : 1; | 2977 | new_channels.params.num_tc = tc ? tc : 1; |
| 2978 | 2978 | ||
| 2979 | if (test_bit(MLX5E_STATE_OPENED, &priv->state)) { | 2979 | if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) { |
| 2980 | priv->channels.params = new_channels.params; | 2980 | priv->channels.params = new_channels.params; |
| 2981 | goto out; | 2981 | goto out; |
| 2982 | } | 2982 | } |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c index 19e3d2fc2099..fcec7bedd3cd 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | |||
| @@ -40,28 +40,25 @@ | |||
| 40 | #include "eswitch.h" | 40 | #include "eswitch.h" |
| 41 | 41 | ||
| 42 | int mlx5_cmd_update_root_ft(struct mlx5_core_dev *dev, | 42 | int mlx5_cmd_update_root_ft(struct mlx5_core_dev *dev, |
| 43 | struct mlx5_flow_table *ft) | 43 | struct mlx5_flow_table *ft, u32 underlay_qpn) |
| 44 | { | 44 | { |
| 45 | u32 in[MLX5_ST_SZ_DW(set_flow_table_root_in)] = {0}; | 45 | u32 in[MLX5_ST_SZ_DW(set_flow_table_root_in)] = {0}; |
| 46 | u32 out[MLX5_ST_SZ_DW(set_flow_table_root_out)] = {0}; | 46 | u32 out[MLX5_ST_SZ_DW(set_flow_table_root_out)] = {0}; |
| 47 | 47 | ||
| 48 | if ((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_IB) && | 48 | if ((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_IB) && |
| 49 | ft->underlay_qpn == 0) | 49 | underlay_qpn == 0) |
| 50 | return 0; | 50 | return 0; |
| 51 | 51 | ||
| 52 | MLX5_SET(set_flow_table_root_in, in, opcode, | 52 | MLX5_SET(set_flow_table_root_in, in, opcode, |
| 53 | MLX5_CMD_OP_SET_FLOW_TABLE_ROOT); | 53 | MLX5_CMD_OP_SET_FLOW_TABLE_ROOT); |
| 54 | MLX5_SET(set_flow_table_root_in, in, table_type, ft->type); | 54 | MLX5_SET(set_flow_table_root_in, in, table_type, ft->type); |
| 55 | MLX5_SET(set_flow_table_root_in, in, table_id, ft->id); | 55 | MLX5_SET(set_flow_table_root_in, in, table_id, ft->id); |
| 56 | MLX5_SET(set_flow_table_root_in, in, underlay_qpn, underlay_qpn); | ||
| 56 | if (ft->vport) { | 57 | if (ft->vport) { |
| 57 | MLX5_SET(set_flow_table_root_in, in, vport_number, ft->vport); | 58 | MLX5_SET(set_flow_table_root_in, in, vport_number, ft->vport); |
| 58 | MLX5_SET(set_flow_table_root_in, in, other_vport, 1); | 59 | MLX5_SET(set_flow_table_root_in, in, other_vport, 1); |
| 59 | } | 60 | } |
| 60 | 61 | ||
| 61 | if ((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_IB) && | ||
| 62 | ft->underlay_qpn != 0) | ||
| 63 | MLX5_SET(set_flow_table_root_in, in, underlay_qpn, ft->underlay_qpn); | ||
| 64 | |||
| 65 | return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); | 62 | return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); |
| 66 | } | 63 | } |
| 67 | 64 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h index 8fad80688536..0f98a7cf4877 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | |||
| @@ -71,7 +71,8 @@ int mlx5_cmd_delete_fte(struct mlx5_core_dev *dev, | |||
| 71 | unsigned int index); | 71 | unsigned int index); |
| 72 | 72 | ||
| 73 | int mlx5_cmd_update_root_ft(struct mlx5_core_dev *dev, | 73 | int mlx5_cmd_update_root_ft(struct mlx5_core_dev *dev, |
| 74 | struct mlx5_flow_table *ft); | 74 | struct mlx5_flow_table *ft, |
| 75 | u32 underlay_qpn); | ||
| 75 | 76 | ||
| 76 | int mlx5_cmd_fc_alloc(struct mlx5_core_dev *dev, u16 *id); | 77 | int mlx5_cmd_fc_alloc(struct mlx5_core_dev *dev, u16 *id); |
| 77 | int mlx5_cmd_fc_free(struct mlx5_core_dev *dev, u16 id); | 78 | int mlx5_cmd_fc_free(struct mlx5_core_dev *dev, u16 id); |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index b8a176503d38..0e487e8ca634 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | |||
| @@ -650,7 +650,7 @@ static int update_root_ft_create(struct mlx5_flow_table *ft, struct fs_prio | |||
| 650 | if (ft->level >= min_level) | 650 | if (ft->level >= min_level) |
| 651 | return 0; | 651 | return 0; |
| 652 | 652 | ||
| 653 | err = mlx5_cmd_update_root_ft(root->dev, ft); | 653 | err = mlx5_cmd_update_root_ft(root->dev, ft, root->underlay_qpn); |
| 654 | if (err) | 654 | if (err) |
| 655 | mlx5_core_warn(root->dev, "Update root flow table of id=%u failed\n", | 655 | mlx5_core_warn(root->dev, "Update root flow table of id=%u failed\n", |
| 656 | ft->id); | 656 | ft->id); |
| @@ -818,8 +818,6 @@ static struct mlx5_flow_table *__mlx5_create_flow_table(struct mlx5_flow_namespa | |||
| 818 | goto unlock_root; | 818 | goto unlock_root; |
| 819 | } | 819 | } |
| 820 | 820 | ||
| 821 | ft->underlay_qpn = ft_attr->underlay_qpn; | ||
| 822 | |||
| 823 | tree_init_node(&ft->node, 1, del_flow_table); | 821 | tree_init_node(&ft->node, 1, del_flow_table); |
| 824 | log_table_sz = ft->max_fte ? ilog2(ft->max_fte) : 0; | 822 | log_table_sz = ft->max_fte ? ilog2(ft->max_fte) : 0; |
| 825 | next_ft = find_next_chained_ft(fs_prio); | 823 | next_ft = find_next_chained_ft(fs_prio); |
| @@ -1489,7 +1487,8 @@ static int update_root_ft_destroy(struct mlx5_flow_table *ft) | |||
| 1489 | 1487 | ||
| 1490 | new_root_ft = find_next_ft(ft); | 1488 | new_root_ft = find_next_ft(ft); |
| 1491 | if (new_root_ft) { | 1489 | if (new_root_ft) { |
| 1492 | int err = mlx5_cmd_update_root_ft(root->dev, new_root_ft); | 1490 | int err = mlx5_cmd_update_root_ft(root->dev, new_root_ft, |
| 1491 | root->underlay_qpn); | ||
| 1493 | 1492 | ||
| 1494 | if (err) { | 1493 | if (err) { |
| 1495 | mlx5_core_warn(root->dev, "Update root flow table of id=%u failed\n", | 1494 | mlx5_core_warn(root->dev, "Update root flow table of id=%u failed\n", |
| @@ -2062,3 +2061,21 @@ err: | |||
| 2062 | mlx5_cleanup_fs(dev); | 2061 | mlx5_cleanup_fs(dev); |
| 2063 | return err; | 2062 | return err; |
| 2064 | } | 2063 | } |
| 2064 | |||
| 2065 | int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn) | ||
| 2066 | { | ||
| 2067 | struct mlx5_flow_root_namespace *root = dev->priv.steering->root_ns; | ||
| 2068 | |||
| 2069 | root->underlay_qpn = underlay_qpn; | ||
| 2070 | return 0; | ||
| 2071 | } | ||
| 2072 | EXPORT_SYMBOL(mlx5_fs_add_rx_underlay_qpn); | ||
| 2073 | |||
| 2074 | int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn) | ||
| 2075 | { | ||
| 2076 | struct mlx5_flow_root_namespace *root = dev->priv.steering->root_ns; | ||
| 2077 | |||
| 2078 | root->underlay_qpn = 0; | ||
| 2079 | return 0; | ||
| 2080 | } | ||
| 2081 | EXPORT_SYMBOL(mlx5_fs_remove_rx_underlay_qpn); | ||
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h index 81eafc7b9dd9..990acee6fb09 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | |||
| @@ -118,7 +118,6 @@ struct mlx5_flow_table { | |||
| 118 | /* FWD rules that point on this flow table */ | 118 | /* FWD rules that point on this flow table */ |
| 119 | struct list_head fwd_rules; | 119 | struct list_head fwd_rules; |
| 120 | u32 flags; | 120 | u32 flags; |
| 121 | u32 underlay_qpn; | ||
| 122 | }; | 121 | }; |
| 123 | 122 | ||
| 124 | struct mlx5_fc_cache { | 123 | struct mlx5_fc_cache { |
| @@ -195,6 +194,7 @@ struct mlx5_flow_root_namespace { | |||
| 195 | struct mlx5_flow_table *root_ft; | 194 | struct mlx5_flow_table *root_ft; |
| 196 | /* Should be held when chaining flow tables */ | 195 | /* Should be held when chaining flow tables */ |
| 197 | struct mutex chain_lock; | 196 | struct mutex chain_lock; |
| 197 | u32 underlay_qpn; | ||
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | int mlx5_init_fc_stats(struct mlx5_core_dev *dev); | 200 | int mlx5_init_fc_stats(struct mlx5_core_dev *dev); |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c index 019c230da498..cc1858752e70 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | |||
| @@ -66,6 +66,10 @@ static void mlx5i_init(struct mlx5_core_dev *mdev, | |||
| 66 | 66 | ||
| 67 | mlx5e_build_nic_params(mdev, &priv->channels.params, profile->max_nch(mdev)); | 67 | mlx5e_build_nic_params(mdev, &priv->channels.params, profile->max_nch(mdev)); |
| 68 | 68 | ||
| 69 | /* Override RQ params as IPoIB supports only LINKED LIST RQ for now */ | ||
| 70 | mlx5e_set_rq_type_params(mdev, &priv->channels.params, MLX5_WQ_TYPE_LINKED_LIST); | ||
| 71 | priv->channels.params.lro_en = false; | ||
| 72 | |||
| 69 | mutex_init(&priv->state_lock); | 73 | mutex_init(&priv->state_lock); |
| 70 | 74 | ||
| 71 | netdev->hw_features |= NETIF_F_SG; | 75 | netdev->hw_features |= NETIF_F_SG; |
| @@ -156,6 +160,8 @@ out: | |||
| 156 | 160 | ||
| 157 | static void mlx5i_destroy_underlay_qp(struct mlx5_core_dev *mdev, struct mlx5_core_qp *qp) | 161 | static void mlx5i_destroy_underlay_qp(struct mlx5_core_dev *mdev, struct mlx5_core_qp *qp) |
| 158 | { | 162 | { |
| 163 | mlx5_fs_remove_rx_underlay_qpn(mdev, qp->qpn); | ||
| 164 | |||
| 159 | mlx5_core_destroy_qp(mdev, qp); | 165 | mlx5_core_destroy_qp(mdev, qp); |
| 160 | } | 166 | } |
| 161 | 167 | ||
| @@ -170,6 +176,8 @@ static int mlx5i_init_tx(struct mlx5e_priv *priv) | |||
| 170 | return err; | 176 | return err; |
| 171 | } | 177 | } |
| 172 | 178 | ||
| 179 | mlx5_fs_add_rx_underlay_qpn(priv->mdev, ipriv->qp.qpn); | ||
| 180 | |||
| 173 | err = mlx5e_create_tis(priv->mdev, 0 /* tc */, ipriv->qp.qpn, &priv->tisn[0]); | 181 | err = mlx5e_create_tis(priv->mdev, 0 /* tc */, ipriv->qp.qpn, &priv->tisn[0]); |
| 174 | if (err) { | 182 | if (err) { |
| 175 | mlx5_core_warn(priv->mdev, "create tis failed, %d\n", err); | 183 | mlx5_core_warn(priv->mdev, "create tis failed, %d\n", err); |
| @@ -189,7 +197,6 @@ static void mlx5i_cleanup_tx(struct mlx5e_priv *priv) | |||
| 189 | 197 | ||
| 190 | static int mlx5i_create_flow_steering(struct mlx5e_priv *priv) | 198 | static int mlx5i_create_flow_steering(struct mlx5e_priv *priv) |
| 191 | { | 199 | { |
| 192 | struct mlx5i_priv *ipriv = priv->ppriv; | ||
| 193 | int err; | 200 | int err; |
| 194 | 201 | ||
| 195 | priv->fs.ns = mlx5_get_flow_namespace(priv->mdev, | 202 | priv->fs.ns = mlx5_get_flow_namespace(priv->mdev, |
| @@ -205,7 +212,7 @@ static int mlx5i_create_flow_steering(struct mlx5e_priv *priv) | |||
| 205 | priv->netdev->hw_features &= ~NETIF_F_NTUPLE; | 212 | priv->netdev->hw_features &= ~NETIF_F_NTUPLE; |
| 206 | } | 213 | } |
| 207 | 214 | ||
| 208 | err = mlx5e_create_ttc_table(priv, ipriv->qp.qpn); | 215 | err = mlx5e_create_ttc_table(priv); |
| 209 | if (err) { | 216 | if (err) { |
| 210 | netdev_err(priv->netdev, "Failed to create ttc table, err=%d\n", | 217 | netdev_err(priv->netdev, "Failed to create ttc table, err=%d\n", |
| 211 | err); | 218 | err); |
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h index 1b166d2e19c5..b25e7baa273e 100644 --- a/include/linux/mlx5/fs.h +++ b/include/linux/mlx5/fs.h | |||
| @@ -109,7 +109,6 @@ struct mlx5_flow_table_attr { | |||
| 109 | int max_fte; | 109 | int max_fte; |
| 110 | u32 level; | 110 | u32 level; |
| 111 | u32 flags; | 111 | u32 flags; |
| 112 | u32 underlay_qpn; | ||
| 113 | }; | 112 | }; |
| 114 | 113 | ||
| 115 | struct mlx5_flow_table * | 114 | struct mlx5_flow_table * |
| @@ -167,4 +166,7 @@ struct mlx5_fc *mlx5_fc_create(struct mlx5_core_dev *dev, bool aging); | |||
| 167 | void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter); | 166 | void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter); |
| 168 | void mlx5_fc_query_cached(struct mlx5_fc *counter, | 167 | void mlx5_fc_query_cached(struct mlx5_fc *counter, |
| 169 | u64 *bytes, u64 *packets, u64 *lastuse); | 168 | u64 *bytes, u64 *packets, u64 *lastuse); |
| 169 | int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn); | ||
| 170 | int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn); | ||
| 171 | |||
| 170 | #endif | 172 | #endif |
