Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'add-support-to-retrieve-hardware-channel-information'

Sathesh B Edara says:

====================
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.
====================

Link: https://patch.msgid.link/20250925125134.22421-1-sedara@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+20
+10
drivers/net/ethernet/marvell/octeon_ep/octep_ethtool.c
··· 437 437 return 0; 438 438 } 439 439 440 + static void octep_get_channels(struct net_device *dev, 441 + struct ethtool_channels *channel) 442 + { 443 + struct octep_device *oct = netdev_priv(dev); 444 + 445 + channel->max_combined = CFG_GET_PORTS_MAX_IO_RINGS(oct->conf); 446 + channel->combined_count = CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf); 447 + } 448 + 440 449 static const struct ethtool_ops octep_ethtool_ops = { 441 450 .get_drvinfo = octep_get_drvinfo, 442 451 .get_link = ethtool_op_get_link, ··· 454 445 .get_ethtool_stats = octep_get_ethtool_stats, 455 446 .get_link_ksettings = octep_get_link_ksettings, 456 447 .set_link_ksettings = octep_set_link_ksettings, 448 + .get_channels = octep_get_channels, 457 449 }; 458 450 459 451 void octep_set_ethtool_ops(struct net_device *netdev)
+10
drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c
··· 244 244 return 0; 245 245 } 246 246 247 + static void octep_vf_get_channels(struct net_device *dev, 248 + struct ethtool_channels *channel) 249 + { 250 + struct octep_vf_device *oct = netdev_priv(dev); 251 + 252 + channel->max_combined = CFG_GET_PORTS_MAX_IO_RINGS(oct->conf); 253 + channel->combined_count = CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf); 254 + } 255 + 247 256 static const struct ethtool_ops octep_vf_ethtool_ops = { 248 257 .get_drvinfo = octep_vf_get_drvinfo, 249 258 .get_link = ethtool_op_get_link, ··· 260 251 .get_sset_count = octep_vf_get_sset_count, 261 252 .get_ethtool_stats = octep_vf_get_ethtool_stats, 262 253 .get_link_ksettings = octep_vf_get_link_ksettings, 254 + .get_channels = octep_vf_get_channels, 263 255 }; 264 256 265 257 void octep_vf_set_ethtool_ops(struct net_device *netdev)