All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Junxian Huang <huangjunxian6@hisilicon.com>
Cc: leon@kernel.org, linux-rdma@vger.kernel.org, linuxarm@huawei.com,
	tangchengchang@huawei.com
Subject: Re: [PATCH for-next 2/2] RDMA/hns: Fix wrong maximum DMA segment size
Date: Mon, 7 Apr 2025 10:54:06 -0300	[thread overview]
Message-ID: <20250407135406.GA1557073@nvidia.com> (raw)
In-Reply-To: <a7a68e5d-7648-d342-8b0f-2f1c55e9ea73@hisilicon.com>

On Mon, Apr 07, 2025 at 09:51:37PM +0800, Junxian Huang wrote:
> 
> 
> On 2025/4/4 21:27, Jason Gunthorpe wrote:
> > On Wed, Apr 02, 2025 at 12:05:36PM +0800, Junxian Huang wrote:
> >>
> >>
> >> On 2025/4/2 0:39, Jason Gunthorpe wrote:
> >>> On Thu, Mar 27, 2025 at 07:47:24PM +0800, Junxian Huang wrote:
> >>>> @@ -763,7 +763,7 @@ static int hns_roce_register_device(struct hns_roce_dev *hr_dev)
> >>>>  		if (ret)
> >>>>  			return ret;
> >>>>  	}
> >>>> -	dma_set_max_seg_size(dev, UINT_MAX);
> >>>> +	dma_set_max_seg_size(dev, SZ_2G);
> >>>
> >>> Are you sure? What do you think this does in the RDMA stack?
> >>>
> >>
> >> This is the maximum DMA segment size when mapping ULP's scatter/gather
> >> list to DMA address, right?
> > 
> > Yes, but only for ib_sge
> > 
> > But I think there are other possible problems if your HW cannot
> > implement the full ib_sge :\
> 
> Why? According to IB spec, the maximum RDMA messgae size is 2GB,
> so IMHO supporting ib_sge with DMA size larger than 2GB doesn't
> seem to have much practical meaning.

I'm not sure we comprehensively check that everywhere..

Jason

  reply	other threads:[~2025-04-07 13:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27 11:47 [PATCH for-next 0/2] RDMA/hns: Cleanup and Bugfix Junxian Huang
2025-03-27 11:47 ` [PATCH for-next 1/2] RDMA/hns: Remove unused parameters Junxian Huang
2025-03-27 11:47 ` [PATCH for-next 2/2] RDMA/hns: Fix wrong maximum DMA segment size Junxian Huang
2025-04-01 16:39   ` Jason Gunthorpe
2025-04-02  4:05     ` Junxian Huang
2025-04-04 13:27       ` Jason Gunthorpe
2025-04-07 13:51         ` Junxian Huang
2025-04-07 13:54           ` Jason Gunthorpe [this message]
2025-04-07 18:36 ` [PATCH for-next 0/2] RDMA/hns: Cleanup and Bugfix 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=20250407135406.GA1557073@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=huangjunxian6@hisilicon.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=tangchengchang@huawei.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.