DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Wei Hu (Xavier)" <huwei013@chinasoftinc.com>, dev@dpdk.org
Cc: xavier.huwei@huawei.com
Subject: Re: [dpdk-dev] [PATCH 05/11] net/hns3: add more hardware error types
Date: Fri, 4 Sep 2020 11:34:13 +0100
Message-ID: <0123f152-4d76-424d-a482-376c989a0fcd@intel.com> (raw)
In-Reply-To: <20200825115305.58490-6-huwei013@chinasoftinc.com>

On 8/25/2020 12:52 PM, Wei Hu (Xavier) wrote:
> From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
> 
> The new firmware adds the hardware error types reported by MSI-x mode.
> These errors are defined as RAS errors in hardware and belong to a
> different type from the MSI-x errors processed by the driver.
> 
> When hardware detects an hardware errors, which need to be handled with
> the driver otherwise the device cannot run properly, it reports error
> information through the MSI-x interrupt. After receiving the interrupt
> reported by the hardware, the driver queries the error information and
> identifies the error level, then rectifies the error. All errors will be
> logged. In addition, the hardware may be reset at the function or global
> level based on the error level. After the reset is complete, the hardware
> will recovers to the normal status.
> 
> Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>

<...>

> +	bd_num = RTE_MAX(mpf_bd_num, pf_bd_num);
>  	desc = rte_zmalloc(NULL, bd_num * sizeof(struct hns3_cmd_desc), 0);
>  	if (desc == NULL) {
> -		hns3_err(hw, "fail to zmalloc desc");
> +		hns3_err(hw,
> +			 "fail to zmalloc desc for handling msix error, size = %lu",
> +			 bd_num * sizeof(struct hns3_cmd_desc));

The log is causing build error for 32bit, because of "%lu" for sizeof() output
[1], fixing as "%lu" -> "%zu" while merging. Doing same for other instance below.



[1]
In file included from .../drivers/net/hns3/hns3_intr.c:16:
.../drivers/net/hns3/hns3_intr.c: In function ‘hns3_handle_msix_error’:
.../drivers/net/hns3/hns3_logs.h:16:38: error: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 6 has type ‘uint32_t’ {aka ‘unsigned
int’} [-Werror=format=]
   16 |  rte_log(level, hns3_logtype_driver, "%s %s(): " fmt, \
      |                                      ^~~~~~~~~~~
.../drivers/net/hns3/hns3_logs.h:20:2: note: in expansion of macro ‘PMD_DRV_LOG_RAW’
   20 |  PMD_DRV_LOG_RAW(hw, RTE_LOG_ERR, fmt "\n", ## args)
      |  ^~~~~~~~~~~~~~~
.../drivers/net/hns3/hns3_intr.c:1390:3: note: in expansion of macro ‘hns3_err’
 1390 |   hns3_err(hw,
      |   ^~~~~~~~
.../drivers/net/hns3/hns3_intr.c:1391:61: note: format string is defined here
 1391 |     "fail to zmalloc desc for handling msix error, size = %lu",
      |                                                           ~~^
      |                                                             |
      |                                                             long
unsigned int
      |                                                           %u

  reply	other threads:[~2020-09-04 10:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 11:52 [dpdk-dev] [PATCH 00/11] updates for hns3 PMD driver Wei Hu (Xavier)
2020-08-25 11:52 ` [dpdk-dev] [PATCH 01/11] net/hns3: get device capability from firmware Wei Hu (Xavier)
2020-08-25 11:52 ` [dpdk-dev] [PATCH 02/11] net/hns3: get dev specifications " Wei Hu (Xavier)
2020-08-25 11:52 ` [dpdk-dev] [PATCH 03/11] net/hns3: compatibility issues about Rx interrupts Wei Hu (Xavier)
2020-08-25 11:52 ` [dpdk-dev] [PATCH 04/11] net/hns3: compatibility issues about Tx padding short frame Wei Hu (Xavier)
2020-08-25 11:52 ` [dpdk-dev] [PATCH 05/11] net/hns3: add more hardware error types Wei Hu (Xavier)
2020-09-04 10:34   ` Ferruh Yigit [this message]
2020-08-25 11:53 ` [dpdk-dev] [PATCH 06/11] net/hns3: support a maximun 256 FDIR counter Wei Hu (Xavier)
2020-08-25 11:53 ` [dpdk-dev] [PATCH 07/11] net/hns3: replace private macro with RTE MAX Wei Hu (Xavier)
2020-08-25 11:53 ` [dpdk-dev] [PATCH 08/11] net/hns3: change the log level to INFO Wei Hu (Xavier)
2020-09-04 10:34   ` Ferruh Yigit
2020-09-07 11:34     ` Wei Hu (Xavier)
2020-09-07 12:10       ` Ferruh Yigit
2020-09-07 12:28         ` Wei Hu (Xavier)
2020-08-25 11:53 ` [dpdk-dev] [PATCH 09/11] net/hns3: fix default MAC addr from firmware Wei Hu (Xavier)
2020-08-25 11:53 ` [dpdk-dev] [PATCH 10/11] net/hns3: fix Rx/Tx queue offload capability Wei Hu (Xavier)
2020-09-04 10:34   ` Ferruh Yigit
2020-09-08 11:48     ` Wei Hu (Xavier)
2020-09-08 12:28   ` [dpdk-dev] [PATCH v2] " Wei Hu (Xavier)
2020-09-15 13:35     ` Ferruh Yigit
2020-08-25 11:53 ` [dpdk-dev] [PATCH 11/11] net/hns3: fix some incomplete command structures Wei Hu (Xavier)
2020-09-03  1:04 ` [dpdk-dev] [PATCH 00/11] updates for hns3 PMD driver Wei Hu (Xavier)
2020-09-04 10:34   ` Ferruh Yigit

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=0123f152-4d76-424d-a482-376c989a0fcd@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=huwei013@chinasoftinc.com \
    --cc=xavier.huwei@huawei.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git