From patchwork Tue Jun 11 06:51:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 10986117 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 866DF14B6 for ; Tue, 11 Jun 2019 06:53:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76F6728701 for ; Tue, 11 Jun 2019 06:53:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B06A28708; Tue, 11 Jun 2019 06:53:55 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1A0DC28701 for ; Tue, 11 Jun 2019 06:53:54 +0000 (UTC) Received: from localhost ([::1]:52182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1haafJ-0005nG-Uy for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Jun 2019 02:53:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56435) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1haaew-0005Iv-Gk for qemu-devel@nongnu.org; Tue, 11 Jun 2019 02:53:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1haaev-0007O2-Ga for qemu-devel@nongnu.org; Tue, 11 Jun 2019 02:53:30 -0400 Received: from mga17.intel.com ([192.55.52.151]:16010) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1haaev-0007JR-8n; Tue, 11 Jun 2019 02:53:29 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jun 2019 23:53:21 -0700 X-ExtLoop1: 1 Received: from npg-dpdk-virtio-tbie-2.sh.intel.com ([10.67.104.151]) by fmsmga006.fm.intel.com with ESMTP; 10 Jun 2019 23:53:20 -0700 From: Tiwei Bie To: mst@redhat.com, jasowang@redhat.com Date: Tue, 11 Jun 2019 14:51:37 +0800 Message-Id: <20190611065137.16329-1-tiwei.bie@intel.com> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.151 Subject: [Qemu-devel] [RFC] vhost-user: don't ignore CTRL_VLAN feature X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The VIRTIO_NET_F_CTRL_VLAN feature requires the support of vhost-user backend. But it will be advertised to guest driver as long as it's enabled by users in QEMU, while it's not supported by vhost-user backend. This patch fixes this issue. Fixes: 72018d1e1917 ("vhost-user: ignore qemu-only features") Cc: qemu-stable@nongnu.org Signed-off-by: Tiwei Bie --- It's not clear in the spec that, whether vlan filtering is also best-effort: https://github.com/oasis-tcs/virtio-spec/blob/37057052e7/content.tex#L3372 hw/net/vhost_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index a6b719035c..1444fc9230 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -75,6 +75,8 @@ static const int user_feature_bits[] = { VIRTIO_NET_F_MTU, VIRTIO_F_IOMMU_PLATFORM, + VIRTIO_NET_F_CTRL_VLAN, + /* This bit implies RARP isn't sent by QEMU out of band */ VIRTIO_NET_F_GUEST_ANNOUNCE,