mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
net: qede: convert to use .get_rx_ring_count
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> Link: https://patch.msgid.link/20260109-grxring_big_v1-v1-6-a0f77f732006@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
5baf736ba4
commit
a64f302022
|
|
@ -1199,6 +1199,13 @@ static int qede_get_rxfh_fields(struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static u32 qede_get_rx_ring_count(struct net_device *dev)
|
||||
{
|
||||
struct qede_dev *edev = netdev_priv(dev);
|
||||
|
||||
return QEDE_RSS_COUNT(edev);
|
||||
}
|
||||
|
||||
static int qede_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
|
||||
u32 *rule_locs)
|
||||
{
|
||||
|
|
@ -1206,9 +1213,6 @@ static int qede_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
|
|||
int rc = 0;
|
||||
|
||||
switch (info->cmd) {
|
||||
case ETHTOOL_GRXRINGS:
|
||||
info->data = QEDE_RSS_COUNT(edev);
|
||||
break;
|
||||
case ETHTOOL_GRXCLSRLCNT:
|
||||
info->rule_cnt = qede_get_arfs_filter_count(edev);
|
||||
info->data = QEDE_RFS_MAX_FLTR;
|
||||
|
|
@ -2289,6 +2293,7 @@ static const struct ethtool_ops qede_ethtool_ops = {
|
|||
.get_sset_count = qede_get_sset_count,
|
||||
.get_rxnfc = qede_get_rxnfc,
|
||||
.set_rxnfc = qede_set_rxnfc,
|
||||
.get_rx_ring_count = qede_get_rx_ring_count,
|
||||
.get_rxfh_indir_size = qede_get_rxfh_indir_size,
|
||||
.get_rxfh_key_size = qede_get_rxfh_key_size,
|
||||
.get_rxfh = qede_get_rxfh,
|
||||
|
|
@ -2333,6 +2338,7 @@ static const struct ethtool_ops qede_vf_ethtool_ops = {
|
|||
.get_sset_count = qede_get_sset_count,
|
||||
.get_rxnfc = qede_get_rxnfc,
|
||||
.set_rxnfc = qede_set_rxnfc,
|
||||
.get_rx_ring_count = qede_get_rx_ring_count,
|
||||
.get_rxfh_indir_size = qede_get_rxfh_indir_size,
|
||||
.get_rxfh_key_size = qede_get_rxfh_key_size,
|
||||
.get_rxfh = qede_get_rxfh,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user