From: Jacob Keller <jacob.e.keller@intel.com>
To: Jakub Kicinski <kuba@kernel.org>, Rosen Penev <rosenp@gmail.com>
Cc: netdev@vger.kernel.org, "Justin Chen" <justin.chen@broadcom.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Rafał Miłecki" <rafal@milecki.pl>,
"Sudarsana Kalluru" <skalluru@marvell.com>,
"Manish Chopra" <manishc@marvell.com>,
"Doug Berger" <opendmb@gmail.com>,
"Sabrina Dubroca" <sd@queasysnail.net>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: broadcom: use ethtool string helpers
Date: Wed, 30 Oct 2024 13:31:49 -0700 [thread overview]
Message-ID: <7d2fdd24-6e45-4007-a0f7-cafa44c0ac4f@intel.com> (raw)
In-Reply-To: <20241029173747.74596c8c@kernel.org>
On 10/29/2024 5:37 PM, Jakub Kicinski wrote:
> On Tue, 29 Oct 2024 16:43:15 -0700 Rosen Penev wrote:
>>>> - memcpy(buf, bnx2x_tests_str_arr + start,
>>>> - ETH_GSTRING_LEN * BNX2X_NUM_TESTS(bp));
>>>> + for (i = start; i < BNX2X_NUM_TESTS(bp); i++)
>>>> + ethtool_puts(&buf, bnx2x_tests_str_arr[i]);
>>>
>>> I don't think this is equivalent.
>> What's wrong here?
>
> We used to copy ETH_GSTRING_LEN * BNX2X_NUM_TESTS(bp)
> but i will no only go from start to BNX2X_NUM_TESTS(bp)
> IOW the copied length is ETH_GSTRING_LEN * (BNX2X_NUM_TESTS(bp) - start)
> No?
Hmm. Yea that's right. I'm guessing BNX2X_NUM_TESTS(bp) changes the
number of tests based on what start would be...
Probably we could use a static size of the string array instead of
BNX2X_NUM_TESTS(bp), and that would fix things, but this specific change
needs more careful review of the surrounding code.
next prev parent reply other threads:[~2024-10-30 20:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 1:27 Rosen Penev
2024-10-24 11:47 ` Simon Horman
2024-10-29 23:03 ` Jakub Kicinski
2024-10-29 23:43 ` Rosen Penev
2024-10-29 23:54 ` Jacob Keller
2024-10-30 0:07 ` Rosen Penev
2024-10-30 0:37 ` Jakub Kicinski
2024-10-30 20:31 ` Jacob Keller [this message]
2024-10-30 20:50 ` Rosen Penev
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=7d2fdd24-6e45-4007-a0f7-cafa44c0ac4f@intel.com \
--to=jacob.e.keller@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=justin.chen@broadcom.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
--cc=rafal@milecki.pl \
--cc=rosenp@gmail.com \
--cc=sd@queasysnail.net \
--cc=skalluru@marvell.com \
--cc=u.kleine-koenig@baylibre.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
all inboxes | Powered by JetHome®