Commit 5da45971 authored by Paolo Abeni's avatar Paolo Abeni
Browse files

Merge tag 'mlx5-fixes-2024-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5 fixes 2024-01-24

This series provides bug fixes to mlx5 driver.
Please pull and let me know if there is any problem.

* tag 'mlx5-fixes-2024-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
  net/mlx5e: fix a potential double-free in fs_any_create_groups
  net/mlx5e: fix a double-free in arfs_create_groups
  net/mlx5e: Ignore IPsec replay window values on sender side
  net/mlx5e: Allow software parsing when IPsec crypto is enabled
  net/mlx5: Use mlx5 device constant for selecting CQ period mode for ASO
  net/mlx5: DR, Can't go to uplink vport on RX rule
  net/mlx5: DR, Use the right GVMI number for drop action
  net/mlx5: Bridge, fix multicast packets sent to uplink
  net/mlx5: Fix a WARN upon a callback command failure
  net/mlx5e: Fix peer flow lists handling
  net/mlx5e: Fix inconsistent hairpin RQT sizes
  net/mlx5e: Fix operation precedence bug in port timestamping napi_poll context
  net/mlx5: Fix query of sd_group field
  net/mlx5e: Use the correct lag ports number when creating TISes
====================

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


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents fdf8e6d1 aef855df
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1923,6 +1923,7 @@ static void cmd_status_log(struct mlx5_core_dev *dev, u16 opcode, u8 status,
{
	const char *namep = mlx5_command_str(opcode);
	struct mlx5_cmd_stats *stats;
	unsigned long flags;

	if (!err || !(strcmp(namep, "unknown command opcode")))
		return;
@@ -1930,7 +1931,7 @@ static void cmd_status_log(struct mlx5_core_dev *dev, u16 opcode, u8 status,
	stats = xa_load(&dev->cmd.stats, opcode);
	if (!stats)
		return;
	spin_lock_irq(&stats->lock);
	spin_lock_irqsave(&stats->lock, flags);
	stats->failed++;
	if (err < 0)
		stats->last_failed_errno = -err;
@@ -1939,7 +1940,7 @@ static void cmd_status_log(struct mlx5_core_dev *dev, u16 opcode, u8 status,
		stats->last_failed_mbox_status = status;
		stats->last_failed_syndrome = syndrome;
	}
	spin_unlock_irq(&stats->lock);
	spin_unlock_irqrestore(&stats->lock, flags);
}

/* preserve -EREMOTEIO for outbox.status != OK, otherwise return err as is */
+1 −1
Original line number Diff line number Diff line
@@ -1124,7 +1124,7 @@ static inline bool mlx5_tx_swp_supported(struct mlx5_core_dev *mdev)
extern const struct ethtool_ops mlx5e_ethtool_ops;

int mlx5e_create_mkey(struct mlx5_core_dev *mdev, u32 pdn, u32 *mkey);
int mlx5e_create_mdev_resources(struct mlx5_core_dev *mdev);
int mlx5e_create_mdev_resources(struct mlx5_core_dev *mdev, bool create_tises);
void mlx5e_destroy_mdev_resources(struct mlx5_core_dev *mdev);
int mlx5e_refresh_tirs(struct mlx5e_priv *priv, bool enable_uc_lb,
		       bool enable_mc_lb);
+1 −0
Original line number Diff line number Diff line
@@ -436,6 +436,7 @@ static int fs_any_create_groups(struct mlx5e_flow_table *ft)
	in = kvzalloc(inlen, GFP_KERNEL);
	if  (!in || !ft->g) {
		kfree(ft->g);
		ft->g = NULL;
		kvfree(in);
		return -ENOMEM;
	}
+2 −2
Original line number Diff line number Diff line
@@ -1064,8 +1064,8 @@ void mlx5e_build_sq_param(struct mlx5_core_dev *mdev,
	void *wq = MLX5_ADDR_OF(sqc, sqc, wq);
	bool allow_swp;

	allow_swp =
		mlx5_geneve_tx_allowed(mdev) || !!mlx5_ipsec_device_caps(mdev);
	allow_swp = mlx5_geneve_tx_allowed(mdev) ||
		    (mlx5_ipsec_device_caps(mdev) & MLX5_IPSEC_CAP_CRYPTO);
	mlx5e_build_sq_param_common(mdev, param);
	MLX5_SET(wq, wq, log_wq_sz, params->log_sq_size);
	MLX5_SET(sqc, sqc, allow_swp, allow_swp);
+1 −1
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ static void mlx5e_ptp_handle_ts_cqe(struct mlx5e_ptpsq *ptpsq,
	mlx5e_ptpsq_mark_ts_cqes_undelivered(ptpsq, hwtstamp);
out:
	napi_consume_skb(skb, budget);
	md_buff[*md_buff_sz++] = metadata_id;
	md_buff[(*md_buff_sz)++] = metadata_id;
	if (unlikely(mlx5e_ptp_metadata_map_unhealthy(&ptpsq->metadata_map)) &&
	    !test_and_set_bit(MLX5E_SQ_STATE_RECOVERING, &sq->state))
		queue_work(ptpsq->txqsq.priv->wq, &ptpsq->report_unhealthy_work);
Loading