回复:[PATCH v9 04/17] net/nbl: add Channel layer definitions and implementation

Dimon dimon.zhao at nebula-matrix.com
Mon Sep 22 08:48:34 CEST 2025


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 at networkplumber.org>
发送时间:2025年9月19日(周五) 00:39
收件人:Dimon<dimon.zhao at nebula-matrix.com>
抄 送:dev<dev at dpdk.org>; Kyo Liu<kyo.liu at nebula-matrix.com>; Leon<leon.yu at nebula-matrix.com>; Sam<sam.chen at 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 at 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);
> + }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20250922/e1f73082/attachment-0001.htm>


More information about the dev mailing list