From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AADE4A0C47; Tue, 27 Jul 2021 12:52:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D94E410F0; Tue, 27 Jul 2021 12:52:21 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id B2C35410ED for ; Tue, 27 Jul 2021 12:52:19 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10057"; a="273496490" X-IronPort-AV: E=Sophos;i="5.84,273,1620716400"; d="scan'208";a="273496490" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2021 03:52:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,273,1620716400"; d="scan'208";a="464238053" Received: from dpdk-xuting-second.sh.intel.com ([10.67.116.193]) by orsmga008.jf.intel.com with ESMTP; 27 Jul 2021 03:52:16 -0700 From: Ting Xu To: dev@dpdk.org Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, Ting Xu Date: Tue, 27 Jul 2021 18:55:08 +0800 Message-Id: <20210727105508.33586-1-ting.xu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] net/ice: fix wrong bandwidth config size in memory copy X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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