From 2a6bd22254c74a4bc5b28460aa0d0131ee8c8f3d Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Mon, 15 Feb 2021 15:29:42 +0530 Subject: 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 Signed-off-by: Jerin Jacob Reviewed-by: Janne Peltonen --- .../include-abi/odp/api/abi/proto_stats.h | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 platform/linux-generic/include-abi/odp/api/abi/proto_stats.h (limited to 'platform/linux-generic/include-abi') 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 +#include + +/** @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 -- cgit v1.2.3