* [dpdk-dev] [PATCH 1/2] bitratestats: add support for free
@ 2020-05-13 11:38 Hemant Agrawal
2020-05-13 11:38 ` [dpdk-dev] [PATCH 2/2] test: add support for testing bitrate stats free Hemant Agrawal
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Hemant Agrawal @ 2020-05-13 11:38 UTC (permalink / raw)
To: dev; +Cc: Hemant Agrawal
This patch adds support for free funnction.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
lib/librte_bitratestats/rte_bitrate.c | 8 ++++++++
lib/librte_bitratestats/rte_bitrate.h | 9 +++++++++
lib/librte_bitratestats/rte_bitratestats_version.map | 6 ++++++
3 files changed, 23 insertions(+)
diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index d18152365..1d4715d6c 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -35,6 +35,14 @@ rte_stats_bitrate_create(void)
RTE_CACHE_LINE_SIZE);
}
+int
+rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data)
+{
+ if (bitrate_data)
+ rte_free(bitrate_data);
+ return 0;
+}
+
int
rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
{
diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index ef10f22ff..b2d532b95 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -27,6 +27,15 @@ struct rte_stats_bitrates;
*/
struct rte_stats_bitrates *rte_stats_bitrate_create(void);
+/**
+ * Free bitrate statistics structure
+ *
+ *
+ * @param bitrate_data
+ * Pointer allocated by rte_stats_create()
+ */
+__rte_experimental
+int rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data);
/**
* Register bitrate statistics with the metric library.
diff --git a/lib/librte_bitratestats/rte_bitratestats_version.map b/lib/librte_bitratestats/rte_bitratestats_version.map
index 88fc2912d..85522a05d 100644
--- a/lib/librte_bitratestats/rte_bitratestats_version.map
+++ b/lib/librte_bitratestats/rte_bitratestats_version.map
@@ -7,3 +7,9 @@ DPDK_20.0 {
local: *;
};
+
+EXPERIMENTAL {
+ global:
+
+ rte_stats_bitrate_free;
+};
--
2.17.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 2/2] test: add support for testing bitrate stats free
2020-05-13 11:38 [dpdk-dev] [PATCH 1/2] bitratestats: add support for free Hemant Agrawal
@ 2020-05-13 11:38 ` Hemant Agrawal
2020-05-13 11:47 ` [dpdk-dev] [PATCH 1/2] bitratestats: add support for free Jerin Jacob
2020-05-14 9:30 ` [dpdk-dev] [PATCHv2 " Hemant Agrawal
2 siblings, 0 replies; 11+ messages in thread
From: Hemant Agrawal @ 2020-05-13 11:38 UTC (permalink / raw)
To: dev; +Cc: Hemant Agrawal
This patch adds support to test rte_stats_bitrate_free
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
app/test/test_bitratestats.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/app/test/test_bitratestats.c b/app/test/test_bitratestats.c
index 39d7f734d..c14d32e03 100644
--- a/app/test/test_bitratestats.c
+++ b/app/test/test_bitratestats.c
@@ -32,12 +32,15 @@ test_stats_bitrate_create(void)
return TEST_SUCCESS;
}
-/* To test free the resources from bitrate_reg test */
+/* To test free the resources from bitrate_create test */
static int
test_stats_bitrate_free(void)
{
int ret = 0;
+ ret = rte_stats_bitrate_free(bitrate_data);
+ TEST_ASSERT(ret >= 0, "rte_stats_bitrate_free failed");
+
ret = rte_metrics_deinit();
TEST_ASSERT(ret >= 0, "Test Failed: rte_metrics_deinit failed");
--
2.17.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] bitratestats: add support for free
2020-05-13 11:38 [dpdk-dev] [PATCH 1/2] bitratestats: add support for free Hemant Agrawal
2020-05-13 11:38 ` [dpdk-dev] [PATCH 2/2] test: add support for testing bitrate stats free Hemant Agrawal
@ 2020-05-13 11:47 ` Jerin Jacob
2020-05-14 9:30 ` [dpdk-dev] [PATCHv2 " Hemant Agrawal
2 siblings, 0 replies; 11+ messages in thread
From: Jerin Jacob @ 2020-05-13 11:47 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dpdk-dev
On Wed, May 13, 2020 at 5:10 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
> This patch adds support for free funnction.
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> lib/librte_bitratestats/rte_bitrate.c | 8 ++++++++
> lib/librte_bitratestats/rte_bitrate.h | 9 +++++++++
> lib/librte_bitratestats/rte_bitratestats_version.map | 6 ++++++
> 3 files changed, 23 insertions(+)
>
> diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
> index d18152365..1d4715d6c 100644
> --- a/lib/librte_bitratestats/rte_bitrate.c
> +++ b/lib/librte_bitratestats/rte_bitrate.c
> @@ -35,6 +35,14 @@ rte_stats_bitrate_create(void)
> RTE_CACHE_LINE_SIZE);
> }
>
> +int
> +rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data)
> +{
> + if (bitrate_data)
> + rte_free(bitrate_data);
> + return 0;
> +}
> +
> int
> rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
> {
> diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
> index ef10f22ff..b2d532b95 100644
> --- a/lib/librte_bitratestats/rte_bitrate.h
> +++ b/lib/librte_bitratestats/rte_bitrate.h
> @@ -27,6 +27,15 @@ struct rte_stats_bitrates;
> */
> struct rte_stats_bitrates *rte_stats_bitrate_create(void);
>
> +/**
> + * Free bitrate statistics structure
> + *
> + *
> + * @param bitrate_data
> + * Pointer allocated by rte_stats_create()
s/rte_stats_create()/rte_stats_bitrate_create()
> + */
> +__rte_experimental
> +int rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data);
>
> /**
> * Register bitrate statistics with the metric library.
> diff --git a/lib/librte_bitratestats/rte_bitratestats_version.map b/lib/librte_bitratestats/rte_bitratestats_version.map
> index 88fc2912d..85522a05d 100644
> --- a/lib/librte_bitratestats/rte_bitratestats_version.map
> +++ b/lib/librte_bitratestats/rte_bitratestats_version.map
> @@ -7,3 +7,9 @@ DPDK_20.0 {
>
> local: *;
> };
> +
> +EXPERIMENTAL {
> + global:
> +
> + rte_stats_bitrate_free;
> +};
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCHv2 1/2] bitratestats: add support for free
2020-05-13 11:38 [dpdk-dev] [PATCH 1/2] bitratestats: add support for free Hemant Agrawal
2020-05-13 11:38 ` [dpdk-dev] [PATCH 2/2] test: add support for testing bitrate stats free Hemant Agrawal
2020-05-13 11:47 ` [dpdk-dev] [PATCH 1/2] bitratestats: add support for free Jerin Jacob
@ 2020-05-14 9:30 ` Hemant Agrawal
2020-05-14 9:30 ` [dpdk-dev] [PATCHv2 2/2] test: add support for testing bitrate stats free Hemant Agrawal
` (2 more replies)
2 siblings, 3 replies; 11+ messages in thread
From: Hemant Agrawal @ 2020-05-14 9:30 UTC (permalink / raw)
To: dev; +Cc: Hemant Agrawal
This patch adds support for free funnction.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
lib/librte_bitratestats/rte_bitrate.c | 8 ++++++++
lib/librte_bitratestats/rte_bitrate.h | 11 ++++++++++-
lib/librte_bitratestats/rte_bitratestats_version.map | 6 ++++++
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index d18152365e..1d4715d6c0 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -35,6 +35,14 @@ rte_stats_bitrate_create(void)
RTE_CACHE_LINE_SIZE);
}
+int
+rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data)
+{
+ if (bitrate_data)
+ rte_free(bitrate_data);
+ return 0;
+}
+
int
rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
{
diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index ef10f22ff3..0e5b625b79 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -27,12 +27,21 @@ struct rte_stats_bitrates;
*/
struct rte_stats_bitrates *rte_stats_bitrate_create(void);
+/**
+ * Free bitrate statistics structure
+ *
+ *
+ * @param bitrate_data
+ * Pointer allocated by rte_stats_bitrate_create()
+ */
+__rte_experimental
+int rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data);
/**
* Register bitrate statistics with the metric library.
*
* @param bitrate_data
- * Pointer allocated by rte_stats_create()
+ * Pointer allocated by rte_stats_bitrate_create()
*
* @return
* Zero on success
diff --git a/lib/librte_bitratestats/rte_bitratestats_version.map b/lib/librte_bitratestats/rte_bitratestats_version.map
index 88fc2912db..85522a05d5 100644
--- a/lib/librte_bitratestats/rte_bitratestats_version.map
+++ b/lib/librte_bitratestats/rte_bitratestats_version.map
@@ -7,3 +7,9 @@ DPDK_20.0 {
local: *;
};
+
+EXPERIMENTAL {
+ global:
+
+ rte_stats_bitrate_free;
+};
--
2.17.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCHv2 2/2] test: add support for testing bitrate stats free
2020-05-14 9:30 ` [dpdk-dev] [PATCHv2 " Hemant Agrawal
@ 2020-05-14 9:30 ` Hemant Agrawal
2020-05-19 15:19 ` [dpdk-dev] [PATCHv2 1/2] bitratestats: add support for free Stephen Hemminger
2020-07-11 8:28 ` [dpdk-dev] [PATCH v3 " Hemant Agrawal
2 siblings, 0 replies; 11+ messages in thread
From: Hemant Agrawal @ 2020-05-14 9:30 UTC (permalink / raw)
To: dev; +Cc: Hemant Agrawal
This patch adds support to test rte_stats_bitrate_free
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
This patch depends on : https://patches.dpdk.org/patch/70155/
app/test/test_bitratestats.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/app/test/test_bitratestats.c b/app/test/test_bitratestats.c
index 39d7f734d4..c14d32e037 100644
--- a/app/test/test_bitratestats.c
+++ b/app/test/test_bitratestats.c
@@ -32,12 +32,15 @@ test_stats_bitrate_create(void)
return TEST_SUCCESS;
}
-/* To test free the resources from bitrate_reg test */
+/* To test free the resources from bitrate_create test */
static int
test_stats_bitrate_free(void)
{
int ret = 0;
+ ret = rte_stats_bitrate_free(bitrate_data);
+ TEST_ASSERT(ret >= 0, "rte_stats_bitrate_free failed");
+
ret = rte_metrics_deinit();
TEST_ASSERT(ret >= 0, "Test Failed: rte_metrics_deinit failed");
--
2.17.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCHv2 1/2] bitratestats: add support for free
2020-05-14 9:30 ` [dpdk-dev] [PATCHv2 " Hemant Agrawal
2020-05-14 9:30 ` [dpdk-dev] [PATCHv2 2/2] test: add support for testing bitrate stats free Hemant Agrawal
@ 2020-05-19 15:19 ` Stephen Hemminger
2020-07-10 22:30 ` Thomas Monjalon
2020-07-11 8:28 ` [dpdk-dev] [PATCH v3 " Hemant Agrawal
2 siblings, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2020-05-19 15:19 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dev
On Thu, 14 May 2020 15:00:00 +0530
Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
> +int
> +rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data)
> +{
> + if (bitrate_data)
> + rte_free(bitrate_data);
> + return 0;
> +}
rte_free of NULL is allowed, the test is not needed.
Should be void not int function.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCHv2 1/2] bitratestats: add support for free
2020-05-19 15:19 ` [dpdk-dev] [PATCHv2 1/2] bitratestats: add support for free Stephen Hemminger
@ 2020-07-10 22:30 ` Thomas Monjalon
2020-07-11 3:11 ` Hemant Agrawal
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Monjalon @ 2020-07-10 22:30 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dev, Stephen Hemminger
19/05/2020 17:19, Stephen Hemminger:
> On Thu, 14 May 2020 15:00:00 +0530
> Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
> >
> > +int
> > +rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data)
> > +{
> > + if (bitrate_data)
> > + rte_free(bitrate_data);
> > + return 0;
> > +}
>
> rte_free of NULL is allowed, the test is not needed.
>
> Should be void not int function.
Ping, why no answer? Can we expect a v3?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCHv2 1/2] bitratestats: add support for free
2020-07-10 22:30 ` Thomas Monjalon
@ 2020-07-11 3:11 ` Hemant Agrawal
0 siblings, 0 replies; 11+ messages in thread
From: Hemant Agrawal @ 2020-07-11 3:11 UTC (permalink / raw)
To: thomas; +Cc: dev, stephen
Missed it. I will send v3
Get BlueMail for Android<http://www.bluemail.me/r?b=15860>
On 11 Jul 2020, at 4:00 AM, Thomas Monjalon <thomas@monjalon.net<mailto:thomas@monjalon.net>> wrote:
19/05/2020 17:19, Stephen Hemminger:
On Thu, 14 May 2020 15:00:00 +0530
Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
+int
+rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data)
+{
+ if (bitrate_data)
+ rte_free(bitrate_data);
+ return 0;
+}
rte_free of NULL is allowed, the test is not needed.
Should be void not int function.
Ping, why no answer? Can we expect a v3?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH v3 1/2] bitratestats: add support for free
2020-05-14 9:30 ` [dpdk-dev] [PATCHv2 " Hemant Agrawal
2020-05-14 9:30 ` [dpdk-dev] [PATCHv2 2/2] test: add support for testing bitrate stats free Hemant Agrawal
2020-05-19 15:19 ` [dpdk-dev] [PATCHv2 1/2] bitratestats: add support for free Stephen Hemminger
@ 2020-07-11 8:28 ` Hemant Agrawal
2020-07-11 8:28 ` [dpdk-dev] [PATCH v3 2/2] test: add support for testing bitrate stats free Hemant Agrawal
2020-10-19 14:09 ` [dpdk-dev] [PATCH v3 1/2] bitratestats: add support for free Thomas Monjalon
2 siblings, 2 replies; 11+ messages in thread
From: Hemant Agrawal @ 2020-07-11 8:28 UTC (permalink / raw)
To: dev; +Cc: Hemant Agrawal
This patch adds support for free funnction.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
lib/librte_bitratestats/rte_bitrate.c | 6 ++++++
lib/librte_bitratestats/rte_bitrate.h | 10 +++++++++-
lib/librte_bitratestats/rte_bitratestats_version.map | 6 ++++++
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index d18152365e..8fd9f47288 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -35,6 +35,12 @@ rte_stats_bitrate_create(void)
RTE_CACHE_LINE_SIZE);
}
+void
+rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data)
+{
+ rte_free(bitrate_data);
+}
+
int
rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
{
diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index ef10f22ff3..4865929e8f 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -27,12 +27,20 @@ struct rte_stats_bitrates;
*/
struct rte_stats_bitrates *rte_stats_bitrate_create(void);
+/**
+ * Free bitrate statistics structure
+ *
+ * @param bitrate_data
+ * Pointer allocated by rte_stats_bitrate_create()
+ */
+__rte_experimental
+void rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data);
/**
* Register bitrate statistics with the metric library.
*
* @param bitrate_data
- * Pointer allocated by rte_stats_create()
+ * Pointer allocated by rte_stats_bitrate_create()
*
* @return
* Zero on success
diff --git a/lib/librte_bitratestats/rte_bitratestats_version.map b/lib/librte_bitratestats/rte_bitratestats_version.map
index 88fc2912db..85522a05d5 100644
--- a/lib/librte_bitratestats/rte_bitratestats_version.map
+++ b/lib/librte_bitratestats/rte_bitratestats_version.map
@@ -7,3 +7,9 @@ DPDK_20.0 {
local: *;
};
+
+EXPERIMENTAL {
+ global:
+
+ rte_stats_bitrate_free;
+};
--
2.17.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH v3 2/2] test: add support for testing bitrate stats free
2020-07-11 8:28 ` [dpdk-dev] [PATCH v3 " Hemant Agrawal
@ 2020-07-11 8:28 ` Hemant Agrawal
2020-10-19 14:09 ` [dpdk-dev] [PATCH v3 1/2] bitratestats: add support for free Thomas Monjalon
1 sibling, 0 replies; 11+ messages in thread
From: Hemant Agrawal @ 2020-07-11 8:28 UTC (permalink / raw)
To: dev; +Cc: Hemant Agrawal
This patch adds support to test rte_stats_bitrate_free
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
app/test/test_bitratestats.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/test/test_bitratestats.c b/app/test/test_bitratestats.c
index 39d7f734d4..fd4e949642 100644
--- a/app/test/test_bitratestats.c
+++ b/app/test/test_bitratestats.c
@@ -32,12 +32,14 @@ test_stats_bitrate_create(void)
return TEST_SUCCESS;
}
-/* To test free the resources from bitrate_reg test */
+/* To test free the resources from bitrate_create test */
static int
test_stats_bitrate_free(void)
{
int ret = 0;
+ rte_stats_bitrate_free(bitrate_data);
+
ret = rte_metrics_deinit();
TEST_ASSERT(ret >= 0, "Test Failed: rte_metrics_deinit failed");
--
2.17.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/2] bitratestats: add support for free
2020-07-11 8:28 ` [dpdk-dev] [PATCH v3 " Hemant Agrawal
2020-07-11 8:28 ` [dpdk-dev] [PATCH v3 2/2] test: add support for testing bitrate stats free Hemant Agrawal
@ 2020-10-19 14:09 ` Thomas Monjalon
1 sibling, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2020-10-19 14:09 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dev
11/07/2020 10:28, Hemant Agrawal:
> This patch adds support for free funnction.
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Squashed patches 1 & 2 and applied, thanks
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-10-19 14:09 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 11:38 [dpdk-dev] [PATCH 1/2] bitratestats: add support for free Hemant Agrawal
2020-05-13 11:38 ` [dpdk-dev] [PATCH 2/2] test: add support for testing bitrate stats free Hemant Agrawal
2020-05-13 11:47 ` [dpdk-dev] [PATCH 1/2] bitratestats: add support for free Jerin Jacob
2020-05-14 9:30 ` [dpdk-dev] [PATCHv2 " Hemant Agrawal
2020-05-14 9:30 ` [dpdk-dev] [PATCHv2 2/2] test: add support for testing bitrate stats free Hemant Agrawal
2020-05-19 15:19 ` [dpdk-dev] [PATCHv2 1/2] bitratestats: add support for free Stephen Hemminger
2020-07-10 22:30 ` Thomas Monjalon
2020-07-11 3:11 ` Hemant Agrawal
2020-07-11 8:28 ` [dpdk-dev] [PATCH v3 " Hemant Agrawal
2020-07-11 8:28 ` [dpdk-dev] [PATCH v3 2/2] test: add support for testing bitrate stats free Hemant Agrawal
2020-10-19 14:09 ` [dpdk-dev] [PATCH v3 1/2] bitratestats: add support for free Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).