[dpdk-dev] [PATCH v5 3/4] net/qede: add infrastructure for debug data collection

Ferruh Yigit ferruh.yigit at intel.com
Thu Jul 9 18:37:06 CEST 2020


On 7/8/2020 11:50 PM, Rasesh Mody wrote:
> The patch adds QEDE PMD ops and APIs to calculate the size and collect
> the debug dump for various firmware components. The patch adds new files
> qede_debug.[ch] that has all the firmware debug data collection
> infrastructure changes.
> 
> Signed-off-by: Rasesh Mody <rmody at marvell.com>
> Signed-off-by: Igor Russkikh <irusskikh at marvell.com>

<...>

> +		/* Add parsed element to parsed buffer */
> +		results_offset +=
> +		    sprintf(qed_get_buf_ptr(results_buf,
> +					    results_offset),
> +			    "raw: 0x%016lx, address: 0x%07x, access: %-5s, pf: %2d, vf: %s, port: %d, privilege: %-3s, protection: %-12s, master: %-4s, error: %s\n",
> +			    elements[i].data,
> +			    (u32)GET_FIELD(elements[i].data,
> +					   REG_FIFO_ELEMENT_ADDRESS) *
> +			    REG_FIFO_ELEMENT_ADDR_FACTOR,
> +			    s_access_strs[GET_FIELD(elements[i].data,
> +						    REG_FIFO_ELEMENT_ACCESS)],
> +			    (u32)GET_FIELD(elements[i].data,
> +					   REG_FIFO_ELEMENT_PF),
> +			    vf_str,
> +			    (u32)GET_FIELD(elements[i].data,
> +					   REG_FIFO_ELEMENT_PORT),
> +			    s_privilege_strs[GET_FIELD(elements[i].data,
> +						REG_FIFO_ELEMENT_PRIVILEGE)],
> +			    s_protection_strs[GET_FIELD(elements[i].data,
> +						REG_FIFO_ELEMENT_PROTECTION)],
> +			    s_master_strs[GET_FIELD(elements[i].data,
> +						    REG_FIFO_ELEMENT_MASTER)],
> +			    err_msg ? err_msg : "unknown error code");

Another 32 bits build error from this line [1], fixed while merging as
'0x%016lx' -> '0x%016"PRIx64"', please double check in next-net.

Also split long line.


[1]
../drivers/net/qede/qede_debug.c: In function ‘qed_parse_reg_fifo_dump’:
../drivers/net/qede/qede_debug.c:6742:21: error: format ‘%lx’ expects argument
of type ‘long unsigned int’, but argument 3 has type ‘u64 {aka long long
unsigned int}’ [-Werror=format=]
        "raw: 0x%016lx, address: 0x%07x, access: %-5s, pf: %2d, vf: %s, port:
%d, privilege: %-3s, protection: %-12s, master: %-4s, error: %s\n",
                ~~~~~^
                %016llx
        elements[i].data,
        ~~~~~~~~~~~~~~~~


More information about the dev mailing list