The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Justin Lai <justinlai0215@realtek.com>
Cc: kuba@kernel.org, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	stable@vger.kernel.org, richardcochran@gmail.com,
	david.laight.linux@gmail.com, aleksander.lobakin@intel.com,
	pkshih@realtek.com, larry.chiu@realtek.com
Subject: Re: [PATCH net v5] rtase: Workaround for TX hang caused by hardware packet parsing
Date: Thu, 16 Jul 2026 10:17:26 +0100	[thread overview]
Message-ID: <20260716091726.GC95246@horms.kernel.org> (raw)
In-Reply-To: <20260709103456.83789-1-justinlai0215@realtek.com>

On Thu, Jul 09, 2026 at 06:34:56PM +0800, Justin Lai wrote:
> The hardware performs packet parsing before packet transmission.
> Parsing incomplete IPv4, IPv6, TCP, or UDP headers may trigger a TX
> hang because the hardware parser expects additional protocol header
> data that is not present in the packet.
> 
> The hardware performs additional PTP parsing on UDP packets identified
> by destination ports 319/320 at the expected UDP destination port
> offset.
> 
> If such a packet has transport data smaller than RTASE_MIN_PAD_LEN,
> the hardware parser expects additional packet data and may trigger a
> TX hang.
> 
> To avoid these hardware issues, the driver applies the following
> workarounds.
> 
> Drop malformed packets that may trigger this hardware issue before
> transmission.
> 
> For IPv4 non-initial fragments, the hardware does not check the
> fragment offset before parsing the expected transport header location.
> As a result, these packets are still subject to transport header
> parsing even though they do not contain a transport header. If the
> transport data is shorter than the minimum transport header required
> by the hardware parser, pad the transport data to the minimum
> transport header length required by the hardware parser. Packets that
> also match the hardware PTP parsing conditions continue to follow the
> corresponding workaround.
> 
> For IPv6 fragmented packets, neither of the above hardware issues
> occurs because the hardware only continues packet parsing when the
> IPv6 Base Header Next Header field directly indicates UDP. Packets
> carrying a Fragment Header do not continue through the subsequent
> packet parsing stages.
> 
> For packets identified for hardware PTP parsing, pad the transport
> data so it reaches RTASE_MIN_PAD_LEN before transmission.
> 
> Fixes: d6e882b89fdf ("rtase: Implement .ndo_start_xmit function")
> Cc: stable@vger.kernel.org
> Signed-off-by: Justin Lai <justinlai0215@realtek.com>

Reviewed-by: Simon Horman <horms@kernel.org>

FTR, the AI-generated reviews of this patch on both sashiko.dev and
https://netdev-ai.bots.linux.dev/sashiko/ flag issues. However, I do
not believe they should impede progress of this patch.


      reply	other threads:[~2026-07-16  9:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 10:34 [PATCH net v5] rtase: Workaround for TX hang caused by hardware packet parsing Justin Lai
2026-07-16  9:17 ` Simon Horman [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=20260716091726.GC95246@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=david.laight.linux@gmail.com \
    --cc=edumazet@google.com \
    --cc=justinlai0215@realtek.com \
    --cc=kuba@kernel.org \
    --cc=larry.chiu@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pkshih@realtek.com \
    --cc=richardcochran@gmail.com \
    --cc=stable@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