From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26274CA5FA5 for ; Tue, 29 Sep 2026 10:54:45 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E7D74279E; Tue, 29 Sep 2026 12:54:23 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 745B640EE7 for ; Tue, 29 Sep 2026 12:54:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1790679260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XCxsFcdPB+EYh32ZWRkv4tk44sphQNqiy2dhMlUrCdE=; b=VfIcfVtin6plDpP5l3Cw2qNHR7qIatipXd8IFzivDJBFdFYR92Q1zLXnwkR0EQQ1JOjByX NjmHsYg9zg+MoJkRKh7dBXm7Cgn6Xd6R5pXZRly+7UEeERso9XOsVG6/9CpTGEbW1m6CKq o85ERIe0zxZhUzwIE27qWJIi9QkZcqs= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-fFMVCW-SMXyp9ptW7cTBEg-1; Tue, 29 Sep 2026 06:54:11 -0400 X-MC-Unique: fFMVCW-SMXyp9ptW7cTBEg-1 X-Mimecast-MFC-AGG-ID: fFMVCW-SMXyp9ptW7cTBEg_1790679250 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AED1E180061E; Tue, 29 Sep 2026 10:54:10 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.44.48.139]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D158330000E7; Tue, 29 Sep 2026 10:54:07 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: Maxime Coquelin Cc: mst@redhat.com, david.marchand@redhat.com, dev@dpdk.org, Yongji Xie , chenbox@nvidia.com, Bruce Richardson , Stephen Hemminger , jasowangio@gmail.com Subject: [PATCH v3 7/9] vhost: add net status feature to VDUSE Date: Tue, 29 Sep 2026 12:53:37 +0200 Message-ID: <20260929105339.1554051-8-eperezma@redhat.com> In-Reply-To: <20260929105339.1554051-1-eperezma@redhat.com> References: <20260929105339.1554051-1-eperezma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: JwItVLJyelPQID7S8N6SoRIAKmyybVhy0Ce2377en7U_1790679250 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Maxime Coquelin Enable the VIRTIO_NET_F_STATUS feature for VDUSE devices. This allows the device to report link status (e.g., VIRTIO_NET_S_LINK_UP). It also allows the device to signal the driver that it needs to send gratuitous ARP with VIRTIO_NET_S_ANNOUNCE. Signed-off-by: Maxime Coquelin Signed-off-by: Eugenio Pérez --- lib/vhost/vduse.c | 1 + lib/vhost/vduse.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c index 4950a5da01dd..b51776cf3ff4 100644 --- a/lib/vhost/vduse.c +++ b/lib/vhost/vduse.c @@ -820,6 +820,7 @@ vduse_device_create(const char *path, bool compliant_ol_flags, bool extbuf, bool goto out_ctrl_close; } + vnet_config.status = VIRTIO_NET_S_LINK_UP; vnet_config.max_virtqueue_pairs = max_queue_pairs; memset(dev_config, 0, sizeof(struct vduse_dev_config)); diff --git a/lib/vhost/vduse.h b/lib/vhost/vduse.h index b2515bb9df76..d697f85be5cc 100644 --- a/lib/vhost/vduse.h +++ b/lib/vhost/vduse.h @@ -7,7 +7,8 @@ #include "vhost.h" -#define VDUSE_NET_SUPPORTED_FEATURES VIRTIO_NET_SUPPORTED_FEATURES +#define VDUSE_NET_SUPPORTED_FEATURES (VIRTIO_NET_SUPPORTED_FEATURES | \ + (1ULL << VIRTIO_NET_F_STATUS)) int vduse_device_create(const char *path, bool compliant_ol_flags, bool extbuf, bool linearbuf); int vduse_device_destroy(const char *path); -- 2.55.0