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, gospo@broadcom.com,
selvin.xavier@broadcom.com, pavan.chebbi@broadcom.com
Subject: Re: [PATCH net-next 3/3] bnxt_en: resize bnxt_irq name field to fit format string
Date: Tue, 10 Sep 2024 09:34:23 +0100 [thread overview]
Message-ID: <20240910083423.GF525413@kernel.org> (raw)
In-Reply-To: <20240909202737.93852-4-michael.chan@broadcom.com>
On Mon, Sep 09, 2024 at 01:27:37PM -0700, Michael Chan wrote:
> From: Edwin Peer <edwin.peer@broadcom.com>
>
> The name field of struct bnxt_irq is written using snprintf in
> bnxt_setup_msix(). Make the field large enough to fit the maximal
> formatted string to prevent truncation. Truncated IRQ names are
> less meaningful to the user. For example, "enp4s0f0np0-TxRx-0"
> gets truncated to "enp4s0f0np0-TxRx-" with the existing code.
>
> Make sure we have space for the extra characters added to the IRQ
> names:
>
> - the characters introduced by the static format string: hyphens
> - the maximal static substituted ring type string: "TxRx"
> - the maximum length of an integer formatted as a string, even
> though reasonable ring numbers would never be as long as this.
>
> Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-09-10 8:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 20:27 [PATCH net-next 0/3] bnxt_en: MSIX improvements Michael Chan
2024-09-09 20:27 ` [PATCH net-next 1/3] bnxt_en: Increase the number of MSIX vectors for RoCE device Michael Chan
2024-09-10 8:33 ` Simon Horman
2024-09-09 20:27 ` [PATCH net-next 2/3] bnxt_en: Add MSIX check in bnxt_check_rings() Michael Chan
2024-09-10 8:34 ` Simon Horman
2024-09-09 20:27 ` [PATCH net-next 3/3] bnxt_en: resize bnxt_irq name field to fit format string Michael Chan
2024-09-10 8:34 ` Simon Horman [this message]
2024-09-11 2:10 ` [PATCH net-next 0/3] bnxt_en: MSIX improvements 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=20240910083423.GF525413@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gospo@broadcom.com \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=selvin.xavier@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 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.