]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
bnxt_en: Fix up bnxt_get_rxfh_indir_size().
authorMichael Chan <michael.chan@broadcom.com>
Wed, 8 Jul 2020 11:53:54 +0000 (07:53 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jul 2020 22:21:13 +0000 (15:21 -0700)
Fix up bnxt_get_rxfh_indir_size() to return the proper current RSS
table size for P5 chips.  Change it to non-static so that bnxt.c
can use it to get the table size.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h

index 6b88143af5ea19e5c021cf6442d7cc77bd6fb4bc..995de937358abf884b366eeed7ad4d4e53a62b2d 100644 (file)
@@ -1273,8 +1273,12 @@ static int bnxt_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
        return rc;
 }
 
-static u32 bnxt_get_rxfh_indir_size(struct net_device *dev)
+u32 bnxt_get_rxfh_indir_size(struct net_device *dev)
 {
+       struct bnxt *bp = netdev_priv(dev);
+
+       if (bp->flags & BNXT_FLAG_CHIP_P5)
+               return ALIGN(bp->rx_nr_rings, BNXT_RSS_TABLE_ENTRIES_P5);
        return HW_HASH_INDEX_SIZE;
 }
 
index ce7585ff9e4ddac0a67fe48f168fccc2a1bdf58e..dddbca1d052c7ed33d1a32dc67ac0b9fca0079a0 100644 (file)
@@ -86,6 +86,7 @@ struct hwrm_dbg_cmn_output {
 
 extern const struct ethtool_ops bnxt_ethtool_ops;
 
+u32 bnxt_get_rxfh_indir_size(struct net_device *dev);
 u32 _bnxt_fw_to_ethtool_adv_spds(u16, u8);
 u32 bnxt_fw_to_ethtool_speed(u16);
 u16 bnxt_get_fw_auto_link_speeds(u32);