Re: [PATCH 1/6] net: ldpaa_eth: fix the memory layout of the dpmac_get_counters() API
On Tue, May 23, 2023 at 4:48 PM Ioana Ciornei wrote: > > Each MC commands has a specific predefined memory layout that gets > interpreted by the firmware. The dpmac_get_counters() API memory layout > is wrong, thus the results returned by the command are incorrect. > > Fix this by updating the offset of the counter field. > > Signed-off-by: Ioana Ciornei > --- > include/fsl-mc/fsl_dpmac.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/fsl-mc/fsl_dpmac.h b/include/fsl-mc/fsl_dpmac.h > index 1cea123a3164..8f5e17fe222a 100644 > --- a/include/fsl-mc/fsl_dpmac.h > +++ b/include/fsl-mc/fsl_dpmac.h > @@ -84,7 +84,7 @@ do { \ > > /*cmd, param, offset, width, type, arg_name */ > #define DPMAC_CMD_GET_COUNTER(cmd, type) \ > - MC_CMD_OP(cmd, 1, 0, 64, enum dpmac_counter, type) > + MC_CMD_OP(cmd, 0, 0, 8, enum dpmac_counter, type) > > /*cmd, param, offset, width, type, arg_name */ > #define DPMAC_RSP_GET_COUNTER(cmd, counter) \ > -- > 2.25.1 > Reviewed-by: Ramon Fried
[PATCH 1/6] net: ldpaa_eth: fix the memory layout of the dpmac_get_counters() API
Each MC commands has a specific predefined memory layout that gets interpreted by the firmware. The dpmac_get_counters() API memory layout is wrong, thus the results returned by the command are incorrect. Fix this by updating the offset of the counter field. Signed-off-by: Ioana Ciornei --- include/fsl-mc/fsl_dpmac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fsl-mc/fsl_dpmac.h b/include/fsl-mc/fsl_dpmac.h index 1cea123a3164..8f5e17fe222a 100644 --- a/include/fsl-mc/fsl_dpmac.h +++ b/include/fsl-mc/fsl_dpmac.h @@ -84,7 +84,7 @@ do { \ /*cmd, param, offset, width, type, arg_name */ #define DPMAC_CMD_GET_COUNTER(cmd, type) \ - MC_CMD_OP(cmd, 1, 0, 64, enum dpmac_counter, type) + MC_CMD_OP(cmd, 0, 0, 8, enum dpmac_counter, type) /*cmd, param, offset, width, type, arg_name */ #define DPMAC_RSP_GET_COUNTER(cmd, counter) \ -- 2.25.1