From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 15D2FA00E6 for ; Fri, 9 Aug 2019 13:11:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DFB792AB; Fri, 9 Aug 2019 13:11:39 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id F13662AB for ; Fri, 9 Aug 2019 13:11:37 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Aug 2019 04:11:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,364,1559545200"; d="scan'208";a="374461001" Received: from dpdk-virtio-tbie-2.sh.intel.com ([10.67.104.71]) by fmsmga005.fm.intel.com with ESMTP; 09 Aug 2019 04:11:35 -0700 From: Tiwei Bie To: yskoh@mellanox.com, stable@dpdk.org Cc: maxime.coquelin@redhat.com, zhihong.wang@intel.com Date: Fri, 9 Aug 2019 19:09:04 +0800 Message-Id: <20190809110904.31669-1-tiwei.bie@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-stable] [PATCH 17.11] net/virtio: add barrier in interrupt enable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" [ backported from upstream commit 8f66bc4ac3c0d4a11252d860f495abd806aa871f ] Typically, after enabling Rx interrupt, a check should be done to make sure that there is no new incoming packets before going to sleep. So a barrier is needed to make sure that any following check won't happen before the interrupt is actually enabled. Fixes: c056be239db5 ("net/virtio: add Rx interrupt enable/disable functions") Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index b3e55ff3b..1bdf37e4b 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -739,6 +739,7 @@ virtio_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id) struct virtqueue *vq = rxvq->vq; virtqueue_enable_intr(vq); + virtio_mb(); return 0; } -- 2.17.1