Skip to contentSkip to conversation

Add support to retrieve hardware channel information

PATCH In review Sathesh B Edara 2 participants 4 messages Sep 18, 2025

Subsystems (4)
lore
Share & tools
lore

Sathesh B Edara

author maintainer
#0 lore raw

cover Add support to retrieve hardware channel information

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(+)
Signature · 1 line
2.36.0
author maintainer
#1 lore raw

PATCH 1/2 octeon_ep: Add support to retrieve hardware channel information

This patch introduces support for retrieving hardware channel configuration through the ethtool interface.

---
 .../net/ethernet/marvell/octeon_ep/octep_ethtool.c   | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/net/ethernet/marvell/octeon_ep/octep_ethtool.c +12 -0
index a88c006ea65b..9d57e2da0b4b 100644
@@ -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)
Signature · 1 line
2.36.0
author maintainer
#2 lore raw

PATCH 2/2 octeon_ep_vf: Add support to retrieve hardware channel information

In reply to Sathesh B Edara

This patch introduces support for retrieving hardware channel configuration through the ethtool interface.

---
 .../ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c +12 -0
index d60441928ba9..2b6a8530cbaa 100644
@@ -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)
Signature · 1 line
2.36.0
maintainer
#3 lore raw
In reply to Sathesh B Edara
Quoted 2 lines · On Thu, 18 Sep 2025 04:26:50 -0700 Sathesh B Edara wrote:

This patch series introduces support for retrieving hardware channel configuration through the ethtool interface for both PF and VF.

"net" in the subject means its a fix. This looks like "net-next" material. Please repost tomorrow and make sure to read:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html

Signature · 1 line
pw-bot: cr