aboutsummaryrefslogtreecommitdiffstats
path: root/dpdk/dpdk-16.04_patches/0031-enic-fix-bug-introduced-with-scatter-rx.patch
blob: 88586ebc238000a7146d3e879fb9972c6ba06908 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
commit f0ca43396ebeb85228f9737a52caa68fc06aa9ee
Author: Nelson Escobar <neescoba@cisco.com>
Date:   Mon Jun 13 17:24:41 2016 -0700

    enic: fix bug introduced with scatter rx
    
    We did not properly set the rq pointers we pass up to dpdk when
    rx scatter was introduced.  This resulted in segfaults whenever
    more than one rq was being used.

diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index e5b84e1..66fddb1 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -279,7 +279,8 @@ static int enicpmd_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
 		return -EINVAL;
 	}
 
-	eth_dev->data->rx_queues[queue_idx] = (void *)&enic->rq[queue_idx];
+	eth_dev->data->rx_queues[queue_idx] =
+		(void *)&enic->rq[enic_sop_rq(enic, queue_idx)];
 
 	ret = enic_alloc_rq(enic, queue_idx, socket_id, mp, nb_desc);
 	if (ret) {