Skip to content

Commit

Permalink
igc: Get rid of igc_max_channels()
Browse files Browse the repository at this point in the history
The local function igc_max_channels() is a pointless wrapper around
igc_get_max_rss_queues(). This patch removes it and updates the callers
accordingly. It also does some cleanup on igc_get_max_rss_queues().

Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Andre Guedes authored and Jeff Kirsher committed May 21, 2020
1 parent 8e34cad commit 4d0710c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
9 changes: 2 additions & 7 deletions drivers/net/ethernet/intel/igc/igc_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,18 +1508,13 @@ static int igc_set_rxfh(struct net_device *netdev, const u32 *indir,
return 0;
}

static unsigned int igc_max_channels(struct igc_adapter *adapter)
{
return igc_get_max_rss_queues(adapter);
}

static void igc_get_channels(struct net_device *netdev,
struct ethtool_channels *ch)
{
struct igc_adapter *adapter = netdev_priv(netdev);

/* Report maximum channels */
ch->max_combined = igc_max_channels(adapter);
ch->max_combined = igc_get_max_rss_queues(adapter);

/* Report info for other vector */
if (adapter->flags & IGC_FLAG_HAS_MSIX) {
Expand All @@ -1546,7 +1541,7 @@ static int igc_set_channels(struct net_device *netdev,
return -EINVAL;

/* Verify the number of channels doesn't exceed hw limits */
max_combined = igc_max_channels(adapter);
max_combined = igc_get_max_rss_queues(adapter);
if (count > max_combined)
return -EINVAL;

Expand Down
7 changes: 1 addition & 6 deletions drivers/net/ethernet/intel/igc/igc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2731,12 +2731,7 @@ void igc_set_flag_queue_pairs(struct igc_adapter *adapter,

unsigned int igc_get_max_rss_queues(struct igc_adapter *adapter)
{
unsigned int max_rss_queues;

/* Determine the maximum number of RSS queues supported. */
max_rss_queues = IGC_MAX_RX_QUEUES;

return max_rss_queues;
return IGC_MAX_RX_QUEUES;
}

static void igc_init_queue_configuration(struct igc_adapter *adapter)
Expand Down

0 comments on commit 4d0710c

Please sign in to comment.