DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Tianhao Zhang <zhang.tianhao2@zte.com.cn>
Cc: wang.junlong1@zte.com.cn, yang.yonggang@zte.com.cn, dev@dpdk.org
Subject: Re: [PATCH v1 1/2] net/zxdh: add pcie bar channel check
Date: Mon, 22 Dec 2025 10:37:03 -0800	[thread overview]
Message-ID: <20251222103703.62096eea@phoenix.local> (raw)
In-Reply-To: <20251222102535.401064-2-zhang.tianhao2@zte.com.cn>

On Mon, 22 Dec 2025 18:25:34 +0800
Tianhao Zhang <zhang.tianhao2@zte.com.cn> wrote:

> Add pcie bar channel check after getting dtb space left.
> 
> Signed-off-by: Tianhao Zhang <zhang.tianhao2@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.

  reply	other threads:[~2025-12-22 18:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09  2:16 [PATCH v1] " Tianhao Zhang
2025-12-22 10:25 ` [PATCH v1 0/2] fix bug Tianhao Zhang
2025-12-22 10:25   ` [PATCH v1 1/2] net/zxdh: add pcie bar channel check Tianhao Zhang
2025-12-22 18:37     ` Stephen Hemminger [this message]
2025-12-22 10:25   ` [PATCH v1 2/2] net/zxdh: delete np soft resource uninstallation Tianhao Zhang
2025-12-22 18:38     ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251222103703.62096eea@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=wang.junlong1@zte.com.cn \
    --cc=yang.yonggang@zte.com.cn \
    --cc=zhang.tianhao2@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).