Netdev List
 help / color / mirror / Atom feed
From: "Patil, Shubham Sanjay" <shubpati@amd.com>
To: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: Matt Johnston <matt@codeconstruct.com.au>,
	linux-i3c@lists.infradead.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, meaganlloyd@linux.microsoft.com,
	git@amd.com, Frank Li <Frank.Li@nxp.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Shubham Patil <shubhamsanjay.patil@amd.com>
Subject: Re: [PATCH v3 3/3] net: mctp i3c: clamp transfer lengths to the controller limits
Date: Wed, 25 Nov 2026 09:47:04 +0530	[thread overview]
Message-ID: <6cf871c7-d269-42d3-af40-4dc69f4a99ee@amd.com> (raw)
In-Reply-To: <554f3a558a73c9984ec7d3395aa53aefc91d8a36.camel@codeconstruct.com.au>

Hi Jeremy,

On 11/25/2026 6:09 AM, Jeremy Kerr wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> Hi Shubham,
> 
>> mctp_i3c_setup() takes the maximum read and write lengths straight from
>> GETMRL and GETMWL. Those describe the endpoint alone, so on a controller
>> with a smaller limit every read can be built too large and rejected.
>> Transmit packets can similarly reach the controller even when they are
>> larger than its transmit buffer. The receive path also allocates an skb
>> for data the hardware can never deliver.
>>
>> Use i3c_device_get_max_read_xfer_bytes() and
>> i3c_device_get_max_write_xfer_bytes() instead, which return the smaller
>> of the endpoint and controller limits.
>>
>> Behaviour is unchanged when neither reports a limit, as the helpers
>> return 0 exactly as the GETMRL and GETMWL fields do today.
>>
>> Signed-off-by: Shubham Patil <shubhamsanjay.patil@amd.com>
> 
> Looks good, thanks!
> 
> For the MCTP side of things:
> 
> Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
> 
> Since this depends on the new i3c helpers, which (I assume) would be
> going through the i3c tree, I assume the whole series should stay
> together?

Yes, MCTP changes will go along with new I3C API's, whole series will 
stay together.


Thanks,
Shubham

> 
> Cheers,
> 
> 
> Jeremy


      reply	other threads:[~2026-11-25  4:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  6:06 [PATCH v3 0/3] i3c: account for controller transfer limits Shubham Patil
2026-11-24  6:06 ` [PATCH v3 1/3] i3c: Add helpers to get the maximum transfer size for a device Shubham Patil
2026-11-24 20:51   ` Frank Li
2026-11-24  6:06 ` [PATCH v3 2/3] i3c: dw: Track the transmit and receive buffer depths separately Shubham Patil
2026-11-24 20:55   ` Frank Li
2026-11-24  6:06 ` [PATCH v3 3/3] net: mctp i3c: clamp transfer lengths to the controller limits Shubham Patil
2026-11-24 21:01   ` Frank Li
2026-11-25  0:39   ` Jeremy Kerr
2026-11-25  4:17     ` Patil, Shubham Sanjay [this message]

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=6cf871c7-d269-42d3-af40-4dc69f4a99ee@amd.com \
    --to=shubpati@amd.com \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=git@amd.com \
    --cc=jk@codeconstruct.com.au \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=meaganlloyd@linux.microsoft.com \
    --cc=netdev@vger.kernel.org \
    --cc=shubhamsanjay.patil@amd.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