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: <20210729183952.GA2408484@nvidia.com>
Date:   Thu, 29 Jul 2021 15:39:52 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     Doug Ledford <dledford@...hat.com>,
        Aharon Landau <aharonl@...dia.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Jason Wang <jasowang@...hat.com>, linux-kernel@...r.kernel.org,
        linux-rdma@...r.kernel.org, "Michael S. Tsirkin" <mst@...hat.com>,
        netdev@...r.kernel.org, Saeed Mahameed <saeedm@...dia.com>,
        Shay Drory <shayd@...dia.com>,
        virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH mlx5-next 2/5] RDMA/mlx5: Move struct mlx5_core_mkey to
 mlx5_ib

On Tue, Jun 22, 2021 at 03:08:20PM +0300, Leon Romanovsky wrote:

> diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
> index 7bb35a3d8004..af11a0d8ebc0 100644
> +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
> @@ -634,9 +634,19 @@ struct mlx5_user_mmap_entry {
>  #define mlx5_update_odp_stats(mr, counter_name, value)		\
>  	atomic64_add(value, &((mr)->odp_stats.counter_name))
>  
> +struct mlx5r_mkey {

Not mlx5_ib_mkey? mlx5_ib_odp_mkey might capture the intention of
what this is actually for.

> +	u64			iova;

IOVA is already stored in ib_mr->iova, no need to duplicate it here.

> +	u64			size;

Only one place reads size in mlx5_ib_create_xlt_wr(), and it can be
mr->ibmr.length, so delete size

> +	u32			key;
> +	u32			pd;

Lots of places write to this but nothing reads it, delete it.

> +	u32			type;

Please drop the horizontal spacing

type should be a proper enum not u32 and the values should be moved
out of driver.h as well.

ndescs should probably be added here instead of in the containing
structs since ODP needs it generically.

This patch and the one before are a good cleanup on their own so they
can get applied when they are fixed up enough. Each of the above
changes to remove fields in the mlx5r_mkey struct should be single
patches so this will little series will grow two more patches.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ