From: Simon Horman <horms@kernel.org>
To: Paul Greenwalt <paul.greenwalt@intel.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch, aelior@marvell.com,
manishc@marvell.com, vladimir.oltean@nxp.com, jdamato@fastly.com,
pawel.chmielewski@intel.com, edumazet@google.com,
intel-wired-lan@lists.osuosl.org, kuba@kernel.org,
d-tatianin@yandex-team.ru, pabeni@redhat.com,
davem@davemloft.net, jiri@resnulli.us,
Jacob Keller <jacob.e.keller@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: Re: [PATCH net-next v5 1/3] ethtool: Add forced speed to supported link modes maps
Date: Tue, 17 Oct 2023 11:26:22 +0200 [thread overview]
Message-ID: <20231017092622.GT1751252@kernel.org> (raw)
In-Reply-To: <20231015234304.2633-2-paul.greenwalt@intel.com>
On Sun, Oct 15, 2023 at 07:43:02PM -0400, Paul Greenwalt wrote:
> The need to map Ethtool forced speeds to Ethtool supported link modes is
> common among drivers. To support this, add a common structure for forced
> speed maps and a function to init them. This is solution was originally
> introduced in commit 1d4e4ecccb11 ("qede: populate supported link modes
> maps on module init") for qede driver.
>
> ethtool_forced_speed_maps_init() should be called during driver init
> with an array of struct ethtool_forced_speed_map to populate the mapping.
>
> Definitions for maps themselves are left in the driver code, as the sets
> of supported link modes may vary between the devices.
>
> Suggested-by: Andrew Lunn <andrew@lunn.ch>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
> Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Thanks Paul,
I verified that this duplicates infrastructure added by the commit quoted
above. And splits adding the new from removing the old into separate
patches as suggested by Jiri in his review of v2.
This leads to nice code reuse in patch 3/3
and makes for a nicely constructed patchset.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2023-10-17 9:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-15 23:43 [PATCH net-next v5 0/3] ethtool: Add link mode maps for forced speeds Paul Greenwalt
2023-10-15 23:43 ` [PATCH net-next v5 1/3] ethtool: Add forced speed to supported link modes maps Paul Greenwalt
2023-10-17 9:26 ` Simon Horman [this message]
2023-10-15 23:43 ` [PATCH net-next v5 2/3] qede: Refactor qede_forced_speed_maps_init() Paul Greenwalt
2023-10-17 9:26 ` Simon Horman
2023-10-15 23:43 ` [PATCH net-next v5 3/3] ice: Refactor finding advertised link speed Paul Greenwalt
2023-10-17 9:26 ` Simon Horman
2023-10-18 8:40 ` [PATCH net-next v5 0/3] ethtool: Add link mode maps for forced speeds 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=20231017092622.GT1751252@kernel.org \
--to=horms@kernel.org \
--cc=aelior@marvell.com \
--cc=andrew@lunn.ch \
--cc=d-tatianin@yandex-team.ru \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=jdamato@fastly.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul.greenwalt@intel.com \
--cc=pawel.chmielewski@intel.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=vladimir.oltean@nxp.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).