Commit 550e9a4d authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge tag 'mlx5-fixes-2022-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5 fixes 2022-08-22

This series provides bug fixes to mlx5 driver.

* tag 'mlx5-fixes-2022-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
  net/mlx5: Unlock on error in mlx5_sriov_enable()
  net/mlx5e: Fix use after free in mlx5e_fs_init()
  net/mlx5e: kTLS, Use _safe() iterator in mlx5e_tls_priv_tx_list_cleanup()
  net/mlx5: unlock on error path in esw_vfs_changed_event_handler()
  net/mlx5e: Fix wrong tc flag used when set hw-tc-offload off
  net/mlx5e: TC, Add missing policer validation
  net/mlx5e: Fix wrong application of the LRO state
  net/mlx5: Avoid false positive lockdep warning by adding lock_class_key
  net/mlx5: Fix cmd error logging for manage pages cmd
  net/mlx5: Disable irq when locking lag_lock
  net/mlx5: Eswitch, Fix forwarding decision to uplink
  net/mlx5: LAG, fix logic over MLX5_LAG_FLAG_NDEVS_READY
  net/mlx5e: Properly disable vlan strip on non-UL reps
====================

Link: https://lore.kernel.org/r/20220822195917.216025-1-saeed@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 31180678 35419025
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -79,6 +79,10 @@ tc_act_police_offload(struct mlx5e_priv *priv,
	struct mlx5e_flow_meter_handle *meter;
	int err = 0;

	err = mlx5e_policer_validate(&fl_act->action, act, fl_act->extack);
	if (err)
		return err;

	err = fill_meter_params_from_act(act, &params);
	if (err)
		return err;
+2 −2
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ static void mlx5e_tls_priv_tx_cleanup(struct mlx5e_ktls_offload_context_tx *priv
static void mlx5e_tls_priv_tx_list_cleanup(struct mlx5_core_dev *mdev,
					   struct list_head *list, int size)
{
	struct mlx5e_ktls_offload_context_tx *obj;
	struct mlx5e_ktls_offload_context_tx *obj, *n;
	struct mlx5e_async_ctx *bulk_async;
	int i;

@@ -255,7 +255,7 @@ static void mlx5e_tls_priv_tx_list_cleanup(struct mlx5_core_dev *mdev,
		return;

	i = 0;
	list_for_each_entry(obj, list, list_node) {
	list_for_each_entry_safe(obj, n, list, list_node) {
		mlx5e_tls_priv_tx_cleanup(obj, &bulk_async[i]);
		i++;
	}
+3 −2
Original line number Diff line number Diff line
@@ -1395,10 +1395,11 @@ struct mlx5e_flow_steering *mlx5e_fs_init(const struct mlx5e_profile *profile,
	}

	return fs;
err_free_fs:
	kvfree(fs);

err_free_vlan:
	mlx5e_fs_vlan_free(fs);
err_free_fs:
	kvfree(fs);
err:
	return NULL;
}
+3 −9
Original line number Diff line number Diff line
@@ -3682,7 +3682,9 @@ static int set_feature_hw_tc(struct net_device *netdev, bool enable)
	int err = 0;

#if IS_ENABLED(CONFIG_MLX5_CLS_ACT)
	if (!enable && mlx5e_tc_num_filters(priv, MLX5_TC_FLAG(NIC_OFFLOAD))) {
	int tc_flag = mlx5e_is_uplink_rep(priv) ? MLX5_TC_FLAG(ESW_OFFLOAD) :
						  MLX5_TC_FLAG(NIC_OFFLOAD);
	if (!enable && mlx5e_tc_num_filters(priv, tc_flag)) {
		netdev_err(netdev,
			   "Active offloaded tc filters, can't turn hw_tc_offload off\n");
		return -EINVAL;
@@ -4769,14 +4771,6 @@ void mlx5e_build_nic_params(struct mlx5e_priv *priv, struct mlx5e_xsk *xsk, u16
	/* RQ */
	mlx5e_build_rq_params(mdev, params);

	/* HW LRO */
	if (MLX5_CAP_ETH(mdev, lro_cap) &&
	    params->rq_wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ) {
		/* No XSK params: checking the availability of striding RQ in general. */
		if (!mlx5e_rx_mpwqe_is_linear_skb(mdev, params, NULL))
			params->packet_merge.type = slow_pci_heuristic(mdev) ?
				MLX5E_PACKET_MERGE_NONE : MLX5E_PACKET_MERGE_LRO;
	}
	params->packet_merge.timeout = mlx5e_choose_lro_timeout(mdev, MLX5E_DEFAULT_LRO_TIMEOUT);

	/* CQ moderation params */
+2 −0
Original line number Diff line number Diff line
@@ -662,6 +662,8 @@ static void mlx5e_build_rep_params(struct net_device *netdev)

	params->mqprio.num_tc       = 1;
	params->tunneled_offload_en = false;
	if (rep->vport != MLX5_VPORT_UPLINK)
		params->vlan_strip_disable = true;

	mlx5_query_min_inline(mdev, &params->tx_min_inline_mode);
}
Loading