* [dpdk-dev] [PATCH] net/liquidio: fix uninitialized variable
@ 2017-09-15 2:32 Yong Wang
2017-09-15 11:27 ` Shijith Thotton
0 siblings, 1 reply; 2+ messages in thread
From: Yong Wang @ 2017-09-15 2:32 UTC (permalink / raw)
To: shijith.thotton; +Cc: dev, Yong Wang
In func lio_dev_link_update(), "link.link_autoneg" is used in func call
lio_dev_atomic_write_link_status(), but is uninitialized.
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
---
drivers/net/liquidio/lio_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index 479936a..a5a71f8 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -939,6 +939,7 @@ struct rte_lio_xstats_name_off {
link.link_status = ETH_LINK_DOWN;
link.link_speed = ETH_SPEED_NUM_NONE;
link.link_duplex = ETH_LINK_HALF_DUPLEX;
+ link.link_autoneg = ETH_LINK_FIXED;
memset(&old, 0, sizeof(old));
/* Return what we found */
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/liquidio: fix uninitialized variable
2017-09-15 2:32 [dpdk-dev] [PATCH] net/liquidio: fix uninitialized variable Yong Wang
@ 2017-09-15 11:27 ` Shijith Thotton
0 siblings, 0 replies; 2+ messages in thread
From: Shijith Thotton @ 2017-09-15 11:27 UTC (permalink / raw)
To: Yong Wang; +Cc: shijith.thotton, dev
On Thu, Sep 14, 2017 at 10:32:59PM -0400, Yong Wang wrote:
> In func lio_dev_link_update(), "link.link_autoneg" is used in func call
> lio_dev_atomic_write_link_status(), but is uninitialized.
>
> Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
> ---
> drivers/net/liquidio/lio_ethdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
> index 479936a..a5a71f8 100644
> --- a/drivers/net/liquidio/lio_ethdev.c
> +++ b/drivers/net/liquidio/lio_ethdev.c
> @@ -939,6 +939,7 @@ struct rte_lio_xstats_name_off {
> link.link_status = ETH_LINK_DOWN;
> link.link_speed = ETH_SPEED_NUM_NONE;
> link.link_duplex = ETH_LINK_HALF_DUPLEX;
> + link.link_autoneg = ETH_LINK_FIXED;
Thanks for noting. Proper value would be ETH_LINK_AUTONEG as we negotiate speed
in firmware.
> memset(&old, 0, sizeof(old));
>
> /* Return what we found */
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-15 11:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 2:32 [dpdk-dev] [PATCH] net/liquidio: fix uninitialized variable Yong Wang
2017-09-15 11:27 ` Shijith Thotton
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).