Re: [PATCH 2/2] igb: Expose RSS indirection table for ethtool
From: Ben Hutchings <hidden>
Date: 2013-08-02 11:52:49
From: Ben Hutchings <hidden>
Date: 2013-08-02 11:52:49
On Wed, 2013-07-31 at 11:43 +0300, Laura Mihaela Vasilescu wrote: [...]
+static int igb_set_rxfh_indir(struct net_device *netdev, const u32 *indir)
+{
+ struct igb_adapter *adapter = netdev_priv(netdev);
+ struct e1000_hw *hw = &adapter->hw;
+ int i;
+ u32 num_queues;
+
+ num_queues = adapter->rss_queues;
+
+ switch (hw->mac.type) {
+ case e1000_82576:
+ /* 82576 supports 2 RSS queues for SR-IOV */
+ if (adapter->vfs_allocated_count)
+ num_queues = 2;
+ break;
+ default:
+ break;
+ }
+
+ /* Verify user input. */
+ for (i = 0; i < IGB_RETA_SIZE; i++)
+ if (indir[i] > num_queues)
+ return -EINVAL;[...] Surely the comparison should be >= ? Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.