diff options
author | Sathya Perla <sathya.perla@broadcom.com> | 2016-06-22 08:54:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-27 04:06:24 -0400 |
commit | ce7faf0a071b6d05f55d8b7b36fd796cab527427 (patch) | |
tree | 5f98d9e0f094f98255c96af65cee6fc9c17629d8 /drivers/net/ethernet/emulex/benet/be.h | |
parent | 4c88aaf3e53c5b1e624f048220bdbba71576163d (diff) | |
download | talos-obmc-linux-ce7faf0a071b6d05f55d8b7b36fd796cab527427.tar.gz talos-obmc-linux-ce7faf0a071b6d05f55d8b7b36fd796cab527427.zip |
be2net: fix definition of be_max_eqs()
The EQs available on a function are shared between NIC and RoCE.
The be_max_eqs() macro was so far being used to refer to the max number of
EQs available for NIC. This has caused some confusion in the code. To fix
this confusion this patch introduces a new macro called be_max_nic_eqs()
to refer to the max number of EQs avialable for NIC only and renames
be_max_eqs() to be_max_func_eqs().
Signed-off-by: Sathya Perla <sathya.perla@broadcom.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 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index e1e6c40a5f8b..f8040efb97e9 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -443,6 +443,7 @@ struct be_resources { u16 max_iface_count; u16 max_mcc_count; u16 max_evt_qs; + u16 max_nic_evt_qs; /* NIC's share of evt qs */ u32 if_cap_flags; u32 vf_if_cap_flags; /* VF if capability flags */ u32 flags; @@ -644,7 +645,10 @@ struct be_adapter { #define be_max_txqs(adapter) (adapter->res.max_tx_qs) #define be_max_prio_txqs(adapter) (adapter->res.max_prio_tx_qs) #define be_max_rxqs(adapter) (adapter->res.max_rx_qs) -#define be_max_eqs(adapter) (adapter->res.max_evt_qs) +/* Max number of EQs available for the function (NIC + RoCE (if enabled)) */ +#define be_max_func_eqs(adapter) (adapter->res.max_evt_qs) +/* Max number of EQs available avaialble only for NIC */ +#define be_max_nic_eqs(adapter) (adapter->res.max_nic_evt_qs) #define be_if_cap_flags(adapter) (adapter->res.if_cap_flags) #define be_max_pf_pool_rss_tables(adapter) \ (adapter->pool_res.max_rss_tables) @@ -654,7 +658,7 @@ static inline u16 be_max_qs(struct be_adapter *adapter) /* If no RSS, need atleast the one def RXQ */ u16 num = max_t(u16, be_max_rss(adapter), 1); - num = min(num, be_max_eqs(adapter)); + num = min(num, be_max_nic_eqs(adapter)); return min_t(u16, num, num_online_cpus()); } |