* [dpdk-dev] [PATCH] examples/ethtool: fix bug in drvinfo callback
@ 2016-11-18 9:40 Qiming Yang
2016-11-22 1:41 ` [dpdk-dev] [PATCH v2] " Qiming Yang
0 siblings, 1 reply; 4+ messages in thread
From: Qiming Yang @ 2016-11-18 9:40 UTC (permalink / raw)
To: dev; +Cc: remy.horton, Qiming Yang
Function pcmd_drvinfo_callback uses struct info to get
the ethtool infomation of each port. Struct info will
store the infomation of previous port until this
infomation be updated. This patch fixes this issue.
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
examples/ethtool/ethtool-app/ethapp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c
index 9b77385..192d941 100644
--- a/examples/ethtool/ethtool-app/ethapp.c
+++ b/examples/ethtool/ethtool-app/ethapp.c
@@ -177,6 +177,7 @@ pcmd_drvinfo_callback(__rte_unused void *ptr_params,
int id_port;
for (id_port = 0; id_port < rte_eth_dev_count(); id_port++) {
+ memset(&info, 0, sizeof(info));
if (rte_ethtool_get_drvinfo(id_port, &info)) {
printf("Error getting info for port %i\n", id_port);
return;
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] examples/ethtool: fix bug in drvinfo callback
2016-11-18 9:40 [dpdk-dev] [PATCH] examples/ethtool: fix bug in drvinfo callback Qiming Yang
@ 2016-11-22 1:41 ` Qiming Yang
2016-11-23 1:00 ` Remy Horton
0 siblings, 1 reply; 4+ messages in thread
From: Qiming Yang @ 2016-11-22 1:41 UTC (permalink / raw)
To: dev; +Cc: remy.horton, Qiming Yang
Function pcmd_drvinfo_callback uses struct info to get
the ethtool information of each port. Struct info will
store the information of previous port until this
information be updated. This patch fixes this issue.
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
v2 changes:
* fixed the spelling mistake in commit log
---
---
examples/ethtool/ethtool-app/ethapp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c
index 9b77385..192d941 100644
--- a/examples/ethtool/ethtool-app/ethapp.c
+++ b/examples/ethtool/ethtool-app/ethapp.c
@@ -177,6 +177,7 @@ pcmd_drvinfo_callback(__rte_unused void *ptr_params,
int id_port;
for (id_port = 0; id_port < rte_eth_dev_count(); id_port++) {
+ memset(&info, 0, sizeof(info));
if (rte_ethtool_get_drvinfo(id_port, &info)) {
printf("Error getting info for port %i\n", id_port);
return;
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/ethtool: fix bug in drvinfo callback
2016-11-22 1:41 ` [dpdk-dev] [PATCH v2] " Qiming Yang
@ 2016-11-23 1:00 ` Remy Horton
2016-12-20 17:21 ` Thomas Monjalon
0 siblings, 1 reply; 4+ messages in thread
From: Remy Horton @ 2016-11-23 1:00 UTC (permalink / raw)
To: Qiming Yang, dev
Not sure this is a problem in practice, as the same set if fields is
updated each time...at least for now.
On 22/11/2016 09:41, Qiming Yang wrote:
> Function pcmd_drvinfo_callback uses struct info to get
> the ethtool information of each port. Struct info will
> store the information of previous port until this
> information be updated. This patch fixes this issue.
>
> Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
>
> Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/ethtool: fix bug in drvinfo callback
2016-11-23 1:00 ` Remy Horton
@ 2016-12-20 17:21 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2016-12-20 17:21 UTC (permalink / raw)
To: Qiming Yang; +Cc: dev, Remy Horton
2016-11-23 09:00, Remy Horton:
> Not sure this is a problem in practice, as the same set if fields is
> updated each time...at least for now.
>
> On 22/11/2016 09:41, Qiming Yang wrote:
> > Function pcmd_drvinfo_callback uses struct info to get
> > the ethtool information of each port. Struct info will
> > store the information of previous port until this
> > information be updated. This patch fixes this issue.
> >
> > Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
> >
> > Signed-off-by: Qiming Yang <qiming.yang@intel.com>
>
> Acked-by: Remy Horton <remy.horton@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-20 17:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 9:40 [dpdk-dev] [PATCH] examples/ethtool: fix bug in drvinfo callback Qiming Yang
2016-11-22 1:41 ` [dpdk-dev] [PATCH v2] " Qiming Yang
2016-11-23 1:00 ` Remy Horton
2016-12-20 17:21 ` 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).