mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
net: sfc: siena: 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-8-94dbe4dcaa10@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
67f16fba55
commit
c9e4688b2e
|
|
@ -261,6 +261,7 @@ const struct ethtool_ops efx_siena_ethtool_ops = {
|
|||
.reset = efx_siena_ethtool_reset,
|
||||
.get_rxnfc = efx_siena_ethtool_get_rxnfc,
|
||||
.set_rxnfc = efx_siena_ethtool_set_rxnfc,
|
||||
.get_rx_ring_count = efx_siena_ethtool_get_rx_ring_count,
|
||||
.get_rxfh_indir_size = efx_siena_ethtool_get_rxfh_indir_size,
|
||||
.get_rxfh_key_size = efx_siena_ethtool_get_rxfh_key_size,
|
||||
.get_rxfh = efx_siena_ethtool_get_rxfh,
|
||||
|
|
|
|||
|
|
@ -841,6 +841,13 @@ int efx_siena_ethtool_get_rxfh_fields(struct net_device *net_dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
u32 efx_siena_ethtool_get_rx_ring_count(struct net_device *net_dev)
|
||||
{
|
||||
struct efx_nic *efx = netdev_priv(net_dev);
|
||||
|
||||
return efx->n_rx_channels;
|
||||
}
|
||||
|
||||
int efx_siena_ethtool_get_rxnfc(struct net_device *net_dev,
|
||||
struct ethtool_rxnfc *info, u32 *rule_locs)
|
||||
{
|
||||
|
|
@ -849,10 +856,6 @@ int efx_siena_ethtool_get_rxnfc(struct net_device *net_dev,
|
|||
s32 rc = 0;
|
||||
|
||||
switch (info->cmd) {
|
||||
case ETHTOOL_GRXRINGS:
|
||||
info->data = efx->n_rx_channels;
|
||||
return 0;
|
||||
|
||||
case ETHTOOL_GRXCLSRLCNT:
|
||||
info->data = efx_filter_get_rx_id_limit(efx);
|
||||
if (info->data == 0)
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ int efx_siena_ethtool_set_fecparam(struct net_device *net_dev,
|
|||
struct ethtool_fecparam *fecparam);
|
||||
int efx_siena_ethtool_get_rxnfc(struct net_device *net_dev,
|
||||
struct ethtool_rxnfc *info, u32 *rule_locs);
|
||||
u32 efx_siena_ethtool_get_rx_ring_count(struct net_device *net_dev);
|
||||
int efx_siena_ethtool_set_rxnfc(struct net_device *net_dev,
|
||||
struct ethtool_rxnfc *info);
|
||||
u32 efx_siena_ethtool_get_rxfh_indir_size(struct net_device *net_dev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user