summaryrefslogtreecommitdiffstats
path: root/dpdk/dpdk-16.04_patches/0018-enic-fix-segfault-on-Tx-path-after-restarting-a-devi.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/0018-enic-fix-segfault-on-Tx-path-after-restarting-a-devi.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/0018-enic-fix-segfault-on-Tx-path-after-restarting-a-devi.patch')
-rw-r--r--dpdk/dpdk-16.04_patches/0018-enic-fix-segfault-on-Tx-path-after-restarting-a-devi.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/dpdk/dpdk-16.04_patches/0018-enic-fix-segfault-on-Tx-path-after-restarting-a-devi.patch b/dpdk/dpdk-16.04_patches/0018-enic-fix-segfault-on-Tx-path-after-restarting-a-devi.patch
new file mode 100644
index 00000000000..10b66375b44
--- /dev/null
+++ b/dpdk/dpdk-16.04_patches/0018-enic-fix-segfault-on-Tx-path-after-restarting-a-devi.patch
@@ -0,0 +1,46 @@
+From 60971e62dcbb50a7ef1c3839e8b33b5aef6a48fe Mon Sep 17 00:00:00 2001
+From: John Daley <johndale@cisco.com>
+Date: Fri, 1 Jul 2016 12:24:45 -0700
+Subject: [PATCH 18/25] enic: fix segfault on Tx path after restarting a device
+
+If you stop then start a port that had already sent some packets,
+there was a segfault due to not resetting the number of completed
+sends to zero.
+
+Fixes: d5d882fe1a11 ("Tx path rewrite to reduce Host CPU overhead")
+
+Signed-off-by: Nelson Escobar <neescoba@cisco.com>
+Reviewed-by: John Daley <johndale@cisco.com>
+---
+ drivers/net/enic/base/vnic_wq.c | 2 ++
+ drivers/net/enic/base/vnic_wq.h | 1 +
+ 2 files changed, 3 insertions(+)
+
+diff --git a/drivers/net/enic/base/vnic_wq.c b/drivers/net/enic/base/vnic_wq.c
+index ccbbd61..7026bfe 100644
+--- a/drivers/net/enic/base/vnic_wq.c
++++ b/drivers/net/enic/base/vnic_wq.c
+@@ -206,6 +206,8 @@ void vnic_wq_clean(struct vnic_wq *wq,
+
+ wq->head_idx = 0;
+ wq->tail_idx = 0;
++ wq->last_completed_index = 0;
++ *((uint32_t *)wq->cqmsg_rz->addr) = 0;
+
+ iowrite32(0, &wq->ctrl->fetch_index);
+ iowrite32(0, &wq->ctrl->posted_index);
+diff --git a/drivers/net/enic/base/vnic_wq.h b/drivers/net/enic/base/vnic_wq.h
+index 37c3ff9..faf3bfa 100644
+--- a/drivers/net/enic/base/vnic_wq.h
++++ b/drivers/net/enic/base/vnic_wq.h
+@@ -38,6 +38,7 @@
+
+ #include "vnic_dev.h"
+ #include "vnic_cq.h"
++#include <rte_memzone.h>
+
+ /* Work queue control */
+ struct vnic_wq_ctrl {
+--
+2.7.0
+