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] [day] [month] [year] [list]
Message-ID: <7b0e0f4b76330558d83163bc6c83fb6867dbdde1.camel@mellanox.com>
Date:   Thu, 27 Feb 2020 20:42:13 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     Jason Gunthorpe <jgg@...lanox.com>
CC:     Michael Guralnik <michaelgur@...lanox.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "leon@...nel.org" <leon@...nel.org>,
        "dledford@...hat.com" <dledford@...hat.com>
Subject: Re: [PATCH mlx5-next 1/9] RDMA/mlx5: Move asynchronous mkey creation
 to mlx5_ib

On Thu, 2020-02-27 at 16:00 -0400, Jason Gunthorpe wrote:
> On Thu, Feb 27, 2020 at 07:41:24PM +0000, Saeed Mahameed wrote:
> > On Thu, 2020-02-27 at 14:33 +0200, Leon Romanovsky wrote:
> > > From: Michael Guralnik <michaelgur@...lanox.com>
> > > 
> > > As mlx5_ib is the only user of the mlx5_core_create_mkey_cb, move
> > > the
> > > logic inside mlx5_ib and cleanup the code in mlx5_core.
> > > 
> > 
> > I have a WIP series that is moving the whole mr.c to mlx5_ib.
> > https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/log/?h=topic/mr-relocate
> > 
> > 
> > > Signed-off-by: Michael Guralnik <michaelgur@...lanox.com>
> > > Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
> > >  drivers/infiniband/hw/mlx5/mr.c              | 25
> > > ++++++++++++++++
> > >  drivers/net/ethernet/mellanox/mlx5/core/mr.c | 22 +++-----------
> > > ---
> > >  include/linux/mlx5/driver.h                  |  6 -----
> > >  3 files changed, 24 insertions(+), 29 deletions(-)
> > > 
> > > diff --git a/drivers/infiniband/hw/mlx5/mr.c
> > > b/drivers/infiniband/hw/mlx5/mr.c
> > > index 6fa0a83c19de..dea14477a676 100644
> > > +++ b/drivers/infiniband/hw/mlx5/mr.c
> > > @@ -79,6 +79,25 @@ static bool use_umr_mtt_update(struct
> > > mlx5_ib_mr
> > > *mr, u64 start, u64 length)
> > >  		length + (start & (MLX5_ADAPTER_PAGE_SIZE - 1));
> > >  }
> > >  
> > > +static int create_mkey_cb(struct mlx5_core_dev *dev, struct
> > > mlx5_ib_mr *mr,
> > > +			  struct mlx5_async_ctx *async_ctx, u32 *in,
> > > int inlen,
> > > +			  mlx5_async_cbk_t callback)
> > > +{
> > > +	void *mkc;
> > > +	u8 key;
> > > +
> > > +	spin_lock_irq(&dev->priv.mkey_lock);
> > > +	key = dev->priv.mkey_key++;
> > 
> > you know i don't like mlx5_ib sniffing around mlx5_core->priv .. 
> > 
> > this is handled correctly in my series, i can rebase it and make it
> > ready in a couple of days.. let me know if this will be good enough
> > for
> > you.
> 
> How about Michael just take the two relevant patches into this series
> 
> {IB,net}/mlx5: Setup mkey variant before mr create command invocation
> {IB,net}/mlx5: Assign mkey variant in mlx5_ib only
> 

Also, IB/mlx5: Replace spinlock protected write with atomic var

it is a good one :)

> And this partially moves toward your series. It will be more than a
> few days to rebase and check all the parts of your series I think.

Okay.

-Saeed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ