aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2017-05-18 13:12:50 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2017-05-19 12:28:51 +0200
commite4562c78c0c5cb1a4080765925209fd23b8bc389 (patch)
treec96b8aa19b3cb29b2cf9834f15d95fcfef34264a /debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch
parent49290e33ba32abb8d61afa46a320ebaff14be321 (diff)
Add thunderx (LP: #1691659)
To make arm support useful on more devices add, enable and fix thunderx networking - that is the nicvf pmd (LP: #1691659) Change-Id: I17f1d6d63d31df05f1af09054ffddcb478c54dd3 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch')
-rw-r--r--debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch b/debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch
new file mode 100644
index 00000000..8773671b
--- /dev/null
+++ b/debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch
@@ -0,0 +1,58 @@
+From b31eb105463fa1844c19fde382dd6bd294329831 Mon Sep 17 00:00:00 2001
+From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
+Date: Tue, 2 May 2017 00:11:55 +0530
+Subject: [PATCH] net/thunderx: fix deadlock in Rx path
+
+RBDR buffers are refilled when SW consumes the buffers from CQ.
+This creates deadlock case when CQ buffers exhausted due to lack
+of RBDR buffers. Fix is to refill the RBDR when rx_free_thresh
+meet, irrespective of the number of CQ buffers consumed.
+
+Fixes: e2d7fc9f0a24 ("net/thunderx: add single and multi-segment Rx")
+Cc: stable@dpdk.org
+
+Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
+---
+ drivers/net/thunderx/nicvf_rxtx.c | 18 ++++++++----------
+ 1 file changed, 8 insertions(+), 10 deletions(-)
+
+Origin: http://dpdk.org/browse/dpdk/commit/?id=b31eb105463fa1844c19fde382dd6bd294329831
+Original-Author: Jerin Jacob <jerin.jacob@caviumnetworks.com>
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659
+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+Last-Update: 2017-05-18
+
+--- a/drivers/net/thunderx/nicvf_rxtx.c
++++ b/drivers/net/thunderx/nicvf_rxtx.c
+@@ -469,11 +469,10 @@
+ rxq->head = cqe_head;
+ nicvf_addr_write(rxq->cq_door, to_process);
+ rxq->recv_buffers += to_process;
+- if (rxq->recv_buffers > rxq->rx_free_thresh) {
+- rxq->recv_buffers -= nicvf_fill_rbdr(rxq,
+- rxq->rx_free_thresh);
+- NICVF_RX_ASSERT(rxq->recv_buffers >= 0);
+- }
++ }
++ if (rxq->recv_buffers > rxq->rx_free_thresh) {
++ rxq->recv_buffers -= nicvf_fill_rbdr(rxq, rxq->rx_free_thresh);
++ NICVF_RX_ASSERT(rxq->recv_buffers >= 0);
+ }
+
+ return to_process;
+@@ -563,11 +562,10 @@
+ rxq->head = cqe_head;
+ nicvf_addr_write(rxq->cq_door, to_process);
+ rxq->recv_buffers += buffers_consumed;
+- if (rxq->recv_buffers > rxq->rx_free_thresh) {
+- rxq->recv_buffers -=
+- nicvf_fill_rbdr(rxq, rxq->rx_free_thresh);
+- NICVF_RX_ASSERT(rxq->recv_buffers >= 0);
+- }
++ }
++ if (rxq->recv_buffers > rxq->rx_free_thresh) {
++ rxq->recv_buffers -= nicvf_fill_rbdr(rxq, rxq->rx_free_thresh);
++ NICVF_RX_ASSERT(rxq->recv_buffers >= 0);
+ }
+
+ return to_process;