Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 537f3210 authored by Saeed Mahameed's avatar Saeed Mahameed
Browse files
mlx5 HW spec and bits updates:
1) Aya exposes IP-in-IP capability in mlx5_core.
2) Maxim exposes lag tx port affinity capabilities.
3) Moshe adds VNIC_ENV internal rq counter bits.
4) ODP capabilities for DC transport

Misc updates:
5) Saeed, two compiler warnings cleanups
6) Add XRQ legacy commands opcodes
7) Use refcount_t for refcount
8) fix a -Wstringop-truncation warning
parents 00ebd499 00679b63
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -922,6 +922,7 @@ static bool devx_is_general_cmd(void *in, struct mlx5_ib_dev *dev)
	case MLX5_CMD_OP_QUERY_CONG_STATUS:
	case MLX5_CMD_OP_QUERY_CONG_PARAMS:
	case MLX5_CMD_OP_QUERY_CONG_STATISTICS:
	case MLX5_CMD_OP_QUERY_LAG:
		return true;
	default:
		return false;
+3 −3
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ struct mlx5_core_srq *mlx5_cmd_get_srq(struct mlx5_ib_dev *dev, u32 srqn)
	xa_lock(&table->array);
	srq = xa_load(&table->array, srqn);
	if (srq)
		atomic_inc(&srq->common.refcount);
		refcount_inc(&srq->common.refcount);
	xa_unlock(&table->array);

	return srq;
@@ -592,7 +592,7 @@ int mlx5_cmd_create_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
	if (err)
		return err;

	atomic_set(&srq->common.refcount, 1);
	refcount_set(&srq->common.refcount, 1);
	init_completion(&srq->common.free);

	err = xa_err(xa_store_irq(&table->array, srq->srqn, srq, GFP_KERNEL));
@@ -675,7 +675,7 @@ static int srq_event_notifier(struct notifier_block *nb,
	xa_lock(&table->array);
	srq = xa_load(&table->array, srqn);
	if (srq)
		atomic_inc(&srq->common.refcount);
		refcount_inc(&srq->common.refcount);
	xa_unlock(&table->array);

	if (!srq)
+4 −0
Original line number Diff line number Diff line
@@ -446,6 +446,8 @@ static int mlx5_internal_err_ret_value(struct mlx5_core_dev *dev, u16 op,
	case MLX5_CMD_OP_CREATE_UMEM:
	case MLX5_CMD_OP_DESTROY_UMEM:
	case MLX5_CMD_OP_ALLOC_MEMIC:
	case MLX5_CMD_OP_MODIFY_XRQ:
	case MLX5_CMD_OP_RELEASE_XRQ_ERROR:
		*status = MLX5_DRIVER_STATUS_ABORTED;
		*synd = MLX5_DRIVER_SYND;
		return -EIO;
@@ -637,6 +639,8 @@ const char *mlx5_command_str(int command)
	MLX5_COMMAND_STR_CASE(DESTROY_UCTX);
	MLX5_COMMAND_STR_CASE(CREATE_UMEM);
	MLX5_COMMAND_STR_CASE(DESTROY_UMEM);
	MLX5_COMMAND_STR_CASE(RELEASE_XRQ_ERROR);
	MLX5_COMMAND_STR_CASE(MODIFY_XRQ);
	default: return "unknown command opcode";
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -546,7 +546,7 @@ static void mlx5_fw_tracer_save_trace(struct mlx5_fw_tracer *tracer,
	trace_data->timestamp = timestamp;
	trace_data->lost = lost;
	trace_data->event_id = event_id;
	strncpy(trace_data->msg, msg, TRACE_STR_MSG);
	strscpy_pad(trace_data->msg, msg, TRACE_STR_MSG);

	tracer->st_arr.saved_traces_index =
		(tracer->st_arr.saved_traces_index + 1) & (SAVED_TRACES_NUM - 1);
+13 −9
Original line number Diff line number Diff line
@@ -324,10 +324,13 @@ create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq,

/**
 * mlx5_eq_enable - Enable EQ for receiving EQEs
 * @dev - Device which owns the eq
 * @eq - EQ to enable
 * @nb - notifier call block
 * mlx5_eq_enable - must be called after EQ is created in device.
 * @dev : Device which owns the eq
 * @eq  : EQ to enable
 * @nb  : Notifier call block
 *
 * Must be called after EQ is created in device.
 *
 * @return: 0 if no error
 */
int mlx5_eq_enable(struct mlx5_core_dev *dev, struct mlx5_eq *eq,
		   struct notifier_block *nb)
@@ -344,11 +347,12 @@ int mlx5_eq_enable(struct mlx5_core_dev *dev, struct mlx5_eq *eq,
EXPORT_SYMBOL(mlx5_eq_enable);

/**
 * mlx5_eq_disable - Enable EQ for receiving EQEs
 * @dev - Device which owns the eq
 * @eq - EQ to disable
 * @nb - notifier call block
 * mlx5_eq_disable - must be called before EQ is destroyed.
 * mlx5_eq_disable - Disable EQ for receiving EQEs
 * @dev : Device which owns the eq
 * @eq  : EQ to disable
 * @nb  : Notifier call block
 *
 * Must be called before EQ is destroyed.
 */
void mlx5_eq_disable(struct mlx5_core_dev *dev, struct mlx5_eq *eq,
		     struct notifier_block *nb)
Loading