* [net-next PATCH v1 0/2 RESEND] Add support to retrieve hardware channel information
@ 2025-09-23 9:41 Sathesh B Edara
2025-09-23 9:41 ` [net-next PATCH v1 1/2 RESEND] octeon_ep: " Sathesh B Edara
2025-09-23 9:41 ` [net-next PATCH v1 2/2 RESEND] octeon_ep_vf: " Sathesh B Edara
0 siblings, 2 replies; 6+ messages in thread
From: Sathesh B Edara @ 2025-09-23 9:41 UTC (permalink / raw)
To: linux-kernel, sburla, vburru, davem, edumazet, kuba, pabeni,
netdev, hgani, andrew, srasheed
Cc: sedara
This patch series introduces support for retrieving hardware channel
configuration through the ethtool interface for both PF and VF.
Sathesh B Edara (2):
octeon_ep: Add support to retrieve hardware channel information
octeon_ep_vf: Add support to retrieve hardware channel information
.../net/ethernet/marvell/octeon_ep/octep_ethtool.c | 12 ++++++++++++
.../ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c | 12 ++++++++++++
2 files changed, 24 insertions(+)
--
2.36.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [net-next PATCH v1 1/2 RESEND] octeon_ep: Add support to retrieve hardware channel information
2025-09-23 9:41 [net-next PATCH v1 0/2 RESEND] Add support to retrieve hardware channel information Sathesh B Edara
@ 2025-09-23 9:41 ` Sathesh B Edara
2025-09-24 16:53 ` Simon Horman
2025-09-25 1:10 ` Jakub Kicinski
2025-09-23 9:41 ` [net-next PATCH v1 2/2 RESEND] octeon_ep_vf: " Sathesh B Edara
1 sibling, 2 replies; 6+ messages in thread
From: Sathesh B Edara @ 2025-09-23 9:41 UTC (permalink / raw)
To: linux-kernel, sburla, vburru, davem, edumazet, kuba, pabeni,
netdev, hgani, andrew, srasheed
Cc: sedara, Andrew Lunn
This patch introduces support for retrieving hardware channel
configuration through the ethtool interface.
Signed-off-by: Sathesh B Edara <sedara@marvell.com>
---
.../net/ethernet/marvell/octeon_ep/octep_ethtool.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_ethtool.c b/drivers/net/ethernet/marvell/octeon_ep/octep_ethtool.c
index a88c006ea65b..9d57e2da0b4b 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_ethtool.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_ethtool.c
@@ -437,6 +437,17 @@ static int octep_set_link_ksettings(struct net_device *netdev,
return 0;
}
+static void octep_get_channels(struct net_device *dev,
+ struct ethtool_channels *channel)
+{
+ struct octep_device *oct = netdev_priv(dev);
+
+ channel->max_rx = CFG_GET_PORTS_MAX_IO_RINGS(oct->conf);
+ channel->max_tx = CFG_GET_PORTS_MAX_IO_RINGS(oct->conf);
+ channel->rx_count = CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf);
+ channel->tx_count = CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf);
+}
+
static const struct ethtool_ops octep_ethtool_ops = {
.get_drvinfo = octep_get_drvinfo,
.get_link = ethtool_op_get_link,
@@ -445,6 +456,7 @@ static const struct ethtool_ops octep_ethtool_ops = {
.get_ethtool_stats = octep_get_ethtool_stats,
.get_link_ksettings = octep_get_link_ksettings,
.set_link_ksettings = octep_set_link_ksettings,
+ .get_channels = octep_get_channels,
};
void octep_set_ethtool_ops(struct net_device *netdev)
--
2.36.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [net-next PATCH v1 2/2 RESEND] octeon_ep_vf: Add support to retrieve hardware channel information
2025-09-23 9:41 [net-next PATCH v1 0/2 RESEND] Add support to retrieve hardware channel information Sathesh B Edara
2025-09-23 9:41 ` [net-next PATCH v1 1/2 RESEND] octeon_ep: " Sathesh B Edara
@ 2025-09-23 9:41 ` Sathesh B Edara
2025-09-24 16:53 ` Simon Horman
1 sibling, 1 reply; 6+ messages in thread
From: Sathesh B Edara @ 2025-09-23 9:41 UTC (permalink / raw)
To: linux-kernel, sburla, vburru, davem, edumazet, kuba, pabeni,
netdev, hgani, andrew, srasheed
Cc: sedara, Andrew Lunn
This patch introduces support for retrieving hardware channel
configuration through the ethtool interface.
Signed-off-by: Sathesh B Edara <sedara@marvell.com>
---
.../ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c b/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c
index d60441928ba9..2b6a8530cbaa 100644
--- a/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c
+++ b/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c
@@ -244,6 +244,17 @@ static int octep_vf_get_link_ksettings(struct net_device *netdev,
return 0;
}
+static void octep_vf_get_channels(struct net_device *dev,
+ struct ethtool_channels *channel)
+{
+ struct octep_vf_device *oct = netdev_priv(dev);
+
+ channel->max_rx = CFG_GET_PORTS_MAX_IO_RINGS(oct->conf);
+ channel->max_tx = CFG_GET_PORTS_MAX_IO_RINGS(oct->conf);
+ channel->rx_count = CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf);
+ channel->tx_count = CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf);
+}
+
static const struct ethtool_ops octep_vf_ethtool_ops = {
.get_drvinfo = octep_vf_get_drvinfo,
.get_link = ethtool_op_get_link,
@@ -251,6 +262,7 @@ static const struct ethtool_ops octep_vf_ethtool_ops = {
.get_sset_count = octep_vf_get_sset_count,
.get_ethtool_stats = octep_vf_get_ethtool_stats,
.get_link_ksettings = octep_vf_get_link_ksettings,
+ .get_channels = octep_vf_get_channels,
};
void octep_vf_set_ethtool_ops(struct net_device *netdev)
--
2.36.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [net-next PATCH v1 1/2 RESEND] octeon_ep: Add support to retrieve hardware channel information
2025-09-23 9:41 ` [net-next PATCH v1 1/2 RESEND] octeon_ep: " Sathesh B Edara
@ 2025-09-24 16:53 ` Simon Horman
2025-09-25 1:10 ` Jakub Kicinski
1 sibling, 0 replies; 6+ messages in thread
From: Simon Horman @ 2025-09-24 16:53 UTC (permalink / raw)
To: Sathesh B Edara
Cc: linux-kernel, sburla, vburru, davem, edumazet, kuba, pabeni,
netdev, hgani, andrew, srasheed, Andrew Lunn
On Tue, Sep 23, 2025 at 02:41:18AM -0700, Sathesh B Edara wrote:
> This patch introduces support for retrieving hardware channel
> configuration through the ethtool interface.
>
> Signed-off-by: Sathesh B Edara <sedara@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next PATCH v1 2/2 RESEND] octeon_ep_vf: Add support to retrieve hardware channel information
2025-09-23 9:41 ` [net-next PATCH v1 2/2 RESEND] octeon_ep_vf: " Sathesh B Edara
@ 2025-09-24 16:53 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2025-09-24 16:53 UTC (permalink / raw)
To: Sathesh B Edara
Cc: linux-kernel, sburla, vburru, davem, edumazet, kuba, pabeni,
netdev, hgani, andrew, srasheed, Andrew Lunn
On Tue, Sep 23, 2025 at 02:41:19AM -0700, Sathesh B Edara wrote:
> This patch introduces support for retrieving hardware channel
> configuration through the ethtool interface.
>
> Signed-off-by: Sathesh B Edara <sedara@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next PATCH v1 1/2 RESEND] octeon_ep: Add support to retrieve hardware channel information
2025-09-23 9:41 ` [net-next PATCH v1 1/2 RESEND] octeon_ep: " Sathesh B Edara
2025-09-24 16:53 ` Simon Horman
@ 2025-09-25 1:10 ` Jakub Kicinski
1 sibling, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2025-09-25 1:10 UTC (permalink / raw)
To: Sathesh B Edara
Cc: linux-kernel, sburla, vburru, davem, edumazet, pabeni, netdev,
hgani, andrew, srasheed, Andrew Lunn
On Tue, 23 Sep 2025 02:41:18 -0700 Sathesh B Edara wrote:
> + channel->max_rx = CFG_GET_PORTS_MAX_IO_RINGS(oct->conf);
> + channel->max_tx = CFG_GET_PORTS_MAX_IO_RINGS(oct->conf);
> + channel->rx_count = CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf);
> + channel->tx_count = CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf);
AFAICT you're using one IRQ for both Rx and Tx. The channel is
basically an IRQ. So if you're using one for Rx+Tx you should be
reporting the combined channel counts.
--
pw-bot: cr
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-09-25 1:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 9:41 [net-next PATCH v1 0/2 RESEND] Add support to retrieve hardware channel information Sathesh B Edara
2025-09-23 9:41 ` [net-next PATCH v1 1/2 RESEND] octeon_ep: " Sathesh B Edara
2025-09-24 16:53 ` Simon Horman
2025-09-25 1:10 ` Jakub Kicinski
2025-09-23 9:41 ` [net-next PATCH v1 2/2 RESEND] octeon_ep_vf: " Sathesh B Edara
2025-09-24 16:53 ` Simon Horman
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).