[net-next PATCH v2 2/2] octeon_ep_vf: Add support to retrieve hardware channel information

Sathesh B Edara posted 2 patches 6 days, 12 hours ago
[net-next PATCH v2 2/2] octeon_ep_vf: Add support to retrieve hardware channel information
Posted by Sathesh B Edara 6 days, 12 hours ago
This patch introduces support for retrieving hardware channel
configuration through the ethtool interface.

Signed-off-by: Sathesh B Edara <sedara@marvell.com>
---
Find V1 here:
https://lore.kernel.org/netdev/20250923094120.13133-3-sedara@marvell.com/

V2:
- Corrected channel counts to combined.

 .../ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c   | 10 ++++++++++
 1 file changed, 10 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..241a7e7c7ad2 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,15 @@ 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_combined = CFG_GET_PORTS_MAX_IO_RINGS(oct->conf);
+	channel->combined_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 +260,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
Re: [net-next PATCH v2 2/2] octeon_ep_vf: Add support to retrieve hardware channel information
Posted by Simon Horman 5 days, 11 hours ago
On Thu, Sep 25, 2025 at 05:51:34AM -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>
> ---
> Find V1 here:
> https://lore.kernel.org/netdev/20250923094120.13133-3-sedara@marvell.com/
> 
> V2:
> - Corrected channel counts to combined.

Reviewed-by: Simon Horman <horms@kernel.org>