On Wed, 17 Sep 2025 01:08:30 -0700
Dimon Zhao <[email protected]> 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);
> +     }

Reply via email to