DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] net/avf: fix uninitialized variables issue
@ 2018-01-30  3:32 Jingjing Wu
  2018-01-31 19:20 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Jingjing Wu @ 2018-01-30  3:32 UTC (permalink / raw)
  To: wenzhuo.lu; +Cc: jingjing.wu, dev

This patch fixes the coverity UNINIT issue.

Coverity issue: 257016, 257036
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---

v2 change:
 - add fix for 257016

 drivers/net/avf/avf_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index cf7bbb2..7eacb8f 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -191,7 +191,7 @@ avf_init_rss(struct avf_adapter *adapter)
 				   vf->vf_res->rss_key_size));
 
 	/* init RSS LUT table */
-	for (i = 0; i < vf->vf_res->rss_lut_size; i++, j++) {
+	for (i = 0, j = 0; i < vf->vf_res->rss_lut_size; i++, j++) {
 		if (j >= nb_q)
 			j = 0;
 		vf->rss_lut[i] = j;
@@ -760,10 +760,10 @@ avf_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 			err = avf_enable_vlan_strip(adapter);
 		else
 			err = avf_disable_vlan_strip(adapter);
-	}
 
-	if (err)
-		return -EIO;
+		if (err)
+			return -EIO;
+	}
 	return 0;
 }
 
-- 
2.4.11

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

* Re: [dpdk-dev] [PATCH v2] net/avf: fix uninitialized variables issue
  2018-01-30  3:32 [dpdk-dev] [PATCH v2] net/avf: fix uninitialized variables issue Jingjing Wu
@ 2018-01-31 19:20 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2018-01-31 19:20 UTC (permalink / raw)
  To: Jingjing Wu, wenzhuo.lu; +Cc: dev

On 1/30/2018 3:32 AM, Jingjing Wu wrote:
> This patch fixes the coverity UNINIT issue.
> 
> Coverity issue: 257016, 257036
> Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
> 
> Reported-by: John McNamara <john.mcnamara@intel.com>
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2018-01-31 19:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30  3:32 [dpdk-dev] [PATCH v2] net/avf: fix uninitialized variables issue Jingjing Wu
2018-01-31 19:20 ` Ferruh Yigit

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