patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 07/12] net/ice/base: fix loop limit
       [not found] <20191205123847.39579-1-qi.z.zhang@intel.com>
@ 2019-12-05 12:38 ` Qi Zhang
  2019-12-05 12:38 ` [dpdk-stable] [PATCH 08/12] net/ice/base: increase PF reset wait timeout Qi Zhang
       [not found] ` <20200106033851.43978-1-qi.z.zhang@intel.com>
  2 siblings, 0 replies; 4+ messages in thread
From: Qi Zhang @ 2019-12-05 12:38 UTC (permalink / raw)
  To: qiming.yang
  Cc: xiaolong.ye, dev, Qi Zhang, stable, Dan Nowlin, Paul M Stillwell Jr

In ice_prot_type_to_id routine, correct the loop limit check
to use ARRAY_SIZE instead of looking for the array element to
have a specific value.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 3ed84ca01..b2945a9e2 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -4880,7 +4880,7 @@ static bool ice_prot_type_to_id(enum ice_protocol_type type, u16 *id)
 {
 	u16 i;
 
-	for (i = 0; ice_prot_id_tbl[i].type != ICE_PROTOCOL_LAST; i++)
+	for (i = 0; i < ARRAY_SIZE(ice_prot_id_tbl); i++)
 		if (ice_prot_id_tbl[i].type == type) {
 			*id = ice_prot_id_tbl[i].protocol_id;
 			return true;
-- 
2.13.6


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

* [dpdk-stable] [PATCH 08/12] net/ice/base: increase PF reset wait timeout
       [not found] <20191205123847.39579-1-qi.z.zhang@intel.com>
  2019-12-05 12:38 ` [dpdk-stable] [PATCH 07/12] net/ice/base: fix loop limit Qi Zhang
@ 2019-12-05 12:38 ` Qi Zhang
       [not found] ` <20200106033851.43978-1-qi.z.zhang@intel.com>
  2 siblings, 0 replies; 4+ messages in thread
From: Qi Zhang @ 2019-12-05 12:38 UTC (permalink / raw)
  To: qiming.yang
  Cc: xiaolong.ye, dev, Qi Zhang, stable, Jacob Keller, Paul M Stillwell Jr

Increase the maximum time that the driver will wait for a PF reset
from 200 milliseconds to 300 milliseconds, to account for possibility
of a slightly longer than expected PF reset.

Fixes: 453d087ccaff ("net/ice/base: add common functions")
Cc: stable@dpdk.org

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index bb763913a..f3b10a65d 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -9,7 +9,7 @@
 #include "ice_flow.h"
 #include "ice_switch.h"
 
-#define ICE_PF_RESET_WAIT_COUNT	200
+#define ICE_PF_RESET_WAIT_COUNT	300
 
 /**
  * ice_set_mac_type - Sets MAC type
-- 
2.13.6


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

* [dpdk-stable] [PATCH v2 07/12] net/ice/base: fix loop limit
       [not found] ` <20200106033851.43978-1-qi.z.zhang@intel.com>
@ 2020-01-06  3:38   ` Qi Zhang
  2020-01-06  3:38   ` [dpdk-stable] [PATCH v2 08/12] net/ice/base: increase PF reset wait timeout Qi Zhang
  1 sibling, 0 replies; 4+ messages in thread
From: Qi Zhang @ 2020-01-06  3:38 UTC (permalink / raw)
  To: qiming.yang
  Cc: dev, xiaolong.ye, Qi Zhang, stable, Dan Nowlin, Paul M Stillwell Jr

In ice_prot_type_to_id routine, correct the loop limit check
to use ARRAY_SIZE instead of looking for the array element to
have a specific value.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 3ed84ca01..b2945a9e2 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -4880,7 +4880,7 @@ static bool ice_prot_type_to_id(enum ice_protocol_type type, u16 *id)
 {
 	u16 i;
 
-	for (i = 0; ice_prot_id_tbl[i].type != ICE_PROTOCOL_LAST; i++)
+	for (i = 0; i < ARRAY_SIZE(ice_prot_id_tbl); i++)
 		if (ice_prot_id_tbl[i].type == type) {
 			*id = ice_prot_id_tbl[i].protocol_id;
 			return true;
-- 
2.13.6


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

* [dpdk-stable] [PATCH v2 08/12] net/ice/base: increase PF reset wait timeout
       [not found] ` <20200106033851.43978-1-qi.z.zhang@intel.com>
  2020-01-06  3:38   ` [dpdk-stable] [PATCH v2 07/12] net/ice/base: fix loop limit Qi Zhang
@ 2020-01-06  3:38   ` Qi Zhang
  1 sibling, 0 replies; 4+ messages in thread
From: Qi Zhang @ 2020-01-06  3:38 UTC (permalink / raw)
  To: qiming.yang
  Cc: dev, xiaolong.ye, Qi Zhang, stable, Jacob Keller, Paul M Stillwell Jr

Increase the maximum time that the driver will wait for a PF reset
from 200 milliseconds to 300 milliseconds, to account for possibility
of a slightly longer than expected PF reset.

Fixes: 453d087ccaff ("net/ice/base: add common functions")
Cc: stable@dpdk.org

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 319b00f75..2e756f542 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -9,7 +9,7 @@
 #include "ice_flow.h"
 #include "ice_switch.h"
 
-#define ICE_PF_RESET_WAIT_COUNT	200
+#define ICE_PF_RESET_WAIT_COUNT	300
 
 /**
  * ice_set_mac_type - Sets MAC type
-- 
2.13.6


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

end of thread, other threads:[~2020-01-06  3:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191205123847.39579-1-qi.z.zhang@intel.com>
2019-12-05 12:38 ` [dpdk-stable] [PATCH 07/12] net/ice/base: fix loop limit Qi Zhang
2019-12-05 12:38 ` [dpdk-stable] [PATCH 08/12] net/ice/base: increase PF reset wait timeout Qi Zhang
     [not found] ` <20200106033851.43978-1-qi.z.zhang@intel.com>
2020-01-06  3:38   ` [dpdk-stable] [PATCH v2 07/12] net/ice/base: fix loop limit Qi Zhang
2020-01-06  3:38   ` [dpdk-stable] [PATCH v2 08/12] net/ice/base: increase PF reset wait timeout Qi Zhang

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).