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 43F2C46084; Tue, 14 Jan 2025 11:14:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED7BD40651; Tue, 14 Jan 2025 11:14:17 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id 73BC24066D for ; Tue, 14 Jan 2025 11:14:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736849657; x=1768385657; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LGr2kiFEiktW73CFXteHe4vn7zdxe4fFQ78P5r/CMlU=; b=MlBnvlxrxveY9b8peOUhNyDMPtMALCWKE0zdI/XmSj5GGYmR37ssvY1M cq23fiN35TKr4yu8d+9JGM/LifVRIF0j3/8iYgrb6HZsCtr8PmOfWwzlt e9D+S8zHEiR97S+bRsRdO0MPEe1zDYy04n/8jNKLF4Q9n5cMYNx5uGYM8 lX0wvxyUG9xQVjDUEkLVVPgLvMHqQhNJvVmNZgAAru68EQxrfaNwQzNz3 FN0I2F8Jsg072/+sTxhqKvwUKyX3ADMAAFV+zwaQKbGdqgh8Tki9nKI1T ClRGWdd+i2tRVVv2AIlnlc1CZ1zdHOnBcdKUoxCR9mgPC61Ks7QBB6PGt w==; X-CSE-ConnectionGUID: ivVhcAyWR8qxG1lxx8pjzA== X-CSE-MsgGUID: kshz00fNSqamsS6IhPPl+A== X-IronPort-AV: E=McAfee;i="6700,10204,11314"; a="36426829" X-IronPort-AV: E=Sophos;i="6.12,314,1728975600"; d="scan'208";a="36426829" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2025 02:14:16 -0800 X-CSE-ConnectionGUID: M8cskeqIQcK0xbygczw6eA== X-CSE-MsgGUID: FyAwZ8aORG+R+MQZJkjn4Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="128007485" Received: from unknown (HELO localhost.localdomain) ([10.239.252.210]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2025 02:14:12 -0800 From: Yuan Wang To: dev@dpdk.org Cc: anatoly.burakov@intel.com, vladimir.medvedkin@intel.com, Dan Nowlin , Yuan Wang Subject: [PATCH 09/10] net/ixgbe/base: add missing buffer copy Date: Tue, 14 Jan 2025 18:10:19 +0800 Message-ID: <20250114101024.159941-10-yuanx.wang@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250114101024.159941-1-yuanx.wang@intel.com> References: <20250114101024.159941-1-yuanx.wang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Dan Nowlin Add missing buffer copy in ixgbe_aci_send_cmd_sc(). In ixgbe_aci_send_cmd_sc() there is code to retry aq commands for certain commands. To achieve this the function makes a copy of the original ixgbe_aci_desc structure and allocates memory to store an original copy of the command buffer. This allows the original structure and buffer to be restored before attempting the command again. However, the function didn't perform the actual copy of the original command buffer into the copy buffer. Signed-off-by: Dan Nowlin Signed-off-by: Yuan Wang --- drivers/net/ixgbe/base/ixgbe_e610.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ixgbe/base/ixgbe_e610.c b/drivers/net/ixgbe/base/ixgbe_e610.c index dc4eafaa5a..5474c3012a 100644 --- a/drivers/net/ixgbe/base/ixgbe_e610.c +++ b/drivers/net/ixgbe/base/ixgbe_e610.c @@ -282,6 +282,7 @@ s32 ixgbe_aci_send_cmd(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc, buf_cpy = (u8 *)ixgbe_malloc(hw, buf_size); if (!buf_cpy) return IXGBE_ERR_OUT_OF_MEM; + memcpy(buf_cpy, buf, buf_size); } memcpy(&desc_cpy, desc, sizeof(desc_cpy)); } -- 2.43.5