Skip to content

Commit bba18f3

Browse files
leitaokuba-moo
authored andcommitted
net: bnxt: extract GRXRINGS from .get_rxnfc
Commit 84eaf43 ("net: ethtool: add get_rx_ring_count callback to optimize RX ring queries") added specific support for GRXRINGS callback, simplifying .get_rxnfc. Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new .get_rx_ring_count(). This simplifies the RX ring count retrieval and aligns bnxt with the new ethtool API for querying RX ring parameters. Signed-off-by: Breno Leitao <leitao@debian.org> Link: https://patch.msgid.link/20251127-grxrings_broadcom-v1-1-b0b182864950@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 2ce992a commit bba18f3

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,17 +1770,20 @@ static int bnxt_set_rxfh_fields(struct net_device *dev,
17701770
return rc;
17711771
}
17721772

1773+
static u32 bnxt_get_rx_ring_count(struct net_device *dev)
1774+
{
1775+
struct bnxt *bp = netdev_priv(dev);
1776+
1777+
return bp->rx_nr_rings;
1778+
}
1779+
17731780
static int bnxt_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
17741781
u32 *rule_locs)
17751782
{
17761783
struct bnxt *bp = netdev_priv(dev);
17771784
int rc = 0;
17781785

17791786
switch (cmd->cmd) {
1780-
case ETHTOOL_GRXRINGS:
1781-
cmd->data = bp->rx_nr_rings;
1782-
break;
1783-
17841787
case ETHTOOL_GRXCLSRLCNT:
17851788
cmd->rule_cnt = bp->ntp_fltr_count;
17861789
cmd->data = bp->max_fltr | RX_CLS_LOC_SPECIAL;
@@ -5616,6 +5619,7 @@ const struct ethtool_ops bnxt_ethtool_ops = {
56165619
.set_channels = bnxt_set_channels,
56175620
.get_rxnfc = bnxt_get_rxnfc,
56185621
.set_rxnfc = bnxt_set_rxnfc,
5622+
.get_rx_ring_count = bnxt_get_rx_ring_count,
56195623
.get_rxfh_indir_size = bnxt_get_rxfh_indir_size,
56205624
.get_rxfh_key_size = bnxt_get_rxfh_key_size,
56215625
.get_rxfh = bnxt_get_rxfh,

0 commit comments

Comments
 (0)