From: Jason Gunthorpe <jgg@mellanox.com>
To: Saeed Mahameed <saeedm@mellanox.com>
Cc: "leon@kernel.org" <leon@kernel.org>,
"dledford@redhat.com" <dledford@redhat.com>,
Michael Guralnik <michaelgur@mellanox.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH mlx5-next 1/9] RDMA/mlx5: Move asynchronous mkey creation to mlx5_ib
Date: Thu, 27 Feb 2020 16:00:52 -0400 [thread overview]
Message-ID: <20200227200052.GR26318@mellanox.com> (raw)
In-Reply-To: <952538abb4d035fb4c60db9ea136838641b741d5.camel@mellanox.com>
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@mellanox.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@mellanox.com>
> > Signed-off-by: Leon Romanovsky <leonro@mellanox.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
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.
Jason
next prev parent reply other threads:[~2020-02-27 20:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 12:33 [PATCH rdma-next 0/9] MR cache fixes and refactoring Leon Romanovsky
2020-02-27 12:33 ` [PATCH mlx5-next 1/9] RDMA/mlx5: Move asynchronous mkey creation to mlx5_ib Leon Romanovsky
2020-02-27 19:41 ` Saeed Mahameed
2020-02-27 20:00 ` Jason Gunthorpe [this message]
2020-02-27 20:42 ` Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200227200052.GR26318@mellanox.com \
--to=jgg@mellanox.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=michaelgur@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).