> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of Jakub Kicinski
> Sent: Friday, June 13, 2025 3:01 AM
> To: [email protected]
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; intel-wired-
> [email protected]; Nguyen, Anthony L <[email protected]>;
> Kitszel, Przemyslaw <[email protected]>; Keller, Jacob E
> <[email protected]>; [email protected]; Jakub
> Kicinski <[email protected]>
> Subject: [Intel-wired-lan] [PATCH net-next 1/7] eth: igb: migrate to
> new RXFH callbacks
> 
> Migrate to new callbacks added by commit 9bb00786fc61 ("net: ethtool:
> add dedicated callbacks for getting and setting rxfh fields").
> 
> Signed-off-by: Jakub Kicinski <[email protected]>
Reviewed-by: Aleksandr Loktionov <[email protected]>
> ---
>  drivers/net/ethernet/intel/igb/igb_ethtool.c | 20 ++++++++++---------
> -
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c
> b/drivers/net/ethernet/intel/igb/igb_ethtool.c
> index ca6ccbc13954..92ef33459aec 100644
> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
> @@ -2500,9 +2500,11 @@ static int igb_get_ethtool_nfc_all(struct
> igb_adapter *adapter,
>       return 0;
>  }
> 
> -static int igb_get_rss_hash_opts(struct igb_adapter *adapter,
> -                              struct ethtool_rxnfc *cmd)
> +static int igb_get_rxfh_fields(struct net_device *dev,
> +                            struct ethtool_rxfh_fields *cmd)
>  {
> +     struct igb_adapter *adapter = netdev_priv(dev);
> +
>       cmd->data = 0;
> 
>       /* Report default options for RSS on igb */ @@ -2563,9 +2565,6
> @@ static int igb_get_rxnfc(struct net_device *dev, struct
> ethtool_rxnfc *cmd,
>       case ETHTOOL_GRXCLSRLALL:
>               ret = igb_get_ethtool_nfc_all(adapter, cmd, rule_locs);
>               break;
> -     case ETHTOOL_GRXFH:
> -             ret = igb_get_rss_hash_opts(adapter, cmd);
> -             break;
>       default:
>               break;
>       }
> @@ -2575,9 +2574,11 @@ static int igb_get_rxnfc(struct net_device
> *dev, struct ethtool_rxnfc *cmd,
> 
>  #define UDP_RSS_FLAGS (IGB_FLAG_RSS_FIELD_IPV4_UDP | \
>                      IGB_FLAG_RSS_FIELD_IPV6_UDP)
> -static int igb_set_rss_hash_opt(struct igb_adapter *adapter,
> -                             struct ethtool_rxnfc *nfc)
> +static int igb_set_rxfh_fields(struct net_device *dev,
> +                            const struct ethtool_rxfh_fields *nfc,
> +                            struct netlink_ext_ack *extack)
>  {
> +     struct igb_adapter *adapter = netdev_priv(dev);
>       u32 flags = adapter->flags;
> 
>       /* RSS does not support anything other than hashing @@ -3005,9
> +3006,6 @@ static int igb_set_rxnfc(struct net_device *dev, struct
> ethtool_rxnfc *cmd)
>       int ret = -EOPNOTSUPP;
> 
>       switch (cmd->cmd) {
> -     case ETHTOOL_SRXFH:
> -             ret = igb_set_rss_hash_opt(adapter, cmd);
> -             break;
>       case ETHTOOL_SRXCLSRLINS:
>               ret = igb_add_ethtool_nfc_entry(adapter, cmd);
>               break;
> @@ -3485,6 +3483,8 @@ static const struct ethtool_ops igb_ethtool_ops
> = {
>       .get_rxfh_indir_size    = igb_get_rxfh_indir_size,
>       .get_rxfh               = igb_get_rxfh,
>       .set_rxfh               = igb_set_rxfh,
> +     .get_rxfh_fields        = igb_get_rxfh_fields,
> +     .set_rxfh_fields        = igb_set_rxfh_fields,
>       .get_channels           = igb_get_channels,
>       .set_channels           = igb_set_channels,
>       .get_priv_flags         = igb_get_priv_flags,
> --
> 2.49.0

Reply via email to