Commit b523f23f authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'mlx5-updates-2024-09-11'

Saeed Mahameed says:

====================
Misc updates to mlx5 driver:

1) Fix HW steering ret value and align with kdoc
2) Flow steering cleanups and add support for no append at software level
3) Support for sync reset using hot reset
4) RX SW counter to cover no-split events in header/data split mode
5) Make affinity of SFs configurable
====================

Link: https://patch.msgid.link/20240911201757.1505453-1-saeed@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents f0c7de5a cc181291
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -218,6 +218,22 @@ the software port.
       [#accel]_.
     - Informative

   * - `rx[i]_hds_nosplit_packets`
     - Number of packets that were not split in header/data split mode. A
       packet will not get split when the hardware does not support its
       protocol splitting. An example such a protocol is ICMPv4/v6. Currently
       TCP and UDP with IPv4/IPv6 are supported for header/data split
       [#accel]_.
     - Informative

   * - `rx[i]_hds_nosplit_bytes`
     - Number of bytes for packets that were not split in header/data split
       mode. A packet will not get split when the hardware does not support its
       protocol splitting. An example such a protocol is ICMPv4/v6. Currently
       TCP and UDP with IPv4/IPv6 are supported for header/data split
       [#accel]_.
     - Informative

   * - `rx[i]_lro_packets`
     - The number of LRO packets received on ring i [#accel]_.
     - Acceleration
+6 −1
Original line number Diff line number Diff line
@@ -754,6 +754,8 @@ static const char *cmd_status_str(u8 status)
		return "bad resource";
	case MLX5_CMD_STAT_RES_BUSY:
		return "resource busy";
	case MLX5_CMD_STAT_NOT_READY:
		return "FW not ready";
	case MLX5_CMD_STAT_LIM_ERR:
		return "limits exceeded";
	case MLX5_CMD_STAT_BAD_RES_STATE_ERR:
@@ -787,6 +789,7 @@ static int cmd_status_to_err(u8 status)
	case MLX5_CMD_STAT_BAD_SYS_STATE_ERR:		return -EIO;
	case MLX5_CMD_STAT_BAD_RES_ERR:			return -EINVAL;
	case MLX5_CMD_STAT_RES_BUSY:			return -EBUSY;
	case MLX5_CMD_STAT_NOT_READY:			return -EAGAIN;
	case MLX5_CMD_STAT_LIM_ERR:			return -ENOMEM;
	case MLX5_CMD_STAT_BAD_RES_STATE_ERR:		return -EINVAL;
	case MLX5_CMD_STAT_IX_ERR:			return -EINVAL;
@@ -815,14 +818,16 @@ EXPORT_SYMBOL(mlx5_cmd_out_err);
static void cmd_status_print(struct mlx5_core_dev *dev, void *in, void *out)
{
	u16 opcode, op_mod;
	u8 status;
	u16 uid;

	opcode = in_to_opcode(in);
	op_mod = MLX5_GET(mbox_in, in, op_mod);
	uid    = MLX5_GET(mbox_in, in, uid);
	status = MLX5_GET(mbox_out, out, status);

	if (!uid && opcode != MLX5_CMD_OP_DESTROY_MKEY &&
	    opcode != MLX5_CMD_OP_CREATE_UCTX)
	    opcode != MLX5_CMD_OP_CREATE_UCTX && status != MLX5_CMD_STAT_NOT_READY)
		mlx5_cmd_out_err(dev, opcode, op_mod, out);
}

+4 −4
Original line number Diff line number Diff line
@@ -203,10 +203,10 @@ TRACE_EVENT(mlx5_fs_set_fte,
			   fs_get_obj(__entry->fg, fte->node.parent);
			   __entry->group_index = __entry->fg->id;
			   __entry->index = fte->index;
			   __entry->action = fte->action.action;
			   __entry->action = fte->act_dests.action.action;
			   __entry->mask_enable = __entry->fg->mask.match_criteria_enable;
			   __entry->flow_tag = fte->flow_context.flow_tag;
			   __entry->flow_source = fte->flow_context.flow_source;
			   __entry->flow_tag = fte->act_dests.flow_context.flow_tag;
			   __entry->flow_source = fte->act_dests.flow_context.flow_source;
			   memcpy(__entry->mask_outer,
				  MLX5_ADDR_OF(fte_match_param,
					       &__entry->fg->mask.match_criteria,
@@ -284,7 +284,7 @@ TRACE_EVENT(mlx5_fs_add_rule,
	    TP_fast_assign(
			   __entry->rule = rule;
			   fs_get_obj(__entry->fte, rule->node.parent);
			   __entry->index = __entry->fte->dests_size - 1;
			   __entry->index = __entry->fte->act_dests.dests_size - 1;
			   __entry->sw_action = rule->sw_action;
			   memcpy(__entry->destination,
				  &rule->dest_attr,
+13 −12
Original line number Diff line number Diff line
@@ -1016,30 +1016,31 @@ static int mlx5e_alloc_rq(struct mlx5e_params *params,

static void mlx5e_free_rq(struct mlx5e_rq *rq)
{
	struct bpf_prog *old_prog;

	if (xdp_rxq_info_is_reg(&rq->xdp_rxq)) {
		old_prog = rcu_dereference_protected(rq->xdp_prog,
						     lockdep_is_held(&rq->priv->state_lock));
		if (old_prog)
			bpf_prog_put(old_prog);
	}
	kvfree(rq->dim);
	page_pool_destroy(rq->page_pool);

	switch (rq->wq_type) {
	case MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ:
		mlx5e_rq_free_shampo(rq);
		kvfree(rq->mpwqe.info);
		mlx5_core_destroy_mkey(rq->mdev, be32_to_cpu(rq->mpwqe.umr_mkey_be));
		mlx5e_free_mpwqe_rq_drop_page(rq);
		mlx5e_rq_free_shampo(rq);
		break;
	default: /* MLX5_WQ_TYPE_CYCLIC */
		mlx5e_free_wqe_alloc_info(rq);
	}

	kvfree(rq->dim);
	xdp_rxq_info_unreg(&rq->xdp_rxq);
	page_pool_destroy(rq->page_pool);
	mlx5_wq_destroy(&rq->wq_ctrl);

	if (xdp_rxq_info_is_reg(&rq->xdp_rxq)) {
		struct bpf_prog *old_prog;

		old_prog = rcu_dereference_protected(rq->xdp_prog,
						     lockdep_is_held(&rq->priv->state_lock));
		if (old_prog)
			bpf_prog_put(old_prog);
	}
	xdp_rxq_info_unreg(&rq->xdp_rxq);
}

int mlx5e_create_rq(struct mlx5e_rq *rq, struct mlx5e_rq_param *param, u16 q_counter)
+3 −0
Original line number Diff line number Diff line
@@ -2346,6 +2346,9 @@ static void mlx5e_handle_rx_cqe_mpwrq_shampo(struct mlx5e_rq *rq, struct mlx5_cq
			stats->hds_nodata_packets++;
			stats->hds_nodata_bytes += head_size;
		}
	} else {
		stats->hds_nosplit_packets++;
		stats->hds_nosplit_bytes += data_bcnt;
	}

	mlx5e_shampo_complete_rx_cqe(rq, cqe, cqe_bcnt, *skb);
Loading