[PATCH v1 1/2] net/zxdh: add pcie bar channel check
Stephen Hemminger
stephen at networkplumber.org
Mon Dec 22 19:37:03 CET 2025
On Mon, 22 Dec 2025 18:25:34 +0800
Tianhao Zhang <zhang.tianhao2 at zte.com.cn> wrote:
> Add pcie bar channel check after getting dtb space left.
>
> Signed-off-by: Tianhao Zhang <zhang.tianhao2 at zte.com.cn>
> ---
> drivers/net/zxdh/zxdh_np.c | 7 +++++++
> drivers/net/zxdh/zxdh_np.h | 2 ++
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/net/zxdh/zxdh_np.c b/drivers/net/zxdh/zxdh_np.c
> index 024da113e2..4e2637e1b6 100644
> --- a/drivers/net/zxdh/zxdh_np.c
> +++ b/drivers/net/zxdh/zxdh_np.c
> @@ -3698,6 +3698,13 @@ zxdh_np_dtb_queue_unused_item_num_get(uint32_t dev_id,
> rc = zxdh_np_reg_read(dev_id, ZXDH_DTB_INFO_QUEUE_BUF_SPACE,
> 0, queue_id, p_item_num);
> ZXDH_COMM_CHECK_DEV_RC(dev_id, rc, "dpp_reg_read");
> +
> + if((*p_item_num & ZXDH_DTB_SPACE_LEFT_MASK) == ZXDH_DTB_SPACE_LEFT_MASK)
> + {
> + PMD_DRV_LOG(ERR, "pcie bar abnormal, get dtb space left false.");
> + return ZXDH_RC_DTB_BAR_ABNORMAL;
> + }
> +
> return rc;
> }
>
The DPDK style is like the Linux kernel coding style, the bracket should be on the if() line.
The indentation is also off.
It is also not clear what "space left" means, could you provide a clearer message.
More information about the dev
mailing list