From nobody Sun Nov 24 20:25:05 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=1720934132; cv=none; d=zohomail.com; s=zohoarc; b=S5z0VZVUrh6XvxslTmkhftXgCab2JIxxoftt8pv5Z330kCG24Ei2k0qVkNrM8xsMTii/hyDQmeXORTRF9jdUG0MD9n+CtNxx7ZosZtD25Gsyecyota7laD1czHjBvtp54G6T4Ok82KbhvknQr51h+kJMHys+L0tXEDYdPpKKqyY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1720934132; 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=RoswIqxPm8+Ao30sc4JDk1SQ6cUCL2/B3Rx74o7vbpxAFMz93HoiYM9L6O3D3AaLME11XQTp9ewa4fPRcViOStn0dZR6q5X6EscuV/MvAoIzGbQhOVcalcVOYw8CY55wT9LiPsastbYEQ4MuMA98Kua+pS13nYuTJQEsUqgDs4A= 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 1720934132069388.99878596715564; Sat, 13 Jul 2024 22:15:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSrWL-0007WE-B4; Sun, 14 Jul 2024 01:11:37 -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 1sSrWB-0007KN-Ax for qemu-devel@nongnu.org; Sun, 14 Jul 2024 01:11:27 -0400 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sSrW9-00053n-Pt for qemu-devel@nongnu.org; Sun, 14 Jul 2024 01:11:27 -0400 Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3d9de9f8c8dso1959010b6e.1 for ; Sat, 13 Jul 2024 22:11:25 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-70b7ec7d2bcsm2048768b3a.99.2024.07.13.22.11.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 13 Jul 2024 22:11:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1720933885; x=1721538685; 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=sT8dVCtaipDIYjcxHAodLV8rq0WgHgXWuPCia4ZvmEjhxdcQBiX0nVYM5oRfNrqVSf hyx7aHjjbOTqesc+BJZTGAjqqCnLQRaCGZ2JMgwAY2tg0QJz/ymuuv84cRWKeHuaC3yb fPW52ZPOcvZdYVnE/PBJUGBi+7CLnku7/574yviBqZE4HOGnitKN029/4TEsJ6Pm7C7+ grzO6riaMSwIkFL5/VfJ0wtmJ4ETBhmRQTVn8hYwaBE9uic3pcrQWcAJY+ycORhXNFiL aELVY8wsg2jIkfTjoFsF51l1n3goRl/SkZxaoPNzWPCZKQurkjm9sodqXtI25d9VvbE3 GnhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720933885; x=1721538685; 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=tio8tN9cKrDra+DxtNKy486XtkSajdJirHqlckkNiCpDZDX3llp5nA23fk1BbOIGNf 4fX66GjVbBbijbXpDJ7XHHXcz7eiyX0ELYaKB2W44sdjrh8J8LK33Q+Bcu2HRuD/YSuP Dmz11AHZ1BwlEQLly/7wtIRDI++N8JCPPdTjpQhWTXCqH8Y/5zkJubT/niAzsp0qoPMM Ed4wcLYtzSzjSORGjjSMWyNxLB12JqrK1PNWVKWqnpGz47tIwK3Cw6jQS6iZw0bfGLNA c1OkIc/GQnq56rSltOA3s3uDQN4mSa9gdqVIde72DjhD3qeZ9kbFE0TTw/Fm2Vk2zJPq Up/g== X-Gm-Message-State: AOJu0YzI/gF9w74vDUU7j8VJ08LyDktv0E7PZOaLpuV8AVvhRH1+esNo 0f4c3qTfCInUeoYrTCK6pxahq2dFgI9ujUWWkyoNWyUgbURiLv+BzhfqtXNHcrM= X-Google-Smtp-Source: AGHT+IEJj5q72576lLxdMdfvH2pVGOK+BiUff5b/yEBelDxtKAmy2Qzy61PsRrXu6N+RBJY+XjLBiA== X-Received: by 2002:a05:6808:189d:b0:3da:a032:24a6 with SMTP id 5614622812f47-3daa032397amr13335005b6e.19.1720933884777; Sat, 13 Jul 2024 22:11:24 -0700 (PDT) From: Akihiko Odaki Date: Sun, 14 Jul 2024 14:11:04 +0900 Subject: [PATCH v3 4/5] 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: <20240714-auto-v3-4-e27401aabab3@daynix.com> References: <20240714-auto-v3-0-e27401aabab3@daynix.com> In-Reply-To: <20240714-auto-v3-0-e27401aabab3@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::22c; envelope-from=akihiko.odaki@daynix.com; helo=mail-oi1-x22c.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: 1720934132419116600 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