i40e/i40evf: Explicitly assign enum index for VSI type
authorSerey Kong <serey.kong@intel.com>
Thu, 27 Aug 2015 15:42:41 +0000 (11:42 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 8 Oct 2015 23:02:44 +0000 (16:02 -0700)
Ran into an issue where PF's VSI type list was different from VF's,
which was resulted in different enum index. The VSI type list can
be different depending on what build flag is used for PF and VF.

The change is to explicitly assign enum index for each VSI type
so that PF and VF always reference to the same VSI type event if the
enum lists are different.

Change-ID: I8c0e5fdb515f324f7964df863a458073cf467e57
Signed-off-by: Serey Kong <serey.kong@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_type.h
drivers/net/ethernet/intel/i40evf/i40e_type.h

index 1c0bedbb413267e8d7f0bbe9b11e9e86f7da5de0..d1ec5a4326cf319b7b4af110447f4e720dc7b8bb 100644 (file)
@@ -160,14 +160,14 @@ enum i40e_set_fc_aq_failures {
 };
 
 enum i40e_vsi_type {
-       I40E_VSI_MAIN = 0,
-       I40E_VSI_VMDQ1,
-       I40E_VSI_VMDQ2,
-       I40E_VSI_CTRL,
-       I40E_VSI_FCOE,
-       I40E_VSI_MIRROR,
-       I40E_VSI_SRIOV,
-       I40E_VSI_FDIR,
+       I40E_VSI_MAIN   = 0,
+       I40E_VSI_VMDQ1  = 1,
+       I40E_VSI_VMDQ2  = 2,
+       I40E_VSI_CTRL   = 3,
+       I40E_VSI_FCOE   = 4,
+       I40E_VSI_MIRROR = 5,
+       I40E_VSI_SRIOV  = 6,
+       I40E_VSI_FDIR   = 7,
        I40E_VSI_TYPE_UNKNOWN
 };
 
index 4b5528d4ae3d748be8c959f08e93bdd3a8362917..a59b60ffd0ce67c0db6a670940e753afeb366f04 100644 (file)
@@ -160,14 +160,14 @@ enum i40e_set_fc_aq_failures {
 };
 
 enum i40e_vsi_type {
-       I40E_VSI_MAIN = 0,
-       I40E_VSI_VMDQ1,
-       I40E_VSI_VMDQ2,
-       I40E_VSI_CTRL,
-       I40E_VSI_FCOE,
-       I40E_VSI_MIRROR,
-       I40E_VSI_SRIOV,
-       I40E_VSI_FDIR,
+       I40E_VSI_MAIN   = 0,
+       I40E_VSI_VMDQ1  = 1,
+       I40E_VSI_VMDQ2  = 2,
+       I40E_VSI_CTRL   = 3,
+       I40E_VSI_FCOE   = 4,
+       I40E_VSI_MIRROR = 5,
+       I40E_VSI_SRIOV  = 6,
+       I40E_VSI_FDIR   = 7,
        I40E_VSI_TYPE_UNKNOWN
 };