mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
net: atlantic: 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> Reviewed-by: Brett Creeley <brett.creeley@amd.com> Link: https://patch.msgid.link/20260122-grxring_big_v4-v2-2-94dbe4dcaa10@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
8f2a880d65
commit
489a5b81ab
|
|
@ -500,20 +500,25 @@ static int aq_ethtool_set_rss(struct net_device *netdev,
|
|||
return err;
|
||||
}
|
||||
|
||||
static u32 aq_ethtool_get_rx_ring_count(struct net_device *ndev)
|
||||
{
|
||||
struct aq_nic_cfg_s *cfg;
|
||||
struct aq_nic_s *aq_nic;
|
||||
|
||||
aq_nic = netdev_priv(ndev);
|
||||
cfg = aq_nic_get_cfg(aq_nic);
|
||||
|
||||
return cfg->vecs;
|
||||
}
|
||||
|
||||
static int aq_ethtool_get_rxnfc(struct net_device *ndev,
|
||||
struct ethtool_rxnfc *cmd,
|
||||
u32 *rule_locs)
|
||||
{
|
||||
struct aq_nic_s *aq_nic = netdev_priv(ndev);
|
||||
struct aq_nic_cfg_s *cfg;
|
||||
int err = 0;
|
||||
|
||||
cfg = aq_nic_get_cfg(aq_nic);
|
||||
|
||||
switch (cmd->cmd) {
|
||||
case ETHTOOL_GRXRINGS:
|
||||
cmd->data = cfg->vecs;
|
||||
break;
|
||||
case ETHTOOL_GRXCLSRLCNT:
|
||||
cmd->rule_cnt = aq_get_rxnfc_count_all_rules(aq_nic);
|
||||
break;
|
||||
|
|
@ -1072,6 +1077,7 @@ const struct ethtool_ops aq_ethtool_ops = {
|
|||
.set_rxfh = aq_ethtool_set_rss,
|
||||
.get_rxnfc = aq_ethtool_get_rxnfc,
|
||||
.set_rxnfc = aq_ethtool_set_rxnfc,
|
||||
.get_rx_ring_count = aq_ethtool_get_rx_ring_count,
|
||||
.get_msglevel = aq_get_msg_level,
|
||||
.set_msglevel = aq_set_msg_level,
|
||||
.get_sset_count = aq_ethtool_get_sset_count,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user