All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Doug Ledford <dledford@redhat.com>,
	Alex Vesker <valex@nvidia.com>,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next 2/3] RDMA/mlx5: Allow DM allocation for sw_owner_v2 enabled devices
Date: Wed, 16 Sep 2020 12:33:30 +0300	[thread overview]
Message-ID: <20200916093330.GF486552@unreal> (raw)
In-Reply-To: <20200915200447.GA1592810@nvidia.com>

On Tue, Sep 15, 2020 at 05:04:47PM -0300, Jason Gunthorpe wrote:
> On Thu, Sep 03, 2020 at 10:38:56AM +0300, Leon Romanovsky wrote:
> > From: Alex Vesker <valex@nvidia.com>
> >
> > sw_owner_v2 will replace sw_owner for future devices, this means
> > that if sw_owner_v2 is set sw_owner should be ignored and DM
> > allocation is required for sw_owner_v2 devices to function.
> >
> > Signed-off-by: Alex Vesker <valex@nvidia.com>
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> >  drivers/infiniband/hw/mlx5/main.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> > index 99dbef0bccbc..8963b806ad19 100644
> > +++ b/drivers/infiniband/hw/mlx5/main.c
> > @@ -2343,7 +2343,9 @@ static inline int check_dm_type_support(struct mlx5_ib_dev *dev,
> >  			return -EPERM;
> >
> >  		if (!(MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, sw_owner) ||
> > -		      MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner)))
> > +		      MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner) ||
> > +		      MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, sw_owner_v2) ||
> > +		      MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner_v2)))
> >  			return -EOPNOTSUPP;
>
> Shouldn't user space ask for MLX5_IB_UAPI_DM_TYPE_STEERING_SW_V2_ICM
> types too?

For sw_owner_v2 devices, we will return exactly same type of DM,
so there is no need for a new one. The change is to allow creation
of such DM in addition to existing sw_owner devices.


>
> What happens if old user space runs on a new device?

Old userspace will have sw_owner_v2 cap enabled and will get DM as before.
The patch diff is hard to read but the end result will be.
	if (!(MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, sw_owner) ||
	      MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner) ||
	      MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, sw_owner_v2) ||
	      MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner_v2)))
		return -EOPNOTSUPP;

DevX users are expected to check capabilities and be ready to work with missing ones.

Thanks

>
> Jason

  reply	other threads:[~2020-09-16  9:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03  7:38 [PATCH rdma-next 0/3] Extend mlx5_ib software steering interface Leon Romanovsky
2020-09-03  7:38 ` [PATCH mlx5-next 1/3] RDMA/mlx5: Add sw_owner_v2 bit capability Leon Romanovsky
2020-09-03  7:38 ` [PATCH rdma-next 2/3] RDMA/mlx5: Allow DM allocation for sw_owner_v2 enabled devices Leon Romanovsky
2020-09-15 20:04   ` Jason Gunthorpe
2020-09-16  9:33     ` Leon Romanovsky [this message]
2020-09-03  7:38 ` [PATCH rdma-next 3/3] RDMA/mlx5: Expose TIR and QP ICM address for sw_owner_v2 devices Leon Romanovsky
2020-09-17 18:10 ` [PATCH rdma-next 0/3] Extend mlx5_ib software steering interface Jason Gunthorpe
2020-09-17 18:13   ` Leon Romanovsky
2020-09-18 13:42     ` Jason Gunthorpe

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=20200916093330.GF486552@unreal \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=valex@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.