diff mbox

[net] cxgb4/cxgb4vf: Allocate more queues for 100G adapter

Message ID 1474272166-30147-1-git-send-email-hariprasad@chelsio.com
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Hariprasad Shenai Sept. 19, 2016, 8:02 a.m. UTC
We were missing check for 100G while checking port speed, which lead to
less number of queues getting allocated for 100G and leading to low
throughput. Adding the missing check for both NIC and vNIC driver.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c    | 3 ++-
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c         | 2 +-
 drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

Comments

Hariprasad Shenai Sept. 20, 2016, 6:18 a.m. UTC | #1
On Mon, Sep 19, 2016 at 01:32:46PM +0530, Hariprasad Shenai wrote:
> We were missing check for 100G while checking port speed, which lead to
> less number of queues getting allocated for 100G and leading to low
> throughput. Adding the missing check for both NIC and vNIC driver.
> 
> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
> ---

Hi David,

I missed 25G, will send a V2 for the same with changes for 25Gbps adapter too.

Thanks,
Hari
diff mbox

Patch

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index c762a8c8c954..a8e4580f0440 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -4308,7 +4308,8 @@  static const struct pci_error_handlers cxgb4_eeh = {
 static inline bool is_x_10g_port(const struct link_config *lc)
 {
 	return (lc->supported & FW_PORT_CAP_SPEED_10G) != 0 ||
-	       (lc->supported & FW_PORT_CAP_SPEED_40G) != 0;
+	       (lc->supported & FW_PORT_CAP_SPEED_40G) != 0 ||
+	       (lc->supported & FW_PORT_CAP_SPEED_100G) != 0;
 }
 
 static inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index dc92c80a75f4..37885223347d 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -3628,7 +3628,7 @@  void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf)
 
 #define ADVERT_MASK (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\
 		     FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_40G | \
-		     FW_PORT_CAP_ANEG)
+		     FW_PORT_CAP_SPEED_100G | FW_PORT_CAP_ANEG)
 
 /**
  *	t4_link_l1cfg - apply link configuration to MAC/PHY
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h b/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h
index 8ee541431e8b..903c0584c6c4 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h
@@ -274,7 +274,8 @@  static inline bool is_10g_port(const struct link_config *lc)
 static inline bool is_x_10g_port(const struct link_config *lc)
 {
 	return (lc->supported & FW_PORT_CAP_SPEED_10G) != 0 ||
-		(lc->supported & FW_PORT_CAP_SPEED_40G) != 0;
+		(lc->supported & FW_PORT_CAP_SPEED_40G) != 0 ||
+		(lc->supported & FW_PORT_CAP_SPEED_100G) != 0;
 }
 
 static inline unsigned int core_ticks_per_usec(const struct adapter *adapter)