U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Forissier <jerome.forissier@arm.com>
To: Weijie Gao <weijie.gao@mediatek.com>, u-boot@lists.denx.de
Cc: GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,
	Tom Rini <trini@konsulko.com>,
	Andrew Goodbody <andrew.goodbody@linaro.org>,
	Tim Harvey <tharvey@gateworks.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	nd@arm.com
Subject: Re: [PATCH] net: lwip: handle chained pbufs in transmit path
Date: Thu, 16 Jul 2026 09:56:31 +0200	[thread overview]
Message-ID: <c62bd0e1-3a4b-4dc2-ac46-d310a7d53c19@arm.com> (raw)
In-Reply-To: <20260715084236.172815-1-weijie.gao@mediatek.com>

On 15/07/2026 10:42, Weijie Gao wrote:
> LwIP may pass a packet to the netif linkoutput callback as a chain
> of pbufs. In this case, p->len only describes the length of the
> first pbuf, while p->tot_len describes the length of the whole
> packet.
> 
> The current transmit path only sends the first pbuf. This can
> truncate packets whose headers have already been generated for the
> full packet length, resulting in malformed frames on the wire.
> For example, the IP header may record a larger total length than the
> actual Ethernet frame length.
> 
> Assemble chained pbufs into one aligned contiguous buffer before
> passing the packet to the Ethernet driver.
> 
> Fixes: 98ad145db61a (net: lwip: add DHCP support and dhcp commmand)
> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

Good catch! That was a big oversight :-/ thanks for the fix.

Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>

-- 
Jerome

  reply	other threads:[~2026-07-16  7:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15  8:42 [PATCH] net: lwip: handle chained pbufs in transmit path Weijie Gao
2026-07-16  7:56 ` Jerome Forissier [this message]
2026-07-16  8:00   ` Jerome Forissier
  -- strict thread matches above, loose matches on Subject: below --
2026-07-27  8:02 Weijie Gao
2026-07-27  8:06 ` Weijie Gao

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=c62bd0e1-3a4b-4dc2-ac46-d310a7d53c19@arm.com \
    --to=jerome.forissier@arm.com \
    --cc=GSS_MTK_Uboot_upstream@mediatek.com \
    --cc=andrew.goodbody@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=nd@arm.com \
    --cc=tharvey@gateworks.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=weijie.gao@mediatek.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