[dpdk-dev] [PATCH 05/11] net/hns3: add more hardware error types
Ferruh Yigit
ferruh.yigit at intel.com
Fri Sep 4 12:34:13 CEST 2020
On 8/25/2020 12:52 PM, Wei Hu (Xavier) wrote:
> From: "Wei Hu (Xavier)" <xavier.huwei at 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 at huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei at 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
More information about the dev
mailing list