From: Jacob Keller <jacob.e.keller@intel.com>
To: Rosen Penev <rosenp@gmail.com>, Jakub Kicinski <kuba@kernel.org>
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: Tue, 29 Oct 2024 16:54:48 -0700 [thread overview]
Message-ID: <b4f4eace-117f-4d55-bcf7-6718d70cbf88@intel.com> (raw)
In-Reply-To: <CAKxU2N-5rZ3vi-bgkWA5CMorKEOv6+_a0sVDUz15o8Z7+GFLvQ@mail.gmail.com>
On 10/29/2024 4:43 PM, Rosen Penev wrote:
> On Tue, Oct 29, 2024 at 4:03 PM Jakub Kicinski <kuba@kernel.org> wrote:
>>
>> On Tue, 22 Oct 2024 18:27:34 -0700 Rosen Penev wrote:
>>> @@ -3220,13 +3212,13 @@ static void bnx2x_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
>>> start = 0;
>>> else
>>> start = 4;
>>> - 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?
I was trying to figure that out too...
I guess the memcpy does everything all at once and this does it via
iteration...?
memcpy would actually result in copying the padding between strings in
the bnx2x_tests_str_arr, while the ethtool_puts turns into strscpy which
doesn't pad the tail of the buffer with zeros?
>>
>> Also, please split bnx2x to a separate patch, the other drivers in this
>> patch IIUC are small embedded ones, the bnx2x is an "enterprise
>> product".
>> --
>> pw-bot: cr
next prev parent reply other threads:[~2024-10-29 23:55 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 [this message]
2024-10-30 0:07 ` Rosen Penev
2024-10-30 0:37 ` Jakub Kicinski
2024-10-30 20:31 ` Jacob Keller
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=b4f4eace-117f-4d55-bcf7-6718d70cbf88@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®