Commit 0d2be75c authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge tag 'mlx5-fixes-2023-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5 fixes 2023-03-15

This series provides bug fixes to mlx5 driver.

* tag 'mlx5-fixes-2023-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
  net/mlx5e: TC, Remove error message log print
  net/mlx5e: TC, fix cloned flow attribute
  net/mlx5e: TC, fix missing error code
  net/sched: TC, fix raw counter initialization
  net/mlx5e: Lower maximum allowed MTU in XSK to match XDP prerequisites
  net/mlx5: Set BREAK_FW_WAIT flag first when removing driver
  net/mlx5e: kTLS, Fix missing error unwind on unsupported cipher type
  net/mlx5e: Fix cleanup null-ptr deref on encap lock
  net/mlx5: E-switch, Fix missing set of split_count when forward to ovs internal port
  net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rules
  net/mlx5: Disable eswitch before waiting for VF pages
  net/mlx5: Fix setting ec_function bit in MANAGE_PAGES
  net/mlx5e: Don't cache tunnel offloads capability
  net/mlx5e: Fix macsec ASO context alignment
====================

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


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 1b0120e4 c7b7c64a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -313,7 +313,6 @@ struct mlx5e_params {
		} channel;
	} mqprio;
	bool rx_cqe_compress_def;
	bool tunneled_offload_en;
	struct dim_cq_moder rx_cq_moderation;
	struct dim_cq_moder tx_cq_moderation;
	struct mlx5e_packet_merge_param packet_merge;
+0 −1
Original line number Diff line number Diff line
@@ -178,7 +178,6 @@ tc_act_police_stats(struct mlx5e_priv *priv,
	meter = mlx5e_tc_meter_get(priv->mdev, &params);
	if (IS_ERR(meter)) {
		NL_SET_ERR_MSG_MOD(fl_act->extack, "Failed to get flow meter");
		mlx5_core_err(priv->mdev, "Failed to get flow meter %d\n", params.index);
		return PTR_ERR(meter);
	}

+5 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ mlx5e_tc_act_stats_add(struct mlx5e_tc_act_stats_handle *handle,
{
	struct mlx5e_tc_act_stats *act_stats, *old_act_stats;
	struct rhashtable *ht = &handle->ht;
	u64 lastused;
	int err = 0;

	act_stats = kvzalloc(sizeof(*act_stats), GFP_KERNEL);
@@ -73,6 +74,10 @@ mlx5e_tc_act_stats_add(struct mlx5e_tc_act_stats_handle *handle,
	act_stats->tc_act_cookie = act_cookie;
	act_stats->counter = counter;

	mlx5_fc_query_cached_raw(counter,
				 &act_stats->lastbytes,
				 &act_stats->lastpackets, &lastused);

	rcu_read_lock();
	old_act_stats = rhashtable_lookup_get_insert_fast(ht,
							  &act_stats->hash,
+13 −11
Original line number Diff line number Diff line
@@ -621,15 +621,6 @@ int mlx5e_ktls_add_rx(struct net_device *netdev, struct sock *sk,
	if (unlikely(!priv_rx))
		return -ENOMEM;

	dek = mlx5_ktls_create_key(priv->tls->dek_pool, crypto_info);
	if (IS_ERR(dek)) {
		err = PTR_ERR(dek);
		goto err_create_key;
	}
	priv_rx->dek = dek;

	INIT_LIST_HEAD(&priv_rx->list);
	spin_lock_init(&priv_rx->lock);
	switch (crypto_info->cipher_type) {
	case TLS_CIPHER_AES_GCM_128:
		priv_rx->crypto_info.crypto_info_128 =
@@ -642,9 +633,20 @@ int mlx5e_ktls_add_rx(struct net_device *netdev, struct sock *sk,
	default:
		WARN_ONCE(1, "Unsupported cipher type %u\n",
			  crypto_info->cipher_type);
		return -EOPNOTSUPP;
		err = -EOPNOTSUPP;
		goto err_cipher_type;
	}

	dek = mlx5_ktls_create_key(priv->tls->dek_pool, crypto_info);
	if (IS_ERR(dek)) {
		err = PTR_ERR(dek);
		goto err_cipher_type;
	}
	priv_rx->dek = dek;

	INIT_LIST_HEAD(&priv_rx->list);
	spin_lock_init(&priv_rx->lock);

	rxq = mlx5e_ktls_sk_get_rxq(sk);
	priv_rx->rxq = rxq;
	priv_rx->sk = sk;
@@ -677,7 +679,7 @@ int mlx5e_ktls_add_rx(struct net_device *netdev, struct sock *sk,
	mlx5e_tir_destroy(&priv_rx->tir);
err_create_tir:
	mlx5_ktls_destroy_key(priv->tls->dek_pool, priv_rx->dek);
err_create_key:
err_cipher_type:
	kfree(priv_rx);
	return err;
}
+12 −10
Original line number Diff line number Diff line
@@ -469,14 +469,6 @@ int mlx5e_ktls_add_tx(struct net_device *netdev, struct sock *sk,
	if (IS_ERR(priv_tx))
		return PTR_ERR(priv_tx);

	dek = mlx5_ktls_create_key(priv->tls->dek_pool, crypto_info);
	if (IS_ERR(dek)) {
		err = PTR_ERR(dek);
		goto err_create_key;
	}
	priv_tx->dek = dek;

	priv_tx->expected_seq = start_offload_tcp_sn;
	switch (crypto_info->cipher_type) {
	case TLS_CIPHER_AES_GCM_128:
		priv_tx->crypto_info.crypto_info_128 =
@@ -489,8 +481,18 @@ int mlx5e_ktls_add_tx(struct net_device *netdev, struct sock *sk,
	default:
		WARN_ONCE(1, "Unsupported cipher type %u\n",
			  crypto_info->cipher_type);
		return -EOPNOTSUPP;
		err = -EOPNOTSUPP;
		goto err_pool_push;
	}

	dek = mlx5_ktls_create_key(priv->tls->dek_pool, crypto_info);
	if (IS_ERR(dek)) {
		err = PTR_ERR(dek);
		goto err_pool_push;
	}

	priv_tx->dek = dek;
	priv_tx->expected_seq = start_offload_tcp_sn;
	priv_tx->tx_ctx = tls_offload_ctx_tx(tls_ctx);

	mlx5e_set_ktls_tx_priv_ctx(tls_ctx, priv_tx);
@@ -500,7 +502,7 @@ int mlx5e_ktls_add_tx(struct net_device *netdev, struct sock *sk,

	return 0;

err_create_key:
err_pool_push:
	pool_push(pool, priv_tx);
	return err;
}
Loading