From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Jon Kohler <jon@nutanix.com>
Cc: Christian Benvenuti <benve@cisco.com>,
Satish Kharat <satishkh@cisco.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Larysa Zaremba <larysa.zaremba@intel.com>
Subject: Re: [PATCH] enic: add ethtool get_channel support
Date: Tue, 18 Jun 2024 18:20:38 +0200 [thread overview]
Message-ID: <51a446e5-e5c5-433d-96fd-e0e23d560b08@intel.com> (raw)
In-Reply-To: <20240618160146.3900470-1-jon@nutanix.com>
On 6/18/24 18:01, Jon Kohler wrote:
> Add .get_channel to enic_ethtool_ops to enable basic ethtool -l
> support to get the current channel configuration.
>
> Note that the driver does not support dynamically changing queue
> configuration, so .set_channel is intentionally unused. Instead, users
> should use Cisco's hardware management tools (UCSM/IMC) to modify
> virtual interface card configuration out of band.
>
> Signed-off-by: Jon Kohler <jon@nutanix.com>
> ---
> drivers/net/ethernet/cisco/enic/enic_ethtool.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/net/ethernet/cisco/enic/enic_ethtool.c b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
> index 241906697019..efbc0715b10e 100644
> --- a/drivers/net/ethernet/cisco/enic/enic_ethtool.c
> +++ b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
> @@ -608,6 +608,23 @@ static int enic_get_ts_info(struct net_device *netdev,
> return 0;
> }
>
> +static void enic_get_channels(struct net_device *netdev,
> + struct ethtool_channels *channels)
> +{
> + struct enic *enic = netdev_priv(netdev);
> +
> + channels->max_rx = ENIC_RQ_MAX;
> + channels->max_tx = ENIC_WQ_MAX;
> + channels->rx_count = enic->rq_count;
> + channels->tx_count = enic->wq_count;
> +
> + /* enic doesn't use other channels or combined channels */
> + channels->combined_count = 0;
my understanding is that effective Rx count is combined_count+rx_count,
analogous for Tx
and:
uapi/linux/ethtool.h:547: * @combined_count: Valid values are in the
range 1 to the max_combined.
> + channels->max_combined = 0;
> + channels->max_other = 0;
> + channels->other_count = 0;
> +}
> +
> static const struct ethtool_ops enic_ethtool_ops = {
> .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
> ETHTOOL_COALESCE_USE_ADAPTIVE_RX |
> @@ -632,6 +649,7 @@ static const struct ethtool_ops enic_ethtool_ops = {
> .set_rxfh = enic_set_rxfh,
> .get_link_ksettings = enic_get_ksettings,
> .get_ts_info = enic_get_ts_info,
> + .get_channels = enic_get_channels,
> };
>
> void enic_set_ethtool_ops(struct net_device *netdev)
next prev parent reply other threads:[~2024-06-18 16:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 16:01 [PATCH] enic: add ethtool get_channel support Jon Kohler
2024-06-18 16:20 ` Przemek Kitszel [this message]
2024-06-18 16:39 ` Jon Kohler
2024-06-20 0:04 ` Jakub Kicinski
2024-06-20 19:49 ` Jon Kohler
2024-06-20 19:58 ` Jakub Kicinski
2024-06-24 18:36 ` Jon Kohler
2024-06-19 17:59 ` Simon Horman
2024-06-19 18:01 ` Simon Horman
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=51a446e5-e5c5-433d-96fd-e0e23d560b08@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=benve@cisco.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jon@nutanix.com \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=satishkh@cisco.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).