public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Leon Romanovsky <leonro@mellanox.com>,
	Doug Ledford <dledford@redhat.com>,
	linux-rdma@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
	Christoph Hellwig <hch@lst.de>,
	Bernard Metzler <bmt@zurich.ibm.com>
Subject: [PATCH 4/4] siw: Increase DMA max_segment_size parameter
Date: Sun, 20 Oct 2019 19:10:30 -0700	[thread overview]
Message-ID: <20191021021030.1037-5-bvanassche@acm.org> (raw)
In-Reply-To: <20191021021030.1037-1-bvanassche@acm.org>

Increase the DMA max_segment_size parameter from 64 KB to UINT_MAX.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/infiniband/sw/siw/siw.h      | 1 +
 drivers/infiniband/sw/siw/siw_main.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/infiniband/sw/siw/siw.h b/drivers/infiniband/sw/siw/siw.h
index dba4535494ab..1ea3ed249e7b 100644
--- a/drivers/infiniband/sw/siw/siw.h
+++ b/drivers/infiniband/sw/siw/siw.h
@@ -70,6 +70,7 @@ struct siw_pd {
 
 struct siw_device {
 	struct ib_device base_dev;
+	struct device_dma_parameters dma_parms;
 	struct net_device *netdev;
 	struct siw_dev_cap attrs;
 
diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c
index d1a1b7aa7d83..041496376047 100644
--- a/drivers/infiniband/sw/siw/siw_main.c
+++ b/drivers/infiniband/sw/siw/siw_main.c
@@ -402,6 +402,9 @@ static struct siw_device *siw_device_create(struct net_device *netdev)
 	base_dev->phys_port_cnt = 1;
 	base_dev->dev.parent = parent;
 	base_dev->dev.dma_ops = &dma_virt_ops;
+	base_dev->dev.dma_parms = &sdev->dma_parms;
+	sdev->dma_parms = (struct device_dma_parameters)
+		{ .max_segment_size = UINT_MAX };
 	base_dev->num_comp_vectors = num_possible_cpus();
 
 	ib_set_device_ops(base_dev, &siw_device_ops);
-- 
2.23.0


  parent reply	other threads:[~2019-10-21  2:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21  2:10 [PATCH 0/4] Fixes related to the DMA max_segment_size parameter Bart Van Assche
2019-10-21  2:10 ` [PATCH 1/4] RDMA/core: Fix ib_dma_max_seg_size() Bart Van Assche
2019-10-21 14:09   ` Jason Gunthorpe
2019-10-21 15:03     ` Bart Van Assche
2019-10-21 15:27       ` Jason Gunthorpe
2019-10-21 15:56         ` Bart Van Assche
2019-10-21  2:10 ` [PATCH 2/4] RDMA/core: Set DMA parameters correctly Bart Van Assche
2019-10-21 14:10   ` Jason Gunthorpe
2019-10-21 16:26     ` Bart Van Assche
2019-10-21 17:44       ` Saleem, Shiraz
2019-10-21 18:10         ` Bart Van Assche
2019-10-21 20:32           ` Saleem, Shiraz
2019-10-22 14:40           ` Jason Gunthorpe
2019-10-22 22:11             ` Bart Van Assche
2019-10-21  2:10 ` [PATCH 3/4] rdma_rxe: Increase DMA max_segment_size parameter Bart Van Assche
2019-10-21  2:10 ` Bart Van Assche [this message]
2019-10-21  9:36   ` [PATCH 4/4] siw: " Bernard Metzler
2019-10-21 13:53     ` Bart Van Assche

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=20191021021030.1037-5-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=bmt@zurich.ibm.com \
    --cc=dledford@redhat.com \
    --cc=hch@lst.de \
    --cc=jgg@ziepe.ca \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    /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