mlx5 fixes 2021-06-01
Subsystems (5)
From: Saeed Mahameed <[email protected]>
Hi Dave, Jakub,
This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem.
Thanks,
Saeed.
---
The following changes since commit b000372627ce9dbbe641dafbf40db0718276ab77:
MAINTAINERS: nfc mailing lists are subscribers-only (2021-06-01 17:09:28 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-fixes-2021-06-01
for you to fetch changes up to 216214c64a8c1cb9078c2c0aec7bb4a2f8e75397:
net/mlx5: DR, Create multi-destination flow table with level less than 64 (2021-06-01 18:30:21 -0700)
----------------------------------------------------------------
mlx5-fixes-2021-06-01
----------------------------------------------------------------
Aya Levin (3):
net/mlx5e: Fix incompatible casting
net/mlx5e: Fix HW TS with CQE compression according to profile net/mlx5e: Fix conflict with HW TS and CQE compression
Moshe Shemesh (1):
net/mlx5: Check firmware sync reset requested is set before trying to abort it
Roi Dayan (3):
net/mlx5e: Disable TLS offload for uplink representor net/mlx5e: Check for needed capability for cvlan matching net/mlx5e: Fix adding encap rules to slow path
Yevgeny Kliteynik (1):
net/mlx5: DR, Create multi-destination flow table with level less than 64
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 12 +++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 77 +++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 9 +++ .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 +- drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c | 3 + .../ethernet/mellanox/mlx5/core/lib/fs_chains.c | 2 +- .../ethernet/mellanox/mlx5/core/lib/fs_chains.h | 5 ++ .../ethernet/mellanox/mlx5/core/steering/dr_fw.c | 3 +- include/linux/mlx5/mlx5_ifc.h | 2 + 9 files changed, 96 insertions(+), 20 deletions(-)
PATCH 1/8 net/mlx5e: Fix incompatible casting
From: Aya Levin <[email protected]>
Device supports setting of a single fec mode at a time, enforce this by bitmap_weight == 1. Input from fec command is in u32, avoid cast to unsigned long and use bitmap_from_arr32 to populate bitmap safely.
--- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +3 -2
@@ -1624,12 +1624,13 @@ static int mlx5e_set_fecparam(struct net_device *netdev, {struct mlx5e_priv *priv =netdev_priv (netdev);struct mlx5_core_dev *mdev = priv->mdev; +unsigned long fec_bitmap;u16 fec_policy =0 ;int mode;int err; -if (bitmap_weight ((unsigned long *)&fecparam->fec, -ETHTOOL_FEC_LLRS_BIT +1 ) >1 ) +bitmap_from_arr32 (&fec_bitmap, &fecparam->fec,sizeof (fecparam->fec) *BITS_PER_BYTE ); +if (bitmap_weight (&fec_bitmap,ETHTOOL_FEC_LLRS_BIT +1 ) >1 )return -EOPNOTSUPP ;for (mode =0 ; mode <ARRAY_SIZE (pplm_fec_2_ethtool); mode++) {
Signature · 1 line
2.31.1
Jakub Kicinski
maintainerRe: [net 1/8] net/mlx5e: Fix incompatible casting
Quoted 24 lines · On Tue, 1 Jun 2021 18:37:16 -0700 Saeed Mahameed wrote:
From: Aya Levin <[email protected]>
Device supports setting of a single fec mode at a time, enforce this by
bitmap_weight== 1. Input from fec command is in u32, avoid cast to unsigned long and usebitmap_from_arr32to populate bitmap safely.Fixes 4bd9d5070b92 ("net/mlx5e: Enforce setting of a single FEC mode")Signed-off-by Aya Levin <[email protected]>Reviewed-by Tariq Toukan <[email protected]>Signed-off-by Saeed Mahameed <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +1
-0@@ -1624,12 +1624,13 @@ static int mlx5e_set_fecparam(struct net_device *netdev, {struct mlx5e_priv *priv =netdev_priv (netdev);struct mlx5_core_dev *mdev = priv->mdev; +unsigned long fec_bitmap;u16 fec_policy =0 ;
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c static int mlx5e_set_fecparam(struct net_device *netdev, · line 1636
Quoted 10 lines
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +2
-2int mode;int err; -if (bitmap_weight ((unsigned long *)&fecparam->fec, -ETHTOOL_FEC_LLRS_BIT +1 ) >1 ) +bitmap_from_arr32 (&fec_bitmap, &fecparam->fec,sizeof (fecparam->fec) *BITS_PER_BYTE ); +if (bitmap_weight (&fec_bitmap,ETHTOOL_FEC_LLRS_BIT +1 ) >1 )return -EOPNOTSUPP ;for (mode =0 ; mode <ARRAY_SIZE (pplm_fec_2_ethtool); mode++) {
hweight32()? Not that'd be worth a respin
Re: [net 1/8] net/mlx5e: Fix incompatible casting
In reply to Saeed MahameedThis series was applied to netdev/net.git (refs/heads/master):
Hello:
This series was applied to netdev/net.git (refs/heads/master):
Quoted 6 lines · On Tue, 1 Jun 2021 18:37:16 -0700 you wrote:
From: Aya Levin <[email protected]>
Device supports setting of a single fec mode at a time, enforce this by
bitmap_weight== 1. Input from fec command is in u32, avoid cast to unsigned long and usebitmap_from_arr32to populate bitmap safely.
Quoted 6 lines
Fixes 4bd9d5070b92 ("net/mlx5e: Enforce setting of a single FEC mode")Signed-off-by Aya Levin <[email protected]>Reviewed-by Tariq Toukan <[email protected]>Signed-off-by Saeed Mahameed <[email protected]>[...]
Here is the summary with links:
- [net,1/8] net/mlx5e: Fix incompatible casting
https://git.kernel.org/netdev/net/c/d8ec92005f80 - [net,2/8] net/mlx5e: Disable TLS offload for uplink representor https://git.kernel.org/netdev/net/c/b38742e41177 - [net,3/8] net/mlx5: Check firmware sync reset requested is set before trying to abort it https://git.kernel.org/netdev/net/c/5940e64281c0 - [net,4/8] net/mlx5e: Check for needed capability for cvlan matching https://git.kernel.org/netdev/net/c/afe93f71b5d3 - [net,5/8] net/mlx5e: Fix adding encap rules to slow path https://git.kernel.org/netdev/net/c/2a2c84facd4a - [net,6/8] net/mlx5e: Fix HW TS with CQE compression according to profile https://git.kernel.org/netdev/net/c/256f79d13c1d - [net,7/8] net/mlx5e: Fix conflict with HW TS and CQE compression https://git.kernel.org/netdev/net/c/5349cbba754e - [net,8/8] net/mlx5: DR, Create multi-destination flow table with level less than 64 https://git.kernel.org/netdev/net/c/216214c64a8c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
RE: [net 1/8] net/mlx5e: Fix incompatible casting
In reply to Saeed MahameedFrom: Saeed Mahameed
Quoted 6 lines
Sent: 02 June 2021 02:37
Device supports setting of a single fec mode at a time, enforce this by
bitmap_weight== 1. Input from fec command is in u32, avoid cast to unsigned long and usebitmap_from_arr32to populate bitmap safely.
...
Quoted 10 lines
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +0
-0@@ -1624,12 +1624,13 @@ static int mlx5e_set_fecparam(struct net_device *netdev, {struct mlx5e_priv *priv =netdev_priv (netdev);struct mlx5_core_dev *mdev = priv->mdev;
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c static int mlx5e_set_fecparam(struct net_device *netdev, · line 1634
Quoted 10 lines
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +3
-2+unsigned long fec_bitmap;u16 fec_policy =0 ;int mode;int err; -if (bitmap_weight ((unsigned long *)&fecparam->fec, -ETHTOOL_FEC_LLRS_BIT +1 ) >1 ) +bitmap_from_arr32 (&fec_bitmap, &fecparam->fec,sizeof (fecparam->fec) *BITS_PER_BYTE ); +if (bitmap_weight (&fec_bitmap,ETHTOOL_FEC_LLRS_BIT +1 ) >1 )return -EOPNOTSUPP ;
What is wrong with:
if (fecparam->fec & (fecparam->fec - 1)) return -EOPNOTSUPP; David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
PATCH 2/8 net/mlx5e: Disable TLS offload for uplink representor
In reply to Saeed MahameedFrom: Roi Dayan <[email protected]>
TLS offload is not supported in switchdev mode.
--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +10 -0
@@ -3858,6 +3858,16 @@ static netdev_features_t mlx5e_fix_features(struct net_device *netdev,netdev_warn (netdev,"Disabling rxhash, not supported when CQE compress is active\n" ); } +if (mlx5e_is_uplink_rep (priv)) { + features &= ~NETIF_F_HW_TLS_RX ; +if (netdev->features &NETIF_F_HW_TLS_RX ) +netdev_warn (netdev,"Disabling hw_tls_rx, not supported in switchdev mode\n" ); + + features &= ~NETIF_F_HW_TLS_TX ; +if (netdev->features &NETIF_F_HW_TLS_TX ) +netdev_warn (netdev,"Disabling hw_tls_tx, not supported in switchdev mode\n" ); + } +mutex_unlock (&priv->state_lock);return features;
Signature · 1 line
2.31.1
PATCH 3/8 net/mlx5: Check firmware sync reset requested is set before trying to abort it
In reply to Saeed MahameedFrom: Moshe Shemesh <[email protected]>
In case driver sent NACK to firmware on sync reset request, it will get sync reset abort event while it didn't set sync reset requested mode. Thus, on abort sync reset event handler, driver should check reset requested is set before trying to stop sync reset poll.
--- drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c +3 -0
@@ -349,6 +349,9 @@ static void mlx5_sync_reset_abort_event(struct work_struct *work) reset_abort_work);struct mlx5_core_dev *dev = fw_reset->dev; +if (!test_bit (MLX5_FW_RESET_FLAGS_RESET_REQUESTED , &fw_reset->reset_flags)) +return ; +mlx5_sync_reset_clear_reset_requested (dev, true);mlx5_core_warn (dev,"PCI Sync FW Update Reset Aborted.\n" ); }
Signature · 1 line
2.31.1
PATCH 4/8 net/mlx5e: Check for needed capability for cvlan matching
In reply to Saeed MahameedFrom: Roi Dayan <[email protected]>
If not supported show an error and return instead of trying to offload to the hardware and fail.
--- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +9 -0
@@ -2015,11 +2015,13 @@ static int __parse_cls_flower(struct mlx5e_priv *priv, misc_parameters_3);struct flow_rule *rule =flow_cls_offload_flow_rule (f);struct flow_dissector *dissector = rule->match.dissector; +enum fs_flow_table_type fs_type;u16 addr_type =0 ;u8 ip_proto =0 ;u8 *match_level;int err; + fs_type =mlx5e_is_eswitch_flow (flow) ?FS_FT_FDB :FS_FT_NIC_RX ; match_level = outer_match_level; if (dissector->used_keys &
@@ -2145,6 +2147,13 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,if (match.mask->vlan_id || match.mask->vlan_priority || match.mask->vlan_tpid) { +if (!MLX5_CAP_FLOWTABLE_TYPE (priv->mdev, ft_field_support.outer_second_vid, + fs_type)) { +NL_SET_ERR_MSG_MOD (extack, +"Matching on CVLAN is not supported" ); +return -EOPNOTSUPP ; + } +if (match.key->vlan_tpid ==htons (ETH_P_8021AD )) {MLX5_SET (fte_match_set_misc, misc_c, outer_second_svlan_tag,1 );
Signature · 1 line
2.31.1
PATCH 5/8 net/mlx5e: Fix adding encap rules to slow path
In reply to Saeed MahameedFrom: Roi Dayan <[email protected]>
On some devices the ignore flow level cap is not supported and we shouldn't use it. Setting the dest ft with mlx5_chains_get_tc_end_ft() already gives the correct end ft if ignore flow level cap is supported or not.
--- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.h | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +2 -1
@@ -219,7 +219,8 @@ esw_setup_slow_path_dest(struct mlx5_flow_destination *dest, struct mlx5_fs_chains *chains, int i) { - flow_act->flags |=FLOW_ACT_IGNORE_FLOW_LEVEL ; + if (mlx5_chains_ignore_flow_level_supported(chains)) + flow_act->flags |= FLOW_ACT_IGNORE_FLOW_LEVEL; dest[i].type =MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE ; dest[i].ft =mlx5_chains_get_tc_end_ft (chains); }
drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c +1 -1
@@ -107,7 +107,7 @@ bool mlx5_chains_prios_supported(struct mlx5_fs_chains *chains)return chains->flags &MLX5_CHAINS_AND_PRIOS_SUPPORTED ; } -static bool mlx5_chains_ignore_flow_level_supported (struct mlx5_fs_chains *chains) +bool mlx5_chains_ignore_flow_level_supported (struct mlx5_fs_chains *chains) {return chains->flags &MLX5_CHAINS_IGNORE_FLOW_LEVEL_SUPPORTED ; }
drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.h +5 -0
@@ -28,6 +28,7 @@ struct mlx5_chains_attr {bool mlx5_chains_prios_supported (struct mlx5_fs_chains *chains); +bool mlx5_chains_ignore_flow_level_supported (struct mlx5_fs_chains *chains);bool mlx5_chains_backwards_supported (struct mlx5_fs_chains *chains); u32
@@ -70,6 +71,10 @@ mlx5_chains_set_end_ft(struct mlx5_fs_chains *chains,#else /* CONFIG_MLX5_CLS_ACT */ +static inline bool +mlx5_chains_ignore_flow_level_supported (struct mlx5_fs_chains *chains) +{return false; } +static inline struct mlx5_flow_table *mlx5_chains_get_table (struct mlx5_fs_chains *chains,u32 chain,u32 prio,u32 level) {return ERR_PTR (-EOPNOTSUPP ); }
Signature · 1 line
2.31.1
PATCH 6/8 net/mlx5e: Fix HW TS with CQE compression according to profile
In reply to Saeed MahameedFrom: Aya Levin <[email protected]>
When the driver's profile doesn't support a dedicated PTP-RQ, the PTP accuracy of HW TS is affected by the CQE compression. In this case, turn off CQE compression. Otherwise, the driver crashes:
BUG: kernel NULL pointer dereference, address:0000000000000018 ... ... RIP: 0010:mlx5e_ptp_rx_set_fs+0x25/0x1a0 [mlx5_core] ... ... Call Trace: mlx5e_ptp_activate_channel+0xb2/0xf0 [mlx5_core] mlx5e_activate_priv_channels+0x3b9/0x8c0 [mlx5_core] ? __mutex_unlock_slowpath+0x45/0x2a0 ? mlx5e_refresh_tirs+0x151/0x1e0 [mlx5_core] mlx5e_switch_priv_channels+0x1cd/0x2d0 [mlx5_core] ? mlx5e_xdp_allowed+0x150/0x150 [mlx5_core] mlx5e_safe_switch_params+0x118/0x3c0 [mlx5_core] ? __mutex_lock+0x6e/0x8e0 ? mlx5e_hwstamp_set+0xa9/0x300 [mlx5_core] mlx5e_hwstamp_set+0x194/0x300 [mlx5_core] ? dev_ioctl+0x9b/0x3d0 mlx5i_ioctl+0x37/0x60 [mlx5_core] mlx5i_pkey_ioctl+0x12/0x20 [mlx5_core] dev_ioctl+0xa9/0x3d0 sock_ioctl+0x268/0x420 __x64_sys_ioctl+0x3d8/0x790 ? lockdep_hardirqs_on_prepare+0xe4/0x190 do_syscall_64+0x2d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae
--- .../net/ethernet/mellanox/mlx5/core/en_main.c | 67 ++++++++++++++----- 1 file changed, 52 insertions(+), 15 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +52 -15
@@ -3984,11 +3984,45 @@ int mlx5e_ptp_rx_manage_fs_ctx(struct mlx5e_priv *priv, void *ctx)return mlx5e_ptp_rx_manage_fs (priv, set); } -int mlx5e_hwstamp_set (struct mlx5e_priv *priv,struct ifreq *ifr) +static int mlx5e_hwstamp_config_no_ptp_rx (struct mlx5e_priv *priv,bool rx_filter) +{ +bool rx_cqe_compress_def = priv->channels.params.rx_cqe_compress_def; +int err; + +if (!rx_filter) +/* Reset CQE compression to Admin default */ +return mlx5e_modify_rx_cqe_compression_locked (priv, rx_cqe_compress_def); + +if (!MLX5E_GET_PFLAG (&priv->channels.params,MLX5E_PFLAG_RX_CQE_COMPRESS )) +return 0 ; + +/* Disable CQE compression */ +netdev_warn (priv->netdev,"Disabling RX cqe compression\n" ); + err =mlx5e_modify_rx_cqe_compression_locked (priv, false); +if (err) +netdev_err (priv->netdev,"Failed disabling cqe compression err=%d\n" , err); + +return err; +} + +static int mlx5e_hwstamp_config_ptp_rx (struct mlx5e_priv *priv,bool ptp_rx) {struct mlx5e_params new_params; + +if (ptp_rx == priv->channels.params.ptp_rx) +return 0 ; + + new_params = priv->channels.params; + new_params.ptp_rx = ptp_rx; +return mlx5e_safe_switch_params (priv, &new_params, mlx5e_ptp_rx_manage_fs_ctx, + &new_params.ptp_rx, true); +} + +int mlx5e_hwstamp_set (struct mlx5e_priv *priv,struct ifreq *ifr) +{struct hwtstamp_config config;bool rx_cqe_compress_def; +bool ptp_rx;int err; if (!MLX5_CAP_GEN(priv->mdev, device_frequency_khz) ||
@@ -4008,13 +4042,12 @@ int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr) }mutex_lock (&priv->state_lock); - new_params = priv->channels.params; rx_cqe_compress_def = priv->channels.params.rx_cqe_compress_def;/* RX HW timestamp */ switch (config.rx_filter) {case HWTSTAMP_FILTER_NONE : - new_params.ptp_rx = false; + ptp_rx = false;break ;case HWTSTAMP_FILTER_ALL :case HWTSTAMP_FILTER_SOME :
@@ -4031,24 +4064,25 @@ int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr)case HWTSTAMP_FILTER_PTP_V2_SYNC :case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ :case HWTSTAMP_FILTER_NTP_ALL : - new_params.ptp_rx = rx_cqe_compress_def; config.rx_filter =HWTSTAMP_FILTER_ALL ; +/* ptp_rx is set if both HW TS is set and CQE +* compression is set +*/ + ptp_rx = rx_cqe_compress_def;break ;default : -mutex_unlock (&priv->state_lock); -return -ERANGE ; + err = -ERANGE ; + goto err_unlock; } -if (new_params.ptp_rx == priv->channels.params.ptp_rx) - goto out; +if (!priv->profile->rx_ptp_support) + err =mlx5e_hwstamp_config_no_ptp_rx (priv, + config.rx_filter !=HWTSTAMP_FILTER_NONE ); +else + err =mlx5e_hwstamp_config_ptp_rx (priv, ptp_rx); +if (err) + goto err_unlock; - err =mlx5e_safe_switch_params (priv, &new_params, mlx5e_ptp_rx_manage_fs_ctx, - &new_params.ptp_rx, true); -if (err) { -mutex_unlock (&priv->state_lock); -return err; - } -out:memcpy (&priv->tstamp, &config,sizeof (config));mutex_unlock (&priv->state_lock);
@@ -4057,6 +4091,9 @@ int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr)return copy_to_user (ifr->ifr_data, &config,sizeof (config)) ? -EFAULT :0 ; +err_unlock: +mutex_unlock (&priv->state_lock); +return err; }int mlx5e_hwstamp_get (struct mlx5e_priv *priv,struct ifreq *ifr)
Signature · 1 line
2.31.1
PATCH 7/8 net/mlx5e: Fix conflict with HW TS and CQE compression
In reply to Saeed MahameedFrom: Aya Levin <[email protected]>
When a driver's profile doesn't support a dedicated PTP-RQ, configuration of CQE compression while HW TS is configured should fail.
--- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +7 -0
@@ -1894,6 +1894,13 @@ int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool new_valif (curr_val == new_val)return 0 ; +if (new_val && !priv->profile->rx_ptp_support && + priv->tstamp.rx_filter !=HWTSTAMP_FILTER_NONE ) { +netdev_err (priv->netdev, +"Profile doesn't support enabling of CQE compression while hardware time-stamping is enabled.\n" ); +return -EINVAL ; + } + new_params = priv->channels.params;MLX5E_SET_PFLAG (&new_params,MLX5E_PFLAG_RX_CQE_COMPRESS , new_val);if (priv->tstamp.rx_filter !=HWTSTAMP_FILTER_NONE )
Signature · 1 line
2.31.1
PATCH 8/8 net/mlx5: DR, Create multi-destination flow table with level less than 64
In reply to Saeed MahameedFrom: Yevgeny Kliteynik <[email protected]>
Flow table that contains flow pointing to multiple flow tables or multiple TIRs must have a level lower than 64. In our case it applies to muli- destination flow table.
Fix the level of the created table to comply with HW Spec definitions, and still make sure that its level lower than SW-owned tables, so that it would be possible to point from the multi-destination FW table to SW tables.
--- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c | 3 ++- include/linux/mlx5/mlx5_ifc.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c +2 -1
@@ -112,7 +112,8 @@ int mlx5dr_fw_create_md_tbl(struct mlx5dr_domain *dmn,int ret; ft_attr.table_type =MLX5_FLOW_TABLE_TYPE_FDB ; - ft_attr.level = dmn->info.caps.max_ft_level -2 ; + ft_attr.level =min_t (int, dmn->info.caps.max_ft_level -2 , +MLX5_FT_MAX_MULTIPATH_LEVEL ); ft_attr.reformat_en = reformat_req; ft_attr.decap_en = reformat_req;
include/linux/mlx5/mlx5_ifc.h +2 -0
@@ -1289,6 +1289,8 @@ enum mlx5_fc_bulk_alloc_bitmask {#define MLX5_FC_BULK_NUM_FCS (fc_enum) (MLX5_FC_BULK_SIZE_FACTOR * (fc_enum)) +#define MLX5_FT_MAX_MULTIPATH_LEVEL 63 +enum {MLX5_STEERING_FORMAT_CONNECTX_5 =0 ,MLX5_STEERING_FORMAT_CONNECTX_6DX =1 ,
Signature · 1 line
2.31.1