All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: "hpp.iscas" <hppiscas@163.com>
Cc: Jian Shen <shenjian15@huawei.com>,
	Jijie Shao <shaojijie@huawei.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jiangfeng Xiao <xiaojiangfeng@huawei.com>
Subject: Re: [PATCH] net: hip04: use 16-bit byte order for HI13X1 TX fields
Date: Tue, 8 Sep 2026 14:11:54 +0100	[thread overview]
Message-ID: <20260908131154.GY40544@horms.kernel.org> (raw)
In-Reply-To: <20260905132958.63085-1-hppiscas@163.com>

On Sat, Sep 05, 2026 at 09:29:58PM +0800, hpp.iscas wrote:
> The HI13X1 transmit descriptor stores send_size and data_offset in u16
> fields, but hip04_mac_start_xmit() converts both values with
> cpu_to_be32() before assigning them. On little-endian systems the
> assignment truncates the converted value, leaving neither field with the
> intended 16-bit big-endian representation.
> 
> Use cpu_to_be16() for the two HI13X1 fields. Keep the original 32-bit
> conversion for the other descriptor format.

I am curious to know a) how this bug was found b) how it seems to have
gone otherwise unnoticed since 2019.

> Fixes: d413779cdd93 ("net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC")
> Signed-off-by: hpp.iscas <hppiscas@163.com>

Please consider using your name in the From field and the Signed-off-by tag.

The fix itself looks good to me:
Reviewed-by: Simon Horman <horms@kernel.org>

  reply	other threads:[~2026-09-08 13:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05 13:29 [PATCH] net: hip04: use 16-bit byte order for HI13X1 TX fields hpp.iscas
2026-09-08 13:11 ` Simon Horman [this message]
2026-09-09 11:25 ` Jijie Shao

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=20260908131154.GY40544@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hppiscas@163.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shaojijie@huawei.com \
    --cc=shenjian15@huawei.com \
    --cc=xiaojiangfeng@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.