patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 19.11 0/2] bnxt fixes for 19.11
@ 2020-03-11  3:56 Kalesh A P
  2020-03-11  3:56 ` [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: fix MAC address setting when port is stopped Kalesh A P
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kalesh A P @ 2020-03-11  3:56 UTC (permalink / raw)
  To: stable; +Cc: luca.boccassi, ajit.khaparde

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

Hi Luca,

Couple of bnxt bug fixes observed while testing with 19.11.1-rc1.
Please apply them to 19.11 stable branch.

Kalesh AP (2):
  net/bnxt: fix MAC address setting when port is stopped
  net/bnxt: fix recovery alarm race condition in port close

 drivers/net/bnxt/bnxt_ethdev.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

-- 
2.10.1


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

* [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: fix MAC address setting when port is stopped
  2020-03-11  3:56 [dpdk-stable] [PATCH 19.11 0/2] bnxt fixes for 19.11 Kalesh A P
@ 2020-03-11  3:56 ` Kalesh A P
  2020-03-11  3:56 ` [dpdk-stable] [PATCH 19.11 2/2] net/bnxt: fix recovery alarm race condition in port close Kalesh A P
  2020-03-11 10:42 ` [dpdk-stable] [PATCH 19.11 0/2] bnxt fixes for 19.11 Luca Boccassi
  2 siblings, 0 replies; 4+ messages in thread
From: Kalesh A P @ 2020-03-11  3:56 UTC (permalink / raw)
  To: stable; +Cc: luca.boccassi, ajit.khaparde

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

[upstream commit 1009a632c851f687b7f6ccf64875552afbac5c46 ]

Driver destroys the VNIC when the port is brought down.
Port HW filter setting such as default MAC address and
unicast MAC filters will be applied when port is started.

Fixed to return success silently for these callbacks
when port is stopped.

Fixes: 39b88344e364 ("net/bnxt: fix enable/disable VLAN filtering")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 802045d..c0b965b 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1083,6 +1083,10 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
 		return -EINVAL;
 	}
 
+	/* Filter settings will get applied when port is started */
+	if (!eth_dev->data->dev_started)
+		return 0;
+
 	rc = bnxt_add_mac_filter(bp, vnic, mac_addr, index, pool);
 
 	return rc;
@@ -2076,6 +2080,10 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
 	if (rte_is_zero_ether_addr(addr))
 		return -EINVAL;
 
+	/* Filter settings will get applied when port is started */
+	if (!dev->data->dev_started)
+		return 0;
+
 	/* Check if the requested MAC is already added */
 	if (memcmp(addr, bp->mac_addr, RTE_ETHER_ADDR_LEN) == 0)
 		return 0;
-- 
2.10.1


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

* [dpdk-stable] [PATCH 19.11 2/2] net/bnxt: fix recovery alarm race condition in port close
  2020-03-11  3:56 [dpdk-stable] [PATCH 19.11 0/2] bnxt fixes for 19.11 Kalesh A P
  2020-03-11  3:56 ` [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: fix MAC address setting when port is stopped Kalesh A P
@ 2020-03-11  3:56 ` Kalesh A P
  2020-03-11 10:42 ` [dpdk-stable] [PATCH 19.11 0/2] bnxt fixes for 19.11 Luca Boccassi
  2 siblings, 0 replies; 4+ messages in thread
From: Kalesh A P @ 2020-03-11  3:56 UTC (permalink / raw)
  To: stable; +Cc: luca.boccassi, ajit.khaparde

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

[ upstream commit 28124d9cdc729dc07dfebddf0b3e2aecfc021dee ]

There is a race condition when port is closed while error recovery
is happening in driver. Fixed this by canceling the recovery threads
during port close.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c0b965b..dedb012 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -133,6 +133,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev);
 static int bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev);
 static void bnxt_cancel_fw_health_check(struct bnxt *bp);
 static int bnxt_restore_vlan_filters(struct bnxt *bp);
+static void bnxt_dev_recover(void *arg);
 
 int is_bnxt_in_error(struct bnxt *bp)
 {
@@ -963,6 +964,10 @@ static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
 {
 	struct bnxt *bp = eth_dev->data->dev_private;
 
+	/* cancel the recovery handler before remove dev */
+	rte_eal_alarm_cancel(bnxt_dev_reset_and_resume, (void *)bp);
+	rte_eal_alarm_cancel(bnxt_dev_recover, (void *)bp);
+
 	if (eth_dev->data->dev_started)
 		bnxt_dev_stop_op(eth_dev);
 
-- 
2.10.1


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

* Re: [dpdk-stable] [PATCH 19.11 0/2] bnxt fixes for 19.11
  2020-03-11  3:56 [dpdk-stable] [PATCH 19.11 0/2] bnxt fixes for 19.11 Kalesh A P
  2020-03-11  3:56 ` [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: fix MAC address setting when port is stopped Kalesh A P
  2020-03-11  3:56 ` [dpdk-stable] [PATCH 19.11 2/2] net/bnxt: fix recovery alarm race condition in port close Kalesh A P
@ 2020-03-11 10:42 ` Luca Boccassi
  2 siblings, 0 replies; 4+ messages in thread
From: Luca Boccassi @ 2020-03-11 10:42 UTC (permalink / raw)
  To: Kalesh A P, stable; +Cc: ajit.khaparde

On Wed, 2020-03-11 at 09:26 +0530, Kalesh A P wrote:
> From: Kalesh AP <
> kalesh-anakkur.purayil@broadcom.com
> >
> 
> Hi Luca,
> 
> Couple of bnxt bug fixes observed while testing with 19.11.1-rc1.
> Please apply them to 19.11 stable branch.
> 
> Kalesh AP (2):
>   net/bnxt: fix MAC address setting when port is stopped
>   net/bnxt: fix recovery alarm race condition in port close
> 
>  drivers/net/bnxt/bnxt_ethdev.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)

Thank you, applied and pushed.

-- 
Kind regards,
Luca Boccassi

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

end of thread, other threads:[~2020-03-11 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11  3:56 [dpdk-stable] [PATCH 19.11 0/2] bnxt fixes for 19.11 Kalesh A P
2020-03-11  3:56 ` [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: fix MAC address setting when port is stopped Kalesh A P
2020-03-11  3:56 ` [dpdk-stable] [PATCH 19.11 2/2] net/bnxt: fix recovery alarm race condition in port close Kalesh A P
2020-03-11 10:42 ` [dpdk-stable] [PATCH 19.11 0/2] bnxt fixes for 19.11 Luca Boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).