DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/ice: fix wrong bandwidth config size in memory copy
@ 2021-07-27 10:55 Ting Xu
  2021-08-02  1:44 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Ting Xu @ 2021-07-27 10:55 UTC (permalink / raw)
  To: dev; +Cc: qi.z.zhang, jingjing.wu, beilei.xing, Ting Xu

The memory size of bandwidth config parameters is not set correctly in
memory copy process, which leads to the wrong values. This patch fixed
the size to the correct value.

Fixes: 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")

Signed-off-by: Ting Xu <ting.xu@intel.com>
---
 drivers/net/ice/ice_dcf_sched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_dcf_sched.c b/drivers/net/ice/ice_dcf_sched.c
index 090988c6e1..dcf2723494 100644
--- a/drivers/net/ice/ice_dcf_sched.c
+++ b/drivers/net/ice/ice_dcf_sched.c
@@ -833,7 +833,7 @@ static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,
 			goto fail_clear;
 		}
 		/* store the bandwidth information for replay */
-		ice_memcpy(hw->qos_bw_cfg[vf_id], vf_bw, sizeof(*vf_bw),
+		ice_memcpy(hw->qos_bw_cfg[vf_id], vf_bw, size,
 			   ICE_NONDMA_TO_NONDMA);
 		ice_memset(vf_bw, 0, size, ICE_NONDMA_MEM);
 	}
@@ -859,7 +859,7 @@ static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,
 		ret_val = ICE_ERR_NO_MEMORY;
 		goto fail_clear;
 	}
-	ice_memcpy(hw->qos_bw_cfg[ICE_DCF_VFID], tc_bw, sizeof(*tc_bw),
+	ice_memcpy(hw->qos_bw_cfg[ICE_DCF_VFID], tc_bw, size,
 		   ICE_NONDMA_TO_NONDMA);
 
 	hw->tm_conf.committed = true;
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH v1] net/ice: fix wrong bandwidth config size in memory copy
  2021-07-27 10:55 [dpdk-dev] [PATCH v1] net/ice: fix wrong bandwidth config size in memory copy Ting Xu
@ 2021-08-02  1:44 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2021-08-02  1:44 UTC (permalink / raw)
  To: Xu, Ting, dev; +Cc: Wu, Jingjing, Xing, Beilei



> -----Original Message-----
> From: Xu, Ting <ting.xu@intel.com>
> Sent: Tuesday, July 27, 2021 6:55 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>; Xu, Ting <ting.xu@intel.com>
> Subject: [PATCH v1] net/ice: fix wrong bandwidth config size in memory copy
> 
> The memory size of bandwidth config parameters is not set correctly in
> memory copy process, which leads to the wrong values. This patch fixed the
> size to the correct value.
> 
> Fixes: 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")
> 
> Signed-off-by: Ting Xu <ting.xu@intel.com>

Acked-by: Qi Zhang <qi.z.zhnag@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2021-08-02  1:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 10:55 [dpdk-dev] [PATCH v1] net/ice: fix wrong bandwidth config size in memory copy Ting Xu
2021-08-02  1:44 ` Zhang, Qi Z

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