]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ixgbe: Default to 1 pool always being allocated
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 22 Nov 2017 18:57:05 +0000 (10:57 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 12 Jan 2018 16:20:10 +0000 (08:20 -0800)
We might as well configure the limit to default to 1 pool always for the
interface. This accounts for the fact that the PF counts as 1 pool if
SR-IOV is enabled, and in general we are always running in 1 pool mode when
RSS or DCB is enabled as well, though we don't need to actually evaluate
any of the VMDq features in those cases.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c

index 9416531335f75b852a27688a4dd52570860e5b52..ffd9619f4c8031d9750febe7b7cabedfb220a7db 100644 (file)
@@ -6129,6 +6129,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter,
        fdir = min_t(int, IXGBE_MAX_FDIR_INDICES, num_online_cpus());
        adapter->ring_feature[RING_F_FDIR].limit = fdir;
        adapter->fdir_pballoc = IXGBE_FDIR_PBALLOC_64K;
+       adapter->ring_feature[RING_F_VMDQ].limit = 1;
 #ifdef CONFIG_IXGBE_DCA
        adapter->flags |= IXGBE_FLAG_DCA_CAPABLE;
 #endif
index 0085f4632966d94ea1c592bed689cc9b8f6fa564..543f2e60e4b7fb8b27860cc7f0cef4785d6901c4 100644 (file)
@@ -78,12 +78,9 @@ static int __ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
        struct ixgbe_hw *hw = &adapter->hw;
        int i;
 
-       adapter->flags |= IXGBE_FLAG_SRIOV_ENABLED;
-
        /* Enable VMDq flag so device will be set in VM mode */
-       adapter->flags |= IXGBE_FLAG_VMDQ_ENABLED;
-       if (!adapter->ring_feature[RING_F_VMDQ].limit)
-               adapter->ring_feature[RING_F_VMDQ].limit = 1;
+       adapter->flags |= IXGBE_FLAG_SRIOV_ENABLED |
+                         IXGBE_FLAG_VMDQ_ENABLED;
 
        /* Allocate memory for per VF control structures */
        adapter->vfinfo = kcalloc(num_vfs, sizeof(struct vf_data_storage),