lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240906182119.GJ2097826@kernel.org>
Date: Fri, 6 Sep 2024 19:21:19 +0100
From: Simon Horman <horms@...nel.org>
To: Saeed Mahameed <saeed@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Saeed Mahameed <saeedm@...dia.com>, netdev@...r.kernel.org,
	Tariq Toukan <tariqt@...dia.com>, Gal Pressman <gal@...dia.com>,
	Leon Romanovsky <leonro@...dia.com>,
	Yevgeny Kliteynik <kliteyn@...dia.com>,
	Itamar Gozlan <igozlan@...dia.com>
Subject: Re: [net-next V2 14/15] net/mlx5: HWS, added send engine and context
 handling

On Wed, Sep 04, 2024 at 11:27:49PM -0700, Saeed Mahameed wrote:
> From: Yevgeny Kliteynik <kliteyn@...dia.com>
> 
> Added implementation of send engine and handling of HWS context.
> 
> Reviewed-by: Itamar Gozlan <igozlan@...dia.com>
> Signed-off-by: Yevgeny Kliteynik <kliteyn@...dia.com>
> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>

...

> +static int hws_send_ring_open_cq(struct mlx5_core_dev *mdev,
> +				 struct mlx5hws_send_engine *queue,
> +				 int numa_node,
> +				 struct mlx5hws_send_ring_cq *cq)
> +{
> +	void *cqc_data;
> +	int err;
> +
> +	cqc_data = kvzalloc(MLX5_ST_SZ_BYTES(cqc), GFP_KERNEL);
> +	if (!cqc_data)
> +		return -ENOMEM;
> +
> +	MLX5_SET(cqc, cqc_data, uar_page, mdev->priv.uar->index);
> +	MLX5_SET(cqc, cqc_data, cqe_sz, queue->num_entries);
> +	MLX5_SET(cqc, cqc_data, log_cq_size, ilog2(queue->num_entries));
> +
> +	err = hws_send_ring_alloc_cq(mdev, numa_node, queue, cqc_data, cq);
> +	if (err) {
> +		goto err_out;
> +		return err;

Hi Saeed, Yevgeny, all,

A minor nit: the line above cannot be reached.

Flagged by Smatch.

> +	}
> +
> +	err = hws_send_ring_create_cq(mdev, queue, cqc_data, cq);
> +	if (err)
> +		goto err_free_cq;
> +
> +	kvfree(cqc_data);
> +
> +	return 0;
> +
> +err_free_cq:
> +	mlx5_wq_destroy(&cq->wq_ctrl);
> +err_out:
> +	kvfree(cqc_data);
> +	return err;
> +}

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ