summaryrefslogtreecommitdiffstats
path: root/dpdk/dpdk-16.04_patches/0019-enic-fix-Rx-queue-initialization-after-restarting-a-.patch
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-07-04 23:23:32 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2016-07-05 16:21:35 +0000
commit55bf5c938585f0cc91b848ec37a5abfaf01f9515 (patch)
treedb08c0efcf55a9d13905616af27a8f819c2dc1c2 /dpdk/dpdk-16.04_patches/0019-enic-fix-Rx-queue-initialization-after-restarting-a-.patch
parentf727db9e6fb50b2930aedf18bcdda55fe0b96889 (diff)
ENIC driver patches to address various issues
Also clear x-bit for old patch files 0013-xxx and 0014-xxx. Change-Id: I217fdbfb32cef1ae575c668270d3baf593e688c6 Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'dpdk/dpdk-16.04_patches/0019-enic-fix-Rx-queue-initialization-after-restarting-a-.patch')
-rw-r--r--dpdk/dpdk-16.04_patches/0019-enic-fix-Rx-queue-initialization-after-restarting-a-.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/dpdk/dpdk-16.04_patches/0019-enic-fix-Rx-queue-initialization-after-restarting-a-.patch b/dpdk/dpdk-16.04_patches/0019-enic-fix-Rx-queue-initialization-after-restarting-a-.patch
new file mode 100644
index 00000000000..3e1074862c9
--- /dev/null
+++ b/dpdk/dpdk-16.04_patches/0019-enic-fix-Rx-queue-initialization-after-restarting-a-.patch
@@ -0,0 +1,37 @@
+From 8d336ba9cbcb4832b992201497afe07afcd4f2e1 Mon Sep 17 00:00:00 2001
+From: John Daley <johndale@cisco.com>
+Date: Fri, 1 Jul 2016 12:32:45 -0700
+Subject: [PATCH 19/25] enic: fix Rx queue initialization after restarting a
+ device
+
+If you stop then start a port that had already received some packets,
+the NIC could fetch discriptors from the wrong location. This could
+effectivly reduce the size of the Rx queue by a random amount and
+cause packet drop or reduced performance.
+
+Reset the NIC fetch index to 0 when allocating and posting mbuf
+addresses to the NIC.
+
+Fixes: 947d860c821f ("enic: improve Rx performance")
+
+Signed-off-by: John Daley <johndale@cisco.com>
+Reviewed-by: Nelson Escobar <neescoba@cisco.com>
+---
+ drivers/net/enic/enic_main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
+index be17707..68532d3 100644
+--- a/drivers/net/enic/enic_main.c
++++ b/drivers/net/enic/enic_main.c
+@@ -346,6 +346,7 @@ enic_alloc_rx_queue_mbufs(struct enic *enic, struct vnic_rq *rq)
+ dev_debug(enic, "port=%u, qidx=%u, Write %u posted idx, %u sw held\n",
+ enic->port_id, rq->index, rq->posted_index, rq->rx_nb_hold);
+ iowrite32(rq->posted_index, &rq->ctrl->posted_index);
++ iowrite32(0, &rq->ctrl->fetch_index);
+ rte_rmb();
+
+ // printf("posted %d buffers to %s rq\n", rq->ring.desc_count,
+--
+2.7.0
+