patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/dpaa2: remove unnecessary loop for unused pool entries
@ 2018-07-31  7:51 Gavin Hu
  2018-07-31 13:52 ` [dpdk-stable] [dpdk-dev] " Shreyansh Jain
  0 siblings, 1 reply; 3+ messages in thread
From: Gavin Hu @ 2018-07-31  7:51 UTC (permalink / raw)
  To: dev; +Cc: gavin.hu, stable

Currently only one buffer pool is configured and in use,
looping for up to maxmum 8 times is unnecessary and might
be buggy as assigned uninititalized values.

The fix is to loop for the configured times with initialize
with valid values.

Fixes: 16bbc98a3e ("bus/fslmc: update MC to 10.3.x")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 drivers/net/dpaa2/mc/dpni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dpaa2/mc/dpni.c b/drivers/net/dpaa2/mc/dpni.c
index 69cf119ce..9f228169a 100644
--- a/drivers/net/dpaa2/mc/dpni.c
+++ b/drivers/net/dpaa2/mc/dpni.c
@@ -198,7 +198,7 @@ int dpni_set_pools(struct fsl_mc_io *mc_io,
 					  token);
 	cmd_params = (struct dpni_cmd_set_pools *)cmd.params;
 	cmd_params->num_dpbp = cfg->num_dpbp;
-	for (i = 0; i < DPNI_MAX_DPBP; i++) {
+	for (i = 0; i < cmd_params->num_dpbp; i++) {
 		cmd_params->pool[i].dpbp_id =
 			cpu_to_le16(cfg->pools[i].dpbp_id);
 		cmd_params->pool[i].priority_mask =
-- 
2.11.0

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/dpaa2: remove unnecessary loop for unused pool entries
  2018-07-31  7:51 [dpdk-stable] [PATCH] net/dpaa2: remove unnecessary loop for unused pool entries Gavin Hu
@ 2018-07-31 13:52 ` Shreyansh Jain
  2018-08-03 15:10   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Shreyansh Jain @ 2018-07-31 13:52 UTC (permalink / raw)
  To: Gavin Hu, dev; +Cc: stable

On 7/31/2018 1:21 PM, Gavin Hu wrote:
> Currently only one buffer pool is configured and in use,
> looping for up to maxmum 8 times is unnecessary and might
> be buggy as assigned uninititalized values.
> 
> The fix is to loop for the configured times with initialize
> with valid values.
> 
> Fixes: 16bbc98a3e ("bus/fslmc: update MC to 10.3.x")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Gavin Hu <gavin.hu@arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> ---

Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/dpaa2: remove unnecessary loop for unused pool entries
  2018-07-31 13:52 ` [dpdk-stable] [dpdk-dev] " Shreyansh Jain
@ 2018-08-03 15:10   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-08-03 15:10 UTC (permalink / raw)
  To: Gavin Hu; +Cc: dev, Shreyansh Jain, stable

31/07/2018 15:52, Shreyansh Jain:
> On 7/31/2018 1:21 PM, Gavin Hu wrote:
> > Currently only one buffer pool is configured and in use,
> > looping for up to maxmum 8 times is unnecessary and might
> > be buggy as assigned uninititalized values.
> > 
> > The fix is to loop for the configured times with initialize
> > with valid values.
> > 
> > Fixes: 16bbc98a3e ("bus/fslmc: update MC to 10.3.x")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Gavin Hu <gavin.hu@arm.com>
> > Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> > ---
> 
> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>

Applied, thanks

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

end of thread, other threads:[~2018-08-03 15:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-31  7:51 [dpdk-stable] [PATCH] net/dpaa2: remove unnecessary loop for unused pool entries Gavin Hu
2018-07-31 13:52 ` [dpdk-stable] [dpdk-dev] " Shreyansh Jain
2018-08-03 15:10   ` Thomas Monjalon

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