All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Rasesh Mody <rmody@marvell.com>, jerinj@marvell.com
Cc: dev@dpdk.org, GR-Everest-DPDK-Dev@marvell.com,
	Igor Russkikh <irusskikh@marvell.com>
Subject: Re: [dpdk-dev] [PATCH v5 4/4] net/qede: add support for get register operation
Date: Thu, 9 Jul 2020 17:32:42 +0100	[thread overview]
Message-ID: <2455e6fb-4e2a-4531-90dc-5b9b802d8370@intel.com> (raw)
In-Reply-To: <20200708225054.19665-5-rmody@marvell.com>

On 7/8/2020 11:50 PM, Rasesh Mody wrote:
> Add support for .get_reg eth_dev ops which will be used to collect the
> firmware debug data.
> 
> PMD on detecting on some HW errors will collect the FW/HW Dump to a
> buffer and then it will save it to a file implemented in
> qede_save_fw_dump().
> 
> Dump file location and name:
> Location: <RTE_SDK> or DPDK root
> Name: qede_pmd_dump_mm-dd-yy_hh-mm-ss.bin
> 
> DPDK applications can initiate a debug data collection by invoking DPDK
> library’s rte_eth_dev_get_reg_info() API. This API invokes .get_reg()
> interface in the PMD.
> 
> PMD implementation of .get_reg() collects the FW/HW Dump, saves it to
> data field of rte_dev_reg_info and passes it to the application. It’s
> the responsibility of the application to save the FW/HW Dump to a file.
> We recommendation using the file name format used by qede_save_fw_dump().
> 
> Signed-off-by: Rasesh Mody <rmody@marvell.com>
> Signed-off-by: Igor Russkikh <irusskikh@marvell.com>

<...>

> +static int
> +qede_write_fwdump(const char *dump_file, void *dump, size_t len)
> +{
> +	int err = 0;
> +	FILE *f;
> +	size_t bytes;
> +
> +	f = fopen(dump_file, "wb+");
> +
> +	if (!f) {
> +		fprintf(stderr, "Can't open file %s: %s\n",
> +			dump_file, strerror(errno));
> +		return 1;
> +	}
> +	bytes = fwrite(dump, 1, len, f);
> +	if (bytes != len) {
> +		fprintf(stderr, "Can not write all of dump data bytes=%ld len=%ld\n",
> +			bytes, len);

Travis is giving build error on this for 32 bits [1], fixing while merging by
replacing '%ld' -> '%zd', please double check in next-net.

[1]
../drivers/net/qede/qede_regs.c: In function ‘qede_write_fwdump’:
../drivers/net/qede/qede_regs.c:229:59: error: format ‘%ld’ expects argument of
type ‘long int’, but argument 3 has type ‘size_t {aka unsigned int}’
[-Werror=format=]
   fprintf(stderr, "Can not write all of dump data bytes=%ld len=%ld\n",
                                                         ~~^
                                                         %d
../drivers/net/qede/qede_regs.c:229:67: error: format ‘%ld’ expects argument of
type ‘long int’, but argument 4 has type ‘size_t {aka unsigned int}’
[-Werror=format=]
   fprintf(stderr, "Can not write all of dump data bytes=%ld len=%ld\n",
                                                                 ~~^
                                                                 %d

  parent reply	other threads:[~2020-07-09 16:32 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28  5:58 [dpdk-dev] [PATCH 0/4] net/qede: add FW debug data collection support Rasesh Mody
2020-06-28  5:58 ` [dpdk-dev] [PATCH 1/4] net/qede/base: re-arrange few structures for DDC Rasesh Mody
2020-06-28  5:58 ` [dpdk-dev] [PATCH 2/4] net/qede/base: add changes for debug data collection Rasesh Mody
2020-06-28  5:58 ` [dpdk-dev] [PATCH 3/4] net/qede: add infrastructure " Rasesh Mody
2020-06-28 12:29   ` Jerin Jacob
2020-06-30  7:38     ` [dpdk-dev] [EXT] " Rasesh Mody
2020-06-28  5:58 ` [dpdk-dev] [PATCH 4/4] net/qede: add support for get register operation Rasesh Mody
2020-06-28 12:23   ` Jerin Jacob
2020-06-30  7:37     ` [dpdk-dev] [EXT] " Rasesh Mody
2020-06-30  8:32 ` [dpdk-dev] [PATCH v2 0/4] net/qede: add FW debug data collection support Rasesh Mody
2020-07-07 20:18   ` [dpdk-dev] [PATCH v3 " Rasesh Mody
2020-07-07 21:16     ` [dpdk-dev] [PATCH v4 " Rasesh Mody
2020-07-08 22:50       ` [dpdk-dev] [PATCH v5 " Rasesh Mody
2020-07-08 22:50       ` [dpdk-dev] [PATCH v5 1/4] net/qede/base: re-arrange few structures for DDC Rasesh Mody
2020-07-08 22:50       ` [dpdk-dev] [PATCH v5 2/4] net/qede/base: add changes for debug data collection Rasesh Mody
2020-07-08 22:50       ` [dpdk-dev] [PATCH v5 3/4] net/qede: add infrastructure " Rasesh Mody
2020-07-09 16:37         ` Ferruh Yigit
2020-07-09 23:30           ` [dpdk-dev] [EXT] " Rasesh Mody
2020-07-08 22:50       ` [dpdk-dev] [PATCH v5 4/4] net/qede: add support for get register operation Rasesh Mody
2020-07-09 10:11         ` Jerin Jacob
2020-07-09 16:32         ` Ferruh Yigit [this message]
2020-07-09 23:30           ` [dpdk-dev] [EXT] " Rasesh Mody
2020-07-07 21:16     ` [dpdk-dev] [PATCH v4 1/4] net/qede/base: re-arrange few structures for DDC Rasesh Mody
2020-07-07 21:16     ` [dpdk-dev] [PATCH v4 2/4] net/qede/base: add changes for debug data collection Rasesh Mody
2020-07-07 21:16     ` [dpdk-dev] [PATCH v4 3/4] net/qede: add infrastructure " Rasesh Mody
2020-07-07 21:16     ` [dpdk-dev] [PATCH v4 4/4] net/qede: add support for get register operation Rasesh Mody
2020-07-08  9:29       ` Jerin Jacob
2020-07-07 20:18   ` [dpdk-dev] [PATCH v3 1/4] net/qede/base: re-arrange few structures for DDC Rasesh Mody
2020-07-07 20:18   ` [dpdk-dev] [PATCH v3 2/4] net/qede/base: add changes for debug data collection Rasesh Mody
2020-07-07 20:18   ` [dpdk-dev] [PATCH v3 3/4] net/qede: add infrastructure " Rasesh Mody
2020-07-07 20:18   ` [dpdk-dev] [PATCH v3 4/4] net/qede: add support for get register operation Rasesh Mody
2020-06-30  8:32 ` [dpdk-dev] [PATCH v2 1/4] net/qede/base: re-arrange few structures for DDC Rasesh Mody
2020-06-30 17:47   ` Jerin Jacob
2020-07-07 21:20     ` [dpdk-dev] [EXT] " Rasesh Mody
2020-06-30  8:32 ` [dpdk-dev] [PATCH v2 2/4] net/qede/base: add changes for debug data collection Rasesh Mody
2020-06-30  8:32 ` [dpdk-dev] [PATCH v2 3/4] net/qede: add infrastructure " Rasesh Mody
2020-06-30  8:32 ` [dpdk-dev] [PATCH v2 4/4] net/qede: add support for get register operation Rasesh Mody

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=2455e6fb-4e2a-4531-90dc-5b9b802d8370@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=GR-Everest-DPDK-Dev@marvell.com \
    --cc=dev@dpdk.org \
    --cc=irusskikh@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=rmody@marvell.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.