Re: [PATCH iwl-net 2/3] idpf: set the payload size before calling the async handler

Tantilov, Emil S
2026-03-19T16:21:51Z

On 3/17/2026 5:11 PM, Li Li wrote:
> On Mon, Mar 16, 2026 at 4:28 PM Emil Tantilov <emil.s.tantilov@intel.com> wrote:
>>
>> 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 <emil.s.tantilov@intel.com>
>> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
>> ---
>> 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:
>
> Optional comment: could we only set the size if ctlq_msg->data_len >
> 0, in case the hw returns some invalid values?

0 is a valid size, but event if it wasn't the async handler already has
a check for it, which is how this issue was caught (see description).

Thanks,
Emil

>
>> + /* 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
>>
>
> Reviewed-by: Li Li <boolli@google.com>