From nobody Sun Nov 24 21:39:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1720424379; cv=none; d=zohomail.com; s=zohoarc; b=TFmsOQur0g8qC+cJQl7APSUOzNRcVIdq9VOwM8GDt4zUhkAZPO4JEtC1S0fcx7OTdPYEtVTix9L154vyA/aCo+XsvEqFYhUfDJe4T+1y8unliOOhboWMQPIoYEN2++ifvshCgnonDjTlgV/5bC8tRfSQUOAEESuQICzhCQpIcEI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1720424379; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=iMISOcooxhdq/M4EEkPrjF33VD9e2Se2tW19e/nqD5A=; b=jorfeYTr27W+yfPU8qZur+RMq40GoV5Nu3PydUcYq3fBCSpLcXRx8vzJxMIoTuIWTYRoLyQhRIkDe/DN5Z71MakWqMTZ2CHCrpcKrm9G2lP1jGU6n4Xy0aOkEkxsdsgHVmIQmPqNDxMmuefQIaVwBuknUYOX+UOeAbGseoGm/JQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 172042437932842.52684726815073; Mon, 8 Jul 2024 00:39:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQixQ-0002Oi-KL; Mon, 08 Jul 2024 03:38:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQixO-0002HU-6J for qemu-devel@nongnu.org; Mon, 08 Jul 2024 03:38:42 -0400 Received: from mail-il1-x12b.google.com ([2607:f8b0:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQixM-00024G-N9 for qemu-devel@nongnu.org; Mon, 08 Jul 2024 03:38:41 -0400 Received: by mail-il1-x12b.google.com with SMTP id e9e14a558f8ab-389ccd2f0abso88225ab.2 for ; Mon, 08 Jul 2024 00:38:40 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id 41be03b00d2f7-766adeb08c9sm3739492a12.64.2024.07.08.00.38.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jul 2024 00:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1720424319; x=1721029119; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=iMISOcooxhdq/M4EEkPrjF33VD9e2Se2tW19e/nqD5A=; b=01OcDC/GH56aVsbwQoTZXOeMp7rHRFh5tp48FEsBiyniNDkSM1+8niFAJFT/JN9Mp/ i037rbq4H15ID9viF9UpEavOBWvvHk0jl4s6Dq8lzYywpvRKGoCDeQ4j8MNFhJKtMZnB WTXWdpiJEKtE5PuWtR47kesZPVU/5GPukHKpGYoCRwU5nQmsk8W3M1ydpbiMnAVM+oqf f5T27N/y+VqKYPfxm5ivltZZJs4wbtHmGtzFvTTFPEcnX903AmfQLxzE7C9WtCjpKNzh DGjRnk5taiGTjGfD5DeWrl6kabiHHM+Vt3SPnQ5s8gkQ1zW0+RVY2EzvLm3yXlCX+J/G j14A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720424319; x=1721029119; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iMISOcooxhdq/M4EEkPrjF33VD9e2Se2tW19e/nqD5A=; b=O1VHhADxZX8QvrnK7ijdllkytN3SScm33F0rOS8nssFPvKmUuaBFMKTacw8KbbefVU vr6WAaA67kwJhuoZqnBpQFHpcCbzCunOvMUx+BFO/7y6Gee5S9/Vz0rTV2rVsRGdJj1t 1FwufQPw33itkdnjodwcb8c/pqlDv1dovdya7A7hVanmsR7dBD9yBIvx4ln6mCwu1EeZ SCYkdvDeLqwTffYwzGjomPoiXWN4PTlXcAD0N7BS/c2nWEDH4LIhP5J6UW2LXrJac6+h By9fo+iL76xO3xC7kHhTxe64GERDTg01eLlm7qREXQ5jwYOlp6qASCVmjDNzP/rxGbKJ xlLQ== X-Gm-Message-State: AOJu0YzDRXVA8shifaeaK0YLc+YyX8GA7xiL6S4czadKqykx86CKk9jK 6pzSJomgSzY3cWLl4489hUUvGYR9i0mbOLh61Rsoz6HywyHsmuQBGANzrfskRVo= X-Google-Smtp-Source: AGHT+IFm7NBhoNtqECj27U/6vBgOkLLfRC9sG3hc5gnG/V00uVQhzlpJdXd71UwM1sBZH4V6kjLudw== X-Received: by 2002:a05:6e02:1d10:b0:382:b82b:6e48 with SMTP id e9e14a558f8ab-38398b02802mr131355105ab.9.1720424319664; Mon, 08 Jul 2024 00:38:39 -0700 (PDT) From: Akihiko Odaki Date: Mon, 08 Jul 2024 16:38:08 +0900 Subject: [PATCH v2 3/4] virtio-net: Report RSS warning at device realization MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240708-auto-v2-3-f4908b953f05@daynix.com> References: <20240708-auto-v2-0-f4908b953f05@daynix.com> In-Reply-To: <20240708-auto-v2-0-f4908b953f05@daynix.com> To: Jason Wang , Dmitry Fleytman , Sriram Yagnaraman , "Michael S. Tsirkin" , Luigi Rizzo , Giuseppe Lettieri , Vincenzo Maffione , Andrew Melnychenko , Yuri Benditovich , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-fd6e3 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::12b; envelope-from=akihiko.odaki@daynix.com; helo=mail-il1-x12b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1720424381218100005 Warning about RSS fallback at device realization allows the user to notice the configuration problem early. Signed-off-by: Akihiko Odaki --- hw/net/virtio-net.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index bd285921d507..e779ba2df428 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -822,6 +822,10 @@ static uint64_t virtio_net_get_features(VirtIODevice *= vdev, uint64_t features, =20 if (!get_vhost_net(nc->peer)) { if (!ebpf_rss_is_loaded(&n->ebpf_rss)) { + if (on_off_auto_features.on_bits & VIRTIO_NET_F_RSS) { + warn_report("Can't load eBPF RSS - fallback to software RS= S"); + } + virtio_clear_feature(&on_off_auto_features.auto_bits, VIRTIO_NET_F_RSS); } @@ -1332,16 +1336,10 @@ static void virtio_net_detach_epbf_rss(VirtIONet *n) static void virtio_net_commit_rss_config(VirtIONet *n) { if (n->rss_data.enabled) { - n->rss_data.enabled_software_rss =3D n->rss_data.populate_hash; + n->rss_data.enabled_software_rss =3D n->rss_data.populate_hash || + !virtio_net_attach_epbf_rss(n); if (n->rss_data.populate_hash) { virtio_net_detach_epbf_rss(n); - } else if (!virtio_net_attach_epbf_rss(n)) { - if (get_vhost_net(qemu_get_queue(n->nic)->peer)) { - warn_report("Can't load eBPF RSS for vhost"); - } else { - warn_report("Can't load eBPF RSS - fallback to software RS= S"); - n->rss_data.enabled_software_rss =3D true; - } } =20 trace_virtio_net_rss_enable(n->rss_data.hash_types, --=20 2.45.2