All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/6] qed*: Bug fixes.
@ 2019-02-06 22:43 Manish Chopra
  2019-02-06 22:43 ` [PATCH net 1/6] qed: Fix EQ full firmware assert Manish Chopra
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Manish Chopra @ 2019-02-06 22:43 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, mkalderon

Hi David,

This series contains general qed/qede fixes.
Please consider applying this to "net"

Thanks,
Manish

Manish Chopra (2):
  qed: Fix EQ full firmware assert.
  qed*: Advance drivers version to 8.37.0.20

Rahul Verma (1):
  qed: Change verbosity for coalescing message.

Sudarsana Reddy Kalluru (3):
  qed: Assign UFP TC value to vlan priority in UFP mode.
  qed: Consider TX tcs while deriving the max num_queues for PF.
  qede: Fix system crash on configuring channels.

 drivers/net/ethernet/qlogic/qed/qed.h             |  2 +-
 drivers/net/ethernet/qlogic/qed/qed_l2.c          |  8 +++++---
 drivers/net/ethernet/qlogic/qed/qed_sp.h          |  1 +
 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c |  3 +++
 drivers/net/ethernet/qlogic/qed/qed_spq.c         | 15 +++++++--------
 drivers/net/ethernet/qlogic/qede/qede.h           |  5 ++++-
 drivers/net/ethernet/qlogic/qede/qede_fp.c        | 13 +++++++++++++
 drivers/net/ethernet/qlogic/qede/qede_main.c      |  3 +++
 8 files changed, 37 insertions(+), 13 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH net 1/6] qed: Fix EQ full firmware assert.
  2019-02-06 22:43 [PATCH net 0/6] qed*: Bug fixes Manish Chopra
@ 2019-02-06 22:43 ` Manish Chopra
  2019-02-06 22:43 ` [PATCH net 2/6] qed: Assign UFP TC value to vlan priority in UFP mode Manish Chopra
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Manish Chopra @ 2019-02-06 22:43 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, mkalderon

When slowpath messages are sent with high rate, the resulting
events can lead to a FW assert in case they are not handled fast
enough (Event Queue Full assert). Attempt to send queued slowpath
messages only after the newly evacuated entries in the EQ ring
are indicated to FW.

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/qlogic/qed/qed_sp.h  |  1 +
 drivers/net/ethernet/qlogic/qed/qed_spq.c | 15 +++++++--------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_sp.h b/drivers/net/ethernet/qlogic/qed/qed_sp.h
index 4179c90..96ab77a 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_sp.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_sp.h
@@ -382,6 +382,7 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
  * @param p_hwfn
  */
 void qed_consq_free(struct qed_hwfn *p_hwfn);
+int qed_spq_pend_post(struct qed_hwfn *p_hwfn);
 
 /**
  * @file
diff --git a/drivers/net/ethernet/qlogic/qed/qed_spq.c b/drivers/net/ethernet/qlogic/qed/qed_spq.c
index eb88bbc..ba64ff9 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_spq.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_spq.c
@@ -397,6 +397,11 @@ int qed_eq_completion(struct qed_hwfn *p_hwfn, void *cookie)
 
 	qed_eq_prod_update(p_hwfn, qed_chain_get_prod_idx(p_chain));
 
+	/* Attempt to post pending requests */
+	spin_lock_bh(&p_hwfn->p_spq->lock);
+	rc = qed_spq_pend_post(p_hwfn);
+	spin_unlock_bh(&p_hwfn->p_spq->lock);
+
 	return rc;
 }
 
@@ -767,7 +772,7 @@ static int qed_spq_post_list(struct qed_hwfn *p_hwfn,
 	return 0;
 }
 
-static int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
+int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
 {
 	struct qed_spq *p_spq = p_hwfn->p_spq;
 	struct qed_spq_entry *p_ent = NULL;
@@ -905,7 +910,6 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
 	struct qed_spq_entry	*p_ent = NULL;
 	struct qed_spq_entry	*tmp;
 	struct qed_spq_entry	*found = NULL;
-	int			rc;
 
 	if (!p_hwfn)
 		return -EINVAL;
@@ -963,12 +967,7 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
 		 */
 		qed_spq_return_entry(p_hwfn, found);
 
-	/* Attempt to post pending requests */
-	spin_lock_bh(&p_spq->lock);
-	rc = qed_spq_pend_post(p_hwfn);
-	spin_unlock_bh(&p_spq->lock);
-
-	return rc;
+	return 0;
 }
 
 int qed_consq_alloc(struct qed_hwfn *p_hwfn)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net 2/6] qed: Assign UFP TC value to vlan priority in UFP mode.
  2019-02-06 22:43 [PATCH net 0/6] qed*: Bug fixes Manish Chopra
  2019-02-06 22:43 ` [PATCH net 1/6] qed: Fix EQ full firmware assert Manish Chopra
@ 2019-02-06 22:43 ` Manish Chopra
  2019-02-06 22:43 ` [PATCH net 3/6] qed: Consider TX tcs while deriving the max num_queues for PF Manish Chopra
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Manish Chopra @ 2019-02-06 22:43 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, mkalderon, Sudarsana Reddy Kalluru

From: Sudarsana Reddy Kalluru <skalluru@marvell.com>

In the case of Unified Fabric Port (UFP) mode, switch provides
the traffic class (TC) value to be used for the traffic.
Configure hardware to use this TC value for vlan priority.

Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c b/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c
index 888274f..5a495fd 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c
@@ -604,6 +604,9 @@ int qed_sp_pf_update_stag(struct qed_hwfn *p_hwfn)
 
 	p_ent->ramrod.pf_update.update_mf_vlan_flag = true;
 	p_ent->ramrod.pf_update.mf_vlan = cpu_to_le16(p_hwfn->hw_info.ovlan);
+	if (test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits))
+		p_ent->ramrod.pf_update.mf_vlan |=
+			cpu_to_le16(((u16)p_hwfn->ufp_info.tc << 13));
 
 	return qed_spq_post(p_hwfn, p_ent, NULL);
 }
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net 3/6] qed: Consider TX tcs while deriving the max num_queues for PF.
  2019-02-06 22:43 [PATCH net 0/6] qed*: Bug fixes Manish Chopra
  2019-02-06 22:43 ` [PATCH net 1/6] qed: Fix EQ full firmware assert Manish Chopra
  2019-02-06 22:43 ` [PATCH net 2/6] qed: Assign UFP TC value to vlan priority in UFP mode Manish Chopra
@ 2019-02-06 22:43 ` Manish Chopra
  2019-02-06 22:43 ` [PATCH net 4/6] qede: Fix system crash on configuring channels Manish Chopra
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Manish Chopra @ 2019-02-06 22:43 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, mkalderon, Sudarsana Reddy Kalluru

From: Sudarsana Reddy Kalluru <skalluru@marvell.com>

Max supported queues is derived incorrectly in the case of multi-CoS.
Need to consider TCs while calculating num_queues for PF.

Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/qlogic/qed/qed_l2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_l2.c b/drivers/net/ethernet/qlogic/qed/qed_l2.c
index e68ca83..64ac95c 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_l2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_l2.c
@@ -2216,7 +2216,7 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
 			u16 num_queues = 0;
 
 			/* Since the feature controls only queue-zones,
-			 * make sure we have the contexts [rx, tx, xdp] to
+			 * make sure we have the contexts [rx, xdp, tcs] to
 			 * match.
 			 */
 			for_each_hwfn(cdev, i) {
@@ -2226,7 +2226,8 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
 				u16 cids;
 
 				cids = hwfn->pf_params.eth_pf_params.num_cons;
-				num_queues += min_t(u16, l2_queues, cids / 3);
+				cids /= (2 + info->num_tc);
+				num_queues += min_t(u16, l2_queues, cids);
 			}
 
 			/* queues might theoretically be >256, but interrupts'
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net 4/6] qede: Fix system crash on configuring channels.
  2019-02-06 22:43 [PATCH net 0/6] qed*: Bug fixes Manish Chopra
                   ` (2 preceding siblings ...)
  2019-02-06 22:43 ` [PATCH net 3/6] qed: Consider TX tcs while deriving the max num_queues for PF Manish Chopra
@ 2019-02-06 22:43 ` Manish Chopra
  2019-02-06 22:43 ` [PATCH net 5/6] qed: Change verbosity for coalescing message Manish Chopra
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Manish Chopra @ 2019-02-06 22:43 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, mkalderon, Sudarsana Reddy Kalluru

From: Sudarsana Reddy Kalluru <skalluru@marvell.com>

Under heavy traffic load, when changing number of channels via
ethtool (ethtool -L) which will cause interface to be reloaded,
it was observed that some packets gets transmitted on old TX
channel/queue id which doesn't really exist after the channel
configuration leads to system crash.

Add a safeguard in the driver by validating queue id through
ndo_select_queue() which is called before the ndo_start_xmit().

Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/qlogic/qede/qede.h      |  3 +++
 drivers/net/ethernet/qlogic/qede/qede_fp.c   | 13 +++++++++++++
 drivers/net/ethernet/qlogic/qede/qede_main.c |  3 +++
 3 files changed, 19 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qede/qede.h b/drivers/net/ethernet/qlogic/qede/qede.h
index 613249d..cd40426 100644
--- a/drivers/net/ethernet/qlogic/qede/qede.h
+++ b/drivers/net/ethernet/qlogic/qede/qede.h
@@ -494,6 +494,9 @@ struct qede_reload_args {
 
 /* Datapath functions definition */
 netdev_tx_t qede_start_xmit(struct sk_buff *skb, struct net_device *ndev);
+u16 qede_select_queue(struct net_device *dev, struct sk_buff *skb,
+		      struct net_device *sb_dev,
+		      select_queue_fallback_t fallback);
 netdev_features_t qede_features_check(struct sk_buff *skb,
 				      struct net_device *dev,
 				      netdev_features_t features);
diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/qlogic/qede/qede_fp.c
index bdf816f..31b046e 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_fp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c
@@ -1695,6 +1695,19 @@ netdev_tx_t qede_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 	return NETDEV_TX_OK;
 }
 
+u16 qede_select_queue(struct net_device *dev, struct sk_buff *skb,
+		      struct net_device *sb_dev,
+		      select_queue_fallback_t fallback)
+{
+	struct qede_dev *edev = netdev_priv(dev);
+	int total_txq;
+
+	total_txq = QEDE_TSS_COUNT(edev) * edev->dev_info.num_tc;
+
+	return QEDE_TSS_COUNT(edev) ?
+		fallback(dev, skb, NULL) % total_txq :  0;
+}
+
 /* 8B udp header + 8B base tunnel header + 32B option length */
 #define QEDE_MAX_TUN_HDR_LEN 48
 
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index 5a74fcb..9790f26 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -631,6 +631,7 @@ static int qede_setup_tc_block(struct qede_dev *edev,
 	.ndo_open = qede_open,
 	.ndo_stop = qede_close,
 	.ndo_start_xmit = qede_start_xmit,
+	.ndo_select_queue = qede_select_queue,
 	.ndo_set_rx_mode = qede_set_rx_mode,
 	.ndo_set_mac_address = qede_set_mac_addr,
 	.ndo_validate_addr = eth_validate_addr,
@@ -666,6 +667,7 @@ static int qede_setup_tc_block(struct qede_dev *edev,
 	.ndo_open = qede_open,
 	.ndo_stop = qede_close,
 	.ndo_start_xmit = qede_start_xmit,
+	.ndo_select_queue = qede_select_queue,
 	.ndo_set_rx_mode = qede_set_rx_mode,
 	.ndo_set_mac_address = qede_set_mac_addr,
 	.ndo_validate_addr = eth_validate_addr,
@@ -684,6 +686,7 @@ static int qede_setup_tc_block(struct qede_dev *edev,
 	.ndo_open = qede_open,
 	.ndo_stop = qede_close,
 	.ndo_start_xmit = qede_start_xmit,
+	.ndo_select_queue = qede_select_queue,
 	.ndo_set_rx_mode = qede_set_rx_mode,
 	.ndo_set_mac_address = qede_set_mac_addr,
 	.ndo_validate_addr = eth_validate_addr,
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net 5/6] qed: Change verbosity for coalescing message.
  2019-02-06 22:43 [PATCH net 0/6] qed*: Bug fixes Manish Chopra
                   ` (3 preceding siblings ...)
  2019-02-06 22:43 ` [PATCH net 4/6] qede: Fix system crash on configuring channels Manish Chopra
@ 2019-02-06 22:43 ` Manish Chopra
  2019-02-06 22:43 ` [PATCH net 6/6] qed*: Advance drivers version to 8.37.0.20 Manish Chopra
  2019-02-07  0:53 ` [PATCH net 0/6] qed*: Bug fixes David Miller
  6 siblings, 0 replies; 8+ messages in thread
From: Manish Chopra @ 2019-02-06 22:43 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, mkalderon, Rahul Verma

From: Rahul Verma <rverma@marvell.com>

Fix unnecessary logging of message in an expected
default case where coalescing value read (via ethtool -c)
migh not be valid unless they are configured explicitly
in the hardware using ethtool -C.

Signed-off-by: Rahul Verma <rverma@marvell.com>
Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_l2.c b/drivers/net/ethernet/qlogic/qed/qed_l2.c
index 64ac95c..58be1c4 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_l2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_l2.c
@@ -2871,7 +2871,8 @@ static int qed_get_coalesce(struct qed_dev *cdev, u16 *coal, void *handle)
 	p_hwfn = p_cid->p_owner;
 	rc = qed_get_queue_coalesce(p_hwfn, coal, handle);
 	if (rc)
-		DP_NOTICE(p_hwfn, "Unable to read queue coalescing\n");
+		DP_VERBOSE(cdev, QED_MSG_DEBUG,
+			   "Unable to read queue coalescing\n");
 
 	return rc;
 }
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net 6/6] qed*: Advance drivers version to 8.37.0.20
  2019-02-06 22:43 [PATCH net 0/6] qed*: Bug fixes Manish Chopra
                   ` (4 preceding siblings ...)
  2019-02-06 22:43 ` [PATCH net 5/6] qed: Change verbosity for coalescing message Manish Chopra
@ 2019-02-06 22:43 ` Manish Chopra
  2019-02-07  0:53 ` [PATCH net 0/6] qed*: Bug fixes David Miller
  6 siblings, 0 replies; 8+ messages in thread
From: Manish Chopra @ 2019-02-06 22:43 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, mkalderon

Version update for qed/qede modules.

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/qlogic/qed/qed.h   | 2 +-
 drivers/net/ethernet/qlogic/qede/qede.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed.h b/drivers/net/ethernet/qlogic/qed/qed.h
index 24a9016..2d8a77c 100644
--- a/drivers/net/ethernet/qlogic/qed/qed.h
+++ b/drivers/net/ethernet/qlogic/qed/qed.h
@@ -53,7 +53,7 @@
 extern const struct qed_common_ops qed_common_ops_pass;
 
 #define QED_MAJOR_VERSION		8
-#define QED_MINOR_VERSION		33
+#define QED_MINOR_VERSION		37
 #define QED_REVISION_VERSION		0
 #define QED_ENGINEERING_VERSION		20
 
diff --git a/drivers/net/ethernet/qlogic/qede/qede.h b/drivers/net/ethernet/qlogic/qede/qede.h
index cd40426..730997b 100644
--- a/drivers/net/ethernet/qlogic/qede/qede.h
+++ b/drivers/net/ethernet/qlogic/qede/qede.h
@@ -56,7 +56,7 @@
 #include <net/tc_act/tc_gact.h>
 
 #define QEDE_MAJOR_VERSION		8
-#define QEDE_MINOR_VERSION		33
+#define QEDE_MINOR_VERSION		37
 #define QEDE_REVISION_VERSION		0
 #define QEDE_ENGINEERING_VERSION	20
 #define DRV_MODULE_VERSION __stringify(QEDE_MAJOR_VERSION) "."	\
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH net 0/6] qed*: Bug fixes.
  2019-02-06 22:43 [PATCH net 0/6] qed*: Bug fixes Manish Chopra
                   ` (5 preceding siblings ...)
  2019-02-06 22:43 ` [PATCH net 6/6] qed*: Advance drivers version to 8.37.0.20 Manish Chopra
@ 2019-02-07  0:53 ` David Miller
  6 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2019-02-07  0:53 UTC (permalink / raw)
  To: manishc; +Cc: netdev, aelior, mkalderon

From: Manish Chopra <manishc@marvell.com>
Date: Wed, 6 Feb 2019 14:43:41 -0800

> This series contains general qed/qede fixes.
> Please consider applying this to "net"

Series applied, thanks Manish.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-02-07  0:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-06 22:43 [PATCH net 0/6] qed*: Bug fixes Manish Chopra
2019-02-06 22:43 ` [PATCH net 1/6] qed: Fix EQ full firmware assert Manish Chopra
2019-02-06 22:43 ` [PATCH net 2/6] qed: Assign UFP TC value to vlan priority in UFP mode Manish Chopra
2019-02-06 22:43 ` [PATCH net 3/6] qed: Consider TX tcs while deriving the max num_queues for PF Manish Chopra
2019-02-06 22:43 ` [PATCH net 4/6] qede: Fix system crash on configuring channels Manish Chopra
2019-02-06 22:43 ` [PATCH net 5/6] qed: Change verbosity for coalescing message Manish Chopra
2019-02-06 22:43 ` [PATCH net 6/6] qed*: Advance drivers version to 8.37.0.20 Manish Chopra
2019-02-07  0:53 ` [PATCH net 0/6] qed*: Bug fixes David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.