From: Simon Horman <horms@kernel.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch,
pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com,
osk@google.com, Kalesh AP <kalesh-anakkur.purayil@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>
Subject: Re: [PATCH net 1/2] bnxt_en: Mask the bd_cnt field in the TX BD properly
Date: Mon, 24 Mar 2025 16:50:49 +0000 [thread overview]
Message-ID: <20250324165049.GG892515@horms.kernel.org> (raw)
In-Reply-To: <20250321211639.3812992-2-michael.chan@broadcom.com>
On Fri, Mar 21, 2025 at 02:16:38PM -0700, Michael Chan wrote:
> The bd_cnt field in the TX BD specifies the total number of BDs for
> the TX packet. The bd_cnt field has 5 bits and the maximum number
> supported is 32 with the value 0.
>
> CONFIG_MAX_SKB_FRAGS can be modified and the total number of SKB
> fragments can approach or exceed the maximum supported by the chip.
> Add a macro to properly mask the bd_cnt field so that the value 32
> will be properly masked and set to 0 in the bd_cnd field.
>
> Without this patch, the out-of-range bd_cnt value will corrupt the
> TX BD and may cause TX timeout.
>
> The next patch will check for values exceeding 32.
>
> Fixes: 3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS")
> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-03-24 16:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 21:16 [PATCH net 0/2] bnxt_en: Fix MAX_SKB_FRAGS > 30 Michael Chan
2025-03-21 21:16 ` [PATCH net 1/2] bnxt_en: Mask the bd_cnt field in the TX BD properly Michael Chan
2025-03-24 16:50 ` Simon Horman [this message]
2025-03-24 21:12 ` Jakub Kicinski
2025-03-24 21:16 ` Michael Chan
2025-03-24 21:23 ` Jakub Kicinski
2025-03-21 21:16 ` [PATCH net 2/2] bnxt_en: Linearize TX SKB if the fragments exceed the max Michael Chan
2025-03-24 16:51 ` Simon Horman
2025-05-05 15:36 ` Eric Dumazet
2025-05-05 18:34 ` Michael Chan
2025-05-05 18:53 ` Eric Dumazet
2025-03-24 21:30 ` [PATCH net 0/2] bnxt_en: Fix MAX_SKB_FRAGS > 30 patchwork-bot+netdevbpf
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=20250324165049.GG892515@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew.gospodarek@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=osk@google.com \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=somnath.kotur@broadcom.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;
as well as URLs for NNTP newsgroup(s).