patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Jiayu Hu <jiayu.hu@intel.com>
Cc: Yinan Wang <yinan.wang@intel.com>,
	Tiwei Bie <tiwei.bie@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'vhost: fix interrupt suppression for the split ring' has been queued to LTS release 18.11.2
Date: Tue, 16 Apr 2019 15:36:49 +0100	[thread overview]
Message-ID: <20190416143719.21601-31-ktraynor@redhat.com> (raw)
In-Reply-To: <20190416143719.21601-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/24/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Kevin Traynor

---
From 771777c9191f025077b60ee93d5d747f7e63d571 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Sun, 17 Mar 2019 14:38:32 +0800
Subject: [PATCH] vhost: fix interrupt suppression for the split ring

[ upstream commit 2f706027c8ee1bfcf4895cc35a42f0d2270dc819 ]

The VIRTIO_RING_F_EVENT_IDX feature of split ring might
be broken, as the value of signalled_used is invalid
after live migration, start up and virtio driver reload.
This patch fixes it by using signalled_used_valid.

In addition, this patch makes the VIRTIO_RING_F_EVENT_IDX
implementation of split ring match kernel backend to suppress
more interrupts.

Fixes: e37ff954405a ("vhost: support virtqueue interrupt/notification suppression")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/vhost.h      | 12 ++++++++----
 lib/librte_vhost/vhost_user.c |  2 ++
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 0f9fc9edd..bb9cff9f7 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -687,4 +687,8 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 		uint16_t old = vq->signalled_used;
 		uint16_t new = vq->last_used_idx;
+		bool signalled_used_valid = vq->signalled_used_valid;
+
+		vq->signalled_used = new;
+		vq->signalled_used_valid = true;
 
 		VHOST_LOG_DEBUG(VHOST_DATA, "%s: used_event_idx=%d, old=%d, new=%d\n",
@@ -692,9 +696,9 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 			vhost_used_event(vq),
 			old, new);
-		if (vhost_need_event(vhost_used_event(vq), new, old)
-			&& (vq->callfd >= 0)) {
-			vq->signalled_used = vq->last_used_idx;
+
+		if ((vhost_need_event(vhost_used_event(vq), new, old) &&
+					(vq->callfd >= 0)) ||
+				unlikely(!signalled_used_valid))
 			eventfd_write(vq->callfd, (eventfd_t) 1);
-		}
 	} else {
 		/* Kick the guest if necessary. */
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 2d1123e60..7952ef700 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1299,4 +1299,6 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
 	vq->callfd = VIRTIO_UNINITIALIZED_EVENTFD;
 
+	vq->signalled_used_valid = false;
+
 	if (dev->dequeue_zero_copy)
 		free_zmbufs(vq);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.574932928 +0100
+++ 0031-vhost-fix-interrupt-suppression-for-the-split-ring.patch	2019-04-16 15:34:25.177180016 +0100
@@ -1,8 +1,10 @@
-From 2f706027c8ee1bfcf4895cc35a42f0d2270dc819 Mon Sep 17 00:00:00 2001
+From 771777c9191f025077b60ee93d5d747f7e63d571 Mon Sep 17 00:00:00 2001
 From: Jiayu Hu <jiayu.hu@intel.com>
 Date: Sun, 17 Mar 2019 14:38:32 +0800
 Subject: [PATCH] vhost: fix interrupt suppression for the split ring
 
+[ upstream commit 2f706027c8ee1bfcf4895cc35a42f0d2270dc819 ]
+
 The VIRTIO_RING_F_EVENT_IDX feature of split ring might
 be broken, as the value of signalled_used is invalid
 after live migration, start up and virtio driver reload.
@@ -13,7 +15,6 @@
 more interrupts.
 
 Fixes: e37ff954405a ("vhost: support virtqueue interrupt/notification suppression")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
 Tested-by: Yinan Wang <yinan.wang@intel.com>
@@ -24,10 +25,10 @@
  2 files changed, 10 insertions(+), 4 deletions(-)
 
 diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
-index f008ec43b..e9138dfab 100644
+index 0f9fc9edd..bb9cff9f7 100644
 --- a/lib/librte_vhost/vhost.h
 +++ b/lib/librte_vhost/vhost.h
-@@ -634,4 +634,8 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -687,4 +687,8 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
  		uint16_t old = vq->signalled_used;
  		uint16_t new = vq->last_used_idx;
 +		bool signalled_used_valid = vq->signalled_used_valid;
@@ -36,7 +37,7 @@
 +		vq->signalled_used_valid = true;
  
  		VHOST_LOG_DEBUG(VHOST_DATA, "%s: used_event_idx=%d, old=%d, new=%d\n",
-@@ -639,9 +643,9 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -692,9 +696,9 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
  			vhost_used_event(vq),
  			old, new);
 -		if (vhost_need_event(vhost_used_event(vq), new, old)
@@ -51,7 +52,7 @@
  	} else {
  		/* Kick the guest if necessary. */
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index 555d09ad9..4f215769f 100644
+index 2d1123e60..7952ef700 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
 @@ -1299,4 +1299,6 @@ vhost_user_get_vring_base(struct virtio_net **pdev,

  parent reply	other threads:[~2019-04-16 14:38 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'common/cpt: fix null auth only' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'crypto/openssl: fix big numbers after computations' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'crypto/openssl: fix modexp' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'test/crypto: fix duplicate id used by CCP device' " Kevin Traynor
2019-04-17  6:55   ` [dpdk-stable] [EXT] " Hemant Agrawal
2019-04-16 14:36 ` [dpdk-stable] patch 'event/opdl: replace sprintf with snprintf' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix setting MAC address' " Kevin Traynor
2019-04-23 10:24   ` Pablo Cascón
2019-04-23 13:03     ` Kevin Traynor
2019-04-23 13:35       ` Pablo Cascón
2019-04-25 16:02         ` Kevin Traynor
2019-04-26  9:26           ` Pablo Cascón
2019-04-26  9:32             ` Kevin Traynor
2019-04-26 10:00               ` Pablo Cascón
2019-04-16 14:36 ` [dpdk-stable] patch 'net/i40e: fix time sync for 25G' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/qede: support IOVA VA mode' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/mlx5: fix packet inline on Tx queue wraparound' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bnxt: silence IOVA warnings' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bnxt: suppress spurious error log' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix RSS query' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/ixgbe: restore VLAN filter for VF' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: remove unused field from port struct' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: fix a typo in log message' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'ethdev: fix method name in doxygen comment' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/qede: fix Rx packet drop' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix negative error codes' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: remove unused variable' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: remove extra checks for error codes' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix buffer overflow' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix EEPROM get for small and uneven lengths' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix link configuration' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix missing VLAN filter offload' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix xstats return' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/enic: fix max MTU calculation' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/octeontx: fix vdev name' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'vhost: prevent disabled rings to be processed with zero-copy' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/virtio-user: fix multiqueue with vhost kernel' " Kevin Traynor
2019-04-16 14:36 ` Kevin Traynor [this message]
2019-04-16 14:36 ` [dpdk-stable] patch 'net/virtio: add barrier in interrupt enable' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: fix stdout flush after printing stats' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix possible buffer overflow' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/tap: fix getting max iovec' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/sfc: fix speed capabilities reported in device info' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix LACP negotiation' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/cxgbe: fix missing checksum flags and packet type' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'doc: fix examples in bonding guide' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix port id types' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix slave " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'net/bonding: fix packet count type for LACP' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'net/bonding: fix queue index types' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'drivers/net: fix possible overflow using strlcat' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'compress/qat: fix setup inter buffers' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix AES-CTR block size' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix debug logs' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'cryptodev: fix driver name comparison' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'test/crypto: fix possible overflow using strlcat' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'build: remove meson warning for Arm' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'doc: update cross Arm toolchain in Linux guide' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'acl: fix compiler flags with meson and AVX2 runtime' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'malloc: fix documentation of realloc function' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'eal/linux: fix log levels for pagemap reading failure' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'ring: enforce reading tail before slots' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'test/spinlock: remove delay for correct benchmarking' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'test/spinlock: amortize the cost of getting time' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'spinlock: reimplement with atomic one-way barrier' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'rwlock: reimplement with atomic builtins' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'eal/ppc: fix global memory barrier' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'vfio: document multiprocess limitation for container API' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190416143719.21601-31-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=jiayu.hu@intel.com \
    --cc=stable@dpdk.org \
    --cc=tiwei.bie@intel.com \
    --cc=yinan.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).