From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 917145A6A for ; Thu, 24 Jan 2019 17:59:23 +0100 (CET) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190124165923euoutp02cbefdeeaddaea9357529754d61df67a6~811xTgdEd1875018750euoutp02c for ; Thu, 24 Jan 2019 16:59:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190124165923euoutp02cbefdeeaddaea9357529754d61df67a6~811xTgdEd1875018750euoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1548349163; bh=2u37m1MLaIa6aRG9bUA55Ahp1tUHqg9cnA3Gg5haU1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GvHmM2WucLdOjH7rMG56q+bp+99kbUmVCTiEaZZWv9MAS41PlIevqL7bfI6dKoVDt lcB/QlVLQbS1L9AKcEjizn6F7bbH5cEro7fzw+eMXDejde0Nkr+pxanORRdk80fluy OG7a1w9es5INTlIi8aWu9AZbf0cjVdytEsuBOKyM= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190124165922eucas1p2581104aa20f76492e3828ebe759b4b51~811ws0m0A0263702637eucas1p2S; Thu, 24 Jan 2019 16:59:22 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 8A.62.04294.AEEE94C5; Thu, 24 Jan 2019 16:59:22 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190124165921eucas1p1fee7e668285fc26bc4f01c6b5ec0b66a~811v1cUFO1987719877eucas1p1k; Thu, 24 Jan 2019 16:59:21 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190124165921eusmtrp1fe2a97d4c0052aac0e1b42005d1af1c9~811vm3cqM2842328423eusmtrp1K; Thu, 24 Jan 2019 16:59:21 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-32-5c49eeea3099 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id BC.FF.04284.9EEE94C5; Thu, 24 Jan 2019 16:59:21 +0000 (GMT) Received: from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190124165920eusmtip29ef83526cfd19b46a1ad8e83a9f51849~811unSbqf1449914499eusmtip2K; Thu, 24 Jan 2019 16:59:20 +0000 (GMT) From: Ilya Maximets To: dev@dpdk.org, Maxime Coquelin , "Michael S . Tsirkin" Cc: Tiwei Bie , Zhihong Wang , Jens Freimann , Ilya Maximets , stable@dpdk.org Date: Thu, 24 Jan 2019 19:59:02 +0300 Message-Id: <20190124165902.24178-4-i.maximets@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190124165902.24178-1-i.maximets@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFIsWRmVeSWpSXmKPExsWy7djP87qv3nnGGJxeqGDx7tN2Josr7T/Z Lc6tWcpicaxzD4vF/1+vWC3+dfxht9ja8J/JYvPFSUwOHB6/Fixl9Vi85yWTx/t9V9k8+ras YgxgieKySUnNySxLLdK3S+DKmPh6K0vBPfaKLT05DYzH2LoYOTgkBEwkth7U72Lk4hASWMEo sezQAzYI5wujxPwFy9i7GDmBnM+MEjfuaoDYIA0vv75hhihazijx6X4XE4Tzg1Fi2ySQsZwc bAI6EqdWH2EEsUUEMiRO3n7OCFLELLCWUeJs5xMmkISwgI/Es4XXwGwWAVWJw99/MIPYvALW El2LLzJCrJOXWL3hAFicU8BG4vP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GCg1lJhNf1oluMEG9KYmVValF+fFFpTmrxIUZToKMmMkuJJucDIyqvJN7Q1NDcwtLQ 3Njc2MxCSZz3vEFllJBAemJJanZqakFqEUwfEwenVANjiVD7sVx74e5YYaZpn69XfdOwPLjk zQYdtQkFfiYKHbnF7QpPX+/ONWX7LLpMuNgjf3fzp37elJM35CyrLKeu8Dt439/49rULL9Yc W6VUmnfsl9e3qU17piT6iYdN1y1xKtp8/1D4sahg149TOnp4NgVG/bN70szy9HbhOgNucwnh bjOlReJKLMUZiYZazEXFiQATXqhvcAIAAA== X-CMS-MailID: 20190124165921eucas1p1fee7e668285fc26bc4f01c6b5ec0b66a X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190124165921eucas1p1fee7e668285fc26bc4f01c6b5ec0b66a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190124165921eucas1p1fee7e668285fc26bc4f01c6b5ec0b66a References: <20190124165902.24178-1-i.maximets@samsung.com> Subject: [dpdk-stable] [PATCH 3/3] net/virtio: add missing read barrier for packed dequeue 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: , X-List-Received-Date: Thu, 24 Jan 2019 16:59:23 -0000 Read barrier is required between reading the flags (desc_is_used) and the content of descriptor to ensure the ordering. Otherwise, speculative read of desc.id could be reordered with reading of the desc.flags. Fixes: a76290c8f1cf ("net/virtio: implement Rx path for packed queues") Cc: stable@dpdk.org Signed-off-by: Ilya Maximets --- drivers/net/virtio/virtio_rxtx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 5ffed6a51..4c701c514 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -124,6 +124,7 @@ virtqueue_dequeue_burst_rx_packed(struct virtqueue *vq, used_idx = vq->vq_used_cons_idx; if (!desc_is_used(&desc[used_idx], vq)) return i; + virtio_rmb(vq->hw->weak_barriers); len[i] = desc[used_idx].len; id = desc[used_idx].id; cookie = (struct rte_mbuf *)vq->vq_descx[id].cookie; -- 2.17.1