summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex/benet/be.h
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@emulex.com>2016-06-06 07:22:10 -0400
committerDavid S. Miller <davem@davemloft.net>2016-06-07 16:18:20 -0700
commitde2b1e0366c8c332fa403e8bd8b6e2b22f557d2e (patch)
treee27cb31207e00c8d5e76d57b69a047132db1d73d /drivers/net/ethernet/emulex/benet/be.h
parent45f13df75f9044568af4789af1c52d0ffdc68155 (diff)
downloadtalos-obmc-linux-de2b1e0366c8c332fa403e8bd8b6e2b22f557d2e.tar.gz
talos-obmc-linux-de2b1e0366c8c332fa403e8bd8b6e2b22f557d2e.zip
be2net: Fix provisioning of RSS for VFs in multi-partition configurations
Currently, we do not distribute queue resources to enable RSS for VFs in multi-channel/partition configurations. Fix this by having each PF(SRIOV capable) calculate it's share of the 15 RSS Policy Tables available per port before provisioning resources for all the VFs. This proportional share calculation is done based on division of the PF's MAX VFs with the Total MAX VFs on that port. It also needs to learn about the no: of NIC PFs on the port and subtract that from the 15 RSS Policy Tables on the port. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> 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.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index ee0bdb772b21..e1e6c40a5f8b 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -97,7 +97,8 @@
* SURF/DPDK
*/
-#define MAX_RSS_IFACES 15
+#define MAX_PORT_RSS_TABLES 15
+#define MAX_NIC_FUNCS 16
#define MAX_RX_QS 32
#define MAX_EVT_QS 32
#define MAX_TX_QS 32
@@ -445,6 +446,16 @@ struct be_resources {
u32 if_cap_flags;
u32 vf_if_cap_flags; /* VF if capability flags */
u32 flags;
+ /* Calculated PF Pool's share of RSS Tables. This is not enforced by
+ * the FW, but is a self-imposed driver limitation.
+ */
+ u16 max_rss_tables;
+};
+
+/* These are port-wide values */
+struct be_port_resources {
+ u16 max_vfs;
+ u16 nic_pfs;
};
#define be_is_os2bmc_enabled(adapter) (adapter->flags & BE_FLAGS_OS2BMC)
@@ -635,6 +646,8 @@ struct be_adapter {
#define be_max_rxqs(adapter) (adapter->res.max_rx_qs)
#define be_max_eqs(adapter) (adapter->res.max_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)
static inline u16 be_max_qs(struct be_adapter *adapter)
{
OpenPOWER on IntegriCloud