public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Hariprasad Kelam <hkelam@marvell.com>
To: Breno Leitao <leitao@debian.org>
Cc: Sunil Goutham <sgoutham@marvell.com>,
	Geetha sowjanya <gakula@marvell.com>,
	Subbaraya Sundeep <sbhatta@marvell.com>,
	Bharat Bhushan <bbhushan2@marvell.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Cai Huoqing <cai.huoqing@linux.dev>,
	Christian Benvenuti <benve@cisco.com>,
	Satish Kharat <satishkh@cisco.com>,
	Dimitris Michailidis <dmichail@fungible.com>,
	"Manish Chopra" <manishc@marvell.com>,
	Jian Shen <shenjian15@huawei.com>,
	Salil Mehta <salil.mehta@huawei.com>,
	Jijie Shao <shaojijie@huawei.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 1/8] net: octeontx2: convert to use .get_rx_ring_count
Date: Mon, 12 Jan 2026 12:56:58 +0530	[thread overview]
Message-ID: <aWSiQvjrnoERU+e5@test-OptiPlex-Tower-Plus-7010> (raw)
In-Reply-To: <20260109-grxring_big_v1-v1-1-a0f77f732006@debian.org>

On 2026-01-09 at 23:10:52, Breno Leitao (leitao@debian.org) wrote:
> Use the newly introduced .get_rx_ring_count ethtool ops callback instead
> of handling ETHTOOL_GRXRINGS directly in .get_rxnfc().
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
>  drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
>

   Reviewed-by: Hariprasad Kelam <hkelam@marvell.com>
 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> index b6449f0a9e7d..8918be3ce45e 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> @@ -568,6 +568,13 @@ static int otx2_set_coalesce(struct net_device *netdev,
>  	return 0;
>  }
>  
> +static u32 otx2_get_rx_ring_count(struct net_device *dev)
> +{
> +	struct otx2_nic *pfvf = netdev_priv(dev);
> +
> +	return pfvf->hw.rx_queues;
> +}
> +
>  static int otx2_get_rss_hash_opts(struct net_device *dev,
>  				  struct ethtool_rxfh_fields *nfc)
>  {
> @@ -742,10 +749,6 @@ static int otx2_get_rxnfc(struct net_device *dev,
>  	int ret = -EOPNOTSUPP;
>  
>  	switch (nfc->cmd) {
> -	case ETHTOOL_GRXRINGS:
> -		nfc->data = pfvf->hw.rx_queues;
> -		ret = 0;
> -		break;
>  	case ETHTOOL_GRXCLSRLCNT:
>  		if (netif_running(dev) && ntuple) {
>  			nfc->rule_cnt = pfvf->flow_cfg->nr_flows;
> @@ -1344,6 +1347,7 @@ static const struct ethtool_ops otx2_ethtool_ops = {
>  	.set_coalesce		= otx2_set_coalesce,
>  	.get_rxnfc		= otx2_get_rxnfc,
>  	.set_rxnfc              = otx2_set_rxnfc,
> +	.get_rx_ring_count	= otx2_get_rx_ring_count,
>  	.get_rxfh_key_size	= otx2_get_rxfh_key_size,
>  	.get_rxfh_indir_size	= otx2_get_rxfh_indir_size,
>  	.get_rxfh		= otx2_get_rxfh,
> @@ -1462,6 +1466,7 @@ static const struct ethtool_ops otx2vf_ethtool_ops = {
>  	.get_channels		= otx2_get_channels,
>  	.get_rxnfc		= otx2_get_rxnfc,
>  	.set_rxnfc              = otx2_set_rxnfc,
> +	.get_rx_ring_count	= otx2_get_rx_ring_count,
>  	.get_rxfh_key_size	= otx2_get_rxfh_key_size,
>  	.get_rxfh_indir_size	= otx2_get_rxfh_indir_size,
>  	.get_rxfh		= otx2_get_rxfh,
> 
> -- 
> 2.47.3
> 
> 

  reply	other threads:[~2026-01-12  7:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 17:40 [PATCH net-next 0/8] net: convert drivers to .get_rx_ring_count() Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 1/8] net: octeontx2: convert to use .get_rx_ring_count Breno Leitao
2026-01-12  7:26   ` Hariprasad Kelam [this message]
2026-01-09 17:40 ` [PATCH net-next 2/8] net: hinic: " Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 3/8] net: enic: " Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 4/8] net: funeth: " Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 5/8] net: niu: " Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 6/8] net: qede: " Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 7/8] net: hns: " Breno Leitao
2026-01-12  3:02   ` Jijie Shao
2026-01-09 17:40 ` [PATCH net-next 8/8] net: hns3: " Breno Leitao
2026-01-12  3:03   ` Jijie Shao
2026-01-12 20:57 ` [PATCH net-next 0/8] net: convert drivers to .get_rx_ring_count() patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aWSiQvjrnoERU+e5@test-OptiPlex-Tower-Plus-7010 \
    --to=hkelam@marvell.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bbhushan2@marvell.com \
    --cc=benve@cisco.com \
    --cc=cai.huoqing@linux.dev \
    --cc=davem@davemloft.net \
    --cc=dmichail@fungible.com \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manishc@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=salil.mehta@huawei.com \
    --cc=satishkh@cisco.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=shaojijie@huawei.com \
    --cc=shenjian15@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox