[PATCH v3 6/8] net/iavf: respect output buffer in virtchnl
Anatoly Burakov
anatoly.burakov at intel.com
Fri Mar 6 11:58:22 CET 2026
Currently, in asynchronous case for virtchnl messages, we only store the
command response data inside the global buffer. This is correct, because we
populate the response in a different thread from the caller context, but
this results in caller's `out_buffer` value being ignored. Correct it by
populating caller's response buffer with data from response even in cases
where the messages arrive asynchronously.
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
drivers/net/intel/iavf/iavf_vchnl.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/intel/iavf/iavf_vchnl.c b/drivers/net/intel/iavf/iavf_vchnl.c
index 3f6ce0dd89..250816c24a 100644
--- a/drivers/net/intel/iavf/iavf_vchnl.c
+++ b/drivers/net/intel/iavf/iavf_vchnl.c
@@ -449,6 +449,13 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
err = iavf_wait_for_msg(adapter, args, poll);
+ /*
+ * messages received through interrupts store their response in global
+ * buffer, so we need to copy it if we received the message.
+ */
+ if (!poll && err == 0)
+ memcpy(args->out_buffer, vf->aq_resp, args->out_size);
+
/* in interrupt success case, pending cmd is cleared by intr thread */
if (err != 0 || poll)
goto clear_cmd;
--
2.47.3
More information about the dev
mailing list