DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuan Wang <yuanx.wang@intel.com>
To: dev@dpdk.org
Cc: anatoly.burakov@intel.com, vladimir.medvedkin@intel.com,
	Dan Nowlin <dan.nowlin@intel.com>,
	Yuan Wang <yuanx.wang@intel.com>
Subject: [PATCH 09/10] net/ixgbe/base: add missing buffer copy
Date: Tue, 14 Jan 2025 18:10:19 +0800	[thread overview]
Message-ID: <20250114101024.159941-10-yuanx.wang@intel.com> (raw)
In-Reply-To: <20250114101024.159941-1-yuanx.wang@intel.com>

From: Dan Nowlin <dan.nowlin@intel.com>

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 <dan.nowlin@intel.com>
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
---
 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


  parent reply	other threads:[~2025-01-14 10:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14 10:10 [PATCH 00/10] update net/ixgbe base driver Yuan Wang
2025-01-14 10:10 ` [PATCH 01/10] net/ixgbe/base: fix TSAM checking return value Yuan Wang
2025-01-14 10:10 ` [PATCH 02/10] net/ixgbe/base: add interface for LED control on E610 Yuan Wang
2025-01-14 10:10 ` [PATCH 03/10] net/ixgbe/base: disable 2.5/5G speeds from auto-negotiation for E610 Yuan Wang
2025-01-14 10:10 ` [PATCH 04/10] net/ixgbe/base: Add PTP by PHY feature " Yuan Wang
2025-01-14 10:10 ` [PATCH 05/10] net/ixgbe/base: add definition of FW temp event " Yuan Wang
2025-01-14 10:10 ` [PATCH 06/10] net/ixgbe/base: Add capability for OROM recovery update Yuan Wang
2025-01-14 10:10 ` [PATCH 07/10] net/ixgbe/base: add max_drift_thresh to get_ptp_by_phy Yuan Wang
2025-01-14 10:10 ` [PATCH 08/10] net/ixgbe/base: update VF HV subsystem device ID constant Yuan Wang
2025-01-14 10:10 ` Yuan Wang [this message]
2025-01-14 10:10 ` [PATCH 10/10] net/ixgbe: update base driver README Yuan Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250114101024.159941-10-yuanx.wang@intel.com \
    --to=yuanx.wang@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dan.nowlin@intel.com \
    --cc=dev@dpdk.org \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).