Thread (45 messages) 45 messages, 4 authors, 2017-02-02
STALE3426d

[PATCH 3/6] net/tap: don't set fd value overwritten just below

From: Pascal Mazon <hidden>
Date: 2017-01-31 09:44:55
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

pmd->fds[0], pmd->rxq[0] and pmd->txq[0] are set a couple of lines after
the for loop that initializes them to -1.

Signed-off-by: Pascal Mazon <redacted>
---
 drivers/net/tap/rte_eth_tap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 4cc1767da5e8..3d15031008c6 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -643,7 +643,7 @@ eth_dev_tap_create(const char *name, char *tap_name)
 	}
 
 	/* Presetup the fds to -1 as being not working */
-	for (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {
+	for (i = 1; i < RTE_PMD_TAP_MAX_QUEUES; i++) {
 		pmd->fds[i] = -1;
 		pmd->rxq[i].fd = -1;
 		pmd->txq[i].fd = -1;
-- 
2.8.0.rc0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help