[dpdk-dev] [PATCH v4 2/3] lib: add bitrate statistics library

2016-11-15 Thread Pattan, Reshma
Hi,

> Signed-off-by: Remy Horton 
> ---
> a/doc/guides/rel_notes/release_17_02.rst
> b/doc/guides/rel_notes/release_17_02.rst
> index e1b8894..f949e88 100644
> --- a/doc/guides/rel_notes/release_17_02.rst
> +++ b/doc/guides/rel_notes/release_17_02.rst
> @@ -40,6 +40,11 @@ New Features
>   intended to provide a reporting mechanism that is independent of the
>   ethdev library.
> 
> +   * **Added bit-rate calculation library.**
> +
> + A library that can be used to calculate device bit-rates. Calculated
> + bitrates are reported using the metrics library.
> +

Shared Library Versions section also need to be updated for bitrate and metrics 
libraries.

Thanks,
Reshma


[dpdk-dev] [PATCH v4 2/3] lib: add bitrate statistics library

2016-11-15 Thread Remy Horton
This patch adds a library that calculates peak and average data-rate
statistics. For ethernet devices. These statistics are reported using
the metrics library.

Signed-off-by: Remy Horton 
---
 MAINTAINERS|   4 +
 config/common_base |   5 +
 doc/api/doxy-api-index.md  |   1 +
 doc/api/doxy-api.conf  |   1 +
 doc/guides/rel_notes/release_17_02.rst |   5 +
 lib/Makefile   |   1 +
 lib/librte_bitratestats/Makefile   |  53 +
 lib/librte_bitratestats/rte_bitrate.c  | 128 +
 lib/librte_bitratestats/rte_bitrate.h  |  80 +
 .../rte_bitratestats_version.map   |   9 ++
 mk/rte.app.mk  |   1 +
 11 files changed, 288 insertions(+)
 create mode 100644 lib/librte_bitratestats/Makefile
 create mode 100644 lib/librte_bitratestats/rte_bitrate.c
 create mode 100644 lib/librte_bitratestats/rte_bitrate.h
 create mode 100644 lib/librte_bitratestats/rte_bitratestats_version.map

diff --git a/MAINTAINERS b/MAINTAINERS
index 52bd8a9..d6bbdd5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -600,6 +600,10 @@ M: Remy Horton 
 F: lib/librte_metrics/
 F: doc/guides/sample_app_ug/keep_alive.rst

+Bit-rate statistica
+M: Remy Horton 
+F: lib/librte_bitratestats/
+

 Test Applications
 -
diff --git a/config/common_base b/config/common_base
index dedc4c3..beca7ec 100644
--- a/config/common_base
+++ b/config/common_base
@@ -594,3 +594,8 @@ CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS=n
 # Compile the device metrics library
 #
 CONFIG_RTE_LIBRTE_METRICS=y
+
+#
+# Compile the bitrate statistics library
+#
+CONFIG_RTE_LIBRTE_BITRATE=y
diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index ca50fa6..91e8ea6 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -148,4 +148,5 @@ There are many libraries, so their headers may be grouped 
by topics:
   [ABI compat] (@ref rte_compat.h),
   [keepalive]  (@ref rte_keepalive.h),
   [Device Metrics] (@ref rte_metrics.h),
+  [Bitrate Statistics] (@ref rte_bitrate.h),
   [version](@ref rte_version.h)
diff --git a/doc/api/doxy-api.conf b/doc/api/doxy-api.conf
index fe830eb..8765ddd 100644
--- a/doc/api/doxy-api.conf
+++ b/doc/api/doxy-api.conf
@@ -58,6 +58,7 @@ INPUT   = doc/api/doxy-api-index.md \
   lib/librte_ring \
   lib/librte_sched \
   lib/librte_metrics \
+  lib/librte_bitratestats \
   lib/librte_table \
   lib/librte_timer \
   lib/librte_vhost
diff --git a/doc/guides/rel_notes/release_17_02.rst 
b/doc/guides/rel_notes/release_17_02.rst
index e1b8894..f949e88 100644
--- a/doc/guides/rel_notes/release_17_02.rst
+++ b/doc/guides/rel_notes/release_17_02.rst
@@ -40,6 +40,11 @@ New Features
  intended to provide a reporting mechanism that is independent of the
  ethdev library.

+   * **Added bit-rate calculation library.**
+
+ A library that can be used to calculate device bit-rates. Calculated
+ bitrates are reported using the metrics library.
+
  This section is a comment. do not overwrite or remove it.
  Also, make sure to start the actual text at the margin.
  =
diff --git a/lib/Makefile b/lib/Makefile
index 5d85dcf..e211bc0 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -59,6 +59,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += librte_pipeline
 DIRS-$(CONFIG_RTE_LIBRTE_REORDER) += librte_reorder
 DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += librte_pdump
 DIRS-$(CONFIG_RTE_LIBRTE_METRICS) += librte_metrics
+DIRS-$(CONFIG_RTE_LIBRTE_BITRATE) += librte_bitratestats

 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
 DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni
diff --git a/lib/librte_bitratestats/Makefile b/lib/librte_bitratestats/Makefile
new file mode 100644
index 000..b725d4e
--- /dev/null
+++ b/lib/librte_bitratestats/Makefile
@@ -0,0 +1,53 @@
+#   BSD LICENSE
+#
+#   Copyright(c) 2016 Intel Corporation. All rights reserved.
+#   All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in
+#   the documentation and/or other materials provided with the
+#   distribution.
+# * Neither the name of Intel Corporation nor the names of its
+#   contributors