[dpdk-dev,v2,24/30] bus/dpaa2: add support for hw extra stats API
Checks
Commit Message
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/bus/dpaa/base/fman/fman_hw.c | 30 ++++++++++++++++++++++++++++++
drivers/bus/dpaa/include/fsl_fman.h | 3 +++
drivers/bus/dpaa/rte_bus_dpaa_version.map | 1 +
3 files changed, 34 insertions(+)
Comments
On 9/8/2017 9:45 AM, Hemant Agrawal wrote:
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> drivers/bus/dpaa/base/fman/fman_hw.c | 30 ++++++++++++++++++++++++++++++
> drivers/bus/dpaa/include/fsl_fman.h | 3 +++
> drivers/bus/dpaa/rte_bus_dpaa_version.map | 1 +
This patch, also next one, updates "dpaa" bus, is this by mistake?
"dpaa" not merged yet, and this patchset should be for "dpaa2".
<...>
On 9/15/2017 5:08 PM, Ferruh Yigit wrote:
> On 9/8/2017 9:45 AM, Hemant Agrawal wrote:
>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> ---
>> drivers/bus/dpaa/base/fman/fman_hw.c | 30 ++++++++++++++++++++++++++++++
>> drivers/bus/dpaa/include/fsl_fman.h | 3 +++
>> drivers/bus/dpaa/rte_bus_dpaa_version.map | 1 +
>
> This patch, also next one, updates "dpaa" bus, is this by mistake?
> "dpaa" not merged yet, and this patchset should be for "dpaa2".
>
> <...>
>
It was a mistake. I will remove it in next version.
@@ -234,6 +234,36 @@ fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats)
}
void
+fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n)
+{
+ struct __fman_if *m = container_of(p, struct __fman_if, __if);
+ struct memac_regs *regs = m->ccsr_map;
+ int i;
+ uint64_t base_offset = offsetof(struct memac_regs, reoct_l);
+
+ for (i = 0; i < n; i++)
+ value[i] = ((u64)in_be32((char *)regs
+ + base_offset + 8 * i + 4)) << 32 |
+ ((u64)in_be32((char *)regs
+ + base_offset + 8 * i));
+}
+
+void
+fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n)
+{
+ struct __fman_if *m = container_of(p, struct __fman_if, __if);
+ struct memac_regs *regs = m->ccsr_map;
+ int i;
+ uint64_t base_offset = offsetof(struct memac_regs, reoct_l);
+
+ for (i = 0; i < n; i++)
+ value[i] = ((u64)in_be32((char *)regs
+ + base_offset + 8 * i + 4)) << 32 |
+ ((u64)in_be32((char *)regs
+ + base_offset + 8 * i));
+}
+
+void
fman_if_stats_reset(struct fman_if *p)
{
struct __fman_if *m = container_of(p, struct __fman_if, __if);
@@ -87,6 +87,9 @@ void fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats);
/* Reset the FMAN statistics */
void fman_if_stats_reset(struct fman_if *p);
+/* Get all of the FMAN statistics */
+void fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n);
+
/* Set ignore pause option for a specific interface */
void fman_if_set_rx_ignore_pause_frames(struct fman_if *p, bool enable);
@@ -30,6 +30,7 @@ DPDK_17.11 {
fman_if_set_maxfrm;
fman_if_set_mcast_filter_table;
fman_if_stats_get;
+ fman_if_stats_get_all;
fman_if_stats_reset;
netcfg_acquire;
netcfg_release;