* [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow
@ 2017-07-31 10:04 Jerin Jacob
2017-07-31 10:04 ` [dpdk-dev] [PATCH 2/2] app/testeventdev: fix a divide by zero case Jerin Jacob
2017-07-31 10:08 ` [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow Van Haaren, Harry
0 siblings, 2 replies; 5+ messages in thread
From: Jerin Jacob @ 2017-07-31 10:04 UTC (permalink / raw)
To: dev
Cc: thomas, bruce.richardson, harry.van.haaren, hemant.agrawal,
gage.eads, nipun.gupta, gprathyusha, Jerin Jacob, stable
Coverity issue: 158660
Fixes: 4afd440ec132 ("app/testeventdev: update options through command line")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
app/test-eventdev/evt_options.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c
index dbab8ea61..65e22f845 100644
--- a/app/test-eventdev/evt_options.c
+++ b/app/test-eventdev/evt_options.c
@@ -109,7 +109,7 @@ evt_parse_queue_priority(struct evt_options *opt, const char *arg __rte_unused)
static int
evt_parse_test_name(struct evt_options *opt, const char *arg)
{
- strcpy(opt->test_name, arg);
+ snprintf(opt->test_name, EVT_TEST_NAME_MAX_LEN, "%s", arg);
return 0;
}
--
2.13.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/2] app/testeventdev: fix a divide by zero case
2017-07-31 10:04 [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow Jerin Jacob
@ 2017-07-31 10:04 ` Jerin Jacob
2017-07-31 10:09 ` Van Haaren, Harry
2017-07-31 10:08 ` [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow Van Haaren, Harry
1 sibling, 1 reply; 5+ messages in thread
From: Jerin Jacob @ 2017-07-31 10:04 UTC (permalink / raw)
To: dev
Cc: thomas, bruce.richardson, harry.van.haaren, hemant.agrawal,
gage.eads, nipun.gupta, gprathyusha, Jerin Jacob, stable
pkts == 0 will result in divide by zero case.
Added a check to fix it.
Coverity issue: 158652
Fixes: 9d3aeb185eb4 ("app/testeventdev: launch perf lcores")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
app/test-eventdev/test_perf_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index a5b768c68..7b0929941 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -203,7 +203,7 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt,
perf_cycles = new_cycles;
total_mpps += mpps;
++samples;
- if (opt->fwd_latency) {
+ if (opt->fwd_latency && pkts > 0) {
printf(CLGRN"\r%.3f mpps avg %.3f mpps [avg fwd latency %.3f us] "CLNRM,
mpps, total_mpps/samples,
(float)(latency/pkts)/freq_mhz);
--
2.13.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] app/testeventdev: fix a divide by zero case
2017-07-31 10:04 ` [dpdk-dev] [PATCH 2/2] app/testeventdev: fix a divide by zero case Jerin Jacob
@ 2017-07-31 10:09 ` Van Haaren, Harry
0 siblings, 0 replies; 5+ messages in thread
From: Van Haaren, Harry @ 2017-07-31 10:09 UTC (permalink / raw)
To: Jerin Jacob, dev
Cc: thomas, Richardson, Bruce, hemant.agrawal, Eads, Gage,
nipun.gupta, gprathyusha, stable
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Monday, July 31, 2017 11:05 AM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; Richardson, Bruce <bruce.richardson@intel.com>; Van Haaren, Harry
> <harry.van.haaren@intel.com>; hemant.agrawal@nxp.com; Eads, Gage <gage.eads@intel.com>;
> nipun.gupta@nxp.com; gprathyusha@caviumnetworks.com; Jerin Jacob
> <jerin.jacob@caviumnetworks.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 2/2] app/testeventdev: fix a divide by zero case
>
> pkts == 0 will result in divide by zero case.
> Added a check to fix it.
>
> Coverity issue: 158652
> Fixes: 9d3aeb185eb4 ("app/testeventdev: launch perf lcores")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow
2017-07-31 10:04 [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow Jerin Jacob
2017-07-31 10:04 ` [dpdk-dev] [PATCH 2/2] app/testeventdev: fix a divide by zero case Jerin Jacob
@ 2017-07-31 10:08 ` Van Haaren, Harry
2017-07-31 20:41 ` Thomas Monjalon
1 sibling, 1 reply; 5+ messages in thread
From: Van Haaren, Harry @ 2017-07-31 10:08 UTC (permalink / raw)
To: Jerin Jacob, dev
Cc: thomas, Richardson, Bruce, hemant.agrawal, Eads, Gage,
nipun.gupta, gprathyusha, stable
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Monday, July 31, 2017 11:05 AM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; Richardson, Bruce <bruce.richardson@intel.com>; Van Haaren, Harry
> <harry.van.haaren@intel.com>; hemant.agrawal@nxp.com; Eads, Gage <gage.eads@intel.com>;
> nipun.gupta@nxp.com; gprathyusha@caviumnetworks.com; Jerin Jacob
> <jerin.jacob@caviumnetworks.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow
>
> Coverity issue: 158660
> Fixes: 4afd440ec132 ("app/testeventdev: update options through command line")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow
2017-07-31 10:08 ` [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow Van Haaren, Harry
@ 2017-07-31 20:41 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-07-31 20:41 UTC (permalink / raw)
To: Jerin Jacob
Cc: dev, Van Haaren, Harry, bruce.richardson, hemant.agrawal,
gage.eads, nipun.gupta, gprathyusha, stable
> > Coverity issue: 158660
> > Fixes: 4afd440ec132 ("app/testeventdev: update options through command line")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
>
> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Series applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-31 20:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-31 10:04 [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow Jerin Jacob
2017-07-31 10:04 ` [dpdk-dev] [PATCH 2/2] app/testeventdev: fix a divide by zero case Jerin Jacob
2017-07-31 10:09 ` Van Haaren, Harry
2017-07-31 10:08 ` [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow Van Haaren, Harry
2017-07-31 20:41 ` 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).