On Mon, 22 Dec 2025 18:25:34 +0800 Tianhao Zhang <[email protected]> wrote:
> Add pcie bar channel check after getting dtb space left. > > Signed-off-by: Tianhao Zhang <[email protected]> > --- > 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.

