* [dpdk-dev] [PATCH 1/2] app/testpmd: fix use of uninitialized field
@ 2018-07-10 6:50 Krzysztof Kanas
2018-07-10 6:51 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix help string for tm commit cmd Krzysztof Kanas
2018-07-18 8:40 ` [dpdk-dev] [PATCH " Iremonger, Bernard
0 siblings, 2 replies; 11+ messages in thread
From: Krzysztof Kanas @ 2018-07-10 6:50 UTC (permalink / raw)
To: krzysztof.kanas, dev, Wenzhuo Lu, Jingjing Wu; +Cc: Nithin Dabilpuram, tdu
print_err_msg uses message field that may be not initialized causing
segmentation fault.
Fixes: 12f76f5247e2 ("app/testpmd: add command to resume a TM node")
Cc: tdu@semihalf.com
Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
---
app/test-pmd/cmdline_tm.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index c904e44f0f2f..4f515241703a 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -234,6 +234,7 @@ static void cmd_show_port_tm_cap_parsed(void *parsed_result,
return;
memset(&cap, 0, sizeof(struct rte_tm_capabilities));
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_capabilities_get(port_id, &cap, &error);
if (ret) {
print_err_msg(&error);
@@ -374,6 +375,7 @@ static void cmd_show_port_tm_level_cap_parsed(void *parsed_result,
return;
memset(&lcap, 0, sizeof(struct rte_tm_level_capabilities));
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_level_capabilities_get(port_id, level_id, &lcap, &error);
if (ret) {
print_err_msg(&error);
@@ -498,6 +500,7 @@ static void cmd_show_port_tm_node_cap_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Node id must be valid */
ret = rte_tm_node_type_get(port_id, node_id, &is_leaf, &error);
if (ret != 0) {
@@ -615,6 +618,7 @@ static void cmd_show_port_tm_node_stats_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (!port_is_started(port_id)) {
printf(" Port %u not started (error)\n", port_id);
@@ -727,6 +731,7 @@ static void cmd_show_port_tm_node_type_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_node_type_get(port_id, node_id, &is_leaf, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -832,6 +837,7 @@ static void cmd_add_port_tm_node_shaper_profile_parsed(void *parsed_result,
/* Private shaper profile params */
memset(&sp, 0, sizeof(struct rte_tm_shaper_params));
+ memset(&error, 0, sizeof(struct rte_tm_error));
sp.peak.rate = res->tb_rate;
sp.peak.size = res->tb_size;
sp.pkt_length_adjust = pkt_len_adjust;
@@ -919,6 +925,7 @@ static void cmd_del_port_tm_node_shaper_profile_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_shaper_profile_delete(port_id, shaper_id, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -1004,6 +1011,7 @@ static void cmd_add_port_tm_node_shared_shaper_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Command type: add */
if ((strcmp(res->cmd_type, "add") == 0) &&
(port_is_started(port_id))) {
@@ -1098,6 +1106,7 @@ static void cmd_del_port_tm_node_shared_shaper_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_shared_shaper_delete(port_id, shared_shaper_id, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -1254,6 +1263,7 @@ static void cmd_add_port_tm_node_wred_profile_parsed(void *parsed_result,
return;
memset(&wp, 0, sizeof(struct rte_tm_wred_params));
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* WRED Params (Green Color)*/
color = RTE_TM_GREEN;
@@ -1369,6 +1379,7 @@ static void cmd_del_port_tm_node_wred_profile_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_wred_profile_delete(port_id, wred_profile_id, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -1455,6 +1466,7 @@ static void cmd_set_port_tm_node_shaper_profile_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (!port_is_started(port_id)) {
printf(" Port %u not started (error)\n", port_id);
@@ -1571,6 +1583,7 @@ static void cmd_add_port_tm_nonleaf_node_parsed(void *parsed_result,
return;
memset(&np, 0, sizeof(struct rte_tm_node_params));
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Node parameters */
if (res->parent_node_id < 0)
@@ -1729,6 +1742,7 @@ static void cmd_add_port_tm_leaf_node_parsed(void *parsed_result,
return;
memset(&np, 0, sizeof(struct rte_tm_node_params));
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Node parameters */
if (res->parent_node_id < 0)
@@ -1844,6 +1858,7 @@ static void cmd_del_port_tm_node_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (port_is_started(port_id)) {
printf(" Port %u not stopped (error)\n", port_id);
@@ -1933,6 +1948,7 @@ static void cmd_set_port_tm_node_parent_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (!port_is_started(port_id)) {
printf(" Port %u not started (error)\n", port_id);
@@ -2008,6 +2024,7 @@ static void cmd_suspend_port_tm_node_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_node_suspend(port_id, node_id, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -2072,6 +2089,7 @@ static void cmd_resume_port_tm_node_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_node_resume(port_id, node_id, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -2143,6 +2161,7 @@ static void cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
else
clean_on_fail = 0;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_hierarchy_commit(port_id, clean_on_fail, &error);
if (ret != 0) {
print_err_msg(&error);
--
2.18.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 2/2] app/testpmd: fix help string for tm commit cmd
2018-07-10 6:50 [dpdk-dev] [PATCH 1/2] app/testpmd: fix use of uninitialized field Krzysztof Kanas
@ 2018-07-10 6:51 ` Krzysztof Kanas
2018-07-18 8:51 ` Iremonger, Bernard
2018-07-18 8:40 ` [dpdk-dev] [PATCH " Iremonger, Bernard
1 sibling, 1 reply; 11+ messages in thread
From: Krzysztof Kanas @ 2018-07-10 6:51 UTC (permalink / raw)
To: krzysztof.kanas, dev, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
Cc: Nithin Dabilpuram
Fixes: 86dd86088506 ("app/testpmd: fix use of uninitialized field")
Cc: krzysztof.kanas@caviumnetworks.com
Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
---
app/test-pmd/cmdline_tm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index 4f515241703a..09acc1b87293 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -2172,7 +2172,7 @@ static void cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
cmdline_parse_inst_t cmd_port_tm_hierarchy_commit = {
.f = cmd_port_tm_hierarchy_commit_parsed,
.data = NULL,
- .help_str = "Set port tm node shaper profile",
+ .help_str = "Commit port tm hierarchy",
.tokens = {
(void *)&cmd_port_tm_hierarchy_commit_port,
(void *)&cmd_port_tm_hierarchy_commit_tm,
--
2.18.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix use of uninitialized field
2018-07-10 6:50 [dpdk-dev] [PATCH 1/2] app/testpmd: fix use of uninitialized field Krzysztof Kanas
2018-07-10 6:51 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix help string for tm commit cmd Krzysztof Kanas
@ 2018-07-18 8:40 ` Iremonger, Bernard
1 sibling, 0 replies; 11+ messages in thread
From: Iremonger, Bernard @ 2018-07-18 8:40 UTC (permalink / raw)
To: Krzysztof Kanas, dev, Lu, Wenzhuo, Wu, Jingjing; +Cc: Nithin Dabilpuram, tdu
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Krzysztof Kanas
> Sent: Tuesday, July 10, 2018 7:51 AM
> To: krzysztof.kanas@caviumnetworks.com; dev@dpdk.org; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Nithin Dabilpuram <nithin.dabilpuram@cavium.com>; tdu@semihalf.com
> Subject: [dpdk-dev] [PATCH 1/2] app/testpmd: fix use of uninitialized field
>
> print_err_msg uses message field that may be not initialized causing
> segmentation fault.
>
> Fixes: 12f76f5247e2 ("app/testpmd: add command to resume a TM node")
> Cc: tdu@semihalf.com
>
> Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] app/testpmd: fix help string for tm commit cmd
2018-07-10 6:51 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix help string for tm commit cmd Krzysztof Kanas
@ 2018-07-18 8:51 ` Iremonger, Bernard
2018-07-18 9:54 ` [dpdk-dev] [PATCH v2 " Krzysztof Kanas
0 siblings, 1 reply; 11+ messages in thread
From: Iremonger, Bernard @ 2018-07-18 8:51 UTC (permalink / raw)
To: Krzysztof Kanas, dev, Lu, Wenzhuo, Wu, Jingjing
Cc: Nithin Dabilpuram, Singh, Jasvinder
Hi Krzysztof,
> -----Original Message-----
> From: Krzysztof Kanas [mailto:krzysztof.kanas@caviumnetworks.com]
> Sent: Tuesday, July 10, 2018 7:51 AM
> To: krzysztof.kanas@caviumnetworks.com; dev@dpdk.org; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Iremonger,
> Bernard <bernard.iremonger@intel.com>
> Cc: Nithin Dabilpuram <nithin.dabilpuram@cavium.com>
> Subject: [PATCH 2/2] app/testpmd: fix help string for tm commit cmd
>
> Fixes: 86dd86088506 ("app/testpmd: fix use of uninitialized field")
> Cc: krzysztof.kanas@caviumnetworks.com
>
> Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
> ---
> app/test-pmd/cmdline_tm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c index
> 4f515241703a..09acc1b87293 100644
> --- a/app/test-pmd/cmdline_tm.c
> +++ b/app/test-pmd/cmdline_tm.c
> @@ -2172,7 +2172,7 @@ static void
> cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
> cmdline_parse_inst_t cmd_port_tm_hierarchy_commit = {
> .f = cmd_port_tm_hierarchy_commit_parsed,
> .data = NULL,
> - .help_str = "Set port tm node shaper profile",
> + .help_str = "Commit port tm hierarchy",
> .tokens = {
> (void *)&cmd_port_tm_hierarchy_commit_port,
> (void *)&cmd_port_tm_hierarchy_commit_tm,
> --
> 2.18.0
check-git-log.sh is giving the following error:
./devtools/check-git-log.sh -1
Wrong 'Fixes' reference:
Fixes: 86dd86088506 ("app/testpmd: fix use of uninitialized field")
Regards,
Bernard.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix help string for tm commit cmd
2018-07-18 8:51 ` Iremonger, Bernard
@ 2018-07-18 9:54 ` Krzysztof Kanas
2018-07-24 9:08 ` Iremonger, Bernard
0 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kanas @ 2018-07-18 9:54 UTC (permalink / raw)
To: Iremonger, Bernard, krzysztof.kanas, dev, Wenzhuo Lu, Jingjing Wu
Cc: Nithin Dabilpuram, Singh, Jasvinder
Fixes: bd475cefc7cb ("app/testpmd: fix use of uninitialized field")
Cc: krzysztof.kanas@caviumnetworks.com
Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
---
v2:
* Fix the Fixes commit message line
---
app/test-pmd/cmdline_tm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index 4f515241703a..09acc1b87293 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -2172,7 +2172,7 @@ static void cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
cmdline_parse_inst_t cmd_port_tm_hierarchy_commit = {
.f = cmd_port_tm_hierarchy_commit_parsed,
.data = NULL,
- .help_str = "Set port tm node shaper profile",
+ .help_str = "Commit port tm hierarchy",
.tokens = {
(void *)&cmd_port_tm_hierarchy_commit_port,
(void *)&cmd_port_tm_hierarchy_commit_tm,
--
2.18.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix help string for tm commit cmd
2018-07-18 9:54 ` [dpdk-dev] [PATCH v2 " Krzysztof Kanas
@ 2018-07-24 9:08 ` Iremonger, Bernard
2018-07-25 12:41 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field Krzysztof Kanas
0 siblings, 1 reply; 11+ messages in thread
From: Iremonger, Bernard @ 2018-07-24 9:08 UTC (permalink / raw)
To: Krzysztof Kanas, dev, Lu, Wenzhuo, Wu, Jingjing
Cc: Nithin Dabilpuram, Singh, Jasvinder
Hi Krzysztof
> -----Original Message-----
> From: Krzysztof Kanas [mailto:krzysztof.kanas@caviumnetworks.com]
> Sent: Wednesday, July 18, 2018 10:55 AM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>;
> krzysztof.kanas@caviumnetworks.com; dev@dpdk.org; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Nithin Dabilpuram <nithin.dabilpuram@cavium.com>; Singh, Jasvinder
> <jasvinder.singh@intel.com>
> Subject: [PATCH v2 2/2] app/testpmd: fix help string for tm commit cmd
>
> Fixes: bd475cefc7cb ("app/testpmd: fix use of uninitialized field")
> Cc: krzysztof.kanas@caviumnetworks.com
>
> Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
> ---
> v2:
> * Fix the Fixes commit message line
> ---
> app/test-pmd/cmdline_tm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c index
> 4f515241703a..09acc1b87293 100644
> --- a/app/test-pmd/cmdline_tm.c
> +++ b/app/test-pmd/cmdline_tm.c
> @@ -2172,7 +2172,7 @@ static void
> cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
> cmdline_parse_inst_t cmd_port_tm_hierarchy_commit = {
> .f = cmd_port_tm_hierarchy_commit_parsed,
> .data = NULL,
> - .help_str = "Set port tm node shaper profile",
> + .help_str = "Commit port tm hierarchy",
> .tokens = {
> (void *)&cmd_port_tm_hierarchy_commit_port,
> (void *)&cmd_port_tm_hierarchy_commit_tm,
> --
> 2.18.0
The check-git-log script is still showing an error:
./devtools/check-git-log.sh -1
Wrong 'Fixes' reference:
Fixes: bd475cefc7cb ("app/testpmd: fix use of uninitialized field")
It is better to send the complete patch set (2 patches) with each revision.
My ack can be carried forward on the first patch.
Regards,
Bernard.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field
2018-07-24 9:08 ` Iremonger, Bernard
@ 2018-07-25 12:41 ` Krzysztof Kanas
2018-07-25 12:41 ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix help string for tm commit cmd Krzysztof Kanas
2018-07-25 13:22 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field Iremonger, Bernard
0 siblings, 2 replies; 11+ messages in thread
From: Krzysztof Kanas @ 2018-07-25 12:41 UTC (permalink / raw)
To: Iremonger, Bernard, krzysztof.kanas, dev, Wenzhuo Lu, Jingjing Wu
Cc: Nithin Dabilpuram, Singh, Jasvinder, tdu
print_err_msg uses message field that may be not initialized causing
segmentation fault.
Fixes: 12f76f5247e2 ("app/testpmd: add command to resume a TM node")
Cc: tdu@semihalf.com
Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
---
v3: Fix the Fixes: commit message line
---
app/test-pmd/cmdline_tm.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index c904e44f0f2f..4f515241703a 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -234,6 +234,7 @@ static void cmd_show_port_tm_cap_parsed(void *parsed_result,
return;
memset(&cap, 0, sizeof(struct rte_tm_capabilities));
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_capabilities_get(port_id, &cap, &error);
if (ret) {
print_err_msg(&error);
@@ -374,6 +375,7 @@ static void cmd_show_port_tm_level_cap_parsed(void *parsed_result,
return;
memset(&lcap, 0, sizeof(struct rte_tm_level_capabilities));
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_level_capabilities_get(port_id, level_id, &lcap, &error);
if (ret) {
print_err_msg(&error);
@@ -498,6 +500,7 @@ static void cmd_show_port_tm_node_cap_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Node id must be valid */
ret = rte_tm_node_type_get(port_id, node_id, &is_leaf, &error);
if (ret != 0) {
@@ -615,6 +618,7 @@ static void cmd_show_port_tm_node_stats_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (!port_is_started(port_id)) {
printf(" Port %u not started (error)\n", port_id);
@@ -727,6 +731,7 @@ static void cmd_show_port_tm_node_type_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_node_type_get(port_id, node_id, &is_leaf, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -832,6 +837,7 @@ static void cmd_add_port_tm_node_shaper_profile_parsed(void *parsed_result,
/* Private shaper profile params */
memset(&sp, 0, sizeof(struct rte_tm_shaper_params));
+ memset(&error, 0, sizeof(struct rte_tm_error));
sp.peak.rate = res->tb_rate;
sp.peak.size = res->tb_size;
sp.pkt_length_adjust = pkt_len_adjust;
@@ -919,6 +925,7 @@ static void cmd_del_port_tm_node_shaper_profile_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_shaper_profile_delete(port_id, shaper_id, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -1004,6 +1011,7 @@ static void cmd_add_port_tm_node_shared_shaper_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Command type: add */
if ((strcmp(res->cmd_type, "add") == 0) &&
(port_is_started(port_id))) {
@@ -1098,6 +1106,7 @@ static void cmd_del_port_tm_node_shared_shaper_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_shared_shaper_delete(port_id, shared_shaper_id, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -1254,6 +1263,7 @@ static void cmd_add_port_tm_node_wred_profile_parsed(void *parsed_result,
return;
memset(&wp, 0, sizeof(struct rte_tm_wred_params));
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* WRED Params (Green Color)*/
color = RTE_TM_GREEN;
@@ -1369,6 +1379,7 @@ static void cmd_del_port_tm_node_wred_profile_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_wred_profile_delete(port_id, wred_profile_id, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -1455,6 +1466,7 @@ static void cmd_set_port_tm_node_shaper_profile_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (!port_is_started(port_id)) {
printf(" Port %u not started (error)\n", port_id);
@@ -1571,6 +1583,7 @@ static void cmd_add_port_tm_nonleaf_node_parsed(void *parsed_result,
return;
memset(&np, 0, sizeof(struct rte_tm_node_params));
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Node parameters */
if (res->parent_node_id < 0)
@@ -1729,6 +1742,7 @@ static void cmd_add_port_tm_leaf_node_parsed(void *parsed_result,
return;
memset(&np, 0, sizeof(struct rte_tm_node_params));
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Node parameters */
if (res->parent_node_id < 0)
@@ -1844,6 +1858,7 @@ static void cmd_del_port_tm_node_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (port_is_started(port_id)) {
printf(" Port %u not stopped (error)\n", port_id);
@@ -1933,6 +1948,7 @@ static void cmd_set_port_tm_node_parent_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
/* Port status */
if (!port_is_started(port_id)) {
printf(" Port %u not started (error)\n", port_id);
@@ -2008,6 +2024,7 @@ static void cmd_suspend_port_tm_node_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_node_suspend(port_id, node_id, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -2072,6 +2089,7 @@ static void cmd_resume_port_tm_node_parsed(void *parsed_result,
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_node_resume(port_id, node_id, &error);
if (ret != 0) {
print_err_msg(&error);
@@ -2143,6 +2161,7 @@ static void cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
else
clean_on_fail = 0;
+ memset(&error, 0, sizeof(struct rte_tm_error));
ret = rte_tm_hierarchy_commit(port_id, clean_on_fail, &error);
if (ret != 0) {
print_err_msg(&error);
--
2.18.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix help string for tm commit cmd
2018-07-25 12:41 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field Krzysztof Kanas
@ 2018-07-25 12:41 ` Krzysztof Kanas
2018-07-25 13:23 ` Iremonger, Bernard
2018-07-25 13:22 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field Iremonger, Bernard
1 sibling, 1 reply; 11+ messages in thread
From: Krzysztof Kanas @ 2018-07-25 12:41 UTC (permalink / raw)
To: Iremonger, Bernard, krzysztof.kanas, dev, Wenzhuo Lu, Jingjing Wu
Cc: Nithin Dabilpuram, Singh, Jasvinder
Fixes: 996cb153af06 ("app/testpmd: add commands for TM nodes and hierarchy commit")
Cc: jasvinder.singh@intel.com
Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
---
app/test-pmd/cmdline_tm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index 4f515241703a..09acc1b87293 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -2172,7 +2172,7 @@ static void cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
cmdline_parse_inst_t cmd_port_tm_hierarchy_commit = {
.f = cmd_port_tm_hierarchy_commit_parsed,
.data = NULL,
- .help_str = "Set port tm node shaper profile",
+ .help_str = "Commit port tm hierarchy",
.tokens = {
(void *)&cmd_port_tm_hierarchy_commit_port,
(void *)&cmd_port_tm_hierarchy_commit_tm,
--
2.18.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field
2018-07-25 12:41 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field Krzysztof Kanas
2018-07-25 12:41 ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix help string for tm commit cmd Krzysztof Kanas
@ 2018-07-25 13:22 ` Iremonger, Bernard
2018-07-26 17:36 ` Thomas Monjalon
1 sibling, 1 reply; 11+ messages in thread
From: Iremonger, Bernard @ 2018-07-25 13:22 UTC (permalink / raw)
To: Krzysztof Kanas, dev, Lu, Wenzhuo, Wu, Jingjing
Cc: Nithin Dabilpuram, Singh, Jasvinder, tdu
> -----Original Message-----
> From: Krzysztof Kanas [mailto:krzysztof.kanas@caviumnetworks.com]
> Sent: Wednesday, July 25, 2018 1:42 PM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>;
> krzysztof.kanas@caviumnetworks.com; dev@dpdk.org; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Nithin Dabilpuram <nithin.dabilpuram@cavium.com>; Singh, Jasvinder
> <jasvinder.singh@intel.com>; tdu@semihalf.com
> Subject: [PATCH v3 1/2] app/testpmd: fix use of uninitialized field
>
> print_err_msg uses message field that may be not initialized causing
> segmentation fault.
>
> Fixes: 12f76f5247e2 ("app/testpmd: add command to resume a TM node")
> Cc: tdu@semihalf.com
>
> Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
Acked-by: Bernard Iremonger <Bernard.iremonger@intel.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix help string for tm commit cmd
2018-07-25 12:41 ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix help string for tm commit cmd Krzysztof Kanas
@ 2018-07-25 13:23 ` Iremonger, Bernard
0 siblings, 0 replies; 11+ messages in thread
From: Iremonger, Bernard @ 2018-07-25 13:23 UTC (permalink / raw)
To: Krzysztof Kanas, dev, Lu, Wenzhuo, Wu, Jingjing
Cc: Nithin Dabilpuram, Singh, Jasvinder
> -----Original Message-----
> From: Krzysztof Kanas [mailto:krzysztof.kanas@caviumnetworks.com]
> Sent: Wednesday, July 25, 2018 1:42 PM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>;
> krzysztof.kanas@caviumnetworks.com; dev@dpdk.org; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Nithin Dabilpuram <nithin.dabilpuram@cavium.com>; Singh, Jasvinder
> <jasvinder.singh@intel.com>
> Subject: [PATCH v3 2/2] app/testpmd: fix help string for tm commit cmd
>
> Fixes: 996cb153af06 ("app/testpmd: add commands for TM nodes and
> hierarchy commit")
> Cc: jasvinder.singh@intel.com
>
> Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field
2018-07-25 13:22 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field Iremonger, Bernard
@ 2018-07-26 17:36 ` Thomas Monjalon
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2018-07-26 17:36 UTC (permalink / raw)
To: Krzysztof Kanas
Cc: dev, Iremonger, Bernard, Lu, Wenzhuo, Wu, Jingjing,
Nithin Dabilpuram, Singh, Jasvinder, tdu, cristian.dumitrescu
> > print_err_msg uses message field that may be not initialized causing
> > segmentation fault.
> >
> > Fixes: 12f76f5247e2 ("app/testpmd: add command to resume a TM node")
> > Cc: tdu@semihalf.com
> >
> > Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
>
> Acked-by: Bernard Iremonger <Bernard.iremonger@intel.com>
Series applied, thanks
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-07-26 17:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-10 6:50 [dpdk-dev] [PATCH 1/2] app/testpmd: fix use of uninitialized field Krzysztof Kanas
2018-07-10 6:51 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix help string for tm commit cmd Krzysztof Kanas
2018-07-18 8:51 ` Iremonger, Bernard
2018-07-18 9:54 ` [dpdk-dev] [PATCH v2 " Krzysztof Kanas
2018-07-24 9:08 ` Iremonger, Bernard
2018-07-25 12:41 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field Krzysztof Kanas
2018-07-25 12:41 ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix help string for tm commit cmd Krzysztof Kanas
2018-07-25 13:23 ` Iremonger, Bernard
2018-07-25 13:22 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix use of uninitialized field Iremonger, Bernard
2018-07-26 17:36 ` Thomas Monjalon
2018-07-18 8:40 ` [dpdk-dev] [PATCH " Iremonger, Bernard
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).