Skip to contentSkip to conversation

be2net: patch-set

PATCH In review Suresh Reddy 2 participants 4 messages Feb 6, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover be2net: patch-set

Hi Dave, Please consider applying these two patches to net

Suresh Reddy (2):
be2net: Fix HW stall issue in Lancer
be2net: Handle transmit completion errors in Lancer

 drivers/net/ethernet/emulex/benet/be.h         |   7 +-
 drivers/net/ethernet/emulex/benet/be_ethtool.c |   1 +
 drivers/net/ethernet/emulex/benet/be_hw.h      |   1 +
 drivers/net/ethernet/emulex/benet/be_main.c    | 113 +++++++++++++++----------
 4 files changed, 73 insertions(+), 49 deletions(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/2 be2net: Fix HW stall issue in Lancer

Lancer HW cannot handle a TSO packet with a single segment. Disable TSO/GSO for such packets.

---
 drivers/net/ethernet/emulex/benet/be_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/emulex/benet/be_main.c +4 -1
index c6e859a..130fa82 100644
@@ -5097,9 +5097,12 @@ static netdev_features_t be_features_check(struct sk_buff *skb,
 			features &= ~NETIF_F_TSO6;
 
 		/* Lancer cannot handle the packet with MSS less than 256.
+		 * Also it can't handle a TSO packet with a single segment
 		 * Disable the GSO support in such cases
 		 */
-		if (lancer_chip(adapter) && skb_shinfo(skb)->gso_size < 256)
+		if (lancer_chip(adapter) &&
+		    (skb_shinfo(skb)->gso_size < 256 ||
+		     skb_shinfo(skb)->gso_segs == 1))
 			features &= ~NETIF_F_GSO_MASK;
 	}
 
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH 2/2 be2net: Handle transmit completion errors in Lancer

In reply to Suresh Reddy

If the driver receives a TX CQE with status as 0x1 or 0x9 or 0xb, the completion indexes should not be used. The driver must stop consuming CQEs from this TXQ/CQ. The TXQ from this point on-wards to be in a bad state. Driver should destroy and recreate the TXQ.

0x1: LANCER_TX_COMP_LSO_ERR
0x9 LANCER_TX_COMP_SGE_ERR
0xb: LANCER_TX_COMP_PARITY_ERR

Reset the adapter if driver sees this error in TX completion. Also adding sge error counter in ethtool stats.

---
 drivers/net/ethernet/emulex/benet/be.h         |   7 +-
 drivers/net/ethernet/emulex/benet/be_ethtool.c |   1 +
 drivers/net/ethernet/emulex/benet/be_hw.h      |   1 +
 drivers/net/ethernet/emulex/benet/be_main.c    | 108 ++++++++++++++-----------
 4 files changed, 69 insertions(+), 48 deletions(-)
drivers/net/ethernet/emulex/benet/be.h +5 -2
index 8984c49..382891f 100644
@@ -248,6 +248,7 @@ struct be_tx_stats {
 	u32 tx_spoof_check_err;
 	u32 tx_qinq_err;
 	u32 tx_internal_parity_err;
+	u32 tx_sge_err;
 	struct u64_stats_sync sync;
 	struct u64_stats_sync sync_compl;
 };
@@ -944,8 +945,10 @@ static inline bool is_ipv6_ext_hdr(struct sk_buff *skb)
 #define BE_ERROR_EEH		1
 #define BE_ERROR_UE		BIT(1)
 #define BE_ERROR_FW		BIT(2)
-#define BE_ERROR_HW		(BE_ERROR_EEH | BE_ERROR_UE)
-#define BE_ERROR_ANY		(BE_ERROR_EEH | BE_ERROR_UE | BE_ERROR_FW)
+#define BE_ERROR_TX		BIT(3)
+#define BE_ERROR_HW		(BE_ERROR_EEH | BE_ERROR_UE | BE_ERROR_TX)
+#define BE_ERROR_ANY		(BE_ERROR_EEH | BE_ERROR_UE | BE_ERROR_FW | \
+				 BE_ERROR_TX)
 #define BE_CLEAR_ALL		0xFF
 
 static inline u8 be_check_error(struct be_adapter *adapter, u32 err_type)
drivers/net/ethernet/emulex/benet/be_ethtool.c +1 -0
index 7d1819c..7f7e206 100644
@@ -189,6 +189,7 @@ struct be_ethtool_stat {
 	 * packet data. This counter is applicable only for Lancer adapters.
 	 */
 	{DRVSTAT_TX_INFO(tx_internal_parity_err)},
+	{DRVSTAT_TX_INFO(tx_sge_err)},
 	{DRVSTAT_TX_INFO(tx_bytes)},
 	{DRVSTAT_TX_INFO(tx_pkts)},
 	{DRVSTAT_TX_INFO(tx_vxlan_offload_pkts)},
drivers/net/ethernet/emulex/benet/be_hw.h +1 -0
index c967f45..db5f92f 100644
@@ -261,6 +261,7 @@ struct be_eth_hdr_wrb {
 #define LANCER_TX_COMP_HSW_DROP_MAC_ERR		0x3
 #define LANCER_TX_COMP_HSW_DROP_VLAN_ERR	0x5
 #define LANCER_TX_COMP_QINQ_ERR			0x7
+#define LANCER_TX_COMP_SGE_ERR			0x9
 #define LANCER_TX_COMP_PARITY_ERR		0xb
 #define LANCER_TX_COMP_DMA_ERR			0xd
 
drivers/net/ethernet/emulex/benet/be_main.c +62 -46

140 lines not on this page · raw message

Signature · 1 line
1.8.3.1