mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
mlx5-fixes-2019-05-28
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEEGhZs6bAKwk/OTgTpSD+KveBX+j4FAlzt35YACgkQSD+KveBX
+j5EWggAxj7KBci9zS/6eTUobCti2ClRXp1eDyG+ZWFF7+quSfWsexxqdDJbWVQ5
uwZcOC9EMjfOhrLEAWMkhD0xDMHk//ckE8bF7s2LWYmUuVK+2JigPPfsgHbCKBUo
qTEpxWItdMV90jyFOxTrcuRvcLBEbx03ZTaZRf5CRoI+jpmN9MhBonRQeiwVExUc
00BLVDG57X/aE6XGU5/ciCtcBfOS+ThuoU30Xvfju0pEn/1IHLNk/WS0hJujbBP1
IOA++0uk3FtU7RaD9FnkEnnfYSVjMVybg7HeL/pt5aEf3aIJNSa3VdrUbXhvnsYM
1NfFQDtrxzEGY2QXfDxDM3Ct7IYbjg==
=2Src
-----END PGP SIGNATURE-----
Merge tag 'mlx5-fixes-2019-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux
Saeed Mahameed says:
====================
Mellanox, mlx5 fixes 2019-05-28
This series introduces some fixes to mlx5 driver.
Please pull and let me know if there is any problem.
For -stable v4.13:
('net/mlx5: Allocate root ns memory using kzalloc to match kfree')
For -stable v4.16:
('net/mlx5: Avoid double free in fs init error unwinding path')
For -stable v4.18:
('net/mlx5e: Disable rxhash when CQE compress is enabled')
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
200c675863
|
|
@ -3687,6 +3687,12 @@ static netdev_features_t mlx5e_fix_features(struct net_device *netdev,
|
|||
netdev_warn(netdev, "Disabling LRO, not supported in legacy RQ\n");
|
||||
}
|
||||
|
||||
if (MLX5E_GET_PFLAG(params, MLX5E_PFLAG_RX_CQE_COMPRESS)) {
|
||||
features &= ~NETIF_F_RXHASH;
|
||||
if (netdev->features & NETIF_F_RXHASH)
|
||||
netdev_warn(netdev, "Disabling rxhash, not supported when CQE compress is active\n");
|
||||
}
|
||||
|
||||
mutex_unlock(&priv->state_lock);
|
||||
|
||||
return features;
|
||||
|
|
@ -3812,6 +3818,9 @@ int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr)
|
|||
memcpy(&priv->tstamp, &config, sizeof(config));
|
||||
mutex_unlock(&priv->state_lock);
|
||||
|
||||
/* might need to fix some features */
|
||||
netdev_update_features(priv->netdev);
|
||||
|
||||
return copy_to_user(ifr->ifr_data, &config,
|
||||
sizeof(config)) ? -EFAULT : 0;
|
||||
}
|
||||
|
|
@ -4680,6 +4689,10 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
|
|||
if (!priv->channels.params.scatter_fcs_en)
|
||||
netdev->features &= ~NETIF_F_RXFCS;
|
||||
|
||||
/* prefere CQE compression over rxhash */
|
||||
if (MLX5E_GET_PFLAG(&priv->channels.params, MLX5E_PFLAG_RX_CQE_COMPRESS))
|
||||
netdev->features &= ~NETIF_F_RXHASH;
|
||||
|
||||
#define FT_CAP(f) MLX5_CAP_FLOWTABLE(mdev, flow_table_properties_nic_receive.f)
|
||||
if (FT_CAP(flow_modify_en) &&
|
||||
FT_CAP(modify_root) &&
|
||||
|
|
|
|||
|
|
@ -813,7 +813,7 @@ static int mlx5e_nic_rep_netdevice_event(struct notifier_block *nb,
|
|||
struct net_device *netdev = netdev_notifier_info_to_dev(ptr);
|
||||
|
||||
if (!mlx5e_tc_tun_device_to_offload(priv, netdev) &&
|
||||
!is_vlan_dev(netdev))
|
||||
!(is_vlan_dev(netdev) && vlan_dev_real_dev(netdev) == rpriv->netdev))
|
||||
return NOTIFY_OK;
|
||||
|
||||
switch (event) {
|
||||
|
|
|
|||
|
|
@ -2284,7 +2284,7 @@ static struct mlx5_flow_root_namespace
|
|||
cmds = mlx5_fs_cmd_get_default_ipsec_fpga_cmds(table_type);
|
||||
|
||||
/* Create the root namespace */
|
||||
root_ns = kvzalloc(sizeof(*root_ns), GFP_KERNEL);
|
||||
root_ns = kzalloc(sizeof(*root_ns), GFP_KERNEL);
|
||||
if (!root_ns)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -2427,6 +2427,7 @@ static void cleanup_egress_acls_root_ns(struct mlx5_core_dev *dev)
|
|||
cleanup_root_ns(steering->esw_egress_root_ns[i]);
|
||||
|
||||
kfree(steering->esw_egress_root_ns);
|
||||
steering->esw_egress_root_ns = NULL;
|
||||
}
|
||||
|
||||
static void cleanup_ingress_acls_root_ns(struct mlx5_core_dev *dev)
|
||||
|
|
@ -2441,6 +2442,7 @@ static void cleanup_ingress_acls_root_ns(struct mlx5_core_dev *dev)
|
|||
cleanup_root_ns(steering->esw_ingress_root_ns[i]);
|
||||
|
||||
kfree(steering->esw_ingress_root_ns);
|
||||
steering->esw_ingress_root_ns = NULL;
|
||||
}
|
||||
|
||||
void mlx5_cleanup_fs(struct mlx5_core_dev *dev)
|
||||
|
|
@ -2474,11 +2476,7 @@ static int init_sniffer_tx_root_ns(struct mlx5_flow_steering *steering)
|
|||
|
||||
/* Create single prio */
|
||||
prio = fs_create_prio(&steering->sniffer_tx_root_ns->ns, 0, 1);
|
||||
if (IS_ERR(prio)) {
|
||||
cleanup_root_ns(steering->sniffer_tx_root_ns);
|
||||
return PTR_ERR(prio);
|
||||
}
|
||||
return 0;
|
||||
return PTR_ERR_OR_ZERO(prio);
|
||||
}
|
||||
|
||||
static int init_sniffer_rx_root_ns(struct mlx5_flow_steering *steering)
|
||||
|
|
@ -2491,11 +2489,7 @@ static int init_sniffer_rx_root_ns(struct mlx5_flow_steering *steering)
|
|||
|
||||
/* Create single prio */
|
||||
prio = fs_create_prio(&steering->sniffer_rx_root_ns->ns, 0, 1);
|
||||
if (IS_ERR(prio)) {
|
||||
cleanup_root_ns(steering->sniffer_rx_root_ns);
|
||||
return PTR_ERR(prio);
|
||||
}
|
||||
return 0;
|
||||
return PTR_ERR_OR_ZERO(prio);
|
||||
}
|
||||
|
||||
static int init_rdma_rx_root_ns(struct mlx5_flow_steering *steering)
|
||||
|
|
@ -2511,11 +2505,7 @@ static int init_rdma_rx_root_ns(struct mlx5_flow_steering *steering)
|
|||
|
||||
/* Create single prio */
|
||||
prio = fs_create_prio(&steering->rdma_rx_root_ns->ns, 0, 1);
|
||||
if (IS_ERR(prio)) {
|
||||
cleanup_root_ns(steering->rdma_rx_root_ns);
|
||||
return PTR_ERR(prio);
|
||||
}
|
||||
return 0;
|
||||
return PTR_ERR_OR_ZERO(prio);
|
||||
}
|
||||
static int init_fdb_root_ns(struct mlx5_flow_steering *steering)
|
||||
{
|
||||
|
|
@ -2637,6 +2627,7 @@ static int init_egress_acls_root_ns(struct mlx5_core_dev *dev)
|
|||
for (i--; i >= 0; i--)
|
||||
cleanup_root_ns(steering->esw_egress_root_ns[i]);
|
||||
kfree(steering->esw_egress_root_ns);
|
||||
steering->esw_egress_root_ns = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -2664,6 +2655,7 @@ static int init_ingress_acls_root_ns(struct mlx5_core_dev *dev)
|
|||
for (i--; i >= 0; i--)
|
||||
cleanup_root_ns(steering->esw_ingress_root_ns[i]);
|
||||
kfree(steering->esw_ingress_root_ns);
|
||||
steering->esw_ingress_root_ns = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1067,7 +1067,7 @@ static int mlx5_load(struct mlx5_core_dev *dev)
|
|||
err = mlx5_core_set_hca_defaults(dev);
|
||||
if (err) {
|
||||
mlx5_core_err(dev, "Failed to set hca defaults\n");
|
||||
goto err_fs;
|
||||
goto err_sriov;
|
||||
}
|
||||
|
||||
err = mlx5_sriov_attach(dev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user