diff options
author | Vasundhara Volam <vasundhara.volam@emulex.com> | 2014-07-17 16:20:31 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-17 16:38:15 -0700 |
commit | f174c7ec10d99e62f7722d0608b2a881ef091d21 (patch) | |
tree | 8eb670855d2a7bbc5aa2071a5e112a8c5205069c /drivers/net/ethernet/emulex/benet/be.h | |
parent | 962bcb750b47ef0c8d28cc217ec22b4e44413565 (diff) | |
download | op-kernel-dev-f174c7ec10d99e62f7722d0608b2a881ef091d21.zip op-kernel-dev-f174c7ec10d99e62f7722d0608b2a881ef091d21.tar.gz |
be2net: use adapter->flags to track SRIOV state
The driver so far used adapter->num_vfs value to check if SR-IOV is enabled
or not. But, the patch bec84e6("create optimal number of queues on SR-IOV
config") changed this logic. The adapter->num_vfs value is validated and set
much before SR-IOV is enabled. So, we now use an explicit flag to track
SR-IOV enabled state.
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 3e639e8..25cd3c9 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -372,6 +372,7 @@ enum vf_state { }; #define BE_FLAGS_LINK_STATUS_INIT 1 +#define BE_FLAGS_SRIOV_ENABLED (1 << 2) #define BE_FLAGS_WORKER_SCHEDULED (1 << 3) #define BE_FLAGS_VLAN_PROMISC (1 << 4) #define BE_FLAGS_MCAST_PROMISC (1 << 5) @@ -525,7 +526,8 @@ struct be_adapter { #define be_physfn(adapter) (!adapter->virtfn) #define be_virtfn(adapter) (adapter->virtfn) -#define sriov_enabled(adapter) (adapter->num_vfs > 0) +#define sriov_enabled(adapter) (adapter->flags & \ + BE_FLAGS_SRIOV_ENABLED) #define for_all_vfs(adapter, vf_cfg, i) \ for (i = 0, vf_cfg = &adapter->vf_cfg[i]; i < adapter->num_vfs; \ |