linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bernard Metzler" <BMT@zurich.ibm.com>
To: "Leon Romanovsky" <leon@kernel.org>
Cc: "Doug Ledford" <dledford@redhat.com>,
	"Jason Gunthorpe" <jgg@nvidia.com>,
	"Adit Ranadive" <aditr@vmware.com>,
	"Ariel Elior" <aelior@marvell.com>,
	"Christian Benvenuti" <benve@cisco.com>,
	"Dennis Dalessandro" <dennis.dalessandro@intel.com>,
	"Devesh Sharma" <devesh.sharma@broadcom.com>,
	"Faisal Latif" <faisal.latif@intel.com>,
	"Gal Pressman" <galpress@amazon.com>,
	"Lijun Ou" <oulijun@huawei.com>,
	linux-rdma@vger.kernel.org,
	"Michal Kalderon" <mkalderon@marvell.com>,
	"Mike Marciniszyn" <mike.marciniszyn@intel.com>,
	"Naresh Kumar PBS" <nareshkumar.pbs@broadcom.com>,
	"Nelson Escobar" <neescoba@cisco.com>,
	"Parav Pandit" <parav@nvidia.com>,
	"Parvi Kaustubhi" <pkaustub@cisco.com>,
	"Potnuri Bharat Teja" <bharat@chelsio.com>,
	"Selvin Xavier" <selvin.xavier@broadcom.com>,
	"Shiraz Saleem" <shiraz.saleem@intel.com>,
	"Somnath Kotur" <somnath.kotur@broadcom.com>,
	"Sriharsha Basavapatna" <sriharsha.basavapatna@broadcom.com>,
	"VMware PV-Drivers" <pv-drivers@vmware.com>,
	"Weihang Li" <liweihang@huawei.com>,
	"Wei Hu(Xavier)" <huwei87@hisilicon.com>,
	"Yishai Hadas" <yishaih@nvidia.com>,
	"Zhu Yanjun" <yanjunz@nvidia.com>
Subject: RE: [PATCH rdma-next] RDMA: Explicitly pass in the dma_device to ib_register_device
Date: Tue, 22 Sep 2020 14:22:01 +0000	[thread overview]
Message-ID: <OFE5279622.4F47648E-ON002585EB.004EEBC0-002585EB.004EEBDA@notes.na.collabserv.com> (raw)
In-Reply-To: <20200922101429.GF1223944@unreal>

...

>> >diff --git a/drivers/infiniband/sw/siw/siw_main.c
>> >b/drivers/infiniband/sw/siw/siw_main.c
>> >index d862bec84376..0362d57b4db8 100644
>> >--- a/drivers/infiniband/sw/siw/siw_main.c
>> >+++ b/drivers/infiniband/sw/siw/siw_main.c
>> >@@ -69,7 +69,7 @@ static int siw_device_register(struct siw_device
>> >*sdev, const char *name)
>> >
>> > 	sdev->vendor_part_id = dev_id++;
>> >
>> >-	rv = ib_register_device(base_dev, name);
>> >+	rv = ib_register_device(base_dev, name, NULL);
>> > 	if (rv) {
>> > 		pr_warn("siw: device registration error %d\n", rv);
>> > 		return rv;
>> >@@ -386,6 +386,8 @@ static struct siw_device
>> >*siw_device_create(struct net_device *netdev)
>> > 	base_dev->dev.dma_parms = &sdev->dma_parms;
>> > 	sdev->dma_parms = (struct device_dma_parameters)
>> > 		{ .max_segment_size = SZ_2G };
>> >+	dma_coerce_mask_and_coherent(&base_dev->dev,
>> >+				     dma_get_required_mask(&base_dev->dev));
>>
>> Leon, can you please help me to understand this
>> additional logic? Do we need to setup the DMA device
>> for (software) RDMA devices which rely on dma_virt_ops
>> in the end, or better leave it untouched?
>
>The logic that driver is responsible to give right DMA device,
>so yes, you are setting here mask from dma_virt_ops, as RXE did.
>
Thanks Leon!

I wonder how this was working w/o that before!

Many thanks,
Bernard.


  parent reply	other threads:[~2020-09-22 14:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22  8:27 [PATCH rdma-next] RDMA: Explicitly pass in the dma_device to ib_register_device Leon Romanovsky
2020-09-22  8:58 ` Bernard Metzler
2020-09-22 10:14   ` Leon Romanovsky
2020-09-22 14:22   ` Bernard Metzler [this message]
2020-09-22 16:22     ` Jason Gunthorpe
2020-09-23  5:39       ` Christoph Hellwig
2020-09-23 18:35         ` Jason Gunthorpe
2020-09-24  5:53           ` Christoph Hellwig
2020-09-24  6:13             ` Christoph Hellwig
2020-09-24 11:55               ` Jason Gunthorpe
2020-09-24  7:31             ` Parav Pandit
2020-09-23  5:38 ` Christoph Hellwig
2020-09-23  6:45   ` Leon Romanovsky
2020-09-23  6:54     ` Christoph Hellwig
2020-09-23  7:10       ` Leon Romanovsky
2020-09-23  7:21         ` Christoph Hellwig
2020-09-23 18:34   ` Jason Gunthorpe
2020-09-24  5:49     ` Christoph Hellwig
2020-09-24 11:49       ` Jason Gunthorpe
2020-10-06 14:29         ` Bart Van Assche
2020-10-06 16:53           ` Jason Gunthorpe
2020-10-06 18:22             ` Bart Van Assche
2020-10-06 18:39               ` 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=OFE5279622.4F47648E-ON002585EB.004EEBC0-002585EB.004EEBDA@notes.na.collabserv.com \
    --to=bmt@zurich.ibm.com \
    --cc=aditr@vmware.com \
    --cc=aelior@marvell.com \
    --cc=benve@cisco.com \
    --cc=bharat@chelsio.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=devesh.sharma@broadcom.com \
    --cc=dledford@redhat.com \
    --cc=faisal.latif@intel.com \
    --cc=galpress@amazon.com \
    --cc=huwei87@hisilicon.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=liweihang@huawei.com \
    --cc=mike.marciniszyn@intel.com \
    --cc=mkalderon@marvell.com \
    --cc=nareshkumar.pbs@broadcom.com \
    --cc=neescoba@cisco.com \
    --cc=oulijun@huawei.com \
    --cc=parav@nvidia.com \
    --cc=pkaustub@cisco.com \
    --cc=pv-drivers@vmware.com \
    --cc=selvin.xavier@broadcom.com \
    --cc=shiraz.saleem@intel.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=sriharsha.basavapatna@broadcom.com \
    --cc=yanjunz@nvidia.com \
    --cc=yishaih@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 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).