From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Breno Leitao <leitao@debian.org>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.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>, Felix Fietkau <nbd@nbd.name>,
Sean Wang <sean.wang@mediatek.com>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
"Shay Agroskin" <shayagr@amazon.com>,
Arthur Kiyanovski <akiyano@amazon.com>,
"David Arinzon" <darinzon@amazon.com>,
Saeed Bishara <saeedb@amazon.com>,
"Bryan Whitehead" <bryan.whitehead@microchip.com>,
<UNGLinuxDriver@microchip.com>,
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
Raju Rangoju <Raju.Rangoju@amd.com>,
Potnuri Bharat Teja <bharat@chelsio.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
Jiawen Wu <jiawenwu@trustnetic.com>,
Mengyuan Lou <mengyuanlou@net-swift.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH net-next 8/9] net: macb: convert to use .get_rx_ring_count
Date: Mon, 19 Jan 2026 14:08:04 +0100 [thread overview]
Message-ID: <402feb92-104b-4fe0-b223-a85afd60d084@microchip.com> (raw)
In-Reply-To: <20260115-grxring_big_v2-v1-8-b3e1b58bced5@debian.org>
On 15/01/2026 at 15:37, Breno Leitao 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>
Looks good to me:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Thanks, best regards,
Nicolas
> ---
> drivers/net/ethernet/cadence/macb_main.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 2d5f3eb09530..8135c5c2a51a 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -3850,6 +3850,13 @@ static int gem_get_all_flow_entries(struct net_device *netdev,
> return 0;
> }
>
> +static u32 gem_get_rx_ring_count(struct net_device *netdev)
> +{
> + struct macb *bp = netdev_priv(netdev);
> +
> + return bp->num_queues;
> +}
> +
> static int gem_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
> u32 *rule_locs)
> {
> @@ -3857,9 +3864,6 @@ static int gem_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
> int ret = 0;
>
> switch (cmd->cmd) {
> - case ETHTOOL_GRXRINGS:
> - cmd->data = bp->num_queues;
> - break;
> case ETHTOOL_GRXCLSRLCNT:
> cmd->rule_cnt = bp->rx_fs_list.count;
> break;
> @@ -3941,6 +3945,7 @@ static const struct ethtool_ops gem_ethtool_ops = {
> .set_ringparam = macb_set_ringparam,
> .get_rxnfc = gem_get_rxnfc,
> .set_rxnfc = gem_set_rxnfc,
> + .get_rx_ring_count = gem_get_rx_ring_count,
> };
>
> static int macb_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
>
> --
> 2.47.3
>
next prev parent reply other threads:[~2026-01-19 13:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 14:37 [PATCH net-next 0/9] net: convert drivers to .get_rx_ring_count (part 2) Breno Leitao
2026-01-15 14:37 ` [PATCH net-next 1/9] net: benet: convert to use .get_rx_ring_count Breno Leitao
2026-01-18 2:15 ` Jakub Kicinski
2026-01-19 11:07 ` Breno Leitao
2026-01-19 12:56 ` Breno Leitao
2026-01-19 17:45 ` Jakub Kicinski
2026-01-15 14:37 ` [PATCH net-next 2/9] net: tsnep: " Breno Leitao
2026-01-15 14:37 ` [PATCH net-next 3/9] net: mediatek: " Breno Leitao
2026-01-15 14:37 ` [PATCH net-next 4/9] net: ena: " Breno Leitao
2026-01-15 17:51 ` Kiyanovski, Arthur
2026-01-15 14:37 ` [PATCH net-next 5/9] net: lan743x: " Breno Leitao
2026-01-15 14:37 ` [PATCH net-next 6/9] net: xgbe: " Breno Leitao
2026-01-19 12:10 ` Rangoju, Raju
2026-01-15 14:37 ` [PATCH net-next 7/9] net: cxgb4: " Breno Leitao
2026-01-15 14:37 ` [PATCH net-next 8/9] net: macb: " Breno Leitao
2026-01-19 13:08 ` Nicolas Ferre [this message]
2026-01-15 14:37 ` [PATCH net-next 9/9] net: txgbe: " Breno Leitao
2026-01-19 14:19 ` [PATCH net-next 0/9] net: convert drivers to .get_rx_ring_count (part 2) 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=402feb92-104b-4fe0-b223-a85afd60d084@microchip.com \
--to=nicolas.ferre@microchip.com \
--cc=Raju.Rangoju@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=ajit.khaparde@broadcom.com \
--cc=akiyano@amazon.com \
--cc=andrew+netdev@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bharat@chelsio.com \
--cc=bryan.whitehead@microchip.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=darinzon@amazon.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiawenwu@trustnetic.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=mengyuanlou@net-swift.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedb@amazon.com \
--cc=sean.wang@mediatek.com \
--cc=shayagr@amazon.com \
--cc=somnath.kotur@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.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