DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix uninitialized variable
@ 2017-09-22  7:18 Yong Wang
  2017-09-26 13:56 ` Wu, Jingjing
  0 siblings, 1 reply; 2+ messages in thread
From: Yong Wang @ 2017-09-22  7:18 UTC (permalink / raw)
  To: jingjing.wu; +Cc: dev, Yong Wang

In func i40evf_dev_link_update(), "new_link.link_autoneg" is used in
func call i40evf_dev_atomic_write_link_status(), but is uninitialized.

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 73c315a..3c0f436 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2218,6 +2218,7 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
 	new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
 	new_link.link_status = vf->link_up ? ETH_LINK_UP :
 					     ETH_LINK_DOWN;
+	new_link.link_autoneg = ETH_LINK_AUTONEG;
 
 	i40evf_dev_atomic_write_link_status(dev, &new_link);
 
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: fix uninitialized variable
  2017-09-22  7:18 [dpdk-dev] [PATCH] net/i40e: fix uninitialized variable Yong Wang
@ 2017-09-26 13:56 ` Wu, Jingjing
  0 siblings, 0 replies; 2+ messages in thread
From: Wu, Jingjing @ 2017-09-26 13:56 UTC (permalink / raw)
  To: Yong Wang; +Cc: dev



> -----Original Message-----
> From: Yong Wang [mailto:wang.yong19@zte.com.cn]
> Sent: Friday, September 22, 2017 3:18 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Yong Wang <wang.yong19@zte.com.cn>
> Subject: [PATCH] net/i40e: fix uninitialized variable
> 
> In func i40evf_dev_link_update(), "new_link.link_autoneg" is used in
> func call i40evf_dev_atomic_write_link_status(), but is uninitialized.
> 
> Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
> ---
>  drivers/net/i40e/i40e_ethdev_vf.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
> index 73c315a..3c0f436 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -2218,6 +2218,7 @@ static int eth_i40evf_pci_remove(struct rte_pci_device
> *pci_dev)
>  	new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
>  	new_link.link_status = vf->link_up ? ETH_LINK_UP :
>  					     ETH_LINK_DOWN;
> +	new_link.link_autoneg = ETH_LINK_AUTONEG;
> 
It is right, but it will be better to set it by checking (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED)?

And if your patch is fixing some issue, please add fixes line in your patch, and Cc: stable@dpdk.org


Thanks
Jingjing

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-26 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22  7:18 [dpdk-dev] [PATCH] net/i40e: fix uninitialized variable Yong Wang
2017-09-26 13:56 ` Wu, Jingjing

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).