Message ID | 20221117155502.1394700-1-eperezma@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp476574wrr; Thu, 17 Nov 2022 07:56:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf4iZdH4HLt3v2Hkr2bwhNZViNd0VIhGZ8b4Z9e+WSHle+F/QOoF+j6hJO2EAqfYVCtozBlY X-Received: by 2002:a62:794a:0:b0:56c:6ec1:1f1e with SMTP id u71-20020a62794a000000b0056c6ec11f1emr3712447pfc.7.1668700617718; Thu, 17 Nov 2022 07:56:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668700617; cv=none; d=google.com; s=arc-20160816; b=GO7TZ8Lzxs4yTzKoYoX8JOYSZRMP/lNb9vIq08PInVW5zs8LW6u28WSk2LArNZMDEq rMFGq46aXhgZVdLyaxe9SvZ5ff646fId0SSkAQ4kz6p+8PkQM+fxAAWbv2gfcIQBV7+F NDRlteRpf24zda2vrzineMuDHTWvHTbq4fkvJdr1lDDAAoI3+yEqTOFNibzFzytJLSrM 5i3A8oIvxyKoy+X2xdaLDYYI0E8Ci1P2qDW8nK771nDo+OjV1AtbP+8i5X8pP1Cd526M Rt4iF8NYHrtSQ8qJ36FWAiRYVXDR65JSkSBoRxG38AOexZP05U0zkftfqMrEUXiaoDq7 mlVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=RMcPvClDyXqRCgCSImfOhtmqcNJCWNKsgSbr+RY5l4g=; b=IFavmPA9UdGXkx9sOJnuNyy1K0UipkSOCMGJhekNJy5nnHU8umFJRm/dpBhMzQECWw BRLqXDVvDGggzow2S+2xkaowXt8/s3rgqJKnu6D8uGg4XCS3spseSCFDaVCV5tpRUrFH b1/8WfsLLiP/EqkU/huKpvSfkCj/4nBQaRMGEK4Nqx0GVfmrivgNwAMTf2RlUABoY01T j5D9Blbyx2LFICGBSQqoH2i+qvtUxL6OGBmnKWjvos7k9tepmualAOy7cX1mPHHP/Uai YL5NcJJdNtFrV6PSV0vpplXIkhU05KySMwiDRLK3oz6ODMhuS16HucImHFEGjrLS0YKC /8fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g+Nf3E3u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u1-20020a17090341c100b00182c51058ffsi1542024ple.201.2022.11.17.07.56.44; Thu, 17 Nov 2022 07:56:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g+Nf3E3u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233057AbiKQP4G (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Thu, 17 Nov 2022 10:56:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231469AbiKQP4E (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 Nov 2022 10:56:04 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CA5F769E1 for <linux-kernel@vger.kernel.org>; Thu, 17 Nov 2022 07:55:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668700510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RMcPvClDyXqRCgCSImfOhtmqcNJCWNKsgSbr+RY5l4g=; b=g+Nf3E3uMd2DfVdzqQbByfazINNkdvYe1A+Qn+Qutr2uBTZ2jZScKWmlnkAM907w9Hnj+A MO/7Y+ZwUnkZnU/CcflCDIZrJt9BPEV95TdPaHIEDVJBb5uAz8nScGBtuoFvZfhGJhuCeo M3t9Dl0DQ4vOHJSK9U2fDqxiQDGYlb8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-225--alPYjEWN-OVxn2vZ2vEhQ-1; Thu, 17 Nov 2022 10:55:07 -0500 X-MC-Unique: -alPYjEWN-OVxn2vZ2vEhQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B822394AB06; Thu, 17 Nov 2022 15:55:06 +0000 (UTC) Received: from eperezma.remote.csb (unknown [10.39.192.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id B347B111E3ED; Thu, 17 Nov 2022 15:55:05 +0000 (UTC) From: =?utf-8?q?Eugenio_P=C3=A9rez?= <eperezma@redhat.com> To: linux-kernel@vger.kernel.org, mst@redhat.com, virtualization@lists.linux-foundation.org, Jason Wang <jasowang@redhat.com>, Stefano Garzarella <sgarzare@redhat.com> Subject: [PATCH] vdpa_sim_net: Offer VIRTIO_NET_F_STATUS Date: Thu, 17 Nov 2022 16:55:02 +0100 Message-Id: <20221117155502.1394700-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749759418717799729?= X-GMAIL-MSGID: =?utf-8?q?1749759418717799729?= |
Series |
vdpa_sim_net: Offer VIRTIO_NET_F_STATUS
|
|
Commit Message
Eugenio Perez Martin
Nov. 17, 2022, 3:55 p.m. UTC
VIRTIO_NET_S_LINK_UP is already returned in config reads since vdpasim
creation, but the feature bit was not offered to the driver.
Tested modifying VIRTIO_NET_S_LINK_UP and different values of "status"
in qemu virtio-net options, using vhost_vdpa.
Not considering as a fix, because there should be no driver trusting in
this config read before the feature flag.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Thu, Nov 17, 2022 at 04:55:02PM +0100, Eugenio Pérez wrote: >VIRTIO_NET_S_LINK_UP is already returned in config reads since vdpasim >creation, but the feature bit was not offered to the driver. > >Tested modifying VIRTIO_NET_S_LINK_UP and different values of "status" >in qemu virtio-net options, using vhost_vdpa. > >Not considering as a fix, because there should be no driver trusting in >this config read before the feature flag. > >Signed-off-by: Eugenio Pérez <eperezma@redhat.com> >--- > drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
QE applied this path in the test environment, and did regression testing with a vdpa simulator device; there are no new issues raised by this patch. Tested-by: Lei Yang <leiyang@redhat.com> Eugenio Pérez <eperezma@redhat.com> 于2022年11月23日周三 18:36写道: > > VIRTIO_NET_S_LINK_UP is already returned in config reads since vdpasim > creation, but the feature bit was not offered to the driver. > > Tested modifying VIRTIO_NET_S_LINK_UP and different values of "status" > in qemu virtio-net options, using vhost_vdpa. > > Not considering as a fix, because there should be no driver trusting in > this config read before the feature flag. > > Signed-off-by: Eugenio Pérez <eperezma@redhat.com> > --- > drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c > index c3cb225ea469..30cfcfcf97f7 100644 > --- a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c > +++ b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c > @@ -27,6 +27,7 @@ > > #define VDPASIM_NET_FEATURES (VDPASIM_FEATURES | \ > (1ULL << VIRTIO_NET_F_MAC) | \ > + (1ULL << VIRTIO_NET_F_STATUS) | \ > (1ULL << VIRTIO_NET_F_MTU) | \ > (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ > (1ULL << VIRTIO_NET_F_CTRL_MAC_ADDR)) > -- > 2.31.1 > >
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c index c3cb225ea469..30cfcfcf97f7 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c @@ -27,6 +27,7 @@ #define VDPASIM_NET_FEATURES (VDPASIM_FEATURES | \ (1ULL << VIRTIO_NET_F_MAC) | \ + (1ULL << VIRTIO_NET_F_STATUS) | \ (1ULL << VIRTIO_NET_F_MTU) | \ (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ (1ULL << VIRTIO_NET_F_CTRL_MAC_ADDR))