From: Somnath Kotur <somnath.kotur@broadcom.com>
To: Vita Batrla <vita.batrla@gmail.com>
Cc: dev@dpdk.org
Subject: Re: rte_cpu_to_le_32 nit in drivers/net/bnxt/bnxt_hwrm.c
Date: Tue, 28 Feb 2023 14:55:21 +0530 [thread overview]
Message-ID: <CAOBf=mvUL8XQk5tb=W2UHae_9qdUt9KKMmDhAWNrq4XX1QGBuQ@mail.gmail.com> (raw)
In-Reply-To: <Y/ynO+HFz26mHmSG@ultra>
[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]
On Tue, Feb 28, 2023 at 2:30 PM Vita Batrla <vita.batrla@gmail.com> wrote:
>
> Hi all,
>
> I don't know where to report this nit. It's not a real bug and I don't want
> to even send a patch for it. I'm looking if someone could just fix it in
> the source code. Here's the problem:
>
> drivers/net/bnxt/bnxt_hwrm.c
>
> if (enables & HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_STAT) {
> ctx_pg = &ctx->stat_mem;
> req.stat_num_entries = rte_cpu_to_le_16(ctx->stat_max_entries);
>
> ^ this line should be rte_cpu_to_le_32, see [1] for reason
>
> req.stat_entry_size = rte_cpu_to_le_16(ctx->stat_entry_size);
> bnxt_hwrm_set_pg_attr(&ctx_pg->ring_mem,
> &req.stat_pg_size_stat_lvl,
> &req.stat_page_dir);
> }
>
> I hope that bnxt driver maintainer can pick it from here or please forward this email to him/her. Thanks in advance,
>
Yes, what you have pointed out is correct. Thanks for bringing it to
our attention
> Vita
>
> [1] Both stat_num_entries and stat_max_entries are defined as uint32_t
> in header file drivers/net/bnxt/hsi_struct_def_dpdk.h, see:
>
> /* Number of Stats. */
> uint32_t stat_num_entries;
>
> ...
>
> /* Maximum number of statistic context entries supported for this function. */
> uint32_t stat_max_entries;
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]
prev parent reply other threads:[~2023-02-28 9:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 12:51 Vita Batrla
2023-02-28 9:25 ` Somnath Kotur [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='CAOBf=mvUL8XQk5tb=W2UHae_9qdUt9KKMmDhAWNrq4XX1QGBuQ@mail.gmail.com' \
--to=somnath.kotur@broadcom.com \
--cc=dev@dpdk.org \
--cc=vita.batrla@gmail.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).