From patchwork Thu Dec 21 21:21:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 852140 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z2l3Q3gBhz9s84 for ; Fri, 22 Dec 2017 08:22:39 +1100 (AEDT) Received: from localhost ([::1]:42069 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eS8IX-0000hX-VK for incoming@patchwork.ozlabs.org; Thu, 21 Dec 2017 16:22:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eS8Ho-0000fZ-5y for qemu-devel@nongnu.org; Thu, 21 Dec 2017 16:21:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eS8Hl-0000Q2-2q for qemu-devel@nongnu.org; Thu, 21 Dec 2017 16:21:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35542) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eS8Hk-0000PR-Tq for qemu-devel@nongnu.org; Thu, 21 Dec 2017 16:21:49 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2CF22883BC for ; Thu, 21 Dec 2017 21:21:48 +0000 (UTC) Received: from localhost.localdomain (unknown [10.36.112.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E14660C80; Thu, 21 Dec 2017 21:21:46 +0000 (UTC) From: Maxime Coquelin To: qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com, mlureau@redhat.com Date: Thu, 21 Dec 2017 22:21:21 +0100 Message-Id: <20171221212125.19075-2-maxime.coquelin@redhat.com> In-Reply-To: <20171221212125.19075-1-maxime.coquelin@redhat.com> References: <20171221212125.19075-1-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 21 Dec 2017 21:21:48 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 1/5] vhost-user-test: fix features mask X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Coquelin Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" VIRTIO_NET_F_MAC is a bit position, not a bit mask. Signed-off-by: Maxime Coquelin Reviewed-by: Marc-André Lureau --- tests/vhost-user-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index e2c89ed376..43c6528644 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -177,7 +177,7 @@ static void init_virtio_dev(TestServer *s) qvirtio_set_driver(&dev->vdev); features = qvirtio_get_features(&dev->vdev); - features = features & VIRTIO_NET_F_MAC; + features = features & (1u << VIRTIO_NET_F_MAC); qvirtio_set_features(&dev->vdev, features); qvirtio_set_driver_ok(&dev->vdev);