diff options
author | Jerin Jacob <jerinj@marvell.com> | 2021-02-15 15:29:42 +0530 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2021-07-21 11:02:15 +0300 |
commit | 2a6bd22254c74a4bc5b28460aa0d0131ee8c8f3d (patch) | |
tree | e92b996dbc12569b1acb69e2a05c06313bbd2549 /platform | |
parent | d9aaba1b356856713023775534ac34cb34e5dac8 (diff) |
api: proto_stats: introduce generic protocol stats framework
Add generic protocol stats framework where protocol stats object
supports basic operations like creation, lookup, access and destroy
of stats object is supported. Each object supports a set of
stats based on object params.
This generic framework is also useful when we have to associate stats
objects to fast path with minimal overhead as it is as close to HW
implementation as possible.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'platform')
-rw-r--r-- | platform/linux-generic/Makefile.am | 1 | ||||
-rw-r--r-- | platform/linux-generic/include-abi/odp/api/abi/proto_stats.h | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index b12066365..55c37856a 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -70,6 +70,7 @@ odpapiabiarchinclude_HEADERS += \ include-abi/odp/api/abi/packet_types.h \ include-abi/odp/api/abi/packet_flags.h \ include-abi/odp/api/abi/packet_io.h \ + include-abi/odp/api/abi/proto_stats.h \ include-abi/odp/api/abi/pool.h \ include-abi/odp/api/abi/queue.h \ include-abi/odp/api/abi/queue_types.h \ diff --git a/platform/linux-generic/include-abi/odp/api/abi/proto_stats.h b/platform/linux-generic/include-abi/odp/api/abi/proto_stats.h new file mode 100644 index 000000000..2ebfa57cd --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/proto_stats.h @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(C) 2021 Marvell. + */ + +/** + * @file + * + * ODP proto stats + */ + +#ifndef ODP_API_ABI_PROTO_STATS_H_ +#define ODP_API_ABI_PROTO_STATS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <odp/api/std_types.h> +#include <odp/api/plat/strong_types.h> + +/** @ingroup odp_proto_stats + * @{ + */ + +typedef ODP_HANDLE_T(odp_proto_stats_t); + +#define ODP_PROTO_STATS_INVALID _odp_cast_scalar(odp_proto_stats_t, 0) + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif |