aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Bogdanov <dmitry.bogdanov@aquantia.com>2019-02-26 10:39:13 -0500
committerDavid S. Miller <davem@davemloft.net>2019-03-01 14:24:53 -0500
commit15f3ddf53d4d26c4e338c355abffb3eaf4b3112f (patch)
treefa15cc265769222d5a59bf543bb53247be017008
parentada641ff6ed34a125fbf62ec79733352ffd4305d (diff)
net: aquantia: regression on cpus with high cores: set mode with 8 queues
Recently the maximum number of queues was increased up to 8, but NIC was not fully configured for 8 queues. In setups with more than 4 CPU cores parts of TX traffic gets lost if the kernel routes it to queues 4th-8th. This patch sets a tx hw traffic mode with 8 queues. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202651 Fixes: 71a963cfc50b ("net: aquantia: increase max number of hw queues") Reported-by: Nicholas Johnson <nicholas.johnson@outlook.com.au> Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c3
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c9
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.h4
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h13
4 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
index b58ca7cb8e9d..fbba300c1d01 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
@@ -275,6 +275,9 @@ static int hw_atl_b0_hw_offload_set(struct aq_hw_s *self,
275 275
276static int hw_atl_b0_hw_init_tx_path(struct aq_hw_s *self) 276static int hw_atl_b0_hw_init_tx_path(struct aq_hw_s *self)
277{ 277{
278 /* Tx TC/Queue number config */
279 hw_atl_rpb_tps_tx_tc_mode_set(self, 1U);
280
278 hw_atl_thm_lso_tcp_flag_of_first_pkt_set(self, 0x0FF6U); 281 hw_atl_thm_lso_tcp_flag_of_first_pkt_set(self, 0x0FF6U);
279 hw_atl_thm_lso_tcp_flag_of_middle_pkt_set(self, 0x0FF6U); 282 hw_atl_thm_lso_tcp_flag_of_middle_pkt_set(self, 0x0FF6U);
280 hw_atl_thm_lso_tcp_flag_of_last_pkt_set(self, 0x0F7FU); 283 hw_atl_thm_lso_tcp_flag_of_last_pkt_set(self, 0x0F7FU);
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c
index 939f77e2e117..8ac7a67b15c1 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c
@@ -1274,6 +1274,15 @@ void hw_atl_tpb_tx_buff_en_set(struct aq_hw_s *aq_hw, u32 tx_buff_en)
1274 HW_ATL_TPB_TX_BUF_EN_SHIFT, tx_buff_en); 1274 HW_ATL_TPB_TX_BUF_EN_SHIFT, tx_buff_en);
1275} 1275}
1276 1276
1277void hw_atl_rpb_tps_tx_tc_mode_set(struct aq_hw_s *aq_hw,
1278 u32 tx_traf_class_mode)
1279{
1280 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPB_TX_TC_MODE_ADDR,
1281 HW_ATL_TPB_TX_TC_MODE_MSK,
1282 HW_ATL_TPB_TX_TC_MODE_SHIFT,
1283 tx_traf_class_mode);
1284}
1285
1277void hw_atl_tpb_tx_buff_hi_threshold_per_tc_set(struct aq_hw_s *aq_hw, 1286void hw_atl_tpb_tx_buff_hi_threshold_per_tc_set(struct aq_hw_s *aq_hw,
1278 u32 tx_buff_hi_threshold_per_tc, 1287 u32 tx_buff_hi_threshold_per_tc,
1279 u32 buffer) 1288 u32 buffer)
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.h b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.h
index 03c570d115fe..f529540bfd7e 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.h
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.h
@@ -605,6 +605,10 @@ void hw_atl_thm_lso_tcp_flag_of_middle_pkt_set(struct aq_hw_s *aq_hw,
605 605
606/* tpb */ 606/* tpb */
607 607
608/* set TX Traffic Class Mode */
609void hw_atl_rpb_tps_tx_tc_mode_set(struct aq_hw_s *aq_hw,
610 u32 tx_traf_class_mode);
611
608/* set tx buffer enable */ 612/* set tx buffer enable */
609void hw_atl_tpb_tx_buff_en_set(struct aq_hw_s *aq_hw, u32 tx_buff_en); 613void hw_atl_tpb_tx_buff_en_set(struct aq_hw_s *aq_hw, u32 tx_buff_en);
610 614
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h
index 8470d92db812..e91ffce005f1 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h
@@ -1948,6 +1948,19 @@
1948/* default value of bitfield tx_buf_en */ 1948/* default value of bitfield tx_buf_en */
1949#define HW_ATL_TPB_TX_BUF_EN_DEFAULT 0x0 1949#define HW_ATL_TPB_TX_BUF_EN_DEFAULT 0x0
1950 1950
1951/* register address for bitfield tx_tc_mode */
1952#define HW_ATL_TPB_TX_TC_MODE_ADDR 0x00007900
1953/* bitmask for bitfield tx_tc_mode */
1954#define HW_ATL_TPB_TX_TC_MODE_MSK 0x00000100
1955/* inverted bitmask for bitfield tx_tc_mode */
1956#define HW_ATL_TPB_TX_TC_MODE_MSKN 0xFFFFFEFF
1957/* lower bit position of bitfield tx_tc_mode */
1958#define HW_ATL_TPB_TX_TC_MODE_SHIFT 8
1959/* width of bitfield tx_tc_mode */
1960#define HW_ATL_TPB_TX_TC_MODE_WIDTH 1
1961/* default value of bitfield tx_tc_mode */
1962#define HW_ATL_TPB_TX_TC_MODE_DEFAULT 0x0
1963
1951/* tx tx{b}_hi_thresh[c:0] bitfield definitions 1964/* tx tx{b}_hi_thresh[c:0] bitfield definitions
1952 * preprocessor definitions for the bitfield "tx{b}_hi_thresh[c:0]". 1965 * preprocessor definitions for the bitfield "tx{b}_hi_thresh[c:0]".
1953 * parameter: buffer {b} | stride size 0x10 | range [0, 7] 1966 * parameter: buffer {b} | stride size 0x10 | range [0, 7]