Set the payload size before forwarding the reply to the async handler.
Without this, xn->reply_sz will be 0 and idpf_mac_filter_async_handler()
will never get past the size check.

Fixes: 34c21fa894a1 ("idpf: implement virtchnl transaction manager")
Signed-off-by: Emil Tantilov <[email protected]>
Reviewed-by: Aleksandr Loktionov <[email protected]>
---
 drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c 
b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
index 21a6c9d22085..6b9692b30040 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
@@ -627,6 +627,10 @@ idpf_vc_xn_forward_reply(struct idpf_adapter *adapter,
                err = -ENXIO;
                goto out_unlock;
        case IDPF_VC_XN_ASYNC:
+               /* Set reply_sz from the actual payload so that async_handler
+                * can evaluate the response.
+                */
+               xn->reply_sz = ctlq_msg->data_len;
                err = idpf_vc_xn_forward_async(adapter, xn, ctlq_msg);
                idpf_vc_xn_unlock(xn);
                idpf_vc_xn_push_free(adapter->vcxn_mngr, xn);
-- 
2.37.3

Reply via email to