From nobody Thu Oct 2 10:55:45 2025 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55822221F26; Thu, 18 Sep 2025 14:49:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.156.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758206956; cv=none; b=GRFBdY/z8WgI4PiBZ2Neg1sur1t4y+v8rdXyWcNEUApH4ZdnvONJgaNI3HAzzfM4CbKf4U1MNLqUYtzcp+rGsnKyqYF8sQyhzcK4vezor5YS5cd0vjgzbWPDc4UcUxYK5c3DGp5UKr77r20sBSvv+La9Gs6WXRGWWE2OADmpZj0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758206956; c=relaxed/simple; bh=GsnPxTn+x4DSSdnvo6ORja4Dj3Jto43CHQPs5k23NpY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=d8H9oWLynEJMJQP82d9+zTzCncCo+HWMVxCc5PwklOCElcRpzKDZulHM7TuDRoROIhvLZQ+lrvHgcsvLO3NKKcKjhD7STe83LkNoMnnSfUh6Y+rd7xPuDYe9FckIQJm4LFdMthg0VfQ9GxKs6JwBtS+XjHAjoTFOWx7C5TfF6pk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=pass smtp.mailfrom=marvell.com; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b=BMu5Qs2H; arc=none smtp.client-ip=67.231.156.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marvell.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="BMu5Qs2H" Received: from pps.filterd (m0431383.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58IEOxgK019883; Thu, 18 Sep 2025 07:49:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=A pHvNDSxieYbzSY7gu9AdrSQmWvjJrWk+/Uceyuye5Q=; b=BMu5Qs2HmNNaStwuI AylbxnDoryTgGsekKrv9D+LzDl07SM8Rn0qL1YoLMT2Xi3a3e5bdiUZ2rvsD9W/e iercGG/Rsmm+gIBD/7Az1ku6i/rysfOVKsu6K7uJQK3x2nfAs/v7F/zpiJiwkI3+ Tr9wsxGEgM87N7GSVpxmCF9lBK8QQAUJR02qr1shPT8/rXHIPUgTIVQMXMnCR42R FWyo0xy/ATMe0eQOcyTa9IcOMDLYCBCkvXmc+bmVOKnT0bv2y86kpg0ceMcbmQG/ s2jCad5Vx5lZclUE1SOiqPY6+Rbt9Kzx0YeqR2oSqytCdyX1RXNlCfA7DLTS3Q1A QsB/A== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 498ktj81p8-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Sep 2025 07:49:04 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.25; Thu, 18 Sep 2025 07:49:10 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.25 via Frontend Transport; Thu, 18 Sep 2025 07:49:10 -0700 Received: from sburla-PowerEdge-T630.sclab.marvell.com (unknown [10.106.27.217]) by maili.marvell.com (Postfix) with ESMTP id 092A35C68E5; Thu, 18 Sep 2025 07:49:03 -0700 (PDT) From: Sathesh B Edara To: , , , , , , , , , , CC: , Andrew Lunn Subject: [net-next PATCH v1 2/2] octeon_ep_vf: Add support to retrieve hardware channel information Date: Thu, 18 Sep 2025 07:48:58 -0700 Message-ID: <20250918144858.29960-3-sedara@marvell.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20250918144858.29960-1-sedara@marvell.com> References: <20250918144858.29960-1-sedara@marvell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTE4MDEzMCBTYWx0ZWRfX2Z4/lDmTx5Bg JmU9fNW0jpzRJdeYXClq59Rq06ZrqjFjG2sKdQgzdHlaMYVmPwaEohupd0zUtZ65U5HOXPID9Pk SHLpBkiLtnhmrZ93QWzYP/EUU2lvdjBgW/bIoKSLVDUP4gRzhUix4zw4TIN76r/VImrJUIT5NoW 5t41j5M3zzrzymtILz3B8qmmYCgyty8Vl0quHB+raBZR3Gy41CG1596GP4v5pDkWcbc1Yf10bUA wa/pDgoq/pMYHE9GXyLSXRurPKbSPT8GGOC7FEiMrVruugzqndFXaH++pA2KTb6NZJ3e2QJg+vK wkS+iulM9baS+Vv6JO7vNOXJ78lbTcnM9Rc8ylk8GbRh28/bsAWFzlORqZInjHOIESxNZlNHQ+B UGBNTSj2 X-Proofpoint-GUID: O5muetwqRtn6paqMXLHiOdOGhsN6zZ-9 X-Authority-Analysis: v=2.4 cv=JYC8rVKV c=1 sm=1 tr=0 ts=68cc1be0 cx=c_pps a=rEv8fa4AjpPjGxpoe8rlIQ==:117 a=rEv8fa4AjpPjGxpoe8rlIQ==:17 a=yJojWOMRYYMA:10 a=M5GUcnROAAAA:8 a=p1zdzuy5FtcdZHaGWb8A:9 a=OBjm3rFKGHvpk9ecZwUJ:22 X-Proofpoint-ORIG-GUID: O5muetwqRtn6paqMXLHiOdOGhsN6zZ-9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-18_01,2025-09-18_02,2025-03-28_01 Content-Type: text/plain; charset="utf-8" This patch introduces support for retrieving hardware channel configuration through the ethtool interface. Signed-off-by: Sathesh B Edara --- .../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_devi= ce *netdev, return 0; } =20 +static void octep_vf_get_channels(struct net_device *dev, + struct ethtool_channels *channel) +{ + struct octep_vf_device *oct =3D netdev_priv(dev); + + channel->max_rx =3D CFG_GET_PORTS_MAX_IO_RINGS(oct->conf); + channel->max_tx =3D CFG_GET_PORTS_MAX_IO_RINGS(oct->conf); + channel->rx_count =3D CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf); + channel->tx_count =3D CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf); +} + static const struct ethtool_ops octep_vf_ethtool_ops =3D { .get_drvinfo =3D octep_vf_get_drvinfo, .get_link =3D ethtool_op_get_link, @@ -251,6 +262,7 @@ static const struct ethtool_ops octep_vf_ethtool_ops = =3D { .get_sset_count =3D octep_vf_get_sset_count, .get_ethtool_stats =3D octep_vf_get_ethtool_stats, .get_link_ksettings =3D octep_vf_get_link_ksettings, + .get_channels =3D octep_vf_get_channels, }; =20 void octep_vf_set_ethtool_ops(struct net_device *netdev) --=20 2.36.0