From patchwork Mon Jun 17 08:50:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huhai X-Patchwork-Id: 10998577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11CB119A2 for ; Mon, 17 Jun 2019 08:51:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0176C2886B for ; Mon, 17 Jun 2019 08:51:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E987F28872; Mon, 17 Jun 2019 08:51:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F0B22886B for ; Mon, 17 Jun 2019 08:51:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727996AbfFQIvf (ORCPT ); Mon, 17 Jun 2019 04:51:35 -0400 Received: from smtpbguseast2.qq.com ([54.204.34.130]:60895 "EHLO smtpbguseast2.qq.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727786AbfFQIvf (ORCPT ); Mon, 17 Jun 2019 04:51:35 -0400 X-QQ-mid: bizesmtp18t1560761442thywn1z2 Received: from localhost.localdomain (unknown [218.76.23.26]) by esmtp6.qq.com (ESMTP) with id ; Mon, 17 Jun 2019 16:50:36 +0800 (CST) X-QQ-SSF: 01400000002000E0IG32B00B0000000 X-QQ-FEAT: Y64gE3f4hx2VZWSorpWU6f/Tcvmvij4jr3FVv1Hv5zo1hj6fK0GYoGiEjS3es IhdC3LAOMs0g9z9xASaWqvfklLuauGxbzhC2aDWAnZKPndk0/2psSTnXjrztQdrL4Nt4X4R fcdp/2E2EeWbsW8twYAi8gDgcSG1rB4900UySaTxZ688lE6WASdaM3xn574Bh/B79CKIQk/ Z7LDU9ASeS0ks3zFfVcSjM92gXLqaw/G63i+l1RgM7w5AlWh48eelS7gt7DpYlLBz10bBQf YQX0ikNBGT+Y+/U2WoYE/KglhOudSfvBPL9e7pAAM5udMggw6nkYorgns= X-QQ-GoodBg: 2 From: huhai To: mst@redhat.com, jasowang@redhat.com Cc: kvm@vger.kernel.org, huhai Subject: [PATCH] vhost_net: remove wrong 'unlikely' check Date: Mon, 17 Jun 2019 16:50:29 +0800 Message-Id: <20190617085029.21730-1-huhai@kylinos.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:kylinos.cn:qybgforeign:qybgforeign2 X-QQ-Bgrelay: 1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit f9611c43ab0d ("vhost-net: enable zerocopy tx by default") experimental_zcopytx is set to true by default, so remove the unlikely check. Signed-off-by: huhai --- drivers/vhost/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 2d9df786a9d3..8c1dfd02372b 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -342,7 +342,7 @@ static bool vhost_net_tx_select_zcopy(struct vhost_net *net) static bool vhost_sock_zcopy(struct socket *sock) { - return unlikely(experimental_zcopytx) && + return experimental_zcopytx && sock_flag(sock->sk, SOCK_ZEROCOPY); }