Hi Stephen,

> + if (wait_head->ack_err >= 0 && (data_len > 3 * sizeof(uint32_t))) {
> +  if (data_len - 3 * sizeof(uint32_t) != wait_head->ack_data_len)
> +   NBL_LOG(ERR, "payload_len do not match ack_len!,"
> +    " srcid:%u, msgtype:%u, msgid:%u, ack_msgid %u,"
> +    " data_len:%u, ack_data_len:%u",
> +    srcid, ack_msgtype, msgid,
> +    ack_msgid, data_len, wait_head->ack_data_len);

The grammar is incorrect, and prefer to avoid splitting error messages
across multiple source lines because that makes it harder to look for the
error in the driver source.

The bigger issue is what does the error mean? Driver bug?

This location has a version inconsistency. For example, the DPDK PMD and the kernel's nbl_core are not of the same version, 
and the parameter structure of the same mailbox message has changed. 
This causes data_len and ack_data_len to be different. 
This situation cannot really be considered an error. I will fix this ERR log in the next patch series.

Thank you.



------------------------------------------------------------------
发件人:Stephen Hemminger <stephen@networkplumber.org>
发送时间:2025年9月19日(周五) 00:39
收件人:Dimon<dimon.zhao@nebula-matrix.com>
抄 送:dev<dev@dpdk.org>; Kyo Liu<kyo.liu@nebula-matrix.com>; Leon<leon.yu@nebula-matrix.com>; Sam<sam.chen@nebula-matrix.com>
主 题:Re: [PATCH v9 04/17] net/nbl: add Channel layer definitions and implementation

On Wed, 17 Sep 2025 01:08:30 -0700
Dimon Zhao <dimon.zhao@nebula-matrix.com> wrote:

> + if (wait_head->ack_err >= 0 && (data_len > 3 * sizeof(uint32_t))) {
> +  if (data_len - 3 * sizeof(uint32_t) != wait_head->ack_data_len)
> +   NBL_LOG(ERR, "payload_len do not match ack_len!,"
> +    " srcid:%u, msgtype:%u, msgid:%u, ack_msgid %u,"
> +    " data_len:%u, ack_data_len:%u",
> +    srcid, ack_msgtype, msgid,
> +    ack_msgid, data_len, wait_head->ack_data_len);

The grammar is incorrect, and prefer to avoid splitting error messages
across multiple source lines because that makes it harder to look for the
error in the driver source.

The bigger issue is what does the error mean? Driver bug?

> +  copy_len = RTE_MIN((u32)wait_head->ack_data_len,
> +       (u32)data_len - 3 * sizeof(uint32_t));

Why the cast to u32 when variables are already uint32_t

> +  memcpy(wait_head->ack_data, payload + 3, copy_len);
> + }

本邮件所含信息及其任何附件为保密信息且可能属于专有信息。任何非指定接收人均无权访问本邮件。如果您不是该邮件的指定接收人,那么任何对本邮件内容进行披露,复制或使用的行为均是禁止的。如果您不是该邮件的指定接收人,请您立即通过邮件通知 compliance@nebula-matrix.com并立即删除您错误接受的邮件。
The information in this message and any attachments is confidential and may be privileged.  Access to this email by anyone other than the intended recipient is not authorized.  If you are not the intended recipient, disclosure, copying or use of the contents of this email is prohibited.  If you are not the intended recipient, please notify  compliance@nebula-matrix.com immediately by email, and please destroy the email you received in error.