The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Fan Gong <gongfan1@huawei.com>
Cc: Teng Peisen <tengpeisen@huawei.com>, Wu Di <wudi234@huawei.com>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Larysa Zaremba <larysa.zaremba@intel.com>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	Chen Anwen <chenanwen@huawei.com>,
	He Wei <august.hewei@huawei.com>,
	Zhang Min <zhangmin548@huawei.com>, luosifu <luosifu@huawei.com>,
	Xin Guo <guoxin09@huawei.com>,
	Zhou Shuai <zhoushuai28@huawei.com>, Wu Like <wulike1@huawei.com>,
	Shi Jing <shijing34@huawei.com>
Subject: Re: [PATCH net] hinic3: Fix SKB linearization mismatch and silent TX drops
Date: Tue, 11 Aug 2026 10:36:11 +0100	[thread overview]
Message-ID: <20260811093611.GA51943@horms.kernel.org> (raw)
In-Reply-To: <f742377e33f33541420c0ba741925180517b3a9f.1786091276.git.tengpeisen@huawei.com>

On Mon, Aug 10, 2026 at 08:57:32AM +0800, Fan Gong wrote:
> Previously, hinic3_send_one_skb() cached the SKB fragment count before
> calling hinic3_tx_offload(). If hinic3_tx_csum() falls back to
> skb_checksum_help() for unsupported tunnel packets, the SKB may be
> linearized. Continuing to build the TX descriptor with the stale
> fragment count leads to a descriptor mismatch, which can trigge
> out-of-bounds DMA reads or IOMMU faults.
> 
> Furthermore, the old code ignored the return value of skb_checksum_help(),
> transmitting corrupted packets with incomplete checksums upon failure. It
> also failed to increment drop statistics across various TX error paths,
> causing packets to be dropped silently without notifying the user.
> 
> Fix this by:
> 1. Moving the hinic3_tx_offload() call before calculating 'num_sge' to
>    ensure the correct fragment count is used if the SKB is linearized.
> 2. Propagating skb_checksum_help() errors and returning
>    HINIC3_TX_OFFLOAD_INVALID to properly drop the skb.
> 3. Adding missing statistics increments (dropped, map_frag_err,
>    unknown_tunnel_pkt, skb_pad_err) across the TX error paths so these
>    events are correctly reflected in interface statistics.

Did part 3 go missing?
I'm not seeing it in the patch.

> 
> Fixes: 17fcb3dc12bb ("hinic3: module initialization and tx/rx logic")
> Co-developed-by: Teng Peisen <tengpeisen@huawei.com>
> Signed-off-by: Teng Peisen <tengpeisen@huawei.com>
> Co-developed-by: Wu Di <wudi234@huawei.com>
> Signed-off-by: Wu Di <wudi234@huawei.com>
> Signed-off-by: Fan Gong <gongfan1@huawei.com>

Also, this seems to be v3 of this patch.
For reference, that should be noted in the subject like this:

Subject: [PATCH v3 net] ...

  reply	other threads:[~2026-08-11  9:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10  0:57 [PATCH net] hinic3: Fix SKB linearization mismatch and silent TX drops Fan Gong
2026-08-11  9:36 ` Simon Horman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-08-05  3:45 Fan Gong
2026-08-06 16:21 ` Jakub Kicinski
2026-08-07 11:11 ` Fan Gong

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=20260811093611.GA51943@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=august.hewei@huawei.com \
    --cc=chenanwen@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gongfan1@huawei.com \
    --cc=guoxin09@huawei.com \
    --cc=kuba@kernel.org \
    --cc=larysa.zaremba@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luosifu@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shijing34@huawei.com \
    --cc=tengpeisen@huawei.com \
    --cc=wudi234@huawei.com \
    --cc=wulike1@huawei.com \
    --cc=zhangmin548@huawei.com \
    --cc=zhoushuai28@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox